Skip to content

Commit b10eef4

Browse files
committed
chore: backport remove genesis persistence from state
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). refs akash-network/support#280 Signed-off-by: Artur Troian <[email protected]>
1 parent 27b4e67 commit b10eef4

File tree

9 files changed

+31
-18
lines changed

9 files changed

+31
-18
lines changed

.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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
---
2+
version: 2
13
project_name: node
24
env:
35
- GO111MODULE=on
@@ -75,4 +77,3 @@ dockers:
7577

7678
archives:
7779
- format: binary
78-
rlcp: true

.goreleaser.yaml

Lines changed: 2 additions & 0 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:

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

go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ require (
3939
)
4040

4141
retract (
42+
v0.36.3-rc4
4243
v0.34.0
4344
v0.28.1
4445
v0.28.0
@@ -49,6 +50,7 @@ retract (
4950
replace (
5051
// use cosmos fork of keyring
5152
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
53+
github.com/cosmos/cosmos-sdk => github.com/akash-network/cosmos-sdk v0.45.16-akash.1
5254

5355
// use akash version of cosmos ledger api
5456
github.com/cosmos/ledger-cosmos-go => github.com/akash-network/ledger-go/cosmos v0.14.4
@@ -63,7 +65,8 @@ replace (
6365
// To be replaced by cosmos/gogoproto in future versions
6466
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
6567
// use cometBFT system fork of tendermint with akash patches
66-
github.com/tendermint/tendermint => github.com/akash-network/cometbft v0.34.27-akash
68+
github.com/tendermint/tendermint => github.com/akash-network/cometbft v0.34.27-akash.2
69+
6770
github.com/zondax/hid => github.com/troian/hid v0.13.2
6871
github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
6972
// latest grpc doesn't work with with cosmos-sdk modified proto compiler, so we need to enforce

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY
7878
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
7979
github.com/akash-network/akash-api v0.0.67 h1:lwtSvYoxXe/XJKB0UabA2np3l0ujLMsKxmA4e6IWzsM=
8080
github.com/akash-network/akash-api v0.0.67/go.mod h1:PdOQGTCX3kLBoKHdbPF9pe5+vSLANaMJbgA04UE+OqY=
81-
github.com/akash-network/cometbft v0.34.27-akash h1:V1dApDOr8Ee7BJzYyQ7Z9VBtrAul4+baMeA6C49dje0=
82-
github.com/akash-network/cometbft v0.34.27-akash/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw=
81+
github.com/akash-network/cometbft v0.34.27-akash.2 h1:2hKEcX+cIv/OLAJ82gBWdkZlVWn+8JUYs4GrDoPAOhU=
82+
github.com/akash-network/cometbft v0.34.27-akash.2/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw=
83+
github.com/akash-network/cosmos-sdk v0.45.16-akash.1 h1:mAvN01zEMK8MMhtbk39/DsjGwczc2zI5kQvuubY5cxU=
84+
github.com/akash-network/cosmos-sdk v0.45.16-akash.1/go.mod h1:NTnk/GuQdFyfk/iGFxDAgQH9fwcbRW/hREap6qaPg48=
8385
github.com/akash-network/ledger-go v0.14.3 h1:LCEFkTfgGA2xFMN2CtiKvXKE7dh0QSM77PJHCpSkaAo=
8486
github.com/akash-network/ledger-go v0.14.3/go.mod h1:NfsjfFvno9Kaq6mfpsKz4sqjnAVVEsVsnBJfKB4ueAs=
8587
github.com/akash-network/ledger-go/cosmos v0.14.4 h1:h3WiXmoKKs9wkj1LHcJ12cLjXXg6nG1fp+UQ5+wu/+o=
@@ -221,8 +223,6 @@ github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 h1:zlCp9n3uwQieEL
221223
github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ=
222224
github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0=
223225
github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE=
224-
github.com/cosmos/cosmos-sdk v0.45.16 h1:5ba/Bh5/LE55IwHQuCU4fiG4eXeDKtSWzehXRpaKDcw=
225-
github.com/cosmos/cosmos-sdk v0.45.16/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40=
226226
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
227227
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
228228
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=

make/init.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ endif
5050

5151
# ==== Build tools versions ====
5252
# Format <TOOL>_VERSION
53-
GOLANGCI_LINT_VERSION ?= v1.51.2
53+
GOLANGCI_LINT_VERSION ?= v1.62.2
5454
STATIK_VERSION ?= v0.1.7
5555
GIT_CHGLOG_VERSION ?= v0.15.1
5656
MOCKERY_VERSION ?= 2.42.0

make/lint.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test-sublinters: $(patsubst %, test-sublinter-%,$(SUBLINTERS))
1919

2020
.PHONY: test-lint-all
2121
test-lint-all: $(GOLANGCI_LINT)
22-
$(GOLANGCI_LINT_RUN) ./... --issues-exit-code=0 --deadline=10m
22+
$(GOLANGCI_LINT_RUN) ./... --issues-exit-code=0 --timeout=10m
2323

2424
.PHONY: test-sublinter-misspell
2525
test-sublinter-misspell: $(GOLANGCI_LINT)

make/releasing.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GON_CONFIGFILE ?= gon.json
22

3-
GORELEASER_DEBUG ?= false
3+
GORELEASER_VERBOSE ?= false
44
GORELEASER_IMAGE := ghcr.io/goreleaser/goreleaser-cross:$(GOTOOLCHAIN_SEMVER)
55
GORELEASER_RELEASE ?= false
66
GORELEASER_MOUNT_CONFIG ?= false
@@ -69,7 +69,7 @@ docker-image:
6969
-w /go/src/$(GO_MOD_NAME) \
7070
$(GORELEASER_IMAGE) \
7171
-f .goreleaser-docker.yaml \
72-
--debug=$(GORELEASER_DEBUG) \
72+
--verbose=$(GORELEASER_VERBOSE) \
7373
--clean \
7474
--skip=publish,validate \
7575
--snapshot
@@ -102,6 +102,6 @@ release: gen-changelog
102102
-f "$(GORELEASER_CONFIG)" \
103103
release \
104104
$(GORELEASER_SKIP) \
105-
--debug=$(GORELEASER_DEBUG) \
105+
--verbose=$(GORELEASER_VERBOSE) \
106106
--clean \
107107
--release-notes=/go/src/$(GO_MOD_NAME)/.cache/changelog.md

0 commit comments

Comments
 (0)