Skip to content

Commit 5841156

Browse files
authored
feat: network upgrade v0.38.0 (#1975)
refs akash-network/AEP#4 This avoids saving the genesisDoc to database. When using goleveldb and ~4GiB+ genesis files, it causes a panic during snappy encoding (panic: snappy: decoded block is too large). Signed-off-by: Artur Troian <[email protected]> --------- Signed-off-by: Artur Troian <[email protected]>
1 parent 27b4e67 commit 5841156

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+4767
-1566
lines changed

.github/repo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github.com/akash-network/node

.github/workflows/tests.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,31 @@ jobs:
182182
network-upgrade-names:
183183
runs-on: upgrade-tester
184184
steps:
185+
- name: Cleanup build folder
186+
run: |
187+
sudo rm -rf ./* || true
188+
sudo rm -rf ./.??* || true
185189
- uses: actions/checkout@v4
186190
- run: git fetch --prune --unshallow
187191
- name: Detect required Go version
188192
run: |
189193
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
190194
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
195+
- name: 'Setup jq'
196+
uses: dcarbone/install-jq-action@v3
197+
- name: Setup npm
198+
uses: actions/setup-node@v4
199+
with:
200+
node-version: 18
191201
- uses: actions/setup-go@v5
192202
with:
193203
go-version: "${{ env.GOVERSION }}"
204+
- name: Setup docker user
205+
run: |
206+
DOCKER_USER=$(id -u)
207+
DOCKER_GROUP=$(id -g)
208+
echo "DOCKER_USER=$DOCKER_USER" >> $GITHUB_ENV
209+
echo "DOCKER_GROUP=$DOCKER_GROUP" >> $GITHUB_ENV
194210
- name: set environment
195211
uses: HatsuneMiku3939/direnv-action@v1
196212
- name: Ensure only directories exists in upgrades dir
@@ -209,15 +225,31 @@ jobs:
209225
network-upgrade:
210226
runs-on: upgrade-tester
211227
steps:
228+
- name: Cleanup build folder
229+
run: |
230+
sudo rm -rf ./* || true
231+
sudo rm -rf ./.??* || true
212232
- uses: actions/checkout@v4
213233
- run: git fetch --prune --unshallow
214234
- name: Detect required Go version
215235
run: |
216236
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
217237
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
238+
- name: 'Setup jq'
239+
uses: dcarbone/install-jq-action@v3
240+
- name: Setup npm
241+
uses: actions/setup-node@v4
242+
with:
243+
node-version: 18
218244
- uses: actions/setup-go@v5
219245
with:
220246
go-version: "${{ env.GOVERSION }}"
247+
- name: Setup docker user
248+
run: |
249+
DOCKER_USER=$(id -u)
250+
DOCKER_GROUP=$(id -g)
251+
echo "DOCKER_USER=$DOCKER_USER" >> $GITHUB_ENV
252+
echo "DOCKER_GROUP=$DOCKER_GROUP" >> $GITHUB_ENV
221253
- name: set environment
222254
uses: HatsuneMiku3939/direnv-action@v1
223255
- name: configure variables
@@ -237,6 +269,7 @@ jobs:
237269
name: validators-logs
238270
path: |
239271
.cache/run/upgrade/validators/logs/*.log
272+
include-hidden-files: true
240273

241274
dispatch-release:
242275
runs-on: ubuntu-latest

.golangci.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ issues:
22
exclude:
33
- comment on exported (method|function|type|const|var)
44
exclude-use-default: true
5-
6-
# Skip generated k8s code
7-
run:
8-
skip-dirs:
9-
- pkg/client
5+
exclude-dirs:
106
- ".*/mocks"
11-
127
# Skip vendor/ etc
138
skip-dirs-use-default: true
9+
linters:
10+
disable-all: true
11+
enable:
12+
- misspell
13+
- unused
14+
- gofmt
15+
- gocritic
16+
- goconst
17+
- ineffassign
18+
- unparam
19+
- staticcheck
20+
- prealloc

.goreleaser-docker.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
---
2+
version: 2
13
project_name: node
4+
dist: ./.cache/goreleaser/docker
25
env:
36
- GO111MODULE=on
47
- CGO_ENABLED=1
@@ -75,4 +78,3 @@ dockers:
7578

7679
archives:
7780
- format: binary
78-
rlcp: true

.goreleaser-test-bins.yaml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
project_name: node
3+
version: 2
4+
dist: ./.cache/goreleaser/test-bins
5+
env:
6+
- GO111MODULE=on
7+
- CGO_ENABLED=1
8+
builds:
9+
- id: akash-darwin-amd64
10+
binary: akash
11+
main: ./cmd/akash
12+
goarch:
13+
- amd64
14+
goos:
15+
- darwin
16+
env:
17+
- CC=o64-clang
18+
- CXX=o64-clang++
19+
flags:
20+
- "-mod={{ .Env.MOD }}"
21+
- "-tags={{ .Env.BUILD_TAGS }}"
22+
- -trimpath
23+
ldflags:
24+
- "{{ .Env.BUILD_VARS }}"
25+
- "{{ .Env.STRIP_FLAGS }}"
26+
- "-linkmode={{ .Env.LINKMODE }}"
27+
- id: akash-darwin-arm64
28+
binary: akash
29+
main: ./cmd/akash
30+
goarch:
31+
- arm64
32+
goos:
33+
- darwin
34+
env:
35+
- CC=oa64-clang
36+
- CXX=oa64-clang++
37+
flags:
38+
- "-mod={{ .Env.MOD }}"
39+
- "-tags={{ .Env.BUILD_TAGS }}"
40+
- -trimpath
41+
ldflags:
42+
- "{{ .Env.BUILD_VARS }}"
43+
- "{{ .Env.STRIP_FLAGS }}"
44+
- "-linkmode={{ .Env.LINKMODE }}"
45+
- id: akash-linux-amd64
46+
binary: akash
47+
main: ./cmd/akash
48+
env:
49+
- CC=x86_64-linux-gnu-gcc
50+
- CXX=x86_64-linux-gnu-g++
51+
goarch:
52+
- amd64
53+
goos:
54+
- linux
55+
flags:
56+
- "-mod={{ .Env.MOD }}"
57+
- "-tags={{ .Env.BUILD_TAGS }}"
58+
- -trimpath
59+
ldflags:
60+
- "{{ .Env.BUILD_VARS }}"
61+
- "{{ .Env.STRIP_FLAGS }}"
62+
- "-linkmode={{ .Env.LINKMODE }}"
63+
- -extldflags "-lc -lrt -lpthread --static"
64+
- id: akash-linux-arm64
65+
binary: akash
66+
main: ./cmd/akash
67+
goarch:
68+
- arm64
69+
goos:
70+
- linux
71+
env:
72+
- CC=aarch64-linux-gnu-gcc
73+
- CXX=aarch64-linux-gnu-g++
74+
flags:
75+
- "-mod={{ .Env.MOD }}"
76+
- "-tags={{ .Env.BUILD_TAGS }}"
77+
- -trimpath
78+
ldflags:
79+
- "{{ .Env.BUILD_VARS }}"
80+
- "{{ .Env.STRIP_FLAGS }}"
81+
- "-linkmode={{ .Env.LINKMODE }}"
82+
- -extldflags "-lc -lrt -lpthread --static"
83+
universal_binaries:
84+
- id: akash-darwin-universal
85+
ids:
86+
- akash-darwin-amd64
87+
- akash-darwin-arm64
88+
replace: true
89+
name_template: "akash"
90+
91+
archives:
92+
- id: wo/version
93+
builds:
94+
- akash-darwin-universal
95+
- akash-linux-amd64
96+
- akash-linux-arm64
97+
name_template: "akash_{{ .Os }}_{{ .Arch }}"
98+
wrap_in_directory: false
99+
formats:
100+
- zip
101+
files:
102+
- none*

.goreleaser.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
version: 2
13
project_name: node
24
dist: ./.cache/goreleaser
35
env:
@@ -113,7 +115,8 @@ archives:
113115
- akash-windows-amd64
114116
name_template: "akash_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
115117
wrap_in_directory: false
116-
format: zip
118+
formats:
119+
- zip
117120
files:
118121
- none*
119122
- id: wo/version
@@ -124,7 +127,8 @@ archives:
124127
- akash-windows-amd64
125128
name_template: "akash_{{ .Os }}_{{ .Arch }}"
126129
wrap_in_directory: false
127-
format: zip
130+
formats:
131+
- zip
128132
files:
129133
- none*
130134

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include make/init.mk
1212

1313
DOCKER_RUN := docker run --rm -v $(shell pwd):/workspace -w /workspace
1414
GOLANGCI_LINT_RUN := $(GOLANGCI_LINT) run
15-
LINT = $(GOLANGCI_LINT_RUN) ./... --disable-all --deadline=5m --enable
15+
LINT = $(GOLANGCI_LINT_RUN) ./... --disable-all --timeout=5m --enable
1616

1717
GORELEASER_CONFIG ?= .goreleaser.yaml
1818

0 commit comments

Comments
 (0)