Skip to content

Commit

Permalink
feat: bump cosmos-sdk to v0.47 (#442)
Browse files Browse the repository at this point in the history
* chore: replacing tendermint with cometbft (#433)

* replacing tendermint refs with comet bft

* replacing tm-db with cometbft-db

* chore: Bumping sdk, wasmd and ibc-go (#435)

* bumping sdk and wasmd and ibc versions

* bumping ibc-go refs

* chore: protobuf migration (#436)

* protobuf migration

* removing third_party/

* regenerating the proto files

* RecordIDs.Ids is a repeated non-nullable native type, nullable=false has no effect

* chore: fix broken upstream references (#450)

updating upstream references for x/wasm. ibc-go, cosmos-sdk

* chore: remove deprecated appmodule routes (#451)

* remove genmsg deprecated route

* remove rewards module deprecated route

* remove tracking module deprecated route

* chore: fixing all the modules and wasmbindings   (#452)

* fixing x/tracking module

* fixing x/rewards module

* fixing x/genmsg module

* fixing genmsg module.go

* fixing wasmbinding

* chore: updating app wiring (#453)

* fixing the upgrade handlers

* fixing ante.go

* fixing export.go

* updating sim_test

* fixing test_helpers

* fixing some app.go stuff

* custom "add-genesis-account" - removed as its not needed anymore

* fixing root.go

* fixing simulation test

* fixing app.go

* cleanup

* chore: fixing e2e tests (#454)

* fixing some e2e tests

* fix more e2e tests

* fixing ibc e2e stuff

* updating changes from merge

* fixing golang.org/x/exp ref. thx @fdymylja

Co-Authored-By: Frojdi Dymylja <[email protected]>

* pr comment fixes

---------

Co-authored-by: Frojdi Dymylja <[email protected]>

* chore: apply v46 changes (#455)

* adding posthandler and reflection services

* updating `sdkerrors.Wrap` with `errorsmod`

* every cosmos message protobuf definition must be extended with a cosmos.msg.v1.signer option to signal the signer fields

* better error for when post handler fails

* running go mod tidy

* registering query server after module init

---------

Signed-off-by: Spoorthi <[email protected]>

* chore: apply v47 changes (#458)

* adding crisis module store key

* adding crisis module

* adding consensus module

* adding group module

* adding nft module

* fixing the merge

* fixing gentx decoding

* adding consensusparamtypes.StoreKey storekey && fixing staking keeper

---------

Signed-off-by: Spoorthi <[email protected]>

* feat: bumping archway wasmd to v0.42.0 (#460)

* updating to wasmd fork 0.42.0

* adding capability cosmwasm_1_4

* updating v1.4 libwasmvm checksums

* chore: fixing linter errors and tests (#463)

* fixing lint issues

* fixing x/tracking tests

* fixing app_test.go

* replacing gov v1beta1 stuff with gov v1

* fixig app-upgrade-test

txRes.Data is deprecated in favour of txRes.MsgResponses

* removing depracated field usage

* fixing ibctm not setup

* making the flat fees e2e test simpler

* fixing interchaintest chain upgrade

* fixing TestTxFees thanks @fdymylja 🎉

* fixing more tests with initgenesis failure

* fixing testcase to be compatible with this change cosmos/cosmos-sdk#9651

* removing the ante.DeductFeeDecorator as we alreayd have a custom one

* fixing TestRewardsFlatFees

* undo the mintkeeper fix

* feat: adding upgrade handlers for sdk v47 (#464)

* adding missing consensus keeper

* adding upgrade handler stuff

* oops messed the merge. fixing that

---------

Signed-off-by: Spoorthi <[email protected]>

* feat: enabling rosetta  (#466)

adding rosetta

* fix: updating logic for how we deal with infiniteGasMeter (#467)

* handling behavior change in infinitegasmeter.Limit()

* reflect no mo

* feat: x/rewards param store migration (#468)

* adding new msg proto

* implementing UpdateParams msg

* adding tests

* adding module migrations forx/rewards

* adding x/rewards to upgrade handlers

* adding migratestore test

* fixing lint

* addressing pr review comments

* Update CHANGELOG.md

* feat: bumping archway wasmd to v0.43.0 (#470)

* bumping wasmd fork to to v0.43.0

* updating wasmvm checksum

* removing wasmd deprecated proposals as they arent in the codebase anymore

* Updating changelog

* test: fixing ibc conformance test (#469)

fixing ibc conformance test. the custom genesis values are needed just for upgrade test

---------

Signed-off-by: Spoorthi <[email protected]>
Co-authored-by: Frojdi Dymylja <[email protected]>
  • Loading branch information
spoo-bar and fdymylja authored Oct 13, 2023
1 parent 333702f commit 9c91298
Show file tree
Hide file tree
Showing 211 changed files with 3,883 additions and 10,815 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Contains all the PRs that improved the code without changing the behaviours.
- [#439](https://github.com/archway-network/archway/pull/439) - Adding containerized localnet
- [#445](https://github.com/archway-network/archway/pull/445) - Adding Archway logo and version number to upgrade logs
- [#459](https://github.com/archway-network/archway/pull/459) - Add missing ADR references to docs index
- [#442](https://github.com/archway-network/archway/pull/442) - Upgrade Cosmos-sdk from v0.45.16 to v0.47.5 and all the other things it depends on
- [#470](https://github.com/archway-network/archway/pull/470) - Bumping x/wasmd to v0.43.0

### Changed

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.deprecated
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM golang:1.19.5-alpine3.17 AS go-builder
# arch can be either x86_64 for amd64 or aarch64 for arm
ARG arch=x86_64
ARG libwasmvm_version=v1.3.0
ARG libwasmvm_aarch64_sha=b1610f9c8ad8bdebf5b8f819f71d238466f83521c74a2deb799078932e862722
ARG libwasmvm_amd64_sha=b4aad4480f9b4c46635b4943beedbb72c929eab1d1b9467fe3b43e6dbf617e32
ARG libwasmvm_version=v1.4.1
ARG libwasmvm_aarch64_sha=a8259ba852f1b68f2a5f8eb666a9c7f1680196562022f71bb361be1472a83cfd
ARG libwasmvm_amd64_sha=324c1073cb988478d644861783ed5a7de21cfd090976ccc6b1de0559098fbbad

# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ format:
###############################################################################
### Protobuf ###
###############################################################################
PROTO_BUILDER_IMAGE=tendermintdev/sdk-proto-gen@sha256:372dce7be2f465123e26459973ca798fc489ff2c75aeecd814c0ca8ced24faca
PROTO_BUILDER_IMAGE=ghcr.io/cosmos/proto-builder:0.14.0
PROTO_FORMATTER_IMAGE=tendermintdev/docker-build-proto@sha256:aabcfe2fc19c31c0f198d4cd26393f5e5ca9502d7ea3feafbfe972448fee7cae

proto-all: proto-format proto-lint proto-gen
Expand Down
25 changes: 13 additions & 12 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
package app

import (
errorsmod "cosmossdk.io/errors"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmTypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

rewardsAnte "github.com/archway-network/archway/x/rewards/ante"
rewardsKeeper "github.com/archway-network/archway/x/rewards/keeper"
Expand All @@ -26,7 +28,7 @@ type HandlerOptions struct {
WasmConfig *wasmTypes.WasmConfig
RewardsAnteBankKeeper rewardsAnte.BankKeeper

TXCounterStoreKey sdk.StoreKey
TXCounterStoreKey storetypes.StoreKey

TrackingKeeper trackingKeeper.Keeper
RewardsKeeper rewardsKeeper.Keeper
Expand All @@ -36,23 +38,23 @@ type HandlerOptions struct {

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
if options.AccountKeeper == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for AnteHandler")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "account keeper is required for AnteHandler")
}
if options.BankKeeper == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler")
}
if options.SignModeHandler == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder")
}
if options.WasmConfig == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "wasm config is required for ante builder")
}
if options.TXCounterStoreKey == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "tx counter key is required for ante builder")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "tx counter key is required for ante builder")
}

if options.IBCKeeper == nil {
return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "ibc keeper is required for ante builder")
return nil, errorsmod.Wrap(sdkerrors.ErrLogic, "ibc keeper is required for ante builder")
}

sigGasConsumer := options.SigGasConsumer
Expand All @@ -66,8 +68,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
// After setup context to enforce limits early
wasmkeeper.NewLimitSimulationGasDecorator(options.WasmConfig.SimulationGasLimit),
wasmkeeper.NewCountTXDecorator(options.TXCounterStoreKey),
ante.NewRejectExtensionOptionsDecorator(),
ante.NewMempoolFeeDecorator(),
ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker),
ante.NewValidateBasicDecorator(),
ante.NewTxTimeoutHeightDecorator(),
ante.NewValidateMemoDecorator(options.AccountKeeper),
Expand All @@ -84,7 +85,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewAnteDecorator(options.IBCKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
Loading

0 comments on commit 9c91298

Please sign in to comment.