Skip to content

Commit

Permalink
feat: cosmos sdk 0.47.10 upgrade (#2100)
Browse files Browse the repository at this point in the history
* Remove broadcast mode block wip

* Fixes

* Changelog

* PR comments

* Lint fix

* refactor: remove fungible params (#2004)

* Remove unused params from fungible module

* Make generate

* Changelog

* Lint fix

* Lint fix

* Fix changelog

* Revert proto indexes

* Make generate

* refactor: deprecate x/params (#2014)

* Remove unused params from fungible module

* Make generate

* Changelog

* Lint fix

* Lint fix

* Migrate emissions params to store

* Migrate observer params to its own store

* Make generate

* Changelog

* Lint fixes

* Add observer slash amount param to migrate script

* Fix tests

* Lint fixes

* Fixes

* Lint fixes

* Fixes

* Tests

* Small cleanup

* Remove not needed params store mock

* Fixes after merge

* Add found flag to get params method

* Move ballot maturity blocks param to emissions module

* Remove params from observer module

* Fix build

* PR comments

* PR comment

* PR comments

* PR comments

* feat: cosmos v0.47 upgrade (#2039)

* proto fixes after merge

* Fix tx proto emissions

* fixes

* make generate

* remove tendermint usage

* Update changelog

* fix test

* add some logs to proto gen script

* permissions

* add more logs

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* cleanup

* cleanup

* always format proto before generation

* generate explicit format deps

* set docker username to fix permissions in CI

* dummy proto change to test formatting

* set buf cache directory

* Revert "dummy proto change to test formatting"

This reverts commit 7e5c0dc.

* refactor: update go-tss (#2094)

* Remove unused params from fungible module

* Make generate

* Changelog

* Lint fix

* Lint fix

* Migrate emissions params to store

* Migrate observer params to its own store

* Make generate

* Changelog

* Lint fixes

* Add observer slash amount param to migrate script

* Fix tests

* Lint fixes

* Fixes

* Lint fixes

* Fixes

* Tests

* Small cleanup

* Try upgrade with simapp change

* Remove not needed params store mock

* fix compile errors

* proto changes

* Fixes

* Upgrade handler changes

* Fixes

* Fix e2e test

* Fixes after merge

* Add found flag to get params method

* Move ballot maturity blocks param to emissions module

* Remove params from observer module

* Fix build

* Regen proto

* Fixes for e2e tests

* Fix some unit tests

* Fix some lint errors

* Fix more unit tests

* PR comments

* Proto paths fixes

* Linters

* make typescript

* proto format

* make specs

* make docs

* make gen

* lint

* Fix some unit tests

* Fix cli test suites

* Fix lints

* Tmp comment unit test

* lint

* Use latest ethermint change and fix test

* PR comment

* PR comments

* Fix one more import

* Cleanup

* Lint fix

* Bump zetachain ethermint

* Remove cometbft replace

* go mod tidy

* bump ethermint

* Revert replace

* Bump ethermint

* Proto files updates after merge

* Make generate

* Bump ethermint

* Fix PR comments

* Formatting

* Mention observer params removal in breaking changes in changelog

* bump ethermint

* Remove tendermint dep after go-tss upgrade

* go mod tidy

* bump go-tss

* changelog

* changelog

---------

Co-authored-by: Alex Gartner <[email protected]>
Co-authored-by: Lucas Bertrand <[email protected]>
  • Loading branch information
3 people authored May 3, 2024
1 parent c7f1650 commit 6adfe6f
Show file tree
Hide file tree
Showing 702 changed files with 15,873 additions and 16,052 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/generate-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Generate Go code, docs and specs
env:
TEST_ENV: ${{ github.workspace }}
run: make generate

- name: Check for changes
Expand Down
27 changes: 15 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ BUILDTIME := $(shell date -u +"%Y%m%d.%H%M%S" )
DOCKER ?= docker
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
GOFLAGS:=""
REPOSITORY_ROOT := $(dir $(abspath $(MAKEFILE_LIST)))

ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=zetacore \
-X github.com/cosmos/cosmos-sdk/version.ServerName=zetacored \
Expand Down Expand Up @@ -144,23 +145,25 @@ gosec:
### Generation commands ###
###############################################################################

proto:
@echo "--> Removing old Go types "
@find . -name '*.pb.go' -type f -delete
@echo "--> Generating new Go types from protocol buffer files"
@bash ./scripts/protoc-gen-go.sh
@buf format -w
.PHONY: proto
protoVer=0.13.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace --user $(shell id -u):$(shell id -g) $(protoImageName)

typescript:
proto-format:
@echo "--> Formatting Protobuf files"
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;
.PHONY: proto-format

typescript: proto-format
@echo "--> Generating TypeScript bindings"
@bash ./scripts/protoc-gen-typescript.sh
.PHONY: typescript

proto-format:
@bash ./scripts/proto-format.sh
proto-gen: proto-format
@echo "--> Generating Protobuf files"
@$(protoImage) sh ./scripts/protoc-gen-go.sh

openapi:
openapi: proto-format
@echo "--> Generating OpenAPI specs"
@bash ./scripts/protoc-gen-openapi.sh
.PHONY: openapi
Expand All @@ -180,7 +183,7 @@ mocks:
@bash ./scripts/mocks-generate.sh
.PHONY: mocks

generate: proto openapi specs typescript docs-zetacored
generate: proto-gen openapi specs typescript docs-zetacored
.PHONY: generate

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"runtime/debug"

errorsmod "cosmossdk.io/errors"
tmlog "github.com/cometbft/cometbft/libs/log"
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/cosmos-sdk/x/authz"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
tmlog "github.com/tendermint/tendermint/libs/log"
crosschaintypes "github.com/zeta-chain/zetacore/x/crosschain/types"
observertypes "github.com/zeta-chain/zetacore/x/observer/types"
)
Expand Down
4 changes: 2 additions & 2 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
ibcante "github.com/cosmos/ibc-go/v6/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ethante "github.com/evmos/ethermint/app/ante"
ethermint "github.com/evmos/ethermint/types"
evmtypes "github.com/evmos/ethermint/x/evm/types"
Expand Down
6 changes: 3 additions & 3 deletions app/ante/vesting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/cosmos/cosmos-sdk/simapp/helpers"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
sdk "github.com/cosmos/cosmos-sdk/types"
vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
Expand Down Expand Up @@ -73,14 +73,14 @@ func TestVesting_AnteHandle(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tx, err := helpers.GenSignedMockTx(
tx, err := simtestutil.GenSignedMockTx(
rand.New(rand.NewSource(time.Now().UnixNano())),
txConfig,
[]sdk.Msg{
tt.msg,
},
sdk.NewCoins(),
helpers.DefaultGenTxGas,
simtestutil.DefaultGenTxGas,
"testing-chain-id",
[]uint64{0},
[]uint64{0},
Expand Down
Loading

0 comments on commit 6adfe6f

Please sign in to comment.