Skip to content

Commit

Permalink
chore: backport remove genesis persistence from state
Browse files Browse the repository at this point in the history
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 <troian.ap@gmail.com>
  • Loading branch information
troian committed Feb 6, 2025
1 parent 27b4e67 commit 9fd6832
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 17 deletions.
19 changes: 13 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ issues:
exclude:
- comment on exported (method|function|type|const|var)
exclude-use-default: true

# Skip generated k8s code
run:
skip-dirs:
- pkg/client
exclude-dirs:
- ".*/mocks"

# Skip vendor/ etc
skip-dirs-use-default: true
linters:
disable-all: true
enable:
- misspell
- unused
- gofmt
- gocritic
- goconst
- ineffassign
- unparam
- staticcheck
- prealloc
3 changes: 2 additions & 1 deletion .goreleaser-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
version: 2
project_name: node
env:
- GO111MODULE=on
Expand Down Expand Up @@ -75,4 +77,3 @@ dockers:

archives:
- format: binary
rlcp: true
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
version: 2
project_name: node
dist: ./.cache/goreleaser
env:
Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ require (
)

retract (
v0.36.3-rc4
v0.34.0
v0.28.1
v0.28.0
Expand All @@ -49,6 +50,7 @@ retract (
replace (
// use cosmos fork of keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/cosmos/cosmos-sdk => github.com/akash-network/cosmos-sdk v0.45.16-akash.1

// use akash version of cosmos ledger api
github.com/cosmos/ledger-cosmos-go => github.com/akash-network/ledger-go/cosmos v0.14.4
Expand All @@ -63,7 +65,8 @@ replace (
// To be replaced by cosmos/gogoproto in future versions
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
// use cometBFT system fork of tendermint with akash patches
github.com/tendermint/tendermint => github.com/akash-network/cometbft v0.34.27-akash
github.com/tendermint/tendermint => github.com/akash-network/cometbft v0.34.27-akash.2

github.com/zondax/hid => github.com/troian/hid v0.13.2
github.com/zondax/ledger-go => github.com/akash-network/ledger-go v0.14.3
// latest grpc doesn't work with with cosmos-sdk modified proto compiler, so we need to enforce
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/akash-network/akash-api v0.0.67 h1:lwtSvYoxXe/XJKB0UabA2np3l0ujLMsKxmA4e6IWzsM=
github.com/akash-network/akash-api v0.0.67/go.mod h1:PdOQGTCX3kLBoKHdbPF9pe5+vSLANaMJbgA04UE+OqY=
github.com/akash-network/cometbft v0.34.27-akash h1:V1dApDOr8Ee7BJzYyQ7Z9VBtrAul4+baMeA6C49dje0=
github.com/akash-network/cometbft v0.34.27-akash/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw=
github.com/akash-network/cometbft v0.34.27-akash.2 h1:2hKEcX+cIv/OLAJ82gBWdkZlVWn+8JUYs4GrDoPAOhU=
github.com/akash-network/cometbft v0.34.27-akash.2/go.mod h1:BcCbhKv7ieM0KEddnYXvQZR+pZykTKReJJYf7YC7qhw=
github.com/akash-network/cosmos-sdk v0.45.16-akash.1 h1:mAvN01zEMK8MMhtbk39/DsjGwczc2zI5kQvuubY5cxU=
github.com/akash-network/cosmos-sdk v0.45.16-akash.1/go.mod h1:NTnk/GuQdFyfk/iGFxDAgQH9fwcbRW/hREap6qaPg48=
github.com/akash-network/ledger-go v0.14.3 h1:LCEFkTfgGA2xFMN2CtiKvXKE7dh0QSM77PJHCpSkaAo=
github.com/akash-network/ledger-go v0.14.3/go.mod h1:NfsjfFvno9Kaq6mfpsKz4sqjnAVVEsVsnBJfKB4ueAs=
github.com/akash-network/ledger-go/cosmos v0.14.4 h1:h3WiXmoKKs9wkj1LHcJ12cLjXXg6nG1fp+UQ5+wu/+o=
Expand Down Expand Up @@ -221,8 +223,6 @@ github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 h1:zlCp9n3uwQieEL
github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ=
github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0=
github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE=
github.com/cosmos/cosmos-sdk v0.45.16 h1:5ba/Bh5/LE55IwHQuCU4fiG4eXeDKtSWzehXRpaKDcw=
github.com/cosmos/cosmos-sdk v0.45.16/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=
github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=
Expand Down
2 changes: 1 addition & 1 deletion make/init.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif

# ==== Build tools versions ====
# Format <TOOL>_VERSION
GOLANGCI_LINT_VERSION ?= v1.51.2
GOLANGCI_LINT_VERSION ?= v1.62.2
STATIK_VERSION ?= v0.1.7
GIT_CHGLOG_VERSION ?= v0.15.1
MOCKERY_VERSION ?= 2.42.0
Expand Down
2 changes: 1 addition & 1 deletion make/lint.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test-sublinters: $(patsubst %, test-sublinter-%,$(SUBLINTERS))

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

.PHONY: test-sublinter-misspell
test-sublinter-misspell: $(GOLANGCI_LINT)
Expand Down
6 changes: 3 additions & 3 deletions make/releasing.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GON_CONFIGFILE ?= gon.json

GORELEASER_DEBUG ?= false
GORELEASER_VERBOSE ?= false
GORELEASER_IMAGE := ghcr.io/goreleaser/goreleaser-cross:$(GOTOOLCHAIN_SEMVER)
GORELEASER_RELEASE ?= false
GORELEASER_MOUNT_CONFIG ?= false
Expand Down Expand Up @@ -69,7 +69,7 @@ docker-image:
-w /go/src/$(GO_MOD_NAME) \
$(GORELEASER_IMAGE) \
-f .goreleaser-docker.yaml \
--debug=$(GORELEASER_DEBUG) \
--verbose=$(GORELEASER_VERBOSE) \
--clean \
--skip=publish,validate \
--snapshot
Expand Down Expand Up @@ -102,6 +102,6 @@ release: gen-changelog
-f "$(GORELEASER_CONFIG)" \
release \
$(GORELEASER_SKIP) \
--debug=$(GORELEASER_DEBUG) \
--verbose=$(GORELEASER_VERBOSE) \
--clean \
--release-notes=/go/src/$(GO_MOD_NAME)/.cache/changelog.md

0 comments on commit 9fd6832

Please sign in to comment.