Skip to content

Commit adf6d32

Browse files
authored
Merge pull request #1008 from neutron-org/feat/cosmos-sdk-53
feat: cosmos sdk 53
2 parents 127722d + 18b0a8b commit adf6d32

File tree

749 files changed

+10811
-7700
lines changed

Some content is hidden

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

749 files changed

+10811
-7700
lines changed

.github/workflows/lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ jobs:
1616
name: lint
1717
runs-on: ubicloud-standard-2
1818
steps:
19-
- uses: actions/setup-go@v4
19+
- uses: actions/setup-go@v6
2020
with:
21-
go-version: '~1.23'
21+
go-version: '1.24.10'
2222
cache: false
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v6
2424
- name: golangci-lint
25-
uses: golangci/golangci-lint-action@v6
25+
uses: golangci/golangci-lint-action@v9
2626
with:
2727
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
28-
version: 'v1.63.4'
28+
version: 'v2.7.1'
2929
# Optional: working directory, useful for monorepos
3030
# working-directory: somedir
3131

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
name: Test
88
runs-on: ubicloud-standard-2
99
steps:
10-
- name: Set up Go 1.23
10+
- name: Set up Go 1.24
1111
uses: actions/setup-go@v4
1212
with:
13-
go-version: ~1.23
13+
go-version: ~1.24
1414
id: go
1515

1616
- name: Check out code into the Go module directory

.golangci.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,35 @@
1+
version: "2"
12
run:
23
tests: true
3-
# timeout for analysis, e.g. 30s, 5m, default is 1m
4-
timeout: 10m
5-
64
linters:
7-
disable-all: true
5+
default: none
86
enable:
7+
- copyloopvar
98
- dogsled
109
- errcheck
11-
- copyloopvar
1210
- goconst
1311
- gocritic
14-
- gofumpt
1512
- gosec
16-
- gosimple
1713
- govet
1814
- ineffassign
1915
- misspell
2016
- nakedret
2117
- nolintlint
22-
- revive
2318
- staticcheck
24-
- stylecheck
25-
- typecheck
2619
- unconvert
2720
- unparam
2821
- unused
29-
30-
issues:
31-
max-issues-per-linter: 10000
32-
max-same-issues: 10000
33-
34-
linters-settings:
35-
gofumpt:
36-
# Choose whether to use the extra rules.
37-
# Default: false
38-
extra-rules: true
39-
nolintlint:
40-
allow-unused: true
41-
require-explanation: false
42-
require-specific: false
22+
settings:
23+
nolintlint:
24+
require-explanation: false
25+
require-specific: false
26+
allow-unused: true
27+
exclusions:
28+
paths:
29+
- '.*.pb.go'
30+
formatters:
31+
enable:
32+
- gofumpt
33+
settings:
34+
gofumpt:
35+
extra-rules: true

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
golang 1.24.10

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM golang:1.23-bullseye
3+
FROM golang:1.24-bullseye
44
RUN apt-get update && apt-get install -y jq xxd
55
EXPOSE 26656 26657 1317 9090
66
COPY --from=app . /opt/neutron

Dockerfile.builder

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
ARG GO_VERSION="1.23"
3+
ARG GO_VERSION="1.24"
44
ARG RUNNER_IMAGE="gcr.io/distroless/static"
55

66
# --------------------------------------------------------
@@ -14,7 +14,7 @@ ARG GIT_COMMIT
1414
ARG BUILD_TAGS
1515
ARG ENABLED_PROPOSALS
1616

17-
ENV GOTOOLCHAIN go1.23.4
17+
ENV GOTOOLCHAIN go1.24.10
1818

1919
RUN apk add --no-cache \
2020
ca-certificates \
@@ -29,7 +29,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
2929
go mod download
3030

3131
# Cosmwasm - Download correct libwasmvm version
32-
RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm/v2 | cut -d ' ' -f 2) && \
32+
RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm/v3 | cut -d ' ' -f 2) && \
3333
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$(uname -m).a \
3434
-O /lib/libwasmvm_muslc.$(uname -m).a && \
3535
# verify checksum

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ LEDGER_ENABLED ?= true
77
SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g')
88
BINDIR ?= $(GOPATH)/bin
99
SIMAPP = ./app
10-
GO_VERSION=1.23
11-
GOLANGCI_LINT_VERSION=v1.63.4
10+
GO_VERSION=1.24
11+
GOLANGCI_LINT_VERSION=v2.7.1
1212
BUILDDIR ?= $(CURDIR)/build
1313

1414
# for dockerized protobuf tools
@@ -203,14 +203,13 @@ test-sim-multi-seed-short: runsim
203203
###############################################################################
204204

205205
lint:
206-
golangci-lint run --exclude-files ".*.pb.go"
206+
golangci-lint run --fix --config .golangci.yml
207207
find . -name '*.go' -not -name "*.pb.go" -type f -not -path "./vendor*" -not -path "*.git*" -not -path "*_test.go" | xargs gofmt -d -s
208208

209-
format:
209+
format: lint
210210
@go install mvdan.cc/gofumpt@latest
211-
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
211+
@go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
212212
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name "*.pb.go" -not -name "*.pb.gw.go" -not -name "*.pulsar.go" -not -path "./crypto/keys/secp256k1/*" | xargs -I % sh -c 'gofumpt -w -l % && goimports -w -local github.com/neutron-org %'
213-
golangci-lint run --fix --exclude-files ".*.pb.go"
214213

215214
.PHONY: format
216215

app/ante_handler.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import (
1010
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
1111
"github.com/cosmos/cosmos-sdk/x/auth/ante"
1212
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
13-
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
14-
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
13+
ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante"
14+
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
1515
feemarketante "github.com/skip-mev/feemarket/x/feemarket/ante"
1616

17-
globalfeeante "github.com/neutron-org/neutron/v9/x/globalfee/ante"
18-
globalfeekeeper "github.com/neutron-org/neutron/v9/x/globalfee/keeper"
17+
globalfeeante "github.com/neutron-org/neutron/v10/x/globalfee/ante"
18+
globalfeekeeper "github.com/neutron-org/neutron/v10/x/globalfee/keeper"
1919
)
2020

2121
// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
@@ -27,7 +27,7 @@ type HandlerOptions struct {
2727
AccountKeeper feemarketante.AccountKeeper
2828
IBCKeeper *ibckeeper.Keeper
2929
GlobalFeeKeeper globalfeekeeper.Keeper
30-
WasmConfig *wasmTypes.NodeConfig
30+
NodeConfig *wasmTypes.NodeConfig
3131
TXCounterStoreService corestoretypes.KVStoreService
3232
FeeMarketKeeper feemarketante.FeeMarketKeeper
3333
}
@@ -42,7 +42,7 @@ func NewAnteHandler(options HandlerOptions, _ log.Logger) (sdk.AnteHandler, erro
4242
if options.SignModeHandler == nil {
4343
return nil, errors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
4444
}
45-
if options.WasmConfig == nil {
45+
if options.NodeConfig == nil {
4646
return nil, errors.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder")
4747
}
4848
if options.TXCounterStoreService == nil {
@@ -60,7 +60,7 @@ func NewAnteHandler(options HandlerOptions, _ log.Logger) (sdk.AnteHandler, erro
6060

6161
anteDecorators := []sdk.AnteDecorator{
6262
ante.NewSetUpContextDecorator(),
63-
wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit), // after setup context to enforce limits early
63+
wasmkeeper.NewLimitSimulationGasDecorator(options.NodeConfig.SimulationGasLimit), // after setup context to enforce limits early
6464
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreService),
6565
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
6666
ante.NewValidateBasicDecorator(),

0 commit comments

Comments
 (0)