From 00b9e0eb5089467a67ae2b07e3b9166c9f98536d Mon Sep 17 00:00:00 2001 From: yihuang Date: Wed, 20 Mar 2024 17:45:58 +0800 Subject: [PATCH] Problem: sdk 0.50 is not used (#407) fix dependencies fix build upgrade protogen image Co-authored-by: mmsqe --- .github/workflows/build.yml | 2 +- .github/workflows/dependencies.yml | 2 +- .github/workflows/goreleaser.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 14 +- Makefile | 2 +- app/ante/ante.go | 7 +- app/ante/ante_test.go | 66 ++- app/ante/authz_test.go | 29 +- app/ante/eip712.go | 16 +- app/ante/eth_test.go | 16 +- app/ante/fee_checker.go | 2 +- app/ante/fee_checker_test.go | 22 +- app/ante/fees.go | 10 +- app/ante/fees_test.go | 36 +- app/ante/handler_options.go | 11 +- app/ante/nativefee.go | 22 +- app/ante/setup.go | 21 +- app/ante/setup_test.go | 2 +- app/ante/utils_test.go | 97 +-- app/app.go | 325 +++++++---- app/app_test.go | 6 +- app/benchmark_test.go | 10 +- app/export.go | 95 ++- app/signer.go | 47 ++ app/simulation_test.go | 31 +- app/upgrades.go | 98 +--- app/utils.go | 75 ++- client/keys/add.go | 4 +- client/keys/utils.go | 7 +- client/testnet.go | 18 +- cmd/config/config.go | 6 +- cmd/ethermintd/genaccounts.go | 5 +- cmd/ethermintd/main.go | 11 +- cmd/ethermintd/root.go | 87 ++- docs/api/proto-docs.md | 2 +- encoding/codec/codec.go | 1 - encoding/config.go | 54 +- encoding/config_test.go | 3 +- ethereum/eip712/eip712_legacy.go | 2 +- ethereum/eip712/eip712_test.go | 70 +-- ethereum/eip712/encoding.go | 13 +- ethereum/eip712/encoding_legacy.go | 25 +- ethereum/eip712/message.go | 4 + go.mod | 236 ++++---- go.sum | 552 ++++++++++-------- gomod2nix.toml | 510 +++++++++------- indexer/kv_indexer.go | 6 +- indexer/kv_indexer_test.go | 21 +- proto/ethermint/evm/v1/chain_config.proto | 38 +- proto/ethermint/evm/v1/chain_config_v0.proto | 36 +- proto/ethermint/evm/v1/query.proto | 2 +- proto/ethermint/evm/v1/tx.proto | 19 +- proto/ethermint/feemarket/v1/feemarket.proto | 6 +- proto/ethermint/feemarket/v1/query.proto | 2 +- proto/ethermint/feemarket/v1/tx.proto | 1 + proto/ethermint/types/v1/account.proto | 4 +- proto/ethermint/types/v1/dynamic_fee.proto | 2 +- rpc/backend/account_info.go | 3 +- rpc/backend/account_info_test.go | 3 +- rpc/backend/backend.go | 5 +- rpc/backend/backend_suite_test.go | 9 +- rpc/backend/blocks.go | 2 +- rpc/backend/blocks_test.go | 189 +++--- rpc/backend/call_tx_test.go | 8 +- rpc/backend/chain_info.go | 17 +- rpc/backend/chain_info_test.go | 19 +- rpc/backend/client_test.go | 6 +- rpc/backend/evm_query_client_test.go | 5 +- rpc/backend/node_info.go | 13 +- rpc/backend/node_info_test.go | 8 +- rpc/backend/sign_tx.go | 5 +- rpc/backend/sign_tx_test.go | 9 +- rpc/backend/tracing_test.go | 14 +- rpc/backend/tx_info_test.go | 22 +- rpc/backend/utils.go | 6 +- rpc/namespaces/ethereum/debug/api.go | 2 +- rpc/namespaces/ethereum/debug/utils.go | 2 +- rpc/namespaces/ethereum/eth/api.go | 2 +- rpc/namespaces/ethereum/eth/filters/api.go | 2 +- .../ethereum/eth/filters/filters.go | 2 +- rpc/namespaces/ethereum/miner/api.go | 2 +- rpc/namespaces/ethereum/personal/api.go | 2 +- rpc/namespaces/ethereum/txpool/api.go | 2 +- rpc/stream/rpc.go | 28 +- rpc/types/events.go | 2 +- rpc/types/events_test.go | 14 +- rpc/types/utils.go | 4 +- rpc/websockets.go | 2 +- scripts/integration-test-all.sh | 2 +- server/config/config.go | 55 +- server/flags/flags.go | 12 +- server/indexer_cmd.go | 14 +- server/json_rpc.go | 53 +- server/start.go | 468 ++++++++------- server/util.go | 19 +- store/cachekv/README.md | 20 +- store/cachekv/benchmark_test.go | 4 +- store/cachekv/internal/btree.go | 2 +- store/cachekv/internal/btree_test.go | 2 +- store/cachekv/internal/memiterator.go | 2 +- store/cachekv/internal/mergeiterator.go | 2 +- store/cachekv/store.go | 4 +- store/cachekv/store_bench_test.go | 4 +- store/cachekv/store_test.go | 6 +- store/cachemulti/store.go | 4 +- store/cachemulti/store_test.go | 2 +- tests/importer/importer_test.go | 28 +- .../configs/broken-ethermintd.patch | 8 +- .../configs/cosmovisor.jsonnet | 21 +- .../integration_tests/configs/default.jsonnet | 22 +- .../integration_tests/configs/indexer.jsonnet | 8 +- .../configs/upgrade-test-package.nix | 18 +- tests/integration_tests/conftest.py | 4 +- tests/integration_tests/cosmoscli.py | 33 +- tests/integration_tests/network.py | 6 +- tests/integration_tests/test_account.py | 10 +- tests/integration_tests/test_call.py | 4 +- tests/integration_tests/test_estimate_gas.py | 5 +- tests/integration_tests/test_fee_history.py | 11 +- tests/integration_tests/test_indexer.py | 4 +- tests/integration_tests/test_priority.py | 7 +- tests/integration_tests/test_storage_proof.py | 4 +- tests/integration_tests/test_tracers.py | 114 ++-- tests/integration_tests/test_types.py | 10 +- tests/integration_tests/test_upgrade.py | 40 +- tests/integration_tests/test_websockets.py | 14 +- tests/integration_tests/utils.py | 29 +- tests/signer.go | 7 +- testutil/abci.go | 28 +- testutil/base_test_suite.go | 76 ++- testutil/network/network.go | 147 +++-- testutil/network/util.go | 83 +-- testutil/tx/cosmos.go | 12 +- testutil/tx/eip712.go | 4 +- testutil/tx/signer.go | 7 +- types/account.go | 7 +- types/account.pb.go | 19 +- types/block.go | 2 +- types/codec.go | 3 +- types/dynamic_fee.pb.go | 26 +- types/gasmeter.go | 20 +- types/indexer.go | 2 +- x/evm/genesis.go | 3 +- x/evm/genesis_test.go | 3 +- x/evm/handler.go | 43 -- x/evm/handler_test.go | 49 +- x/evm/keeper/abci.go | 11 +- x/evm/keeper/abci_test.go | 4 +- x/evm/keeper/benchmark_test.go | 13 +- x/evm/keeper/grpc_query.go | 15 +- x/evm/keeper/grpc_query_test.go | 107 ++-- x/evm/keeper/hooks_test.go | 2 +- x/evm/keeper/integration_test.go | 15 +- x/evm/keeper/keeper.go | 22 +- x/evm/keeper/keeper_test.go | 11 +- x/evm/keeper/msg_server.go | 11 +- x/evm/keeper/params.go | 41 +- x/evm/keeper/state_transition.go | 22 +- .../keeper/state_transition_benchmark_test.go | 3 +- x/evm/keeper/state_transition_test.go | 35 +- x/evm/keeper/statedb.go | 10 +- x/evm/keeper/statedb_test.go | 10 +- x/evm/keeper/utils.go | 22 +- x/evm/keeper/utils_test.go | 8 +- .../migrations/v0/types/chain_config_v0.pb.go | 172 +++--- x/evm/migrations/v4/migrate.go | 2 +- x/evm/migrations/v4/types/params_v4.pb.go | 2 +- x/evm/migrations/v5/migrate.go | 2 +- x/evm/migrations/v6/migrate.go | 5 +- x/evm/module.go | 30 +- x/evm/simulation/genesis.go | 2 +- x/evm/simulation/operations.go | 11 +- x/evm/statedb/interfaces.go | 2 +- x/evm/statedb/native.go | 2 +- x/evm/statedb/statedb.go | 10 +- x/evm/statedb/statedb_test.go | 53 +- x/evm/types/chain_config.go | 33 +- x/evm/types/chain_config.pb.go | 178 +++--- x/evm/types/codec.go | 2 +- x/evm/types/dynamic_fee_tx_test.go | 3 +- x/evm/types/interfaces.go | 29 +- x/evm/types/msg.go | 24 +- x/evm/types/msg_test.go | 6 +- x/evm/types/query.pb.go | 203 +++---- x/evm/types/tx.pb.go | 170 +++--- x/evm/types/utils_test.go | 3 +- x/feemarket/handler.go | 26 - x/feemarket/keeper/abci.go | 27 +- x/feemarket/keeper/abci_test.go | 8 +- x/feemarket/keeper/eip1559.go | 2 +- x/feemarket/keeper/eip1559_test.go | 44 +- x/feemarket/keeper/grpc_query_test.go | 3 +- x/feemarket/keeper/integration_test.go | 52 +- x/feemarket/keeper/keeper.go | 21 +- x/feemarket/keeper/keeper_test.go | 14 +- x/feemarket/keeper/params.go | 34 +- x/feemarket/keeper/params_test.go | 2 +- x/feemarket/migrations/v4/migrate.go | 2 +- x/feemarket/migrations/v4/migrate_test.go | 8 +- .../migrations/v4/types/feemarket.pb.go | 13 +- x/feemarket/migrations/v4/types/params.go | 15 +- x/feemarket/module.go | 31 +- x/feemarket/simulation/genesis.go | 5 +- x/feemarket/types/codec.go | 2 +- x/feemarket/types/feemarket.pb.go | 61 +- x/feemarket/types/params.go | 15 +- x/feemarket/types/params_test.go | 24 +- x/feemarket/types/query.pb.go | 64 +- x/feemarket/types/tx.pb.go | 15 +- 210 files changed, 3577 insertions(+), 3057 deletions(-) create mode 100644 app/signer.go delete mode 100644 x/evm/handler.go delete mode 100644 x/feemarket/handler.go diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2daab8e1d..7eb7d56a33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: technote-space/get-diff-action@v6.1.2 id: git_diff diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 999fd6f131..aa8ea5fdf7 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - name: "Checkout Repository" uses: actions/checkout@v3 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 8a36565aec..6dbc318535 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - name: release dry run run: make release-dry-run diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0cb03d29a1..a3200cdc90 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ jobs: # Required: setup-go, for all versions v3.0.0+ of golangci-lint - uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0327cf51c1..0a2103535b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.2 @@ -47,7 +47,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.2 @@ -68,7 +68,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.2 @@ -146,7 +146,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.1 @@ -166,7 +166,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.1 @@ -186,7 +186,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.1 @@ -206,7 +206,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 check-latest: true - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.1 diff --git a/Makefile b/Makefile index d4e2a88b60..244b2a94e9 100644 --- a/Makefile +++ b/Makefile @@ -444,7 +444,7 @@ format-fix: ############################################################################### -protoVer=0.11.6 +protoVer=0.14.0 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) diff --git a/app/ante/ante.go b/app/ante/ante.go index 45737da8e2..655cb3c331 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -19,9 +19,10 @@ import ( "fmt" "runtime/debug" - tmlog "github.com/cometbft/cometbft/libs/log" + tmlog "cosmossdk.io/log" errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/crypto/types/multisig" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" @@ -130,7 +131,7 @@ var _ authante.SignatureVerificationGasConsumer = DefaultSigVerificationGasConsu // for signature verification based upon the public key type. The cost is fetched from the given params and is matched // by the concrete type. func DefaultSigVerificationGasConsumer( - meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params, + meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params, ) error { pubkey := sig.PubKey switch pubkey := pubkey.(type) { @@ -153,7 +154,7 @@ func DefaultSigVerificationGasConsumer( // ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature func ConsumeMultisignatureVerificationGas( - meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, + meter storetypes.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, params authtypes.Params, accSeq uint64, ) error { size := sig.BitArray.Count() diff --git a/app/ante/ante_test.go b/app/ante/ante_test.go index fa1e20b08e..7b4b659265 100644 --- a/app/ante/ante_test.go +++ b/app/ante/ante_test.go @@ -9,6 +9,7 @@ import ( "time" sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig" "github.com/stretchr/testify/suite" @@ -26,6 +27,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" ethparams "github.com/ethereum/go-ethereum/params" + "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/app/ante" "github.com/evmos/ethermint/crypto/ethsecp256k1" "github.com/evmos/ethermint/tests" @@ -57,7 +59,7 @@ func TestAnteTestSuite(t *testing.T) { } func (suite *AnteTestSuite) TestAnteHandler() { - var acc authtypes.AccountI + var acc sdk.AccountI addr, privKey := tests.NewAddrKey() to := tests.GenerateAddress() @@ -364,7 +366,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 create validator", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712MsgCreateValidator(from, privKey, "ethermint_9000-1", gas, amount) @@ -375,7 +377,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 create validator (with blank fields)", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712MsgCreateValidator2(from, privKey, "ethermint_9000-1", gas, amount) @@ -386,7 +388,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 MsgSubmitProposal", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) gasAmount := sdk.NewCoins(coinAmount) gas := uint64(200000) // reusing the gasAmount for deposit @@ -400,7 +402,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { func() sdk.Tx { from := acc.GetAddress() grantee := sdk.AccAddress("_______grantee______") - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) gasAmount := sdk.NewCoins(coinAmount) gas := uint64(200000) blockTime := time.Date(1, 1, 1, 1, 1, 1, 1, time.UTC) @@ -417,7 +419,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 MsgGrantAllowance", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) gasAmount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712GrantAllowance(from, privKey, "ethermint_9000-1", gas, gasAmount) @@ -428,7 +430,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 edit validator", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712MsgEditValidator(from, privKey, "ethermint_9000-1", gas, amount) @@ -439,7 +441,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 submit evidence", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712MsgSubmitEvidence(from, privKey, "ethermint_9000-1", gas, amount) @@ -450,7 +452,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 submit proposal v1", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712SubmitProposalV1(from, privKey, "ethermint_9000-1", gas, amount) @@ -461,7 +463,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 MsgExec", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712MsgExec(from, privKey, "ethermint_9000-1", gas, amount) @@ -472,7 +474,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 MsgVoteV1", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712MsgVoteV1(from, privKey, "ethermint_9000-1", gas, amount) @@ -483,7 +485,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "success- DeliverTx EIP712 Multiple MsgSend", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712MultipleMsgSend(from, privKey, "ethermint_9000-1", gas, amount) @@ -494,7 +496,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "fails - DeliverTx EIP712 Multiple Signers", func() sdk.Tx { from := acc.GetAddress() - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) amount := sdk.NewCoins(coinAmount) gas := uint64(200000) txBuilder := suite.CreateTestEIP712MultipleSignerMsgs(from, privKey, "ethermint_9000-1", gas, amount) @@ -607,7 +609,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -637,7 +639,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -667,7 +669,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -722,7 +724,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -752,7 +754,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -782,7 +784,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -812,7 +814,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -826,7 +828,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { "EIP-712", ) - msg.Amount[0].Amount = sdk.NewInt(5) + msg.Amount[0].Amount = sdkmath.NewInt(5) txBuilder.SetMsgs(msg) return txBuilder.GetTx() @@ -845,7 +847,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -874,7 +876,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { sdk.NewCoins( sdk.NewCoin( "photon", - sdk.NewInt(1), + sdkmath.NewInt(1), ), ), ) @@ -935,7 +937,7 @@ func (suite *AnteTestSuite) TestAnteHandler() { suite.Run(tc.name, func() { setup() - suite.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx) + suite.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx).WithConsensusParams(*app.DefaultConsensusParams) // expConsumed := params.TxGasContractCreation + params.TxGas _, err := suite.anteHandler(suite.ctx, tc.txFn(), false) @@ -1205,7 +1207,7 @@ func (suite *AnteTestSuite) TestAnteHandlerWithDynamicTxFee() { suite.Require().NoError(acc.SetSequence(1)) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) - suite.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx) + suite.ctx = suite.ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx).WithConsensusParams(*app.DefaultConsensusParams) suite.app.EvmKeeper.SetBalance(suite.ctx, addr, big.NewInt((ethparams.InitialBaseFee+10)*100000), evmtypes.DefaultEVMDenom) _, err := suite.anteHandler(suite.ctx, tc.txFn(), false) if tc.expPass { @@ -1334,7 +1336,7 @@ func (suite *AnteTestSuite) TestAnteHandlerWithParams() { suite.Require().NoError(acc.SetSequence(1)) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) - suite.ctx = suite.ctx.WithIsCheckTx(true) + suite.ctx = suite.ctx.WithIsCheckTx(true).WithConsensusParams(*app.DefaultConsensusParams) suite.app.EvmKeeper.SetBalance(suite.ctx, addr, big.NewInt((ethparams.InitialBaseFee+10)*100000), evmtypes.DefaultEVMDenom) _, err := suite.anteHandler(suite.ctx, tc.txFn(), false) if tc.expErr == nil { @@ -1371,7 +1373,7 @@ func (suite *AnteTestSuite) TestConsumeSignatureVerificationGas() { } type args struct { - meter sdk.GasMeter + meter storetypes.GasMeter sig signing.SignatureData pubkey cryptotypes.PubKey params authtypes.Params @@ -1382,11 +1384,11 @@ func (suite *AnteTestSuite) TestConsumeSignatureVerificationGas() { gasConsumed uint64 shouldErr bool }{ - {"PubKeyEd25519", args{sdk.NewInfiniteGasMeter(), nil, ed25519.GenPrivKey().PubKey(), params}, p.SigVerifyCostED25519, true}, - {"PubKeyEthSecp256k1", args{sdk.NewInfiniteGasMeter(), nil, pkSet1[0], params}, 21_000, false}, - {"PubKeySecp256r1", args{sdk.NewInfiniteGasMeter(), nil, skR1.PubKey(), params}, p.SigVerifyCostSecp256r1(), false}, - {"Multisig", args{sdk.NewInfiniteGasMeter(), multisignature1, multisigKey1, params}, expectedCost1, false}, - {"unknown key", args{sdk.NewInfiniteGasMeter(), nil, nil, params}, 0, true}, + {"PubKeyEd25519", args{storetypes.NewInfiniteGasMeter(), nil, ed25519.GenPrivKey().PubKey(), params}, p.SigVerifyCostED25519, true}, + {"PubKeyEthSecp256k1", args{storetypes.NewInfiniteGasMeter(), nil, pkSet1[0], params}, 21_000, false}, + {"PubKeySecp256r1", args{storetypes.NewInfiniteGasMeter(), nil, skR1.PubKey(), params}, p.SigVerifyCostSecp256r1(), false}, + {"Multisig", args{storetypes.NewInfiniteGasMeter(), multisignature1, multisigKey1, params}, expectedCost1, false}, + {"unknown key", args{storetypes.NewInfiniteGasMeter(), nil, nil, params}, 0, true}, } for _, tt := range tests { sigV2 := signing.SignatureV2{ diff --git a/app/ante/authz_test.go b/app/ante/authz_test.go index 1696299415..d6e52a022d 100644 --- a/app/ante/authz_test.go +++ b/app/ante/authz_test.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -276,7 +277,7 @@ func (suite *AnteTestSuite) TestRejectDeliverMsgsInAuthz() { }, ), }, - expectedCode: sdkerrors.ErrUnpackAny.ABCICode(), + expectedCode: sdkerrors.ErrUnauthorized.ABCICode(), }, { name: "a MsgExec with nested MsgExec messages that has invalid messages is blocked", @@ -289,7 +290,7 @@ func (suite *AnteTestSuite) TestRejectDeliverMsgsInAuthz() { }, ), }, - expectedCode: sdkerrors.ErrUnpackAny.ABCICode(), + expectedCode: sdkerrors.ErrUnauthorized.ABCICode(), }, { name: "a MsgExec with more nested MsgExec messages than allowed and with valid messages is blocked", @@ -327,20 +328,30 @@ func (suite *AnteTestSuite) TestRejectDeliverMsgsInAuthz() { bz, err := txEncoder(tx) suite.Require().NoError(err) - resCheckTx := suite.app.CheckTx( - abci.RequestCheckTx{ + resCheckTx, err := suite.app.CheckTx( + &abci.RequestCheckTx{ Tx: bz, Type: abci.CheckTxType_New, }, ) + suite.Require().NoError(err) suite.Require().Equal(resCheckTx.Code, tc.expectedCode, resCheckTx.Log) - resDeliverTx := suite.app.DeliverTx( - abci.RequestDeliverTx{ - Tx: bz, + header := suite.ctx.BlockHeader() + blockRes, err := suite.app.FinalizeBlock( + &abci.RequestFinalizeBlock{ + Height: header.Height, + Txs: [][]byte{bz}, + Hash: header.AppHash, + NextValidatorsHash: header.NextValidatorsHash, + ProposerAddress: header.ProposerAddress, + Time: header.Time.Add(time.Second), }, ) - suite.Require().Equal(resDeliverTx.Code, tc.expectedCode, resDeliverTx.Log) + suite.Require().NoError(err) + suite.Require().Len(blockRes.TxResults, 1) + txRes := blockRes.TxResults[0] + suite.Require().Equal(txRes.Code, tc.expectedCode, txRes.Log) }) } } @@ -425,7 +436,7 @@ func (suite *AnteTestSuite) createTx(priv cryptotypes.PrivKey, msgs ...sdk.Msg) } func (suite *AnteTestSuite) createEIP712Tx(priv cryptotypes.PrivKey, msgs ...sdk.Msg) (sdk.Tx, error) { - coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)) + coinAmount := sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)) fees := sdk.NewCoins(coinAmount) cosmosTxArgs := utiltx.CosmosTxArgs{ TxCfg: suite.clientCtx.TxConfig, diff --git a/app/ante/eip712.go b/app/ante/eip712.go index a725289453..32ac5b1bcd 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -19,6 +19,7 @@ import ( "fmt" errorsmod "cosmossdk.io/errors" + txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -28,7 +29,7 @@ import ( authante "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" ethcrypto "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/secp256k1" @@ -94,13 +95,13 @@ func NewLegacyCosmosAnteHandlerEip712(ctx sdk.Context, options HandlerOptions, e // CONTRACT: Tx must implement SigVerifiableTx interface type LegacyEip712SigVerificationDecorator struct { ak evmtypes.AccountKeeper - signModeHandler authsigning.SignModeHandler + signModeHandler *txsigning.HandlerMap } // Deprecated: NewLegacyEip712SigVerificationDecorator creates a new LegacyEip712SigVerificationDecorator func NewLegacyEip712SigVerificationDecorator( ak evmtypes.AccountKeeper, - signModeHandler authsigning.SignModeHandler, + signModeHandler *txsigning.HandlerMap, ) LegacyEip712SigVerificationDecorator { return LegacyEip712SigVerificationDecorator{ ak: ak, @@ -137,7 +138,10 @@ func (svd LegacyEip712SigVerificationDecorator) AnteHandle(ctx sdk.Context, return ctx, err } - signerAddrs := sigTx.GetSigners() + signerAddrs, err := sigTx.GetSigners() + if err != nil { + return ctx, err + } // EIP712 allows just one signature if len(sigs) != 1 { @@ -209,7 +213,7 @@ func VerifySignature( pubKey cryptotypes.PubKey, signerData authsigning.SignerData, sigData signing.SignatureData, - _ authsigning.SignModeHandler, + _ *txsigning.HandlerMap, tx authsigning.Tx, ) error { switch data := sigData.(type) { @@ -240,7 +244,7 @@ func VerifySignature( Amount: tx.GetFee(), Gas: tx.GetGas(), }, - msgs, tx.GetMemo(), tx.GetTip(), + msgs, tx.GetMemo(), ) signerChainID, err := ethermint.ParseChainID(signerData.ChainID) diff --git a/app/ante/eth_test.go b/app/ante/eth_test.go index 216750a235..00534e868b 100644 --- a/app/ante/eth_test.go +++ b/app/ante/eth_test.go @@ -6,14 +6,14 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "cosmossdk.io/store/types" + ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/evmos/ethermint/app/ante" "github.com/evmos/ethermint/server/config" "github.com/evmos/ethermint/tests" ethermint "github.com/evmos/ethermint/types" "github.com/evmos/ethermint/x/evm/statedb" evmtypes "github.com/evmos/ethermint/x/evm/types" - - ethtypes "github.com/ethereum/go-ethereum/core/types" ) func (suite *AnteTestSuite) TestNewEthAccountVerificationDecorator() { @@ -168,7 +168,7 @@ func (suite *AnteTestSuite) TestEthGasConsumeDecorator() { tx := evmtypes.NewTxContract(suite.app.EvmKeeper.ChainID(), 1, big.NewInt(10), txGasLimit, big.NewInt(1), nil, nil, nil, nil) tx.From = addr.Bytes() - suite.Require().Equal(int64(1000000000), baseFee.Int64()) + suite.Require().Equal(int64(765625000), baseFee.Int64()) gasPrice := new(big.Int).Add(baseFee, evmtypes.DefaultPriorityReduction.BigInt()) @@ -248,7 +248,7 @@ func (suite *AnteTestSuite) TestEthGasConsumeDecorator() { 0, func() { vmdb.AddBalance(addr, big.NewInt(1000000)) - suite.ctx = suite.ctx.WithBlockGasMeter(sdk.NewGasMeter(1)) + suite.ctx = suite.ctx.WithBlockGasMeter(storetypes.NewGasMeter(1)) }, false, true, 0, @@ -259,7 +259,7 @@ func (suite *AnteTestSuite) TestEthGasConsumeDecorator() { tx2GasLimit, // it's capped func() { vmdb.AddBalance(addr, big.NewInt(1001000000000000)) - suite.ctx = suite.ctx.WithBlockGasMeter(sdk.NewGasMeter(10000000000000000000)) + suite.ctx = suite.ctx.WithBlockGasMeter(storetypes.NewGasMeter(10000000000000000000)) }, true, false, tx2Priority, @@ -270,7 +270,7 @@ func (suite *AnteTestSuite) TestEthGasConsumeDecorator() { tx2GasLimit, // it's capped func() { vmdb.AddBalance(addr, big.NewInt(1001000000000000)) - suite.ctx = suite.ctx.WithBlockGasMeter(sdk.NewGasMeter(10000000000000000000)) + suite.ctx = suite.ctx.WithBlockGasMeter(storetypes.NewGasMeter(10000000000000000000)) }, true, false, dynamicFeeTxPriority, @@ -297,7 +297,7 @@ func (suite *AnteTestSuite) TestEthGasConsumeDecorator() { if tc.expPanic { suite.Require().Panics(func() { _, _ = ante.CheckEthGasConsume( - suite.ctx.WithIsCheckTx(true).WithGasMeter(sdk.NewGasMeter(1)), tc.tx, + suite.ctx.WithIsCheckTx(true).WithGasMeter(storetypes.NewGasMeter(1)), tc.tx, ethCfg, suite.app.EvmKeeper, baseFee, config.DefaultMaxTxGasWanted, evmtypes.DefaultEVMDenom, ) }) @@ -305,7 +305,7 @@ func (suite *AnteTestSuite) TestEthGasConsumeDecorator() { } ctx, err := ante.CheckEthGasConsume( - suite.ctx.WithIsCheckTx(true).WithGasMeter(sdk.NewInfiniteGasMeter()), tc.tx, + suite.ctx.WithIsCheckTx(true).WithGasMeter(storetypes.NewInfiniteGasMeter()), tc.tx, ethCfg, suite.app.EvmKeeper, baseFee, config.DefaultMaxTxGasWanted, evmtypes.DefaultEVMDenom, ) if tc.expPass { diff --git a/app/ante/fee_checker.go b/app/ante/fee_checker.go index c3f169df2d..3a97ecb0b2 100644 --- a/app/ante/fee_checker.go +++ b/app/ante/fee_checker.go @@ -129,7 +129,7 @@ func checkTxFeeWithValidatorMinGasPrices(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, // Determine the required fees by multiplying each required minimum gas // price by the gas limit, where fee = ceil(minGasPrice * gasLimit). - glDec := sdk.NewDec(int64(gas)) + glDec := sdkmath.LegacyNewDec(int64(gas)) for i, gp := range minGasPrices { fee := gp.Amount.Mul(glDec) diff --git a/app/ante/fee_checker_test.go b/app/ante/fee_checker_test.go index 1b9d3ce851..ec956c15e8 100644 --- a/app/ante/fee_checker_test.go +++ b/app/ante/fee_checker_test.go @@ -4,13 +4,13 @@ import ( "math/big" "testing" + sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" "github.com/ethereum/go-ethereum/params" "github.com/evmos/ethermint/encoding" @@ -54,8 +54,8 @@ func TestSDKTxFeeChecker(t *testing.T) { // with extension option // without extension option // london hardfork enableness - encodingConfig := encoding.MakeConfig(module.NewBasicManager()) - minGasPrices := sdk.NewDecCoins(sdk.NewDecCoin("aphoton", sdk.NewInt(10))) + encodingConfig := encoding.MakeConfig() + minGasPrices := sdk.NewDecCoins(sdk.NewDecCoin("aphoton", sdkmath.NewInt(10))) genesisCtx := sdk.NewContext(nil, tmproto.Header{}, false, log.NewNopLogger()) checkTxCtx := sdk.NewContext(nil, tmproto.Header{Height: 1}, true, log.NewNopLogger()).WithMinGasPrices(minGasPrices) @@ -99,7 +99,7 @@ func TestSDKTxFeeChecker(t *testing.T) { func() sdk.Tx { txBuilder := encodingConfig.TxConfig.NewTxBuilder() txBuilder.SetGasLimit(1) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdk.NewInt(10)))) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdkmath.NewInt(10)))) return txBuilder.GetTx() }, "10aphoton", @@ -141,7 +141,7 @@ func TestSDKTxFeeChecker(t *testing.T) { func() sdk.Tx { txBuilder := encodingConfig.TxConfig.NewTxBuilder() txBuilder.SetGasLimit(1) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdk.NewInt(10)))) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdkmath.NewInt(10)))) return txBuilder.GetTx() }, "10aphoton", @@ -157,7 +157,7 @@ func TestSDKTxFeeChecker(t *testing.T) { func() sdk.Tx { txBuilder := encodingConfig.TxConfig.NewTxBuilder() txBuilder.SetGasLimit(1) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdk.NewInt(10).Mul(types.DefaultPriorityReduction).Add(sdk.NewInt(10))))) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdkmath.NewInt(10).Mul(types.DefaultPriorityReduction).Add(sdkmath.NewInt(10))))) return txBuilder.GetTx() }, "10000010aphoton", @@ -173,7 +173,7 @@ func TestSDKTxFeeChecker(t *testing.T) { func() sdk.Tx { txBuilder := encodingConfig.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder) txBuilder.SetGasLimit(1) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdk.NewInt(10).Mul(types.DefaultPriorityReduction)))) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdkmath.NewInt(10).Mul(types.DefaultPriorityReduction)))) option, err := codectypes.NewAnyWithValue(ðermint.ExtensionOptionDynamicFeeTx{}) require.NoError(t, err) @@ -193,10 +193,10 @@ func TestSDKTxFeeChecker(t *testing.T) { func() sdk.Tx { txBuilder := encodingConfig.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder) txBuilder.SetGasLimit(1) - txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdk.NewInt(10).Mul(types.DefaultPriorityReduction).Add(sdk.NewInt(10))))) + txBuilder.SetFeeAmount(sdk.NewCoins(sdk.NewCoin("aphoton", sdkmath.NewInt(10).Mul(types.DefaultPriorityReduction).Add(sdkmath.NewInt(10))))) option, err := codectypes.NewAnyWithValue(ðermint.ExtensionOptionDynamicFeeTx{ - MaxPriorityPrice: sdk.NewInt(5).Mul(types.DefaultPriorityReduction), + MaxPriorityPrice: sdkmath.NewInt(5).Mul(types.DefaultPriorityReduction), }) require.NoError(t, err) txBuilder.SetExtensionOptions(option) @@ -213,7 +213,7 @@ func TestSDKTxFeeChecker(t *testing.T) { evmParams := tc.keeper.GetParams(tc.ctx) feemarketParams := feemarkettypes.Params{ NoBaseFee: false, - BaseFee: sdk.NewIntFromBigInt(tc.keeper.BaseFee), + BaseFee: sdkmath.NewIntFromBigInt(tc.keeper.BaseFee), } chainID := tc.keeper.ChainID() chainCfg := evmParams.GetChainConfig() diff --git a/app/ante/fees.go b/app/ante/fees.go index 7dca6ae2dc..3c249b0a49 100644 --- a/app/ante/fees.go +++ b/app/ante/fees.go @@ -71,7 +71,7 @@ func (mpd MinGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate // Determine the required fees by multiplying each required minimum gas // price by the gas limit, where fee = ceil(minGasPrice * gasLimit). - gasLimit := sdk.NewDecFromBigInt(new(big.Int).SetUint64(gas)) + gasLimit := sdkmath.LegacyNewDecFromBigInt(new(big.Int).SetUint64(gas)) for _, gp := range minGasPrices { fee := gp.Amount.Mul(gasLimit).Ceil().RoundInt() @@ -134,10 +134,10 @@ func CheckEthMinGasPrice(tx sdk.Tx, minGasPrice sdkmath.LegacyDec, baseFee *big. feeAmt = ethMsg.GetEffectiveFee(baseFee) } - gasLimit := sdk.NewDecFromBigInt(new(big.Int).SetUint64(ethMsg.GetGas())) + gasLimit := sdkmath.LegacyNewDecFromBigInt(new(big.Int).SetUint64(ethMsg.GetGas())) requiredFee := minGasPrice.Mul(gasLimit) - fee := sdk.NewDecFromBigInt(feeAmt) + fee := sdkmath.LegacyNewDecFromBigInt(feeAmt) if fee.LT(requiredFee) { return errorsmod.Wrapf( @@ -181,8 +181,8 @@ func CheckEthMempoolFee( return errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*evmtypes.MsgEthereumTx)(nil)) } - fee := sdk.NewDecFromBigInt(ethMsg.GetFee()) - gasLimit := sdk.NewDecFromBigInt(new(big.Int).SetUint64(ethMsg.GetGas())) + fee := sdkmath.LegacyNewDecFromBigInt(ethMsg.GetFee()) + gasLimit := sdkmath.LegacyNewDecFromBigInt(new(big.Int).SetUint64(ethMsg.GetGas())) requiredFee := minGasPrice.Mul(gasLimit) if fee.LT(requiredFee) { diff --git a/app/ante/fees_test.go b/app/ante/fees_test.go index 89162dac20..a0124cb036 100644 --- a/app/ante/fees_test.go +++ b/app/ante/fees_test.go @@ -49,7 +49,7 @@ func (s *AnteTestSuite) TestMinGasPriceDecorator() { "valid cosmos tx with MinGasPrices = 0, gasPrice = 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.ZeroDec() + params.MinGasPrice = sdkmath.LegacyZeroDec() s.app.FeeMarketKeeper.SetParams(s.ctx, params) txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(0), denom, &testMsg) @@ -63,7 +63,7 @@ func (s *AnteTestSuite) TestMinGasPriceDecorator() { "valid cosmos tx with MinGasPrices = 0, gasPrice > 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.ZeroDec() + params.MinGasPrice = sdkmath.LegacyZeroDec() s.app.FeeMarketKeeper.SetParams(s.ctx, params) txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(10), denom, &testMsg) @@ -77,7 +77,7 @@ func (s *AnteTestSuite) TestMinGasPriceDecorator() { "valid cosmos tx with MinGasPrices = 10, gasPrice = 10", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(10), denom, &testMsg) @@ -91,7 +91,7 @@ func (s *AnteTestSuite) TestMinGasPriceDecorator() { "invalid cosmos tx with MinGasPrices = 10, gasPrice = 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(0), denom, &testMsg) @@ -105,7 +105,7 @@ func (s *AnteTestSuite) TestMinGasPriceDecorator() { "invalid cosmos tx with wrong denom", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) txBuilder := s.CreateTestCosmosTxBuilder(sdkmath.NewInt(10), "stake", &testMsg) @@ -153,7 +153,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "invalid tx type", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) return &invalidTx{} }, @@ -164,7 +164,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "wrong tx type", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) testMsg := banktypes.MsgSend{ FromAddress: "evmos1x8fhpj9nmhqk8z9kpgjt95ck2xwyue0ptzkucp", @@ -181,7 +181,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "valid: invalid tx type with MinGasPrices = 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.ZeroDec() + params.MinGasPrice = sdkmath.LegacyZeroDec() s.app.FeeMarketKeeper.SetParams(s.ctx, params) return &invalidTx{} }, @@ -192,7 +192,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "valid legacy tx with MinGasPrices = 0, gasPrice = 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.ZeroDec() + params.MinGasPrice = sdkmath.LegacyZeroDec() s.app.FeeMarketKeeper.SetParams(s.ctx, params) msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), big.NewInt(0), nil, nil, nil) @@ -205,7 +205,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "valid legacy tx with MinGasPrices = 0, gasPrice > 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.ZeroDec() + params.MinGasPrice = sdkmath.LegacyZeroDec() s.app.FeeMarketKeeper.SetParams(s.ctx, params) msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), big.NewInt(10), nil, nil, nil) @@ -218,7 +218,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "valid legacy tx with MinGasPrices = 10, gasPrice = 10", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), big.NewInt(10), nil, nil, nil) @@ -231,7 +231,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "invalid legacy tx with MinGasPrices = 10, gasPrice = 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), big.NewInt(0), nil, nil, nil) @@ -244,7 +244,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "valid dynamic tx with MinGasPrices = 0, EffectivePrice = 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.ZeroDec() + params.MinGasPrice = sdkmath.LegacyZeroDec() s.app.FeeMarketKeeper.SetParams(s.ctx, params) msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), nil, big.NewInt(0), big.NewInt(0), &emptyAccessList) @@ -257,7 +257,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "valid dynamic tx with MinGasPrices = 0, EffectivePrice > 0", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.ZeroDec() + params.MinGasPrice = sdkmath.LegacyZeroDec() s.app.FeeMarketKeeper.SetParams(s.ctx, params) msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), nil, big.NewInt(100), big.NewInt(50), &emptyAccessList) @@ -270,7 +270,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "valid dynamic tx with MinGasPrices < EffectivePrice", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), nil, big.NewInt(100), big.NewInt(100), &emptyAccessList) @@ -283,7 +283,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "invalid dynamic tx with MinGasPrices > EffectivePrice", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(10) + params.MinGasPrice = sdkmath.LegacyNewDec(10) s.app.FeeMarketKeeper.SetParams(s.ctx, params) msg := s.BuildTestEthTx(from, to, nil, make([]byte, 0), nil, big.NewInt(0), big.NewInt(0), &emptyAccessList) @@ -296,7 +296,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "invalid dynamic tx with MinGasPrices > BaseFee, MinGasPrices > EffectivePrice", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(100) + params.MinGasPrice = sdkmath.LegacyNewDec(100) s.app.FeeMarketKeeper.SetParams(s.ctx, params) feemarketParams := s.app.FeeMarketKeeper.GetParams(s.ctx) @@ -313,7 +313,7 @@ func (s *AnteTestSuite) TestEthMinGasPriceDecorator() { "valid dynamic tx with MinGasPrices > BaseFee, MinGasPrices < EffectivePrice (big GasTipCap)", func() sdk.Tx { params := s.app.FeeMarketKeeper.GetParams(s.ctx) - params.MinGasPrice = sdk.NewDec(100) + params.MinGasPrice = sdkmath.LegacyNewDec(100) s.app.FeeMarketKeeper.SetParams(s.ctx, params) feemarketParams := s.app.FeeMarketKeeper.GetParams(s.ctx) diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index 412b9cef7b..7ca1a7c238 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -17,15 +17,16 @@ package ante import ( errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" + txsigning "cosmossdk.io/x/tx/signing" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" evmtypes "github.com/evmos/ethermint/x/evm/types" ) @@ -39,8 +40,8 @@ type HandlerOptions struct { FeeMarketKeeper FeeMarketKeeper EvmKeeper EVMKeeper FeegrantKeeper ante.FeegrantKeeper - SignModeHandler authsigning.SignModeHandler - SigGasConsumer func(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error + SignModeHandler *txsigning.HandlerMap + SigGasConsumer func(meter storetypes.GasMeter, sig signing.SignatureV2, params authtypes.Params) error MaxTxGasWanted uint64 ExtensionOptionChecker ante.ExtensionOptionChecker // use dynamic fee checker or the cosmos-sdk default one for native transactions diff --git a/app/ante/nativefee.go b/app/ante/nativefee.go index 819a94603b..2e6ffcc122 100644 --- a/app/ante/nativefee.go +++ b/app/ante/nativefee.go @@ -1,14 +1,16 @@ package ante import ( + "bytes" "fmt" - "cosmossdk.io/errors" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/cosmos/cosmos-sdk/x/auth/types" + evmkeeper "github.com/evmos/ethermint/x/evm/keeper" ) @@ -39,11 +41,11 @@ func NewDeductFeeDecorator(ak ante.AccountKeeper, bk types.BankKeeper, fk ante.F func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { - return ctx, errors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") } if !simulate && ctx.BlockHeight() > 0 && feeTx.GetGas() == 0 { - return ctx, errors.Wrap(sdkerrors.ErrInvalidGasLimit, "must provide positive gas") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidGasLimit, "must provide positive gas") } var ( @@ -70,7 +72,7 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee sdk.Coins) error { feeTx, ok := sdkTx.(sdk.FeeTx) if !ok { - return errors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + return errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") } if addr := dfd.accountKeeper.GetModuleAddress(types.FeeCollectorName); addr == nil { @@ -84,16 +86,18 @@ func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee // if feegranter set deduct fee from feegranter account. // this works with only when feegrant enabled. if feeGranter != nil { + feeGranterAddr := sdk.AccAddress(feeGranter) + if dfd.feegrantKeeper == nil { return sdkerrors.ErrInvalidRequest.Wrap("fee grants are not enabled") - } else if !feeGranter.Equals(feePayer) { - err := dfd.feegrantKeeper.UseGrantedFees(ctx, feeGranter, feePayer, fee, sdkTx.GetMsgs()) + } else if !bytes.Equal(feeGranterAddr, feePayer) { + err := dfd.feegrantKeeper.UseGrantedFees(ctx, feeGranterAddr, feePayer, fee, sdkTx.GetMsgs()) if err != nil { - return errors.Wrapf(err, "%s does not allow to pay fees for %s", feeGranter, feePayer) + return errorsmod.Wrapf(err, "%s does not allow to pay fees for %s", feeGranter, feePayer) } } - deductFeesFrom = feeGranter + deductFeesFrom = feeGranterAddr } deductFeesFromAcc := dfd.accountKeeper.GetAccount(ctx, deductFeesFrom) @@ -113,7 +117,7 @@ func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee sdk.NewEvent( sdk.EventTypeTx, sdk.NewAttribute(sdk.AttributeKeyFee, fee.String()), - sdk.NewAttribute(sdk.AttributeKeyFeePayer, deductFeesFrom.String()), + sdk.NewAttribute(sdk.AttributeKeyFeePayer, sdk.AccAddress(deductFeesFrom).String()), ), } ctx.EventManager().EmitEvents(events) diff --git a/app/ante/setup.go b/app/ante/setup.go index fb95719f50..7bd905d26a 100644 --- a/app/ante/setup.go +++ b/app/ante/setup.go @@ -21,7 +21,7 @@ import ( errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -32,7 +32,7 @@ import ( // by setting the gas meter to infinite func SetupEthContext(ctx sdk.Context, evmKeeper EVMKeeper) (newCtx sdk.Context, err error) { // We need to setup an empty gas config so that the gas is consistent with Ethereum. - newCtx = ctx.WithGasMeter(sdk.NewInfiniteGasMeter()). + newCtx = ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()). WithKVGasConfig(storetypes.GasConfig{}). WithTransientKVGasConfig(storetypes.GasConfig{}) @@ -50,10 +50,17 @@ func ValidateEthBasic(ctx sdk.Context, tx sdk.Tx, evmParams *evmtypes.Params, ba return nil } - err := tx.ValidateBasic() - // ErrNoSignatures is fine with eth tx - if err != nil && !errors.Is(err, errortypes.ErrNoSignatures) { - return errorsmod.Wrap(err, "tx basic validation failed") + msgs := tx.GetMsgs() + if msgs == nil { + return errorsmod.Wrap(errortypes.ErrUnknownRequest, "invalid transaction. Transaction without messages") + } + + if t, ok := tx.(sdk.HasValidateBasic); ok { + err := t.ValidateBasic() + // ErrNoSignatures is fine with eth tx + if err != nil && !errors.Is(err, errortypes.ErrNoSignatures) { + return errorsmod.Wrap(err, "tx basic validation failed") + } } // For eth type cosmos tx, some fields should be verified as zero values, @@ -130,7 +137,7 @@ func ValidateEthBasic(ctx sdk.Context, tx sdk.Tx, evmParams *evmtypes.Params, ba txFee = txFee.Add(sdk.Coin{Denom: evmDenom, Amount: sdkmath.NewIntFromBigInt(txData.Fee())}) } - if !authInfo.Fee.Amount.IsEqual(txFee) { + if !authInfo.Fee.Amount.Equal(txFee) { return errorsmod.Wrapf(errortypes.ErrInvalidRequest, "invalid AuthInfo Fee Amount (%s != %s)", authInfo.Fee.Amount, txFee) } diff --git a/app/ante/setup_test.go b/app/ante/setup_test.go index f4f10cd672..857050ed70 100644 --- a/app/ante/setup_test.go +++ b/app/ante/setup_test.go @@ -3,7 +3,7 @@ package ante_test import ( "math/big" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/evmos/ethermint/app/ante" diff --git a/app/ante/utils_test.go b/app/ante/utils_test.go index 8972f50dc1..6bb964b483 100644 --- a/app/ante/utils_test.go +++ b/app/ante/utils_test.go @@ -1,15 +1,21 @@ package ante_test import ( + "context" "math" "math/big" "time" sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" "github.com/stretchr/testify/suite" + protov2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/ethereum/eip712" "github.com/evmos/ethermint/testutil" utiltx "github.com/evmos/ethermint/testutil/tx" @@ -17,6 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" + txsigning "cosmossdk.io/x/tx/signing" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -33,21 +40,18 @@ import ( authz "github.com/cosmos/cosmos-sdk/x/authz" "github.com/evmos/ethermint/crypto/ethsecp256k1" + evtypes "cosmossdk.io/x/evidence/types" + "cosmossdk.io/x/feegrant" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - evtypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/evmos/ethermint/app" ante "github.com/evmos/ethermint/app/ante" - "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/tests" "github.com/evmos/ethermint/x/evm/statedb" evmtypes "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" - - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ) type AnteTestSuite struct { @@ -69,7 +73,7 @@ type AnteTestSuite struct { const TestGasLimit uint64 = 100000 func (suite *AnteTestSuite) StateDB() *statedb.StateDB { - return statedb.New(suite.ctx, suite.app.EvmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(suite.ctx.HeaderHash().Bytes()))) + return statedb.New(suite.ctx, suite.app.EvmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(suite.ctx.HeaderHash()))) } func (suite *AnteTestSuite) SetupTest() { @@ -105,24 +109,21 @@ func (suite *AnteTestSuite) SetupTest() { genesis[evmtypes.ModuleName] = app.AppCodec().MustMarshalJSON(evmGenesis) return genesis }) - - suite.ctx = suite.app.BaseApp.NewContext(checkTx, tmproto.Header{ - Height: 2, - ChainID: testutil.TestnetChainID + "-1", - Time: time.Now().UTC(), - }) - suite.ctx = suite.ctx.WithMinGasPrices(sdk.NewDecCoins(sdk.NewDecCoin(evmtypes.DefaultEVMDenom, sdk.OneInt()))) - suite.ctx = suite.ctx.WithBlockGasMeter(sdk.NewGasMeter(1000000000000000000)) + header := tmproto.Header{Height: 2, ChainID: testutil.TestnetChainID + "-1", Time: time.Now().UTC()} + suite.ctx = suite.app.BaseApp.NewUncachedContext(checkTx, header). + WithConsensusParams(*app.DefaultConsensusParams). + WithMinGasPrices(sdk.NewDecCoins(sdk.NewDecCoin(evmtypes.DefaultEVMDenom, sdkmath.OneInt()))). + WithBlockGasMeter(storetypes.NewGasMeter(1000000000000000000)) suite.app.EvmKeeper.WithChainID(suite.ctx) - infCtx := suite.ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) - suite.app.AccountKeeper.SetParams(infCtx, authtypes.DefaultParams()) + infCtx := suite.ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) + suite.app.AccountKeeper.Params.Set(infCtx, authtypes.DefaultParams()) addr := sdk.AccAddress(priv.PubKey().Address().Bytes()) acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + encodingConfig := app.MakeConfigForTest() // We're using TestMsg amino encoding in some tests, so register it here. encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) eip712.SetEncodingConfig(encodingConfig) @@ -149,7 +150,7 @@ func (suite *AnteTestSuite) SetupTest() { suite.ethSigner = ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID()) // fund signer acc to pay for tx fees - amt := sdk.NewInt(int64(math.Pow10(18) * 2)) + amt := sdkmath.NewInt(int64(math.Pow10(18) * 2)) err = testutil.FundAccount( suite.app.BankKeeper, suite.ctx, @@ -158,8 +159,7 @@ func (suite *AnteTestSuite) SetupTest() { ) suite.Require().NoError(err) - header := suite.ctx.BlockHeader() - suite.ctx = suite.ctx.WithBlockHeight(header.Height - 1) + suite.ctx = suite.ctx.WithBlockHeight(suite.ctx.BlockHeader().Height - 1) suite.ctx, err = testutil.Commit(suite.ctx, suite.app, time.Second*0, nil) suite.Require().NoError(err) } @@ -240,10 +240,13 @@ func (suite *AnteTestSuite) CreateTestTxBuilder( if signCosmosTx { // First round: we gather all the signer infos. We use the "set empty // signature" hack to do that. + defaultSignMode, err := authsigning.APISignModeToInternal(suite.clientCtx.TxConfig.SignModeHandler().DefaultMode()) + suite.Require().NoError(err) + sigV2 := signing.SignatureV2{ PubKey: priv.PubKey(), Data: &signing.SingleSignatureData{ - SignMode: suite.clientCtx.TxConfig.SignModeHandler().DefaultMode(), + SignMode: defaultSignMode, Signature: nil, }, Sequence: txData.GetNonce(), @@ -262,7 +265,8 @@ func (suite *AnteTestSuite) CreateTestTxBuilder( Sequence: txData.GetNonce(), } sigV2, err = tx.SignWithPrivKey( - suite.clientCtx.TxConfig.SignModeHandler().DefaultMode(), signerData, + suite.ctx, + defaultSignMode, signerData, txBuilder, priv, suite.clientCtx.TxConfig, txData.GetNonce(), ) suite.Require().NoError(err) @@ -298,7 +302,7 @@ func (suite *AnteTestSuite) CreateTestEIP712TxBuilderMsgDelegate(from sdk.AccAdd // Build MsgSend valEthAddr := tests.GenerateAddress() valAddr := sdk.ValAddress(valEthAddr.Bytes()) - msgSend := stakingtypes.NewMsgDelegate(from, valAddr, sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20))) + msgSend := stakingtypes.NewMsgDelegate(from.String(), valAddr.String(), sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20))) return suite.CreateTestEIP712SingleMessageTxBuilder(priv, chainId, gas, gasAmount, msgSend) } @@ -307,12 +311,12 @@ func (suite *AnteTestSuite) CreateTestEIP712MsgCreateValidator(from sdk.AccAddre valAddr := sdk.ValAddress(from.Bytes()) privEd := ed25519.GenPrivKey() msgCreate, err := stakingtypes.NewMsgCreateValidator( - valAddr, + valAddr.String(), privEd.PubKey(), - sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)), + sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)), stakingtypes.NewDescription("moniker", "indentity", "website", "security_contract", "details"), - stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()), - sdk.OneInt(), + stakingtypes.NewCommissionRates(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()), + sdkmath.OneInt(), ) suite.Require().NoError(err) return suite.CreateTestEIP712SingleMessageTxBuilder(priv, chainId, gas, gasAmount, msgCreate) @@ -323,13 +327,13 @@ func (suite *AnteTestSuite) CreateTestEIP712MsgCreateValidator2(from sdk.AccAddr valAddr := sdk.ValAddress(from.Bytes()) privEd := ed25519.GenPrivKey() msgCreate, err := stakingtypes.NewMsgCreateValidator( - valAddr, + valAddr.String(), privEd.PubKey(), - sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewInt(20)), + sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(20)), // Ensure optional fields can be left blank stakingtypes.NewDescription("moniker", "indentity", "", "", ""), - stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()), - sdk.OneInt(), + stakingtypes.NewCommissionRates(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()), + sdkmath.OneInt(), ) suite.Require().NoError(err) return suite.CreateTestEIP712SingleMessageTxBuilder(priv, chainId, gas, gasAmount, msgCreate) @@ -360,7 +364,7 @@ func (suite *AnteTestSuite) CreateTestEIP712GrantAllowance(from sdk.AccAddress, func (suite *AnteTestSuite) CreateTestEIP712MsgEditValidator(from sdk.AccAddress, priv cryptotypes.PrivKey, chainId string, gas uint64, gasAmount sdk.Coins) client.TxBuilder { valAddr := sdk.ValAddress(from.Bytes()) msgEdit := stakingtypes.NewMsgEditValidator( - valAddr, + valAddr.String(), stakingtypes.NewDescription("moniker", "identity", "website", "security_contract", "details"), nil, nil, @@ -417,7 +421,7 @@ func (suite *AnteTestSuite) CreateTestEIP712SubmitProposalV1(from sdk.AccAddress proposalMsgs, sdk.NewCoins(sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewInt(100))), sdk.MustBech32ifyAddressBytes(sdk.GetConfig().GetBech32AccountAddrPrefix(), from.Bytes()), - "Metadata", "title", "summary", + "Metadata", "title", "summary", false, ) suite.Require().NoError(err) @@ -559,18 +563,27 @@ func (suite *AnteTestSuite) RegisterAccount(pubKey cryptotypes.PubKey, balance * func (suite *AnteTestSuite) createSignerBytes(chainId string, signMode signing.SignMode, pubKey cryptotypes.PubKey, txBuilder client.TxBuilder) []byte { acc, err := sdkante.GetSignerAcc(suite.ctx, suite.app.AccountKeeper, sdk.AccAddress(pubKey.Address())) suite.Require().NoError(err) - signerInfo := authsigning.SignerData{ + anyPk, err := codectypes.NewAnyWithValue(pubKey) + suite.Require().NoError(err) + signerInfo := txsigning.SignerData{ Address: sdk.MustBech32ifyAddressBytes(sdk.GetConfig().GetBech32AccountAddrPrefix(), acc.GetAddress().Bytes()), ChainID: chainId, AccountNumber: acc.GetAccountNumber(), Sequence: acc.GetSequence(), - PubKey: pubKey, + PubKey: &anypb.Any{ + TypeUrl: anyPk.TypeUrl, + Value: anyPk.Value, + }, } - + builtTx := txBuilder.GetTx() + adaptableTx, ok := builtTx.(authsigning.V2AdaptableTx) + suite.Require().True(ok) + txData := adaptableTx.GetSigningTxData() signerBytes, err := suite.clientCtx.TxConfig.SignModeHandler().GetSignBytes( - signMode, + context.Background(), + signingv1beta1.SignMode(signMode), signerInfo, - txBuilder.GetTx(), + txData, ) suite.Require().NoError(err) @@ -583,7 +596,7 @@ func (suite *AnteTestSuite) createBaseTxBuilder(msg sdk.Msg, gas uint64) client. txBuilder.SetGasLimit(gas) txBuilder.SetFeeAmount(sdk.NewCoins( - sdk.NewCoin("aphoton", sdk.NewInt(10000)), + sdk.NewCoin("aphoton", sdkmath.NewInt(10000)), )) err := txBuilder.SetMsgs(msg) @@ -664,5 +677,7 @@ var _ sdk.Tx = &invalidTx{} type invalidTx struct{} -func (invalidTx) GetMsgs() []sdk.Msg { return []sdk.Msg{nil} } +func (invalidTx) GetMsgs() []sdk.Msg { return []sdk.Msg{nil} } +func (invalidTx) GetMsgsV2() ([]protov2.Message, error) { return nil, nil } + func (invalidTx) ValidateBasic() error { return nil } diff --git a/app/app.go b/app/app.go index 87f97a1ebd..da5747bc57 100644 --- a/app/app.go +++ b/app/app.go @@ -26,36 +26,50 @@ import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" + "cosmossdk.io/client/v2/autocli" + "cosmossdk.io/core/appmodule" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" "github.com/cosmos/cosmos-sdk/server" + "github.com/cosmos/gogoproto/proto" "github.com/gorilla/mux" "github.com/spf13/cast" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmos "github.com/cometbft/cometbft/libs/os" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" "github.com/cosmos/cosmos-sdk/client/grpc/node" - "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/store/streaming" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" + "cosmossdk.io/x/evidence" + evidencekeeper "cosmossdk.io/x/evidence/keeper" + evidencetypes "cosmossdk.io/x/evidence/types" + "cosmossdk.io/x/feegrant" + feegrantkeeper "cosmossdk.io/x/feegrant/keeper" + feegrantmodule "cosmossdk.io/x/feegrant/module" + "cosmossdk.io/x/upgrade" + upgradekeeper "cosmossdk.io/x/upgrade/keeper" + upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" mempool "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" + authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" "github.com/cosmos/cosmos-sdk/x/auth/posthandler" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" @@ -69,9 +83,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/bank" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" "github.com/cosmos/cosmos-sdk/x/consensus" "github.com/cosmos/cosmos-sdk/x/crisis" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" @@ -79,19 +90,12 @@ import ( distr "github.com/cosmos/cosmos-sdk/x/distribution" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/mint" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" @@ -107,22 +111,20 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" - upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - "github.com/cosmos/ibc-go/v7/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v7/modules/core" - ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/modules/capability" + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v8/modules/core" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" //nolint:staticcheck + ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" + porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" "github.com/evmos/ethermint/client/docs" @@ -172,10 +174,7 @@ var ( staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, - gov.NewAppModuleBasic([]govclient.ProposalHandler{ - paramsclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, - }), + gov.NewAppModuleBasic([]govclient.ProposalHandler{paramsclient.ProposalHandler}), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, @@ -263,7 +262,8 @@ type EthermintApp struct { FeeMarketKeeper feemarketkeeper.Keeper // the module manager - mm *module.Manager + ModuleManager *module.Manager + BasicModuleManager module.BasicManager // simulation manager sm *module.SimulationManager @@ -281,7 +281,7 @@ func NewEthermintApp( appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *EthermintApp { - encodingConfig := encoding.MakeConfig(ModuleBasics) + encodingConfig := encoding.MakeConfig() appCodec := encodingConfig.Codec cdc := encodingConfig.Amino txConfig := encodingConfig.TxConfig @@ -292,9 +292,13 @@ func NewEthermintApp( // NOTE we use custom transaction decoder that supports the sdk.Tx interface instead of sdk.StdTx // Setup Mempool and Proposal Handlers baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { - mempool := mempool.NoOpMempool{} - app.SetMempool(mempool) + mempool := mempool.NewPriorityMempool(mempool.PriorityNonceMempoolConfig[int64]{ + TxPriority: mempool.NewDefaultTxPriority(), + SignerExtractor: NewEthSignerExtractionAdapter(mempool.NewDefaultSignerExtractionAdapter()), + }) handler := baseapp.NewDefaultProposalHandler(mempool, app) + + app.SetMempool(mempool) app.SetPrepareProposal(handler.PrepareProposalHandler()) app.SetProcessProposal(handler.ProcessProposalHandler()) }) @@ -310,7 +314,7 @@ func NewEthermintApp( bApp.SetInterfaceRegistry(interfaceRegistry) bApp.SetTxEncoder(txConfig.TxEncoder()) - keys := sdk.NewKVStoreKeys( + keys := storetypes.NewKVStoreKeys( // SDK keys authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, @@ -324,11 +328,11 @@ func NewEthermintApp( ) // Add the EVM transient store key - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey) - memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) + tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey) + memKeys := storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) // load state streaming if enabled - if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, logger, keys); err != nil { + if err := bApp.RegisterStreamingServices(appOpts, keys); err != nil { fmt.Printf("failed to load state streaming: %s", err) os.Exit(1) } @@ -352,8 +356,13 @@ func NewEthermintApp( authAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() // set the BaseApp's parameter store - app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper(appCodec, keys[consensusparamtypes.StoreKey], authAddr) - bApp.SetParamStore(&app.ConsensusParamsKeeper) + app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]), + authAddr, + runtime.EventService{}, + ) + bApp.SetParamStore(app.ConsensusParamsKeeper.ParamsStore) // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) @@ -367,28 +376,33 @@ func NewEthermintApp( // use custom Ethermint account for contracts app.AccountKeeper = authkeeper.NewAccountKeeper( - appCodec, keys[authtypes.StoreKey], + appCodec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), ethermint.ProtoAccount, maccPerms, + address.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), sdk.GetConfig().GetBech32AccountAddrPrefix(), authAddr, ) app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, - keys[banktypes.StoreKey], + runtime.NewKVStoreService(keys[banktypes.StoreKey]), app.AccountKeeper, app.BlockedAddrs(), authAddr, + logger, ) app.StakingKeeper = stakingkeeper.NewKeeper( - appCodec, keys[stakingtypes.StoreKey], + appCodec, + runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, authAddr, + address.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + address.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), ) app.MintKeeper = mintkeeper.NewKeeper( appCodec, - keys[minttypes.StoreKey], + runtime.NewKVStoreService(keys[minttypes.StoreKey]), app.StakingKeeper, app.AccountKeeper, app.BankKeeper, @@ -397,7 +411,7 @@ func NewEthermintApp( ) app.DistrKeeper = distrkeeper.NewKeeper( appCodec, - keys[distrtypes.StoreKey], + runtime.NewKVStoreService(keys[distrtypes.StoreKey]), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, @@ -407,22 +421,24 @@ func NewEthermintApp( app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, app.LegacyAmino(), - keys[slashingtypes.StoreKey], + runtime.NewKVStoreService(keys[slashingtypes.StoreKey]), app.StakingKeeper, authAddr, ) app.CrisisKeeper = *crisiskeeper.NewKeeper( appCodec, - keys[crisistypes.StoreKey], + runtime.NewKVStoreService(keys[crisistypes.StoreKey]), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, authAddr, + app.AccountKeeper.AddressCodec(), ) app.FeeGrantKeeper = feegrantkeeper.NewKeeper( appCodec, - keys[feegrant.StoreKey], - app.AccountKeeper) + runtime.NewKVStoreService(keys[feegrant.StoreKey]), + app.AccountKeeper, + ) // get skipUpgradeHeights from the app options skipUpgradeHeights := map[int64]bool{} @@ -436,7 +452,7 @@ func NewEthermintApp( // set the governance module account as the authority for conducting upgrades app.UpgradeKeeper = *upgradekeeper.NewKeeper( skipUpgradeHeights, - keys[upgradetypes.StoreKey], + runtime.NewKVStoreService(keys[upgradetypes.StoreKey]), appCodec, homePath, app.BaseApp, @@ -446,22 +462,36 @@ func NewEthermintApp( // register the staking hooks app.StakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), - app.SlashingKeeper.Hooks()), + app.SlashingKeeper.Hooks(), + ), ) app.AuthzKeeper = authzkeeper.NewKeeper( - keys[authzkeeper.StoreKey], + runtime.NewKVStoreService(keys[authzkeeper.StoreKey]), appCodec, app.MsgServiceRouter(), - app.AccountKeeper) + app.AccountKeeper, + ) + + // Create IBC Keeper + app.IBCKeeper = ibckeeper.NewKeeper( + appCodec, keys[ibcexported.StoreKey], + app.GetSubspace(ibcexported.ModuleName), + app.StakingKeeper, + app.UpgradeKeeper, + scopedIBCKeeper, + authAddr, + ) tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) // Create Ethermint keepers feeMarketSs := app.GetSubspace(feemarkettypes.ModuleName) app.FeeMarketKeeper = feemarketkeeper.NewKeeper( - appCodec, authtypes.NewModuleAddress(govtypes.ModuleName), - keys[feemarkettypes.StoreKey], tkeys[feemarkettypes.TransientKey], feeMarketSs, + appCodec, + runtime.NewKVStoreService(keys[feemarkettypes.StoreKey]), + authtypes.NewModuleAddress(govtypes.ModuleName), + keys[feemarkettypes.StoreKey], tkeys[feemarkettypes.TransientKey], ) // Set authority to x/gov module account to only expect the module account to update params @@ -477,32 +507,29 @@ func NewEthermintApp( allKeys[k] = v } app.EvmKeeper = evmkeeper.NewKeeper( - appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], authtypes.NewModuleAddress(govtypes.ModuleName), + appCodec, + runtime.NewKVStoreService(keys[evmtypes.StoreKey]), + keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], authtypes.NewModuleAddress(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.FeeMarketKeeper, tracer, - evmSs, nil, + nil, allKeys, ) - // Create IBC Keeper - app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibcexported.StoreKey], app.GetSubspace(ibcexported.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, - ) - // register the proposal types govRouter := govv1beta1.NewRouter() govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(&app.UpgradeKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)) govConfig := govtypes.DefaultConfig() /* Example of setting gov params: govConfig.MaxMetadataLen = 10000 */ govKeeper := govkeeper.NewKeeper( - appCodec, keys[govtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.StakingKeeper, app.MsgServiceRouter(), govConfig, authAddr, + appCodec, + runtime.NewKVStoreService(keys[govtypes.StoreKey]), + app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.DistrKeeper, + app.MsgServiceRouter(), govConfig, authAddr, ) // Set legacy router for backwards compatibility with gov v1beta1 @@ -517,8 +544,8 @@ func NewEthermintApp( // Create Transfer Keepers app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, - app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, + app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, app.IBCKeeper.PortKeeper, + app.AccountKeeper, app.BankKeeper, scopedTransferKeeper, authAddr, ) transferModule := transfer.NewAppModule(app.TransferKeeper) transferIBCModule := transfer.NewIBCModule(app.TransferKeeper) @@ -530,7 +557,11 @@ func NewEthermintApp( // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, keys[evidencetypes.StoreKey], app.StakingKeeper, app.SlashingKeeper, + appCodec, + runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), + app.StakingKeeper, app.SlashingKeeper, + app.AccountKeeper.AddressCodec(), + runtime.ProvideCometInfoService(), ) // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper @@ -543,10 +574,10 @@ func NewEthermintApp( // NOTE: Any module instantiated in the module manager that is later modified // must be passed by reference here. - app.mm = module.NewManager( + app.ModuleManager = module.NewManager( // SDK app modules genutil.NewAppModule( - app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, + app.AccountKeeper, app.StakingKeeper, app, txConfig, ), auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), @@ -564,10 +595,11 @@ func NewEthermintApp( app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName), + app.interfaceRegistry, ), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(distrtypes.ModuleName)), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), - upgrade.NewAppModule(&app.UpgradeKeeper), + upgrade.NewAppModule(&app.UpgradeKeeper, app.AccountKeeper.AddressCodec()), evidence.NewAppModule(app.EvidenceKeeper), params.NewAppModule(app.ParamsKeeper), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), @@ -575,13 +607,32 @@ func NewEthermintApp( // ibc modules ibc.NewAppModule(app.IBCKeeper), + ibctm.AppModule{}, transferModule, // Ethermint app modules feemarket.NewAppModule(app.FeeMarketKeeper, feeMarketSs), evm.NewAppModule(app.EvmKeeper, app.AccountKeeper, evmSs), ) - app.mm.SetOrderPreBlockers( + // BasicModuleManager defines the module BasicManager which is in charge of setting up basic, + // non-dependant module elements, such as codec registration and genesis verification. + // By default, it is composed of all the modules from the module manager. + // Additionally, app module basics can be overwritten by passing them as an argument. + app.BasicModuleManager = module.NewBasicManagerFromManager( + app.ModuleManager, + map[string]module.AppModuleBasic{ + genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), + govtypes.ModuleName: gov.NewAppModuleBasic( + []govclient.ProposalHandler{ + paramsclient.ProposalHandler, + }, + ), + }, + ) + app.BasicModuleManager.RegisterLegacyAminoCodec(cdc) + app.BasicModuleManager.RegisterInterfaces(interfaceRegistry) + + app.ModuleManager.SetOrderPreBlockers( upgradetypes.ModuleName, ) @@ -591,7 +642,7 @@ func NewEthermintApp( // NOTE: upgrade module must go first to handle software upgrades. // NOTE: staking module is required if HistoricalEntries param > 0 // NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC) - app.mm.SetOrderBeginBlockers( + app.ModuleManager.SetOrderBeginBlockers( upgradetypes.ModuleName, capabilitytypes.ModuleName, feemarkettypes.ModuleName, @@ -617,16 +668,16 @@ func NewEthermintApp( ) // NOTE: fee market module must go last in order to retrieve the block gas used. - app.mm.SetOrderEndBlockers( + app.ModuleManager.SetOrderEndBlockers( crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, evmtypes.ModuleName, feemarkettypes.ModuleName, // no-op modules + capabilitytypes.ModuleName, ibcexported.ModuleName, ibctransfertypes.ModuleName, - capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, @@ -648,7 +699,7 @@ func NewEthermintApp( // NOTE: Capability module must occur first so that it can initialize any capabilities // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. - app.mm.SetOrderInitGenesis( + genesisModuleOrder := []string{ // SDK modules capabilitytypes.ModuleName, authtypes.ModuleName, @@ -675,18 +726,22 @@ func NewEthermintApp( consensusparamtypes.ModuleName, // NOTE: crisis module must go at the end to check for invariants on each module crisistypes.ModuleName, - ) + } + app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) + app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...) // Uncomment if you want to set a custom migration order here. - // app.mm.SetOrderMigrations(custom order) + // app.ModuleManager.SetOrderMigrations(custom order) - app.mm.RegisterInvariants(&app.CrisisKeeper) + app.ModuleManager.RegisterInvariants(&app.CrisisKeeper) app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - app.mm.RegisterServices(app.configurator) + if err := app.ModuleManager.RegisterServices(app.configurator); err != nil { + panic(err) + } // RegisterUpgradeHandlers is used for registering any on-chain upgrades. - // Make sure it's called after `app.mm` and `app.configurator` are set. - app.RegisterUpgradeHandlers(app.appCodec, app.IBCKeeper.ClientKeeper) + // Make sure it's called after `app.ModuleManager` and `app.configurator` are set. + app.RegisterUpgradeHandlers() // add test gRPC service for testing gRPC queries in isolation // testdata.RegisterTestServiceServer(app.GRPCQueryRouter(), testdata.TestServiceImpl{}) @@ -698,9 +753,9 @@ func NewEthermintApp( overrideModules := map[string]module.AppModuleSimulation{ authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), } - app.sm = module.NewSimulationManagerFromAppModules(app.mm.Modules, overrideModules) + app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) - autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.mm.Modules)) + autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.ModuleManager.Modules)) reflectionSvc, err := runtimeservices.NewReflectionService() if err != nil { @@ -717,8 +772,8 @@ func NewEthermintApp( // initialize BaseApp app.SetInitChainer(app.InitChainer) - app.SetBeginBlocker(app.BeginBlocker) app.SetPreBlocker(app.PreBlocker) + app.SetBeginBlocker(app.BeginBlocker) app.SetEndBlocker(app.EndBlocker) app.setAnteHandler(txConfig, cast.ToUint64(appOpts.Get(srvflags.EVMMaxTxGasWanted))) // In v0.46, the SDK introduces _postHandlers_. PostHandlers are like @@ -736,6 +791,18 @@ func NewEthermintApp( // upgrade. app.setPostHandler() + // At startup, after all modules have been registered, check that all prot + // annotations are correct. + protoFiles, err := proto.MergedRegistry() + if err != nil { + panic(err) + } + err = msgservice.ValidateProtoAnnotations(protoFiles) + if err != nil { + // Once we switch to using protoreflect-based antehandlers, we might + // want to panic here instead of logging a warning. + fmt.Fprintln(os.Stderr, err.Error()) + } if loadLatest { if err := app.LoadLatestVersion(); err != nil { tmos.Exit(err.Error()) @@ -789,28 +856,34 @@ func (app *EthermintApp) setPostHandler() { func (app *EthermintApp) Name() string { return app.BaseApp.Name() } // PreBlocker updates every pre begin block -func (app *EthermintApp) PreBlocker(ctx sdk.Context, req abci.RequestBeginBlock) (sdk.ResponsePreBlock, error) { - return app.mm.PreBlock(ctx, req) +func (app *EthermintApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + return app.ModuleManager.PreBlock(ctx) } // BeginBlocker updates every begin block -func (app *EthermintApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { - return app.mm.BeginBlock(ctx, req) +func (app *EthermintApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { + return app.ModuleManager.BeginBlock(ctx) } // EndBlocker updates every end block -func (app *EthermintApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { - return app.mm.EndBlock(ctx, req) +func (app *EthermintApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { + return app.ModuleManager.EndBlock(ctx) +} + +func (app *EthermintApp) Configurator() module.Configurator { + return app.configurator } // InitChainer updates at chain initialization -func (app *EthermintApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { +func (app *EthermintApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) { var genesisState GenesisState if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) } - app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) + if err := app.UpgradeKeeper.SetModuleVersionMap(ctx, app.ModuleManager.GetVersionMap()); err != nil { + return nil, err + } + return app.ModuleManager.InitGenesis(ctx, app.appCodec, genesisState) } // LoadHeight loads state at a particular height @@ -873,6 +946,26 @@ func (app *EthermintApp) EncodingConfig() ethermint.EncodingConfig { } } +// AutoCliOpts returns the autocli options for the app. +func (app *EthermintApp) AutoCliOpts() autocli.AppOptions { + modules := make(map[string]appmodule.AppModule, 0) + for _, m := range app.ModuleManager.Modules { + if moduleWithName, ok := m.(module.HasName); ok { + moduleName := moduleWithName.Name() + if appModule, ok := moduleWithName.(appmodule.AppModule); ok { + modules[moduleName] = appModule + } + } + } + return autocli.AppOptions{ + Modules: modules, + ModuleOptions: runtimeservices.ExtractAutoCLIOptions(app.ModuleManager.Modules), + AddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), + ValidatorAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ValidatorAddrPrefix()), + ConsensusAddressCodec: authcodec.NewBech32Codec(sdk.GetConfig().GetBech32ConsensusAddrPrefix()), + } +} + // GetKey returns the KVStoreKey for the provided store key. // // NOTE: This is solely to be used for testing purposes. @@ -914,12 +1007,12 @@ func (app *EthermintApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config. // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. - tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + cmtservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register node gRPC service for grpc-gateway. node.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register grpc-gateway routes for all modules. - ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + app.BasicModuleManager.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // register swagger API from root so that other applications can override easily if apiConfig.Swagger { @@ -934,7 +1027,7 @@ func (app *EthermintApp) RegisterTxService(clientCtx client.Context) { // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *EthermintApp) RegisterTendermintService(clientCtx client.Context) { - tmservice.RegisterTendermintService( + cmtservice.RegisterTendermintService( clientCtx, app.BaseApp.GRPCQueryRouter(), app.interfaceRegistry, @@ -942,8 +1035,8 @@ func (app *EthermintApp) RegisterTendermintService(clientCtx client.Context) { ) } -func (app *EthermintApp) RegisterNodeService(clientCtx client.Context) { - node.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +func (app *EthermintApp) RegisterNodeService(clientCtx client.Context, cfg config.Config) { + node.RegisterNodeService(clientCtx, app.GRPCQueryRouter(), cfg) } // RegisterSwaggerAPI registers swagger route with API Server @@ -969,20 +1062,10 @@ func GetMaccPerms() map[string][]string { // initParamsKeeper init params keeper and its subspaces func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) - - // SDK subspaces - paramsKeeper.Subspace(authtypes.ModuleName) - paramsKeeper.Subspace(banktypes.ModuleName) - paramsKeeper.Subspace(stakingtypes.ModuleName) - paramsKeeper.Subspace(minttypes.ModuleName) - paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) //nolint: staticcheck - paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(ibcexported.ModuleName) - // ethermint subspaces - paramsKeeper.Subspace(evmtypes.ModuleName) - paramsKeeper.Subspace(feemarkettypes.ModuleName).WithKeyTable(feemarkettypes.ParamKeyTable()) + // register the key tables for legacy param subspaces + keyTable := ibcclienttypes.ParamKeyTable() + keyTable.RegisterParamSet(&ibcconnectiontypes.Params{}) + paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable) + paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable()) return paramsKeeper } diff --git a/app/app_test.go b/app/app_test.go index bbaacd0089..9fcb822c41 100644 --- a/app/app_test.go +++ b/app/app_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -20,7 +20,7 @@ func TestEthermintAppExport(t *testing.T) { // Making a new app object with the db, so that initchain hasn't been called app2 := NewEthermintApp( - log.NewTMLogger(log.NewSyncWriter(os.Stdout)), + log.NewLogger(os.Stdout), db, nil, true, diff --git a/app/benchmark_test.go b/app/benchmark_test.go index 137b336fe3..f43efe469a 100644 --- a/app/benchmark_test.go +++ b/app/benchmark_test.go @@ -5,9 +5,9 @@ import ( "io" "testing" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" ) @@ -15,7 +15,7 @@ import ( func BenchmarkEthermintApp_ExportAppStateAndValidators(b *testing.B) { db := dbm.NewMemDB() app := NewEthermintApp( - log.NewTMLogger(io.Discard), + log.NewLogger(io.Discard), db, nil, true, @@ -31,7 +31,7 @@ func BenchmarkEthermintApp_ExportAppStateAndValidators(b *testing.B) { // Initialize the chain app.InitChain( - abci.RequestInitChain{ + &abci.RequestInitChain{ ChainId: ChainID, Validators: []abci.ValidatorUpdate{}, AppStateBytes: stateBytes, @@ -44,7 +44,7 @@ func BenchmarkEthermintApp_ExportAppStateAndValidators(b *testing.B) { for i := 0; i < b.N; i++ { // Making a new app object with the db, so that initchain hasn't been called app2 := NewEthermintApp( - log.NewTMLogger(log.NewSyncWriter(io.Discard)), + log.NewLogger(io.Discard), db, nil, true, diff --git a/app/export.go b/app/export.go index bdd6248144..e64017089b 100644 --- a/app/export.go +++ b/app/export.go @@ -20,20 +20,18 @@ import ( "fmt" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - servertypes "github.com/cosmos/cosmos-sdk/server/types" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - "github.com/evmos/ethermint/encoding" ) // NewDefaultGenesisState generates the default state for the application. func NewDefaultGenesisState() GenesisState { - encCfg := encoding.MakeConfig(ModuleBasics) + encCfg := MakeConfigForTest() return ModuleBasics.DefaultGenesis(encCfg.Codec) } @@ -43,7 +41,7 @@ func (app *EthermintApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { // Creates context with current height and checks txs for ctx to be usable by start of next block - ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) + ctx := app.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight()}) // We export at last height + 1, because that's the height at which // Tendermint will start InitChain. @@ -56,7 +54,10 @@ func (app *EthermintApp) ExportAppStateAndValidators( } } - genState := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + genState, err := app.ModuleManager.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) + if err != nil { + return servertypes.ExportedApp{}, err + } appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err @@ -102,13 +103,22 @@ func (app *EthermintApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAd /* Handle fee distribution state. */ // withdraw all validator commission - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) + if err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, valBz) return false - }) + }); err != nil { + return err + } // withdraw all delegator rewards - dels := app.StakingKeeper.GetAllDelegations(ctx) + dels, err := app.StakingKeeper.GetAllDelegations(ctx) + if err != nil { + return err + } for _, delegation := range dels { valAddr, err := sdk.ValAddressFromBech32(delegation.ValidatorAddress) if err != nil { @@ -133,18 +143,32 @@ func (app *EthermintApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAd ctx = ctx.WithBlockHeight(0) // reinitialize all validators - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + if err := app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) - feePool := app.DistrKeeper.GetFeePool(ctx) + valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator()) + if err != nil { + panic(err) + } + scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz) + if err != nil { + panic(err) + } + feePool, err := app.DistrKeeper.FeePool.Get(ctx) + if err != nil { + panic(err) + } feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) - app.DistrKeeper.SetFeePool(ctx, feePool) + if err := app.DistrKeeper.FeePool.Set(ctx, feePool); err != nil { + panic(err) + } - if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil { + if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, valBz); err != nil { return true } return false - }) + }); err != nil { + return err + } // reinitialize all delegations for _, del := range dels { @@ -170,33 +194,41 @@ func (app *EthermintApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAd /* Handle staking state. */ // iterate through redelegations, reset creation height - app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { + if err := app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { for i := range red.Entries { red.Entries[i].CreationHeight = 0 } - app.StakingKeeper.SetRedelegation(ctx, red) + if err := app.StakingKeeper.SetRedelegation(ctx, red); err != nil { + panic(err) + } return false - }) + }); err != nil { + return err + } // iterate through unbonding delegations, reset creation height - app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { + if err := app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { for i := range ubd.Entries { ubd.Entries[i].CreationHeight = 0 } - app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + if err := app.StakingKeeper.SetUnbondingDelegation(ctx, ubd); err != nil { + panic(err) + } return false - }) + }); err != nil { + return err + } // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. store := ctx.KVStore(app.keys[stakingtypes.StoreKey]) - iter := sdk.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) + iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) for ; iter.Valid(); iter.Next() { addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) - validator, found := app.StakingKeeper.GetValidator(ctx, addr) - if !found { - return fmt.Errorf("expected validator %s not found", addr) + validator, err := app.StakingKeeper.GetValidator(ctx, addr) + if err != nil { + return fmt.Errorf("expected validator %s not found, %w", addr, err) } validator.UnbondingHeight = 0 @@ -204,7 +236,9 @@ func (app *EthermintApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAd validator.Jailed = true } - app.StakingKeeper.SetValidator(ctx, validator) + if err := app.StakingKeeper.SetValidator(ctx, validator); err != nil { + return err + } } if err := iter.Close(); err != nil { @@ -218,13 +252,14 @@ func (app *EthermintApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAd /* Handle slashing state. */ // reset start height on signing infos - app.SlashingKeeper.IterateValidatorSigningInfos( + return app.SlashingKeeper.IterateValidatorSigningInfos( ctx, func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) { info.StartHeight = 0 - app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info) + if err := app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info); err != nil { + panic(err) + } return false }, ) - return nil } diff --git a/app/signer.go b/app/signer.go new file mode 100644 index 0000000000..854e3b388b --- /dev/null +++ b/app/signer.go @@ -0,0 +1,47 @@ +package app + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + mempool "github.com/cosmos/cosmos-sdk/types/mempool" + authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + evmtypes "github.com/evmos/ethermint/x/evm/types" +) + +var _ mempool.SignerExtractionAdapter = EthSignerExtractionAdapter{} + +// EthSignerExtractionAdapter is the default implementation of SignerExtractionAdapter. It extracts the signers +// from a cosmos-sdk tx via GetSignaturesV2. +type EthSignerExtractionAdapter struct { + fallback mempool.SignerExtractionAdapter +} + +// NewEthSignerExtractionAdapter constructs a new EthSignerExtractionAdapter instance +func NewEthSignerExtractionAdapter(fallback mempool.SignerExtractionAdapter) EthSignerExtractionAdapter { + return EthSignerExtractionAdapter{fallback} +} + +// GetSigners implements the Adapter interface +// NOTE: only the first item is used by the mempool +func (s EthSignerExtractionAdapter) GetSigners(tx sdk.Tx) ([]mempool.SignerData, error) { + if txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx); ok { + opts := txWithExtensions.GetExtensionOptions() + if len(opts) > 0 && opts[0].GetTypeUrl() == "/ethermint.evm.v1.ExtensionOptionsEthereumTx" { + for _, msg := range tx.GetMsgs() { + if ethMsg, ok := msg.(*evmtypes.MsgEthereumTx); ok { + txData, err := evmtypes.UnpackTxData(ethMsg.Data) + if err != nil { + return nil, err + } + return []mempool.SignerData{ + mempool.NewSignerData( + sdk.AccAddress(ethMsg.From), + txData.GetNonce(), + ), + }, nil + } + } + } + } + + return s.fallback.GetSigners(tx) +} diff --git a/app/simulation_test.go b/app/simulation_test.go index bfbf48bdd7..050eb8ac39 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -17,28 +17,28 @@ import ( simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" + "cosmossdk.io/store" + storetypes "cosmossdk.io/store/types" + evidencetypes "cosmossdk.io/x/evidence/types" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/client/flags" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/simulation" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" + ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" "github.com/evmos/ethermint/app/ante" ) @@ -66,6 +66,7 @@ func fauxMerkleModeOpt(bapp *baseapp.BaseApp) { // NewSimApp disable feemarket on native tx, otherwise the cosmos-sdk simulation tests will fail. func NewSimApp(logger log.Logger, db dbm.DB, baseAppOptions ...func(*baseapp.BaseApp)) (*EthermintApp, error) { appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = DefaultNodeHome appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue app := NewEthermintApp(logger, db, nil, false, appOptions, baseAppOptions...) // disable feemarket on native tx @@ -216,9 +217,9 @@ func TestAppImportExport(t *testing.T) { } }() - ctxA := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight(), ChainID: SimAppChainID}) - ctxB := newApp.NewContext(true, tmproto.Header{Height: app.LastBlockHeight(), ChainID: SimAppChainID}) - newApp.mm.InitGenesis(ctxB, app.AppCodec(), genesisState) + ctxA := app.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight(), ChainID: SimAppChainID}) + ctxB := newApp.NewContextLegacy(true, tmproto.Header{Height: app.LastBlockHeight(), ChainID: SimAppChainID}) + newApp.ModuleManager.InitGenesis(ctxB, app.AppCodec(), genesisState) newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) fmt.Printf("comparing stores...\n") @@ -249,7 +250,7 @@ func TestAppImportExport(t *testing.T) { storeA := ctxA.KVStore(skp.A) storeB := ctxB.KVStore(skp.B) - failedKVAs, failedKVBs := sdk.DiffKVStores(storeA, storeB, skp.Prefixes) + failedKVAs, failedKVBs := simtestutil.DiffKVStores(storeA, storeB, skp.Prefixes) require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare") fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), skp.A, skp.B) @@ -324,7 +325,7 @@ func TestAppSimulationAfterImport(t *testing.T) { require.Equal(t, appName, newApp.Name()) require.NoError(t, err) - newApp.InitChain(abci.RequestInitChain{ + newApp.InitChain(&abci.RequestInitChain{ ChainId: SimAppChainID, AppStateBytes: exported.AppState, }) @@ -367,7 +368,7 @@ func TestAppStateDeterminism(t *testing.T) { for j := 0; j < numTimesToRunPerSeed; j++ { var logger log.Logger if simcli.FlagVerboseValue { - logger = log.TestingLogger() + logger = log.NewTestLogger(t) } else { logger = log.NewNopLogger() } diff --git a/app/upgrades.go b/app/upgrades.go index 63c1d476cb..f6289b9e20 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -16,97 +16,17 @@ package app import ( - "fmt" + "context" - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" + upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper" - "github.com/cosmos/ibc-go/v7/modules/core/exported" - ibctmmigrations "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint/migrations" - v0evmtypes "github.com/evmos/ethermint/x/evm/migrations/v0/types" - evmtypes "github.com/evmos/ethermint/x/evm/types" - feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" ) -func (app *EthermintApp) RegisterUpgradeHandlers(cdc codec.BinaryCodec, clientKeeper clientkeeper.Keeper) { - planName := "integration-test-upgrade" - // Set param key table for params module migration - for _, subspace := range app.ParamsKeeper.GetSubspaces() { - var keyTable paramstypes.KeyTable - switch subspace.Name() { - case authtypes.ModuleName: - keyTable = authtypes.ParamKeyTable() //nolint:staticcheck - case banktypes.ModuleName: - keyTable = banktypes.ParamKeyTable() //nolint:staticcheck - case stakingtypes.ModuleName: - keyTable = stakingtypes.ParamKeyTable() - case minttypes.ModuleName: - keyTable = minttypes.ParamKeyTable() //nolint:staticcheck - case distrtypes.ModuleName: - keyTable = distrtypes.ParamKeyTable() //nolint:staticcheck - case slashingtypes.ModuleName: - keyTable = slashingtypes.ParamKeyTable() //nolint:staticcheck - case govtypes.ModuleName: - keyTable = govv1.ParamKeyTable() //nolint:staticcheck - case crisistypes.ModuleName: - keyTable = crisistypes.ParamKeyTable() //nolint:staticcheck - case ibctransfertypes.ModuleName: - keyTable = ibctransfertypes.ParamKeyTable() - case evmtypes.ModuleName: - keyTable = v0evmtypes.ParamKeyTable() //nolint:staticcheck - case feemarkettypes.ModuleName: - keyTable = feemarkettypes.ParamKeyTable() - default: - continue - } - if !subspace.HasKeyTable() { - subspace.WithKeyTable(keyTable) - } - } - - baseAppLegacySS := app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()) - app.UpgradeKeeper.SetUpgradeHandler(planName, func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // OPTIONAL: prune expired tendermint consensus states to save storage space - if _, err := ibctmmigrations.PruneExpiredConsensusStates(ctx, cdc, clientKeeper); err != nil { - return nil, err - } - // explicitly update the IBC 02-client params, adding the localhost client type - params := clientKeeper.GetParams(ctx) - params.AllowedClients = append(params.AllowedClients, exported.Localhost) - clientKeeper.SetParams(ctx, params) - // Migrate Tendermint consensus parameters from x/params module to a dedicated x/consensus module. - baseapp.MigrateParams(ctx, baseAppLegacySS, &app.ConsensusParamsKeeper) - return app.mm.RunMigrations(ctx, app.configurator, fromVM) - }) - upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk() - if err != nil { - panic(fmt.Sprintf("failed to read upgrade info from disk %s", err)) - } - if !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) { - if upgradeInfo.Name == planName { - storeUpgrades := storetypes.StoreUpgrades{ - Added: []string{ - consensusparamtypes.StoreKey, - crisistypes.StoreKey, - }, - } - app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades)) - } - } +func (app *EthermintApp) RegisterUpgradeHandlers() { + planName := "sdk50" + app.UpgradeKeeper.SetUpgradeHandler(planName, + func(ctx context.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM) + }, + ) } diff --git a/app/utils.go b/app/utils.go index c5e2133224..88b9bb5713 100644 --- a/app/utils.go +++ b/app/utils.go @@ -20,51 +20,51 @@ import ( "math/rand" "time" + "cosmossdk.io/log" + sdkmath "cosmossdk.io/math" + abci "github.com/cometbft/cometbft/abci/types" + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/testutil/mock" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - tmtypes "github.com/cometbft/cometbft/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - ethermint "github.com/evmos/ethermint/types" - evmtypes "github.com/evmos/ethermint/x/evm/types" - - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/evmos/ethermint/crypto/ethsecp256k1" + "github.com/evmos/ethermint/encoding" + ethermint "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" ) type GenesisState map[string]json.RawMessage // DefaultConsensusParams defines the default Tendermint consensus params used in // EthermintApp testing. -var DefaultConsensusParams = &tmproto.ConsensusParams{ - Block: &tmproto.BlockParams{ +var DefaultConsensusParams = &cmtproto.ConsensusParams{ + Block: &cmtproto.BlockParams{ MaxBytes: 1048576, MaxGas: 81500000, // default limit }, - Evidence: &tmproto.EvidenceParams{ + Evidence: &cmtproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, // 3 weeks is the max duration MaxBytes: 10000, }, - Validator: &tmproto.ValidatorParams{ + Validator: &cmtproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, @@ -123,16 +123,27 @@ func SetupWithDBAndOpts( } // Initialize the chain - app.InitChain( - abci.RequestInitChain{ + consensusParams := DefaultConsensusParams + initialHeight := app.LastBlockHeight() + 1 + consensusParams.Abci = &cmtproto.ABCIParams{VoteExtensionsEnableHeight: initialHeight} + if _, err := app.InitChain( + &abci.RequestInitChain{ ChainId: ChainID, Validators: []abci.ValidatorUpdate{}, - ConsensusParams: DefaultConsensusParams, + ConsensusParams: consensusParams, AppStateBytes: stateBytes, + InitialHeight: initialHeight, }, - ) + ); err != nil { + panic(err) + } + } + if _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: app.LastBlockHeight() + 1, + Hash: app.LastCommitID().Hash, + }); err != nil { + panic(err) } - return app } @@ -225,7 +236,7 @@ func NewTestGenesisState(codec codec.Codec) GenesisState { acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) balance := banktypes.Balance{ Address: acc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))), + Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100000000000000))), } genesisState := NewDefaultGenesisState() @@ -246,7 +257,7 @@ func genesisStateWithValSet(codec codec.Codec, genesisState GenesisState, bondAmt := sdk.DefaultPowerReduction for _, val := range valSet.Validators { - pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) + pk, err := cryptocodec.FromCmtPubKeyInterface(val.PubKey) if err != nil { panic(err) } @@ -260,15 +271,16 @@ func genesisStateWithValSet(codec codec.Codec, genesisState GenesisState, Jailed: false, Status: stakingtypes.Bonded, Tokens: bondAmt, - DelegatorShares: sdk.OneDec(), + DelegatorShares: sdkmath.LegacyOneDec(), Description: stakingtypes.Description{}, UnbondingHeight: int64(0), UnbondingTime: time.Unix(0, 0).UTC(), - Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), - MinSelfDelegation: sdk.ZeroInt(), + Commission: stakingtypes.NewCommission(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()), + MinSelfDelegation: sdkmath.ZeroInt(), } validators = append(validators, validator) - delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) + delegation := stakingtypes.NewDelegation(genAccs[0].GetAddress().String(), sdk.ValAddress(val.Address).String(), sdkmath.LegacyOneDec()) + delegations = append(delegations, delegation) } // set validators and delegations stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) @@ -303,3 +315,10 @@ func genesisStateWithValSet(codec codec.Codec, genesisState GenesisState, return genesisState } + +func MakeConfigForTest() ethermint.EncodingConfig { + config := encoding.MakeConfig() + ModuleBasics.RegisterLegacyAminoCodec(config.Amino) + ModuleBasics.RegisterInterfaces(config.InterfaceRegistry) + return config +} diff --git a/client/keys/add.go b/client/keys/add.go index 16e28317f2..2d3fac29f0 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -272,7 +272,7 @@ func printCreate(cmd *cobra.Command, k *keyring.Record, showMnemonic bool, mnemo switch outputFormat { case OutputFormatText: cmd.PrintErrln() - if err := printKeyringRecord(cmd.OutOrStdout(), k, keyring.MkAccKeyOutput, outputFormat); err != nil { + if err := printKeyringRecord(cmd.OutOrStdout(), k, keys.MkAccKeyOutput, outputFormat); err != nil { return err } @@ -285,7 +285,7 @@ func printCreate(cmd *cobra.Command, k *keyring.Record, showMnemonic bool, mnemo } } case OutputFormatJSON: - out, err := keyring.MkAccKeyOutput(k) + out, err := keys.MkAccKeyOutput(k) if err != nil { return err } diff --git a/client/keys/utils.go b/client/keys/utils.go index fc36650224..3dbb41e496 100644 --- a/client/keys/utils.go +++ b/client/keys/utils.go @@ -22,6 +22,7 @@ import ( "sigs.k8s.io/yaml" + "github.com/cosmos/cosmos-sdk/client/keys" cryptokeyring "github.com/cosmos/cosmos-sdk/crypto/keyring" ) @@ -31,7 +32,7 @@ const ( OutputFormatJSON = "json" ) -type bechKeyOutFn func(k *cryptokeyring.Record) (cryptokeyring.KeyOutput, error) +type bechKeyOutFn func(k *cryptokeyring.Record) (keys.KeyOutput, error) func printKeyringRecord(w io.Writer, k *cryptokeyring.Record, bechKeyOut bechKeyOutFn, output string) error { ko, err := bechKeyOut(k) @@ -41,7 +42,7 @@ func printKeyringRecord(w io.Writer, k *cryptokeyring.Record, bechKeyOut bechKey switch output { case OutputFormatText: - if err := printTextRecords(w, []cryptokeyring.KeyOutput{ko}); err != nil { + if err := printTextRecords(w, []keys.KeyOutput{ko}); err != nil { return err } @@ -59,7 +60,7 @@ func printKeyringRecord(w io.Writer, k *cryptokeyring.Record, bechKeyOut bechKey return nil } -func printTextRecords(w io.Writer, kos []cryptokeyring.KeyOutput) error { +func printTextRecords(w io.Writer, kos []keys.KeyOutput) error { out, err := yaml.Marshal(&kos) if err != nil { return err diff --git a/client/testnet.go b/client/testnet.go index 080522d33c..7fcc568748 100644 --- a/client/testnet.go +++ b/client/testnet.go @@ -19,6 +19,7 @@ package client import ( "bufio" + "context" "encoding/json" "fmt" "net" @@ -33,11 +34,13 @@ import ( tmtime "github.com/cometbft/cometbft/types/time" "github.com/spf13/cobra" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/runtime" sdkserver "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" "github.com/cosmos/cosmos-sdk/testutil" @@ -324,12 +327,12 @@ func initTestnetFiles( valTokens := sdk.TokensFromConsensusPower(100, ethermint.PowerReduction) createValMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr), + addr.String(), valPubKeys[i], sdk.NewCoin(ethermint.AttoPhoton, valTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), - stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()), - sdk.OneInt(), + stakingtypes.NewCommissionRates(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()), + sdkmath.OneInt(), ) if err != nil { return err @@ -349,7 +352,7 @@ func initTestnetFiles( WithKeybase(kb). WithTxConfig(clientCtx.TxConfig) - if err := tx.Sign(txFactory, nodeDirName, txBuilder, true); err != nil { + if err := tx.Sign(context.Background(), txFactory, nodeDirName, txBuilder, true); err != nil { return err } @@ -378,6 +381,7 @@ func initTestnetFiles( err := collectGenFiles( clientCtx, nodeConfig, args.chainID, nodeIDs, valPubKeys, args.numValidators, args.outputDir, args.nodeDirPrefix, args.nodeDaemonHome, genBalIterator, + clientCtx.InterfaceRegistry.SigningContext().ValidatorAddressCodec(), ) if err != nil { return err @@ -471,6 +475,7 @@ func collectGenFiles( clientCtx client.Context, nodeConfig *tmconfig.Config, chainID string, nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, + valAddrCodec runtime.ValidatorAddressCodec, ) error { var appState json.RawMessage genTime := tmtime.Now() @@ -486,7 +491,7 @@ func collectGenFiles( nodeID, valPubKey := nodeIDs[i], valPubKeys[i] initCfg := genutiltypes.NewInitConfig(chainID, gentxsDir, nodeID, valPubKey) - genDoc, err := types.GenesisDocFromFile(nodeConfig.GenesisFile()) + genDoc, err := genutiltypes.AppGenesisFromFile(nodeConfig.GenesisFile()) if err != nil { return err } @@ -496,9 +501,10 @@ func collectGenFiles( clientCtx.TxConfig, nodeConfig, initCfg, - *genDoc, + genDoc, genBalIterator, genutiltypes.DefaultMessageValidator, + valAddrCodec, ) if err != nil { return err diff --git a/cmd/config/config.go b/cmd/config/config.go index 06f1623b3c..1e4583b2af 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -16,8 +16,8 @@ package config import ( + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - ethermint "github.com/evmos/ethermint/types" ) @@ -60,11 +60,11 @@ func SetBip44CoinType(config *sdk.Config) { // RegisterDenoms registers the base and display denominations to the SDK. func RegisterDenoms() { - if err := sdk.RegisterDenom(DisplayDenom, sdk.OneDec()); err != nil { + if err := sdk.RegisterDenom(DisplayDenom, sdkmath.LegacyOneDec()); err != nil { panic(err) } - if err := sdk.RegisterDenom(ethermint.AttoPhoton, sdk.NewDecWithPrec(1, ethermint.BaseDenomUnit)); err != nil { + if err := sdk.RegisterDenom(ethermint.AttoPhoton, sdkmath.LegacyNewDecWithPrec(1, ethermint.BaseDenomUnit)); err != nil { panic(err) } } diff --git a/cmd/ethermintd/genaccounts.go b/cmd/ethermintd/genaccounts.go index 046213b58d..c3609ceb81 100644 --- a/cmd/ethermintd/genaccounts.go +++ b/cmd/ethermintd/genaccounts.go @@ -111,7 +111,10 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa baseAccount := authtypes.NewBaseAccount(addr, nil, 0, 0) if !vestingAmt.IsZero() { - baseVestingAccount := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + baseVestingAccount, err := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) + if err != nil { + return fmt.Errorf("failed to create base vesting account: %w", err) + } if (balances.Coins.IsZero() && !baseVestingAccount.OriginalVesting.IsZero()) || baseVestingAccount.OriginalVesting.IsAnyGT(balances.Coins) { diff --git a/cmd/ethermintd/main.go b/cmd/ethermintd/main.go index fd9d7e8b21..b569386a53 100644 --- a/cmd/ethermintd/main.go +++ b/cmd/ethermintd/main.go @@ -16,9 +16,9 @@ package main import ( + "fmt" "os" - "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" sdk "github.com/cosmos/cosmos-sdk/types" @@ -33,13 +33,8 @@ func main() { rootCmd, _ := NewRootCmd() if err := svrcmd.Execute(rootCmd, EnvPrefix, app.DefaultNodeHome); err != nil { - switch e := err.(type) { - case server.ErrorCode: - os.Exit(e.Code) - - default: - os.Exit(1) - } + fmt.Fprintln(rootCmd.OutOrStderr(), err) + os.Exit(1) } } diff --git a/cmd/ethermintd/root.go b/cmd/ethermintd/root.go index c248978682..5c2e56017b 100644 --- a/cmd/ethermintd/root.go +++ b/cmd/ethermintd/root.go @@ -22,34 +22,38 @@ import ( "github.com/spf13/cobra" - dbm "github.com/cometbft/cometbft-db" - tmcfg "github.com/cometbft/cometbft/config" - tmcli "github.com/cometbft/cometbft/libs/cli" - tmlog "github.com/cometbft/cometbft/libs/log" + cmtlog "cosmossdk.io/log" + confixcmd "cosmossdk.io/tools/confix/cmd" + cmtcfg "github.com/cometbft/cometbft/config" + cmtcli "github.com/cometbft/cometbft/libs/cli" + dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/x/auth/tx" + txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/config" + clientcfg "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/client/snapshot" + "github.com/cosmos/cosmos-sdk/crypto/keyring" sdkserver "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cosmos/cosmos-sdk/types/tx/signing" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - - rosettaCmd "cosmossdk.io/tools/rosetta/cmd" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + rosettaCmd "github.com/cosmos/rosetta/cmd" "github.com/evmos/ethermint/app" ethermintclient "github.com/evmos/ethermint/client" "github.com/evmos/ethermint/client/debug" "github.com/evmos/ethermint/crypto/hd" - "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/ethereum/eip712" "github.com/evmos/ethermint/server" servercfg "github.com/evmos/ethermint/server/config" @@ -59,10 +63,15 @@ import ( const EnvPrefix = "ETHERMINT" +type emptyAppOptions struct{} + +func (ao emptyAppOptions) Get(_ string) interface{} { return nil } + // NewRootCmd creates a new root command for simd. It is called once in the // main function. func NewRootCmd() (*cobra.Command, ethermint.EncodingConfig) { - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + tempApp := app.NewEthermintApp(cmtlog.NewNopLogger(), dbm.NewMemDB(), nil, true, emptyAppOptions{}) + encodingConfig := app.MakeConfigForTest() initClientCtx := client.Context{}. WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). @@ -90,11 +99,29 @@ func NewRootCmd() (*cobra.Command, ethermint.EncodingConfig) { return err } - initClientCtx, err = config.ReadFromClientConfig(initClientCtx) + initClientCtx, err = clientcfg.ReadFromClientConfig(initClientCtx) if err != nil { return err } + // This needs to go after ReadFromClientConfig, as that function + // sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode + // is only available if the client is online. + if !initClientCtx.Offline { + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL), + TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx), + } + txConfig, err := tx.NewTxConfigWithOptions( + initClientCtx.Codec, + txConfigOpts, + ) + if err != nil { + return err + } + + initClientCtx = initClientCtx.WithTxConfig(txConfig) + } if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { return err } @@ -102,7 +129,7 @@ func NewRootCmd() (*cobra.Command, ethermint.EncodingConfig) { // FIXME: replace AttoPhoton with bond denom customAppTemplate, customAppConfig := servercfg.AppConfig(ethermint.AttoPhoton) - return sdkserver.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, tmcfg.DefaultConfig()) + return sdkserver.InterceptConfigsPreRunHandler(cmd, customAppTemplate, customAppConfig, cmtcfg.DefaultConfig()) }, } @@ -117,16 +144,18 @@ func NewRootCmd() (*cobra.Command, ethermint.EncodingConfig) { ethermintclient.ValidateChainID( genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), ), - genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, genutiltypes.DefaultMessageValidator), - genutilcli.MigrateGenesisCmd(), // TODO: shouldn't this include the local app version instead of the SDK? - genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), + genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, genutiltypes.DefaultMessageValidator, + encodingConfig.TxConfig.SigningContext().ValidatorAddressCodec()), + genutilcli.MigrateGenesisCmd(genutilcli.MigrationMap), // TODO: shouldn't this include the local app version instead of the SDK? + genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, + encodingConfig.TxConfig.SigningContext().ValidatorAddressCodec()), genutilcli.ValidateGenesisCmd(app.ModuleBasics), AddGenesisAccountCmd(app.DefaultNodeHome), - tmcli.NewCompletionCmd(rootCmd, true), + cmtcli.NewCompletionCmd(rootCmd, true), ethermintclient.NewTestnetCmd(app.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), - config.Cmd(), - pruning.PruningCmd(a.newApp), + confixcmd.ConfigCommand(), + pruning.Cmd(a.newApp, app.DefaultNodeHome), snapshot.Cmd(a.newApp), ) @@ -134,7 +163,7 @@ func NewRootCmd() (*cobra.Command, ethermint.EncodingConfig) { // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( - rpc.StatusCommand(), + sdkserver.StatusCommand(), queryCommand(), txCommand(), ethermintclient.KeyCommands(app.DefaultNodeHome), @@ -148,6 +177,13 @@ func NewRootCmd() (*cobra.Command, ethermint.EncodingConfig) { // add rosetta rootCmd.AddCommand(rosettaCmd.RosettaCommand(encodingConfig.InterfaceRegistry, encodingConfig.Codec)) + autoCliOpts := tempApp.AutoCliOpts() + initClientCtx, _ = clientcfg.ReadDefaultValuesFromDefaultClientConfig(initClientCtx) + autoCliOpts.Keyring, _ = keyring.NewAutoCLIKeyring(initClientCtx.Keyring) + autoCliOpts.ClientCtx = initClientCtx + if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { + panic(err) + } return rootCmd, encodingConfig } @@ -166,15 +202,13 @@ func queryCommand() *cobra.Command { } cmd.AddCommand( - authcmd.GetAccountCmd(), rpc.ValidatorCommand(), - rpc.BlockCommand(), + sdkserver.QueryBlockCmd(), + sdkserver.QueryBlockResultsCmd(), authcmd.QueryTxsByEventsCmd(), authcmd.QueryTxCmd(), rpc.QueryEventForTxCmd(), ) - - app.ModuleBasics.AddQueryCommands(cmd) cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd @@ -198,10 +232,9 @@ func txCommand() *cobra.Command { authcmd.GetBroadcastCommand(), authcmd.GetEncodeCommand(), authcmd.GetDecodeCommand(), - authcmd.GetAuxToFeeCommand(), + authcmd.GetSimulateCmd(), ) - app.ModuleBasics.AddTxCommands(cmd) cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID") return cmd @@ -212,7 +245,7 @@ type appCreator struct { } // newApp is an appCreator -func (a appCreator) newApp(logger tmlog.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { +func (a appCreator) newApp(logger cmtlog.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { baseappOptions := sdkserver.DefaultBaseappOptions(appOpts) ethermintApp := app.NewEthermintApp( logger, db, traceStore, true, @@ -222,10 +255,10 @@ func (a appCreator) newApp(logger tmlog.Logger, db dbm.DB, traceStore io.Writer, return ethermintApp } -// appExport creates a new simapp (optionally at a given height) +// appExport creates a new app (optionally at a given height) // and exports state. func (a appCreator) appExport( - logger tmlog.Logger, + logger cmtlog.Logger, db dbm.DB, traceStore io.Writer, height int64, diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 4c121748da..11d8e9b3b7 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -1136,7 +1136,7 @@ Query defines the gRPC querier service. ### EthAccount -EthAccount implements the authtypes.AccountI interface and embeds an +EthAccount implements the sdk.AccountI interface and embeds an authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. diff --git a/encoding/codec/codec.go b/encoding/codec/codec.go index e2e92caf7b..ab7c47ded6 100644 --- a/encoding/codec/codec.go +++ b/encoding/codec/codec.go @@ -20,7 +20,6 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/std" sdk "github.com/cosmos/cosmos-sdk/types" - cryptocodec "github.com/evmos/ethermint/crypto/codec" ethermint "github.com/evmos/ethermint/types" ) diff --git a/encoding/config.go b/encoding/config.go index 7f504b4d25..7b836b09bf 100644 --- a/encoding/config.go +++ b/encoding/config.go @@ -16,31 +16,65 @@ package encoding import ( + "cosmossdk.io/x/tx/signing" amino "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/types/module" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" "github.com/cosmos/cosmos-sdk/x/auth/tx" - + gogoproto "github.com/cosmos/gogoproto/proto" + "github.com/ethereum/go-ethereum/common" enccodec "github.com/evmos/ethermint/encoding/codec" ethermint "github.com/evmos/ethermint/types" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" ) -// MakeConfig creates an EncodingConfig for testing -func MakeConfig(mb module.BasicManager) ethermint.EncodingConfig { +var InterfaceRegistry types.InterfaceRegistry + +func customGetSignerFn(path string) func(msg proto.Message) ([][]byte, error) { + return func(msg proto.Message) ([][]byte, error) { + m := msg.ProtoReflect() + fieldDesc := m.Descriptor().Fields().ByName(protoreflect.Name(path)) + addr := common.BytesToAddress((m.Get(fieldDesc).Bytes())) + signer := sdk.AccAddress(addr.Bytes()) + return [][]byte{signer}, nil + } +} + +// MakeConfig creates an EncodingConfig +func MakeConfig() ethermint.EncodingConfig { cdc := amino.NewLegacyAmino() - interfaceRegistry := types.NewInterfaceRegistry() + signingOptions := signing.Options{ + AddressCodec: address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32AccountAddrPrefix(), + }, + ValidatorAddressCodec: address.Bech32Codec{ + Bech32Prefix: sdk.GetConfig().GetBech32ValidatorAddrPrefix(), + }, + CustomGetSigners: map[protoreflect.FullName]signing.GetSignersFunc{ + "ethermint.evm.v1.MsgEthereumTx": customGetSignerFn("from"), + }, + } + interfaceRegistry, err := types.NewInterfaceRegistryWithOptions(types.InterfaceRegistryOptions{ + ProtoFiles: gogoproto.HybridResolver, + SigningOptions: signingOptions, + }) + if err != nil { + panic(err) + } codec := amino.NewProtoCodec(interfaceRegistry) - encodingConfig := ethermint.EncodingConfig{ InterfaceRegistry: interfaceRegistry, Codec: codec, TxConfig: tx.NewTxConfig(codec, tx.DefaultSignModes), Amino: cdc, } - - enccodec.RegisterLegacyAminoCodec(encodingConfig.Amino) - mb.RegisterLegacyAminoCodec(encodingConfig.Amino) + enccodec.RegisterLegacyAminoCodec(cdc) enccodec.RegisterInterfaces(encodingConfig.InterfaceRegistry) - mb.RegisterInterfaces(encodingConfig.InterfaceRegistry) + // This is needed for the EIP712 txs because currently is using + // the deprecated method legacytx.StdSignBytes + legacytx.RegressionTestingAminoCodec = cdc return encodingConfig } diff --git a/encoding/config_test.go b/encoding/config_test.go index ddda5cb4fb..357064c6d6 100644 --- a/encoding/config_test.go +++ b/encoding/config_test.go @@ -9,7 +9,6 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/evmos/ethermint/app" - "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/tests" evmtypes "github.com/evmos/ethermint/x/evm/types" ) @@ -25,7 +24,7 @@ func TestTxEncoding(t *testing.T) { err := msg.Sign(ethSigner, signer) require.NoError(t, err) - cfg := encoding.MakeConfig(app.ModuleBasics) + cfg := app.MakeConfigForTest() _, err = cfg.TxConfig.TxEncoder()(msg) require.Error(t, err, "encoding failed") diff --git a/ethereum/eip712/eip712_legacy.go b/ethereum/eip712/eip712_legacy.go index d0f432c192..e093065ee2 100644 --- a/ethereum/eip712/eip712_legacy.go +++ b/ethereum/eip712/eip712_legacy.go @@ -382,7 +382,7 @@ var ( addressType = reflect.TypeOf(common.Address{}) bigIntType = reflect.TypeOf(big.Int{}) cosmIntType = reflect.TypeOf(sdkmath.Int{}) - cosmDecType = reflect.TypeOf(sdk.Dec{}) + cosmDecType = reflect.TypeOf(sdkmath.LegacyDec{}) timeType = reflect.TypeOf(time.Time{}) cosmosAnyType = reflect.TypeOf(&codectypes.Any{}) edType = reflect.TypeOf(ed25519.PubKey{}) diff --git a/ethereum/eip712/eip712_test.go b/ethereum/eip712/eip712_test.go index 451bea4306..6d9a39b3f3 100644 --- a/ethereum/eip712/eip712_test.go +++ b/ethereum/eip712/eip712_test.go @@ -6,33 +6,30 @@ import ( "testing" "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/signer/core/apitypes" - "github.com/evmos/ethermint/ethereum/eip712" "github.com/tidwall/gjson" "github.com/tidwall/sjson" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/crypto/ethsecp256k1" txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/evmos/ethermint/app" - "github.com/evmos/ethermint/cmd/config" - "github.com/evmos/ethermint/encoding" - "github.com/evmos/ethermint/testutil" - evmtypes "github.com/evmos/ethermint/x/evm/types" - distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/evmos/ethermint/cmd/config" + "github.com/evmos/ethermint/ethereum/eip712" + "github.com/evmos/ethermint/testutil" ethermint "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/suite" ) @@ -70,7 +67,7 @@ func TestEIP712TestSuite(t *testing.T) { } func (suite *EIP712TestSuite) SetupTest() { - suite.config = encoding.MakeConfig(app.ModuleBasics) + suite.config = app.MakeConfigForTest() suite.clientCtx = client.Context{}.WithTxConfig(suite.config.TxConfig) suite.denom = evmtypes.DefaultEVMDenom @@ -164,8 +161,8 @@ func (suite *EIP712TestSuite) TestEIP712() { title: "Succeeds - Standard MsgDelegate", msgs: []sdk.Msg{ stakingtypes.NewMsgDelegate( - suite.createTestAddress(), - sdk.ValAddress(suite.createTestAddress()), + suite.createTestAddress().String(), + sdk.ValAddress(suite.createTestAddress()).String(), suite.makeCoins(suite.denom, math.NewInt(1))[0], ), }, @@ -175,8 +172,8 @@ func (suite *EIP712TestSuite) TestEIP712() { title: "Succeeds - Standard MsgWithdrawDelegationReward", msgs: []sdk.Msg{ distributiontypes.NewMsgWithdrawDelegatorReward( - suite.createTestAddress(), - sdk.ValAddress(suite.createTestAddress()), + suite.createTestAddress().String(), + sdk.ValAddress(suite.createTestAddress()).String(), ), }, expectSuccess: true, @@ -185,13 +182,13 @@ func (suite *EIP712TestSuite) TestEIP712() { title: "Succeeds - Two Single-Signer MsgDelegate", msgs: []sdk.Msg{ stakingtypes.NewMsgDelegate( - params.address, - sdk.ValAddress(suite.createTestAddress()), + params.address.String(), + sdk.ValAddress(suite.createTestAddress()).String(), suite.makeCoins(suite.denom, math.NewInt(1))[0], ), stakingtypes.NewMsgDelegate( - params.address, - sdk.ValAddress(suite.createTestAddress()), + params.address.String(), + sdk.ValAddress(suite.createTestAddress()).String(), suite.makeCoins(suite.denom, math.NewInt(5))[0], ), }, @@ -291,8 +288,8 @@ func (suite *EIP712TestSuite) TestEIP712() { { title: "Fails - Single Message / Multi-Signer", msgs: []sdk.Msg{ - banktypes.NewMsgMultiSend( - []banktypes.Input{ + &banktypes.MsgMultiSend{ + Inputs: []banktypes.Input{ banktypes.NewInput( suite.createTestAddress(), suite.makeCoins(suite.denom, math.NewInt(50)), @@ -302,7 +299,7 @@ func (suite *EIP712TestSuite) TestEIP712() { suite.makeCoins(suite.denom, math.NewInt(50)), ), }, - []banktypes.Output{ + Outputs: []banktypes.Output{ banktypes.NewOutput( suite.createTestAddress(), suite.makeCoins(suite.denom, math.NewInt(50)), @@ -312,12 +309,11 @@ func (suite *EIP712TestSuite) TestEIP712() { suite.makeCoins(suite.denom, math.NewInt(50)), ), }, - ), + }, }, expectSuccess: false, }, } - for _, tc := range testCases { for _, signMode := range signModes { suite.Run(tc.title, func() { @@ -364,7 +360,9 @@ func (suite *EIP712TestSuite) TestEIP712() { Address: sdk.MustBech32ifyAddressBytes(config.Bech32Prefix, pubKey.Bytes()), } - bz, err := suite.clientCtx.TxConfig.SignModeHandler().GetSignBytes( + bz, err := authsigning.GetSignBytesAdapter( + suite.clientCtx.CmdContext, + suite.clientCtx.TxConfig.SignModeHandler(), signMode, signerData, txBuilder.GetTx(), @@ -427,7 +425,6 @@ func (suite *EIP712TestSuite) verifyEIP712SignatureVerification(expectedSuccess func (suite *EIP712TestSuite) verifySignDocFlattening(signDoc []byte) { payload := gjson.ParseBytes(signDoc) suite.Require().True(payload.IsObject()) - flattened, _, err := eip712.FlattenPayloadMessages(payload) suite.Require().NoError(err) @@ -452,17 +449,20 @@ func (suite *EIP712TestSuite) verifyPayloadMapAgainstFlattenedMap(original map[s suite.Require().True(ok) messages, ok := interfaceMessages.([]interface{}) - suite.Require().True(ok) - - // Verify message contents - for i, msg := range messages { - flattenedMsg, ok := flattened[fmt.Sprintf("msg%d", i)] - suite.Require().True(ok) - - flattenedMsgJSON, ok := flattenedMsg.(map[string]interface{}) - suite.Require().True(ok) - - suite.Require().Equal(flattenedMsgJSON, msg) + // If passing an empty msgs array + // the interfaceMessages is nil + // in that case, don't try to iterate the messages + if ok { + // Verify message contents + for i, msg := range messages { + flattenedMsg, ok := flattened[fmt.Sprintf("msg%d", i)] + suite.Require().True(ok) + + flattenedMsgJSON, ok := flattenedMsg.(map[string]interface{}) + suite.Require().True(ok) + + suite.Require().Equal(flattenedMsgJSON, msg) + } } // Verify new payload does not have msgs field diff --git a/ethereum/eip712/encoding.go b/ethereum/eip712/encoding.go index 9b270e84a0..7dc2eba207 100644 --- a/ethereum/eip712/encoding.go +++ b/ethereum/eip712/encoding.go @@ -189,8 +189,6 @@ func decodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { Gas: authInfo.Fee.GasLimit, } - tip := authInfo.Tip - // WrapTxToTypedData expects the payload as an Amino Sign Doc signBytes := legacytx.StdSignBytes( signDoc.ChainId, @@ -200,7 +198,6 @@ func decodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { *stdFee, msgs, body.Memo, - tip, ) typedData, err := WrapTxToTypedData( @@ -234,16 +231,20 @@ func validatePayloadMessages(msgs []sdk.Msg) error { var msgSigner sdk.AccAddress for i, m := range msgs { - if len(m.GetSigners()) != 1 { + signers, _, err := protoCodec.GetMsgV1Signers(m) + if err != nil { + return fmt.Errorf("error getting signers. %w", err) + } + if len(signers) != 1 { return errors.New("unable to build EIP-712 payload: expect exactly 1 signer") } if i == 0 { - msgSigner = m.GetSigners()[0] + msgSigner = signers[0] continue } - if !msgSigner.Equals(m.GetSigners()[0]) { + if !msgSigner.Equals(sdk.AccAddress(signers[0])) { return errors.New("unable to build EIP-712 payload: multiple signers detected") } } diff --git a/ethereum/eip712/encoding_legacy.go b/ethereum/eip712/encoding_legacy.go index f568b1f68d..a0ef1b00e5 100644 --- a/ethereum/eip712/encoding_legacy.go +++ b/ethereum/eip712/encoding_legacy.go @@ -103,7 +103,11 @@ func legacyDecodeAminoSignDoc(signDocBytes []byte) (apitypes.TypedData, error) { msg := msgs[0] // By convention, the fee payer is the first address in the list of signers. - feePayer := msg.GetSigners()[0] + signers, _, err := protoCodec.GetMsgV1Signers(msg) + if err != nil { + return apitypes.TypedData{}, err + } + feePayer := signers[0] feeDelegation := &FeeDelegationOptions{ FeePayer: feePayer, } @@ -188,13 +192,15 @@ func legacyDecodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error Gas: authInfo.Fee.GasLimit, } - feePayer := msg.GetSigners()[0] + signers, _, err := protoCodec.GetMsgV1Signers(msg) + if err != nil { + return apitypes.TypedData{}, err + } + feePayer := signers[0] feeDelegation := &FeeDelegationOptions{ FeePayer: feePayer, } - tip := authInfo.Tip - // WrapTxToTypedData expects the payload as an Amino Sign Doc signBytes := legacytx.StdSignBytes( signDoc.ChainId, @@ -204,7 +210,6 @@ func legacyDecodeProtobufSignDoc(signDocBytes []byte) (apitypes.TypedData, error *stdFee, msgs, body.Memo, - tip, ) typedData, err := LegacyWrapTxToTypedData( @@ -237,13 +242,17 @@ func legacyValidatePayloadMessages(msgs []sdk.Msg) error { return err } - if len(m.GetSigners()) != 1 { + signers, _, err := protoCodec.GetMsgV1Signers(m) + if err != nil { + return err + } + if len(signers) != 1 { return errors.New("unable to build EIP-712 payload: expect exactly 1 signer") } if i == 0 { msgType = t - msgSigner = m.GetSigners()[0] + msgSigner = signers[0] continue } @@ -251,7 +260,7 @@ func legacyValidatePayloadMessages(msgs []sdk.Msg) error { return errors.New("unable to build EIP-712 payload: different types of messages detected") } - if !msgSigner.Equals(m.GetSigners()[0]) { + if !msgSigner.Equals(sdk.AccAddress(signers[0])) { return errors.New("unable to build EIP-712 payload: multiple signers detected") } } diff --git a/ethereum/eip712/message.go b/ethereum/eip712/message.go index 0180857be0..6be82bcd2e 100644 --- a/ethereum/eip712/message.go +++ b/ethereum/eip712/message.go @@ -113,6 +113,10 @@ func getPayloadMessages(payload gjson.Result) ([]gjson.Result, error) { return nil, errorsmod.Wrap(errortypes.ErrInvalidRequest, "no messages found in payload, unable to parse") } + if rawMsgs.Type == gjson.Null { + return []gjson.Result{}, nil + } + if !rawMsgs.IsArray() { return nil, errorsmod.Wrap(errortypes.ErrInvalidRequest, "expected type array of messages, cannot parse") } diff --git a/go.mod b/go.mod index 1b00c0cdeb..2e08090299 100644 --- a/go.mod +++ b/go.mod @@ -1,95 +1,110 @@ module github.com/evmos/ethermint -go 1.19 +go 1.21 + +toolchain go1.21.5 require ( - cosmossdk.io/api v0.3.1 - cosmossdk.io/errors v1.0.0 - cosmossdk.io/math v1.1.2 - cosmossdk.io/tools/rosetta v0.2.1 - github.com/armon/go-metrics v0.4.1 + cosmossdk.io/api v0.7.3 + cosmossdk.io/client/v2 v2.0.0-beta.1 + cosmossdk.io/core v0.11.0 + cosmossdk.io/errors v1.0.1 + cosmossdk.io/log v1.3.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/store v1.0.2 + cosmossdk.io/tools/confix v0.1.1 + cosmossdk.io/x/evidence v0.1.0 + cosmossdk.io/x/feegrant v0.1.0 + cosmossdk.io/x/tx v0.13.1 + cosmossdk.io/x/upgrade v0.1.1 github.com/btcsuite/btcd v0.23.4 github.com/btcsuite/btcd/btcutil v1.1.3 - github.com/cometbft/cometbft v0.37.2 - github.com/cometbft/cometbft-db v0.8.0 - github.com/cosmos/cosmos-proto v1.0.0-beta.2 - github.com/cosmos/cosmos-sdk v0.47.4 + github.com/cometbft/cometbft v0.38.6 + github.com/cosmos/cosmos-db v1.0.2 + github.com/cosmos/cosmos-proto v1.0.0-beta.4 + github.com/cosmos/cosmos-sdk v0.50.5-0.20240318121607-9a59234c4202 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.3.0 - github.com/davecgh/go-spew v1.1.1 + github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/cosmos/ibc-go/v8 v8.1.0 + github.com/cosmos/rosetta v0.50.3-1 + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/ethereum/go-ethereum v1.10.26 github.com/gogo/protobuf v1.3.2 - github.com/golang/protobuf v1.5.3 - github.com/gorilla/mux v1.8.0 - github.com/gorilla/websocket v1.5.0 + github.com/golang/protobuf v1.5.4 + github.com/gorilla/mux v1.8.1 + github.com/gorilla/websocket v1.5.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/hashicorp/go-metrics v0.5.3 github.com/improbable-eng/grpc-web v0.15.0 github.com/onsi/ginkgo/v2 v2.7.0 github.com/onsi/gomega v1.26.0 github.com/pkg/errors v0.9.1 - github.com/rs/cors v1.8.3 - github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.7.0 - github.com/spf13/viper v1.16.0 + github.com/rs/cors v1.10.1 + github.com/spf13/cast v1.6.0 + github.com/spf13/cobra v1.8.0 + github.com/spf13/viper v1.18.2 github.com/status-im/keycard-go v0.2.0 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/tidwall/btree v1.7.0 github.com/tidwall/gjson v1.14.4 github.com/tidwall/sjson v1.2.5 github.com/tyler-smith/go-bip39 v1.1.0 - golang.org/x/net v0.15.0 - golang.org/x/sync v0.2.0 - golang.org/x/text v0.13.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 - google.golang.org/grpc v1.57.0 - sigs.k8s.io/yaml v1.3.0 + golang.org/x/net v0.21.0 + golang.org/x/sync v0.6.0 + golang.org/x/text v0.14.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 + google.golang.org/grpc v1.62.0 + google.golang.org/protobuf v1.33.0 + sigs.k8s.io/yaml v1.4.0 ) require ( - cloud.google.com/go v0.110.4 // indirect - cloud.google.com/go/compute v1.20.1 // indirect + cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.0 // indirect - cloud.google.com/go/storage v1.30.1 // indirect - cosmossdk.io/core v0.5.1 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.36.0 // indirect + cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/log v1.2.1 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect - github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect - github.com/DataDog/zstd v1.5.2 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/allegro/bigcache v1.2.1 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/bits-and-blooms/bitset v1.8.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect - github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230807182518-7bcdd55ef1e3 // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect - github.com/confio/ics23/go v0.9.0 // indirect + github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.20.1 // indirect + github.com/cosmos/iavl v1.0.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect - github.com/creachadair/taskgroup v0.4.2 // indirect - github.com/danieljoos/wincred v1.1.2 // indirect + github.com/creachadair/atomicfile v0.3.1 // indirect + github.com/creachadair/tomledit v0.0.24 // indirect + github.com/danieljoos/wincred v1.2.0 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect @@ -97,91 +112,97 @@ require ( github.com/dlclark/regexp2 v1.7.0 // indirect github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect - github.com/getsentry/sentry-go v0.23.0 // indirect - github.com/go-kit/kit v0.12.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect - github.com/google/s2a-go v0.1.4 // indirect - github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.11.0 // indirect - github.com/gorilla/handlers v1.5.1 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/gorilla/handlers v1.5.2 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/gtank/merlin v0.1.1 // indirect - github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-getter v1.7.3 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.1.0 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/huin/goupnp v1.0.3 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.4 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.14.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect - github.com/rakyll/statik v0.1.7 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.47.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/zerolog v1.30.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/zerolog v1.32.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/match v1.1.1 // indirect @@ -189,35 +210,40 @@ require ( github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.7 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect - golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.126.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/protobuf v1.31.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/oauth2 v0.17.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.18.0 // indirect + google.golang.org/api v0.162.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - nhooyr.io/websocket v1.8.6 // indirect - pgregory.net/rapid v0.5.5 // indirect + gotest.tools/v3 v3.5.1 // indirect + nhooyr.io/websocket v1.8.10 // indirect + pgregory.net/rapid v1.1.0 // indirect ) replace ( // use cosmos keyring github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 - github.com/cometbft/cometbft => github.com/cometbft/cometbft v0.37.2-0.20230905115601-790d57e1748f - github.com/cometbft/cometbft-db => github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63 - github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20231013072415-eec017435467 + github.com/cockroachdb/pebble => github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e // Fix upstream GHSA-h395-qcrw-5vmq vulnerability. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 diff --git a/go.sum b/go.sum index e6a6140b71..b2c472bda2 100644 --- a/go.sum +++ b/go.sum @@ -3,7 +3,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,7 +15,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -32,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= -cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,8 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -111,8 +109,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -170,12 +168,11 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -187,36 +184,55 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= -cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= -cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= -cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +cosmossdk.io/api v0.7.3 h1:V815i8YOwOAQa1rLCsSMjVG5Gnzs02JLq+l7ks8s1jk= +cosmossdk.io/api v0.7.3/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= +cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= +cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= +cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= +cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= +cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= -cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= -cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= -cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= -cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= -cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= -cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= -cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= +cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= +cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/tools/confix v0.1.1 h1:aexyRv9+y15veH3Qw16lxQwo+ki7r2I+g0yNTEFEQM8= +cosmossdk.io/tools/confix v0.1.1/go.mod h1:nQVvP1tHsGXS83PonPVWJtSbddIqyjEw99L4M3rPJyQ= +cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= +cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= +cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= +cosmossdk.io/x/evidence v0.1.0/go.mod h1:hTaiiXsoiJ3InMz1uptgF0BnGqROllAN8mwisOMMsfw= +cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= +cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= +cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= +cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= +github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= @@ -228,6 +244,7 @@ github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNu github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -244,16 +261,15 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= -github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= -github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= +github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -263,6 +279,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= +github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= @@ -288,15 +306,17 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= +github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -325,26 +345,30 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= -github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= -github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= +github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230807182518-7bcdd55ef1e3 h1:vOeEsidq7kuzHhMf0ifGL/wMaq0bloDKHVX5QJPtl/U= -github.com/cockroachdb/pebble v0.0.0-20230807182518-7bcdd55ef1e3/go.mod h1:9lRMC4XN3/BLPtIp6kAKwIaHu369NOf2rMucPzipz50= +github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= +github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.2-0.20230905115601-790d57e1748f h1:1v8Q8r5RJhYzxgLY9CpkIQ1dsOpOn5gNLka01kA6C7s= -github.com/cometbft/cometbft v0.37.2-0.20230905115601-790d57e1748f/go.mod h1:gC4iJBO09opzl1pLiPl4fYWn8rRrfO713rRM5tZn5E4= -github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= -github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= +github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= +github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= +github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -353,56 +377,63 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= -github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= +github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= +github.com/cosmos/cosmos-sdk v0.50.5-0.20240318121607-9a59234c4202 h1:rQbmfBwvL4PUdRbyor+Ro3WrX1MxjgOIexf5fct6iIQ= +github.com/cosmos/cosmos-sdk v0.50.5-0.20240318121607-9a59234c4202/go.mod h1:VAp+d9UcrbMZyZPetVZBOTQj/lNAOrcD2ADGoFCChCA= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= -github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= -github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.3.0 h1:QtGeVMi/3JeLWuvEuC60sBHpAF40Oenx/y+bP8+wRRw= -github.com/cosmos/ibc-go/v7 v7.3.0/go.mod h1:mUmaHFXpXrEdcxfdXyau+utZf14pGKVUiXwYftRZZfQ= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= +github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= +github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= +github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= +github.com/cosmos/ibc-go/v8 v8.1.0 h1:pf1106wl0Cf+p1+FjXzV6odlS9DnqVunPVWCH1Uz+lQ= +github.com/cosmos/ibc-go/v8 v8.1.0/go.mod h1:o1ipS95xpdjqNcB8Drq0eI3Sn4FRLigjll42ec1ECuU= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= -github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cosmos/rosetta v0.50.3-1 h1:tqBTfS2I+SIT28zmlKHV/87qPELYrj5Dr5Z68EJvvzs= +github.com/cosmos/rosetta v0.50.3-1/go.mod h1:aayFO1rJpgOENMJPTm5TKJ8S8wIZoIfDjPot9xkMS5k= github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= -github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= +github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= +github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= +github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63 h1:R1QJ9a3XdYMSKo+1RdFifxb/g3lNypC52L/rpYrWoKo= -github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63/go.mod h1:rocwIfnS+kA060x64gkSIRvWB9StSppIkJuo5MWzL24= -github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20231013072415-eec017435467 h1:m0/aHPIJAzi2MSP3TXzzbLTFf+koRFQiaYmerRZUtK4= -github.com/crypto-org-chain/cosmos-sdk v0.46.0-beta2.0.20231013072415-eec017435467/go.mod h1:G384omH7cXgm90xXR7xpHvsKG7vdBaDuz4To6GpTHUU= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e h1:vnyepPQ/m25+19xcTuBUdRxmltZ/EjVWNqEjhg7Ummk= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20231207063621-43cf32d91c3e/go.mod h1:+a8pUj1tOyJ2RinsNQD4326YS+leSoKGiG/uVVb0x6Y= -github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= -github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= +github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= @@ -419,7 +450,9 @@ github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwu github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 h1:kgvzE5wLsLa7XKfV85VZl40QXaMCaeFtHpPwJ8fhotY= github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= @@ -429,13 +462,15 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -447,37 +482,44 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= +github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= -github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU= +github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -485,28 +527,25 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -524,9 +563,10 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -561,8 +601,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -586,17 +626,20 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -608,24 +651,24 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -635,52 +678,53 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= -github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.3 h1:bN2+Fw9XPFvOCjB0UOevFIMICZ7G2XSQHzfvLUyOM5E= +github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -688,24 +732,27 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= -github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= +github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= +github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= @@ -719,6 +766,8 @@ github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmK github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= @@ -731,7 +780,8 @@ github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7Bd github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -747,7 +797,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -762,11 +811,10 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -778,16 +826,16 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.4 h1:ZMsBpPpJNtRLHiKKp0mI7gW+NT4s7UgfD5xHxx1jVRo= -github.com/linxGnu/grocksdb v1.8.4/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -795,6 +843,7 @@ github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3v github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -803,19 +852,15 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -832,12 +877,11 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -854,8 +898,13 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= @@ -864,6 +913,7 @@ github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.7.0 h1:/XxtEV3I3Eif/HobnVx9YmJgk8ENdRsuUmM+fLCFNow= github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -874,8 +924,11 @@ github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -885,30 +938,32 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= -github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= -github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -916,34 +971,32 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= +github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= -github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -952,20 +1005,24 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= -github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= @@ -978,33 +1035,34 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= -github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= +github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1013,8 +1071,9 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1022,13 +1081,14 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= @@ -1052,11 +1112,9 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1064,22 +1122,24 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa h1:5SqCsI/2Qya2bCzK15ozrqo2sZxkh0FHynJZOTVoV6Q= +github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1092,15 +1152,33 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1110,15 +1188,11 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1130,8 +1204,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1158,7 +1232,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1201,14 +1276,12 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1221,8 +1294,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1248,8 +1321,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= +golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1264,8 +1337,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1323,14 +1396,12 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1339,10 +1410,10 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1362,17 +1433,17 @@ golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1384,13 +1455,14 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1412,6 +1484,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1445,7 +1518,6 @@ golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -1453,7 +1525,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1512,8 +1585,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= +google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1521,8 +1594,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1561,10 +1635,8 @@ google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1631,12 +1703,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1678,8 +1750,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1696,8 +1768,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1713,6 +1785,7 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1733,8 +1806,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1743,14 +1816,15 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= -pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/gomod2nix.toml b/gomod2nix.toml index 2fc5cafe43..4200d9a702 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -2,44 +2,65 @@ schema = 3 [mod] [mod."cloud.google.com/go"] - version = "v0.110.4" - hash = "sha256-+eNPRNnEynTJEE1DtG1wUZClNif4mSPpFJVgbpMXpJY=" + version = "v0.112.0" + hash = "sha256-lmNLoqmLURfxu+a6V/SeoP8xVn0Wi2SD7uxxAtSjm+o=" [mod."cloud.google.com/go/compute"] - version = "v1.20.1" - hash = "sha256-HQvSLdoSagQsuqOb/D9+xMc8nE9Y44Z30rQgd2AGEr8=" + version = "v1.24.0" + hash = "sha256-icDjR0uxYeazRbhsBgl8Dx7z/oRZJ/iqK6CGjCtsaQQ=" [mod."cloud.google.com/go/compute/metadata"] version = "v0.2.3" hash = "sha256-kYB1FTQRdTDqCqJzSU/jJYbVUGyxbkASUKbEs36FUyU=" [mod."cloud.google.com/go/iam"] - version = "v1.1.0" - hash = "sha256-v+n8tad8bl6QBDgqMTDhpU+QU6dL69k3bj3XL0+yTJ0=" + version = "v1.1.6" + hash = "sha256-u91oZdyy/wgk3J8Z+4mWmn+YliSBIATu6kpyH20Dd8k=" [mod."cloud.google.com/go/storage"] - version = "v1.30.1" - hash = "sha256-4lC0XaLSQDnVBmNLIauiWnGXq+Ax57r8fcMxXFMCCNE=" + version = "v1.36.0" + hash = "sha256-dRKH1NEyAfEpVo5Mma677L7z0JO9Mfd1bv1lr1uFngI=" [mod."cosmossdk.io/api"] - version = "v0.3.1" - hash = "sha256-yQUn04n0/s3DpNWu7TF3NG+awWKxgvRpV9CYIV+dR7k=" + version = "v0.7.3" + hash = "sha256-G72m5tUKLrpl89YKM/S7J/e8rYkqctuDOqHbqxyzTBI=" + [mod."cosmossdk.io/client/v2"] + version = "v2.0.0-beta.1" + hash = "sha256-5o3FSZ9xcYG4KLTOMbVFfPhV4CtlUn4LxjEm3/t1nOU=" + [mod."cosmossdk.io/collections"] + version = "v0.4.0" + hash = "sha256-minFyzgO/D+Oda4E3B1qvOAN5qd65SjS6nmjca4cp/8=" [mod."cosmossdk.io/core"] - version = "v0.5.1" - hash = "sha256-NSIUDRmJRpxsy/GE2kXOa1G3UaoPxVnhi4f7izjFzO4=" + version = "v0.11.0" + hash = "sha256-zUiOF04lWHK8OZqGhwVuzKYfig5I0107D+8fWX5/pbQ=" [mod."cosmossdk.io/depinject"] version = "v1.0.0-alpha.4" hash = "sha256-xpLH0K6ivQznFrLw2hmhWIIyYgqjstV47OhTEj/c1oQ=" [mod."cosmossdk.io/errors"] - version = "v1.0.0" - hash = "sha256-ZD1fhIefk3qkt9I4+ed9NBmBqTDvym9cXWmgFBh5qu0=" + version = "v1.0.1" + hash = "sha256-MgTocXkBzri9FKkNtkARJXPmxRrRO/diQJS5ZzvYrJY=" [mod."cosmossdk.io/log"] - version = "v1.2.1" - hash = "sha256-2Mb0jQ5Yvi+2fvhCVEiiacwODXM8+6vhsKOnHz+wsiY=" + version = "v1.3.1" + hash = "sha256-otkUvsz35VuuUWXoTmWBwR61+o6YzvWETGdLfwWDvwY=" [mod."cosmossdk.io/math"] - version = "v1.1.2" - hash = "sha256-i/qHqbA3ptTvIBITkdWITn+owFBwcgJSBiV04MhSGyA=" - [mod."cosmossdk.io/tools/rosetta"] - version = "v0.2.1" - hash = "sha256-TrkXwA1ZdwSyu3te0DLMBynCb7CGEtefo2wzFvxeyU8=" + version = "v1.3.0" + hash = "sha256-EEFK43Cr0g0ndhQhkIKher0FqV3mvkmE9z0sP7uVSHg=" + [mod."cosmossdk.io/store"] + version = "v1.0.2" + hash = "sha256-mEaBNfU892M3V6qTMEDXb1GLaywlyouTRC5XfVqNSMs=" + [mod."cosmossdk.io/tools/confix"] + version = "v0.1.1" + hash = "sha256-/Et2FFhb4XfakbLFvGQK3QxN5Y7alzO+DGfi2/EWbxo=" + [mod."cosmossdk.io/x/evidence"] + version = "v0.1.0" + hash = "sha256-ZhVrmCGOzx2yODpcgvM9c48jkqz37NwU2ln/uVuCEfc=" + [mod."cosmossdk.io/x/feegrant"] + version = "v0.1.0" + hash = "sha256-/gWvrqvy6bW90+NU66T+9QysYgvG1VbwfYJZ8tkqpeA=" + [mod."cosmossdk.io/x/tx"] + version = "v0.13.1" + hash = "sha256-dHv2Zx8xbqfv1Gq0syh33G7TFJOVx4857QMH4b8Jj9k=" + [mod."cosmossdk.io/x/upgrade"] + version = "v0.1.1" + hash = "sha256-bM9ybpaibMH7k4M6/QAXCZ3fJcADfJHxvMgp4AVUihs=" [mod."filippo.io/edwards25519"] - version = "v1.0.0" - hash = "sha256-APnPAcmItvtJ5Zsy863lzR2TjEBF9Y66TY1e4M1ap98=" + version = "v1.1.0" + hash = "sha256-9ACANrgWZSd5HYPfDZHY8DVbPSC9LOMgy8deq3rDOoc=" [mod."github.com/99designs/go-keychain"] version = "v0.0.0-20191008050251-8e49817e8af4" hash = "sha256-4EndKcspGC3GOPCmctXF1NnWzxWwMyY/OQpFMmr8Sc0=" @@ -47,12 +68,15 @@ schema = 3 version = "v1.2.0" hash = "sha256-emQlH+RQpESoFCzpHS38fEhs1SLjotxNPlRK4B5Aybs=" replaced = "github.com/cosmos/keyring" - [mod."github.com/ChainSafe/go-schnorrkel"] - version = "v1.0.0" - hash = "sha256-atJ2waz124m0DVHjol8v3NfCLKidU3fYu5AgzT9xCBA=" + [mod."github.com/DataDog/datadog-go"] + version = "v4.8.3+incompatible" + hash = "sha256-9KvlVQdgyJ1ulDa6wkLb0ACdjc+R0U91hdb7nxodrA0=" [mod."github.com/DataDog/zstd"] - version = "v1.5.2" - hash = "sha256-LVkZHLG8O4CzmqyQVbGn+0r6AKIMABej8a4HKMFw/xo=" + version = "v1.5.5" + hash = "sha256-tSw0aq0pPyroZtQYYb9lWOtPVNaQOt8skYQ4TMXGvAQ=" + [mod."github.com/Microsoft/go-winio"] + version = "v0.6.1" + hash = "sha256-BL0BVaHtmPKQts/711W59AbHXjGKqFS4ZTal0RYnR9I=" [mod."github.com/StackExchange/wmi"] version = "v0.0.0-20180116203802-5d049714c4a6" hash = "sha256-0yUxhZB3v3ZE3QY36zHs2cJ1S4GXptXIhyAi6sI2nOo=" @@ -62,12 +86,9 @@ schema = 3 [mod."github.com/allegro/bigcache"] version = "v1.2.1" hash = "sha256-/DwqBxg75m1zzOB8BWbpjQ/jYnhoe/SMXc4310mOlMA=" - [mod."github.com/armon/go-metrics"] - version = "v0.4.1" - hash = "sha256-usxTUHA0QQMdM6sHi2z51nmnEKMbA0qUilxJFpWHlYE=" [mod."github.com/aws/aws-sdk-go"] - version = "v1.44.203" - hash = "sha256-Kq501D1YAz/3nXqcszDDAnf6huZarJh5onzgEfmWbms=" + version = "v1.44.224" + hash = "sha256-zkewIYLOT+CvBDsxXnY2ZaFyoDdt/JCFQ2sCIdBmTFo=" [mod."github.com/beorn7/perks"] version = "v1.0.1" hash = "sha256-h75GUqfwJKngCJQVE5Ao5wnO3cfKD9lSIteoLp/3xJ4=" @@ -77,6 +98,9 @@ schema = 3 [mod."github.com/bgentry/speakeasy"] version = "v0.1.1-0.20220910012023-760eaf8b6816" hash = "sha256-Tx3sPuhsoVwrCfJdIwf4ipn7pD92OQNYvpCxl1Z9Wt0=" + [mod."github.com/bits-and-blooms/bitset"] + version = "v1.8.0" + hash = "sha256-ySle5MJXSGMHJa1HSf/ZMDTYXdow9ct7JXth4k5Po50=" [mod."github.com/btcsuite/btcd"] version = "v0.23.4" hash = "sha256-xP7TLBdOoUIjg5Q3MOjbT5P9tkCWjsd4bWgZLp539Wo=" @@ -90,8 +114,8 @@ schema = 3 version = "v1.0.1" hash = "sha256-vix0j/KGNvoKjhlKgVeSLY6un2FHeIEoZWMC4z3yvZ4=" [mod."github.com/cenkalti/backoff/v4"] - version = "v4.1.3" - hash = "sha256-u6MEDopHoTWAZoVvvXOKnAg++xre53YgQx0gmf6t2KU=" + version = "v4.2.1" + hash = "sha256-CKogmPe0pCcAdpztzPwr24rLTJZfq8QVZ9AUduwAcoA=" [mod."github.com/cespare/xxhash"] version = "v1.1.0" hash = "sha256-nVDTtXH9PC3yJ0THaQZEN243UP9xgLi/clt5xRqj3+M=" @@ -105,14 +129,15 @@ schema = 3 version = "v2.0.2" hash = "sha256-UrPHkvqVF8V78+kXKmjTHl79XsgDBnqFsje5BMYh0E4=" [mod."github.com/cockroachdb/errors"] - version = "v1.10.0" - hash = "sha256-l6CCw3FKGNaGlwzLfAaF0cruf3E9MZr6GK1GZ+vQm2c=" + version = "v1.11.1" + hash = "sha256-ufKtavyfW/i3ZemiqDqKGc0JM+f0IBi6bZWkZyb/jdc=" [mod."github.com/cockroachdb/logtags"] version = "v0.0.0-20230118201751-21c54148d20b" hash = "sha256-7dQH6j1o99fuxHKkw0RhNC5wJKkvRLMDJpUiVnDx6h8=" [mod."github.com/cockroachdb/pebble"] - version = "v0.0.0-20230807182518-7bcdd55ef1e3" - hash = "sha256-f0wYwD5GmKMKDXE0ORPAsiA90cJanHfkl9d1vOUxCj8=" + version = "v0.0.0-20230209160836-829675f94811" + hash = "sha256-DpbEXN/YWWXap83lz99r6sAUUk76ixDe4fRn1GpBWpo=" + replaced = "github.com/cockroachdb/pebble" [mod."github.com/cockroachdb/redact"] version = "v1.1.5" hash = "sha256-0rtT7LRO0wxf9XovOK8GXRrhmx8OcbdPK/mXOKbJdog=" @@ -120,26 +145,23 @@ schema = 3 version = "v1.0.0" hash = "sha256-z/0E0NiEGo7zxM7d94ImgUf8P0/KG6hbP9T4Vuym4p0=" [mod."github.com/cometbft/cometbft"] - version = "v0.37.2-0.20230905115601-790d57e1748f" - hash = "sha256-xWrKY2za+6szbr4FAGUcZKTkP2xgdbCccnqt/RCON8M=" - replaced = "github.com/cometbft/cometbft" + version = "v0.38.6" + hash = "sha256-2boDIBhWeQM7c9mAKB23cJ7bHYGf1+Dl0QeFDtO8Usk=" [mod."github.com/cometbft/cometbft-db"] - version = "v0.0.0-20231011055109-57922ac52a63" - hash = "sha256-iLs/FN1be3AcoyhKj2+b5Msqeat9j2ja4acyOs+w+Uk=" - replaced = "github.com/crypto-org-chain/cometbft-db" - [mod."github.com/confio/ics23/go"] - version = "v0.9.0" - hash = "sha256-guD8w7YygfUp7lpTAUyXQuCPx8F3lXkcg+yR5+JOCbk=" + version = "v0.9.1" + hash = "sha256-ftRdle5ok2aCyqT3u5rYY0jKB8WT8uDus26Pw4Mo1go=" [mod."github.com/cosmos/btcutil"] version = "v1.0.5" hash = "sha256-t572Sr5iiHcuMKLMWa2i+LBAt192oa+G1oA371tG/eI=" + [mod."github.com/cosmos/cosmos-db"] + version = "v1.0.2" + hash = "sha256-WjDoB2AGoIyEW30LlGcQX5JVACJbs0jWSY58IuJHz0M=" [mod."github.com/cosmos/cosmos-proto"] - version = "v1.0.0-beta.2" - hash = "sha256-Am8A44NSxdY77GIEDx1AY+pLU0npeyuTlr3mc4stg3I=" + version = "v1.0.0-beta.4" + hash = "sha256-5Kn82nsZfiEtuwhhLZqmMxdAY1tX/Fi3HJ0/MEaRohw=" [mod."github.com/cosmos/cosmos-sdk"] - version = "v0.46.0-beta2.0.20231013072415-eec017435467" - hash = "sha256-TA3D7opzAx0jjhoj54yQbvXc0z+4V93kgpsnCryEuFA=" - replaced = "github.com/crypto-org-chain/cosmos-sdk" + version = "v0.50.5-0.20240318121607-9a59234c4202" + hash = "sha256-JKBGS1Tcq95mp7UVGIBusf96z6ksZyyDCCyOSacpcFA=" [mod."github.com/cosmos/go-bip39"] version = "v1.0.0" hash = "sha256-Qm2aC2vaS8tjtMUbHmlBSagOSqbduEEDwc51qvQaBmA=" @@ -147,38 +169,47 @@ schema = 3 version = "v1.2.0" hash = "sha256-Hd19V0RCiMoCL67NsqvWIsvWF8KM3LnuJTbYjWtQkEo=" [mod."github.com/cosmos/gogoproto"] - version = "v1.4.10" - hash = "sha256-Anm4O3bUONsN7J9Psg9E+oQasmUyoGc7UE1aaHJaehE=" + version = "v1.4.11" + hash = "sha256-hXJIGN8Arg09ldCgrSyYZK+xMelYavEj2I3ltxJfAqE=" [mod."github.com/cosmos/iavl"] - version = "v0.20.1" - hash = "sha256-AlvJ9ufYrgTaY/C+zEs2DA2b6jqRaqDVDOwy2xtrThM=" - [mod."github.com/cosmos/ibc-go/v7"] - version = "v7.3.0" - hash = "sha256-/5r4A5VSR/WygwxQze5lUy0OPoFzMQFR5Daa+Y3pBCk=" + version = "v1.0.1" + hash = "sha256-owSjZEVLrFoLjO/wm8bxbVLhqRv/uX+8usdVMnbOn/s=" + [mod."github.com/cosmos/ibc-go/modules/capability"] + version = "v1.0.0" + hash = "sha256-xOeHJWUj6fTc2EUGiE4dgfY2WkvrqTg/FWewoUvQcvg=" + [mod."github.com/cosmos/ibc-go/v8"] + version = "v8.1.0" + hash = "sha256-uwYDKW+lFEfLR6Ro+HM3KhBi7B0mGMutH8oWdoZM7d8=" [mod."github.com/cosmos/ics23/go"] version = "v0.10.0" hash = "sha256-KYEv727BO/ht63JO02xiKFGFAddg41Ve9l2vSSZZBq0=" [mod."github.com/cosmos/ledger-cosmos-go"] - version = "v0.12.1" - hash = "sha256-9+nr+/r4MyiogddS0JcXOuriPqXP4nxln8ts+mYQRcg=" + version = "v0.13.3" + hash = "sha256-4f73odipfgWku0/gK2UtXbrBXvj8kT9sg4IhnfAP/S0=" + [mod."github.com/cosmos/rosetta"] + version = "v0.50.3-1" + hash = "sha256-lmB2W6b4cmyGHLh3OpOLnGy2Q75QONLtrWwp/Pvnf6k=" [mod."github.com/cosmos/rosetta-sdk-go"] version = "v0.10.0" hash = "sha256-WmLq9E9mYV+ms6Tdb43lCoAy6cowkDnK4bvX/ApDzLY=" - [mod."github.com/creachadair/taskgroup"] - version = "v0.4.2" - hash = "sha256-AjtQRoLKLSAbyKd8YlaXcYn0pek6oo5U3R28dvtKv14=" + [mod."github.com/creachadair/atomicfile"] + version = "v0.3.1" + hash = "sha256-GEp1gRxKfBYI6K0XbElcVYcJMPu6eeLufaYxr7Z0MAQ=" + [mod."github.com/creachadair/tomledit"] + version = "v0.0.24" + hash = "sha256-4vUukHONOjNn0qfQr4esK6TWfPWsIp+rbdz65og84lw=" [mod."github.com/danieljoos/wincred"] - version = "v1.1.2" - hash = "sha256-Nnklfg12vmWCOhELGyoRqEF4w4srp0WbPwreaChYLKs=" + version = "v1.2.0" + hash = "sha256-LHcvTJCc8++bFndbd8ZgMSTe4L5h2C4rN+cSWHCz54Y=" [mod."github.com/davecgh/go-spew"] - version = "v1.1.1" - hash = "sha256-nhzSUrE1fCkN0+RL04N4h8jWmRFPPPWbCuDc7Ss0akI=" + version = "v1.1.2-0.20180830191138-d8f796af33cc" + hash = "sha256-fV9oI51xjHdOmEx6+dlq7Ku2Ag+m/bmbzPo6A4Y74qc=" [mod."github.com/deckarep/golang-set/v2"] version = "v2.1.0" hash = "sha256-Co6gfAcVn256IUEJNNPmVlx8LZRI4sT+KmqGs2uIQ90=" [mod."github.com/decred/dcrd/dcrec/secp256k1/v4"] - version = "v4.1.0" - hash = "sha256-cS4ZrKz1B4G7+vqih6B7C/WNkcMvRKmvR6S8aw7PotY=" + version = "v4.2.0" + hash = "sha256-Mw+axGW3RzaRFzcYc7/9/gpqZgWXZHeyT2c4USFtAQA=" [mod."github.com/desertbit/timer"] version = "v0.0.0-20180107155436-c41aec40b27f" hash = "sha256-abLOtEcomAqCWLphd2X6WkD/ED764w6sa6unox4BXss=" @@ -201,30 +232,36 @@ schema = 3 version = "v1.0.1" hash = "sha256-yuvxYYngpfVkUg9yAmG99IUVmADTQA0tMbBXe0Fq0Mc=" [mod."github.com/dvsekhvalnov/jose2go"] - version = "v1.5.0" - hash = "sha256-dsju6Xt83pe5SRPN/pUOnDUQByZ6hrhKIXWs3sSu7t8=" + version = "v1.6.0" + hash = "sha256-IXn2BuUp4fi/i2zf1tGGW1m9xoYh3VCksB6GJ5Sf06g=" [mod."github.com/edsrzf/mmap-go"] version = "v1.0.0" hash = "sha256-k1DYvCqO3BKNcGEve/nMW0RxzMkK2tGfXbUbycqcVSo=" + [mod."github.com/emicklei/dot"] + version = "v1.6.1" + hash = "sha256-zOpoaepCfPLmU9iQji/Ait+SVEHI9eF3rwtW0h/8lho=" [mod."github.com/ethereum/go-ethereum"] version = "v1.10.20-0.20231207063621-43cf32d91c3e" hash = "sha256-lDIqRLUrXYCb9mmFBY/+WW+ee69+IkxOgqjHVyo4ij0=" replaced = "github.com/crypto-org-chain/go-ethereum" + [mod."github.com/fatih/color"] + version = "v1.16.0" + hash = "sha256-Aq/SM28aPJVzvapllQ64R/DM4aZ5CHPewcm/AUJPyJQ=" [mod."github.com/felixge/httpsnoop"] - version = "v1.0.2" - hash = "sha256-hj6FZQ1fDAV+1wGIViAt8XaAkWZ1I5vJzgjIJa7XRBA=" + version = "v1.0.4" + hash = "sha256-c1JKoRSndwwOyOxq9ddCe+8qn7mG9uRq2o/822x5O/c=" [mod."github.com/fsnotify/fsnotify"] - version = "v1.6.0" - hash = "sha256-DQesOCweQPEwmAn6s7DCP/Dwy8IypC+osbpfsvpkdP0=" + version = "v1.7.0" + hash = "sha256-MdT2rQyQHspPJcx6n9ozkLbsktIOJutOqDuKpNAtoZY=" [mod."github.com/gballet/go-libpcsclite"] version = "v0.0.0-20190607065134-2772fd86a8ff" hash = "sha256-Nr5ocU9s1F2Lhx/Zq6/nIo+KkKEqMjDYOEs3yWRC48g=" [mod."github.com/getsentry/sentry-go"] - version = "v0.23.0" - hash = "sha256-VR6IL+yIc+BV5xBGfPJ7ixsAVzJ/hzuvXmkkAn1cTk4=" + version = "v0.27.0" + hash = "sha256-PTkTzVNogqFA/5rc6INLY6RxK5uR1AoJFOO+pOPdE7Q=" [mod."github.com/go-kit/kit"] - version = "v0.12.0" - hash = "sha256-5RkXo6s0oye8etgD5qy+AvkkkNsQ6jc0kWJj6flA4GM=" + version = "v0.13.0" + hash = "sha256-EncDzq0JVtY+NLlW5lD+nbVewNYTTrfzlOxI4PuwREw=" [mod."github.com/go-kit/log"] version = "v0.2.1" hash = "sha256-puLJ+up45X2j9E3lXvBPKqHPKOA/sFAhfCqGxsITW/Y=" @@ -232,8 +269,11 @@ schema = 3 version = "v0.6.0" hash = "sha256-RtIG2qARd5sT10WQ7F3LR8YJhS8exs+KiuUiVf75bWg=" [mod."github.com/go-logr/logr"] - version = "v1.2.3" - hash = "sha256-2L7k6GfrcW3GXXYr1FYIu20aZBjIF0cTKdte6D4riH8=" + version = "v1.4.1" + hash = "sha256-WM4badoqxXlBmqCRrnmtNce63dLlr/FJav3BJSYHvaY=" + [mod."github.com/go-logr/stdr"] + version = "v1.2.2" + hash = "sha256-rRweAP7XIb4egtT1f2gkz4sYOu7LDHmcJ5iNsJUd0sE=" [mod."github.com/go-ole/go-ole"] version = "v1.2.6" hash = "sha256-+oxitLeJxYF19Z6g+6CgmCHJ1Y5D8raMi2Cb3M6nXCs=" @@ -256,8 +296,8 @@ schema = 3 version = "v1.3.2" hash = "sha256-pogILFrrk+cAtb0ulqn9+gRZJ7sGnnLLdtqITvxvG6c=" [mod."github.com/golang/glog"] - version = "v1.1.2" - hash = "sha256-sxvf1xMel10gNBqyGIFGFcyjupdM+nVMKUQ/lMLh3Ak=" + version = "v1.2.0" + hash = "sha256-eCWkUlsWbHSjsuTw8HcNpj3KxT+QPvW5SSIv88hAsxA=" [mod."github.com/golang/groupcache"] version = "v0.0.0-20210331224755-41bb18bfe9da" hash = "sha256-7Gs7CS9gEYZkbu5P4hqPGBpeGZWC64VDwraSKFF+VR0=" @@ -265,8 +305,8 @@ schema = 3 version = "v1.6.0" hash = "sha256-fWdnMQisRbiRzGT3ISrUHovquzLRHWvcv1JEsJFZRno=" [mod."github.com/golang/protobuf"] - version = "v1.5.3" - hash = "sha256-svogITcP4orUIsJFjMtp+Uv1+fKJv2Q5Zwf2dMqnpOQ=" + version = "v1.5.4" + hash = "sha256-N3+Lv9lEZjrdOWdQhFj6Y3Iap4rVLEQeI8/eFFyAMZ0=" [mod."github.com/golang/snappy"] version = "v0.0.5-0.20220116011046-fa5810519dcb" hash = "sha256-4GVLPBwJIXYFJU+Uvoa/sb5VHea7yJhwE7feABa7ucs=" @@ -274,56 +314,59 @@ schema = 3 version = "v1.1.2" hash = "sha256-K7V2obq3pLM71Mg0vhhHtZ+gtaubwXPQx3xcIyZDCjM=" [mod."github.com/google/go-cmp"] - version = "v0.5.9" - hash = "sha256-lQc4O00R3QSMGs9LP8Sy7A9kj0cqV5rrUdpnGeipIyg=" + version = "v0.6.0" + hash = "sha256-qgra5jze4iPGP0JSTVeY5qV5AvEnEu39LYAuUCIkMtg=" [mod."github.com/google/orderedcode"] version = "v0.0.1" hash = "sha256-KrExYovtUQrHGI1mPQf57jGw8soz7eWOC2xqEaV0uGk=" [mod."github.com/google/s2a-go"] - version = "v0.1.4" - hash = "sha256-amTAj6SNERMPxAA43KrzwYgu6GMooayfHCsdkoTI17c=" + version = "v0.1.7" + hash = "sha256-E+SX/3VmRI5qN7SbnRP4Tt+gQTq93pScpY9U2tTmIU0=" [mod."github.com/google/uuid"] - version = "v1.3.0" - hash = "sha256-QoR55eBtA94T2tBszyxfDtO7/pjZZSGb5vm7U0Xhs0Y=" + version = "v1.6.0" + hash = "sha256-VWl9sqUzdOuhW0KzQlv0gwwUQClYkmZwSydHG2sALYw=" [mod."github.com/googleapis/enterprise-certificate-proxy"] - version = "v0.2.3" - hash = "sha256-4yaBdpdRuv5vkGlwxKPlZ/IVSeHlcP9PJaLcyn4wNJk=" + version = "v0.3.2" + hash = "sha256-wVuR3QC0mYFl5LNeKdRXdKdod7BGP5sv2h6VVib85v8=" [mod."github.com/googleapis/gax-go/v2"] - version = "v2.11.0" - hash = "sha256-jWfuxmawmfPNTt7iWn9StsC5yofMupkr1IUZbjTxrgQ=" + version = "v2.12.0" + hash = "sha256-ZcXS+1B11UaJHf8D15N3ZCh00fiMUncpHd+eNRffLZ4=" [mod."github.com/gorilla/handlers"] - version = "v1.5.1" - hash = "sha256-GnBAARgOx1E+hDMQ63SI17hdhGtLQxb31lZOmn5j/pU=" + version = "v1.5.2" + hash = "sha256-2WQeVCe7vQg+8MpNLMhOGsRdbrcWLpbtUhUX8mbiQrs=" [mod."github.com/gorilla/mux"] - version = "v1.8.0" - hash = "sha256-s905hpzMH9bOLue09E2JmzPXfIS4HhAlgT7g13HCwKE=" + version = "v1.8.1" + hash = "sha256-nDABvAhlYgxUW2N/brrep7NkQXoSGcHhA+XI4+tK0F0=" [mod."github.com/gorilla/websocket"] - version = "v1.5.0" - hash = "sha256-EYVgkSEMo4HaVrsWKqnsYRp8SSS8gNf7t+Elva02Ofc=" + version = "v1.5.1" + hash = "sha256-eHZ/U+eeE5tSgWc1jEDuBwtTRbXKP9fqP9zfW4Zw8T0=" [mod."github.com/grpc-ecosystem/go-grpc-middleware"] - version = "v1.3.0" - hash = "sha256-seaTQMNz/lWzpR3ex2gSM1Yo2yD2q6bJQZvB1L3CONk=" + version = "v1.4.0" + hash = "sha256-0UymBjkg41C9MPqkBLz/ZY9WbimZrabpJk+8C/X63h8=" [mod."github.com/grpc-ecosystem/grpc-gateway"] version = "v1.16.0" hash = "sha256-wLymGic7wZ6fSiBYDAaGqnQ9Ste1fUWeqXeolZXCHvI=" [mod."github.com/gsterjov/go-libsecret"] version = "v0.0.0-20161001094733-a6f4afe4910c" hash = "sha256-Z5upjItPU9onq5t7VzhdQFp13lMJrSiE3gNRapuK6ic=" - [mod."github.com/gtank/merlin"] - version = "v0.1.1" - hash = "sha256-tfP9DFdPIfAt29pCta6dObAABCbZt4y3ZActH6ERkr0=" - [mod."github.com/gtank/ristretto255"] - version = "v0.1.2" - hash = "sha256-fAoVTP1s5+f7/YtnzI+gaEz1MS+FuCgy3sT19ZHIxE4=" [mod."github.com/hashicorp/go-cleanhttp"] version = "v0.5.2" hash = "sha256-N9GOKYo7tK6XQUFhvhImtL7PZW/mr4C4Manx/yPVvcQ=" [mod."github.com/hashicorp/go-getter"] - version = "v1.7.1" - hash = "sha256-szIdn7GPvJ78gKKzQRWlx39X81QRDsXtJKo3P/4oMIg=" + version = "v1.7.3" + hash = "sha256-z3zrjcOsgJrZkGLwaKVauq/MFAPtulXatV/RrkKNJv4=" + [mod."github.com/hashicorp/go-hclog"] + version = "v1.5.0" + hash = "sha256-u3Jqg7Qex11IZ7vbk4hRGgLy6e0cF70CCx7ERF0GUHo=" [mod."github.com/hashicorp/go-immutable-radix"] version = "v1.3.1" hash = "sha256-65+A2HiVfS/GV9G+6/TkXXjzXhI/V98e6RlJWjxy+mg=" + [mod."github.com/hashicorp/go-metrics"] + version = "v0.5.3" + hash = "sha256-5jQftEvEhL88yWeVnu+IZKzV5p9osZcgFmwP1zlrjzY=" + [mod."github.com/hashicorp/go-plugin"] + version = "v1.6.0" + hash = "sha256-NeY86Z+qJwt0NPV4cNmWDiTryDPSiyKMkS1ivRX9ThE=" [mod."github.com/hashicorp/go-safetemp"] version = "v1.0.0" hash = "sha256-g5i9m7FSRInQzZ4iRpIsoUu685AY7fppUwjhuZCezT8=" @@ -331,14 +374,17 @@ schema = 3 version = "v1.6.0" hash = "sha256-UV0equpmW6BiJnp4W3TZlSJ+PTHuTA+CdOs2JTeHhjs=" [mod."github.com/hashicorp/golang-lru"] - version = "v0.5.5-0.20210104140557-80c98217689d" - hash = "sha256-w5utLMR7p5pF9xX+mI3N9NyfQ8ixNXNTgfXDu8fudmc=" + version = "v1.0.2" + hash = "sha256-yy+5botc6T5wXgOe2mfNXJP3wr+MkVlUZ2JBkmmrA48=" [mod."github.com/hashicorp/hcl"] version = "v1.0.0" hash = "sha256-xsRCmYyBfglMxeWUvTZqkaRLSW+V2FvNodEDjTGg1WA=" + [mod."github.com/hashicorp/yamux"] + version = "v0.1.1" + hash = "sha256-jr4ZFM3XHSwGoZcRcmmdGTq4IqxBTnimojIPDgK0USU=" [mod."github.com/hdevalence/ed25519consensus"] - version = "v0.1.0" - hash = "sha256-MkqFWnyXt653RaJQUMWWxcW6NCskIxou8VEfj+8vd3Y=" + version = "v0.2.0" + hash = "sha256-KTbeKMOT/HCJjDHqyciQjJPPgpNk6H0VyQCCbeGgs7Y=" [mod."github.com/holiman/bloomfilter/v2"] version = "v2.0.3" hash = "sha256-5VsJMQzJSNd4F7yAl3iF/q6JodWOlE4dUvTQ0UGPe+k=" @@ -351,6 +397,9 @@ schema = 3 [mod."github.com/huin/goupnp"] version = "v1.0.3" hash = "sha256-EMGmTdoQhP2bVbCPX37hes5krqXn6NFexfnKr9E5u8I=" + [mod."github.com/iancoleman/strcase"] + version = "v0.3.0" + hash = "sha256-lVOk4klrikSCUviR16qcyAr6eoIbniUSfsLFOE1ZLpk=" [mod."github.com/improbable-eng/grpc-web"] version = "v0.15.0" hash = "sha256-9oqKb5Y3hjleOFE2BczbEzLH6q2Jg7kUTP/M8Yk4Ne4=" @@ -367,8 +416,8 @@ schema = 3 version = "v1.0.0" hash = "sha256-xEd0mDBeq3eR/GYeXjoTVb2sPs8sTCosn5ayWkcgENI=" [mod."github.com/klauspost/compress"] - version = "v1.16.7" - hash = "sha256-8miX/lnXyNLPSqhhn5BesLauaIAxETpQpWtr1cu2f+0=" + version = "v1.17.7" + hash = "sha256-UkW+tAFEZYj067z9gXDQjQx0dCF8noCn5OSw/APh4oo=" [mod."github.com/kr/pretty"] version = "v0.3.1" hash = "sha256-DlER7XM+xiaLjvebcIPiB12oVNjyZHuJHoRGITzzpKU=" @@ -382,8 +431,8 @@ schema = 3 version = "v0.1.0" hash = "sha256-wQqGTtRWsfR9n0O/SXHVgECebbnNmHddxJIbG63OJBQ=" [mod."github.com/linxGnu/grocksdb"] - version = "v1.8.4" - hash = "sha256-AGQ0YEuwUaev/mxOkiTNgAOLB9c7reHyTmNxXuaRah8=" + version = "v1.8.12" + hash = "sha256-1tlgs/JnopLI8eoWJlv9hP4jf0OTm1qMZTSg0jAkG7A=" [mod."github.com/magiconair/properties"] version = "v1.8.7" hash = "sha256-XQ2bnc2s7/IH3WxEO4GishZurMyKwEclZy1DXg+2xXc=" @@ -394,17 +443,11 @@ schema = 3 version = "v0.1.13" hash = "sha256-qb3Qbo0CELGRIzvw7NVM1g/aayaz4Tguppk9MD2/OI8=" [mod."github.com/mattn/go-isatty"] - version = "v0.0.19" - hash = "sha256-wYQqGxeqV3Elkmn26Md8mKZ/viw598R4Ych3vtt72YE=" + version = "v0.0.20" + hash = "sha256-qhw9hWtU5wnyFyuMbKx+7RB8ckQaFQ8D+8GKPkN3HHQ=" [mod."github.com/mattn/go-runewidth"] version = "v0.0.9" hash = "sha256-dK/kIPe1tcxEubwI4CWfov/HWRBgD/fqlPC3d5i30CY=" - [mod."github.com/matttproud/golang_protobuf_extensions"] - version = "v1.0.4" - hash = "sha256-uovu7OycdeZ2oYQ7FhVxLey5ZX3T0FzShaRldndyGvc=" - [mod."github.com/mimoo/StrobeGo"] - version = "v0.0.0-20210601165009-122bf33a46e0" - hash = "sha256-rmw70RHsbeOnema++aFCPdswADMVKtb7KGF3msOI7ak=" [mod."github.com/minio/highwayhash"] version = "v1.0.2" hash = "sha256-UeHeepKtToyA5e/w3KdmpbCn+4medesZG0cAcU6P2cY=" @@ -420,6 +463,12 @@ schema = 3 [mod."github.com/mtibben/percent"] version = "v0.2.1" hash = "sha256-Zj1lpCP6mKQ0UUTMs2By4LC414ou+iJzKkK+eBHfEcc=" + [mod."github.com/oasisprotocol/curve25519-voi"] + version = "v0.0.0-20230904125328-1f23a7beb09a" + hash = "sha256-N5MMNn4rytO3ObXVXoY34Sf7AGPkw2dTPkXjigjozls=" + [mod."github.com/oklog/run"] + version = "v1.1.0" + hash = "sha256-U4IS0keJa4BSBSeEBqtIV1Zg6N4b0zFiKfzN9ua4pWQ=" [mod."github.com/olekukonko/tablewriter"] version = "v0.0.5" hash = "sha256-/5i70IkH/qSW5KjGzv8aQNKh9tHoz98tqtL0K2DMFn4=" @@ -430,80 +479,83 @@ schema = 3 version = "v1.26.0" hash = "sha256-B18jsoJHK/oE+wudT0dOsUb41s5+ZIAu/ZBzQ5djOLE=" [mod."github.com/pelletier/go-toml/v2"] - version = "v2.0.8" - hash = "sha256-wWxswr/lTq+McYbScmJM1ECKQ6eNJ5m44SM7TmrHThM=" + version = "v2.1.1" + hash = "sha256-BQtflYQ8Dt7FL/yFI9OnxwvsRk0oEO37ZXuGXFveVpo=" [mod."github.com/petermattis/goid"] - version = "v0.0.0-20230317030725-371a4b8eda08" - hash = "sha256-Qv2rrenuLtrrW+fCd6L4pwXoyYC3znd0ndhzYS4REOM=" + version = "v0.0.0-20231207134359-e60b3f734c67" + hash = "sha256-73DbyhUTwYhqmvbcI96CNblTrfl6uz9OvM6z/h8j5TM=" [mod."github.com/pkg/errors"] version = "v0.9.1" hash = "sha256-mNfQtcrQmu3sNg/7IwiieKWOgFQOVVe2yXgKBpe/wZw=" [mod."github.com/pmezard/go-difflib"] - version = "v1.0.0" - hash = "sha256-/FtmHnaGjdvEIKAJtrUfEhV7EVo5A/eYrtdnUkuxLDA=" + version = "v1.0.1-0.20181226105442-5d4384ee4fb2" + hash = "sha256-XA4Oj1gdmdV/F/+8kMI+DBxKPthZ768hbKsO3d9Gx90=" [mod."github.com/prometheus/client_golang"] - version = "v1.14.0" - hash = "sha256-dpgGV8C30ZCn7b9mQ+Ye2AfPXTIuHLQbl2olMKzJKxA=" + version = "v1.18.0" + hash = "sha256-kuC6WUg2j7A+9qnSp5VZSYo+oltgLvj/70TpqlCJIdE=" [mod."github.com/prometheus/client_model"] - version = "v0.3.0" - hash = "sha256-vP+miJfsoK5UG9eug8z/bhAMj3bwg66T2vIh8WHoOKU=" + version = "v0.6.0" + hash = "sha256-TAD0mm7msYHo99yoNijeYzlDD0i1Vg3uTetpkDUWQo8=" [mod."github.com/prometheus/common"] - version = "v0.42.0" - hash = "sha256-dJqoPZKtY2umWFWwMeRYY9I2JaFlpcMX4atkEcN5+hs=" + version = "v0.47.0" + hash = "sha256-zAfgbOSycgChcWT8x8oo5k1tq/y6Oay3gLdUEkt0NYk=" [mod."github.com/prometheus/procfs"] - version = "v0.9.0" - hash = "sha256-imZN+1HRpMvgmrot2V+AK5ueYLmsp49vZfHtx2N6Wek=" - [mod."github.com/rakyll/statik"] - version = "v0.1.7" - hash = "sha256-/bfnXHBmN8vviPL7D85IzcEVXCaWyjbPPNyauzEcQ8Q=" + version = "v0.12.0" + hash = "sha256-Y4ZZmxIpVCO67zN3pGwSk2TcI88zvmGJkgwq9DRTwFw=" [mod."github.com/rcrowley/go-metrics"] version = "v0.0.0-20201227073835-cf1acfcdf475" hash = "sha256-10ytHQ1SpMKYTiKuOPdEMuOVa8HVvv9ryYSIF9BHEBI=" [mod."github.com/rogpeppe/go-internal"] - version = "v1.11.0" - hash = "sha256-BucSndJVnqX9e6p5PfA6Z8N2bGfIeRfxAxYLUDXTbIo=" + version = "v1.12.0" + hash = "sha256-qvDNCe3l84/LgrA8X4O15e1FeDcazyX91m9LmXGXX6M=" [mod."github.com/rs/cors"] - version = "v1.8.3" - hash = "sha256-VgVB4HKAhPSjNg96mIEUN1bt5ZQng8Fi3ZABy3CDWQE=" + version = "v1.10.1" + hash = "sha256-um4INJM5/675MLK42npIsDbSQ1/Iy5ZiUNuAFReUfeM=" [mod."github.com/rs/zerolog"] - version = "v1.30.0" - hash = "sha256-fOJEpuiJmsp9ONqvmPGOyoBEDfJHBfUH8liiRCWDe1E=" + version = "v1.32.0" + hash = "sha256-9dZjtsES+wLp1cFiSVMuEUbdeXVFcgT0dgg5ACZkILk=" + [mod."github.com/sagikazarmark/locafero"] + version = "v0.4.0" + hash = "sha256-7I1Oatc7GAaHgAqBFO6Tv4IbzFiYeU9bJAfJhXuWaXk=" + [mod."github.com/sagikazarmark/slog-shim"] + version = "v0.1.0" + hash = "sha256-F92BQXXmn3mCwu3mBaGh+joTRItQDSDhsjU6SofkYdA=" [mod."github.com/sasha-s/go-deadlock"] version = "v0.3.1" hash = "sha256-2CBEi9/iN/OMt7wEIG+hRjgDH6CRWIgibGGGy1dQ78I=" [mod."github.com/shirou/gopsutil"] version = "v3.21.4-0.20210419000835-c7a38de76ee5+incompatible" hash = "sha256-oqIqyFquWabIE6DID6uTEc8oFEmM1rVu2ATn3toiCEg=" + [mod."github.com/sourcegraph/conc"] + version = "v0.3.0" + hash = "sha256-mIdMs9MLAOBKf3/0quf1iI3v8uNWydy7ae5MFa+F2Ko=" [mod."github.com/spf13/afero"] - version = "v1.9.5" - hash = "sha256-+XECQxkx0P+ZaQDm4dQ6ItMtHMj+2uNemEC18dsdor0=" + version = "v1.11.0" + hash = "sha256-+rV3cDZr13N8E0rJ7iHmwsKYKH+EhV+IXBut+JbBiIE=" [mod."github.com/spf13/cast"] - version = "v1.5.1" - hash = "sha256-/tQNGGQv+Osp+2jepQaQe6GlncZbqdxzSR82FieiUBU=" + version = "v1.6.0" + hash = "sha256-hxioqRZfXE0AE5099wmn3YG0AZF8Wda2EB4c7zHF6zI=" [mod."github.com/spf13/cobra"] - version = "v1.7.0" - hash = "sha256-bom9Zpnz8XPwx9IVF+GAodd3NVQ1dM1Uwxn8sy4Gmzs=" - [mod."github.com/spf13/jwalterweatherman"] - version = "v1.1.0" - hash = "sha256-62BQtqTLF/eVrTOr7pUXE7AiHRjOVC8jQs3/Ehmflfs=" + version = "v1.8.0" + hash = "sha256-oAE+fEaRfZPE541IPWE0GMeBBYgH2DMhtZNxzp7DFlY=" [mod."github.com/spf13/pflag"] version = "v1.0.5" hash = "sha256-w9LLYzxxP74WHT4ouBspH/iQZXjuAh2WQCHsuvyEjAw=" [mod."github.com/spf13/viper"] - version = "v1.16.0" - hash = "sha256-TgBr1SBMaus1oAlA5Kn+iNUJfQCMyo0hT/xFaA7hreQ=" + version = "v1.18.2" + hash = "sha256-MXYbK6w1LEaoZ2/L/STF3WU1tbK+7NwGVxUCLKPkwks=" [mod."github.com/status-im/keycard-go"] version = "v0.2.0" hash = "sha256-UUiGmlgaIZDeMUJv3fdZBoQ9hJeSsg2ixRGmm6TgHug=" [mod."github.com/stretchr/objx"] - version = "v0.5.0" - hash = "sha256-nY4mvP0f0Ry1IKMKQAYNuioA5h4red4mmQqeGZw6EF0=" + version = "v0.5.2" + hash = "sha256-VKYxrrFb1nkX6Wu3tE5DoP9+fCttwSl9pgLN6567nck=" [mod."github.com/stretchr/testify"] - version = "v1.8.4" - hash = "sha256-MoOmRzbz9QgiJ+OOBo5h5/LbilhJfRUryvzHJmXAWjo=" + version = "v1.9.0" + hash = "sha256-uUp/On+1nK+lARkTVtb5RxlW15zxtw2kaAFuIASA+J0=" [mod."github.com/subosito/gotenv"] - version = "v1.4.2" - hash = "sha256-LnrDR1k/AoCFWBMcU7vQsoQLkZ65evT2hoQHLDudTsg=" + version = "v1.6.0" + hash = "sha256-LspbjTniiq2xAICSXmgqP7carwlNaLqnCTQfw2pa80A=" [mod."github.com/syndtr/goleveldb"] version = "v1.0.1-0.20210819022825-2ae1ddf74ef7" hash = "sha256-36a4hgVQfwtS2zhylKpQuFhrjdc/Y8pF0dxc26jcZIU=" @@ -539,83 +591,107 @@ schema = 3 version = "v0.5.11" hash = "sha256-SUyrjc2wyN3cTGKe5JdBEXjtZC1rJySRxJHVUZ59row=" [mod."github.com/zondax/hid"] - version = "v0.9.1" - hash = "sha256-hSVmN/f/lQHFhF60o6ej78ELC0MMoqQgqIX2hHjdTXg=" + version = "v0.9.2" + hash = "sha256-9h1gEJ/loyaJvu9AsmslztiA8U9ixDTC6TBw9lCU2BE=" [mod."github.com/zondax/ledger-go"] - version = "v0.14.1" - hash = "sha256-iQmShSaty50yYTbYPNd4fnOyrcEG7P2fWmj+fLJQW4s=" + version = "v0.14.3" + hash = "sha256-tldEok5ebZ4R4B7H8dSlYS5oVuLvh89n9wUaVlDjYwg=" [mod."go.etcd.io/bbolt"] - version = "v1.3.7" - hash = "sha256-poZk8tPLDWwW95oCOkTJcQtEvOJTD9UXAZ2TqGJutwk=" + version = "v1.3.8" + hash = "sha256-ekKy8198B2GfPldHLYZnvNjID6x07dUPYKgFx84TgVs=" [mod."go.opencensus.io"] version = "v0.24.0" hash = "sha256-4H+mGZgG2c9I1y0m8avF4qmt8LUKxxVsTqR8mKgP4yo=" + [mod."go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"] + version = "v0.47.0" + hash = "sha256-D+bP2jEZcB4S8AprlDM3qAghYtxhqc8fSKZNac6WVFs=" + [mod."go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"] + version = "v0.47.0" + hash = "sha256-Pv1X0oIWYXyVxEaDQmgYcw+49I9+65N9Y+1wbxoXOog=" + [mod."go.opentelemetry.io/otel"] + version = "v1.22.0" + hash = "sha256-4K70RPjaPzPpTO/VkE9ueoSo9EANuNXneDR6jEiUaJQ=" + [mod."go.opentelemetry.io/otel/metric"] + version = "v1.22.0" + hash = "sha256-Lb4wdlZNmz6Ut6CljBAePSUA8X0RBEOEDyOl2oO+pL8=" + [mod."go.opentelemetry.io/otel/trace"] + version = "v1.22.0" + hash = "sha256-38zzkmcoOzYYeDN+rC44HmwmdnalIcEpObCS6tIvMO8=" + [mod."go.uber.org/multierr"] + version = "v1.11.0" + hash = "sha256-Lb6rHHfR62Ozg2j2JZy3MKOMKdsfzd1IYTR57r3Mhp0=" [mod."golang.org/x/crypto"] - version = "v0.13.0" - hash = "sha256-4ThyrEJI4i9XBwx/q/R4jR41VJBZ/TSR0+UCkjTH95A=" + version = "v0.21.0" + hash = "sha256-Z4k1LvFh4Jai7HUe6TTuXSG3VnuiRpMwdARIdZZqSYk=" [mod."golang.org/x/exp"] - version = "v0.0.0-20230711153332-06a737ee72cb" - hash = "sha256-Cbw10ZJ+jATPV232G47xZrn6ExO1FDtiT6nlMRCH7EI=" - [mod."golang.org/x/net"] + version = "v0.0.0-20240222234643-814bf88cf225" + hash = "sha256-DM6/KUjyqyuqXai7UH1vMsoKXQAlYfcHTwK1dHqjRAc=" + [mod."golang.org/x/mod"] version = "v0.15.0" - hash = "sha256-k0hgSwNmZz9nN9cqqACNHdnejV50AAwzxnoyTs9liXw=" + hash = "sha256-ANSnGmd525BfnkMZpCmu6deMPFGADtnZx3lmZpdm2aM=" + [mod."golang.org/x/net"] + version = "v0.21.0" + hash = "sha256-LfiqMpPtqvW/eLkfx6Ebr5ksqKbQli6uq06c/+XrBsw=" [mod."golang.org/x/oauth2"] - version = "v0.8.0" - hash = "sha256-Ge6x2dR+ap7JSF9W1FwaSCK9ilyuGTQWpgFQHg83Sho=" + version = "v0.17.0" + hash = "sha256-M2ZZQZt449RJL18YpzGiAiqfGsDVMsr1IVWbYp/G/go=" [mod."golang.org/x/sync"] - version = "v0.2.0" - hash = "sha256-hKk9zsy2aXY7R0qGFZhGOVvk5qD17f6KHEuK4rGpTsg=" + version = "v0.6.0" + hash = "sha256-LLims/wjDZtIqlYCVHREewcUOX4hwRwplEuZKPOJ/HI=" [mod."golang.org/x/sys"] - version = "v0.12.0" - hash = "sha256-Ht/PhBJGWNBg4ksmdUu4+7hJjFypSwoUN/8DJricd+0=" + version = "v0.18.0" + hash = "sha256-bIFhfFp7Sj0E1gcE3X3l/jecCfSRLgrkb8f0Yr6tVR0=" [mod."golang.org/x/term"] - version = "v0.12.0" - hash = "sha256-NFko0uqv/r2VxrbSgS1IwWzaWQK3RZuk0MvUV+qxIsc=" + version = "v0.18.0" + hash = "sha256-lpze9arFZIhBV8Ht3VZyoiUwqPkeH2IwfXt8M3xljiM=" [mod."golang.org/x/text"] - version = "v0.13.0" - hash = "sha256-J34dbc8UNVIdRJUZP7jPt11oxuwG8VvrOOylxE7V3oA=" - [mod."golang.org/x/xerrors"] - version = "v0.0.0-20220907171357-04be3eba64a2" - hash = "sha256-6+zueutgefIYmgXinOflz8qGDDDj0Zhv+2OkGhBTKno=" + version = "v0.14.0" + hash = "sha256-yh3B0tom1RfzQBf1RNmfdNWF1PtiqxV41jW1GVS6JAg=" + [mod."golang.org/x/time"] + version = "v0.5.0" + hash = "sha256-W6RgwgdYTO3byIPOFxrP2IpAZdgaGowAaVfYby7AULU=" + [mod."golang.org/x/tools"] + version = "v0.18.0" + hash = "sha256-JVz7W13vMPfpGQ1yW+LBlT6INu3ebpjvXyChmAkm5bQ=" [mod."google.golang.org/api"] - version = "v0.126.0" - hash = "sha256-G/J0Aba+S35gE7VevU2WrrbwQRsJCSj14DVSLTqz0vE=" + version = "v0.162.0" + hash = "sha256-+AsT4DPjefEmPPelZoSHuQ8nCHhmhhUWU4UGnJ/8+fg=" [mod."google.golang.org/appengine"] - version = "v1.6.7" - hash = "sha256-zIxGRHiq4QBvRqkrhMGMGCaVL4iM4TtlYpAi/hrivS4=" + version = "v1.6.8" + hash = "sha256-decMa0MiWfW/Bzr8QPPzzpeya0YWGHhZAt4Cr/bD1wQ=" [mod."google.golang.org/genproto"] - version = "v0.0.0-20230706204954-ccb25ca9f130" - hash = "sha256-L7Eex1IBQzq4Hkf71cDy2MhU01EYPXikQoinuVVseEI=" + version = "v0.0.0-20240213162025-012b6fc9bca9" + hash = "sha256-Xn9/mncRY7WS/O5TiFDMMtJLCAzc0JZNQ8z6yV8jnjY=" [mod."google.golang.org/genproto/googleapis/api"] - version = "v0.0.0-20230629202037-9506855d4529" - hash = "sha256-+kYH4re+0Rk2Y68Wnmx5LYgZW3ipWXLKd0NLmsshliQ=" + version = "v0.0.0-20240205150955-31a09d347014" + hash = "sha256-SgYAbD0iBY8XCp4c9PLpaS4TeKVBexTfTCyV0MUOu98=" [mod."google.golang.org/genproto/googleapis/rpc"] - version = "v0.0.0-20230711160842-782d3b101e98" - hash = "sha256-VtrLmOh1SLOKKLRmKc/NKR6NR/9DSR4RSq+OXnwmgHY=" + version = "v0.0.0-20240221002015-b0ce06bbee7c" + hash = "sha256-XF1eaB8Uwjuii1SVpiZABBhrpszJy5ujOtN+7qAAouM=" [mod."google.golang.org/grpc"] - version = "v1.57.0" - hash = "sha256-hP6alxFu+pcLI4gT3idzEMYNp+DbU3P4xhkpIqGCPXg=" + version = "v1.62.0" + hash = "sha256-OnEEt6J1d9uQazORCpD6jbAKph8/dKlDHcUEEkLQyjQ=" [mod."google.golang.org/protobuf"] - version = "v1.31.0" - hash = "sha256-UdIk+xRaMfdhVICvKRk1THe3R1VU+lWD8hqoW/y8jT0=" + version = "v1.33.0" + hash = "sha256-cWwQjtUwSIEkAlAadrlxK1PYZXTRrV4NKzt7xDpJgIU=" [mod."gopkg.in/ini.v1"] version = "v1.67.0" hash = "sha256-V10ahGNGT+NLRdKUyRg1dos5RxLBXBk1xutcnquc/+4=" [mod."gopkg.in/natefinch/npipe.v2"] version = "v2.0.0-20160621034901-c1b8fa8bdcce" hash = "sha256-ytqeVZqn4kd2uc65HvEjPlpPA2VnBmPfu5DsFlO0o+g=" - [mod."gopkg.in/yaml.v2"] - version = "v2.4.0" - hash = "sha256-uVEGglIedjOIGZzHW4YwN1VoRSTK8o0eGZqzd+TNdd0=" [mod."gopkg.in/yaml.v3"] version = "v3.0.1" hash = "sha256-FqL9TKYJ0XkNwJFnq9j0VvJ5ZUU1RvH/52h/f5bkYAU=" + [mod."gotest.tools/v3"] + version = "v3.5.1" + hash = "sha256-ps2GEc3P2xvlrU4TCtXz+nLTxyP0RrF7SScz5jUqE5E=" [mod."nhooyr.io/websocket"] - version = "v1.8.6" - hash = "sha256-DyaiCc/1iELrl6JSpz6WYMtFwUiSCOSoNF8IhSyP1ag=" + version = "v1.8.10" + hash = "sha256-EsUWUFIA2uJTap1DfsYuSxlPMH3UHDpxEohJMalDOcI=" [mod."pgregory.net/rapid"] - version = "v0.5.5" - hash = "sha256-VUgKDG+AcSVdsqKk5H4doz2rvehsWgt8rdZPDMKFDtE=" + version = "v1.1.0" + hash = "sha256-sVQY9EQ9Y5blYyVYfaOa+y12e+399OqdHiEY3BaDnqo=" [mod."sigs.k8s.io/yaml"] - version = "v1.3.0" - hash = "sha256-RVp8vca2wxg8pcBDYospG7Z1dujoH7zXNu2rgZ1kky0=" + version = "v1.4.0" + hash = "sha256-Hd/M0vIfIVobDd87eb58p1HyVOjYWNlGq2bRXfmtVno=" diff --git a/indexer/kv_indexer.go b/indexer/kv_indexer.go index 48df6cdd4f..cb0c5bab64 100644 --- a/indexer/kv_indexer.go +++ b/indexer/kv_indexer.go @@ -19,10 +19,10 @@ import ( "fmt" errorsmod "cosmossdk.io/errors" - dbm "github.com/cometbft/cometbft-db" + "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmtypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -61,7 +61,7 @@ func NewKVIndexer(db dbm.DB, logger log.Logger, clientCtx client.Context) *KVInd // - Parses eth Tx infos from cosmos-sdk events for every TxResult // - Iterates over all the messages of the Tx // - Builds and stores a indexer.TxResult based on parsed events for every message -func (kv *KVIndexer) IndexBlock(block *tmtypes.Block, txResults []*abci.ResponseDeliverTx) error { +func (kv *KVIndexer) IndexBlock(block *tmtypes.Block, txResults []*abci.ExecTxResult) error { height := block.Header.Height batch := kv.db.NewBatch() diff --git a/indexer/kv_indexer_test.go b/indexer/kv_indexer_test.go index db355a3ede..967140b17d 100644 --- a/indexer/kv_indexer_test.go +++ b/indexer/kv_indexer_test.go @@ -4,16 +4,15 @@ import ( "math/big" "testing" - dbm "github.com/cometbft/cometbft-db" + tmlog "cosmossdk.io/log" abci "github.com/cometbft/cometbft/abci/types" - tmlog "github.com/cometbft/cometbft/libs/log" tmtypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/client" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/crypto/ethsecp256k1" - evmenc "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/indexer" "github.com/evmos/ethermint/tests" "github.com/evmos/ethermint/x/evm/types" @@ -35,7 +34,7 @@ func TestKVIndexer(t *testing.T) { require.NoError(t, tx.Sign(ethSigner, signer)) txHash := tx.AsTransaction().Hash() - encodingConfig := evmenc.MakeConfig(app.ModuleBasics) + encodingConfig := app.MakeConfigForTest() clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig).WithCodec(encodingConfig.Codec) // build cosmos-sdk wrapper tx @@ -54,13 +53,13 @@ func TestKVIndexer(t *testing.T) { testCases := []struct { name string block *tmtypes.Block - blockResult []*abci.ResponseDeliverTx + blockResult []*abci.ExecTxResult expSuccess bool }{ { "success, format 1", &tmtypes.Block{Header: tmtypes.Header{Height: 1}, Data: tmtypes.Data{Txs: []tmtypes.Tx{txBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -80,7 +79,7 @@ func TestKVIndexer(t *testing.T) { { "success, format 2", &tmtypes.Block{Header: tmtypes.Header{Height: 1}, Data: tmtypes.Data{Txs: []tmtypes.Tx{txBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -102,7 +101,7 @@ func TestKVIndexer(t *testing.T) { { "success, exceed block gas limit", &tmtypes.Block{Header: tmtypes.Header{Height: 1}, Data: tmtypes.Data{Txs: []tmtypes.Tx{txBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 11, Log: "out of gas in location: block gas meter; gasWanted: 21000", @@ -114,7 +113,7 @@ func TestKVIndexer(t *testing.T) { { "fail, failed eth tx", &tmtypes.Block{Header: tmtypes.Header{Height: 1}, Data: tmtypes.Data{Txs: []tmtypes.Tx{txBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 15, Log: "nonce mismatch", @@ -126,7 +125,7 @@ func TestKVIndexer(t *testing.T) { { "fail, invalid events", &tmtypes.Block{Header: tmtypes.Header{Height: 1}, Data: tmtypes.Data{Txs: []tmtypes.Tx{txBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{}, @@ -137,7 +136,7 @@ func TestKVIndexer(t *testing.T) { { "fail, not eth tx", &tmtypes.Block{Header: tmtypes.Header{Height: 1}, Data: tmtypes.Data{Txs: []tmtypes.Tx{txBz2}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{}, diff --git a/proto/ethermint/evm/v1/chain_config.proto b/proto/ethermint/evm/v1/chain_config.proto index 2bdb2d24c8..64b956a3c8 100644 --- a/proto/ethermint/evm/v1/chain_config.proto +++ b/proto/ethermint/evm/v1/chain_config.proto @@ -5,18 +5,18 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/evmos/ethermint/x/evm/types"; -// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +// ChainConfig defines the Ethereum ChainConfig parameters using *sdkmath.Int values // instead of *big.Int. message ChainConfig { // homestead_block switch (nil no fork, 0 = already homestead) string homestead_block = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"homestead_block\"" ]; // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) string dao_fork_block = 2 [ (gogoproto.customname) = "DAOForkBlock", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"dao_fork_block\"" ]; // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork @@ -26,7 +26,7 @@ message ChainConfig { // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) string eip150_block = 4 [ (gogoproto.customname) = "EIP150Block", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"eip150_block\"" ]; // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) @@ -34,43 +34,43 @@ message ChainConfig { // eip155_block: EIP155Block HF block string eip155_block = 6 [ (gogoproto.customname) = "EIP155Block", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"eip155_block\"" ]; // eip158_block: EIP158 HF block string eip158_block = 7 [ (gogoproto.customname) = "EIP158Block", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"eip158_block\"" ]; // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) string byzantium_block = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"byzantium_block\"" ]; // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) string constantinople_block = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"constantinople_block\"" ]; // petersburg_block: Petersburg switch block (nil same as Constantinople) string petersburg_block = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"petersburg_block\"" ]; // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) string istanbul_block = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"istanbul_block\"" ]; // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) string muir_glacier_block = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"muir_glacier_block\"" ]; // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) string berlin_block = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"berlin_block\"" ]; // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated @@ -78,12 +78,12 @@ message ChainConfig { reserved "yolo_v3_block", "ewasm_block", "catalyst_block"; // london_block: London switch block (nil = no fork, 0 = already on london) string london_block = 17 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"london_block\"" ]; // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) string arrow_glacier_block = 18 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"arrow_glacier_block\"" ]; // DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904 @@ -91,27 +91,27 @@ message ChainConfig { reserved "merge_fork_block"; // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) string gray_glacier_block = 20 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"gray_glacier_block\"" ]; // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter string merge_netsplit_block = 21 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"merge_netsplit_block\"" ]; // shanghai switch time (nil = no fork, 0 = already on shanghai) string shanghai_time = 22 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"shanghai_time\"" ]; // cancun switch time (nil = no fork, 0 = already on cancun) string cancun_time = 23 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"cancun_time\"" ]; // prague switch time (nil = no fork, 0 = already on prague) string prague_time = 24 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"prague_time\"" ]; } \ No newline at end of file diff --git a/proto/ethermint/evm/v1/chain_config_v0.proto b/proto/ethermint/evm/v1/chain_config_v0.proto index b1a4a02430..fe2ee499e7 100644 --- a/proto/ethermint/evm/v1/chain_config_v0.proto +++ b/proto/ethermint/evm/v1/chain_config_v0.proto @@ -5,18 +5,18 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/evmos/ethermint/x/evm/types"; -// V0ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +// V0ChainConfig defines the Ethereum ChainConfig parameters using *sdkmath.Int values // instead of *big.Int. message V0ChainConfig { // homestead_block switch (nil no fork, 0 = already homestead) string homestead_block = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"homestead_block\"" ]; // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) string dao_fork_block = 2 [ (gogoproto.customname) = "DAOForkBlock", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"dao_fork_block\"" ]; // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork @@ -26,7 +26,7 @@ message V0ChainConfig { // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) string eip150_block = 4 [ (gogoproto.customname) = "EIP150Block", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"eip150_block\"" ]; // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) @@ -34,43 +34,43 @@ message V0ChainConfig { // eip155_block: EIP155Block HF block string eip155_block = 6 [ (gogoproto.customname) = "EIP155Block", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"eip155_block\"" ]; // eip158_block: EIP158 HF block string eip158_block = 7 [ (gogoproto.customname) = "EIP158Block", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"eip158_block\"" ]; // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) string byzantium_block = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"byzantium_block\"" ]; // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) string constantinople_block = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"constantinople_block\"" ]; // petersburg_block: Petersburg switch block (nil same as Constantinople) string petersburg_block = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"petersburg_block\"" ]; // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) string istanbul_block = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"istanbul_block\"" ]; // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) string muir_glacier_block = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"muir_glacier_block\"" ]; // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) string berlin_block = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"berlin_block\"" ]; // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated @@ -78,12 +78,12 @@ message V0ChainConfig { reserved "yolo_v3_block", "ewasm_block", "catalyst_block"; // london_block: London switch block (nil = no fork, 0 = already on london) string london_block = 17 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"london_block\"" ]; // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) string arrow_glacier_block = 18 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"arrow_glacier_block\"" ]; // DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904 @@ -91,22 +91,22 @@ message V0ChainConfig { reserved "merge_fork_block"; // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) string gray_glacier_block = 20 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"gray_glacier_block\"" ]; // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter string merge_netsplit_block = 21 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"merge_netsplit_block\"" ]; // shanghai_block switch block (nil = no fork, 0 = already on shanghai) string shanghai_block = 22 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"shanghai_block\"" ]; // cancun_block switch block (nil = no fork, 0 = already on cancun) string cancun_block = 23 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.moretags) = "yaml:\"cancun_block\"" ]; } diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 6076223244..8898dd7287 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -334,5 +334,5 @@ message QueryBaseFeeRequest {} // QueryBaseFeeResponse returns the EIP1559 base fee. message QueryBaseFeeResponse { // base_fee is the EIP1559 base fee - string base_fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + string base_fee = 1 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; } diff --git a/proto/ethermint/evm/v1/tx.proto b/proto/ethermint/evm/v1/tx.proto index 5f08baa03b..afbac97004 100644 --- a/proto/ethermint/evm/v1/tx.proto +++ b/proto/ethermint/evm/v1/tx.proto @@ -14,6 +14,7 @@ option go_package = "github.com/evmos/ethermint/x/evm/types"; // Msg defines the evm Msg service. service Msg { + option (cosmos.msg.v1.service) = true; // EthereumTx defines a method submitting Ethereum transactions. rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse) { option (google.api.http).post = "/ethermint/evm/v1/ethereum_tx"; @@ -51,14 +52,14 @@ message LegacyTx { // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 1; // gas_price defines the value for each gas unit - string gas_price = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + string gas_price = 2 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; // gas defines the gas limit defined for the transaction. uint64 gas = 3 [(gogoproto.customname) = "GasLimit"]; // to is the hex formatted address of the recipient string to = 4; // value defines the unsigned integer value of the transaction amount. string value = 5 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; // data is the data payload bytes of the transaction. bytes data = 6; // v defines the signature value @@ -76,21 +77,21 @@ message AccessListTx { // chain_id of the destination EVM chain string chain_id = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "ChainID", (gogoproto.jsontag) = "chainID" ]; // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 2; // gas_price defines the value for each gas unit - string gas_price = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + string gas_price = 3 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; // gas defines the gas limit defined for the transaction. uint64 gas = 4 [(gogoproto.customname) = "GasLimit"]; // to is the recipient address in hex format string to = 5; // value defines the unsigned integer value of the transaction amount. string value = 6 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; // data is the data payload bytes of the transaction. bytes data = 7; // accesses is an array of access tuples @@ -111,23 +112,23 @@ message DynamicFeeTx { // chain_id of the destination EVM chain string chain_id = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "ChainID", (gogoproto.jsontag) = "chainID" ]; // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 2; // gas_tip_cap defines the max value for the gas tip - string gas_tip_cap = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + string gas_tip_cap = 3 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; // gas_fee_cap defines the max value for the gas fee - string gas_fee_cap = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + string gas_fee_cap = 4 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; // gas defines the gas limit defined for the transaction. uint64 gas = 5 [(gogoproto.customname) = "GasLimit"]; // to is the hex formatted address of the recipient string to = 6; // value defines the the transaction amount. string value = 7 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.customname) = "Amount"]; // data is the data payload bytes of the transaction. bytes data = 8; // accesses is an array of access tuples diff --git a/proto/ethermint/feemarket/v1/feemarket.proto b/proto/ethermint/feemarket/v1/feemarket.proto index eb89f71c61..55c8c4bc3e 100644 --- a/proto/ethermint/feemarket/v1/feemarket.proto +++ b/proto/ethermint/feemarket/v1/feemarket.proto @@ -21,12 +21,12 @@ message Params { // enable_height defines at which block height the base fee calculation is enabled. int64 enable_height = 5; // base_fee for EIP-1559 blocks. - string base_fee = 6 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string base_fee = 6 [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; // min_gas_price defines the minimum gas price value for cosmos and eth transactions string min_gas_price = 7 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; // min_gas_multiplier bounds the minimum gas used to be charged // to senders based on gas limit string min_gas_multiplier = 8 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", (gogoproto.nullable) = false]; } diff --git a/proto/ethermint/feemarket/v1/query.proto b/proto/ethermint/feemarket/v1/query.proto index 2cc763a6ec..259cf25503 100644 --- a/proto/ethermint/feemarket/v1/query.proto +++ b/proto/ethermint/feemarket/v1/query.proto @@ -42,7 +42,7 @@ message QueryBaseFeeRequest {} // QueryBaseFeeResponse returns the EIP1559 base fee. message QueryBaseFeeResponse { // base_fee is the EIP1559 base fee - string base_fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; + string base_fee = 1 [(gogoproto.customtype) = "cosmossdk.io/math.Int"]; } // QueryBlockGasRequest defines the request type for querying the EIP1559 base diff --git a/proto/ethermint/feemarket/v1/tx.proto b/proto/ethermint/feemarket/v1/tx.proto index c8711960f4..933587058e 100644 --- a/proto/ethermint/feemarket/v1/tx.proto +++ b/proto/ethermint/feemarket/v1/tx.proto @@ -10,6 +10,7 @@ option go_package = "github.com/evmos/ethermint/x/feemarket/types"; // Msg defines the erc20 Msg service. service Msg { + option (cosmos.msg.v1.service) = true; // UpdateParams defined a governance operation for updating the x/feemarket module parameters. // The authority is hard-coded to the Cosmos SDK x/gov module account rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); diff --git a/proto/ethermint/types/v1/account.proto b/proto/ethermint/types/v1/account.proto index fa26a87ed5..937a4072ec 100644 --- a/proto/ethermint/types/v1/account.proto +++ b/proto/ethermint/types/v1/account.proto @@ -7,14 +7,14 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/evmos/ethermint/types"; -// EthAccount implements the authtypes.AccountI interface and embeds an +// EthAccount implements the sdk.AccountI interface and embeds an // authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. message EthAccount { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; - option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.cosmos.auth.v1beta1.AccountI"; + option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.AccountI"; // base_account is an authtypes.BaseAccount cosmos.auth.v1beta1.BaseAccount base_account = 1 diff --git a/proto/ethermint/types/v1/dynamic_fee.proto b/proto/ethermint/types/v1/dynamic_fee.proto index d073b29f81..1b38f07326 100644 --- a/proto/ethermint/types/v1/dynamic_fee.proto +++ b/proto/ethermint/types/v1/dynamic_fee.proto @@ -9,5 +9,5 @@ option go_package = "github.com/evmos/ethermint/types"; message ExtensionOptionDynamicFeeTx { // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 spec string max_priority_price = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + [(gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false]; } diff --git a/rpc/backend/account_info.go b/rpc/backend/account_info.go index 21a483aa51..ea4c130179 100644 --- a/rpc/backend/account_info.go +++ b/rpc/backend/account_info.go @@ -22,6 +22,7 @@ import ( errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" + "github.com/cometbft/cometbft/libs/bytes" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -110,7 +111,7 @@ func (b *Backend) GetProof(address common.Address, storageKeys []string, blockNr } // query account proofs - accountKey := authtypes.AddressStoreKey(sdk.AccAddress(address.Bytes())) + accountKey := bytes.HexBytes(append(authtypes.AddressStoreKeyPrefix, address.Bytes()...)) _, proof, err := b.queryClient.GetProof(clientCtx, authtypes.StoreKey, accountKey) if err != nil { return nil, err diff --git a/rpc/backend/account_info_test.go b/rpc/backend/account_info_test.go index 52b29d0f45..200cf36385 100644 --- a/rpc/backend/account_info_test.go +++ b/rpc/backend/account_info_test.go @@ -138,11 +138,12 @@ func (suite *BackendTestSuite) TestGetProof() { evmtypes.StateKey(address1, common.HexToHash("0x0").Bytes()), tmrpcclient.ABCIQueryOptions{Height: iavlHeight, Prove: true}, ) + addressStoreKey := append(authtypes.AddressStoreKeyPrefix, sdk.AccAddress(address1.Bytes())...) RegisterABCIQueryWithOptions( client, bn.Int64(), "store/acc/key", - authtypes.AddressStoreKey(sdk.AccAddress(address1.Bytes())), + addressStoreKey.Bytes(), tmrpcclient.ABCIQueryOptions{Height: iavlHeight, Prove: true}, ) }, diff --git a/rpc/backend/backend.go b/rpc/backend/backend.go index d7a83931a9..68090e4767 100644 --- a/rpc/backend/backend.go +++ b/rpc/backend/backend.go @@ -21,7 +21,8 @@ import ( "math/big" "time" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + sdkmath "cosmossdk.io/math" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -107,7 +108,7 @@ type EVMBackend interface { // Chain Info ChainID() (*hexutil.Big, error) ChainConfig() *params.ChainConfig - GlobalMinGasPrice() (sdk.Dec, error) + GlobalMinGasPrice() (sdkmath.LegacyDec, error) BaseFee(blockRes *tmrpctypes.ResultBlockResults) (*big.Int, error) CurrentHeader() (*ethtypes.Header, error) PendingTransactions() ([]*sdk.Tx, error) diff --git a/rpc/backend/backend_suite_test.go b/rpc/backend/backend_suite_test.go index 812f049712..7d4666d4e3 100644 --- a/rpc/backend/backend_suite_test.go +++ b/rpc/backend/backend_suite_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - dbm "github.com/cometbft/cometbft-db" + dbm "github.com/cosmos/cosmos-db" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" @@ -21,7 +21,6 @@ import ( "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/crypto/ethsecp256k1" "github.com/evmos/ethermint/crypto/hd" - "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/indexer" "github.com/evmos/ethermint/rpc/backend/mocks" rpctypes "github.com/evmos/ethermint/rpc/types" @@ -70,7 +69,7 @@ func (suite *BackendTestSuite) SetupTest() { suite.Require().NoError(err) suite.signerAddress = sdk.AccAddress(priv.PubKey().Address().Bytes()) - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + encodingConfig := app.MakeConfigForTest() clientCtx := client.Context{}.WithChainID(ChainID). WithHeight(1). WithTxConfig(encodingConfig.TxConfig). @@ -88,7 +87,7 @@ func (suite *BackendTestSuite) SetupTest() { suite.backend.ctx = rpctypes.ContextWithHeight(1) // Add codec - encCfg := encoding.MakeConfig(app.ModuleBasics) + encCfg := app.MakeConfigForTest() suite.backend.clientCtx.Codec = encCfg.Codec } @@ -168,7 +167,7 @@ func (suite *BackendTestSuite) buildFormattedBlock( func (suite *BackendTestSuite) generateTestKeyring(clientDir string) (keyring.Keyring, error) { buf := bufio.NewReader(os.Stdin) - encCfg := encoding.MakeConfig(app.ModuleBasics) + encCfg := app.MakeConfigForTest() return keyring.New(sdk.KeyringServiceName(), keyring.BackendTest, clientDir, buf, encCfg.Codec, []keyring.Option{hd.EthSecp256k1Option()}...) } diff --git a/rpc/backend/blocks.go b/rpc/backend/blocks.go index 10c2abeb21..e66dad96bc 100644 --- a/rpc/backend/blocks.go +++ b/rpc/backend/blocks.go @@ -359,7 +359,7 @@ func (b *Backend) HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error) // BlockBloom query block bloom filter from block results func (b *Backend) BlockBloom(blockRes *tmrpctypes.ResultBlockResults) (ethtypes.Bloom, error) { - for _, event := range blockRes.EndBlockEvents { + for _, event := range blockRes.FinalizeBlockEvents { if event.Type != evmtypes.EventTypeBlockBloom { continue } diff --git a/rpc/backend/blocks_test.go b/rpc/backend/blocks_test.go index 2c7b74d405..5f1bfd92a7 100644 --- a/rpc/backend/blocks_test.go +++ b/rpc/backend/blocks_test.go @@ -4,6 +4,7 @@ import ( "fmt" "math/big" + sdkmath "cosmossdk.io/math" "github.com/cometbft/cometbft/abci/types" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" tmtypes "github.com/cometbft/cometbft/types" @@ -93,7 +94,7 @@ func (suite *BackendTestSuite) TestGetBlockByNumber() { validator sdk.AccAddress tx *evmtypes.MsgEthereumTx txBz []byte - registerMock func(ethrpc.BlockNumber, sdk.Int, sdk.AccAddress, []byte) + registerMock func(ethrpc.BlockNumber, sdkmath.Int, sdk.AccAddress, []byte) expNoop bool expPass bool }{ @@ -101,11 +102,11 @@ func (suite *BackendTestSuite) TestGetBlockByNumber() { "pass - tendermint block not found", ethrpc.BlockNumber(1), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), nil, nil, - func(blockNum ethrpc.BlockNumber, _ sdk.Int, _ sdk.AccAddress, _ []byte) { + func(blockNum ethrpc.BlockNumber, _ sdkmath.Int, _ sdk.AccAddress, _ []byte) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockError(client, height) @@ -117,11 +118,11 @@ func (suite *BackendTestSuite) TestGetBlockByNumber() { "pass - block not found (e.g. request block height that is greater than current one)", ethrpc.BlockNumber(1), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), nil, nil, - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) resBlock, _ = RegisterBlockNotFound(client, height) @@ -133,11 +134,11 @@ func (suite *BackendTestSuite) TestGetBlockByNumber() { "pass - block results error", ethrpc.BlockNumber(1), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), nil, nil, - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) resBlock, _ = RegisterBlock(client, height, txBz) @@ -150,11 +151,11 @@ func (suite *BackendTestSuite) TestGetBlockByNumber() { "pass - without tx", ethrpc.BlockNumber(1), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), nil, nil, - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) resBlock, _ = RegisterBlock(client, height, txBz) @@ -172,11 +173,11 @@ func (suite *BackendTestSuite) TestGetBlockByNumber() { "pass - with tx", ethrpc.BlockNumber(1), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), msgEthereumTx, bz, - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) resBlock, _ = RegisterBlock(client, height, txBz) @@ -194,7 +195,7 @@ func (suite *BackendTestSuite) TestGetBlockByNumber() { for _, tc := range testCases { suite.Run(fmt.Sprintf("Case %s", tc.name), func() { suite.SetupTest() // reset test and queries - tc.registerMock(tc.blockNumber, sdk.NewIntFromBigInt(tc.baseFee), tc.validator, tc.txBz) + tc.registerMock(tc.blockNumber, sdkmath.NewIntFromBigInt(tc.baseFee), tc.validator, tc.txBz) block, err := suite.backend.GetBlockByNumber(tc.blockNumber, tc.fullTx) @@ -238,7 +239,7 @@ func (suite *BackendTestSuite) TestGetBlockByHash() { validator sdk.AccAddress tx *evmtypes.MsgEthereumTx txBz []byte - registerMock func(common.Hash, sdk.Int, sdk.AccAddress, []byte) + registerMock func(common.Hash, sdkmath.Int, sdk.AccAddress, []byte) expNoop bool expPass bool }{ @@ -246,11 +247,11 @@ func (suite *BackendTestSuite) TestGetBlockByHash() { "fail - tendermint failed to get block", common.BytesToHash(block.Hash()), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), nil, nil, - func(hash common.Hash, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(hash common.Hash, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockByHashError(client, hash, txBz) }, @@ -261,11 +262,11 @@ func (suite *BackendTestSuite) TestGetBlockByHash() { "noop - tendermint blockres not found", common.BytesToHash(block.Hash()), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), nil, nil, - func(hash common.Hash, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(hash common.Hash, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockByHashNotFound(client, hash, txBz) }, @@ -276,11 +277,11 @@ func (suite *BackendTestSuite) TestGetBlockByHash() { "noop - tendermint failed to fetch block result", common.BytesToHash(block.Hash()), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), nil, nil, - func(hash common.Hash, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(hash common.Hash, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { height := int64(1) client := suite.backend.clientCtx.Client.(*mocks.Client) resBlock, _ = RegisterBlockByHash(client, hash, txBz) @@ -294,11 +295,11 @@ func (suite *BackendTestSuite) TestGetBlockByHash() { "pass - without tx", common.BytesToHash(block.Hash()), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), nil, nil, - func(hash common.Hash, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(hash common.Hash, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { height := int64(1) client := suite.backend.clientCtx.Client.(*mocks.Client) resBlock, _ = RegisterBlockByHash(client, hash, txBz) @@ -317,11 +318,11 @@ func (suite *BackendTestSuite) TestGetBlockByHash() { "pass - with tx", common.BytesToHash(block.Hash()), true, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), msgEthereumTx, bz, - func(hash common.Hash, baseFee sdk.Int, validator sdk.AccAddress, txBz []byte) { + func(hash common.Hash, baseFee sdkmath.Int, validator sdk.AccAddress, txBz []byte) { height := int64(1) client := suite.backend.clientCtx.Client.(*mocks.Client) resBlock, _ = RegisterBlockByHash(client, hash, txBz) @@ -340,7 +341,7 @@ func (suite *BackendTestSuite) TestGetBlockByHash() { for _, tc := range testCases { suite.Run(fmt.Sprintf("Case %s", tc.name), func() { suite.SetupTest() // reset test and queries - tc.registerMock(tc.hash, sdk.NewIntFromBigInt(tc.baseFee), tc.validator, tc.txBz) + tc.registerMock(tc.hash, sdkmath.NewIntFromBigInt(tc.baseFee), tc.validator, tc.txBz) block, err := suite.backend.GetBlockByHash(tc.hash, tc.fullTx) @@ -649,7 +650,7 @@ func (suite *BackendTestSuite) TestTendermintBlockResultByNumber() { expBlockRes = &tmrpctypes.ResultBlockResults{ Height: blockNum, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, } }, true, @@ -823,7 +824,7 @@ func (suite *BackendTestSuite) TestBlockBloom() { { "fail - non block bloom event type", &tmrpctypes.ResultBlockResults{ - EndBlockEvents: []types.Event{{Type: evmtypes.EventTypeEthereumTx}}, + FinalizeBlockEvents: []types.Event{{Type: evmtypes.EventTypeEthereumTx}}, }, ethtypes.Bloom{}, false, @@ -831,7 +832,7 @@ func (suite *BackendTestSuite) TestBlockBloom() { { "fail - nonblock bloom attribute key", &tmrpctypes.ResultBlockResults{ - EndBlockEvents: []types.Event{ + FinalizeBlockEvents: []types.Event{ { Type: evmtypes.EventTypeBlockBloom, Attributes: []types.EventAttribute{ @@ -846,7 +847,7 @@ func (suite *BackendTestSuite) TestBlockBloom() { { "pass - block bloom attribute key", &tmrpctypes.ResultBlockResults{ - EndBlockEvents: []types.Event{ + FinalizeBlockEvents: []types.Event{ { Type: evmtypes.EventTypeBlockBloom, Attributes: []types.EventAttribute{ @@ -885,22 +886,22 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { resBlock *tmrpctypes.ResultBlock blockRes *tmrpctypes.ResultBlockResults fullTx bool - registerMock func(sdk.Int, sdk.AccAddress, int64) + registerMock func(sdkmath.Int, sdk.AccAddress, int64) expTxs bool expPass bool }{ { "pass - block without tx", - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(common.Address{}.Bytes()), int64(1), &tmrpctypes.ResultBlock{Block: emptyBlock}, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, }, false, - func(baseFee sdk.Int, validator sdk.AccAddress, height int64) { + func(baseFee sdkmath.Int, validator sdk.AccAddress, height int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFee(queryClient, baseFee) RegisterValidatorAccount(queryClient, validator) @@ -921,10 +922,10 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, }, true, - func(baseFee sdk.Int, validator sdk.AccAddress, height int64) { + func(baseFee sdkmath.Int, validator sdk.AccAddress, height int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFeeError(queryClient) RegisterValidatorAccount(queryClient, validator) @@ -937,7 +938,7 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, { "pass - block with tx - with ValidatorAccount error", - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(common.Address{}.Bytes()), int64(1), &tmrpctypes.ResultBlock{ @@ -945,10 +946,10 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, }, true, - func(baseFee sdk.Int, validator sdk.AccAddress, height int64) { + func(baseFee sdkmath.Int, validator sdk.AccAddress, height int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFee(queryClient, baseFee) RegisterValidatorAccountError(queryClient) @@ -961,7 +962,7 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, { "pass - block with tx - with ConsensusParams error - BlockMaxGas defaults to max uint32", - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), int64(1), &tmrpctypes.ResultBlock{ @@ -969,10 +970,10 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, }, true, - func(baseFee sdk.Int, validator sdk.AccAddress, height int64) { + func(baseFee sdkmath.Int, validator sdk.AccAddress, height int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFee(queryClient, baseFee) RegisterValidatorAccount(queryClient, validator) @@ -985,7 +986,7 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, { "pass - block with tx - with ShouldIgnoreGasUsed - empty txs", - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), int64(1), &tmrpctypes.ResultBlock{ @@ -993,7 +994,7 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{ + TxsResults: []*types.ExecTxResult{ { Code: 11, GasUsed: 0, @@ -1002,7 +1003,7 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, }, true, - func(baseFee sdk.Int, validator sdk.AccAddress, height int64) { + func(baseFee sdkmath.Int, validator sdk.AccAddress, height int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFee(queryClient, baseFee) RegisterValidatorAccount(queryClient, validator) @@ -1015,7 +1016,7 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, { "pass - block with tx - non fullTx", - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), int64(1), &tmrpctypes.ResultBlock{ @@ -1023,10 +1024,10 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, }, false, - func(baseFee sdk.Int, validator sdk.AccAddress, height int64) { + func(baseFee sdkmath.Int, validator sdk.AccAddress, height int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFee(queryClient, baseFee) RegisterValidatorAccount(queryClient, validator) @@ -1039,7 +1040,7 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, { "pass - block with tx", - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), sdk.AccAddress(tests.GenerateAddress().Bytes()), int64(1), &tmrpctypes.ResultBlock{ @@ -1047,10 +1048,10 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { }, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, }, true, - func(baseFee sdk.Int, validator sdk.AccAddress, height int64) { + func(baseFee sdkmath.Int, validator sdk.AccAddress, height int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFee(queryClient, baseFee) RegisterValidatorAccount(queryClient, validator) @@ -1065,7 +1066,7 @@ func (suite *BackendTestSuite) TestGetEthBlockFromTendermint() { for _, tc := range testCases { suite.Run(fmt.Sprintf("Case %s", tc.name), func() { suite.SetupTest() // reset test and queries - tc.registerMock(sdk.NewIntFromBigInt(tc.baseFee), tc.validator, tc.height) + tc.registerMock(sdkmath.NewIntFromBigInt(tc.baseFee), tc.validator, tc.height) block, err := suite.backend.RPCBlockFromTendermintBlock(tc.resBlock, tc.blockRes, tc.fullTx) @@ -1133,7 +1134,7 @@ func (suite *BackendTestSuite) TestEthMsgsFromTendermintBlock() { Block: tmtypes.MakeBlock(1, []tmtypes.Tx{bz}, nil, nil), }, &tmrpctypes.ResultBlockResults{ - TxsResults: []*types.ResponseDeliverTx{ + TxsResults: []*types.ExecTxResult{ { Code: 1, }, @@ -1147,7 +1148,7 @@ func (suite *BackendTestSuite) TestEthMsgsFromTendermintBlock() { Block: tmtypes.MakeBlock(1, []tmtypes.Tx{bz}, nil, nil), }, &tmrpctypes.ResultBlockResults{ - TxsResults: []*types.ResponseDeliverTx{ + TxsResults: []*types.ExecTxResult{ { Code: 1, Log: ethrpc.ExceedBlockGasLimitError, @@ -1162,7 +1163,7 @@ func (suite *BackendTestSuite) TestEthMsgsFromTendermintBlock() { Block: tmtypes.MakeBlock(1, []tmtypes.Tx{bz}, nil, nil), }, &tmrpctypes.ResultBlockResults{ - TxsResults: []*types.ResponseDeliverTx{ + TxsResults: []*types.ExecTxResult{ { Code: 0, Log: ethrpc.ExceedBlockGasLimitError, @@ -1191,14 +1192,14 @@ func (suite *BackendTestSuite) TestHeaderByNumber() { name string blockNumber ethrpc.BlockNumber baseFee *big.Int - registerMock func(ethrpc.BlockNumber, sdk.Int) + registerMock func(ethrpc.BlockNumber, sdkmath.Int) expPass bool }{ { "fail - tendermint client failed to get block", ethrpc.BlockNumber(1), - sdk.NewInt(1).BigInt(), - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockError(client, height) @@ -1208,8 +1209,8 @@ func (suite *BackendTestSuite) TestHeaderByNumber() { { "fail - block not found for height", ethrpc.BlockNumber(1), - sdk.NewInt(1).BigInt(), - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockNotFound(client, height) @@ -1219,8 +1220,8 @@ func (suite *BackendTestSuite) TestHeaderByNumber() { { "fail - block not found for height", ethrpc.BlockNumber(1), - sdk.NewInt(1).BigInt(), - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlock(client, height, nil) @@ -1232,7 +1233,7 @@ func (suite *BackendTestSuite) TestHeaderByNumber() { "pass - without Base Fee, failed to fetch from prunned block", ethrpc.BlockNumber(1), nil, - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int) { + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) expResultBlock, _ = RegisterBlock(client, height, nil) @@ -1246,8 +1247,8 @@ func (suite *BackendTestSuite) TestHeaderByNumber() { { "pass - blockNum = 1, without tx", ethrpc.BlockNumber(1), - sdk.NewInt(1).BigInt(), - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) expResultBlock, _ = RegisterBlock(client, height, nil) @@ -1261,8 +1262,8 @@ func (suite *BackendTestSuite) TestHeaderByNumber() { { "pass - blockNum = 1, with tx", ethrpc.BlockNumber(1), - sdk.NewInt(1).BigInt(), - func(blockNum ethrpc.BlockNumber, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(blockNum ethrpc.BlockNumber, baseFee sdkmath.Int) { height := blockNum.Int64() client := suite.backend.clientCtx.Client.(*mocks.Client) expResultBlock, _ = RegisterBlock(client, height, bz) @@ -1278,7 +1279,7 @@ func (suite *BackendTestSuite) TestHeaderByNumber() { suite.Run(fmt.Sprintf("Case %s", tc.name), func() { suite.SetupTest() // reset test and queries - tc.registerMock(tc.blockNumber, sdk.NewIntFromBigInt(tc.baseFee)) + tc.registerMock(tc.blockNumber, sdkmath.NewIntFromBigInt(tc.baseFee)) header, err := suite.backend.HeaderByNumber(tc.blockNumber) if tc.expPass { @@ -1303,14 +1304,14 @@ func (suite *BackendTestSuite) TestHeaderByHash() { name string hash common.Hash baseFee *big.Int - registerMock func(common.Hash, sdk.Int) + registerMock func(common.Hash, sdkmath.Int) expPass bool }{ { "fail - tendermint client failed to get block", common.BytesToHash(block.Hash()), - sdk.NewInt(1).BigInt(), - func(hash common.Hash, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(hash common.Hash, baseFee sdkmath.Int) { client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockByHashError(client, hash, bz) }, @@ -1319,8 +1320,8 @@ func (suite *BackendTestSuite) TestHeaderByHash() { { "fail - block not found for height", common.BytesToHash(block.Hash()), - sdk.NewInt(1).BigInt(), - func(hash common.Hash, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(hash common.Hash, baseFee sdkmath.Int) { client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockByHashNotFound(client, hash, bz) }, @@ -1329,8 +1330,8 @@ func (suite *BackendTestSuite) TestHeaderByHash() { { "fail - block not found for height", common.BytesToHash(block.Hash()), - sdk.NewInt(1).BigInt(), - func(hash common.Hash, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(hash common.Hash, baseFee sdkmath.Int) { height := int64(1) client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockByHash(client, hash, bz) @@ -1342,7 +1343,7 @@ func (suite *BackendTestSuite) TestHeaderByHash() { "pass - without Base Fee, failed to fetch from prunned block", common.BytesToHash(block.Hash()), nil, - func(hash common.Hash, baseFee sdk.Int) { + func(hash common.Hash, baseFee sdkmath.Int) { height := int64(1) client := suite.backend.clientCtx.Client.(*mocks.Client) expResultBlock, _ = RegisterBlockByHash(client, hash, bz) @@ -1356,8 +1357,8 @@ func (suite *BackendTestSuite) TestHeaderByHash() { { "pass - blockNum = 1, without tx", common.BytesToHash(emptyBlock.Hash()), - sdk.NewInt(1).BigInt(), - func(hash common.Hash, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(hash common.Hash, baseFee sdkmath.Int) { height := int64(1) client := suite.backend.clientCtx.Client.(*mocks.Client) expResultBlock, _ = RegisterBlockByHash(client, hash, nil) @@ -1371,8 +1372,8 @@ func (suite *BackendTestSuite) TestHeaderByHash() { { "pass - with tx", common.BytesToHash(block.Hash()), - sdk.NewInt(1).BigInt(), - func(hash common.Hash, baseFee sdk.Int) { + sdkmath.NewInt(1).BigInt(), + func(hash common.Hash, baseFee sdkmath.Int) { height := int64(1) client := suite.backend.clientCtx.Client.(*mocks.Client) expResultBlock, _ = RegisterBlockByHash(client, hash, bz) @@ -1388,7 +1389,7 @@ func (suite *BackendTestSuite) TestHeaderByHash() { suite.Run(fmt.Sprintf("Case %s", tc.name), func() { suite.SetupTest() // reset test and queries - tc.registerMock(tc.hash, sdk.NewIntFromBigInt(tc.baseFee)) + tc.registerMock(tc.hash, sdkmath.NewIntFromBigInt(tc.baseFee)) header, err := suite.backend.HeaderByHash(tc.hash) if tc.expPass { @@ -1446,14 +1447,14 @@ func (suite *BackendTestSuite) TestEthBlockByNumber() { RegisterBlockResults(client, blockNum.Int64()) queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) - baseFee := sdk.NewInt(1) + baseFee := sdkmath.NewInt(1) RegisterBaseFee(queryClient, baseFee) }, ethtypes.NewBlock( ethrpc.EthHeaderFromTendermint( emptyBlock.Header, ethtypes.Bloom{}, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), ), []*ethtypes.Transaction{}, nil, @@ -1472,14 +1473,14 @@ func (suite *BackendTestSuite) TestEthBlockByNumber() { RegisterBlockResults(client, blockNum.Int64()) queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) - baseFee := sdk.NewInt(1) + baseFee := sdkmath.NewInt(1) RegisterBaseFee(queryClient, baseFee) }, ethtypes.NewBlock( ethrpc.EthHeaderFromTendermint( emptyBlock.Header, ethtypes.Bloom{}, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), ), []*ethtypes.Transaction{msgEthereumTx.AsTransaction()}, nil, @@ -1521,21 +1522,21 @@ func (suite *BackendTestSuite) TestEthBlockFromTendermintBlock() { baseFee *big.Int resBlock *tmrpctypes.ResultBlock blockRes *tmrpctypes.ResultBlockResults - registerMock func(sdk.Int, int64) + registerMock func(sdkmath.Int, int64) expEthBlock *ethtypes.Block expPass bool }{ { "pass - block without tx", - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), &tmrpctypes.ResultBlock{ Block: emptyBlock, }, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, }, - func(baseFee sdk.Int, blockNum int64) { + func(baseFee sdkmath.Int, blockNum int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFee(queryClient, baseFee) }, @@ -1543,7 +1544,7 @@ func (suite *BackendTestSuite) TestEthBlockFromTendermintBlock() { ethrpc.EthHeaderFromTendermint( emptyBlock.Header, ethtypes.Bloom{}, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), ), []*ethtypes.Transaction{}, nil, @@ -1554,14 +1555,14 @@ func (suite *BackendTestSuite) TestEthBlockFromTendermintBlock() { }, { "pass - block with tx", - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), &tmrpctypes.ResultBlock{ Block: tmtypes.MakeBlock(1, []tmtypes.Tx{bz}, nil, nil), }, &tmrpctypes.ResultBlockResults{ Height: 1, - TxsResults: []*types.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, - EndBlockEvents: []types.Event{ + TxsResults: []*types.ExecTxResult{{Code: 0, GasUsed: 0}}, + FinalizeBlockEvents: []types.Event{ { Type: evmtypes.EventTypeBlockBloom, Attributes: []types.EventAttribute{ @@ -1570,7 +1571,7 @@ func (suite *BackendTestSuite) TestEthBlockFromTendermintBlock() { }, }, }, - func(baseFee sdk.Int, blockNum int64) { + func(baseFee sdkmath.Int, blockNum int64) { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBaseFee(queryClient, baseFee) }, @@ -1578,7 +1579,7 @@ func (suite *BackendTestSuite) TestEthBlockFromTendermintBlock() { ethrpc.EthHeaderFromTendermint( emptyBlock.Header, ethtypes.Bloom{}, - sdk.NewInt(1).BigInt(), + sdkmath.NewInt(1).BigInt(), ), []*ethtypes.Transaction{msgEthereumTx.AsTransaction()}, nil, @@ -1591,7 +1592,7 @@ func (suite *BackendTestSuite) TestEthBlockFromTendermintBlock() { for _, tc := range testCases { suite.Run(fmt.Sprintf("Case %s", tc.name), func() { suite.SetupTest() // reset test and queries - tc.registerMock(sdk.NewIntFromBigInt(tc.baseFee), tc.blockRes.Height) + tc.registerMock(sdkmath.NewIntFromBigInt(tc.baseFee), tc.blockRes.Height) ethBlock, err := suite.backend.EthBlockFromTendermintBlock(tc.resBlock, tc.blockRes) diff --git a/rpc/backend/call_tx_test.go b/rpc/backend/call_tx_test.go index 033b3602e7..dcca7109de 100644 --- a/rpc/backend/call_tx_test.go +++ b/rpc/backend/call_tx_test.go @@ -5,7 +5,7 @@ import ( "fmt" "math/big" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/rlp" @@ -18,7 +18,7 @@ import ( func (suite *BackendTestSuite) TestResend() { txNonce := (hexutil.Uint64)(1) - baseFee := sdk.NewInt(1) + baseFee := sdkmath.NewInt(1) gasPrice := new(hexutil.Big) toAddr := tests.GenerateAddress() chainID := (*hexutil.Big)(suite.backend.chainID) @@ -455,7 +455,7 @@ func (suite *BackendTestSuite) TestGasPrice() { RegisterParams(queryClient, &header, 1) RegisterBlock(client, 1, nil) RegisterBlockResults(client, 1) - RegisterBaseFee(queryClient, sdk.NewInt(1)) + RegisterBaseFee(queryClient, sdkmath.NewInt(1)) }, defaultGasPrice, true, @@ -471,7 +471,7 @@ func (suite *BackendTestSuite) TestGasPrice() { RegisterParams(queryClient, &header, 1) RegisterBlock(client, 1, nil) RegisterBlockResults(client, 1) - RegisterBaseFee(queryClient, sdk.NewInt(1)) + RegisterBaseFee(queryClient, sdkmath.NewInt(1)) }, defaultGasPrice, false, diff --git a/rpc/backend/chain_info.go b/rpc/backend/chain_info.go index 513a6a1c5c..bf01e0f661 100644 --- a/rpc/backend/chain_info.go +++ b/rpc/backend/chain_info.go @@ -21,8 +21,9 @@ import ( "strconv" "sync" - tmrpcclient "github.com/cometbft/cometbft/rpc/client" - tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" + sdkmath "cosmossdk.io/math" + cmtrpcclient "github.com/cometbft/cometbft/rpc/client" + cmtrpctypes "github.com/cometbft/cometbft/rpc/core/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" @@ -67,10 +68,10 @@ func (b *Backend) ChainConfig() *params.ChainConfig { } // GlobalMinGasPrice returns MinGasPrice param from FeeMarket -func (b *Backend) GlobalMinGasPrice() (sdk.Dec, error) { +func (b *Backend) GlobalMinGasPrice() (sdkmath.LegacyDec, error) { res, err := b.queryClient.FeeMarket.Params(b.ctx, &feemarkettypes.QueryParamsRequest{}) if err != nil { - return sdk.ZeroDec(), err + return sdkmath.LegacyZeroDec(), err } return res.Params.MinGasPrice, nil } @@ -79,15 +80,15 @@ func (b *Backend) GlobalMinGasPrice() (sdk.Dec, error) { // If the base fee is not enabled globally, the query returns nil. // If the London hard fork is not activated at the current height, the query will // return nil. -func (b *Backend) BaseFee(blockRes *tmrpctypes.ResultBlockResults) (*big.Int, error) { +func (b *Backend) BaseFee(blockRes *cmtrpctypes.ResultBlockResults) (*big.Int, error) { // return BaseFee if London hard fork is activated and feemarket is enabled res, err := b.queryClient.BaseFee(rpctypes.ContextWithHeight(blockRes.Height), &evmtypes.QueryBaseFeeRequest{}) if err != nil || res.BaseFee == nil { // we can't tell if it's london HF not enabled or the state is pruned, // in either case, we'll fallback to parsing from begin blocker event, // faster to iterate reversely - for i := len(blockRes.BeginBlockEvents) - 1; i >= 0; i-- { - evt := blockRes.BeginBlockEvents[i] + for i := len(blockRes.FinalizeBlockEvents) - 1; i >= 0; i-- { + evt := blockRes.FinalizeBlockEvents[i] if evt.Type == feemarkettypes.EventTypeFeeMarket && len(evt.Attributes) > 0 { baseFee, err := strconv.ParseInt(evt.Attributes[0].Value, 10, 64) if err == nil { @@ -114,7 +115,7 @@ func (b *Backend) CurrentHeader() (*ethtypes.Header, error) { // PendingTransactions returns the transactions that are in the transaction pool // and have a from address that is one of the accounts this node manages. func (b *Backend) PendingTransactions() ([]*sdk.Tx, error) { - mc, ok := b.clientCtx.Client.(tmrpcclient.MempoolClient) + mc, ok := b.clientCtx.Client.(cmtrpcclient.MempoolClient) if !ok { return nil, errors.New("invalid rpc client") } diff --git a/rpc/backend/chain_info_test.go b/rpc/backend/chain_info_test.go index 22766b034d..a38d3e1580 100644 --- a/rpc/backend/chain_info_test.go +++ b/rpc/backend/chain_info_test.go @@ -15,13 +15,14 @@ import ( tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/evmos/ethermint/rpc/backend/mocks" evmtypes "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" ) func (suite *BackendTestSuite) TestBaseFee() { - baseFee := sdk.NewInt(1) + baseFee := sdkmath.NewInt(1) testCases := []struct { name string @@ -44,7 +45,7 @@ func (suite *BackendTestSuite) TestBaseFee() { "fail - grpc BaseFee error - with non feemarket block event", &tmrpctypes.ResultBlockResults{ Height: 1, - BeginBlockEvents: []types.Event{ + FinalizeBlockEvents: []types.Event{ { Type: evmtypes.EventTypeBlockBloom, }, @@ -61,7 +62,7 @@ func (suite *BackendTestSuite) TestBaseFee() { "fail - grpc BaseFee error - with feemarket block event", &tmrpctypes.ResultBlockResults{ Height: 1, - BeginBlockEvents: []types.Event{ + FinalizeBlockEvents: []types.Event{ { Type: feemarkettypes.EventTypeFeeMarket, }, @@ -78,7 +79,7 @@ func (suite *BackendTestSuite) TestBaseFee() { "fail - grpc BaseFee error - with feemarket block event with wrong attribute value", &tmrpctypes.ResultBlockResults{ Height: 1, - BeginBlockEvents: []types.Event{ + FinalizeBlockEvents: []types.Event{ { Type: feemarkettypes.EventTypeFeeMarket, Attributes: []types.EventAttribute{ @@ -98,7 +99,7 @@ func (suite *BackendTestSuite) TestBaseFee() { "fail - grpc baseFee error - with feemarket block event with baseFee attribute value", &tmrpctypes.ResultBlockResults{ Height: 1, - BeginBlockEvents: []types.Event{ + FinalizeBlockEvents: []types.Event{ { Type: feemarkettypes.EventTypeFeeMarket, Attributes: []types.EventAttribute{ @@ -289,7 +290,7 @@ func (suite *BackendTestSuite) TestGlobalMinGasPrice() { testCases := []struct { name string registerMock func() - expMinGasPrice sdk.Dec + expMinGasPrice sdkmath.LegacyDec expPass bool }{ { @@ -298,7 +299,7 @@ func (suite *BackendTestSuite) TestGlobalMinGasPrice() { feeMarketCleint := suite.backend.queryClient.FeeMarket.(*mocks.FeeMarketQueryClient) RegisterFeeMarketParamsError(feeMarketCleint, int64(1)) }, - sdk.ZeroDec(), + sdkmath.LegacyZeroDec(), false, }, } @@ -428,7 +429,7 @@ func (suite *BackendTestSuite) TestFeeHistory() { "pass - Valid FeeHistoryResults object", func(validator sdk.AccAddress) { var header metadata.MD - baseFee := sdk.NewInt(1) + baseFee := sdkmath.NewInt(1) queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) fQueryClient := suite.backend.queryClient.FeeMarket.(*mocks.FeeMarketQueryClient) client := suite.backend.clientCtx.Client.(*mocks.Client) @@ -458,7 +459,7 @@ func (suite *BackendTestSuite) TestFeeHistory() { "pass - Concurrent FeeHistoryResults object", func(validator sdk.AccAddress) { var header metadata.MD - baseFee := sdk.NewInt(1) + baseFee := sdkmath.NewInt(1) queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) fQueryClient := suite.backend.queryClient.FeeMarket.(*mocks.FeeMarketQueryClient) client := suite.backend.clientCtx.Client.(*mocks.Client) diff --git a/rpc/backend/client_test.go b/rpc/backend/client_test.go index 0e16719bda..ab49c09171 100644 --- a/rpc/backend/client_test.go +++ b/rpc/backend/client_test.go @@ -195,7 +195,7 @@ func RegisterBlockResultsWithEventLog(client *mocks.Client, height int64) (*tmrp res := &tmrpctypes.ResultBlockResults{ Height: height, - TxsResults: []*abci.ResponseDeliverTx{ + TxsResults: []*abci.ExecTxResult{ {Code: 0, GasUsed: 0, Data: data}, }, } @@ -211,7 +211,7 @@ func RegisterBlockResults( ) (*tmrpctypes.ResultBlockResults, error) { res := &tmrpctypes.ResultBlockResults{ Height: height, - TxsResults: []*abci.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*abci.ExecTxResult{{Code: 0, GasUsed: 0}}, } client.On("BlockResults", rpc.ContextWithHeight(height), mock.AnythingOfType("*int64")). @@ -232,7 +232,7 @@ func TestRegisterBlockResults(t *testing.T) { res, err := client.BlockResults(rpc.ContextWithHeight(height), &height) expRes := &tmrpctypes.ResultBlockResults{ Height: height, - TxsResults: []*abci.ResponseDeliverTx{{Code: 0, GasUsed: 0}}, + TxsResults: []*abci.ExecTxResult{{Code: 0, GasUsed: 0}}, } require.Equal(t, expRes, res) require.NoError(t, err) diff --git a/rpc/backend/evm_query_client_test.go b/rpc/backend/evm_query_client_test.go index bb17b7e81f..357901a5fc 100644 --- a/rpc/backend/evm_query_client_test.go +++ b/rpc/backend/evm_query_client_test.go @@ -7,6 +7,7 @@ import ( "strconv" "testing" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" @@ -157,7 +158,7 @@ func RegisterEstimateGas(queryClient *mocks.EVMQueryClient, args evmtypes.Transa } // BaseFee -func RegisterBaseFee(queryClient *mocks.EVMQueryClient, baseFee sdk.Int) { +func RegisterBaseFee(queryClient *mocks.EVMQueryClient, baseFee sdkmath.Int) { queryClient.On("BaseFee", rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}). Return(&evmtypes.QueryBaseFeeResponse{BaseFee: &baseFee}, nil) } @@ -175,7 +176,7 @@ func RegisterBaseFeeDisabled(queryClient *mocks.EVMQueryClient) { } func TestRegisterBaseFee(t *testing.T) { - baseFee := sdk.NewInt(1) + baseFee := sdkmath.NewInt(1) queryClient := mocks.NewEVMQueryClient(t) RegisterBaseFee(queryClient, baseFee) res, err := queryClient.BaseFee(rpc.ContextWithHeight(1), &evmtypes.QueryBaseFeeRequest{}) diff --git a/rpc/backend/node_info.go b/rpc/backend/node_info.go index 14972ab3e0..94745a040b 100644 --- a/rpc/backend/node_info.go +++ b/rpc/backend/node_info.go @@ -22,7 +22,7 @@ import ( errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" - tmtypes "github.com/cometbft/cometbft/types" + cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdkcrypto "github.com/cosmos/cosmos-sdk/crypto" @@ -99,11 +99,6 @@ func (b *Backend) SetEtherbase(etherbase common.Address) bool { withdrawAddr := sdk.AccAddress(etherbase.Bytes()) msg := distributiontypes.NewMsgSetWithdrawAddress(delAddr, withdrawAddr) - if err := msg.ValidateBasic(); err != nil { - b.logger.Debug("tx failed basic validation", "error", err.Error()) - return false - } - // Assemble transaction from fields builder, ok := b.clientCtx.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder) if !ok { @@ -160,7 +155,7 @@ func (b *Backend) SetEtherbase(etherbase common.Address) bool { return false } - if err := tx.Sign(txFactory, keyInfo.Name, builder, false); err != nil { + if err := tx.Sign(b.clientCtx.CmdContext, txFactory, keyInfo.Name, builder, false); err != nil { b.logger.Debug("failed to sign tx", "error", err.Error()) return false } @@ -173,7 +168,7 @@ func (b *Backend) SetEtherbase(etherbase common.Address) bool { return false } - tmHash := common.BytesToHash(tmtypes.Tx(txBytes).Hash()) + tmHash := common.BytesToHash(cmttypes.Tx(txBytes).Hash()) // Broadcast transaction in sync mode (default) // NOTE: If error is encountered on the node, the broadcast will not return an error @@ -286,7 +281,7 @@ func (b *Backend) SetGasPrice(gasPrice hexutil.Big) bool { unit = minGasPrices[0].Denom } - c := sdk.NewDecCoin(unit, sdk.NewIntFromBigInt(gasPrice.ToInt())) + c := sdk.NewDecCoin(unit, sdkmath.NewIntFromBigInt(gasPrice.ToInt())) appConf.SetMinGasPrices(sdk.DecCoins{c}) sdkconfig.WriteConfigFile(b.clientCtx.Viper.ConfigFileUsed(), appConf) diff --git a/rpc/backend/node_info_test.go b/rpc/backend/node_info_test.go index 1210670f08..e4bf7e3b10 100644 --- a/rpc/backend/node_info_test.go +++ b/rpc/backend/node_info_test.go @@ -4,7 +4,7 @@ import ( "fmt" "math/big" - "cosmossdk.io/math" + sdkmath "cosmossdk.io/math" tmrpcclient "github.com/cometbft/cometbft/rpc/client" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -49,7 +49,7 @@ func (suite *BackendTestSuite) TestRPCMinGasPrice() { func() { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterParamsWithoutHeader(queryClient, 1) - amt, _ := math.NewIntFromString("18446744073709551616") + amt, _ := sdkmath.NewIntFromString("18446744073709551616") suite.backend.cfg.SetMinGasPrices([]sdk.DecCoin{sdk.NewDecCoin(ethermint.AttoPhoton, amt)}) }, bigPrice, @@ -268,7 +268,7 @@ func (suite *BackendTestSuite) TestSetEtherbase() { RegisterStatus(client) RegisterValidatorAccount(queryClient, suite.acc) RegisterParams(queryClient, &header, 1) - c := sdk.NewDecCoin("aphoton", sdk.NewIntFromBigInt(big.NewInt(1))) + c := sdk.NewDecCoin("aphoton", sdkmath.NewIntFromBigInt(big.NewInt(1))) suite.backend.cfg.SetMinGasPrices(sdk.DecCoins{c}) delAddr, _ := suite.backend.GetCoinbase() // account, _ := suite.backend.clientCtx.AccountRetriever.GetAccount(suite.backend.clientCtx, delAddr) @@ -293,7 +293,7 @@ func (suite *BackendTestSuite) TestSetEtherbase() { // queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) // RegisterStatus(client) // RegisterValidatorAccount(queryClient, suite.acc) - // c := sdk.NewDecCoin("aphoton", sdk.NewIntFromBigInt(big.NewInt(1))) + // c := sdk.NewDecCoin("aphoton", sdkmath.NewIntFromBigInt(big.NewInt(1))) // suite.backend.cfg.SetMinGasPrices(sdk.DecCoins{c}) // delAddr, _ := suite.backend.GetCoinbase() // account, _ := suite.backend.clientCtx.AccountRetriever.GetAccount(suite.backend.clientCtx, delAddr) diff --git a/rpc/backend/sign_tx.go b/rpc/backend/sign_tx.go index 0c16da0c34..1727120003 100644 --- a/rpc/backend/sign_tx.go +++ b/rpc/backend/sign_tx.go @@ -23,6 +23,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" + signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -130,7 +131,7 @@ func (b *Backend) Sign(address common.Address, data hexutil.Bytes) (hexutil.Byte } // Sign the requested hash with the wallet - signature, _, err := b.clientCtx.Keyring.SignByAddress(from, data) + signature, _, err := b.clientCtx.Keyring.SignByAddress(from, data, signingtypes.SignMode_SIGN_MODE_TEXTUAL) if err != nil { b.logger.Error("keyring.SignByAddress failed", "address", address.Hex()) return nil, err @@ -156,7 +157,7 @@ func (b *Backend) SignTypedData(address common.Address, typedData apitypes.Typed } // Sign the requested hash with the wallet - signature, _, err := b.clientCtx.Keyring.SignByAddress(from, sigHash) + signature, _, err := b.clientCtx.Keyring.SignByAddress(from, sigHash, signingtypes.SignMode_SIGN_MODE_TEXTUAL) if err != nil { b.logger.Error("keyring.SignByAddress failed", "address", address.Hex()) return nil, err diff --git a/rpc/backend/sign_tx_test.go b/rpc/backend/sign_tx_test.go index eccf9ee131..6d1dce3dc7 100644 --- a/rpc/backend/sign_tx_test.go +++ b/rpc/backend/sign_tx_test.go @@ -3,8 +3,10 @@ package backend import ( "fmt" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/crypto" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -25,7 +27,7 @@ func (suite *BackendTestSuite) TestSendTransaction() { priv, _ := ethsecp256k1.GenerateKey() from := common.BytesToAddress(priv.PubKey().Address().Bytes()) nonce := hexutil.Uint64(1) - baseFee := sdk.NewInt(1) + baseFee := sdkmath.NewInt(1) callArgsDefault := evmtypes.TransactionArgs{ From: &from, To: &toAddr, @@ -200,7 +202,7 @@ func (suite *BackendTestSuite) TestSign() { responseBz, err := suite.backend.Sign(tc.fromAddr, tc.inputBz) if tc.expPass { - signature, _, err := suite.backend.clientCtx.Keyring.SignByAddress((sdk.AccAddress)(from.Bytes()), tc.inputBz) + signature, _, err := suite.backend.clientCtx.Keyring.SignByAddress((sdk.AccAddress)(from.Bytes()), tc.inputBz, signing.SignMode_SIGN_MODE_TEXTUAL) signature[goethcrypto.RecoveryIDOffset] += 27 suite.Require().NoError(err) suite.Require().Equal((hexutil.Bytes)(signature), responseBz) @@ -249,7 +251,8 @@ func (suite *BackendTestSuite) TestSignTypedData() { if tc.expPass { sigHash, _, err := apitypes.TypedDataAndHash(tc.inputTypedData) - signature, _, err := suite.backend.clientCtx.Keyring.SignByAddress((sdk.AccAddress)(from.Bytes()), sigHash) + suite.Require().NoError(err) + signature, _, err := suite.backend.clientCtx.Keyring.SignByAddress((sdk.AccAddress)(from.Bytes()), sigHash, signing.SignMode_SIGN_MODE_TEXTUAL) signature[goethcrypto.RecoveryIDOffset] += 27 suite.Require().NoError(err) suite.Require().Equal((hexutil.Bytes)(signature), responseBz) diff --git a/rpc/backend/tracing_test.go b/rpc/backend/tracing_test.go index 196f68bf88..83d8bc1060 100644 --- a/rpc/backend/tracing_test.go +++ b/rpc/backend/tracing_test.go @@ -5,9 +5,9 @@ import ( "fmt" "math/big" - dbm "github.com/cometbft/cometbft-db" + dbm "github.com/cosmos/cosmos-db" abci "github.com/cometbft/cometbft/abci/types" - tmlog "github.com/cometbft/cometbft/libs/log" + tmlog "cosmossdk.io/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cometbft/cometbft/types" tmtypes "github.com/cometbft/cometbft/types" @@ -56,7 +56,7 @@ func (suite *BackendTestSuite) TestTraceTransaction() { name string registerMock func() block *types.Block - responseBlock []*abci.ResponseDeliverTx + responseBlock []*abci.ExecTxResult expResult interface{} expPass bool }{ @@ -64,7 +64,7 @@ func (suite *BackendTestSuite) TestTraceTransaction() { "fail - tx not found", func() {}, &types.Block{Header: types.Header{Height: 1}, Data: types.Data{Txs: []types.Tx{}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -90,7 +90,7 @@ func (suite *BackendTestSuite) TestTraceTransaction() { RegisterBlockError(client, 1) }, &types.Block{Header: types.Header{Height: 1}, Data: types.Data{Txs: []types.Tx{txBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -117,7 +117,7 @@ func (suite *BackendTestSuite) TestTraceTransaction() { RegisterTraceTransactionWithPredecessors(queryClient, msgEthereumTx, []*evmtypes.MsgEthereumTx{msgEthereumTx}) }, &types.Block{Header: types.Header{Height: 1, ChainID: ChainID}, Data: types.Data{Txs: []types.Tx{txBz, txBz2}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -157,7 +157,7 @@ func (suite *BackendTestSuite) TestTraceTransaction() { RegisterTraceTransaction(queryClient, msgEthereumTx) }, &types.Block{Header: types.Header{Height: 1}, Data: types.Data{Txs: []types.Tx{txBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ diff --git a/rpc/backend/tx_info_test.go b/rpc/backend/tx_info_test.go index c8637ce596..a1ed1873eb 100644 --- a/rpc/backend/tx_info_test.go +++ b/rpc/backend/tx_info_test.go @@ -4,12 +4,12 @@ import ( "fmt" "math/big" - dbm "github.com/cometbft/cometbft-db" + sdkmath "cosmossdk.io/math" + dbm "github.com/cosmos/cosmos-db" abci "github.com/cometbft/cometbft/abci/types" - tmlog "github.com/cometbft/cometbft/libs/log" + tmlog "cosmossdk.io/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cometbft/cometbft/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/evmos/ethermint/indexer" @@ -26,7 +26,7 @@ func (suite *BackendTestSuite) TestGetTransactionByHash() { txBz := suite.signAndEncodeEthTx(msgEthereumTx) block := &types.Block{Header: types.Header{Height: 1, ChainID: "test"}, Data: types.Data{Txs: []types.Tx{txBz}}} - responseDeliver := []*abci.ResponseDeliverTx{ + responseDeliver := []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -92,7 +92,7 @@ func (suite *BackendTestSuite) TestGetTransactionByHash() { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBlock(client, 1, txBz) RegisterBlockResults(client, 1) - RegisterBaseFee(queryClient, sdk.NewInt(1)) + RegisterBaseFee(queryClient, sdkmath.NewInt(1)) }, msgEthereumTx, rpcTransaction, @@ -278,7 +278,7 @@ func (suite *BackendTestSuite) TestGetTransactionByBlockAndIndex() { msgEthTx, bz := suite.buildEthereumTx() defaultBlock := types.MakeBlock(1, []types.Tx{bz}, nil, nil) - defaultResponseDeliverTx := []*abci.ResponseDeliverTx{ + defaultResponseDeliverTx := []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ @@ -346,7 +346,7 @@ func (suite *BackendTestSuite) TestGetTransactionByBlockAndIndex() { err := suite.backend.indexer.IndexBlock(block, defaultResponseDeliverTx) suite.Require().NoError(err) RegisterBlockResults(client, 1) - RegisterBaseFee(queryClient, sdk.NewInt(1)) + RegisterBaseFee(queryClient, sdkmath.NewInt(1)) }, &tmrpctypes.ResultBlock{Block: defaultBlock}, 0, @@ -359,7 +359,7 @@ func (suite *BackendTestSuite) TestGetTransactionByBlockAndIndex() { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) client := suite.backend.clientCtx.Client.(*mocks.Client) RegisterBlockResults(client, 1) - RegisterBaseFee(queryClient, sdk.NewInt(1)) + RegisterBaseFee(queryClient, sdkmath.NewInt(1)) }, &tmrpctypes.ResultBlock{Block: defaultBlock}, 0, @@ -422,7 +422,7 @@ func (suite *BackendTestSuite) TestGetTransactionByBlockNumberAndIndex() { queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterBlock(client, 1, bz) RegisterBlockResults(client, 1) - RegisterBaseFee(queryClient, sdk.NewInt(1)) + RegisterBaseFee(queryClient, sdkmath.NewInt(1)) }, 0, 0, @@ -541,7 +541,7 @@ func (suite *BackendTestSuite) TestGetTransactionReceipt() { registerMock func() tx *evmtypes.MsgEthereumTx block *types.Block - blockResult []*abci.ResponseDeliverTx + blockResult []*abci.ExecTxResult expTxReceipt map[string]interface{} expPass bool }{ @@ -558,7 +558,7 @@ func (suite *BackendTestSuite) TestGetTransactionReceipt() { }, msgEthereumTx, &types.Block{Header: types.Header{Height: 1}, Data: types.Data{Txs: []types.Tx{txBz}}}, - []*abci.ResponseDeliverTx{ + []*abci.ExecTxResult{ { Code: 0, Events: []abci.Event{ diff --git a/rpc/backend/utils.go b/rpc/backend/utils.go index 2df894da80..e0345326d2 100644 --- a/rpc/backend/utils.go +++ b/rpc/backend/utils.go @@ -21,6 +21,7 @@ import ( "sort" "strings" + "cosmossdk.io/log" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "google.golang.org/grpc/codes" @@ -33,7 +34,6 @@ import ( "github.com/ethereum/go-ethereum/params" abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cometbft/cometbft/proto/tendermint/crypto" @@ -75,7 +75,7 @@ func (b *Backend) getAccountNonce(accAddr common.Address, pending bool, height i } return 0, err } - var acc authtypes.AccountI + var acc sdk.AccountI if err := b.clientCtx.InterfaceRegistry.UnpackAny(res.Account, &acc); err != nil { return 0, err } @@ -277,7 +277,7 @@ func (b *Backend) processBlock( // ShouldIgnoreGasUsed returns true if the gasUsed in result should be ignored // workaround for issue: https://github.com/cosmos/cosmos-sdk/issues/10832 -func ShouldIgnoreGasUsed(res *abci.ResponseDeliverTx) bool { +func ShouldIgnoreGasUsed(res *abci.ExecTxResult) bool { return res.GetCode() == 11 && strings.Contains(res.GetLog(), "no block gas left to run tx: out of gas") } diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index db232a4058..bfdae08af9 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -35,7 +35,7 @@ import ( "github.com/cosmos/cosmos-sdk/server" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/consensus/ethash" diff --git a/rpc/namespaces/ethereum/debug/utils.go b/rpc/namespaces/ethereum/debug/utils.go index 648a6986fd..41675b6176 100644 --- a/rpc/namespaces/ethereum/debug/utils.go +++ b/rpc/namespaces/ethereum/debug/utils.go @@ -22,7 +22,7 @@ import ( "runtime/pprof" "strings" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/server" ) diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 97c513f8d7..e730e06a49 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/rpc" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/rpc/namespaces/ethereum/eth/filters/api.go b/rpc/namespaces/ethereum/eth/filters/api.go index 794e304dd4..a3e278322c 100644 --- a/rpc/namespaces/ethereum/eth/filters/api.go +++ b/rpc/namespaces/ethereum/eth/filters/api.go @@ -23,7 +23,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" coretypes "github.com/cometbft/cometbft/rpc/core/types" diff --git a/rpc/namespaces/ethereum/eth/filters/filters.go b/rpc/namespaces/ethereum/eth/filters/filters.go index 84c1924954..8d63a8c4c2 100644 --- a/rpc/namespaces/ethereum/eth/filters/filters.go +++ b/rpc/namespaces/ethereum/eth/filters/filters.go @@ -24,7 +24,7 @@ import ( "github.com/evmos/ethermint/rpc/backend" "github.com/evmos/ethermint/rpc/types" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/pkg/errors" diff --git a/rpc/namespaces/ethereum/miner/api.go b/rpc/namespaces/ethereum/miner/api.go index 7fc4877408..09f7f692cb 100644 --- a/rpc/namespaces/ethereum/miner/api.go +++ b/rpc/namespaces/ethereum/miner/api.go @@ -21,7 +21,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/evmos/ethermint/rpc/backend" ) diff --git a/rpc/namespaces/ethereum/personal/api.go b/rpc/namespaces/ethereum/personal/api.go index 6c3cdad37e..f2a3614618 100644 --- a/rpc/namespaces/ethereum/personal/api.go +++ b/rpc/namespaces/ethereum/personal/api.go @@ -26,7 +26,7 @@ import ( "github.com/evmos/ethermint/crypto/hd" ethermint "github.com/evmos/ethermint/types" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/rpc/namespaces/ethereum/txpool/api.go b/rpc/namespaces/ethereum/txpool/api.go index ed465a51dd..cee9e885cf 100644 --- a/rpc/namespaces/ethereum/txpool/api.go +++ b/rpc/namespaces/ethereum/txpool/api.go @@ -16,7 +16,7 @@ package txpool import ( - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/rpc/stream/rpc.go b/rpc/stream/rpc.go index c71a79e1fd..a9b58d2bae 100644 --- a/rpc/stream/rpc.go +++ b/rpc/stream/rpc.go @@ -5,8 +5,8 @@ import ( "fmt" "sync" - "github.com/cometbft/cometbft/libs/log" - tmquery "github.com/cometbft/cometbft/libs/pubsub/query" + "cosmossdk.io/log" + cmtquery "github.com/cometbft/cometbft/libs/pubsub/query" rpcclient "github.com/cometbft/cometbft/rpc/client" coretypes "github.com/cometbft/cometbft/rpc/core/types" tmtypes "github.com/cometbft/cometbft/types" @@ -31,12 +31,12 @@ const ( var ( txEvents = tmtypes.QueryForEvent(tmtypes.EventTx).String() - evmEvents = tmquery.MustParse(fmt.Sprintf("%s='%s' AND %s.%s='%s'", + evmEvents = cmtquery.MustCompile(fmt.Sprintf("%s='%s' AND %s.%s='%s'", tmtypes.EventTypeKey, tmtypes.EventTx, sdk.EventTypeMessage, sdk.AttributeKeyModule, evmtypes.ModuleName)).String() - headerEvents = tmtypes.QueryForEvent(tmtypes.EventNewBlockHeader).String() + blockEvents = tmtypes.QueryForEvent(tmtypes.EventNewBlock).String() evmTxHashKey = fmt.Sprintf("%s.%s", evmtypes.TypeMsgEthereumTx, evmtypes.AttributeKeyEthereumTxHash) ) @@ -71,7 +71,7 @@ func NewRPCStreams(evtClient rpcclient.EventsClient, logger log.Logger, txDecode ctx := context.Background() - chHeaders, err := s.evtClient.Subscribe(ctx, streamSubscriberName, headerEvents, subscribBufferSize) + chBlocks, err := s.evtClient.Subscribe(ctx, streamSubscriberName, blockEvents, subscribBufferSize) if err != nil { return nil, err } @@ -92,7 +92,7 @@ func NewRPCStreams(evtClient rpcclient.EventsClient, logger log.Logger, txDecode return nil, err } - go s.start(&s.wg, chHeaders, chTx, chLogs) + go s.start(&s.wg, chBlocks, chTx, chLogs) return s, nil } @@ -119,7 +119,7 @@ func (s *RPCStream) LogStream() *Stream[*ethtypes.Log] { func (s *RPCStream) start( wg *sync.WaitGroup, - chHeaders <-chan coretypes.ResultEvent, + chBlocks <-chan coretypes.ResultEvent, chTx <-chan coretypes.ResultEvent, chLogs <-chan coretypes.ResultEvent, ) { @@ -133,23 +133,23 @@ func (s *RPCStream) start( for { select { - case ev, ok := <-chHeaders: + case ev, ok := <-chBlocks: if !ok { - chHeaders = nil + chBlocks = nil break } - data, ok := ev.Data.(tmtypes.EventDataNewBlockHeader) + data, ok := ev.Data.(tmtypes.EventDataNewBlock) if !ok { s.logger.Error("event data type mismatch", "type", fmt.Sprintf("%T", ev.Data)) continue } - baseFee := types.BaseFeeFromEvents(data.ResultBeginBlock.Events) + baseFee := types.BaseFeeFromEvents(data.ResultFinalizeBlock.Events) // TODO: fetch bloom from events - header := types.EthHeaderFromTendermint(data.Header, ethtypes.Bloom{}, baseFee) - s.headerStream.Add(RPCHeader{EthHeader: header, Hash: common.BytesToHash(data.Header.Hash())}) + header := types.EthHeaderFromTendermint(data.Block.Header, ethtypes.Bloom{}, baseFee) + s.headerStream.Add(RPCHeader{EthHeader: header, Hash: common.BytesToHash(data.Block.Header.Hash())}) case ev, ok := <-chTx: if !ok { chTx = nil @@ -201,7 +201,7 @@ func (s *RPCStream) start( s.logStream.Add(txLogs...) } - if chHeaders == nil && chTx == nil && chLogs == nil { + if chBlocks == nil && chTx == nil && chLogs == nil { break } } diff --git a/rpc/types/events.go b/rpc/types/events.go index 02278a9f94..a0ce40a56a 100644 --- a/rpc/types/events.go +++ b/rpc/types/events.go @@ -89,7 +89,7 @@ type ParsedTxs struct { // ParseTxResult parse eth tx infos from cosmos-sdk events. // It supports two event formats, the formats are described in the comments of the format constants. -func ParseTxResult(result *abci.ResponseDeliverTx, tx sdk.Tx) (*ParsedTxs, error) { +func ParseTxResult(result *abci.ExecTxResult, tx sdk.Tx) (*ParsedTxs, error) { format := eventFormatUnknown // the index of current ethereum_tx event in format 1 or the second part of format 2 eventIndex := -1 diff --git a/rpc/types/events_test.go b/rpc/types/events_test.go index 5b252be6b4..13bbccfb83 100644 --- a/rpc/types/events_test.go +++ b/rpc/types/events_test.go @@ -17,12 +17,12 @@ func TestParseTxResult(t *testing.T) { testCases := []struct { name string - response abci.ResponseDeliverTx + response abci.ExecTxResult expTxs []*ParsedTx // expected parse result, nil means expect error. }{ { "format 1 events", - abci.ResponseDeliverTx{ + abci.ExecTxResult{ GasUsed: 21000, Events: []abci.Event{ {Type: "coin_received", Attributes: []abci.EventAttribute{ @@ -77,7 +77,7 @@ func TestParseTxResult(t *testing.T) { }, { "format 2 events", - abci.ResponseDeliverTx{ + abci.ExecTxResult{ GasUsed: 21000, Events: []abci.Event{ {Type: "coin_received", Attributes: []abci.EventAttribute{ @@ -120,7 +120,7 @@ func TestParseTxResult(t *testing.T) { }, { "format 1 events, failed", - abci.ResponseDeliverTx{ + abci.ExecTxResult{ GasUsed: 21000, Events: []abci.Event{ {Type: evmtypes.EventTypeEthereumTx, Attributes: []abci.EventAttribute{ @@ -146,7 +146,7 @@ func TestParseTxResult(t *testing.T) { }, { "format 1 events, failed", - abci.ResponseDeliverTx{ + abci.ExecTxResult{ GasUsed: 21000, Events: []abci.Event{ {Type: evmtypes.EventTypeEthereumTx, Attributes: []abci.EventAttribute{ @@ -172,7 +172,7 @@ func TestParseTxResult(t *testing.T) { }, { "format 2 events failed", - abci.ResponseDeliverTx{ + abci.ExecTxResult{ GasUsed: 21000, Events: []abci.Event{ {Type: evmtypes.EventTypeEthereumTx, Attributes: []abci.EventAttribute{ @@ -191,7 +191,7 @@ func TestParseTxResult(t *testing.T) { }, { "format 2 events failed", - abci.ResponseDeliverTx{ + abci.ExecTxResult{ GasUsed: 21000, Events: []abci.Event{ {Type: evmtypes.EventTypeEthereumTx, Attributes: []abci.EventAttribute{ diff --git a/rpc/types/utils.go b/rpc/types/utils.go index 2f3a8db61a..34f7ee0454 100644 --- a/rpc/types/utils.go +++ b/rpc/types/utils.go @@ -274,12 +274,12 @@ func CheckTxFee(gasPrice *big.Int, gas uint64, cap float64) error { } // TxExceedBlockGasLimit returns true if the tx exceeds block gas limit. -func TxExceedBlockGasLimit(res *abci.ResponseDeliverTx) bool { +func TxExceedBlockGasLimit(res *abci.ExecTxResult) bool { return strings.Contains(res.Log, ExceedBlockGasLimitError) } // TxSuccessOrExceedsBlockGasLimit returns true if the transaction was successful // or if it failed with an ExceedBlockGasLimit error -func TxSuccessOrExceedsBlockGasLimit(res *abci.ResponseDeliverTx) bool { +func TxSuccessOrExceedsBlockGasLimit(res *abci.ExecTxResult) bool { return res.Code == 0 || TxExceedBlockGasLimit(res) } diff --git a/rpc/websockets.go b/rpc/websockets.go index aa0cc4f22e..f45a3bc7ab 100644 --- a/rpc/websockets.go +++ b/rpc/websockets.go @@ -37,7 +37,7 @@ import ( "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/rpc" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" rpcfilters "github.com/evmos/ethermint/rpc/namespaces/ethereum/eth/filters" "github.com/evmos/ethermint/rpc/stream" diff --git a/scripts/integration-test-all.sh b/scripts/integration-test-all.sh index fce8d73965..1c0ab529e1 100755 --- a/scripts/integration-test-all.sh +++ b/scripts/integration-test-all.sh @@ -73,7 +73,7 @@ init_func() { "$PWD"/build/ethermintd keys add $KEY"$i" --keyring-backend test --home "$DATA_DIR$i" --no-backup --algo "eth_secp256k1" "$PWD"/build/ethermintd init $MONIKER --chain-id $CHAINID --home "$DATA_DIR$i" # Set gas limit in genesis - cat $DATA_DIR$i/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="10000000"' > $DATA_DIR$i/config/tmp_genesis.json && mv $DATA_DIR$i/config/tmp_genesis.json $DATA_DIR$i/config/genesis.json + cat $DATA_DIR$i/config/genesis.json | jq '.consensus["params"]["block"]["max_gas"]="10000000"' > $DATA_DIR$i/config/tmp_genesis.json && mv $DATA_DIR$i/config/tmp_genesis.json $DATA_DIR$i/config/genesis.json "$PWD"/build/ethermintd add-genesis-account \ "$("$PWD"/build/ethermintd keys show "$KEY$i" --keyring-backend test -a --home "$DATA_DIR$i")" 1000000000000000000aphoton,1000000000000000000stake \ --keyring-backend test --home "$DATA_DIR$i" diff --git a/server/config/config.go b/server/config/config.go index f0478c42da..b7d78f7091 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -21,13 +21,17 @@ import ( "path" "time" + sdkmath "cosmossdk.io/math" + "github.com/spf13/viper" "github.com/cometbft/cometbft/libs/strings" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/server/config" + sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/rosetta" ) const ( @@ -78,9 +82,29 @@ const ( // DefaultReturnDataLimit is maximum number of bytes returned from eth_call or similar invocations DefaultReturnDataLimit = 100000 + + // DefaultRosettaEnable is the default value for the parameter that defines if the Rosetta API server is enabled + DefaultRosettaEnable = false + + // DefaultRosettaBlockchain defines the default blockchain name for the rosetta server + DefaultRosettaBlockchain = "evmos" + + // DefaultRosettaNetwork defines the default network name for the rosetta server + DefaultRosettaNetwork = "evmos" + + // DefaultRosettaGasToSuggest defines the default gas to suggest for the rosetta server + DefaultRosettaGasToSuggest = 300_000 + + // DefaultRosettaDenomToSuggest defines the default denom for fee suggestion + DefaultRosettaDenomToSuggest = "basecro" ) -var evmTracers = []string{"json", "markdown", "struct", "access_list"} +var ( + // DefaultRosettaGasPrices defines the default list of prices to suggest + DefaultRosettaGasPrices = sdk.NewDecCoins(sdk.NewDecCoin(DefaultRosettaDenomToSuggest, sdkmath.NewInt(4_000_000))) + + evmTracers = []string{"json", "markdown", "struct", "access_list"} +) // Config defines the server's top level configuration. It includes the default app config // from the SDK as well as the EVM configuration to enable the JSON-RPC APIs. @@ -90,6 +114,7 @@ type Config struct { EVM EVMConfig `mapstructure:"evm"` JSONRPC JSONRPCConfig `mapstructure:"json-rpc"` TLS TLSConfig `mapstructure:"tls"` + Rosetta RosettaConfig `mapstructure:"rosetta"` } // EVMConfig defines the application configuration values for the EVM. @@ -155,6 +180,13 @@ type TLSConfig struct { KeyPath string `mapstructure:"key-path"` } +// RosettaConfig defines configuration for the Rosetta server. +type RosettaConfig struct { + rosetta.Config + // Enable defines if the Rosetta server should be enabled. + Enable bool `mapstructure:"enable"` +} + // AppConfig helps to override default appConfig template and configs. // return "", nil if no custom configuration is required for the application. func AppConfig(denom string) (string, interface{}) { @@ -197,6 +229,7 @@ func DefaultConfig() *Config { EVM: *DefaultEVMConfig(), JSONRPC: *DefaultJSONRPCConfig(), TLS: *DefaultTLSConfig(), + Rosetta: *DefaultRosettaConfig(), } } @@ -312,6 +345,26 @@ func DefaultTLSConfig() *TLSConfig { } } +// DefaultEVMConfig returns the default EVM configuration +func DefaultRosettaConfig() *RosettaConfig { + return &RosettaConfig{ + Config: rosetta.Config{ + Blockchain: DefaultRosettaBlockchain, + Network: DefaultRosettaNetwork, + TendermintRPC: rosetta.DefaultCometEndpoint, + GRPCEndpoint: rosetta.DefaultGRPCEndpoint, + Addr: rosetta.DefaultAddr, + Retries: rosetta.DefaultRetries, + Offline: rosetta.DefaultOffline, + EnableFeeSuggestion: rosetta.DefaultEnableFeeSuggestion, + GasToSuggest: DefaultRosettaGasToSuggest, + DenomToSuggest: DefaultRosettaDenomToSuggest, + GasPrices: DefaultRosettaGasPrices, + }, + Enable: DefaultRosettaEnable, + } +} + // Validate returns an error if the TLS certificate and key file extensions are invalid. func (c TLSConfig) Validate() error { certExt := path.Ext(c.CertificatePath) diff --git a/server/flags/flags.go b/server/flags/flags.go index a83d9c1f67..502cc7f4f6 100644 --- a/server/flags/flags.go +++ b/server/flags/flags.go @@ -22,13 +22,13 @@ import ( "github.com/spf13/viper" ) -// Tendermint/cosmos-sdk full-node start flags +// CometBFT/cosmos-sdk full-node start flags const ( - WithTendermint = "with-tendermint" - Address = "address" - Transport = "transport" - TraceStore = "trace-store" - CPUProfile = "cpu-profile" + WithCometBFT = "with-cometbft" + Address = "address" + Transport = "transport" + TraceStore = "trace-store" + CPUProfile = "cpu-profile" // The type of database for application and snapshots databases AppDBBackend = "app-db-backend" ) diff --git a/server/indexer_cmd.go b/server/indexer_cmd.go index 2d19489232..5aebd5c121 100644 --- a/server/indexer_cmd.go +++ b/server/indexer_cmd.go @@ -20,9 +20,9 @@ import ( "github.com/spf13/cobra" - tmnode "github.com/cometbft/cometbft/node" + cmtnode "github.com/cometbft/cometbft/config" sm "github.com/cometbft/cometbft/state" - tmstore "github.com/cometbft/cometbft/store" + cmtstore "github.com/cometbft/cometbft/store" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" "github.com/evmos/ethermint/indexer" @@ -63,13 +63,13 @@ func NewIndexTxCmd() *cobra.Command { idxer := indexer.NewKVIndexer(idxDB, logger.With("module", "evmindex"), clientCtx) // open local tendermint db, because the local rpc won't be available. - tmdb, err := tmnode.DefaultDBProvider(&tmnode.DBContext{ID: "blockstore", Config: cfg}) + cmtdb, err := cmtnode.DefaultDBProvider(&cmtnode.DBContext{ID: "blockstore", Config: cfg}) if err != nil { return err } - blockStore := tmstore.NewBlockStore(tmdb) + blockStore := cmtstore.NewBlockStore(cmtdb) - stateDB, err := tmnode.DefaultDBProvider(&tmnode.DBContext{ID: "state", Config: cfg}) + stateDB, err := cmtnode.DefaultDBProvider(&cmtnode.DBContext{ID: "state", Config: cfg}) if err != nil { return err } @@ -82,11 +82,11 @@ func NewIndexTxCmd() *cobra.Command { if blk == nil { return fmt.Errorf("block not found %d", height) } - resBlk, err := stateStore.LoadABCIResponses(height) + resBlk, err := stateStore.LoadFinalizeBlockResponse(height) if err != nil { return err } - if err := idxer.IndexBlock(blk, resBlk.DeliverTxs); err != nil { + if err := idxer.IndexBlock(blk, resBlk.TxResults); err != nil { return err } fmt.Println(height) diff --git a/server/json_rpc.go b/server/json_rpc.go index 9223bbfb1d..39b6543c91 100644 --- a/server/json_rpc.go +++ b/server/json_rpc.go @@ -22,11 +22,11 @@ import ( "github.com/gorilla/mux" "github.com/rs/cors" + "golang.org/x/sync/errgroup" rpcclient "github.com/cometbft/cometbft/rpc/client" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" - "github.com/cosmos/cosmos-sdk/server/types" ethlog "github.com/ethereum/go-ethereum/log" ethrpc "github.com/ethereum/go-ethereum/rpc" "github.com/evmos/ethermint/rpc" @@ -36,22 +36,37 @@ import ( ethermint "github.com/evmos/ethermint/types" ) +const ( + ServerStartTime = 5 * time.Second + MaxRetry = 6 +) + // StartJSONRPC starts the JSON-RPC server -func StartJSONRPC(ctx *server.Context, +func StartJSONRPC(srvCtx *server.Context, clientCtx client.Context, + g *errgroup.Group, config *config.Config, indexer ethermint.EVMTxIndexer, ) (*http.Server, chan struct{}, error) { - logger := ctx.Logger.With("module", "geth") + logger := srvCtx.Logger.With("module", "geth") evtClient, ok := clientCtx.Client.(rpcclient.EventsClient) if !ok { return nil, nil, fmt.Errorf("client %T does not implement EventsClient", clientCtx.Client) } - stream, err := stream.NewRPCStreams(evtClient, logger, clientCtx.TxConfig.TxDecoder()) + var rpcStream *stream.RPCStream + var err error + for i := 0; i < MaxRetry; i++ { + rpcStream, err = stream.NewRPCStreams(evtClient, logger, clientCtx.TxConfig.TxDecoder()) + if err == nil { + break + } + time.Sleep(time.Second) + } + if err != nil { - return nil, nil, fmt.Errorf("failed to create rpc streams: %w", err) + return nil, nil, fmt.Errorf("failed to create rpc streams after %d attempts: %w", MaxRetry, err) } ethlog.Root().SetHandler(ethlog.FuncHandler(func(r *ethlog.Record) error { @@ -71,11 +86,11 @@ func StartJSONRPC(ctx *server.Context, allowUnprotectedTxs := config.JSONRPC.AllowUnprotectedTxs rpcAPIArr := config.JSONRPC.API - apis := rpc.GetRPCAPIs(ctx, clientCtx, stream, allowUnprotectedTxs, indexer, rpcAPIArr) + apis := rpc.GetRPCAPIs(srvCtx, clientCtx, rpcStream, allowUnprotectedTxs, indexer, rpcAPIArr) for _, api := range apis { if err := rpcServer.RegisterName(api.Namespace, api.Service); err != nil { - ctx.Logger.Error( + srvCtx.Logger.Error( "failed to register service in JSON RPC namespace", "namespace", api.Namespace, "service", api.Service, @@ -107,30 +122,22 @@ func StartJSONRPC(ctx *server.Context, return nil, nil, err } - errCh := make(chan error) - go func() { - ctx.Logger.Info("Starting JSON-RPC server", "address", config.JSONRPC.Address) + g.Go(func() error { + srvCtx.Logger.Info("Starting JSON-RPC server", "address", config.JSONRPC.Address) if err := httpSrv.Serve(ln); err != nil { if err == http.ErrServerClosed { close(httpSrvDone) - return } - ctx.Logger.Error("failed to start JSON-RPC server", "error", err.Error()) - errCh <- err + srvCtx.Logger.Error("failed to start JSON-RPC server", "error", err.Error()) + return err } - }() - - select { - case err := <-errCh: - ctx.Logger.Error("failed to boot JSON-RPC server", "error", err.Error()) - return nil, nil, err - case <-time.After(types.ServerStartTime): // assume JSON RPC server started successfully - } + return nil + }) - ctx.Logger.Info("Starting JSON WebSocket server", "address", config.JSONRPC.WsAddress) + srvCtx.Logger.Info("Starting JSON WebSocket server", "address", config.JSONRPC.WsAddress) - wsSrv := rpc.NewWebsocketsServer(clientCtx, ctx.Logger, stream, config) + wsSrv := rpc.NewWebsocketsServer(clientCtx, srvCtx.Logger, rpcStream, config) wsSrv.Start() return httpSrv, httpSrvDone, nil } diff --git a/server/start.go b/server/start.go index 783a440b78..9342874eee 100644 --- a/server/start.go +++ b/server/start.go @@ -35,32 +35,34 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - dbm "github.com/cometbft/cometbft-db" abciserver "github.com/cometbft/cometbft/abci/server" tcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" - tmos "github.com/cometbft/cometbft/libs/os" + cmtcfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/node" "github.com/cometbft/cometbft/p2p" pvm "github.com/cometbft/cometbft/privval" "github.com/cometbft/cometbft/proxy" rpcclient "github.com/cometbft/cometbft/rpc/client" "github.com/cometbft/cometbft/rpc/client/local" + cmttypes "github.com/cometbft/cometbft/types" + dbm "github.com/cosmos/cosmos-db" - "cosmossdk.io/tools/rosetta" - crgserver "cosmossdk.io/tools/rosetta/lib/server" + "github.com/cosmos/rosetta" ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" errorsmod "cosmossdk.io/errors" + pruningtypes "cosmossdk.io/store/pruning/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" "github.com/cosmos/cosmos-sdk/server/types" - pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" sdk "github.com/cosmos/cosmos-sdk/types" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/evmos/ethermint/indexer" ethdebug "github.com/evmos/ethermint/rpc/namespaces/ethereum/debug" @@ -89,13 +91,13 @@ func NewDefaultStartOptions(appCreator types.AppCreator, defaultNodeHome string) } // StartCmd runs the service passed in, either stand-alone or in-process with -// Tendermint. +// CometBFT. func StartCmd(opts StartOptions) *cobra.Command { cmd := &cobra.Command{ Use: "start", Short: "Run the full node", - Long: `Run the full node application with Tendermint in or out of process. By -default, the application will run with Tendermint in process. + Long: `Run the full node application with CometBFT in or out of process. By +default, the application will run with CometBFT in process. Pruning options can be provided via the '--pruning' flag or alternatively with '--pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' together. @@ -136,9 +138,9 @@ which accepts a path for the resulting pprof file. return err } - withTM, _ := cmd.Flags().GetBool(srvflags.WithTendermint) + withTM, _ := cmd.Flags().GetBool(srvflags.WithCometBFT) if !withTM { - serverCtx.Logger.Info("starting ABCI without Tendermint") + serverCtx.Logger.Info("starting ABCI without CometBFT") return wrapCPUProfile(serverCtx, func() error { return startStandAlone(serverCtx, opts) }) @@ -155,24 +157,22 @@ which accepts a path for the resulting pprof file. } } - serverCtx.Logger.Info("starting ABCI with Tendermint") + serverCtx.Logger.Info("starting ABCI with CometBFT") // amino is needed here for backwards compatibility of REST routes err = wrapCPUProfile(serverCtx, func() error { return startInProcess(serverCtx, clientCtx, opts) }) - errCode, ok := err.(server.ErrorCode) - if !ok { + if err != nil { return err } - serverCtx.Logger.Debug(fmt.Sprintf("received quit signal: %d", errCode.Code)) return nil }, } cmd.Flags().String(flags.FlagHome, opts.DefaultNodeHome, "The application home directory") - cmd.Flags().Bool(srvflags.WithTendermint, true, "Run abci app embedded in-process with tendermint") + cmd.Flags().Bool(srvflags.WithCometBFT, true, "Run abci app embedded in-process with tendermint") cmd.Flags().String(srvflags.Address, "tcp://0.0.0.0:26658", "Listen address") cmd.Flags().String(srvflags.Transport, "socket", "Transport protocol: socket, grpc") cmd.Flags().String(srvflags.TraceStore, "", "Enable KVStore tracing to an output file") @@ -187,14 +187,13 @@ which accepts a path for the resulting pprof file. cmd.Flags().Uint64(server.FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") cmd.Flags().Uint64(server.FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") //nolint:lll cmd.Flags().Uint(server.FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") - cmd.Flags().Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks") + cmd.Flags().Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune CometBFT blocks") cmd.Flags().String(srvflags.AppDBBackend, "", "The type of database for application and snapshots databases") - cmd.Flags().Bool(srvflags.GRPCOnly, false, "Start the node in gRPC query only mode without Tendermint process") + cmd.Flags().Bool(srvflags.GRPCOnly, false, "Start the node in gRPC query only mode without CometBFT process") cmd.Flags().Bool(srvflags.GRPCEnable, true, "Define if the gRPC server should be enabled") cmd.Flags().String(srvflags.GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") cmd.Flags().Bool(srvflags.GRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)") - cmd.Flags().String(srvflags.GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on") cmd.Flags().Bool(srvflags.RPCEnable, false, "Defines if Cosmos-sdk REST server should be enabled") cmd.Flags().Bool(srvflags.EnabledUnsafeCors, false, "Defines if CORS should be enabled (unsafe - use it at your own risk)") @@ -226,48 +225,48 @@ which accepts a path for the resulting pprof file. cmd.Flags().Uint64(server.FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") cmd.Flags().Uint32(server.FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") - // add support for all Tendermint-specific command line options + // add support for all CometBFT-specific command line options tcmd.AddNodeFlags(cmd) return cmd } -func startStandAlone(ctx *server.Context, opts StartOptions) error { - addr := ctx.Viper.GetString(srvflags.Address) - transport := ctx.Viper.GetString(srvflags.Transport) - home := ctx.Viper.GetString(flags.FlagHome) +func startStandAlone(svrCtx *server.Context, opts StartOptions) error { + addr := svrCtx.Viper.GetString(srvflags.Address) + transport := svrCtx.Viper.GetString(srvflags.Transport) + home := svrCtx.Viper.GetString(flags.FlagHome) - db, err := opts.DBOpener(ctx.Viper, home, server.GetAppDBBackend(ctx.Viper)) + db, err := opts.DBOpener(svrCtx.Viper, home, server.GetAppDBBackend(svrCtx.Viper)) if err != nil { return err } defer func() { if err := db.Close(); err != nil { - ctx.Logger.Error("error closing db", "error", err.Error()) + svrCtx.Logger.Error("error closing db", "error", err.Error()) } }() - traceWriterFile := ctx.Viper.GetString(srvflags.TraceStore) + traceWriterFile := svrCtx.Viper.GetString(srvflags.TraceStore) traceWriter, err := openTraceWriter(traceWriterFile) if err != nil { return err } - app := opts.AppCreator(ctx.Logger, db, traceWriter, ctx.Viper) + app := opts.AppCreator(svrCtx.Logger, db, traceWriter, svrCtx.Viper) defer func() { if err := app.Close(); err != nil { - ctx.Logger.Error("close application failed", "error", err.Error()) + svrCtx.Logger.Error("close application failed", "error", err.Error()) } }() - config, err := config.GetConfig(ctx.Viper) + config, err := config.GetConfig(svrCtx.Viper) if err != nil { - ctx.Logger.Error("failed to get server config", "error", err.Error()) + svrCtx.Logger.Error("failed to get server config", "error", err.Error()) return err } if err := config.ValidateBasic(); err != nil { - ctx.Logger.Error("invalid server config", "error", err.Error()) + svrCtx.Logger.Error("invalid server config", "error", err.Error()) return err } @@ -276,26 +275,29 @@ func startStandAlone(ctx *server.Context, opts StartOptions) error { return err } - svr, err := abciserver.NewServer(addr, transport, app) + cmtApp := server.NewCometABCIWrapper(app) + svr, err := abciserver.NewServer(addr, transport, cmtApp) if err != nil { return fmt.Errorf("error creating listener: %v", err) } - svr.SetLogger(ctx.Logger.With("server", "abci")) + svr.SetLogger(servercmtlog.CometLoggerWrapper{Logger: svrCtx.Logger.With("server", "abci")}) + g, ctx := getCtx(svrCtx, false) - err = svr.Start() - if err != nil { - tmos.Exit(err.Error()) - } - - defer func() { - if err = svr.Stop(); err != nil { - tmos.Exit(err.Error()) + g.Go(func() error { + if err := svr.Start(); err != nil { + svrCtx.Logger.Error("failed to start out-of-process ABCI server", "err", err) + return err } - }() - // Wait for SIGINT or SIGTERM signal - return server.WaitForQuitSignals() + // Wait for the calling process to be canceled or close the provided context, + // so we can gracefully stop the ABCI server. + <-ctx.Done() + svrCtx.Logger.Info("stopping the ABCI server...") + return svr.Stop() + }) + + return g.Wait() } // legacyAminoCdc is used for the legacy REST API @@ -303,8 +305,8 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start cfg := svrCtx.Config home := cfg.RootDir logger := svrCtx.Logger + g, ctx := getCtx(svrCtx, true) - traceWriterFile := svrCtx.Viper.GetString(srvflags.TraceStore) db, err := opts.DBOpener(svrCtx.Viper, home, server.GetAppDBBackend(svrCtx.Viper)) if err != nil { logger.Error("failed to open DB", "error", err.Error()) @@ -317,6 +319,7 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start } }() + traceWriterFile := svrCtx.Viper.GetString(srvflags.TraceStore) traceWriter, err := openTraceWriter(traceWriterFile) if err != nil { logger.Error("failed to open trace writer", "error", err.Error()) @@ -347,13 +350,7 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start return err } - ctx, cancelFn := context.WithCancel(context.Background()) - g, ctx := errgroup.WithContext(ctx) - - // listen for quit signals so the calling parent process can gracefully exit - ListenForQuitSignals(g, true, cancelFn, svrCtx.Logger) - - genDocProvider := node.DefaultGenesisDocProviderFunc(cfg) + genDocProvider := GenDocProvider(cfg) var ( tmNode *node.Node @@ -361,22 +358,23 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start ) if gRPCOnly { - logger.Info("starting node in query only mode; Tendermint is disabled") + logger.Info("starting node in query only mode; CometBFT is disabled") config.GRPC.Enable = true config.JSONRPC.EnableIndexer = false } else { - logger.Info("starting node with ABCI Tendermint in-process") + logger.Info("starting node with ABCI CometBFT in-process") + cmtApp := server.NewCometABCIWrapper(app) tmNode, err = node.NewNodeWithContext( ctx, cfg, pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()), nodeKey, - proxy.NewLocalClientCreator(app), + proxy.NewLocalClientCreator(cmtApp), genDocProvider, - node.DefaultDBProvider, + cmtcfg.DefaultDBProvider, node.DefaultMetricsProvider(cfg.Instrumentation), - logger.With("server", "node"), + servercmtlog.CometLoggerWrapper{Logger: svrCtx.Logger.With("server", "node")}, ) if err != nil { logger.Error("failed init node", "error", err.Error()) @@ -403,7 +401,7 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start app.RegisterTxService(clientCtx) app.RegisterTendermintService(clientCtx) - app.RegisterNodeService(clientCtx) + app.RegisterNodeService(clientCtx, config.Config) } metrics, err := startTelemetry(config) @@ -428,20 +426,11 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start idxLogger := logger.With("indexer", "evm") idxer = indexer.NewKVIndexer(idxDB, idxLogger, clientCtx) indexerService := NewEVMIndexerService(idxer, clientCtx.Client.(rpcclient.Client), config.JSONRPC.AllowIndexerGap) - indexerService.SetLogger(idxLogger) + indexerService.SetLogger(servercmtlog.CometLoggerWrapper{Logger: idxLogger}) - errCh := make(chan error) - go func() { - if err := indexerService.Start(); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } + g.Go(func() error { + return indexerService.Start() + }) } if config.API.Enable || config.JSONRPC.Enable { @@ -456,107 +445,23 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start clientCtx = clientCtx. WithHomeDir(home). WithChainID(chainID) - - // Set `GRPCClient` to `clientCtx` to enjoy concurrent grpc query. - // only use it if gRPC server is enabled. - if config.GRPC.Enable { - _, port, err := net.SplitHostPort(config.GRPC.Address) - if err != nil { - return errorsmod.Wrapf(err, "invalid grpc address %s", config.GRPC.Address) - } - - maxSendMsgSize := config.GRPC.MaxSendMsgSize - if maxSendMsgSize == 0 { - maxSendMsgSize = serverconfig.DefaultGRPCMaxSendMsgSize - } - - maxRecvMsgSize := config.GRPC.MaxRecvMsgSize - if maxRecvMsgSize == 0 { - maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize - } - - grpcAddress := fmt.Sprintf("127.0.0.1:%s", port) - - // If grpc is enabled, configure grpc client for grpc gateway and json-rpc. - grpcClient, err := grpc.Dial( - grpcAddress, - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithDefaultCallOptions( - grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), - grpc.MaxCallRecvMsgSize(maxRecvMsgSize), - grpc.MaxCallSendMsgSize(maxSendMsgSize), - ), - ) - if err != nil { - return err - } - - clientCtx = clientCtx.WithGRPCClient(grpcClient) - svrCtx.Logger.Debug("gRPC client assigned to client context", "address", grpcAddress) - } } - var apiSrv *api.Server - if config.API.Enable { - apiSrv = api.New(clientCtx, svrCtx.Logger.With("server", "api")) - app.RegisterAPIRoutes(apiSrv, config.API) - - if config.Telemetry.Enabled { - apiSrv.SetTelemetry(metrics) - } - - errCh := make(chan error) - go func() { - if err := apiSrv.Start(config.Config); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } - - defer apiSrv.Close() + grpcSrv, clientCtx, err := startGrpcServer(ctx, svrCtx, clientCtx, g, config.GRPC, app) + if err != nil { + return err } - - var ( - grpcSrv *grpc.Server - grpcWebSrv *http.Server - ) - - if config.GRPC.Enable { - grpcSrv, err = servergrpc.StartGRPCServer(clientCtx, app, config.GRPC) - if err != nil { - return err - } - defer grpcSrv.Stop() - if config.GRPCWeb.Enable { - grpcWebSrv, err = servergrpc.StartGRPCWeb(grpcSrv, config.Config) - if err != nil { - logger.Error("failed to start grpc-web http server", "error", err.Error()) - return err - } - - defer func() { - if err := grpcWebSrv.Close(); err != nil { - logger.Error("failed to close the grpc-web http server", "error", err.Error()) - } - }() - } + if grpcSrv != nil { + defer grpcSrv.GracefulStop() } - var ( - httpSrv *http.Server - httpSrvDone chan struct{} - ) + apiSrv := startAPIServer(ctx, svrCtx, clientCtx, g, config.Config, app, grpcSrv, metrics) + if apiSrv != nil { + defer apiSrv.Close() + } - if config.JSONRPC.Enable { - httpSrv, httpSrvDone, err = StartJSONRPC(svrCtx, clientCtx, &config, idxer) - if err != nil { - return err - } + clientCtx, httpSrv, httpSrvDone, err := startJSONRPCServer(svrCtx, clientCtx, g, config, genDocProvider, idxer) + if httpSrv != nil { defer func() { shutdownCtx, cancelFn := context.WithTimeout(context.Background(), 10*time.Second) defer cancelFn() @@ -573,60 +478,14 @@ func startInProcess(svrCtx *server.Context, clientCtx client.Context, opts Start } // At this point it is safe to block the process if we're in query only mode as - // we do not need to start Rosetta or handle any Tendermint related processes. + // we do not need to start Rosetta or handle any CometBFT related processes. if gRPCOnly { // wait for signal capture and gracefully return return g.Wait() } - var rosettaSrv crgserver.Server - if config.Rosetta.Enable { - offlineMode := config.Rosetta.Offline - - // If GRPC is not enabled rosetta cannot work in online mode, so it works in - // offline mode. - if !config.GRPC.Enable { - offlineMode = true - } - - minGasPrices, err := sdk.ParseDecCoins(config.MinGasPrices) - if err != nil { - logger.Error("failed to parse minimum-gas-prices", "error", err.Error()) - return err - } - - conf := &rosetta.Config{ - Blockchain: config.Rosetta.Blockchain, - Network: config.Rosetta.Network, - TendermintRPC: svrCtx.Config.RPC.ListenAddress, - GRPCEndpoint: config.GRPC.Address, - Addr: config.Rosetta.Address, - Retries: config.Rosetta.Retries, - Offline: offlineMode, - GasToSuggest: config.Rosetta.GasToSuggest, - EnableFeeSuggestion: config.Rosetta.EnableFeeSuggestion, - GasPrices: minGasPrices.Sort(), - Codec: clientCtx.Codec.(*codec.ProtoCodec), - InterfaceRegistry: clientCtx.InterfaceRegistry, - } - - rosettaSrv, err = rosetta.ServerFromConfig(conf) - if err != nil { - return err - } - - errCh := make(chan error) - go func() { - if err := rosettaSrv.Start(); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } + if err := startRosettaServer(svrCtx, clientCtx, g, config); err != nil { + return err } return g.Wait() @@ -692,3 +551,182 @@ func wrapCPUProfile(ctx *server.Context, callback func() error) error { return callback() } + +func getCtx(svrCtx *server.Context, block bool) (*errgroup.Group, context.Context) { + ctx, cancelFn := context.WithCancel(context.Background()) + g, ctx := errgroup.WithContext(ctx) + // listen for quit signals so the calling parent process can gracefully exit + server.ListenForQuitSignals(g, block, cancelFn, svrCtx.Logger) + return g, ctx +} + +func startGrpcServer( + ctx context.Context, + svrCtx *server.Context, + clientCtx client.Context, + g *errgroup.Group, + config serverconfig.GRPCConfig, + app types.Application, +) (*grpc.Server, client.Context, error) { + if !config.Enable { + // return grpcServer as nil if gRPC is disabled + return nil, clientCtx, nil + } + _, _, err := net.SplitHostPort(config.Address) + if err != nil { + return nil, clientCtx, errorsmod.Wrapf(err, "invalid grpc address %s", config.Address) + } + + maxSendMsgSize := config.MaxSendMsgSize + if maxSendMsgSize == 0 { + maxSendMsgSize = serverconfig.DefaultGRPCMaxSendMsgSize + } + + maxRecvMsgSize := config.MaxRecvMsgSize + if maxRecvMsgSize == 0 { + maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize + } + + // if gRPC is enabled, configure gRPC client for gRPC gateway and json-rpc + grpcClient, err := grpc.Dial( + config.Address, + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithDefaultCallOptions( + grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), + grpc.MaxCallRecvMsgSize(maxRecvMsgSize), + grpc.MaxCallSendMsgSize(maxSendMsgSize), + ), + ) + if err != nil { + return nil, clientCtx, err + } + // Set `GRPCClient` to `clientCtx` to enjoy concurrent grpc query. + // only use it if gRPC server is enabled. + clientCtx = clientCtx.WithGRPCClient(grpcClient) + svrCtx.Logger.Debug("gRPC client assigned to client context", "address", config.Address) + + grpcSrv, err := servergrpc.NewGRPCServer(clientCtx, app, config) + if err != nil { + return nil, clientCtx, err + } + + // Start the gRPC server in a goroutine. Note, the provided ctx will ensure + // that the server is gracefully shut down. + g.Go(func() error { + return servergrpc.StartGRPCServer(ctx, svrCtx.Logger.With("module", "grpc-server"), config, grpcSrv) + }) + return grpcSrv, clientCtx, nil +} + +func startAPIServer( + ctx context.Context, + svrCtx *server.Context, + clientCtx client.Context, + g *errgroup.Group, + svrCfg serverconfig.Config, + app types.Application, + grpcSrv *grpc.Server, + metrics *telemetry.Metrics, +) *api.Server { + if !svrCfg.API.Enable { + return nil + } + + apiSrv := api.New(clientCtx, svrCtx.Logger.With("server", "api"), grpcSrv) + app.RegisterAPIRoutes(apiSrv, svrCfg.API) + + if svrCfg.Telemetry.Enabled { + apiSrv.SetTelemetry(metrics) + } + + g.Go(func() error { + return apiSrv.Start(ctx, svrCfg) + }) + return apiSrv +} + +func startJSONRPCServer( + svrCtx *server.Context, + clientCtx client.Context, + g *errgroup.Group, + config config.Config, + genDocProvider node.GenesisDocProvider, + idxer ethermint.EVMTxIndexer, +) (ctx client.Context, httpSrv *http.Server, httpSrvDone chan struct{}, err error) { + ctx = clientCtx + if !config.JSONRPC.Enable { + return + } + + genDoc, err := genDocProvider() + if err != nil { + return ctx, httpSrv, httpSrvDone, err + } + + ctx = clientCtx.WithChainID(genDoc.ChainID) + g.Go(func() error { + httpSrv, httpSrvDone, err = StartJSONRPC(svrCtx, clientCtx, g, &config, idxer) + return err + }) + return +} + +func startRosettaServer( + svrCtx *server.Context, + clientCtx client.Context, + g *errgroup.Group, + config config.Config, +) error { + if !config.Rosetta.Enable { + return nil + } + + offlineMode := config.Rosetta.Offline + + // If GRPC is not enabled rosetta cannot work in online mode, so it works in + // offline mode. + if !config.GRPC.Enable { + offlineMode = true + } + + minGasPrices, err := sdk.ParseDecCoins(config.MinGasPrices) + if err != nil { + svrCtx.Logger.Error("failed to parse minimum-gas-prices", "error", err.Error()) + return err + } + + conf := &rosetta.Config{ + Blockchain: config.Rosetta.Blockchain, + Network: config.Rosetta.Network, + TendermintRPC: svrCtx.Config.RPC.ListenAddress, + GRPCEndpoint: config.GRPC.Address, + Addr: config.Rosetta.Addr, + Retries: config.Rosetta.Retries, + Offline: offlineMode, + GasToSuggest: config.Rosetta.GasToSuggest, + EnableFeeSuggestion: config.Rosetta.EnableFeeSuggestion, + GasPrices: minGasPrices.Sort(), + Codec: clientCtx.Codec.(*codec.ProtoCodec), + InterfaceRegistry: clientCtx.InterfaceRegistry, + } + + rosettaSrv, err := rosetta.ServerFromConfig(conf) + if err != nil { + return err + } + + g.Go(rosettaSrv.Start) + return nil +} + +// returns a function which returns the genesis doc from the genesis file. +func GenDocProvider(cfg *cmtcfg.Config) func() (*cmttypes.GenesisDoc, error) { + return func() (*cmttypes.GenesisDoc, error) { + appGenesis, err := genutiltypes.AppGenesisFromFile(cfg.GenesisFile()) + if err != nil { + return nil, err + } + + return appGenesis.ToGenesisDoc() + } +} diff --git a/server/util.go b/server/util.go index 7eed497d25..4f9b24837a 100644 --- a/server/util.go +++ b/server/util.go @@ -34,8 +34,8 @@ import ( "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/version" - tcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" - tmlog "github.com/cometbft/cometbft/libs/log" + tmlog "cosmossdk.io/log" + cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" ) // AddCommands adds server commands @@ -45,18 +45,19 @@ func AddCommands( appExport types.AppExporter, addStartFlags types.ModuleInitFlags, ) { - tendermintCmd := &cobra.Command{ - Use: "tendermint", - Short: "Tendermint subcommands", + cometCmd := &cobra.Command{ + Use: "comet", + Aliases: []string{"cometbft", "tendermint"}, + Short: "CometBFT subcommands", } - tendermintCmd.AddCommand( + cometCmd.AddCommand( sdkserver.ShowNodeIDCmd(), sdkserver.ShowValidatorCmd(), sdkserver.ShowAddressCmd(), sdkserver.VersionCmd(), - tcmd.ResetAllCmd, - tcmd.ResetStateCmd, + cmtcmd.ResetAllCmd, + cmtcmd.ResetStateCmd, sdkserver.BootstrapStateCmd(opts.AppCreator), ) @@ -65,7 +66,7 @@ func AddCommands( rootCmd.AddCommand( startCmd, - tendermintCmd, + cometCmd, sdkserver.ExportCmd(appExport, opts.DefaultNodeHome), version.NewVersionCommand(), sdkserver.NewRollbackCmd(opts.AppCreator, opts.DefaultNodeHome), diff --git a/store/cachekv/README.md b/store/cachekv/README.md index 66f0916dea..aa0f442508 100644 --- a/store/cachekv/README.md +++ b/store/cachekv/README.md @@ -7,8 +7,8 @@ The core goals the CacheKVStore seeks to solve are: * Buffer all writes to the parent store, so they can be dropped if they need to be reverted * Allow iteration over contiguous spans of keys * Act as a cache, improving access time for reads that have already been done (by replacing tree access with hashtable access, avoiding disk I/O) - * Note: We actually fail to achieve this for iteration right now - * Note: Need to consider this getting too large and dropping some cached reads + * Note: We actually fail to achieve this for iteration right now + * Note: Need to consider this getting too large and dropping some cached reads * Make subsequent reads account for prior buffered writes * Write all buffered changes to the parent store @@ -70,19 +70,19 @@ The `Set`, `Get`, and `Delete` functions all call `setCacheValue()`, which is th ### `Set` -New values are written by setting or updating the value of a key in `cache`. `Set` does not write to `parent`. +New values are written by setting or updating the value of a key in `cache`. `Set` does not write to `parent`. Calls `setCacheValue()` with `deleted=false` and `dirty=true`. ### `Delete` -A value being deleted from the `KVStore` is represented with a `nil` value in `cache`, and an insertion of the key into the `deleted` set. `Delete` does not write to `parent`. +A value being deleted from the `KVStore` is represented with a `nil` value in `cache`, and an insertion of the key into the `deleted` set. `Delete` does not write to `parent`. Calls `setCacheValue()` with `deleted=true` and `dirty=true`. ### `Write` -Key-value pairs in the cache are written to `parent` in ascending order of their keys. +Key-value pairs in the cache are written to `parent` in ascending order of their keys. A slice of all dirty keys in `cache` is made, then sorted in increasing order. These keys are iterated over to update `parent`. @@ -90,7 +90,7 @@ If a key is marked for deletion (checked with `isDeleted()`), then `parent.Delet ## Iteration -Efficient iteration over keys in `KVStore` is important for generating Merkle range proofs. Iteration over `CacheKVStore` requires producing all key-value pairs from the underlying `KVStore` while taking into account updated values from the cache. +Efficient iteration over keys in `KVStore` is important for generating Merkle range proofs. Iteration over `CacheKVStore` requires producing all key-value pairs from the underlying `KVStore` while taking into account updated values from the cache. In the current implementation, there is no guarantee that all values in `parent` have been cached. As a result, iteration is achieved by interleaved iteration through both `parent` and the cache (failing to actually benefit from caching). @@ -129,12 +129,12 @@ if n < minSortSize { } ``` -Here, we iterate through all the keys in `unsortedCache` (i.e., the dirty cache keys), collecting those within the requested range in an unsorted slice called `unsorted`. +Here, we iterate through all the keys in `unsortedCache` (i.e., the dirty cache keys), collecting those within the requested range in an unsorted slice called `unsorted`. At this point, part 3. is achieved in `clearUnsortedCacheSubset()`. This function iterates through `unsorted`, removing each key from `unsortedCache`. Afterwards, `unsorted` is sorted. Lastly, it iterates through the now sorted slice, inserting key-value pairs into `sortedCache`. Any key marked for deletion is mapped to an arbitrary value (`[]byte{}`). -In the case that the size of `unsortedCache` is larger than `minSortSize`, a linear time approach to finding keys within the desired range is too slow to use. Instead, a slice of all keys in `unsortedCache` is sorted, and binary search is used to find the beginning and ending indices of the desired range. This produces an already-sorted slice that is passed into the same `clearUnsortedCacheSubset()` function. An iota identifier (`sortedState`) is used to skip the sorting step in the function. +In the case that the size of `unsortedCache` is larger than `minSortSize`, a linear time approach to finding keys within the desired range is too slow to use. Instead, a slice of all keys in `unsortedCache` is sorted, and binary search is used to find the beginning and ending indices of the desired range. This produces an already-sorted slice that is passed into the same `clearUnsortedCacheSubset()` function. An iota identifier (`sortedState`) is used to skip the sorting step in the function. -Finally, part 4. is achieved with `memIterator`, which implements an iterator over the items in `sortedCache`. +Finally, part 4. is achieved with `memIterator`, which implements an iterator over the items in `sortedCache`. -As of [PR #12885](https://github.com/cosmos/cosmos-sdk/pull/12885), an optimization to the binary search case mitigates the overhead of sorting the entirety of the key set in `unsortedCache`. To avoid wasting the compute spent sorting, we should ensure that a reasonable amount of values are removed from `unsortedCache`. If the length of the range for iteration is less than `minSortedCache`, we widen the range of values for removal from `unsortedCache` to be up to `minSortedCache` in length. This amortizes the cost of processing elements across multiple calls. \ No newline at end of file +As of [PR #12885](https://github.com/cosmos/cosmos-sdk/pull/12885), an optimization to the binary search case mitigates the overhead of sorting the entirety of the key set in `unsortedCache`. To avoid wasting the compute spent sorting, we should ensure that a reasonable amount of values are removed from `unsortedCache`. If the length of the range for iteration is less than `minSortedCache`, we widen the range of values for removal from `unsortedCache` to be up to `minSortedCache` in length. This amortizes the cost of processing elements across multiple calls. diff --git a/store/cachekv/benchmark_test.go b/store/cachekv/benchmark_test.go index 7ff66e581a..7936672448 100644 --- a/store/cachekv/benchmark_test.go +++ b/store/cachekv/benchmark_test.go @@ -4,8 +4,8 @@ import ( fmt "fmt" "testing" - dbm "github.com/cometbft/cometbft-db" - "github.com/cosmos/cosmos-sdk/store/dbadapter" + dbm "github.com/cosmos/cosmos-db" + "cosmossdk.io/store/dbadapter" "github.com/evmos/ethermint/store/cachekv" "github.com/stretchr/testify/require" ) diff --git a/store/cachekv/internal/btree.go b/store/cachekv/internal/btree.go index 644bcf1baf..76e6888b1f 100644 --- a/store/cachekv/internal/btree.go +++ b/store/cachekv/internal/btree.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" "github.com/tidwall/btree" ) diff --git a/store/cachekv/internal/btree_test.go b/store/cachekv/internal/btree_test.go index bd19449ba4..d43b4fa4fc 100644 --- a/store/cachekv/internal/btree_test.go +++ b/store/cachekv/internal/btree_test.go @@ -3,7 +3,7 @@ package internal import ( "testing" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" ) diff --git a/store/cachekv/internal/memiterator.go b/store/cachekv/internal/memiterator.go index d1b98bd5b6..de8db07339 100644 --- a/store/cachekv/internal/memiterator.go +++ b/store/cachekv/internal/memiterator.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" "github.com/tidwall/btree" ) diff --git a/store/cachekv/internal/mergeiterator.go b/store/cachekv/internal/mergeiterator.go index 293bc968e7..e4d80ab491 100644 --- a/store/cachekv/internal/mergeiterator.go +++ b/store/cachekv/internal/mergeiterator.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" ) // cacheMergeIterator merges a parent Iterator and a cache Iterator. diff --git a/store/cachekv/store.go b/store/cachekv/store.go index 20c6bc0b62..9e809d4993 100644 --- a/store/cachekv/store.go +++ b/store/cachekv/store.go @@ -4,8 +4,8 @@ import ( "io" "sync" - "github.com/cosmos/cosmos-sdk/store/tracekv" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/tracekv" + "cosmossdk.io/store/types" "github.com/evmos/ethermint/store/cachekv/internal" ) diff --git a/store/cachekv/store_bench_test.go b/store/cachekv/store_bench_test.go index abfc63d99c..9e7ece49e5 100644 --- a/store/cachekv/store_bench_test.go +++ b/store/cachekv/store_bench_test.go @@ -3,9 +3,9 @@ package cachekv_test import ( "testing" - dbm "github.com/cometbft/cometbft-db" + dbm "github.com/cosmos/cosmos-db" - "github.com/cosmos/cosmos-sdk/store/dbadapter" + "cosmossdk.io/store/dbadapter" "github.com/evmos/ethermint/store/cachekv" ) diff --git a/store/cachekv/store_test.go b/store/cachekv/store_test.go index 78db8f7385..bb53bd660d 100644 --- a/store/cachekv/store_test.go +++ b/store/cachekv/store_test.go @@ -4,12 +4,12 @@ import ( "fmt" "testing" - dbm "github.com/cometbft/cometbft-db" + dbm "github.com/cosmos/cosmos-db" tmrand "github.com/cometbft/cometbft/libs/rand" "github.com/stretchr/testify/require" - "github.com/cosmos/cosmos-sdk/store/dbadapter" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/dbadapter" + "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/evmos/ethermint/store/cachekv" ) diff --git a/store/cachemulti/store.go b/store/cachemulti/store.go index 41923c5e1f..2a78c8ad7c 100644 --- a/store/cachemulti/store.go +++ b/store/cachemulti/store.go @@ -4,8 +4,8 @@ import ( "fmt" "io" - "github.com/cosmos/cosmos-sdk/store/tracekv" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/tracekv" + "cosmossdk.io/store/types" "github.com/evmos/ethermint/store/cachekv" ) diff --git a/store/cachemulti/store_test.go b/store/cachemulti/store_test.go index 80d54a1f43..84d67cab91 100644 --- a/store/cachemulti/store_test.go +++ b/store/cachemulti/store_test.go @@ -7,7 +7,7 @@ import ( "github.com/evmos/ethermint/store/cachekv" "github.com/stretchr/testify/require" - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" ) func TestStoreGetKVStore(t *testing.T) { diff --git a/tests/importer/importer_test.go b/tests/importer/importer_test.go index 656f42b89f..b60f602aa8 100644 --- a/tests/importer/importer_test.go +++ b/tests/importer/importer_test.go @@ -9,6 +9,7 @@ import ( "testing" "time" + sdkmath "cosmossdk.io/math" "github.com/evmos/ethermint/app" "github.com/stretchr/testify/require" @@ -21,7 +22,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus/ethash" - "github.com/ethereum/go-ethereum/core" ethcore "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" ethvm "github.com/ethereum/go-ethereum/core/vm" @@ -29,7 +29,7 @@ import ( ethparams "github.com/ethereum/go-ethereum/params" ethrlp "github.com/ethereum/go-ethereum/rlp" - "github.com/cometbft/cometbft/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/crypto/tmhash" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmversion "github.com/cometbft/cometbft/proto/tendermint/version" @@ -65,7 +65,7 @@ func (suite *ImporterTestSuite) DoSetupTest(t require.TestingT) { priv, err := ethsecp256k1.GenerateKey() require.NoError(t, err) consAddress := sdk.ConsAddress(priv.PubKey().Address()) - suite.ctx = suite.app.BaseApp.NewContext(checkTx, tmproto.Header{ + suite.ctx = suite.app.BaseApp.NewUncachedContext(checkTx, tmproto.Header{ Height: 1, ChainID: "ethermint_9000-1", Time: time.Now().UTC(), @@ -87,7 +87,7 @@ func (suite *ImporterTestSuite) DoSetupTest(t require.TestingT) { NextValidatorsHash: tmhash.Sum([]byte("next_validators")), ConsensusHash: tmhash.Sum([]byte("consensus")), LastResultsHash: tmhash.Sum([]byte("last_result")), - }) + }).WithConsensusParams(*app.DefaultConsensusParams) } func (suite *ImporterTestSuite) SetupTest() { @@ -136,12 +136,9 @@ func (suite *ImporterTestSuite) TestImportBlocks() { tmheader := suite.ctx.BlockHeader() // fix due to that begin block can't have height 0 tmheader.Height = int64(block.NumberU64()) + 1 - suite.app.BeginBlock(types.RequestBeginBlock{ - Header: tmheader, - }) - ctx := suite.app.NewContext(false, tmheader) - ctx = ctx.WithBlockHeight(tmheader.Height) - vmdb := statedb.New(ctx, suite.app.EvmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash().Bytes()))) + ctx := suite.app.NewUncachedContext(false, tmheader).WithConsensusParams(*app.DefaultConsensusParams) + suite.app.BeginBlocker(ctx) + vmdb := statedb.New(ctx, suite.app.EvmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash()))) if chainConfig.DAOForkSupport && chainConfig.DAOForkBlock != nil && chainConfig.DAOForkBlock.Cmp(block.Number()) == 0 { applyDAOHardFork(vmdb) @@ -160,8 +157,13 @@ func (suite *ImporterTestSuite) TestImportBlocks() { accumulateRewards(chainConfig, vmdb, header, block.Uncles()) // simulate BaseApp EndBlocker commitment - endBR := types.RequestEndBlock{Height: tmheader.Height} - suite.app.EndBlocker(ctx, endBR) + suite.app.EndBlocker(ctx) + if _, err := suite.app.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: suite.app.LastBlockHeight() + 1, + Hash: suite.app.LastCommitID().Hash, + }); err != nil { + panic(err) + } suite.app.Commit() // block debugging output @@ -230,7 +232,7 @@ func applyTransaction( gp *ethcore.GasPool, evmKeeper *evmkeeper.Keeper, vmdb *statedb.StateDB, header *ethtypes.Header, tx *ethtypes.Transaction, usedGas *uint64, cfg ethvm.Config, ) (*ethtypes.Receipt, uint64, error) { - msg, err := core.TransactionToMessage(tx, ethtypes.MakeSigner(config, header.Number), sdk.ZeroInt().BigInt()) + msg, err := ethcore.TransactionToMessage(tx, ethtypes.MakeSigner(config, header.Number), sdkmath.ZeroInt().BigInt()) if err != nil { return nil, 0, err } diff --git a/tests/integration_tests/configs/broken-ethermintd.patch b/tests/integration_tests/configs/broken-ethermintd.patch index 255e99493f..20a9a9c283 100644 --- a/tests/integration_tests/configs/broken-ethermintd.patch +++ b/tests/integration_tests/configs/broken-ethermintd.patch @@ -1,15 +1,15 @@ diff --git a/app/app.go b/app/app.go -index 158bf7a3..a3b5718c 100644 +index d19a465d..f0e63d30 100644 --- a/app/app.go +++ b/app/app.go -@@ -681,6 +681,10 @@ func (app *EthermintApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBloc +@@ -861,6 +861,10 @@ func (app *EthermintApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { // EndBlocker updates every end block - func (app *EthermintApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { + func (app *EthermintApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { + if ctx.BlockHeight()%10 == 0 { + store := ctx.KVStore(app.keys["evm"]) + store.Set([]byte("hello"), []byte("world")) + } - return app.mm.EndBlock(ctx, req) + return app.ModuleManager.EndBlock(ctx) } diff --git a/tests/integration_tests/configs/cosmovisor.jsonnet b/tests/integration_tests/configs/cosmovisor.jsonnet index 9ab20f617f..4630f9a5ab 100644 --- a/tests/integration_tests/configs/cosmovisor.jsonnet +++ b/tests/integration_tests/configs/cosmovisor.jsonnet @@ -6,24 +6,21 @@ config { 'minimum-gas-prices': '100000000000aphoton', }, genesis+: { + consensus_params: { + block: { + max_bytes: '1048576', + max_gas: '81500000', + }, + }, app_state+: { feemarket+: { params+: { base_fee:: super.base_fee, }, }, - gov: { - voting_params: { - voting_period: '10s', - }, - deposit_params: { - max_deposit_period: '10s', - min_deposit: [ - { - denom: 'aphoton', - amount: '1', - }, - ], + gov+: { + params+: { + expedited_voting_period:: super.expedited_voting_period, }, }, }, diff --git a/tests/integration_tests/configs/default.jsonnet b/tests/integration_tests/configs/default.jsonnet index 43363452e0..bb67f3b7c1 100644 --- a/tests/integration_tests/configs/default.jsonnet +++ b/tests/integration_tests/configs/default.jsonnet @@ -3,12 +3,6 @@ 'ethermint_9000-1': { cmd: 'ethermintd', 'start-flags': '--trace', - config: { - mempool: { - // use v1 mempool to enable tx prioritization - version: 'v1', - }, - }, 'app-config': { 'minimum-gas-prices': '0aphoton', 'index-events': ['ethereum_tx.ethereumTxHash'], @@ -27,7 +21,7 @@ staked: '1000000000000000000stake', mnemonic: mnemonic, client_config: { - 'broadcast-mode': 'block', + 'broadcast-mode': 'sync', }, } for mnemonic in ['${VALIDATOR1_MNEMONIC}', '${VALIDATOR2_MNEMONIC}']], accounts: [{ @@ -44,10 +38,15 @@ mnemonic: '${SIGNER2_MNEMONIC}', }], genesis: { - consensus_params: { - block: { - max_bytes: '1048576', - max_gas: '81500000', + consensus: { + params: { + block: { + max_bytes: '1048576', + max_gas: '81500000', + }, + abci: { + vote_extensions_enable_height: '1', + }, }, }, app_state: { @@ -58,6 +57,7 @@ }, gov: { params: { + expedited_voting_period: '1s', voting_period: '10s', max_deposit_period: '10s', min_deposit: [ diff --git a/tests/integration_tests/configs/indexer.jsonnet b/tests/integration_tests/configs/indexer.jsonnet index b1e81af000..2550188017 100644 --- a/tests/integration_tests/configs/indexer.jsonnet +++ b/tests/integration_tests/configs/indexer.jsonnet @@ -15,9 +15,11 @@ config { }, }, genesis+: { - consensus_params+: { - evidence+: { - max_age_num_blocks: '10', + consensus+: { + params+: { + evidence+: { + max_age_num_blocks: '10', + }, }, }, }, diff --git a/tests/integration_tests/configs/upgrade-test-package.nix b/tests/integration_tests/configs/upgrade-test-package.nix index 0bc2df3f86..e356e7a12d 100644 --- a/tests/integration_tests/configs/upgrade-test-package.nix +++ b/tests/integration_tests/configs/upgrade-test-package.nix @@ -1,16 +1,16 @@ let pkgs = import ../../../nix { }; - fetchEthermint = rev: builtins.fetchTarball "https://github.com/evmos/ethermint/archive/${rev}.tar.gz"; - released = pkgs.buildGo120Module rec { - name = "ethermintd"; - src = fetchEthermint "d29cdad6e667f6089dfecbedd36bb8d3a2a7d025"; - subPackages = [ "cmd/ethermintd" ]; - vendorHash = "sha256-cQAol54b6hNzsA4Q3MP9mTqFWM1MvR5uMPrYpaoj3SY="; - doCheck = false; - }; + fetchFlake = repo: rev: (pkgs.flake-compat { + src = { + outPath = builtins.fetchTarball "https://github.com/${repo}/archive/${rev}.tar.gz"; + inherit rev; + shortRev = builtins.substring 0 7 rev; + }; + }).defaultNix; + released = (fetchFlake "crypto-org-chain/ethermint" "b216a320ac6a60b019c1cbe5a6b730856482f071").default; current = pkgs.callPackage ../../../. { }; in pkgs.linkFarm "upgrade-test-package" [ { name = "genesis"; path = released; } - { name = "integration-test-upgrade"; path = current; } + { name = "sdk50"; path = current; } ] diff --git a/tests/integration_tests/conftest.py b/tests/integration_tests/conftest.py index fd129abd58..57e77a0040 100644 --- a/tests/integration_tests/conftest.py +++ b/tests/integration_tests/conftest.py @@ -27,9 +27,7 @@ def geth(tmp_path_factory): yield from setup_geth(path, 8545) -@pytest.fixture( - scope="session", params=["ethermint", "ethermint-ws"] -) +@pytest.fixture(scope="session", params=["ethermint", "ethermint-ws"]) def ethermint_rpc_ws(request, ethermint): """ run on both ethermint and ethermint websocket diff --git a/tests/integration_tests/cosmoscli.py b/tests/integration_tests/cosmoscli.py index 006bff7c92..8002aef758 100644 --- a/tests/integration_tests/cosmoscli.py +++ b/tests/integration_tests/cosmoscli.py @@ -6,6 +6,8 @@ from dateutil.parser import isoparse from pystarport.utils import build_cli_args_safe, interact +from .utils import get_sync_info + DEFAULT_GAS_PRICE = "5000000000000aphoton" DEFAULT_GAS = "250000" @@ -131,10 +133,10 @@ def status(self): return json.loads(self.raw("status", node=self.node_rpc)) def block_height(self): - return int(self.status()["SyncInfo"]["latest_block_height"]) + return int(get_sync_info(self.status())["latest_block_height"]) def block_time(self): - return isoparse(self.status()["SyncInfo"]["latest_block_time"]) + return isoparse(get_sync_info(self.status())["latest_block_time"]) def balances(self, addr): return json.loads( @@ -277,16 +279,13 @@ def validators(self): def get_params(self, module, **kwargs): kwargs.setdefault("node", self.node_rpc) kwargs.setdefault("output", "json") - return json.loads( - self.raw("query", module, "params", **kwargs) - ) + return json.loads(self.raw("query", module, "params", **kwargs)) def staking_pool(self, bonded=True): - return int( - json.loads( - self.raw("query", "staking", "pool", output="json", node=self.node_rpc) - )["bonded_tokens" if bonded else "not_bonded_tokens"] - ) + res = self.raw("query", "staking", "pool", output="json", node=self.node_rpc) + res = json.loads(res) + res = res.get("pool") or res + return int(res["bonded_tokens" if bonded else "not_bonded_tokens"]) def transfer(self, from_, to, coins, generate_only=False, **kwargs): kwargs.setdefault("gas_prices", DEFAULT_GAS_PRICE) @@ -639,9 +638,10 @@ def edit_validator( ) ) - def gov_propose(self, proposer, kind, proposal, **kwargs): - method = "submit-proposal" + def gov_propose_legacy(self, proposer, kind, proposal, **kwargs): + method = "submit-legacy-proposal" kwargs.setdefault("gas_prices", DEFAULT_GAS_PRICE) + kwargs.setdefault("gas", DEFAULT_GAS) if kind == "software-upgrade": return json.loads( self.raw( @@ -651,6 +651,7 @@ def gov_propose(self, proposer, kind, proposal, **kwargs): kind, proposal["name"], "-y", + "--no-validate", from_=proposer, # content title=proposal.get("title"), @@ -704,7 +705,7 @@ def gov_propose(self, proposer, kind, proposal, **kwargs): def gov_vote(self, voter, proposal_id, option, **kwargs): kwargs.setdefault("gas_prices", DEFAULT_GAS_PRICE) kwargs.setdefault("broadcast_mode", "sync") - return json.loads( + rsp = json.loads( self.raw( "tx", "gov", @@ -717,6 +718,9 @@ def gov_vote(self, voter, proposal_id, option, **kwargs): **kwargs, ) ) + if rsp["code"] == 0: + rsp = self.event_query_tx_for(rsp["txhash"]) + return rsp def gov_deposit(self, depositor, proposal_id, amount): return json.loads( @@ -751,7 +755,7 @@ def query_proposals(self, depositor=None, limit=None, status=None, voter=None): ) def query_proposal(self, proposal_id): - return json.loads( + res = json.loads( self.raw( "query", "gov", @@ -761,6 +765,7 @@ def query_proposal(self, proposal_id): node=self.node_rpc, ) ) + return res.get("proposal") or res def query_tally(self, proposal_id): return json.loads( diff --git a/tests/integration_tests/network.py b/tests/integration_tests/network.py index 3fa25ba56d..1552faa7d1 100644 --- a/tests/integration_tests/network.py +++ b/tests/integration_tests/network.py @@ -9,7 +9,7 @@ from web3.middleware import geth_poa_middleware from .cosmoscli import CosmosCLI -from .utils import supervisorctl, wait_for_port +from .utils import supervisorctl, w3_wait_for_block, wait_for_port DEFAULT_CHAIN_BINARY = "ethermintd" @@ -144,9 +144,11 @@ def setup_custom_ethermint( if wait_port: wait_for_port(ports.evmrpc_port(base_port)) wait_for_port(ports.evmrpc_ws_port(base_port)) - yield Ethermint( + e = Ethermint( path / "ethermint_9000-1", chain_binary=chain_binary or DEFAULT_CHAIN_BINARY ) + w3_wait_for_block(e.w3, 1) + yield e finally: os.killpg(os.getpgid(proc.pid), signal.SIGTERM) proc.wait() diff --git a/tests/integration_tests/test_account.py b/tests/integration_tests/test_account.py index 88fbe87ff3..b18028f7a7 100644 --- a/tests/integration_tests/test_account.py +++ b/tests/integration_tests/test_account.py @@ -11,20 +11,14 @@ def custom_ethermint(tmp_path_factory): yield from setup_ethermint(path, 26700, long_timeout_commit=True) -@pytest.fixture(scope="module", params=["ethermint", "ethermint-ws", "geth"]) -def cluster(request, custom_ethermint, geth): +@pytest.fixture(scope="module", params=["ethermint"]) +def cluster(request, custom_ethermint): """ run on ethermint, ethermint websocket and geth """ provider = request.param if provider == "ethermint": yield custom_ethermint - elif provider == "ethermint-ws": - ethermint_ws = custom_ethermint.copy() - ethermint_ws.use_websocket() - yield ethermint_ws - elif provider == "geth": - yield geth else: raise NotImplementedError diff --git a/tests/integration_tests/test_call.py b/tests/integration_tests/test_call.py index fbc33e351c..127f6005b0 100644 --- a/tests/integration_tests/test_call.py +++ b/tests/integration_tests/test_call.py @@ -45,9 +45,7 @@ def test_override_state(ethermint): info = json.loads(CONTRACTS["Greeter"].read_text()) int_value = 100 state = { - ("0x" + "0" * 64): HexBytes( - w3.codec.encode(("uint256",), (int_value,)) - ).hex(), + ("0x" + "0" * 64): HexBytes(w3.codec.encode(("uint256",), (int_value,))).hex(), } result = w3.eth.call( { diff --git a/tests/integration_tests/test_estimate_gas.py b/tests/integration_tests/test_estimate_gas.py index 44bd58f511..3dea7f44be 100644 --- a/tests/integration_tests/test_estimate_gas.py +++ b/tests/integration_tests/test_estimate_gas.py @@ -42,7 +42,10 @@ def do_call(data): error = do_call("0x9ffb86a5") assert error["code"] == 3 assert error["message"] == "execution reverted: Function has been reverted" - assert (error["data"] == "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a46756e6374696f6e20686173206265656e207265766572746564000000000000") # noqa: E501 + assert ( + error["data"] + == "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a46756e6374696f6e20686173206265656e207265766572746564000000000000" # noqa: E501 + ) # revertWithoutMsg error = do_call("0x3246485d") diff --git a/tests/integration_tests/test_fee_history.py b/tests/integration_tests/test_fee_history.py index d36dd06b72..a341604be6 100644 --- a/tests/integration_tests/test_fee_history.py +++ b/tests/integration_tests/test_fee_history.py @@ -12,6 +12,7 @@ approve_proposal, eth_to_bech32, send_transaction, + w3_wait_for_block, w3_wait_for_new_blocks, ) @@ -42,6 +43,8 @@ def cluster(request, custom_ethermint, geth): def test_basic(cluster): w3: Web3 = cluster.w3 + # need at least 5 blocks + w3_wait_for_block(w3, 5) call = w3.provider.make_request tx = {"to": ADDRS["community"], "value": 10, "gasPrice": w3.eth.gas_price} send_transaction(w3, tx) @@ -138,7 +141,7 @@ def params_fn(height): def test_beyond_head(cluster): - end = hex(0x7fffffffffffffff) + end = hex(0x7FFFFFFFFFFFFFFF) res = cluster.w3.provider.make_request("eth_feeHistory", [4, end, []]) msg = f"request beyond head block: requested {int(end, 16)}" assert msg in res["error"]["message"] @@ -152,9 +155,7 @@ def test_percentiles(cluster): size = 4 msg = "invalid reward percentile" with ThreadPoolExecutor(len(percentiles)) as exec: - tasks = [ - exec.submit(call, method, [size, "latest", p]) for p in percentiles - ] + tasks = [exec.submit(call, method, [size, "latest", p]) for p in percentiles] result = [future.result() for future in as_completed(tasks)] assert all(msg in res["error"]["message"] for res in result) @@ -185,7 +186,7 @@ def update_feemarket_param(node, tmp_path, new_multiplier=2, new_denominator=200 proposal.write_text(json.dumps(proposal_src)) rsp = cli.submit_gov_proposal(proposal, from_="community") assert rsp["code"] == 0, rsp["raw_log"] - approve_proposal(node, rsp) + approve_proposal(node, rsp, status=3) print("check params have been updated now") p = cli.get_params("feemarket")["params"] assert p["base_fee"] == new_base_fee diff --git a/tests/integration_tests/test_indexer.py b/tests/integration_tests/test_indexer.py index b7f0aceb8a..335773cc96 100644 --- a/tests/integration_tests/test_indexer.py +++ b/tests/integration_tests/test_indexer.py @@ -36,7 +36,9 @@ def edit_app_cfgs(enable): overwrite, ) pruned.supervisorctl( - "start", "ethermint_9000-1-node0", "ethermint_9000-1-node1", + "start", + "ethermint_9000-1-node0", + "ethermint_9000-1-node1", ) wait_for_port(ports.evmrpc_port(pruned.base_port(0))) wait_for_port(ports.evmrpc_port(pruned.base_port(1))) diff --git a/tests/integration_tests/test_priority.py b/tests/integration_tests/test_priority.py index c505f7a589..b899fcf22d 100644 --- a/tests/integration_tests/test_priority.py +++ b/tests/integration_tests/test_priority.py @@ -193,9 +193,10 @@ def test_native_tx_priority(ethermint): print(tx_indexes) # the first sent tx are included later, because of lower priority # ensure desc within continuous block - assert all(( - b1 < b2 or (b1 == b2 and i1 > i2) - ) for (b1, i1), (b2, i2) in zip(tx_indexes, tx_indexes[1:])) + assert all( + (b1 < b2 or (b1 == b2 and i1 > i2)) + for (b1, i1), (b2, i2) in zip(tx_indexes, tx_indexes[1:]) + ) def get_max_priority_price(max_priority_price): diff --git a/tests/integration_tests/test_storage_proof.py b/tests/integration_tests/test_storage_proof.py index 01a9d5c95a..8249b5cb74 100644 --- a/tests/integration_tests/test_storage_proof.py +++ b/tests/integration_tests/test_storage_proof.py @@ -1,7 +1,7 @@ import pytest from .network import setup_ethermint -from .utils import CONTRACTS, deploy_contract +from .utils import CONTRACTS, deploy_contract, w3_wait_for_block @pytest.fixture(scope="module") @@ -25,6 +25,8 @@ def cluster(request, custom_ethermint, geth): def test_basic(cluster): + w3_wait_for_block(cluster.w3, 3) + # proof queries at height <= 2 are not supported' _, res = deploy_contract( cluster.w3, CONTRACTS["StateContract"], diff --git a/tests/integration_tests/test_tracers.py b/tests/integration_tests/test_tracers.py index d8d2d81f2e..8781f52c88 100644 --- a/tests/integration_tests/test_tracers.py +++ b/tests/integration_tests/test_tracers.py @@ -55,7 +55,7 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == EXPECTED_CONTRACT_CREATE_TRACER), res + assert res[0] == res[-1] == EXPECTED_CONTRACT_CREATE_TRACER, res def fund_acc(w3, acc): @@ -149,9 +149,15 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == [ - json.dumps(EXPECTED_STRUCT_TRACER), expected, expected, - ]), res + assert ( + res[0] + == res[-1] + == [ + json.dumps(EXPECTED_STRUCT_TRACER), + expected, + expected, + ] + ), res def test_js_tracers(ethermint, geth): @@ -192,7 +198,7 @@ def process(w3): return this.retVal } } - """ + """, ] res = [] call = w3.provider.make_request @@ -207,7 +213,7 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == EXPECTED_JS_TRACERS), res + assert res[0] == res[-1] == EXPECTED_JS_TRACERS, res def test_tracecall_struct_tracer(ethermint, geth): @@ -232,7 +238,7 @@ def process(w3, gas): tasks = [exec.submit(process, w3, gas) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == EXPECTED_STRUCT_TRACER), res + assert res[0] == res[-1] == EXPECTED_STRUCT_TRACER, res # no gas limit set in tx res = process(ethermint.w3, None) @@ -261,10 +267,14 @@ def process(w3): tx = {"from": sender, "to": receiver, "value": hex(1)} tx_res = w3.provider.make_request(method, [tx, "latest", tracer]) assert "result" in tx_res - assert all(tx_res["result"][addr.lower()] == { - "balance": hex(w3.eth.get_balance(addr)), - "nonce": w3.eth.get_transaction_count(addr), - } for addr in [sender, receiver]), tx_res["result"] + assert all( + tx_res["result"][addr.lower()] + == { + "balance": hex(w3.eth.get_balance(addr)), + "nonce": w3.eth.get_transaction_count(addr), + } + for addr in [sender, receiver] + ), tx_res["result"] return tx_res["result"] providers = [ethermint.w3, geth.w3] @@ -297,21 +307,24 @@ def process(w3): return json.dumps(tx_res["result"], sort_keys=True) providers = [ethermint.w3, geth.w3] - expected = json.dumps({ - "post": { - receiver.lower(): {"balance": hex(3)}, - sender.lower(): {"balance": hex(fund - 3 - fee * 2), "nonce": 3} + expected = json.dumps( + { + "post": { + receiver.lower(): {"balance": hex(3)}, + sender.lower(): {"balance": hex(fund - 3 - fee * 2), "nonce": 3}, + }, + "pre": { + receiver.lower(): {"balance": hex(2)}, + sender.lower(): {"balance": hex(fund - 2 - fee * 2), "nonce": 2}, + }, }, - "pre": { - receiver.lower(): {"balance": hex(2)}, - sender.lower(): {"balance": hex(fund - 2 - fee * 2), "nonce": 2} - } - }, sort_keys=True) + sort_keys=True, + ) with ThreadPoolExecutor(len(providers)) as exec: tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == expected), res + assert res[0] == res[-1] == expected, res def test_debug_tracecall_call_tracer(ethermint, geth): @@ -327,7 +340,8 @@ def process(w3, gas): # set gas limit in tx tx["gas"] = hex(gas) tx_res = w3.provider.make_request( - method, [tx, "latest", {"tracer": "callTracer"}], + method, + [tx, "latest", {"tracer": "callTracer"}], ) assert "result" in tx_res return tx_res["result"] @@ -347,7 +361,7 @@ def process(w3, gas): tasks = [exec.submit(process, w3, gas) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == expected), res + assert res[0] == res[-1] == expected, res # no gas limit set in tx res = process(ethermint.w3, None) @@ -387,7 +401,7 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == balance), res + assert res[0] == res[-1] == balance, res def test_debug_tracecall_return_revert_data_when_call_failed(ethermint, geth): @@ -396,12 +410,16 @@ def test_debug_tracecall_return_revert_data_when_call_failed(ethermint, geth): def process(w3): test_revert, _ = deploy_contract(w3, CONTRACTS["TestRevert"]) tx_res = w3.provider.make_request( - "debug_traceCall", [{ - "value": "0x0", - "to": test_revert.address, - "from": ADDRS["validator"], - "data": "0x9ffb86a5", - }, "latest"] + "debug_traceCall", + [ + { + "value": "0x0", + "to": test_revert.address, + "from": ADDRS["validator"], + "data": "0x9ffb86a5", + }, + "latest", + ], ) assert "result" in tx_res tx_res = tx_res["result"] @@ -412,7 +430,7 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == expected), res + assert res[0] == res[-1] == expected, res def test_debug_tracecall_block_overrides(ethermint, geth): @@ -422,14 +440,16 @@ def test_debug_tracecall_block_overrides(ethermint, geth): # https://github.com/ethereum/go-ethereum/blob/v1.11.6/core/vm/opcodes.go#L95 tx = {"from": ADDRS["validator"], "input": "0x43", "gas": gas, "gasPrice": price} future_blk = "0x1337" - tracer = {"blockOverrides": { - "number": future_blk, - "coinbase": "0x1111111111111111111111111111111111111111", - "difficulty": hex(2), - "time": hex(3), - "baseLimit": hex(4), - "baseFee": hex(5), - }} + tracer = { + "blockOverrides": { + "number": future_blk, + "coinbase": "0x1111111111111111111111111111111111111111", + "difficulty": hex(2), + "time": hex(3), + "baseLimit": hex(4), + "baseFee": hex(5), + } + } def process(w3): w3_wait_for_new_blocks(w3, 1) @@ -441,7 +461,7 @@ def process(w3): tasks = [exec.submit(process, w3) for w3 in providers] res = [future.result() for future in as_completed(tasks)] assert len(res) == len(providers) - assert (res[0] == res[-1] == EXPECTED_BLOCK_OVERRIDES_TRACERS), res + assert res[0] == res[-1] == EXPECTED_BLOCK_OVERRIDES_TRACERS, res def test_trace_staticcall(ethermint, geth): @@ -460,15 +480,21 @@ def process(w3): fund_acc(w3, acc1) calculator, _ = deploy_contract(w3, CONTRACTS["Calculator"], key=acc.key) caller, _ = deploy_contract( - w3, CONTRACTS["Caller"], (calculator.address,), key=acc.key, + w3, + CONTRACTS["Caller"], + (calculator.address,), + key=acc.key, ) w3_wait_for_new_blocks(w3, 1, sleep=0.1) tx = {"to": caller.address, "data": selector, "gasPrice": price} txs = {key: tx for key in [acc.key, acc1.key]} txs[acc1.key] = txs[acc1.key] | { - "accessList": [{ - "address": calculator.address, "storageKeys": (x, y), - }] + "accessList": [ + { + "address": calculator.address, + "storageKeys": (x, y), + } + ] } sended_hash_set = send_txs(w3, txs) for txhash in sended_hash_set: diff --git a/tests/integration_tests/test_types.py b/tests/integration_tests/test_types.py index f99b9c6fb9..237cf3896a 100644 --- a/tests/integration_tests/test_types.py +++ b/tests/integration_tests/test_types.py @@ -219,17 +219,15 @@ def test_get_proof(ethermint_rpc_ws, geth): ) res = send_tnx(w3) - proof = (eth_rpc.make_request( - method, [validator, ["0x0"], hex(res["blockNumber"])] - ))["result"] + proof = ( + eth_rpc.make_request(method, [validator, ["0x0"], hex(res["blockNumber"])]) + )["result"] compare_types(proof, EXPECTED_GET_PROOF["result"]) assert proof["accountProof"], EXPECTED_ACCOUNT_PROOF assert proof["storageProof"][0]["proof"], EXPECTED_STORAGE_PROOF _ = send_and_get_hash(w3) - proof = eth_rpc.make_request( - method, [validator, ["0x0"], "latest"] - ) + proof = eth_rpc.make_request(method, [validator, ["0x0"], "latest"]) compare_types(proof, EXPECTED_GET_PROOF) diff --git a/tests/integration_tests/test_upgrade.py b/tests/integration_tests/test_upgrade.py index e136144a20..da02f3b4b2 100644 --- a/tests/integration_tests/test_upgrade.py +++ b/tests/integration_tests/test_upgrade.py @@ -5,7 +5,6 @@ from pathlib import Path import pytest -from dateutil.parser import isoparse from pystarport import ports from pystarport.cluster import SUPERVISOR_CONFIG_FILE @@ -13,11 +12,10 @@ from .utils import ( ADDRS, CONTRACTS, + approve_proposal, deploy_contract, - parse_events, send_transaction, wait_for_block, - wait_for_block_time, wait_for_port, ) @@ -94,7 +92,6 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): - check that queries on legacy blocks still works after upgrade. """ cli = custom_ethermint.cosmos_cli() - w3 = custom_ethermint.w3 contract, _ = deploy_contract(w3, CONTRACTS["TestERC20A"]) old_height = w3.eth.block_number @@ -106,8 +103,8 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): target_height = w3.eth.block_number + 10 print("upgrade height", target_height) - plan_name = "integration-test-upgrade" - rsp = cli.gov_propose( + plan_name = "sdk50" + rsp = cli.gov_propose_legacy( "community", "software-upgrade", { @@ -119,20 +116,7 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): }, ) assert rsp["code"] == 0, rsp["raw_log"] - - # get proposal_id - ev = parse_events(rsp["logs"])["submit_proposal"] - proposal_id = ev["proposal_id"] - - rsp = cli.gov_vote("validator", proposal_id, "yes") - assert rsp["code"] == 0, rsp["raw_log"] - # rsp = custom_ethermint.cosmos_cli(1).gov_vote("validator", proposal_id, "yes") - # assert rsp["code"] == 0, rsp["raw_log"] - - proposal = cli.query_proposal(proposal_id) - wait_for_block_time(cli, isoparse(proposal["voting_end_time"])) - proposal = cli.query_proposal(proposal_id) - assert proposal["status"] == "PROPOSAL_STATUS_PASSED", proposal + approve_proposal(custom_ethermint, rsp) # update cli chain binary custom_ethermint.chain_binary = ( @@ -172,11 +156,13 @@ def test_cosmovisor_upgrade(custom_ethermint: Ethermint): assert old_erc20_balance == contract.caller( block_identifier=target_height - 2 ).balanceOf(ADDRS["validator"]) - p = json.loads(cli.raw( - "query", - "ibc", - "client", - "params", - home=cli.data_dir, - )) + p = json.loads( + cli.raw( + "query", + "ibc", + "client", + "params", + home=cli.data_dir, + ) + ) assert p == {"allowed_clients": ["06-solomachine", "07-tendermint", "09-localhost"]} diff --git a/tests/integration_tests/test_websockets.py b/tests/integration_tests/test_websockets.py index 6118f9eb7c..ffe9e2542c 100644 --- a/tests/integration_tests/test_websockets.py +++ b/tests/integration_tests/test_websockets.py @@ -121,11 +121,15 @@ async def logs_test(c: Client, w3, contract): msgs = [await c.recv_subscription(sub_id) for i in range(total)] assert len(msgs) == total for msg in msgs: - assert topic in msg["topics"] == [ - topic, - HexBytes(b"\x00" * 12 + HexBytes(sender)).hex(), - HexBytes(b"\x00" * 12 + HexBytes(recipient)).hex(), - ] + assert ( + topic + in msg["topics"] + == [ + topic, + HexBytes(b"\x00" * 12 + HexBytes(sender)).hex(), + HexBytes(b"\x00" * 12 + HexBytes(recipient)).hex(), + ] + ) await assert_unsubscribe(c, sub_id) async def async_test(): diff --git a/tests/integration_tests/utils.py b/tests/integration_tests/utils.py index 9580cdd510..fe7e693507 100644 --- a/tests/integration_tests/utils.py +++ b/tests/integration_tests/utils.py @@ -83,11 +83,15 @@ def w3_wait_for_new_blocks(w3, n, sleep=0.5): break +def get_sync_info(s): + return s.get("SyncInfo") or s.get("sync_info") + + def wait_for_new_blocks(cli, n, sleep=0.5): - cur_height = begin_height = int((cli.status())["SyncInfo"]["latest_block_height"]) + cur_height = begin_height = int(get_sync_info(cli.status())["latest_block_height"]) while cur_height - begin_height < n: time.sleep(sleep) - cur_height = int((cli.status())["SyncInfo"]["latest_block_height"]) + cur_height = int(get_sync_info(cli.status())["latest_block_height"]) return cur_height @@ -98,7 +102,7 @@ def wait_for_block(cli, height, timeout=240): except AssertionError as e: print(f"get sync status failed: {e}", file=sys.stderr) else: - current_height = int(status["SyncInfo"]["latest_block_height"]) + current_height = int(get_sync_info(status)["latest_block_height"]) if current_height >= height: break print("current block height", current_height) @@ -125,7 +129,7 @@ def w3_wait_for_block(w3, height, timeout=240): def wait_for_block_time(cli, t): print("wait for block time", t) while True: - now = isoparse((cli.status())["SyncInfo"]["latest_block_time"]) + now = isoparse(get_sync_info(cli.status())["latest_block_time"]) print("block time now: ", now) if now >= t: break @@ -314,8 +318,8 @@ def build_batch_tx(w3, cli, txs, key=KEYS["validator"]): }, tx_hashes -def find_log_event_attrs(logs, ev_type, cond=None): - for ev in logs[0]["events"]: +def find_log_event_attrs(events, ev_type, cond=None): + for ev in events: if ev["type"] == ev_type: attrs = {attr["key"]: attr["value"] for attr in ev["attributes"]} if cond is None or cond(attrs): @@ -323,26 +327,27 @@ def find_log_event_attrs(logs, ev_type, cond=None): return None -def approve_proposal(n, rsp, event_query_tx=True): +def approve_proposal(n, rsp, status="PROPOSAL_STATUS_PASSED"): cli = n.cosmos_cli() - if event_query_tx: - rsp = cli.event_query_tx_for(rsp["txhash"]) + rsp = cli.event_query_tx_for(rsp["txhash"]) # get proposal_id def cb(attrs): return "proposal_id" in attrs - ev = find_log_event_attrs(rsp["logs"], "submit_proposal", cb) + ev = find_log_event_attrs(rsp["events"], "submit_proposal", cb) proposal_id = ev["proposal_id"] for i in range(len(n.config["validators"])): rsp = n.cosmos_cli(i).gov_vote("validator", proposal_id, "yes", gas=100000) assert rsp["code"] == 0, rsp["raw_log"] wait_for_new_blocks(cli, 1) + res = cli.query_tally(proposal_id) + res = res.get("tally") or res assert ( - int(cli.query_tally(proposal_id)["yes_count"]) == cli.staking_pool() + int(res["yes_count"]) == cli.staking_pool() ), "all validators should have voted yes" print("wait for proposal to be activated") proposal = cli.query_proposal(proposal_id) wait_for_block_time(cli, isoparse(proposal["voting_end_time"])) proposal = cli.query_proposal(proposal_id) - assert proposal["status"] == "PROPOSAL_STATUS_PASSED", proposal + assert proposal["status"] == status, proposal diff --git a/tests/signer.go b/tests/signer.go index 0ec74fab19..9b4be36b00 100644 --- a/tests/signer.go +++ b/tests/signer.go @@ -24,6 +24,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/evmos/ethermint/crypto/ethsecp256k1" ) @@ -61,7 +62,7 @@ func NewSigner(sk cryptotypes.PrivKey) keyring.Signer { } // Sign signs the message using the underlying private key -func (s Signer) Sign(_ string, msg []byte) ([]byte, cryptotypes.PubKey, error) { +func (s Signer) Sign(_ string, msg []byte, _ signing.SignMode) ([]byte, cryptotypes.PubKey, error) { if s.privKey.Type() != ethsecp256k1.KeyType { return nil, nil, fmt.Errorf( "invalid private key type for signing ethereum tx; expected %s, got %s", @@ -79,11 +80,11 @@ func (s Signer) Sign(_ string, msg []byte) ([]byte, cryptotypes.PubKey, error) { } // SignByAddress sign byte messages with a user key providing the address. -func (s Signer) SignByAddress(address sdk.Address, msg []byte) ([]byte, cryptotypes.PubKey, error) { +func (s Signer) SignByAddress(address sdk.Address, msg []byte, signMode signing.SignMode) ([]byte, cryptotypes.PubKey, error) { signer := sdk.AccAddress(s.privKey.PubKey().Address()) if !signer.Equals(address) { return nil, nil, fmt.Errorf("address mismatch: signer %s ≠ given address %s", signer, address) } - return s.Sign("", msg) + return s.Sign("", msg, signMode) } diff --git a/testutil/abci.go b/testutil/abci.go index 58a8be5013..05ee76170c 100644 --- a/testutil/abci.go +++ b/testutil/abci.go @@ -4,7 +4,7 @@ import ( "time" abci "github.com/cometbft/cometbft/abci/types" - tmtypes "github.com/cometbft/cometbft/types" + cmttypes "github.com/cometbft/cometbft/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/evmos/ethermint/app" @@ -16,11 +16,15 @@ import ( // 2. DeliverTx // 3. EndBlock // 4. Commit -func Commit(ctx sdk.Context, app *app.EthermintApp, t time.Duration, vs *tmtypes.ValidatorSet) (sdk.Context, error) { +func Commit(ctx sdk.Context, app *app.EthermintApp, t time.Duration, vs *cmttypes.ValidatorSet) (sdk.Context, error) { header := ctx.BlockHeader() + req := abci.RequestFinalizeBlock{Height: header.Height} if vs != nil { - res := app.EndBlock(abci.RequestEndBlock{Height: header.Height}) + res, err := app.FinalizeBlock(&req) + if err != nil { + return ctx, err + } nextVals, err := applyValSetChanges(vs, res.ValidatorUpdates) if err != nil { @@ -29,26 +33,30 @@ func Commit(ctx sdk.Context, app *app.EthermintApp, t time.Duration, vs *tmtypes header.ValidatorsHash = vs.Hash() header.NextValidatorsHash = nextVals.Hash() } else { - app.EndBlocker(ctx, abci.RequestEndBlock{Height: header.Height}) + if _, err := app.EndBlocker(ctx); err != nil { + return ctx, err + } } - _ = app.Commit() + if _, err := app.Commit(); err != nil { + return ctx, err + } header.Height++ header.Time = header.Time.Add(t) header.AppHash = app.LastCommitID().Hash - app.BeginBlock(abci.RequestBeginBlock{ - Header: header, - }) + if _, err := app.BeginBlocker(ctx); err != nil { + return ctx, err + } return ctx.WithBlockHeader(header), nil } // applyValSetChanges takes in tmtypes.ValidatorSet and []abci.ValidatorUpdate and will return a new tmtypes.ValidatorSet which has the // provided validator updates applied to the provided validator set. -func applyValSetChanges(valSet *tmtypes.ValidatorSet, valUpdates []abci.ValidatorUpdate) (*tmtypes.ValidatorSet, error) { - updates, err := tmtypes.PB2TM.ValidatorUpdates(valUpdates) +func applyValSetChanges(valSet *cmttypes.ValidatorSet, valUpdates []abci.ValidatorUpdate) (*cmttypes.ValidatorSet, error) { + updates, err := cmttypes.PB2TM.ValidatorUpdates(valUpdates) if err != nil { return nil, err } diff --git a/testutil/base_test_suite.go b/testutil/base_test_suite.go index e558c55024..afad7e9f9b 100644 --- a/testutil/base_test_suite.go +++ b/testutil/base_test_suite.go @@ -5,6 +5,8 @@ import ( "math/big" "time" + coreheader "cosmossdk.io/core/header" + sdkmath "cosmossdk.io/math" abci "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -22,7 +24,6 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/crypto/ethsecp256k1" - "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/server/config" "github.com/evmos/ethermint/tests" ethermint "github.com/evmos/ethermint/types" @@ -58,15 +59,15 @@ func (suite *BaseTestSuite) SetupTestWithCbAndOpts( ) { checkTx := false suite.App = app.SetupWithOpts(checkTx, patch, appOptions) - suite.Ctx = suite.App.NewContext(checkTx, tmproto.Header{ + suite.Ctx = suite.App.NewUncachedContext(checkTx, tmproto.Header{ Height: 1, ChainID: app.ChainID, Time: time.Now().UTC(), - }) + }).WithChainID(app.ChainID) } func (suite *BaseTestSuite) StateDB() *statedb.StateDB { - return statedb.New(suite.Ctx, suite.App.EvmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(suite.Ctx.HeaderHash().Bytes()))) + return statedb.New(suite.Ctx, suite.App.EvmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(suite.Ctx.HeaderHash()))) } type BaseTestSuiteWithAccount struct { @@ -122,13 +123,15 @@ func (suite *BaseTestSuiteWithAccount) PostSetupValidator(t require.TestingT) st BaseAccount: authtypes.NewBaseAccount(sdk.AccAddress(suite.Address.Bytes()), nil, 0, 0), CodeHash: common.BytesToHash(crypto.Keccak256(nil)).String(), } + acc.AccountNumber = suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) suite.App.AccountKeeper.SetAccount(suite.Ctx, acc) valAddr := sdk.ValAddress(suite.Address.Bytes()) - validator, err := stakingtypes.NewValidator(valAddr, suite.ConsPubKey, stakingtypes.Description{}) + validator, err := stakingtypes.NewValidator(valAddr.String(), suite.ConsPubKey, stakingtypes.Description{}) require.NoError(t, err) err = suite.App.StakingKeeper.SetValidatorByConsAddr(suite.Ctx, validator) require.NoError(t, err) - suite.App.StakingKeeper.SetValidator(suite.Ctx, validator) + err = suite.App.StakingKeeper.SetValidator(suite.Ctx, validator) + require.NoError(t, err) return validator } @@ -171,7 +174,7 @@ func (suite *BaseTestSuiteWithAccount) BuildEthTx( func (suite *BaseTestSuiteWithAccount) PrepareEthTx(msgEthereumTx *types.MsgEthereumTx, privKey *ethsecp256k1.PrivKey) []byte { ethSigner := ethtypes.LatestSignerForChainID(suite.App.EvmKeeper.ChainID()) - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + encodingConfig := suite.App.EncodingConfig() option, err := codectypes.NewAnyWithValue(&types.ExtensionOptionsEthereumTx{}) suite.Require().NoError(err) @@ -190,7 +193,7 @@ func (suite *BaseTestSuiteWithAccount) PrepareEthTx(msgEthereumTx *types.MsgEthe suite.Require().NoError(err) evmDenom := suite.App.EvmKeeper.GetParams(suite.Ctx).EvmDenom - fees := sdk.Coins{{Denom: evmDenom, Amount: sdk.NewIntFromBigInt(txData.Fee())}} + fees := sdk.Coins{{Denom: evmDenom, Amount: sdkmath.NewIntFromBigInt(txData.Fee())}} builder.SetFeeAmount(fees) builder.SetGasLimit(msgEthereumTx.GetGas()) @@ -202,23 +205,50 @@ func (suite *BaseTestSuiteWithAccount) PrepareEthTx(msgEthereumTx *types.MsgEthe } func (suite *BaseTestSuiteWithAccount) CheckTx(tx []byte) abci.ResponseCheckTx { - return suite.App.CheckTx(abci.RequestCheckTx{Tx: tx}) + res, err := suite.App.CheckTx(&abci.RequestCheckTx{Tx: tx}) + if err != nil { + panic(err) + } + return *res } -func (suite *BaseTestSuiteWithAccount) DeliverTx(tx []byte) abci.ResponseDeliverTx { - return suite.App.DeliverTx(abci.RequestDeliverTx{Tx: tx}) +func (suite *BaseTestSuiteWithAccount) DeliverTx(tx []byte) *abci.ExecTxResult { + txs := [][]byte{tx} + height := suite.App.LastBlockHeight() + 1 + res, err := suite.App.FinalizeBlock(&abci.RequestFinalizeBlock{ + ProposerAddress: suite.ConsAddress, + Height: height, + Txs: txs, + }) + if err != nil { + panic(err) + } + results := res.GetTxResults() + if len(results) != 1 { + panic("must have one result") + } + return results[0] } // Commit and begin new block -func (suite *BaseTestSuiteWithAccount) Commit() { - _ = suite.App.Commit() +func (suite *BaseTestSuiteWithAccount) Commit(t require.TestingT) { + jumpTime := time.Second * 0 + _, err := suite.App.FinalizeBlock(&abci.RequestFinalizeBlock{ + Height: suite.Ctx.BlockHeight(), + Time: suite.Ctx.BlockTime(), + }) + require.NoError(t, err) + _, err = suite.App.Commit() + require.NoError(t, err) + newBlockTime := suite.Ctx.BlockTime().Add(jumpTime) header := suite.Ctx.BlockHeader() + header.Time = newBlockTime header.Height++ - suite.App.BeginBlock(abci.RequestBeginBlock{ - Header: header, - }) // update ctx - suite.Ctx = suite.App.NewContext(false, header) + suite.Ctx = suite.App.NewUncachedContext(false, header).WithHeaderInfo(coreheader.Info{ + Height: header.Height, + Time: header.Time, + }) } type evmQueryClientTrait struct { @@ -282,7 +312,6 @@ func (suite *EVMTestSuiteWithAccountAndQueryClient) DeployTestContract( supply *big.Int, enableFeemarket bool, ) common.Address { - ctx := sdk.WrapSDKContext(suite.Ctx) chainID := suite.App.EvmKeeper.ChainID() ctorArgs, err := types.ERC20Contract.ABI.Pack("", owner, supply) require.NoError(t, err) @@ -293,7 +322,7 @@ func (suite *EVMTestSuiteWithAccountAndQueryClient) DeployTestContract( Data: (*hexutil.Bytes)(&data), }) require.NoError(t, err) - res, err := suite.EvmQueryClient.EstimateGas(ctx, &types.EthCallRequest{ + res, err := suite.EvmQueryClient.EstimateGas(suite.Ctx, &types.EthCallRequest{ Args: args, GasCap: config.DefaultGasCap, ProposerAddress: suite.Ctx.BlockHeader().ProposerAddress, @@ -329,22 +358,21 @@ func (suite *EVMTestSuiteWithAccountAndQueryClient) DeployTestContract( erc20DeployTx.From = suite.Address.Bytes() err = erc20DeployTx.Sign(ethtypes.LatestSignerForChainID(chainID), suite.Signer) require.NoError(t, err) - rsp, err := suite.App.EvmKeeper.EthereumTx(ctx, erc20DeployTx) + rsp, err := suite.App.EvmKeeper.EthereumTx(suite.Ctx, erc20DeployTx) require.NoError(t, err) require.Empty(t, rsp.VmError) return crypto.CreateAddress(suite.Address, nonce) } // Commit and begin new block -func (suite *EVMTestSuiteWithAccountAndQueryClient) Commit() { - suite.BaseTestSuiteWithAccount.Commit() +func (suite *EVMTestSuiteWithAccountAndQueryClient) Commit(t require.TestingT) { + suite.BaseTestSuiteWithAccount.Commit(t) queryHelper := baseapp.NewQueryServerTestHelper(suite.Ctx, suite.App.InterfaceRegistry()) types.RegisterQueryServer(queryHelper, suite.App.EvmKeeper) suite.EvmQueryClient = types.NewQueryClient(queryHelper) } func (suite *EVMTestSuiteWithAccountAndQueryClient) EvmDenom() string { - ctx := sdk.WrapSDKContext(suite.Ctx) - rsp, _ := suite.EvmQueryClient.Params(ctx, &types.QueryParamsRequest{}) + rsp, _ := suite.EvmQueryClient.Params(suite.Ctx, &types.QueryParamsRequest{}) return rsp.Params.EvmDenom } diff --git a/testutil/network/network.go b/testutil/network/network.go index 44435826be..e2dc45b5e1 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -24,25 +24,27 @@ import ( "net/http" "net/url" "os" + "os/signal" "path/filepath" "strings" "sync" + "syscall" "testing" "time" + "cosmossdk.io/log" sdkmath "cosmossdk.io/math" - dbm "github.com/cometbft/cometbft-db" - tmcfg "github.com/cometbft/cometbft/config" - tmflags "github.com/cometbft/cometbft/libs/cli/flags" - "github.com/cometbft/cometbft/libs/log" - tmrand "github.com/cometbft/cometbft/libs/rand" + cmtrand "github.com/cometbft/cometbft/libs/rand" "github.com/cometbft/cometbft/node" tmrpcclient "github.com/cometbft/cometbft/rpc/client" + dbm "github.com/cosmos/cosmos-db" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/spf13/cobra" + "golang.org/x/sync/errgroup" "google.golang.org/grpc" + pruningtypes "cosmossdk.io/store/pruning/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" @@ -54,7 +56,6 @@ import ( "github.com/cosmos/cosmos-sdk/server/api" srvconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -63,7 +64,6 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/evmos/ethermint/crypto/hd" - "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/server/config" ethermint "github.com/evmos/ethermint/types" evmtypes "github.com/evmos/ethermint/x/evm/types" @@ -73,7 +73,10 @@ import ( ) // network lock to only allow one test network at a time -var lock = new(sync.Mutex) +var ( + lock = new(sync.Mutex) + portPool = make(chan string, 200) +) // AppConstructor defines a function which accepts a network configuration and // creates an ABCI Application to provide to Tendermint. @@ -128,8 +131,8 @@ type Config struct { // DefaultConfig returns a sane default configuration suitable for nearly all // testing requirements. func DefaultConfig() Config { - encCfg := encoding.MakeConfig(app.ModuleBasics) - chainID := fmt.Sprintf("ethermint_%d-1", tmrand.Int63n(9999999999999)+1) + encCfg := app.MakeConfigForTest() + chainID := fmt.Sprintf("ethermint_%d-1", cmtrand.Int63n(9999999999999)+1) return Config{ Codec: encCfg.Codec, TxConfig: encCfg.TxConfig, @@ -198,6 +201,8 @@ type ( grpcWeb *http.Server jsonrpc *http.Server jsonrpcDone chan struct{} + errGroup *errgroup.Group + cancelFn context.CancelFunc } ) @@ -271,13 +276,13 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { appCfg.Telemetry.GlobalLabels = [][]string{{"chain_id", cfg.ChainID}} ctx := server.NewDefaultContext() - tmCfg := ctx.Config - tmCfg.Consensus.TimeoutCommit = cfg.TimeoutCommit + cmtCfg := ctx.Config + cmtCfg.Consensus.TimeoutCommit = cfg.TimeoutCommit // Only allow the first validator to expose an RPC, API and gRPC // server/client due to Tendermint in-process constraints. apiAddr := "" - tmCfg.RPC.ListenAddress = "" + cmtCfg.RPC.ListenAddress = "" appCfg.GRPC.Enable = false appCfg.GRPCWeb.Enable = false apiListenAddr := "" @@ -285,11 +290,11 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { if cfg.APIAddress != "" { apiListenAddr = cfg.APIAddress } else { - var err error - apiListenAddr, _, err = server.FreeTCPAddr() - if err != nil { - return nil, err + if len(portPool) == 0 { + return nil, fmt.Errorf("failed to get port for API server") } + port := <-portPool + apiListenAddr = fmt.Sprintf("tcp://0.0.0.0:%s", port) } appCfg.API.Address = apiListenAddr @@ -300,41 +305,34 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { apiAddr = fmt.Sprintf("http://%s:%s", apiURL.Hostname(), apiURL.Port()) if cfg.RPCAddress != "" { - tmCfg.RPC.ListenAddress = cfg.RPCAddress + cmtCfg.RPC.ListenAddress = cfg.RPCAddress } else { - rpcAddr, _, err := server.FreeTCPAddr() - if err != nil { - return nil, err + if len(portPool) == 0 { + return nil, fmt.Errorf("failed to get port for RPC server") } - tmCfg.RPC.ListenAddress = rpcAddr + port := <-portPool + cmtCfg.RPC.ListenAddress = fmt.Sprintf("tcp://0.0.0.0:%s", port) } if cfg.GRPCAddress != "" { appCfg.GRPC.Address = cfg.GRPCAddress } else { - _, grpcPort, err := server.FreeTCPAddr() - if err != nil { - return nil, err + if len(portPool) == 0 { + return nil, fmt.Errorf("failed to get port for GRPC server") } - appCfg.GRPC.Address = fmt.Sprintf("0.0.0.0:%s", grpcPort) + port := <-portPool + appCfg.GRPC.Address = fmt.Sprintf("0.0.0.0:%s", port) } appCfg.GRPC.Enable = true - _, grpcWebPort, err := server.FreeTCPAddr() - if err != nil { - return nil, err - } - appCfg.GRPCWeb.Address = fmt.Sprintf("0.0.0.0:%s", grpcWebPort) - appCfg.GRPCWeb.Enable = true - if cfg.JSONRPCAddress != "" { appCfg.JSONRPC.Address = cfg.JSONRPCAddress } else { - _, jsonRPCPort, err := server.FreeTCPAddr() - if err != nil { - return nil, err + if len(portPool) == 0 { + return nil, fmt.Errorf("failed to get port for JSON-RPC server") } - appCfg.JSONRPC.Address = fmt.Sprintf("127.0.0.1:%s", jsonRPCPort) + port := <-portPool + appCfg.JSONRPC.Address = fmt.Sprintf("0.0.0.0:%s", port) } appCfg.JSONRPC.Enable = true appCfg.JSONRPC.API = config.GetAPINamespaces() @@ -342,8 +340,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { logger := log.NewNopLogger() if cfg.EnableTMLogging { - logger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)) - logger, _ = tmflags.ParseLogLevel("info", logger, tmcfg.DefaultLogLevel) + logger = log.NewLogger(os.Stdout) } ctx.Logger = logger @@ -363,25 +360,27 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { return nil, err } - tmCfg.SetRoot(nodeDir) - tmCfg.Moniker = nodeDirName + cmtCfg.SetRoot(nodeDir) + cmtCfg.Moniker = nodeDirName monikers[i] = nodeDirName - proxyAddr, _, err := server.FreeTCPAddr() - if err != nil { - return nil, err + if len(portPool) == 0 { + return nil, fmt.Errorf("failed to get port for Proxy server") } - tmCfg.ProxyApp = proxyAddr + port := <-portPool + proxyAddr := fmt.Sprintf("tcp://0.0.0.0:%s", port) + cmtCfg.ProxyApp = proxyAddr - p2pAddr, _, err := server.FreeTCPAddr() - if err != nil { - return nil, err + if len(portPool) == 0 { + return nil, fmt.Errorf("failed to get port for Proxy server") } - tmCfg.P2P.ListenAddress = p2pAddr - tmCfg.P2P.AddrBookStrict = false - tmCfg.P2P.AllowDuplicateIP = true + port = <-portPool + p2pAddr := fmt.Sprintf("tcp://0.0.0.0:%s", port) + cmtCfg.P2P.ListenAddress = p2pAddr + cmtCfg.P2P.AddrBookStrict = false + cmtCfg.P2P.AllowDuplicateIP = true - nodeID, pubKey, err := genutil.InitializeNodeValidatorFiles(tmCfg) + nodeID, pubKey, err := genutil.InitializeNodeValidatorFiles(cmtCfg) if err != nil { return nil, err } @@ -427,25 +426,25 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { sdk.NewCoin(cfg.BondDenom, cfg.StakingTokens), ) - genFiles = append(genFiles, tmCfg.GenesisFile()) + genFiles = append(genFiles, cmtCfg.GenesisFile()) genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: balances.Sort()}) genAccounts = append(genAccounts, ðermint.EthAccount{ BaseAccount: authtypes.NewBaseAccount(addr, nil, 0, 0), CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(), }) - commission, err := sdk.NewDecFromStr("0.5") + commission, err := sdkmath.LegacyNewDecFromStr("0.5") if err != nil { return nil, err } createValMsg, err := stakingtypes.NewMsgCreateValidator( - sdk.ValAddress(addr), + addr.String(), valPubKeys[i], sdk.NewCoin(cfg.BondDenom, cfg.BondedTokens), stakingtypes.NewDescription(nodeDirName, "", "", "", ""), - stakingtypes.NewCommissionRates(commission, sdk.OneDec(), sdk.OneDec()), - sdk.OneInt(), + stakingtypes.NewCommissionRates(commission, sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()), + sdkmath.OneInt(), ) if err != nil { return nil, err @@ -474,7 +473,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { WithKeybase(kb). WithTxConfig(cfg.TxConfig) - if err := tx.Sign(txFactory, nodeDirName, txBuilder, true); err != nil { + if err := tx.Sign(context.Background(), txFactory, nodeDirName, txBuilder, true); err != nil { return nil, err } @@ -501,7 +500,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { clientCtx := client.Context{}. WithKeyringDir(clientDir). WithKeyring(kb). - WithHomeDir(tmCfg.RootDir). + WithHomeDir(cmtCfg.RootDir). WithChainID(cfg.ChainID). WithInterfaceRegistry(cfg.InterfaceRegistry). WithCodec(cfg.Codec). @@ -517,8 +516,8 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { NodeID: nodeID, PubKey: pubKey, Moniker: nodeDirName, - RPCAddress: tmCfg.RPC.ListenAddress, - P2PAddress: tmCfg.P2P.ListenAddress, + RPCAddress: cmtCfg.RPC.ListenAddress, + P2PAddress: cmtCfg.P2P.ListenAddress, APIAddress: apiAddr, Address: addr, ValAddress: sdk.ValAddress(addr), @@ -546,7 +545,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { // Ensure we cleanup incase any test was abruptly halted (e.g. SIGINT) as any // defer in a test would not be called. - server.TrapSignal(network.Cleanup) + trapSignal(network.Cleanup) return network, nil } @@ -711,3 +710,27 @@ func centerText(text string, width int) string { return fmt.Sprintf("%s%s%s", leftBuffer, text, rightBuffer) } + +// trapSignal traps SIGINT and SIGTERM and calls os.Exit once a signal is received. +func trapSignal(cleanupFunc func()) { + sigs := make(chan os.Signal, 1) + signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) + + go func() { + sig := <-sigs + + if cleanupFunc != nil { + cleanupFunc() + } + exitCode := 128 + + switch sig { + case syscall.SIGINT: + exitCode += int(syscall.SIGINT) + case syscall.SIGTERM: + exitCode += int(syscall.SIGTERM) + } + + os.Exit(exitCode) + }() +} diff --git a/testutil/network/util.go b/testutil/network/util.go index 2d5d18142a..13679baa22 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -16,11 +16,13 @@ package network import ( + "context" "encoding/json" "fmt" "path/filepath" - "time" + "cosmossdk.io/log" + cmtcfg "github.com/cometbft/cometbft/config" tmos "github.com/cometbft/cometbft/libs/os" "github.com/cometbft/cometbft/node" "github.com/cometbft/cometbft/p2p" @@ -28,12 +30,14 @@ import ( "github.com/cometbft/cometbft/proxy" "github.com/cometbft/cometbft/rpc/client/local" "github.com/cometbft/cometbft/types" - tmtime "github.com/cometbft/cometbft/types/time" + cmttime "github.com/cometbft/cometbft/types/time" "github.com/ethereum/go-ethereum/ethclient" + "golang.org/x/sync/errgroup" + sdkserver "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" - srvtypes "github.com/cosmos/cosmos-sdk/server/types" + servercmtlog "github.com/cosmos/cosmos-sdk/server/log" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" @@ -51,30 +55,31 @@ import ( func startInProcess(cfg Config, val *Validator) error { logger := val.Ctx.Logger - tmCfg := val.Ctx.Config - tmCfg.Instrumentation.Prometheus = false + cmtCfg := val.Ctx.Config + cmtCfg.Instrumentation.Prometheus = false if err := val.AppConfig.ValidateBasic(); err != nil { return err } - nodeKey, err := p2p.LoadOrGenNodeKey(tmCfg.NodeKeyFile()) + nodeKey, err := p2p.LoadOrGenNodeKey(cmtCfg.NodeKeyFile()) if err != nil { return err } app := cfg.AppConstructor(*val) - genDocProvider := node.DefaultGenesisDocProviderFunc(tmCfg) + genDocProvider := server.GenDocProvider(cmtCfg) + cmtApp := sdkserver.NewCometABCIWrapper(app) tmNode, err := node.NewNode( - tmCfg, - pvm.LoadOrGenFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile()), + cmtCfg, + pvm.LoadOrGenFilePV(cmtCfg.PrivValidatorKeyFile(), cmtCfg.PrivValidatorStateFile()), nodeKey, - proxy.NewLocalClientCreator(app), + proxy.NewLocalClientCreator(cmtApp), genDocProvider, - node.DefaultDBProvider, - node.DefaultMetricsProvider(tmCfg.Instrumentation), - logger.With("module", val.Moniker), + cmtcfg.DefaultDBProvider, + node.DefaultMetricsProvider(cmtCfg.Instrumentation), + servercmtlog.CometLoggerWrapper{Logger: logger.With("module", val.Moniker)}, ) if err != nil { return err @@ -100,43 +105,37 @@ func startInProcess(cfg Config, val *Validator) error { // Add the tendermint queries service in the gRPC router. app.RegisterTendermintService(val.ClientCtx) + app.RegisterNodeService(val.ClientCtx, val.AppConfig.Config) } + ctx := context.Background() + ctx, val.cancelFn = context.WithCancel(ctx) + val.errGroup, ctx = errgroup.WithContext(ctx) + if val.AppConfig.API.Enable && val.APIAddress != "" { - apiSrv := api.New(val.ClientCtx, logger.With("module", "api-server")) + apiSrv := api.New(val.ClientCtx, logger.With("module", "api-server"), val.grpc) app.RegisterAPIRoutes(apiSrv, val.AppConfig.API) - errCh := make(chan error) - - go func() { - if err := apiSrv.Start(val.AppConfig.Config); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(srvtypes.ServerStartTime): // assume server started successfully - } + val.errGroup.Go(func() error { + return apiSrv.Start(ctx, val.AppConfig.Config) + }) val.api = apiSrv } if val.AppConfig.GRPC.Enable { - grpcSrv, err := servergrpc.StartGRPCServer(val.ClientCtx, app, val.AppConfig.GRPC) + grpcSrv, err := servergrpc.NewGRPCServer(val.ClientCtx, app, val.AppConfig.GRPC) if err != nil { return err } - val.grpc = grpcSrv + // Start the gRPC server in a goroutine. Note, the provided ctx will ensure + // that the server is gracefully shut down. + val.errGroup.Go(func() error { + return servergrpc.StartGRPCServer(ctx, logger.With(log.ModuleKey, "grpc-server"), val.AppConfig.GRPC, grpcSrv) + }) - if val.AppConfig.GRPCWeb.Enable { - val.grpcWeb, err = servergrpc.StartGRPCWeb(grpcSrv, val.AppConfig.Config) - if err != nil { - return err - } - } + val.grpc = grpcSrv } if val.AppConfig.JSONRPC.Enable && val.AppConfig.JSONRPC.Address != "" { @@ -144,7 +143,7 @@ func startInProcess(cfg Config, val *Validator) error { return fmt.Errorf("validator %s context is nil", val.Moniker) } - val.jsonrpc, val.jsonrpcDone, err = server.StartJSONRPC(val.Ctx, val.ClientCtx, val.AppConfig, nil) + val.jsonrpc, val.jsonrpcDone, err = server.StartJSONRPC(val.Ctx, val.ClientCtx, val.errGroup, val.AppConfig, nil) if err != nil { return err } @@ -161,7 +160,7 @@ func startInProcess(cfg Config, val *Validator) error { } func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error { - genTime := tmtime.Now() + genTime := cmttime.Now() for i := 0; i < cfg.NumValidators; i++ { tmCfg := vals[i].Ctx.Config @@ -175,13 +174,19 @@ func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error { initCfg := genutiltypes.NewInitConfig(cfg.ChainID, gentxsDir, vals[i].NodeID, vals[i].PubKey) genFile := tmCfg.GenesisFile() - genDoc, err := types.GenesisDocFromFile(genFile) + genDoc, err := genutiltypes.AppGenesisFromFile(genFile) if err != nil { return err } appState, err := genutil.GenAppStateFromConfig(cfg.Codec, cfg.TxConfig, - tmCfg, initCfg, *genDoc, banktypes.GenesisBalancesIterator{}, genutiltypes.DefaultMessageValidator) + tmCfg, + initCfg, + genDoc, + banktypes.GenesisBalancesIterator{}, + genutiltypes.DefaultMessageValidator, + cfg.TxConfig.SigningContext().ValidatorAddressCodec(), + ) if err != nil { return err } diff --git a/testutil/tx/cosmos.go b/testutil/tx/cosmos.go index 1e2ad4e250..91ce574057 100644 --- a/testutil/tx/cosmos.go +++ b/testutil/tx/cosmos.go @@ -31,7 +31,7 @@ import ( var ( feeAmt = math.Pow10(16) - DefaultFee = sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewIntFromUint64(uint64(feeAmt))) + DefaultFee = sdk.NewCoin(evmtypes.DefaultEVMDenom, sdkmath.NewIntFromUint64(uint64(feeAmt))) ) // CosmosTxArgs contains the params to create a cosmos tx @@ -101,12 +101,17 @@ func signCosmosTx( return nil, err } + signMode, err := authsigning.APISignModeToInternal(args.TxCfg.SignModeHandler().DefaultMode()) + if err != nil { + return nil, err + } + // First round: we gather all the signer infos. We use the "set empty // signature" hack to do that. sigV2 := signing.SignatureV2{ PubKey: args.Priv.PubKey(), Data: &signing.SingleSignatureData{ - SignMode: args.TxCfg.SignModeHandler().DefaultMode(), + SignMode: signMode, Signature: nil, }, Sequence: seq, @@ -126,7 +131,8 @@ func signCosmosTx( Sequence: seq, } sigV2, err = tx.SignWithPrivKey( - args.TxCfg.SignModeHandler().DefaultMode(), + ctx, + signMode, signerData, txBuilder, args.Priv, args.TxCfg, seq, diff --git a/testutil/tx/eip712.go b/testutil/tx/eip712.go index 73bb9803fd..ef158dd8b8 100644 --- a/testutil/tx/eip712.go +++ b/testutil/tx/eip712.go @@ -113,7 +113,7 @@ func PrepareEIP712CosmosTx( fee := legacytx.NewStdFee(txArgs.Gas, txArgs.Fees) //nolint: staticcheck msgs := txArgs.Msgs - data := legacytx.StdSignBytes(ctx.ChainID(), accNumber, nonce, 0, fee, msgs, "", nil) + data := legacytx.StdSignBytes(ctx.ChainID(), accNumber, nonce, 0, fee, msgs, "") typedDataArgs := typedDataArgs{ chainID: chainIDNum, @@ -199,7 +199,7 @@ func signCosmosEIP712Tx( } keyringSigner := NewSigner(priv) - signature, pubKey, err := keyringSigner.SignByAddress(from, sigHash) + signature, pubKey, err := keyringSigner.SignByAddress(from, sigHash, signing.SignMode_SIGN_MODE_TEXTUAL) if err != nil { return nil, err } diff --git a/testutil/tx/signer.go b/testutil/tx/signer.go index 2d0d6a4417..200b7321bc 100644 --- a/testutil/tx/signer.go +++ b/testutil/tx/signer.go @@ -21,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/evmos/ethermint/crypto/ethsecp256k1" ) @@ -39,7 +40,7 @@ func NewSigner(sk cryptotypes.PrivKey) keyring.Signer { } // Sign signs the message using the underlying private key -func (s Signer) Sign(_ string, msg []byte) ([]byte, cryptotypes.PubKey, error) { +func (s Signer) Sign(_ string, msg []byte, _ signing.SignMode) ([]byte, cryptotypes.PubKey, error) { if s.privKey.Type() != ethsecp256k1.KeyType { return nil, nil, fmt.Errorf( "invalid private key type for signing ethereum tx; expected %s, got %s", @@ -57,11 +58,11 @@ func (s Signer) Sign(_ string, msg []byte) ([]byte, cryptotypes.PubKey, error) { } // SignByAddress sign byte messages with a user key providing the address. -func (s Signer) SignByAddress(address sdk.Address, msg []byte) ([]byte, cryptotypes.PubKey, error) { +func (s Signer) SignByAddress(address sdk.Address, msg []byte, signMode signing.SignMode) ([]byte, cryptotypes.PubKey, error) { signer := sdk.AccAddress(s.privKey.PubKey().Address()) if !signer.Equals(address) { return nil, nil, fmt.Errorf("address mismatch: signer %s ≠ given address %s", signer, address) } - return s.Sign("", msg) + return s.Sign("", msg, signMode) } diff --git a/types/account.go b/types/account.go index a93dcc17ec..2acd75055a 100644 --- a/types/account.go +++ b/types/account.go @@ -19,6 +19,7 @@ import ( "bytes" codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" @@ -26,7 +27,7 @@ import ( ) var ( - _ authtypes.AccountI = (*EthAccount)(nil) + _ sdk.AccountI = (*EthAccount)(nil) _ EthAccountI = (*EthAccount)(nil) _ authtypes.GenesisAccount = (*EthAccount)(nil) _ codectypes.UnpackInterfacesMessage = (*EthAccount)(nil) @@ -43,7 +44,7 @@ const ( // EthAccountI represents the interface of an EVM compatible account type EthAccountI interface { - authtypes.AccountI + sdk.AccountI // EthAddress returns the ethereum Address representation of the AccAddress EthAddress() common.Address // CodeHash is the keccak256 hash of the contract code (if any) @@ -60,7 +61,7 @@ type EthAccountI interface { // ProtoAccount defines the prototype function for BaseAccount used for an // AccountKeeper. -func ProtoAccount() authtypes.AccountI { +func ProtoAccount() sdk.AccountI { return &EthAccount{ BaseAccount: &authtypes.BaseAccount{}, CodeHash: common.BytesToHash(emptyCodeHash).String(), diff --git a/types/account.pb.go b/types/account.pb.go index 9307c396b2..5e54c38bda 100644 --- a/types/account.pb.go +++ b/types/account.pb.go @@ -25,7 +25,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// EthAccount implements the authtypes.AccountI interface and embeds an +// EthAccount implements the sdk.AccountI interface and embeds an // authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. type EthAccount struct { // base_account is an authtypes.BaseAccount @@ -73,27 +73,26 @@ func init() { func init() { proto.RegisterFile("ethermint/types/v1/account.proto", fileDescriptor_4edc057d42a619ef) } var fileDescriptor_4edc057d42a619ef = []byte{ - // 315 bytes of a gzipped FileDescriptorProto + // 299 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0x2d, 0xc9, 0x48, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xab, 0xd0, 0x03, 0xab, 0xd0, 0x2b, 0x33, 0x94, 0x92, 0x4b, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0xd0, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0x04, 0x73, 0x20, 0x7a, 0xa4, 0x24, 0x21, 0xf2, 0xf1, 0x60, 0x9e, 0x3e, 0x84, 0x03, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x87, - 0x88, 0x83, 0x58, 0x10, 0x51, 0xa5, 0x9f, 0x8c, 0x5c, 0x5c, 0xae, 0x25, 0x19, 0x8e, 0x10, 0x9b, + 0x88, 0x83, 0x58, 0x10, 0x51, 0xa5, 0xf3, 0x8c, 0x5c, 0x5c, 0xae, 0x25, 0x19, 0x8e, 0x10, 0x9b, 0x85, 0x12, 0xb8, 0x78, 0x92, 0x12, 0x8b, 0x53, 0xe3, 0xa1, 0x2e, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x52, 0xd0, 0x83, 0x9a, 0x04, 0xb6, 0x09, 0x6a, 0xad, 0x9e, 0x53, 0x62, 0x71, 0x2a, 0x54, 0x9f, 0x93, 0xf4, 0x85, 0x7b, 0xf2, 0x8c, 0x9f, 0xee, 0xc9, 0x0b, 0x57, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x21, 0x9b, 0xa1, 0x14, 0xc4, 0x9d, 0x84, 0x50, 0x29, 0x64, 0xc8, 0xc5, 0x99, 0x9c, 0x9f, 0x92, 0x1a, 0x9f, 0x91, 0x58, 0x9c, 0x21, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0xf2, 0xe9, 0x9e, 0xbc, 0x00, 0x44, 0x23, 0x5c, 0x4a, 0x29, 0x88, 0x03, 0xc4, 0xf6, 0x48, 0x2c, 0xce, - 0xb0, 0x0a, 0xeb, 0x58, 0x20, 0xcf, 0x30, 0x63, 0x81, 0x3c, 0xc3, 0x8b, 0x05, 0xf2, 0x0c, 0xa7, - 0xb6, 0xe8, 0xba, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0x42, 0xbd, 0x08, - 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x20, 0x81, 0x03, 0x09, 0x32, 0x6c, 0xee, 0x86, 0xba, - 0xc4, 0xd3, 0xc9, 0xea, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, - 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x14, 0x90, - 0x6c, 0x48, 0x2d, 0x03, 0x59, 0x80, 0x16, 0x5b, 0x49, 0x6c, 0xe0, 0xe0, 0x33, 0x06, 0x04, 0x00, - 0x00, 0xff, 0xff, 0x68, 0x6c, 0x09, 0x23, 0xc7, 0x01, 0x00, 0x00, + 0xb0, 0xd2, 0xe9, 0x58, 0x20, 0xcf, 0x30, 0x63, 0x81, 0x3c, 0xc3, 0x8b, 0x05, 0xf2, 0x0c, 0xa7, + 0xb6, 0xe8, 0xca, 0x60, 0x73, 0x0d, 0xd4, 0x7c, 0x4f, 0x27, 0xab, 0x13, 0x8f, 0xe4, 0x18, 0x2f, + 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, + 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x48, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x4f, 0x2d, 0x03, 0x05, 0x23, 0x5a, 0x1c, 0x24, 0xb1, 0x81, 0x03, 0xc5, 0x18, 0x10, 0x00, + 0x00, 0xff, 0xff, 0x74, 0xdc, 0xb8, 0x35, 0x9d, 0x01, 0x00, 0x00, } func (m *EthAccount) Marshal() (dAtA []byte, err error) { diff --git a/types/block.go b/types/block.go index ed1eae3391..5d0db44b9e 100644 --- a/types/block.go +++ b/types/block.go @@ -30,7 +30,7 @@ func BlockGasLimit(ctx sdk.Context) uint64 { // Otherwise get from the consensus parameters cp := ctx.ConsensusParams() - if cp == nil || cp.Block == nil { + if cp.Block == nil { return 0 } diff --git a/types/codec.go b/types/codec.go index 1bf2e00dbd..e85182cd35 100644 --- a/types/codec.go +++ b/types/codec.go @@ -17,6 +17,7 @@ package types import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -25,7 +26,7 @@ import ( // implementations and interfaces. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( - (*authtypes.AccountI)(nil), + (*sdk.AccountI)(nil), &EthAccount{}, ) registry.RegisterImplementations( diff --git a/types/dynamic_fee.pb.go b/types/dynamic_fee.pb.go index e28d04cd92..61e577b9ed 100644 --- a/types/dynamic_fee.pb.go +++ b/types/dynamic_fee.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -27,7 +27,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // ExtensionOptionDynamicFeeTx is an extension option that specifies the maxPrioPrice for cosmos tx type ExtensionOptionDynamicFeeTx struct { // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 spec - MaxPriorityPrice github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=max_priority_price,json=maxPriorityPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_priority_price"` + MaxPriorityPrice cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=max_priority_price,json=maxPriorityPrice,proto3,customtype=cosmossdk.io/math.Int" json:"max_priority_price"` } func (m *ExtensionOptionDynamicFeeTx) Reset() { *m = ExtensionOptionDynamicFeeTx{} } @@ -72,22 +72,22 @@ func init() { } var fileDescriptor_9d7cf05c9992c480 = []byte{ - // 232 bytes of a gzipped FileDescriptorProto + // 234 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x2d, 0xc9, 0x48, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0xa9, 0xcc, 0x4b, 0xcc, 0xcd, 0x4c, 0x8e, 0x4f, 0x4b, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xab, 0xd2, 0x03, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, - 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x4a, 0xd5, 0x5c, 0xd2, 0xae, 0x15, 0x25, 0xa9, 0x79, + 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x4a, 0x59, 0x5c, 0xd2, 0xae, 0x15, 0x25, 0xa9, 0x79, 0xc5, 0x99, 0xf9, 0x79, 0xfe, 0x05, 0x25, 0x99, 0xf9, 0x79, 0x2e, 0x10, 0xd3, 0xdc, 0x52, 0x53, - 0x43, 0x2a, 0x84, 0x62, 0xb8, 0x84, 0x72, 0x13, 0x2b, 0xe2, 0x0b, 0x8a, 0x32, 0xf3, 0x8b, 0x32, - 0x4b, 0x2a, 0x41, 0x8c, 0xe4, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xbd, 0x13, 0xf7, - 0xe4, 0x19, 0x6e, 0xdd, 0x93, 0x57, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, - 0xd5, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x86, 0x52, 0xba, 0xc5, 0x29, 0xd9, 0x10, 0x57, 0xea, - 0x79, 0xe6, 0x95, 0x04, 0x09, 0xe4, 0x26, 0x56, 0x04, 0x40, 0x0d, 0x0a, 0x00, 0x99, 0xe3, 0x64, - 0x75, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, - 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x0a, 0x48, 0x66, 0xa6, 0x96, - 0x81, 0x8c, 0x44, 0xf3, 0x77, 0x12, 0x1b, 0xd8, 0xfd, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x5c, 0xa9, 0x04, 0x48, 0x11, 0x01, 0x00, 0x00, + 0x43, 0x2a, 0x84, 0xbc, 0xb9, 0x84, 0x72, 0x13, 0x2b, 0xe2, 0x0b, 0x8a, 0x32, 0xf3, 0x8b, 0x32, + 0x4b, 0x2a, 0x41, 0x8c, 0xe4, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xd9, 0x13, 0xf7, + 0xe4, 0x19, 0x6e, 0xdd, 0x93, 0x17, 0x4d, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x2e, 0x4e, 0xc9, 0xd6, + 0xcb, 0xcc, 0xd7, 0xcf, 0x4d, 0x2c, 0xc9, 0xd0, 0xf3, 0xcc, 0x2b, 0x09, 0x12, 0xc8, 0x4d, 0xac, + 0x08, 0x80, 0xea, 0x0b, 0x00, 0x69, 0x73, 0xb2, 0x3a, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, + 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, + 0x39, 0x86, 0x28, 0x85, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xd4, + 0xb2, 0xdc, 0xfc, 0x62, 0x7d, 0x34, 0x6f, 0x26, 0xb1, 0x81, 0x9d, 0x6b, 0x0c, 0x08, 0x00, 0x00, + 0xff, 0xff, 0x8c, 0x36, 0x25, 0x41, 0x00, 0x01, 0x00, 0x00, } func (m *ExtensionOptionDynamicFeeTx) Marshal() (dAtA []byte, err error) { diff --git a/types/gasmeter.go b/types/gasmeter.go index 342f40a276..bf634708df 100644 --- a/types/gasmeter.go +++ b/types/gasmeter.go @@ -19,7 +19,7 @@ import ( fmt "fmt" math "math" - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "cosmossdk.io/store/types" ) // ErrorNegativeGasConsumed defines an error thrown when the amount of gas refunded results in a @@ -36,27 +36,27 @@ type ErrorGasOverflow struct { } type infiniteGasMeterWithLimit struct { - consumed sdk.Gas - limit sdk.Gas + consumed storetypes.Gas + limit storetypes.Gas } // NewInfiniteGasMeterWithLimit returns a reference to a new infiniteGasMeter. -func NewInfiniteGasMeterWithLimit(limit sdk.Gas) sdk.GasMeter { +func NewInfiniteGasMeterWithLimit(limit storetypes.Gas) storetypes.GasMeter { return &infiniteGasMeterWithLimit{ consumed: 0, limit: limit, } } -func (g *infiniteGasMeterWithLimit) GasConsumed() sdk.Gas { +func (g *infiniteGasMeterWithLimit) GasConsumed() storetypes.Gas { return g.consumed } -func (g *infiniteGasMeterWithLimit) GasConsumedToLimit() sdk.Gas { +func (g *infiniteGasMeterWithLimit) GasConsumedToLimit() storetypes.Gas { return g.consumed } -func (g *infiniteGasMeterWithLimit) Limit() sdk.Gas { +func (g *infiniteGasMeterWithLimit) Limit() storetypes.Gas { return g.limit } @@ -70,7 +70,7 @@ func addUint64Overflow(a, b uint64) (uint64, bool) { return a + b, false } -func (g *infiniteGasMeterWithLimit) ConsumeGas(amount sdk.Gas, descriptor string) { +func (g *infiniteGasMeterWithLimit) ConsumeGas(amount storetypes.Gas, descriptor string) { var overflow bool // TODO: Should we set the consumed field after overflow checking? g.consumed, overflow = addUint64Overflow(g.consumed, amount) @@ -85,7 +85,7 @@ func (g *infiniteGasMeterWithLimit) ConsumeGas(amount sdk.Gas, descriptor string // Use case: This functionality enables refunding gas to the trasaction or block gas pools so that // EVM-compatible chains can fully support the go-ethereum StateDb interface. // See https://github.com/cosmos/cosmos-sdk/pull/9403 for reference. -func (g *infiniteGasMeterWithLimit) RefundGas(amount sdk.Gas, descriptor string) { +func (g *infiniteGasMeterWithLimit) RefundGas(amount storetypes.Gas, descriptor string) { if g.consumed < amount { panic(ErrorNegativeGasConsumed{Descriptor: descriptor}) } @@ -105,6 +105,6 @@ func (g *infiniteGasMeterWithLimit) String() string { return fmt.Sprintf("InfiniteGasMeter:\n consumed: %d", g.consumed) } -func (g *infiniteGasMeterWithLimit) GasRemaining() sdk.Gas { +func (g *infiniteGasMeterWithLimit) GasRemaining() storetypes.Gas { return math.MaxUint64 } diff --git a/types/indexer.go b/types/indexer.go index f27e77fbb8..fb6acbf07c 100644 --- a/types/indexer.go +++ b/types/indexer.go @@ -25,7 +25,7 @@ import ( type EVMTxIndexer interface { // LastIndexedBlock returns -1 if indexer db is empty LastIndexedBlock() (int64, error) - IndexBlock(*tmtypes.Block, []*abci.ResponseDeliverTx) error + IndexBlock(*tmtypes.Block, []*abci.ExecTxResult) error // GetByTxHash returns nil if tx not found. GetByTxHash(common.Hash) (*TxResult, error) diff --git a/x/evm/genesis.go b/x/evm/genesis.go index 5df8066d8d..db3799d35b 100644 --- a/x/evm/genesis.go +++ b/x/evm/genesis.go @@ -21,7 +21,6 @@ import ( abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" @@ -89,7 +88,7 @@ func InitGenesis( // ExportGenesis exports genesis state of the EVM module func ExportGenesis(ctx sdk.Context, k *keeper.Keeper, ak types.AccountKeeper) *types.GenesisState { var ethGenAccounts []types.GenesisAccount - ak.IterateAccounts(ctx, func(account authtypes.AccountI) bool { + ak.IterateAccounts(ctx, func(account sdk.AccountI) bool { ethAccount, ok := account.(ethermint.EthAccountI) if !ok { // ignore non EthAccounts diff --git a/x/evm/genesis_test.go b/x/evm/genesis_test.go index 4af9ec6ec2..5a85c9591f 100644 --- a/x/evm/genesis_test.go +++ b/x/evm/genesis_test.go @@ -79,6 +79,7 @@ func (suite *GenesisTestSuite) TestInitGenesis() { "invalid account type", func() { acc := authtypes.NewBaseAccountWithAddress(address.Bytes()) + acc.AccountNumber = suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) suite.App.AccountKeeper.SetAccount(suite.Ctx, acc) }, &types.GenesisState{ @@ -130,7 +131,7 @@ func (suite *GenesisTestSuite) TestInitGenesis() { "ignore empty account code checking with non-empty codehash", func() { ethAcc := ðermint.EthAccount{ - BaseAccount: authtypes.NewBaseAccount(address.Bytes(), nil, 0, 0), + BaseAccount: authtypes.NewBaseAccount(address.Bytes(), nil, suite.App.AccountKeeper.NextAccountNumber(suite.Ctx), 0), CodeHash: common.BytesToHash([]byte{1, 2, 3}).Hex(), } diff --git a/x/evm/handler.go b/x/evm/handler.go deleted file mode 100644 index c7d03f34cf..0000000000 --- a/x/evm/handler.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Evmos Foundation -// This file is part of Evmos' Ethermint library. -// -// The Ethermint library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The Ethermint library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE -package evm - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/evmos/ethermint/x/evm/types" -) - -// NewHandler returns a handler for Ethermint type messages. -func NewHandler(server types.MsgServer) sdk.Handler { - return func(ctx sdk.Context, msg sdk.Msg) (result *sdk.Result, err error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - switch msg := msg.(type) { - case *types.MsgEthereumTx: - res, err := server.EthereumTx(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - case *types.MsgUpdateParams: - res, err := server.UpdateParams(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - default: - err := errorsmod.Wrapf(errortypes.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) - return nil, err - } - } -} diff --git a/x/evm/handler_test.go b/x/evm/handler_test.go index 760867a783..333a99c73e 100644 --- a/x/evm/handler_test.go +++ b/x/evm/handler_test.go @@ -9,7 +9,7 @@ import ( "github.com/evmos/ethermint/x/evm/keeper" sdkmath "cosmossdk.io/math" - "github.com/cosmos/gogoproto/proto" + storetypes "cosmossdk.io/store/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -25,13 +25,11 @@ import ( "github.com/evmos/ethermint/app" ethermint "github.com/evmos/ethermint/types" - "github.com/evmos/ethermint/x/evm" "github.com/evmos/ethermint/x/evm/types" ) type HandlerTestSuite struct { testutil.BaseTestSuiteWithAccount - handler sdk.Handler chainID *big.Int ethSigner ethtypes.Signer to sdk.AccAddress @@ -75,7 +73,6 @@ func (suite *HandlerTestSuite) SetupTest() { return genesis }) suite.ethSigner = ethtypes.LatestSignerForChainID(suite.App.EvmKeeper.ChainID()) - suite.handler = evm.NewHandler(suite.App.EvmKeeper) } func (suite *HandlerTestSuite) signTx(tx *types.MsgEthereumTx) { @@ -119,7 +116,7 @@ func (suite *HandlerTestSuite) TestHandleMsgEthereumTx() { { "invalid chain ID", func() { - suite.Ctx = suite.Ctx.WithChainID("chainID") + suite.Ctx = suite.Ctx.WithChainID("chainID").WithConsensusParams(*app.DefaultConsensusParams) }, false, }, @@ -137,7 +134,7 @@ func (suite *HandlerTestSuite) TestHandleMsgEthereumTx() { suite.SetupTest() // reset //nolint tc.malleate() - res, err := suite.handler(suite.Ctx, tx) + res, err := suite.App.EvmKeeper.EthereumTx(suite.Ctx, tx) //nolint if tc.expPass { @@ -178,14 +175,9 @@ func (suite *HandlerTestSuite) TestHandlerLogs() { tx := types.NewTx(suite.chainID, 1, nil, big.NewInt(0), gasLimit, gasPrice, nil, nil, bytecode, nil) suite.signTx(tx) - result, err := suite.handler(suite.Ctx, tx) + txResponse, err := suite.App.EvmKeeper.EthereumTx(suite.Ctx, tx) suite.Require().NoError(err, "failed to handle eth tx msg") - var txResponse types.MsgEthereumTxResponse - - err = proto.Unmarshal(result.Data, &txResponse) - suite.Require().NoError(err, "failed to decode result data") - suite.Require().Equal(len(txResponse.Logs), 1) suite.Require().Equal(len(txResponse.Logs[0].Topics), 2) } @@ -253,13 +245,8 @@ func (suite *HandlerTestSuite) TestDeployAndCallContract() { tx := types.NewTx(suite.chainID, 1, nil, big.NewInt(0), gasLimit, gasPrice, nil, nil, bytecode, nil) suite.signTx(tx) - result, err := suite.handler(suite.Ctx, tx) + res, err := suite.App.EvmKeeper.EthereumTx(suite.Ctx, tx) suite.Require().NoError(err, "failed to handle eth tx msg") - - var res types.MsgEthereumTxResponse - - err = proto.Unmarshal(result.Data, &res) - suite.Require().NoError(err, "failed to decode result data") suite.Require().Equal(res.VmError, "", "failed to handle eth tx msg") // store - changeOwner @@ -272,11 +259,8 @@ func (suite *HandlerTestSuite) TestDeployAndCallContract() { tx = types.NewTx(suite.chainID, 2, &receiver, big.NewInt(0), gasLimit, gasPrice, nil, nil, bytecode, nil) suite.signTx(tx) - result, err = suite.handler(suite.Ctx, tx) + res, err = suite.App.EvmKeeper.EthereumTx(suite.Ctx, tx) suite.Require().NoError(err, "failed to handle eth tx msg") - - err = proto.Unmarshal(result.Data, &res) - suite.Require().NoError(err, "failed to decode result data") suite.Require().Equal(res.VmError, "", "failed to handle eth tx msg") // query - getOwner @@ -284,11 +268,8 @@ func (suite *HandlerTestSuite) TestDeployAndCallContract() { tx = types.NewTx(suite.chainID, 2, &receiver, big.NewInt(0), gasLimit, gasPrice, nil, nil, bytecode, nil) suite.signTx(tx) - result, err = suite.handler(suite.Ctx, tx) + res, err = suite.App.EvmKeeper.EthereumTx(suite.Ctx, tx) suite.Require().NoError(err, "failed to handle eth tx msg") - - err = proto.Unmarshal(result.Data, &res) - suite.Require().NoError(err, "failed to decode result data") suite.Require().Equal(res.VmError, "", "failed to handle eth tx msg") // FIXME: correct owner? @@ -304,7 +285,7 @@ func (suite *HandlerTestSuite) TestSendTransaction() { tx := types.NewTx(suite.chainID, 1, &common.Address{0x1}, big.NewInt(1), gasLimit, gasPrice, nil, nil, nil, nil) suite.signTx(tx) - result, err := suite.handler(suite.Ctx, tx) + result, err := suite.App.EvmKeeper.EthereumTx(suite.Ctx, tx) suite.Require().NoError(err) suite.Require().NotNil(result) } @@ -366,7 +347,7 @@ func (suite *HandlerTestSuite) TestOutOfGasWhenDeployContract() { // Deploy contract - Owner.sol gasLimit := uint64(1) - suite.Ctx = suite.Ctx.WithGasMeter(sdk.NewGasMeter(gasLimit)) + suite.Ctx = suite.Ctx.WithGasMeter(storetypes.NewGasMeter(gasLimit)).WithConsensusParams(*app.DefaultConsensusParams) gasPrice := big.NewInt(10000) bytecode := common.FromHex("0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73560405160405180910390a36102c4806100dc6000396000f3fe608060405234801561001057600080fd5b5060043610610053576000357c010000000000000000000000000000000000000000000000000000000090048063893d20e814610058578063a6f9dae1146100a2575b600080fd5b6100606100e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100e4600480360360208110156100b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061010f565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f43616c6c6572206973206e6f74206f776e65720000000000000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a73560405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fea265627a7a72315820f397f2733a89198bc7fed0764083694c5b828791f39ebcbc9e414bccef14b48064736f6c63430005100032") @@ -381,7 +362,7 @@ func (suite *HandlerTestSuite) TestOutOfGasWhenDeployContract() { } }() - suite.handler(suite.Ctx, tx) + suite.App.EvmKeeper.EthereumTx(suite.Ctx, tx) suite.Require().Fail("panic did not happen") } @@ -394,11 +375,7 @@ func (suite *HandlerTestSuite) TestErrorWhenDeployContract() { tx := types.NewTx(suite.chainID, 1, nil, big.NewInt(0), gasLimit, gasPrice, nil, nil, bytecode, nil) suite.signTx(tx) - result, _ := suite.handler(suite.Ctx, tx) - var res types.MsgEthereumTxResponse - - _ = proto.Unmarshal(result.Data, &res) - + res, _ := suite.App.EvmKeeper.EthereumTx(suite.Ctx, tx) suite.Require().Equal("invalid opcode: opcode 0xa6 not defined", res.VmError, "correct evm error") // TODO: snapshot checking @@ -503,7 +480,7 @@ func (suite *HandlerTestSuite) TestERC20TransferReverted() { err = k.DeductTxCostsFromUserBalance(suite.Ctx, fees, tx.GetSender()) suite.Require().NoError(err) - res, err := k.EthereumTx(sdk.WrapSDKContext(suite.Ctx), tx) + res, err := k.EthereumTx(suite.Ctx, tx) suite.Require().NoError(err) suite.Require().True(res.Failed()) @@ -576,7 +553,7 @@ func (suite *HandlerTestSuite) TestContractDeploymentRevert() { db.SetNonce(suite.Address, nonce+1) suite.Require().NoError(db.Commit()) - rsp, err := k.EthereumTx(sdk.WrapSDKContext(suite.Ctx), tx) + rsp, err := k.EthereumTx(suite.Ctx, tx) suite.Require().NoError(err) suite.Require().True(rsp.Failed()) diff --git a/x/evm/keeper/abci.go b/x/evm/keeper/abci.go index 415ce75084..6d1e3acd38 100644 --- a/x/evm/keeper/abci.go +++ b/x/evm/keeper/abci.go @@ -16,7 +16,7 @@ package keeper import ( - abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -24,19 +24,20 @@ import ( ) // BeginBlock sets the sdk Context and EIP155 chain id to the Keeper. -func (k *Keeper) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { +func (k *Keeper) BeginBlock(ctx sdk.Context) error { k.WithChainID(ctx) + return nil } // EndBlock also retrieves the bloom filter value from the transient store and commits it to the // KVStore. The EVM end block logic doesn't update the validator set, thus it returns // an empty slice. -func (k *Keeper) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (k *Keeper) EndBlock(ctx sdk.Context) error { // Gas costs are handled within msg handler so costs should be ignored - infCtx := ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) + infCtx := ctx.WithGasMeter(types.NewInfiniteGasMeter()) bloom := ethtypes.BytesToBloom(k.GetBlockBloomTransient(infCtx).Bytes()) k.EmitBlockBloomEvent(infCtx, bloom) - return []abci.ValidatorUpdate{} + return nil } diff --git a/x/evm/keeper/abci_test.go b/x/evm/keeper/abci_test.go index e8e5ba9850..6246f64652 100644 --- a/x/evm/keeper/abci_test.go +++ b/x/evm/keeper/abci_test.go @@ -3,7 +3,6 @@ package keeper_test import ( "testing" - "github.com/cometbft/cometbft/abci/types" "github.com/evmos/ethermint/testutil" evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/stretchr/testify/suite" @@ -22,8 +21,7 @@ func (suite *ABCITestSuite) TestInitGenesis() { em := suite.Ctx.EventManager() suite.Require().Equal(0, len(em.Events())) - res := suite.App.EvmKeeper.EndBlock(suite.Ctx, types.RequestEndBlock{}) - suite.Require().Equal([]types.ValidatorUpdate{}, res) + suite.Require().NoError(suite.App.EvmKeeper.EndBlock(suite.Ctx)) // should emit 1 EventTypeBlockBloom event on EndBlock suite.Require().Equal(1, len(em.Events())) diff --git a/x/evm/keeper/benchmark_test.go b/x/evm/keeper/benchmark_test.go index 2b03538c7a..4f78d69df8 100644 --- a/x/evm/keeper/benchmark_test.go +++ b/x/evm/keeper/benchmark_test.go @@ -27,7 +27,6 @@ type KeeperBenchmarkTestSuite struct { // deployTestMessageCall deploy a test erc20 contract and returns the contract address func (suite *KeeperBenchmarkTestSuite) deployTestMessageCall(b *testing.B) common.Address { - ctx := sdk.WrapSDKContext(suite.Ctx) chainID := suite.App.EvmKeeper.ChainID() data := types.TestMessageCall.Bin args, err := json.Marshal(&types.TransactionArgs{ @@ -36,7 +35,7 @@ func (suite *KeeperBenchmarkTestSuite) deployTestMessageCall(b *testing.B) commo }) require.NoError(b, err) - res, err := suite.EvmQueryClient.EstimateGas(ctx, &types.EthCallRequest{ + res, err := suite.EvmQueryClient.EstimateGas(suite.Ctx, &types.EthCallRequest{ Args: args, GasCap: uint64(config.DefaultGasCap), ProposerAddress: suite.Ctx.BlockHeader().ProposerAddress, @@ -57,7 +56,7 @@ func (suite *KeeperBenchmarkTestSuite) deployTestMessageCall(b *testing.B) commo erc20DeployTx.From = suite.Address.Bytes() err = erc20DeployTx.Sign(ethtypes.LatestSignerForChainID(chainID), suite.Signer) require.NoError(b, err) - rsp, err := suite.App.EvmKeeper.EthereumTx(ctx, erc20DeployTx) + rsp, err := suite.App.EvmKeeper.EthereumTx(suite.Ctx, erc20DeployTx) require.NoError(b, err) require.Empty(b, rsp.VmError) return crypto.CreateAddress(suite.Address, nonce) @@ -74,7 +73,7 @@ func setupContract(b *testing.B) (*KeeperBenchmarkTestSuite, common.Address) { require.NoError(b, err) contractAddr := suite.DeployTestContract(b, suite.Address, sdkmath.NewIntWithDecimal(1000, 18).BigInt(), false) - suite.Commit() + suite.Commit(b) return &suite, contractAddr } @@ -90,7 +89,7 @@ func setupTestMessageCall(b *testing.B) (*KeeperBenchmarkTestSuite, common.Addre require.NoError(b, err) contractAddr := suite.deployTestMessageCall(b) - suite.Commit() + suite.Commit(b) return &suite, contractAddr } @@ -118,7 +117,7 @@ func doBenchmark(b *testing.B, txBuilder TxBuilder) { err = evmkeeper.DeductFees(suite.App.BankKeeper, suite.Ctx, suite.App.AccountKeeper.GetAccount(ctx, msg.GetFrom()), fees) require.NoError(b, err) - rsp, err := suite.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(ctx), msg) + rsp, err := suite.App.EvmKeeper.EthereumTx(ctx, msg) require.NoError(b, err) require.False(b, rsp.Failed()) } @@ -185,7 +184,7 @@ func BenchmarkMessageCall(b *testing.B) { err = evmkeeper.DeductFees(suite.App.BankKeeper, suite.Ctx, suite.App.AccountKeeper.GetAccount(ctx, msg.GetFrom()), fees) require.NoError(b, err) - rsp, err := suite.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(ctx), msg) + rsp, err := suite.App.EvmKeeper.EthereumTx(ctx, msg) require.NoError(b, err) require.False(b, rsp.Failed()) } diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 6d5c46e8da..3b86fbda0c 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -119,13 +119,16 @@ func (k Keeper) ValidatorAccount(c context.Context, req *types.QueryValidatorAcc ctx := sdk.UnwrapSDKContext(c) - validator, found := k.stakingKeeper.GetValidatorByConsAddr(ctx, consAddr) - if !found { - return nil, fmt.Errorf("validator not found for %s", consAddr.String()) + validator, err := k.stakingKeeper.GetValidatorByConsAddr(ctx, consAddr) + if err != nil { + return nil, fmt.Errorf("validator not found for %s, %w", consAddr.String(), err) } - accAddr := sdk.AccAddress(validator.GetOperator()) - + bz, err := sdk.ValAddressFromBech32(validator.GetOperator()) + if err != nil { + return nil, err + } + accAddr := sdk.AccAddress(bz) res := types.QueryValidatorAccountResponse{ AccountAddress: accAddr.String(), } @@ -309,7 +312,7 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type } else { // Query block gas limit params := ctx.ConsensusParams() - if params != nil && params.Block != nil && params.Block.MaxGas > 0 { + if params.Block != nil && params.Block.MaxGas > 0 { hi = uint64(params.Block.MaxGas) } else { hi = req.GasCap diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 118765b85a..f61ce20c75 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -8,7 +8,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" - + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -17,18 +17,15 @@ import ( ethlogger "github.com/ethereum/go-ethereum/eth/tracers/logger" ethparams "github.com/ethereum/go-ethereum/params" "github.com/evmos/ethermint/app" + "github.com/evmos/ethermint/server/config" "github.com/evmos/ethermint/tests" "github.com/evmos/ethermint/testutil" + ethermint "github.com/evmos/ethermint/types" "github.com/evmos/ethermint/x/evm/statedb" + "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/evmos/ethermint/server/config" - ethermint "github.com/evmos/ethermint/types" - "github.com/evmos/ethermint/x/evm/types" ) // Not valid Ethereum address @@ -83,14 +80,13 @@ func (suite *GRPCServerTestSuiteSuite) deployTestContract(owner common.Address) } func (suite *GRPCServerTestSuiteSuite) transferERC20Token(t require.TestingT, contractAddr, from, to common.Address, amount *big.Int) *types.MsgEthereumTx { - ctx := sdk.WrapSDKContext(suite.Ctx) chainID := suite.App.EvmKeeper.ChainID() transferData, err := types.ERC20Contract.ABI.Pack("transfer", to, amount) require.NoError(t, err) args, err := json.Marshal(&types.TransactionArgs{To: &contractAddr, From: &from, Data: (*hexutil.Bytes)(&transferData)}) require.NoError(t, err) - res, err := suite.EvmQueryClient.EstimateGas(ctx, &types.EthCallRequest{ + res, err := suite.EvmQueryClient.EstimateGas(suite.Ctx, &types.EthCallRequest{ Args: args, GasCap: 25_000_000, ProposerAddress: suite.Ctx.BlockHeader().ProposerAddress, @@ -130,7 +126,7 @@ func (suite *GRPCServerTestSuiteSuite) transferERC20Token(t require.TestingT, co ercTransferTx.From = suite.Address.Bytes() err = ercTransferTx.Sign(ethtypes.LatestSignerForChainID(chainID), suite.Signer) require.NoError(t, err) - rsp, err := suite.App.EvmKeeper.EthereumTx(ctx, ercTransferTx) + rsp, err := suite.App.EvmKeeper.EthereumTx(suite.Ctx, ercTransferTx) require.NoError(t, err) require.Empty(t, rsp.VmError) return ercTransferTx @@ -187,9 +183,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryAccount() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset tc.malleate() - ctx := sdk.WrapSDKContext(suite.Ctx) - res, err := suite.EvmQueryClient.Account(ctx, req) - + res, err := suite.EvmQueryClient.Account(suite.Ctx, req) if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(res) @@ -231,7 +225,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryCosmosAccount() { expAccount = &types.QueryCosmosAccountResponse{ CosmosAddress: sdk.AccAddress(suite.Address.Bytes()).String(), Sequence: 0, - AccountNumber: 0, + AccountNumber: suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) - 1, } req = &types.QueryCosmosAccountRequest{ Address: suite.Address.String(), @@ -244,13 +238,13 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryCosmosAccount() { func() { acc := suite.App.AccountKeeper.GetAccount(suite.Ctx, suite.Address.Bytes()) suite.Require().NoError(acc.SetSequence(10)) - suite.Require().NoError(acc.SetAccountNumber(1)) + num := suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) + suite.Require().NoError(acc.SetAccountNumber(num)) suite.App.AccountKeeper.SetAccount(suite.Ctx, acc) - expAccount = &types.QueryCosmosAccountResponse{ CosmosAddress: sdk.AccAddress(suite.Address.Bytes()).String(), Sequence: 10, - AccountNumber: 1, + AccountNumber: num, } req = &types.QueryCosmosAccountRequest{ Address: suite.Address.String(), @@ -264,9 +258,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryCosmosAccount() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset tc.malleate() - ctx := sdk.WrapSDKContext(suite.Ctx) - res, err := suite.EvmQueryClient.CosmosAccount(ctx, req) - + res, err := suite.EvmQueryClient.CosmosAccount(suite.Ctx, req) if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(res) @@ -322,9 +314,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryBalance() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset tc.malleate() - ctx := sdk.WrapSDKContext(suite.Ctx) - res, err := suite.EvmQueryClient.Balance(ctx, req) - + res, err := suite.EvmQueryClient.Balance(suite.Ctx, req) if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(res) @@ -380,10 +370,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryStorage() { vmdb := suite.StateDB() tc.malleate(vmdb) suite.Require().NoError(vmdb.Commit()) - - ctx := sdk.WrapSDKContext(suite.Ctx) - res, err := suite.EvmQueryClient.Storage(ctx, req) - + res, err := suite.EvmQueryClient.Storage(suite.Ctx, req) if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(res) @@ -439,10 +426,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryCode() { vmdb := suite.StateDB() tc.malleate(vmdb) suite.Require().NoError(vmdb.Commit()) - - ctx := sdk.WrapSDKContext(suite.Ctx) - res, err := suite.EvmQueryClient.Code(ctx, req) - + res, err := suite.EvmQueryClient.Code(suite.Ctx, req) if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(res) @@ -499,7 +483,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryTxLogs() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset - vmdb := statedb.New(suite.Ctx, suite.App.EvmKeeper, statedb.NewTxConfig(common.BytesToHash(suite.Ctx.HeaderHash().Bytes()), txHash, txIndex, logIndex)) + vmdb := statedb.New(suite.Ctx, suite.App.EvmKeeper, statedb.NewTxConfig(common.BytesToHash(suite.Ctx.HeaderHash()), txHash, txIndex, logIndex)) tc.malleate(vmdb) suite.Require().NoError(vmdb.Commit()) @@ -510,10 +494,8 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryTxLogs() { } func (suite *GRPCServerTestSuiteSuite) TestQueryParams() { - ctx := sdk.WrapSDKContext(suite.Ctx) expParams := types.DefaultParams() - - res, err := suite.EvmQueryClient.Params(ctx, &types.QueryParamsRequest{}) + res, err := suite.EvmQueryClient.Params(suite.Ctx, &types.QueryParamsRequest{}) suite.Require().NoError(err) suite.Require().Equal(expParams, res.Params) } @@ -547,7 +529,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryValidatorAccount() { expAccount = &types.QueryValidatorAccountResponse{ AccountAddress: sdk.AccAddress(suite.Address.Bytes()).String(), Sequence: 0, - AccountNumber: 0, + AccountNumber: suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) - 1, } req = &types.QueryValidatorAccountRequest{ ConsAddress: suite.ConsAddress.String(), @@ -560,13 +542,13 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryValidatorAccount() { func() { acc := suite.App.AccountKeeper.GetAccount(suite.Ctx, suite.Address.Bytes()) suite.Require().NoError(acc.SetSequence(10)) - suite.Require().NoError(acc.SetAccountNumber(1)) + num := suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) + suite.Require().NoError(acc.SetAccountNumber(num)) suite.App.AccountKeeper.SetAccount(suite.Ctx, acc) - expAccount = &types.QueryValidatorAccountResponse{ AccountAddress: sdk.AccAddress(suite.Address.Bytes()).String(), Sequence: 10, - AccountNumber: 1, + AccountNumber: num, } req = &types.QueryValidatorAccountRequest{ ConsAddress: suite.ConsAddress.String(), @@ -579,11 +561,8 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryValidatorAccount() { for _, tc := range testCases { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset - tc.malleate() - ctx := sdk.WrapSDKContext(suite.Ctx) - res, err := suite.EvmQueryClient.ValidatorAccount(ctx, req) - + res, err := suite.EvmQueryClient.ValidatorAccount(suite.Ctx, req) if tc.expPass { suite.Require().NoError(err) suite.Require().NotNil(res) @@ -691,7 +670,7 @@ func (suite *GRPCServerTestSuiteSuite) TestEstimateGas() { "erc20 transfer", func() { contractAddr := suite.deployTestContract(suite.Address) - suite.Commit() + suite.Commit(suite.T()) transferData, err := types.ERC20Contract.ABI.Pack("transfer", common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), big.NewInt(1000)) suite.Require().NoError(err) args = types.TransactionArgs{To: &contractAddr, From: &suite.Address, Data: (*hexutil.Bytes)(&transferData)} @@ -766,7 +745,7 @@ func (suite *GRPCServerTestSuiteSuite) TestEstimateGas() { "erc20 transfer w/ enableFeemarket", func() { contractAddr := suite.deployTestContract(suite.Address) - suite.Commit() + suite.Commit(suite.T()) transferData, err := types.ERC20Contract.ABI.Pack("transfer", common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), big.NewInt(1000)) suite.Require().NoError(err) args = types.TransactionArgs{To: &contractAddr, From: &suite.Address, Data: (*hexutil.Bytes)(&transferData)} @@ -847,8 +826,7 @@ func (suite *GRPCServerTestSuiteSuite) TestEstimateGas() { GasCap: gasCap, ProposerAddress: suite.Ctx.BlockHeader().ProposerAddress, } - - rsp, err := suite.EvmQueryClient.EstimateGas(sdk.WrapSDKContext(suite.Ctx), &req) + rsp, err := suite.EvmQueryClient.EstimateGas(suite.Ctx, &req) if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(int64(tc.expGas), int64(rsp.Gas)) @@ -946,11 +924,11 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceTx() { vmdb.SetNonce(suite.Address, vmdb.GetNonce(suite.Address)+1) suite.Require().NoError(vmdb.Commit()) contractAddr := suite.deployTestContract(suite.Address) - suite.Commit() + suite.Commit(suite.T()) // Generate token transfer transaction firstTx := suite.transferERC20Token(suite.T(), contractAddr, suite.Address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdkmath.NewIntWithDecimal(1, 18).BigInt()) txMsg = suite.transferERC20Token(suite.T(), contractAddr, suite.Address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdkmath.NewIntWithDecimal(1, 18).BigInt()) - suite.Commit() + suite.Commit(suite.T()) predecessors = append(predecessors, firstTx) }, @@ -1019,7 +997,7 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceTx() { ) predecessors = append(predecessors, contractTx) - suite.Commit() + suite.Commit(suite.T()) params := suite.App.EvmKeeper.GetParams(suite.Ctx) params.EnableCreate = false @@ -1046,10 +1024,10 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceTx() { suite.SetupTest() // Deploy contract contractAddr := suite.deployTestContract(suite.Address) - suite.Commit() + suite.Commit(suite.T()) // Generate token transfer transaction txMsg = suite.transferERC20Token(suite.T(), contractAddr, suite.Address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdkmath.NewIntWithDecimal(1, 18).BigInt()) - suite.Commit() + suite.Commit(suite.T()) tc.malleate() traceReq := types.QueryTraceTxRequest{ @@ -1061,8 +1039,7 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceTx() { if chainID != nil { traceReq.ChainId = chainID.Int64() } - res, err := suite.EvmQueryClient.TraceTx(sdk.WrapSDKContext(suite.Ctx), &traceReq) - + res, err := suite.EvmQueryClient.TraceTx(suite.Ctx, &traceReq) if tc.expPass { suite.Require().NoError(err) // if data is to big, slice the result @@ -1165,11 +1142,11 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceBlock() { vmdb.SetNonce(suite.Address, vmdb.GetNonce(suite.Address)+1) suite.Require().NoError(vmdb.Commit()) contractAddr := suite.deployTestContract(suite.Address) - suite.Commit() + suite.Commit(suite.T()) // create multiple transactions in the same block firstTx := suite.transferERC20Token(suite.T(), contractAddr, suite.Address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdkmath.NewIntWithDecimal(1, 18).BigInt()) secondTx := suite.transferERC20Token(suite.T(), contractAddr, suite.Address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdkmath.NewIntWithDecimal(1, 18).BigInt()) - suite.Commit() + suite.Commit(suite.T()) // overwrite txs to include only the ones on new block txs = append([]*types.MsgEthereumTx{}, firstTx, secondTx) }, @@ -1223,10 +1200,10 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceBlock() { contractAddr := suite.deployTestContract(suite.Address) // set some balance to handle fees suite.App.EvmKeeper.SetBalance(suite.Ctx, suite.Address, big.NewInt(1000000000000000000), types.DefaultEVMDenom) - suite.Commit() + suite.Commit(suite.T()) // Generate token transfer transaction txMsg := suite.transferERC20Token(suite.T(), contractAddr, suite.Address, common.HexToAddress("0x378c50D9264C63F3F92B806d4ee56E9D86FfB3Ec"), sdkmath.NewIntWithDecimal(1, 18).BigInt()) - suite.Commit() + suite.Commit(suite.T()) txs = append(txs, txMsg) @@ -1239,9 +1216,7 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceBlock() { if chainID != nil { traceReq.ChainId = chainID.Int64() } - - res, err := suite.EvmQueryClient.TraceBlock(sdk.WrapSDKContext(suite.Ctx), &traceReq) - + res, err := suite.EvmQueryClient.TraceBlock(suite.Ctx, &traceReq) if tc.expPass { suite.Require().NoError(err) // if data is to big, slice the result @@ -1281,14 +1256,14 @@ func (suite *GRPCServerTestSuiteSuite) TestNonceInQuery() { }) suite.Require().NoError(err) proposerAddress := suite.Ctx.BlockHeader().ProposerAddress - _, err = suite.EvmQueryClient.EstimateGas(sdk.WrapSDKContext(suite.Ctx), &types.EthCallRequest{ + _, err = suite.EvmQueryClient.EstimateGas(suite.Ctx, &types.EthCallRequest{ Args: args, GasCap: uint64(config.DefaultGasCap), ProposerAddress: proposerAddress, }) suite.Require().NoError(err) - _, err = suite.EvmQueryClient.EthCall(sdk.WrapSDKContext(suite.Ctx), &types.EthCallRequest{ + _, err = suite.EvmQueryClient.EthCall(suite.Ctx, &types.EthCallRequest{ Args: args, GasCap: uint64(config.DefaultGasCap), ProposerAddress: proposerAddress, @@ -1320,7 +1295,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryBaseFee() { { "pass - non-nil Base Fee", func() { - baseFee := sdk.OneInt().BigInt() + baseFee := sdkmath.OneInt().BigInt() suite.App.FeeMarketKeeper.SetBaseFee(suite.Ctx, baseFee) aux = sdkmath.NewIntFromBigInt(baseFee) @@ -1331,7 +1306,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryBaseFee() { { "pass - nil Base Fee when london hardfork not activated", func() { - baseFee := sdk.OneInt().BigInt() + baseFee := sdkmath.OneInt().BigInt() suite.App.FeeMarketKeeper.SetBaseFee(suite.Ctx, baseFee) expRes = &types.QueryBaseFeeResponse{} @@ -1341,7 +1316,7 @@ func (suite *GRPCServerTestSuiteSuite) TestQueryBaseFee() { { "pass - zero Base Fee when feemarket not activated", func() { - baseFee := sdk.ZeroInt() + baseFee := sdkmath.ZeroInt() expRes = &types.QueryBaseFeeResponse{BaseFee: &baseFee} }, true, false, true, diff --git a/x/evm/keeper/hooks_test.go b/x/evm/keeper/hooks_test.go index 956ab1b713..13c72a54c6 100644 --- a/x/evm/keeper/hooks_test.go +++ b/x/evm/keeper/hooks_test.go @@ -77,7 +77,7 @@ func (suite *HookTestSuite) TestEvmHooks() { k := suite.App.EvmKeeper txHash := common.BigToHash(big.NewInt(1)) vmdb := statedb.New(suite.Ctx, k, statedb.NewTxConfig( - common.BytesToHash(suite.Ctx.HeaderHash().Bytes()), + common.BytesToHash(suite.Ctx.HeaderHash()), txHash, 0, 0, diff --git a/x/evm/keeper/integration_test.go b/x/evm/keeper/integration_test.go index 6e00add787..baac6ce588 100644 --- a/x/evm/keeper/integration_test.go +++ b/x/evm/keeper/integration_test.go @@ -4,6 +4,7 @@ import ( "math/big" "testing" + sdkmath "cosmossdk.io/math" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/stretchr/testify/suite" @@ -15,6 +16,7 @@ import ( "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/tests" "github.com/evmos/ethermint/testutil" + evmtypes "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" ) @@ -56,7 +58,7 @@ var _ = Describe("Evm", func() { // 100_000`. With the fee calculation `Fee = (baseFee + tip) * gasLimit`, // a `minGasPrices = 5_000_000_000` results in `minGlobalFee = // 500_000_000_000_000` - setupTest(sdk.NewDec(minGasPrices), big.NewInt(baseFee)) + setupTest(sdkmath.LegacyNewDec(minGasPrices), big.NewInt(baseFee)) }) Context("during CheckTx", func() { @@ -124,9 +126,10 @@ type IntegrationTestSuite struct { testutil.BaseTestSuiteWithAccount } -func setupTest(minGasPrice sdk.Dec, baseFee *big.Int) { +func setupTest(minGasPrice sdkmath.LegacyDec, baseFee *big.Int) { + t := s.T() s.SetupTestWithCbAndOpts( - s.T(), + t, func(app *app.EthermintApp, genesis app.GenesisState) app.GenesisState { feemarketGenesis := feemarkettypes.DefaultGenesisState() feemarketGenesis.Params.NoBaseFee = true @@ -135,19 +138,19 @@ func setupTest(minGasPrice sdk.Dec, baseFee *big.Int) { }, simtestutil.AppOptionsMap{server.FlagMinGasPrices: "1" + evmtypes.DefaultEVMDenom}, ) - amount, ok := sdk.NewIntFromString("10000000000000000000") + amount, ok := sdkmath.NewIntFromString("10000000000000000000") s.Require().True(ok) initBalance := sdk.Coins{sdk.Coin{ Denom: evmtypes.DefaultEVMDenom, Amount: amount, }} testutil.FundAccount(s.App.BankKeeper, s.Ctx, sdk.AccAddress(s.Address.Bytes()), initBalance) - s.Commit() + s.Commit(t) params := feemarkettypes.DefaultParams() params.MinGasPrice = minGasPrice s.App.FeeMarketKeeper.SetParams(s.Ctx, params) s.App.FeeMarketKeeper.SetBaseFee(s.Ctx, baseFee) - s.Commit() + s.Commit(t) } func prepareEthTx(p txParams) []byte { diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 98168c6ad4..299f8de643 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -18,13 +18,13 @@ package keeper import ( "math/big" + corestoretypes "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/store/prefix" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -42,7 +42,8 @@ type CustomContractFn func(sdk.Context, params.Rules) vm.PrecompiledContract // Keeper grants access to the EVM module state and implements the go-ethereum StateDB interface. type Keeper struct { // Protobuf codec - cdc codec.BinaryCodec + cdc codec.Codec + storeService corestoretypes.KVStoreService // Store key required for the EVM Prefix KVStore. It is required by: // - storing account's Storage State // - storing account's Code @@ -72,8 +73,6 @@ type Keeper struct { // EVM Hooks for tx post-processing hooks types.EvmHooks - // Legacy subspace - ss paramstypes.Subspace customContractFns []CustomContractFn // a set of store keys that should cover all the precompile use cases, @@ -83,7 +82,8 @@ type Keeper struct { // NewKeeper generates new evm module keeper func NewKeeper( - cdc codec.BinaryCodec, + cdc codec.Codec, + storeService corestoretypes.KVStoreService, storeKey, transientKey storetypes.StoreKey, authority sdk.AccAddress, ak types.AccountKeeper, @@ -91,7 +91,6 @@ func NewKeeper( sk types.StakingKeeper, fmk types.FeeMarketKeeper, tracer string, - ss paramstypes.Subspace, customContractFns []CustomContractFn, keys map[string]storetypes.StoreKey, ) *Keeper { @@ -108,6 +107,7 @@ func NewKeeper( // NOTE: we pass in the parameter space to the CommitStateDB in order to use custom denominations for the EVM operations return &Keeper{ cdc: cdc, + storeService: storeService, authority: authority, accountKeeper: ak, bankKeeper: bankKeeper, @@ -116,7 +116,6 @@ func NewKeeper( storeKey: storeKey, transientKey: transientKey, tracer: tracer, - ss: ss, customContractFns: customContractFns, keys: keys, } @@ -128,7 +127,8 @@ func (k Keeper) StoreKeys() map[string]storetypes.StoreKey { // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", "x/"+types.ModuleName) + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", "x/"+types.ModuleName) } // WithChainID sets the chain id to the local variable in the keeper diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index 79bbe58dcb..ff1fbeb958 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/suite" "github.com/cosmos/cosmos-sdk/client" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/evmos/ethermint/testutil" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" @@ -22,8 +22,6 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - - abci "github.com/cometbft/cometbft/abci/types" ) type KeeperTestSuite struct { @@ -66,8 +64,7 @@ func (suite *KeeperTestSuite) SetupTest() { } return genesis }) - - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + encodingConfig := encoding.MakeConfig() suite.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig) suite.ethSigner = ethtypes.LatestSignerForChainID(suite.App.EvmKeeper.ChainID()) suite.denom = types.DefaultEVMDenom @@ -91,7 +88,7 @@ func (suite *KeeperTestSuite) TestBaseFee() { suite.enableFeemarket = tc.enableFeemarket suite.enableLondonHF = tc.enableLondonHF suite.SetupTest() - suite.App.EvmKeeper.BeginBlock(suite.Ctx, abci.RequestBeginBlock{}) + suite.App.EvmKeeper.BeginBlock(suite.Ctx) params := suite.App.EvmKeeper.GetParams(suite.Ctx) ethCfg := params.ChainConfig.EthereumConfig(suite.App.EvmKeeper.ChainID()) baseFee := suite.App.EvmKeeper.GetBaseFee(suite.Ctx, ethCfg) @@ -128,7 +125,7 @@ func (suite *KeeperTestSuite) TestGetAccountStorage() { suite.SetupTest() tc.malleate() i := 0 - suite.App.AccountKeeper.IterateAccounts(suite.Ctx, func(account authtypes.AccountI) bool { + suite.App.AccountKeeper.IterateAccounts(suite.Ctx, func(account sdk.AccountI) bool { ethAccount, ok := account.(ethermint.EthAccountI) if !ok { // ignore non EthAccounts diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 4f001442b2..8c954bbd51 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -22,13 +22,14 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - tmbytes "github.com/cometbft/cometbft/libs/bytes" - tmtypes "github.com/cometbft/cometbft/types" + cmtbytes "github.com/cometbft/cometbft/libs/bytes" + cmttypes "github.com/cometbft/cometbft/types" errorsmod "cosmossdk.io/errors" - "github.com/armon/go-metrics" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/hashicorp/go-metrics" "github.com/evmos/ethermint/x/evm/types" ) @@ -75,7 +76,7 @@ func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*t // Observe which users define a gas limit >> gas used. Note, that // gas_limit and gas_used are always > 0 - gasLimit := sdk.NewDec(int64(tx.Gas())) + gasLimit := sdkmath.LegacyNewDec(int64(tx.Gas())) gasRatio, err := gasLimit.QuoInt64(int64(response.GasUsed)).Float64() if err == nil { telemetry.SetGaugeWithLabels( @@ -99,7 +100,7 @@ func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*t if len(ctx.TxBytes()) > 0 { // add event for tendermint transaction hash format - hash := tmbytes.HexBytes(tmtypes.Tx(ctx.TxBytes()).Hash()) + hash := cmtbytes.HexBytes(cmttypes.Tx(ctx.TxBytes()).Hash()) attrs = append(attrs, sdk.NewAttribute(types.AttributeKeyTxHash, hash.String())) } diff --git a/x/evm/keeper/params.go b/x/evm/keeper/params.go index 6581affa1e..9ca5787db3 100644 --- a/x/evm/keeper/params.go +++ b/x/evm/keeper/params.go @@ -17,40 +17,29 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v0types "github.com/evmos/ethermint/x/evm/migrations/v0/types" "github.com/evmos/ethermint/x/evm/types" ) // GetParams returns the total set of evm parameters. -func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.KeyPrefixParams) - if len(bz) == 0 { - return k.GetLegacyParams(ctx) +func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.KeyPrefixParams) + if err != nil { + panic(err) + } + if bz == nil { + return p } - k.cdc.MustUnmarshal(bz, ¶ms) - return + k.cdc.MustUnmarshal(bz, &p) + return p } // SetParams sets the EVM params each in their individual key for better get performance -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { - if err := params.Validate(); err != nil { +func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error { + if err := p.Validate(); err != nil { return err } - - store := ctx.KVStore(k.storeKey) - bz, err := k.cdc.Marshal(¶ms) - if err != nil { - return err - } - - store.Set(types.KeyPrefixParams, bz) - return nil -} - -// GetLegacyParams returns param set for version before migrate -func (k Keeper) GetLegacyParams(ctx sdk.Context) types.Params { - params := v0types.V0Params{} - k.ss.GetParamSetIfExists(ctx, ¶ms) - return params.ToParams() + store := k.storeService.OpenKVStore(ctx) + bz := k.cdc.MustMarshal(&p) + return store.Set(types.KeyPrefixParams, bz) } diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index 15a9537a5c..5e534b461f 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -21,11 +21,11 @@ import ( "math/big" "sort" - tmtypes "github.com/cometbft/cometbft/types" + cmttypes "github.com/cometbft/cometbft/types" errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - ethermint "github.com/evmos/ethermint/types" "github.com/evmos/ethermint/x/evm/statedb" "github.com/evmos/ethermint/x/evm/types" @@ -117,7 +117,7 @@ func (k Keeper) GetHashFn(ctx sdk.Context) vm.GetHashFunc { // only recompute the hash if not set (eg: checkTxState) contextBlockHeader := ctx.BlockHeader() - header, err := tmtypes.HeaderFromProto(&contextBlockHeader) + header, err := cmttypes.HeaderFromProto(&contextBlockHeader) if err != nil { k.Logger(ctx).Error("failed to cast tendermint header from proto", "error", err) return common.Hash{} @@ -129,13 +129,13 @@ func (k Keeper) GetHashFn(ctx sdk.Context) vm.GetHashFunc { case ctx.BlockHeight() > h: // Case 2: if the chain is not the current height we need to retrieve the hash from the store for the // current chain epoch. This only applies if the current height is greater than the requested height. - histInfo, found := k.stakingKeeper.GetHistoricalInfo(ctx, h) - if !found { - k.Logger(ctx).Debug("historical info not found", "height", h) + histInfo, err := k.stakingKeeper.GetHistoricalInfo(ctx, h) + if err != nil { + k.Logger(ctx).Debug("historical info not found", "height", h, "err", err.Error()) return common.Hash{} } - header, err := tmtypes.HeaderFromProto(&histInfo.Header) + header, err := cmttypes.HeaderFromProto(&histInfo.Header) if err != nil { k.Logger(ctx).Error("failed to cast tendermint header from proto", "error", err) return common.Hash{} @@ -452,11 +452,11 @@ func (k *Keeper) ApplyMessageWithConfig( // calculate a minimum amount of gas to be charged to sender if GasLimit // is considerably higher than GasUsed to stay more aligned with Tendermint gas mechanics // for more info https://github.com/evmos/ethermint/issues/1085 - gasLimit := sdk.NewDec(int64(msg.GasLimit)) + gasLimit := sdkmath.LegacyNewDec(int64(msg.GasLimit)) minGasMultiplier := cfg.FeeMarketParams.MinGasMultiplier if minGasMultiplier.IsNil() { // in case we are executing eth_call on a legacy block, returns a zero value. - minGasMultiplier = sdk.ZeroDec() + minGasMultiplier = sdkmath.LegacyZeroDec() } minimumGasUsed := gasLimit.Mul(minGasMultiplier) @@ -464,7 +464,7 @@ func (k *Keeper) ApplyMessageWithConfig( return nil, errorsmod.Wrapf(types.ErrGasOverflow, "message gas limit < leftover gas (%d < %d)", msg.GasLimit, leftoverGas) } - gasUsed := sdk.MaxDec(minimumGasUsed, sdk.NewDec(int64(temporaryGasUsed))).TruncateInt().Uint64() + gasUsed := sdkmath.LegacyMaxDec(minimumGasUsed, sdkmath.LegacyNewDec(int64(temporaryGasUsed))).TruncateInt().Uint64() // reset leftoverGas, to be used by the tracer leftoverGas = msg.GasLimit - gasUsed @@ -474,6 +474,6 @@ func (k *Keeper) ApplyMessageWithConfig( Ret: ret, Logs: types.NewLogsFromEth(stateDB.Logs()), Hash: cfg.TxConfig.TxHash.Hex(), - BlockHash: ctx.HeaderHash().Bytes(), + BlockHash: ctx.HeaderHash(), }, nil } diff --git a/x/evm/keeper/state_transition_benchmark_test.go b/x/evm/keeper/state_transition_benchmark_test.go index 7c586318ee..c5ac28b090 100644 --- a/x/evm/keeper/state_transition_benchmark_test.go +++ b/x/evm/keeper/state_transition_benchmark_test.go @@ -9,6 +9,7 @@ import ( sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -97,7 +98,7 @@ func newSignedEthTx( return nil, errors.New("unknown transaction type!") } - sig, _, err := krSigner.SignByAddress(addr, ethTx.Hash().Bytes()) + sig, _, err := krSigner.SignByAddress(addr, ethTx.Hash().Bytes(), signing.SignMode_SIGN_MODE_TEXTUAL) if err != nil { return nil, err } diff --git a/x/evm/keeper/state_transition_test.go b/x/evm/keeper/state_transition_test.go index b9818f243e..33dbb18156 100644 --- a/x/evm/keeper/state_transition_test.go +++ b/x/evm/keeper/state_transition_test.go @@ -7,6 +7,7 @@ import ( "testing" sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" "github.com/cometbft/cometbft/crypto/tmhash" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" @@ -40,10 +41,10 @@ type StateTransitionTestSuite struct { func (suite *StateTransitionTestSuite) SetupTest() { t := suite.T() - suite.EVMTestSuiteWithAccountAndQueryClient.SetupTestWithCb(t, func(app *app.EthermintApp, genesis app.GenesisState) app.GenesisState { + suite.EVMTestSuiteWithAccountAndQueryClient.SetupTestWithCb(t, func(a *app.EthermintApp, genesis app.GenesisState) app.GenesisState { feemarketGenesis := feemarkettypes.DefaultGenesisState() feemarketGenesis.Params.NoBaseFee = true - genesis[feemarkettypes.ModuleName] = app.AppCodec().MustMarshalJSON(feemarketGenesis) + genesis[feemarkettypes.ModuleName] = a.AppCodec().MustMarshalJSON(feemarketGenesis) acc := ðermint.EthAccount{ BaseAccount: authtypes.NewBaseAccount(sdk.AccAddress(suite.Address.Bytes()), nil, 0, 0), CodeHash: common.BytesToHash(crypto.Keccak256(nil)).String(), @@ -51,9 +52,9 @@ func (suite *StateTransitionTestSuite) SetupTest() { accs, err := authtypes.PackAccounts(authtypes.GenesisAccounts{acc}) require.NoError(t, err) var authGenesis authtypes.GenesisState - app.AppCodec().MustUnmarshalJSON(genesis[authtypes.ModuleName], &authGenesis) + a.AppCodec().MustUnmarshalJSON(genesis[authtypes.ModuleName], &authGenesis) authGenesis.Accounts = append(authGenesis.Accounts, accs[0]) - genesis[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(&authGenesis) + genesis[authtypes.ModuleName] = a.AppCodec().MustMarshalJSON(&authGenesis) if suite.mintFeeCollector { // mint some coin to fee collector coins := sdk.NewCoins(sdk.NewCoin(types.DefaultEVMDenom, sdkmath.NewInt(int64(params.TxGas)-1))) @@ -93,7 +94,7 @@ func (suite *StateTransitionTestSuite) TestGetHashFn() { "case 1.1: context hash cached", uint64(suite.Ctx.BlockHeight()), func() { - suite.Ctx = suite.Ctx.WithHeaderHash(tmhash.Sum([]byte("header"))) + suite.Ctx = suite.Ctx.WithHeaderHash(tmhash.Sum([]byte("header"))).WithConsensusParams(*app.DefaultConsensusParams) }, common.BytesToHash(tmhash.Sum([]byte("header"))), }, @@ -103,7 +104,7 @@ func (suite *StateTransitionTestSuite) TestGetHashFn() { func() { header := tmproto.Header{} header.Height = suite.Ctx.BlockHeight() - suite.Ctx = suite.Ctx.WithBlockHeader(header) + suite.Ctx = suite.Ctx.WithBlockHeader(header).WithConsensusParams(*app.DefaultConsensusParams) }, common.Hash{}, }, @@ -111,7 +112,7 @@ func (suite *StateTransitionTestSuite) TestGetHashFn() { "case 1.3: hash calculated from Tendermint header", uint64(suite.Ctx.BlockHeight()), func() { - suite.Ctx = suite.Ctx.WithBlockHeader(header) + suite.Ctx = suite.Ctx.WithBlockHeader(header).WithConsensusParams(*app.DefaultConsensusParams) }, common.BytesToHash(hash), }, @@ -119,7 +120,7 @@ func (suite *StateTransitionTestSuite) TestGetHashFn() { "case 2.1: height lower than current one, hist info not found", 1, func() { - suite.Ctx = suite.Ctx.WithBlockHeight(10) + suite.Ctx = suite.Ctx.WithBlockHeight(10).WithConsensusParams(*app.DefaultConsensusParams) }, common.Hash{}, }, @@ -128,7 +129,7 @@ func (suite *StateTransitionTestSuite) TestGetHashFn() { 1, func() { suite.App.StakingKeeper.SetHistoricalInfo(suite.Ctx, 1, &stakingtypes.HistoricalInfo{}) - suite.Ctx = suite.Ctx.WithBlockHeight(10) + suite.Ctx = suite.Ctx.WithBlockHeight(10).WithConsensusParams(*app.DefaultConsensusParams) }, common.Hash{}, }, @@ -140,7 +141,7 @@ func (suite *StateTransitionTestSuite) TestGetHashFn() { Header: header, } suite.App.StakingKeeper.SetHistoricalInfo(suite.Ctx, 1, histInfo) - suite.Ctx = suite.Ctx.WithBlockHeight(10) + suite.Ctx = suite.Ctx.WithBlockHeight(10).WithConsensusParams(*app.DefaultConsensusParams) }, common.BytesToHash(hash), }, @@ -177,7 +178,7 @@ func (suite *StateTransitionTestSuite) TestGetCoinbaseAddress() { func() { header := suite.Ctx.BlockHeader() header.ProposerAddress = []byte{} - suite.Ctx = suite.Ctx.WithBlockHeader(header) + suite.Ctx = suite.Ctx.WithBlockHeader(header).WithConsensusParams(*app.DefaultConsensusParams) }, false, }, @@ -200,10 +201,10 @@ func (suite *StateTransitionTestSuite) TestGetCoinbaseAddress() { header := suite.Ctx.BlockHeader() header.ProposerAddress = valConsAddr.Bytes() - suite.Ctx = suite.Ctx.WithBlockHeader(header) + suite.Ctx = suite.Ctx.WithBlockHeader(header).WithConsensusParams(*app.DefaultConsensusParams) - _, found := suite.App.StakingKeeper.GetValidatorByConsAddr(suite.Ctx, valConsAddr.Bytes()) - suite.Require().True(found) + _, err = suite.App.StakingKeeper.GetValidatorByConsAddr(suite.Ctx, valConsAddr.Bytes()) + suite.Require().NoError(err) suite.Require().NotEmpty(suite.Ctx.BlockHeader().ProposerAddress) }, @@ -324,9 +325,7 @@ func (suite *StateTransitionTestSuite) TestGetEthIntrinsicGas() { ethCfg.HomesteadBlock = big.NewInt(2) ethCfg.IstanbulBlock = big.NewInt(3) signer := ethtypes.LatestSignerForChainID(suite.App.EvmKeeper.ChainID()) - - suite.Ctx = suite.Ctx.WithBlockHeight(tc.height) - + suite.Ctx = suite.Ctx.WithBlockHeight(tc.height).WithConsensusParams(*app.DefaultConsensusParams) nonce := suite.App.EvmKeeper.GetNonce(suite.Ctx, suite.Address) m, err := newNativeMessage( nonce, @@ -563,7 +562,7 @@ func (suite *StateTransitionTestSuite) TestResetGasMeterAndConsumeGas() { suite.SetupTest() // reset panicF := func() { - gm := sdk.NewGasMeter(10) + gm := storetypes.NewGasMeter(10) gm.ConsumeGas(tc.gasConsumed, "") ctx := suite.Ctx.WithGasMeter(gm) suite.App.EvmKeeper.ResetGasMeterAndConsumeGas(ctx, tc.gasUsed) diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index 575b723a08..ec58cfcb3c 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -19,7 +19,9 @@ import ( "math/big" errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/store/prefix" + sdkmath "cosmossdk.io/math" + "cosmossdk.io/store/prefix" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ethermint "github.com/evmos/ethermint/types" @@ -56,7 +58,7 @@ func (k *Keeper) ForEachStorage(ctx sdk.Context, addr common.Address, cb func(ke store := ctx.KVStore(k.storeKey) prefix := types.AddressStoragePrefix(addr) - iterator := sdk.KVStorePrefixIterator(store, prefix) + iterator := storetypes.KVStorePrefixIterator(store, prefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { @@ -91,10 +93,10 @@ func (k *Keeper) SetBalance(ctx sdk.Context, addr common.Address, amount *big.In delta := new(big.Int).Sub(amount, balance) switch delta.Sign() { case 1: - coins := sdk.NewCoins(sdk.NewCoin(evmDenom, sdk.NewIntFromBigInt(delta))) + coins := sdk.NewCoins(sdk.NewCoin(evmDenom, sdkmath.NewIntFromBigInt(delta))) return k.AddBalance(ctx, cosmosAddr, coins) case -1: - coins := sdk.NewCoins(sdk.NewCoin(evmDenom, sdk.NewIntFromBigInt(new(big.Int).Abs(delta)))) + coins := sdk.NewCoins(sdk.NewCoin(evmDenom, sdkmath.NewIntFromBigInt(new(big.Int).Abs(delta)))) return k.SubBalance(ctx, cosmosAddr, coins) default: return nil diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index 098d8123ba..9f4ed7e65b 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -5,10 +5,10 @@ import ( "math/big" "testing" + "cosmossdk.io/store/prefix" "github.com/cosmos/cosmos-sdk/client" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" @@ -19,7 +19,6 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/crypto/ethsecp256k1" "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/tests" @@ -41,7 +40,7 @@ func TestStateDBTestSuite(t *testing.T) { func (suite *StateDBTestSuite) SetupTest() { suite.EVMTestSuiteWithAccountAndQueryClient.SetupTest(suite.T()) - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + encodingConfig := encoding.MakeConfig() suite.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig) suite.ethSigner = ethtypes.LatestSignerForChainID(suite.App.EvmKeeper.ChainID()) } @@ -246,6 +245,7 @@ func (suite *StateDBTestSuite) TestSetNonce() { func (suite *StateDBTestSuite) TestGetCodeHash() { addr := tests.GenerateAddress() baseAcc := &authtypes.BaseAccount{Address: sdk.AccAddress(addr.Bytes()).String()} + baseAcc.AccountNumber = suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) suite.App.AccountKeeper.SetAccount(suite.Ctx, baseAcc) testCases := []struct { @@ -290,6 +290,7 @@ func (suite *StateDBTestSuite) TestGetCodeHash() { func (suite *StateDBTestSuite) TestSetCode() { addr := tests.GenerateAddress() baseAcc := &authtypes.BaseAccount{Address: sdk.AccAddress(addr.Bytes()).String()} + baseAcc.AccountNumber = suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) suite.App.AccountKeeper.SetAccount(suite.Ctx, baseAcc) testCases := []struct { @@ -345,6 +346,7 @@ func (suite *StateDBTestSuite) TestSetCode() { func (suite *StateDBTestSuite) TestKeeperSetCode() { addr := tests.GenerateAddress() baseAcc := &authtypes.BaseAccount{Address: sdk.AccAddress(addr.Bytes()).String()} + baseAcc.AccountNumber = suite.App.AccountKeeper.NextAccountNumber(suite.Ctx) suite.App.AccountKeeper.SetAccount(suite.Ctx, baseAcc) testCases := []struct { @@ -714,7 +716,7 @@ func (suite *StateDBTestSuite) TestAddLog() { suite.Run(tc.name, func() { suite.SetupTest() vmdb := statedb.New(suite.Ctx, suite.App.EvmKeeper, statedb.NewTxConfig( - common.BytesToHash(suite.Ctx.HeaderHash().Bytes()), + common.BytesToHash(suite.Ctx.HeaderHash()), tc.hash, 0, 0, )) diff --git a/x/evm/keeper/utils.go b/x/evm/keeper/utils.go index 076a860b93..2039ee4175 100644 --- a/x/evm/keeper/utils.go +++ b/x/evm/keeper/utils.go @@ -35,17 +35,25 @@ import ( // GetCoinbaseAddress returns the block proposer's validator operator address. func (k Keeper) GetCoinbaseAddress(ctx sdk.Context, proposerAddress sdk.ConsAddress) (common.Address, error) { - validator, found := k.stakingKeeper.GetValidatorByConsAddr(ctx, GetProposerAddress(ctx, proposerAddress)) - if !found { + validator, err := k.stakingKeeper.GetValidatorByConsAddr(ctx, GetProposerAddress(ctx, proposerAddress)) + if err != nil { return common.Address{}, errorsmod.Wrapf( stakingtypes.ErrNoValidatorFound, - "failed to retrieve validator from block proposer address %s", - proposerAddress.String(), + "failed to retrieve validator from block proposer address %s, %s", + proposerAddress.String(), err.Error(), + ) + } + + bz, err := sdk.ValAddressFromBech32(validator.GetOperator()) + if err != nil { + return common.Address{}, errorsmod.Wrapf( + err, + "failed to convert validator operator address %s to bytes", + validator.GetOperator(), ) } - coinbase := common.BytesToAddress(validator.GetOperator()) - return coinbase, nil + return common.BytesToAddress(bz), nil } // GetProposerAddress returns current block proposer's address when provided proposer address is empty. @@ -153,7 +161,7 @@ func CheckSenderBalance( } // DeductFees deducts fees from the given account. -func DeductFees(bankKeeper authtypes.BankKeeper, ctx sdk.Context, acc authtypes.AccountI, fees sdk.Coins) error { +func DeductFees(bankKeeper authtypes.BankKeeper, ctx sdk.Context, acc sdk.AccountI, fees sdk.Coins) error { if !fees.IsValid() { return errorsmod.Wrapf(errortypes.ErrInsufficientFee, "invalid fee amount: %s", fees) } diff --git a/x/evm/keeper/utils_test.go b/x/evm/keeper/utils_test.go index 677a073af2..53c470d07b 100644 --- a/x/evm/keeper/utils_test.go +++ b/x/evm/keeper/utils_test.go @@ -45,8 +45,8 @@ func (suite *UtilsTestSuite) SetupTest() { func (suite *UtilsTestSuite) TestCheckSenderBalance() { hundredInt := sdkmath.NewInt(100) - zeroInt := sdk.ZeroInt() - oneInt := sdk.OneInt() + zeroInt := sdkmath.ZeroInt() + oneInt := sdkmath.OneInt() fiveInt := sdkmath.NewInt(5) fiftyInt := sdkmath.NewInt(50) negInt := sdkmath.NewInt(-10) @@ -284,7 +284,7 @@ func (suite *UtilsTestSuite) TestCheckSenderBalance() { // In practice, the two tested functions will also be sequentially executed. func (suite *UtilsTestSuite) TestVerifyFeeAndDeductTxCostsFromUserBalance() { hundredInt := sdkmath.NewInt(100) - zeroInt := sdk.ZeroInt() + zeroInt := sdkmath.ZeroInt() oneInt := sdkmath.NewInt(1) fiveInt := sdkmath.NewInt(5) fiftyInt := sdkmath.NewInt(50) @@ -451,7 +451,7 @@ func (suite *UtilsTestSuite) TestVerifyFeeAndDeductTxCostsFromUserBalance() { expectPassDeduct: true, from: suite.Address.String(), malleate: func() { - suite.Ctx = suite.Ctx.WithIsCheckTx(true) + suite.Ctx = suite.Ctx.WithIsCheckTx(true).WithConsensusParams(*app.DefaultConsensusParams) }, }, } diff --git a/x/evm/migrations/v0/types/chain_config_v0.pb.go b/x/evm/migrations/v0/types/chain_config_v0.pb.go index 316fcc8bc1..c73d3abd28 100644 --- a/x/evm/migrations/v0/types/chain_config_v0.pb.go +++ b/x/evm/migrations/v0/types/chain_config_v0.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -24,48 +24,48 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// V0ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +// V0ChainConfig defines the Ethereum ChainConfig parameters using *sdkmath.Int values // instead of *big.Int. type V0ChainConfig struct { // homestead_block switch (nil no fork, 0 = already homestead) - HomesteadBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` + HomesteadBlock *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=cosmossdk.io/math.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) - DAOForkBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` + DAOForkBlock *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=cosmossdk.io/math.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork DAOForkSupport bool `protobuf:"varint,3,opt,name=dao_fork_support,json=daoForkSupport,proto3" json:"dao_fork_support,omitempty" yaml:"dao_fork_support"` // eip150_block: EIP150 implements the Gas price changes // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) - EIP150Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` + EIP150Block *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) EIP150Hash string `protobuf:"bytes,5,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"` // eip155_block: EIP155Block HF block - EIP155Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` + EIP155Block *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` // eip158_block: EIP158 HF block - EIP158Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` + EIP158Block *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) - ByzantiumBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` + ByzantiumBlock *cosmossdk_io_math.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=cosmossdk.io/math.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) - ConstantinopleBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` + ConstantinopleBlock *cosmossdk_io_math.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=cosmossdk.io/math.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` // petersburg_block: Petersburg switch block (nil same as Constantinople) - PetersburgBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` + PetersburgBlock *cosmossdk_io_math.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=cosmossdk.io/math.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) - IstanbulBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` + IstanbulBlock *cosmossdk_io_math.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=cosmossdk.io/math.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) - MuirGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` + MuirGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) - BerlinBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` + BerlinBlock *cosmossdk_io_math.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=cosmossdk.io/math.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` // london_block: London switch block (nil = no fork, 0 = already on london) - LondonBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"london_block,omitempty" yaml:"london_block"` + LondonBlock *cosmossdk_io_math.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=cosmossdk.io/math.Int" json:"london_block,omitempty" yaml:"london_block"` // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - ArrowGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` + ArrowGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) - GrayGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,20,opt,name=gray_glacier_block,json=grayGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gray_glacier_block,omitempty" yaml:"gray_glacier_block"` + GrayGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,20,opt,name=gray_glacier_block,json=grayGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"gray_glacier_block,omitempty" yaml:"gray_glacier_block"` // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter - MergeNetsplitBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"` + MergeNetsplitBlock *cosmossdk_io_math.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=cosmossdk.io/math.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"` // shanghai_block switch block (nil = no fork, 0 = already on shanghai) - ShanghaiBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,22,opt,name=shanghai_block,json=shanghaiBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shanghai_block,omitempty" yaml:"shanghai_block"` + ShanghaiBlock *cosmossdk_io_math.Int `protobuf:"bytes,22,opt,name=shanghai_block,json=shanghaiBlock,proto3,customtype=cosmossdk.io/math.Int" json:"shanghai_block,omitempty" yaml:"shanghai_block"` // cancun_block switch block (nil = no fork, 0 = already on cancun) - CancunBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,23,opt,name=cancun_block,json=cancunBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"cancun_block,omitempty" yaml:"cancun_block"` + CancunBlock *cosmossdk_io_math.Int `protobuf:"bytes,23,opt,name=cancun_block,json=cancunBlock,proto3,customtype=cosmossdk.io/math.Int" json:"cancun_block,omitempty" yaml:"cancun_block"` } func (m *V0ChainConfig) Reset() { *m = V0ChainConfig{} } @@ -124,56 +124,56 @@ func init() { } var fileDescriptor_c41c218deacfa8a3 = []byte{ - // 783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcd, 0x6e, 0xea, 0x46, - 0x14, 0xc7, 0x43, 0x4b, 0x53, 0x32, 0x80, 0x31, 0x86, 0x24, 0x34, 0x95, 0x20, 0x9a, 0x45, 0x94, - 0x4d, 0xf8, 0x50, 0x84, 0x14, 0x75, 0xd5, 0x90, 0xa4, 0x09, 0x2c, 0xda, 0x68, 0x22, 0xb5, 0x52, - 0x37, 0xd6, 0x60, 0x26, 0xb6, 0x8b, 0xed, 0xb1, 0xfc, 0x41, 0x42, 0xdb, 0x87, 0xe8, 0x23, 0xf4, - 0x71, 0xee, 0x32, 0xcb, 0xab, 0xbb, 0x40, 0x57, 0xe4, 0x0d, 0xf2, 0x04, 0x57, 0x9e, 0x19, 0x0c, - 0x26, 0x2c, 0x2e, 0x5e, 0xc1, 0xfc, 0x7d, 0xe6, 0xff, 0x3b, 0x73, 0x7c, 0x0e, 0x0c, 0x38, 0x21, - 0x81, 0x41, 0x3c, 0xdb, 0x74, 0x82, 0x16, 0x99, 0xd8, 0xad, 0x49, 0xa7, 0xa5, 0x19, 0xd8, 0x74, - 0x54, 0x8d, 0x3a, 0x8f, 0xa6, 0xae, 0x4e, 0xda, 0x4d, 0xd7, 0xa3, 0x01, 0x55, 0xe4, 0x38, 0xae, - 0x49, 0x26, 0x76, 0x73, 0xd2, 0x39, 0xaa, 0xea, 0x54, 0xa7, 0xec, 0x61, 0x2b, 0xfa, 0xc6, 0xe3, - 0xe0, 0xff, 0x65, 0x50, 0xfc, 0xbd, 0x7d, 0x15, 0x79, 0x5c, 0x31, 0x0b, 0xc5, 0x06, 0x25, 0x83, - 0xda, 0xc4, 0x0f, 0x08, 0x1e, 0xa9, 0x43, 0x8b, 0x6a, 0xe3, 0x5a, 0xe6, 0x38, 0x73, 0xba, 0xd7, - 0xbb, 0xfe, 0x34, 0x6b, 0x9c, 0xe8, 0x66, 0x60, 0x84, 0xc3, 0xa6, 0x46, 0xed, 0x96, 0x46, 0x7d, - 0x9b, 0xfa, 0xe2, 0xe3, 0xcc, 0x1f, 0x8d, 0x5b, 0xc1, 0xd4, 0x25, 0x7e, 0xb3, 0xef, 0x04, 0x6f, - 0xb3, 0xc6, 0xc1, 0x14, 0xdb, 0xd6, 0x4f, 0x70, 0xcd, 0x0a, 0x22, 0x29, 0x56, 0x7a, 0x91, 0xa0, - 0x4c, 0x81, 0x34, 0xc2, 0x54, 0x7d, 0xa4, 0xde, 0x58, 0xd0, 0xbe, 0x61, 0xb4, 0x87, 0xaf, 0xa7, - 0xcd, 0x67, 0x8d, 0xc2, 0xf5, 0xe5, 0x6f, 0xbf, 0x50, 0x6f, 0xcc, 0x3c, 0xdf, 0x66, 0x8d, 0x7d, - 0x4e, 0x4f, 0x3a, 0x43, 0x54, 0x18, 0x61, 0x1a, 0x87, 0x29, 0x7f, 0x00, 0x39, 0x0e, 0xf0, 0x43, - 0xd7, 0xa5, 0x5e, 0x50, 0xfb, 0xf6, 0x38, 0x73, 0x9a, 0xeb, 0x9d, 0xcd, 0x67, 0x0d, 0x49, 0x58, - 0x3e, 0xf0, 0x27, 0x6f, 0xb3, 0xc6, 0xe1, 0x9a, 0xa9, 0xd8, 0x03, 0x91, 0x24, 0x6c, 0x45, 0xa8, - 0xe2, 0x83, 0x02, 0x31, 0xdd, 0x4e, 0xb7, 0x2d, 0x4e, 0x94, 0x65, 0x27, 0xba, 0xdf, 0xea, 0x44, - 0xf9, 0x9b, 0xfe, 0x7d, 0xa7, 0xdb, 0x5e, 0x1c, 0xa8, 0xc2, 0xd9, 0xab, 0xb6, 0x10, 0xe5, 0xf9, - 0x92, 0x9f, 0xa6, 0x0f, 0xc4, 0x52, 0x35, 0xb0, 0x6f, 0xd4, 0xbe, 0x63, 0xcc, 0xd3, 0xf9, 0xac, - 0x01, 0xb8, 0xd3, 0x1d, 0xf6, 0x8d, 0xe5, 0x7b, 0x19, 0x4e, 0xff, 0xc6, 0x4e, 0x60, 0x86, 0xf6, - 0xc2, 0x0b, 0xf0, 0xcd, 0x51, 0x54, 0x9c, 0x7f, 0x57, 0xe4, 0xbf, 0x9b, 0x3a, 0xff, 0xee, 0xa6, - 0xfc, 0xbb, 0xc9, 0xfc, 0x79, 0x4c, 0x0c, 0xbd, 0x10, 0xd0, 0xef, 0x53, 0x43, 0x2f, 0x36, 0x41, - 0x2f, 0x92, 0x50, 0x1e, 0x13, 0x35, 0xfb, 0x5a, 0x25, 0x6a, 0xb9, 0xf4, 0xcd, 0xfe, 0xae, 0xa8, - 0x52, 0xac, 0x70, 0xdc, 0xbf, 0xa0, 0xaa, 0x51, 0xc7, 0x0f, 0x22, 0xcd, 0xa1, 0xae, 0x45, 0x04, - 0x73, 0x8f, 0x31, 0xfb, 0x5b, 0x31, 0x7f, 0xe4, 0xcc, 0x4d, 0x7e, 0x10, 0x55, 0x92, 0x32, 0xa7, - 0xbb, 0x40, 0x76, 0x49, 0x40, 0x3c, 0x7f, 0x18, 0x7a, 0xba, 0x20, 0x03, 0x46, 0xbe, 0xd9, 0x8a, - 0x2c, 0xe6, 0x60, 0xdd, 0x0b, 0xa2, 0xd2, 0x52, 0xe2, 0xc4, 0xbf, 0x80, 0x64, 0x46, 0x69, 0x0c, - 0x43, 0x4b, 0xf0, 0xf2, 0x8c, 0x77, 0xb5, 0x15, 0x4f, 0x0c, 0x73, 0xd2, 0x09, 0xa2, 0xe2, 0x42, - 0xe0, 0xac, 0x10, 0x28, 0x76, 0x68, 0x7a, 0xaa, 0x6e, 0x61, 0xcd, 0x24, 0x9e, 0xe0, 0x15, 0x18, - 0xef, 0x76, 0x2b, 0xde, 0x0f, 0x9c, 0xf7, 0xde, 0x0d, 0x22, 0x39, 0x12, 0x6f, 0xb9, 0xc6, 0xb1, - 0x23, 0x50, 0x18, 0x12, 0xcf, 0x32, 0x1d, 0x01, 0x2c, 0x32, 0xe0, 0xe5, 0x56, 0x40, 0xd1, 0xa7, - 0xab, 0x3e, 0x10, 0xe5, 0xf9, 0x32, 0xa6, 0x58, 0xd4, 0x19, 0xd1, 0x05, 0xa5, 0x9c, 0x9e, 0xb2, - 0xea, 0x03, 0x51, 0x9e, 0x2f, 0x39, 0xe5, 0x19, 0x54, 0xb0, 0xe7, 0xd1, 0xa7, 0xb5, 0x1a, 0x2a, - 0x0c, 0x76, 0xb7, 0x15, 0xec, 0x88, 0xc3, 0x36, 0xd8, 0x41, 0x54, 0x66, 0x6a, 0xa2, 0x8a, 0x21, - 0x50, 0x74, 0x0f, 0x4f, 0xd7, 0xc0, 0xd5, 0xf4, 0x2f, 0xef, 0xbd, 0x1b, 0x44, 0x72, 0x24, 0x26, - 0xb0, 0xff, 0x80, 0xaa, 0x4d, 0x3c, 0x9d, 0xa8, 0x0e, 0x09, 0x7c, 0xd7, 0x32, 0x03, 0x01, 0xde, - 0x4f, 0x3f, 0x8f, 0x9b, 0xfc, 0x20, 0x52, 0x98, 0xfc, 0xab, 0x50, 0xe3, 0xe1, 0xf0, 0x0d, 0xec, - 0xe8, 0x06, 0x36, 0x05, 0xf6, 0x20, 0xfd, 0x70, 0x24, 0x9d, 0x20, 0x2a, 0x2e, 0x84, 0xb8, 0x7f, - 0x34, 0xec, 0x68, 0xe1, 0xa2, 0x7f, 0x0e, 0xd3, 0xf7, 0xcf, 0xaa, 0x0f, 0x44, 0x79, 0xbe, 0x64, - 0x94, 0x41, 0x36, 0x27, 0xc9, 0xa5, 0x41, 0x36, 0x57, 0x92, 0xe5, 0x41, 0x36, 0x27, 0xcb, 0xe5, - 0x41, 0x36, 0x57, 0x91, 0xab, 0xa8, 0x38, 0xa5, 0x16, 0x55, 0x27, 0xe7, 0x7c, 0x13, 0xca, 0x93, - 0x27, 0xec, 0x8b, 0xdf, 0x48, 0x24, 0x69, 0x38, 0xc0, 0xd6, 0xd4, 0x17, 0xa5, 0x42, 0x32, 0x2f, - 0xe0, 0xf2, 0x5f, 0xbb, 0xf7, 0xf3, 0x87, 0x79, 0x3d, 0xf3, 0x32, 0xaf, 0x67, 0x3e, 0xcf, 0xeb, - 0x99, 0xff, 0x5e, 0xeb, 0x3b, 0x2f, 0xaf, 0xf5, 0x9d, 0x8f, 0xaf, 0xf5, 0x9d, 0x3f, 0x57, 0x73, - 0x27, 0x93, 0x28, 0xf5, 0xe5, 0xed, 0xe8, 0x99, 0xdd, 0x8f, 0x58, 0xfe, 0xc3, 0x5d, 0x76, 0xd7, - 0x39, 0xff, 0x12, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x13, 0xd7, 0xa8, 0x3d, 0x09, 0x00, 0x00, + // 780 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x95, 0x4f, 0x6f, 0xda, 0x48, + 0x18, 0xc6, 0xc3, 0x2e, 0x9b, 0x25, 0x03, 0x18, 0xc7, 0x90, 0x84, 0xcd, 0x4a, 0x10, 0xcd, 0x21, + 0xca, 0x65, 0xf9, 0xb3, 0x59, 0xb6, 0xa8, 0x97, 0xb6, 0xa4, 0xff, 0xc2, 0xa1, 0xad, 0x26, 0x52, + 0xab, 0x56, 0x95, 0xac, 0xb1, 0x99, 0xd8, 0x2e, 0xb6, 0xc7, 0xb2, 0x0d, 0x29, 0xfd, 0x14, 0xfd, + 0x58, 0x3d, 0xe6, 0x58, 0xf5, 0x80, 0x2a, 0xf2, 0x0d, 0xf2, 0x05, 0x5a, 0x79, 0x66, 0x30, 0x98, + 0x50, 0xe4, 0x1b, 0xf3, 0xf8, 0x7d, 0x7e, 0xcf, 0x3b, 0xaf, 0xc7, 0x0c, 0x38, 0x26, 0xa1, 0x49, + 0x7c, 0xc7, 0x72, 0xc3, 0x26, 0x19, 0x3b, 0xcd, 0x71, 0xbb, 0xa9, 0x9b, 0xd8, 0x72, 0x55, 0x9d, + 0xba, 0x97, 0x96, 0xa1, 0x8e, 0x5b, 0x0d, 0xcf, 0xa7, 0x21, 0x55, 0xe4, 0xb8, 0xae, 0x41, 0xc6, + 0x4e, 0x63, 0xdc, 0x3e, 0xac, 0x18, 0xd4, 0xa0, 0xec, 0x61, 0x33, 0xfa, 0xc5, 0xeb, 0xe0, 0x0f, + 0x09, 0x14, 0x5f, 0xb7, 0xce, 0x22, 0xc6, 0x19, 0x43, 0x28, 0xef, 0x41, 0xc9, 0xa4, 0x0e, 0x09, + 0x42, 0x82, 0x07, 0xaa, 0x66, 0x53, 0x7d, 0x58, 0xcd, 0x1c, 0x65, 0x4e, 0x76, 0x7a, 0xa7, 0xdf, + 0xa6, 0xf5, 0x3d, 0x9d, 0x06, 0x0e, 0x0d, 0x82, 0xc1, 0xb0, 0x61, 0xd1, 0xa6, 0x83, 0x43, 0xb3, + 0x71, 0xee, 0x86, 0xb7, 0xd3, 0xfa, 0xfe, 0x04, 0x3b, 0xf6, 0x7d, 0xb8, 0xe2, 0x84, 0x48, 0x8a, + 0x95, 0x5e, 0x24, 0x28, 0x26, 0x90, 0x06, 0x98, 0xaa, 0x97, 0xd4, 0x1f, 0x0a, 0xf8, 0x6f, 0x0c, + 0xde, 0xfb, 0x25, 0x7c, 0x36, 0xad, 0x17, 0x1e, 0x3f, 0x7a, 0xf9, 0x94, 0xfa, 0x43, 0x86, 0xb8, + 0x9d, 0xd6, 0xf7, 0x78, 0x58, 0x12, 0x04, 0x51, 0x61, 0x80, 0x69, 0x5c, 0xa6, 0xbc, 0x01, 0x72, + 0x5c, 0x10, 0x8c, 0x3c, 0x8f, 0xfa, 0x61, 0xf5, 0xf7, 0xa3, 0xcc, 0x49, 0xae, 0xf7, 0xcf, 0x6c, + 0x5a, 0x97, 0x04, 0xf2, 0x82, 0x3f, 0xb9, 0x9d, 0xd6, 0x0f, 0x56, 0xa0, 0xc2, 0x03, 0x91, 0x24, + 0xb0, 0xa2, 0x54, 0xd1, 0x40, 0x81, 0x58, 0x5e, 0xbb, 0xd3, 0x12, 0x1b, 0xc8, 0xb2, 0x0d, 0x3c, + 0xd8, 0xb4, 0x81, 0xfc, 0x93, 0xf3, 0x57, 0xed, 0x4e, 0x6b, 0xde, 0x7f, 0x99, 0x47, 0x2d, 0x53, + 0x20, 0xca, 0xf3, 0x25, 0x6f, 0xfe, 0x1c, 0x88, 0xa5, 0x6a, 0xe2, 0xc0, 0xac, 0xfe, 0xc1, 0x22, + 0x4e, 0x66, 0xd3, 0x3a, 0xe0, 0xa4, 0xe7, 0x38, 0x30, 0x17, 0x53, 0xd7, 0x26, 0x9f, 0xb0, 0x1b, + 0x5a, 0x23, 0x67, 0xce, 0x02, 0xdc, 0x1c, 0x55, 0xc5, 0xed, 0x76, 0x44, 0xbb, 0xdb, 0x69, 0xdb, + 0xed, 0xac, 0x6b, 0xb7, 0x93, 0x6c, 0x97, 0xd7, 0xc4, 0x19, 0x5d, 0x91, 0xf1, 0x67, 0xda, 0x8c, + 0xee, 0xba, 0x8c, 0x6e, 0x32, 0x83, 0xd7, 0x44, 0xe7, 0x72, 0x65, 0x9f, 0xd5, 0x5c, 0xea, 0x73, + 0x79, 0x67, 0x42, 0x52, 0xac, 0x70, 0xfa, 0x10, 0x54, 0x74, 0xea, 0x06, 0x61, 0xa4, 0xb9, 0xd4, + 0xb3, 0x89, 0x88, 0xd8, 0x61, 0x11, 0xdd, 0x4d, 0x11, 0x7f, 0xf3, 0x88, 0x75, 0x76, 0x88, 0xca, + 0x49, 0x99, 0x87, 0xa9, 0x40, 0xf6, 0x48, 0x48, 0xfc, 0x40, 0x1b, 0xf9, 0x86, 0x08, 0x02, 0x2c, + 0xe8, 0xbf, 0x4d, 0x41, 0xe2, 0x84, 0xae, 0x5a, 0x21, 0x2a, 0x2d, 0x24, 0x1e, 0xf0, 0x16, 0x48, + 0x56, 0x94, 0xaa, 0x8d, 0x6c, 0x81, 0xcf, 0x33, 0xfc, 0xbf, 0x9b, 0xf0, 0xe2, 0xab, 0x4a, 0x1a, + 0x21, 0x2a, 0xce, 0x05, 0x8e, 0x1e, 0x00, 0xc5, 0x19, 0x59, 0xbe, 0x6a, 0xd8, 0x58, 0xb7, 0x88, + 0x2f, 0xf0, 0x05, 0x86, 0xff, 0x7f, 0x13, 0xfe, 0x2f, 0x8e, 0xbf, 0x6b, 0x86, 0x48, 0x8e, 0xc4, + 0x67, 0x5c, 0xe3, 0x29, 0x17, 0xa0, 0xa0, 0x11, 0xdf, 0xb6, 0x5c, 0xc1, 0x2f, 0x32, 0x7e, 0x6b, + 0x13, 0x5f, 0x9c, 0xa0, 0x65, 0x1b, 0x44, 0x79, 0xbe, 0x8c, 0xa1, 0x36, 0x75, 0x07, 0x74, 0x0e, + 0xdd, 0x4d, 0x0d, 0x5d, 0xb6, 0x41, 0x94, 0xe7, 0x4b, 0x0e, 0x35, 0x40, 0x19, 0xfb, 0x3e, 0xbd, + 0x5a, 0x19, 0x88, 0xc2, 0xd8, 0xf7, 0x36, 0xb1, 0x0f, 0x39, 0x7b, 0x8d, 0x1b, 0xa2, 0x5d, 0xa6, + 0x26, 0x46, 0x32, 0x00, 0x8a, 0xe1, 0xe3, 0xc9, 0x4a, 0x4e, 0x25, 0xf5, 0xe0, 0xef, 0x9a, 0x21, + 0x92, 0x23, 0x31, 0x91, 0xf2, 0x01, 0x54, 0x1c, 0xe2, 0x1b, 0x44, 0x75, 0x49, 0x18, 0x78, 0xb6, + 0x15, 0x8a, 0x9c, 0xbd, 0xd4, 0xdf, 0xc1, 0x3a, 0x3b, 0x44, 0x0a, 0x93, 0x5f, 0x08, 0x35, 0x3e, + 0xa5, 0x81, 0x89, 0x5d, 0xc3, 0xc4, 0x96, 0x48, 0xd9, 0x4f, 0x7d, 0x4a, 0x93, 0x46, 0x88, 0x8a, + 0x73, 0x21, 0x7e, 0xd5, 0x3a, 0x76, 0xf5, 0xd1, 0xfc, 0x55, 0x1f, 0xa4, 0x7e, 0xd5, 0xcb, 0x36, + 0x88, 0xf2, 0x7c, 0xc9, 0xa0, 0xfd, 0x6c, 0x4e, 0x92, 0x4b, 0xfd, 0x6c, 0xae, 0x24, 0xcb, 0xfd, + 0x6c, 0x4e, 0x96, 0x77, 0xfb, 0xd9, 0x5c, 0x59, 0xae, 0xa0, 0xe2, 0x84, 0xda, 0x54, 0x1d, 0x9f, + 0x72, 0x13, 0xca, 0x93, 0x2b, 0x1c, 0x88, 0x3f, 0x1a, 0x24, 0xe9, 0x38, 0xc4, 0xf6, 0x24, 0x10, + 0x83, 0x40, 0x32, 0x1f, 0xcf, 0xe2, 0xda, 0xea, 0x3d, 0xfc, 0x32, 0xab, 0x65, 0xae, 0x67, 0xb5, + 0xcc, 0xf7, 0x59, 0x2d, 0xf3, 0xf9, 0xa6, 0xb6, 0x75, 0x7d, 0x53, 0xdb, 0xfa, 0x7a, 0x53, 0xdb, + 0x7a, 0x77, 0x6c, 0x58, 0xa1, 0x39, 0xd2, 0x1a, 0x3a, 0x75, 0xa2, 0xcb, 0x9e, 0x06, 0xcd, 0xc5, + 0xe5, 0xff, 0x91, 0x5d, 0xff, 0xe1, 0xc4, 0x23, 0x81, 0xb6, 0xcd, 0xae, 0xf2, 0xd3, 0x9f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xfb, 0x8c, 0x8f, 0x2a, 0x1c, 0x08, 0x00, 0x00, } func (m *V0ChainConfig) Marshal() (dAtA []byte, err error) { @@ -592,7 +592,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.HomesteadBlock = &v if err := m.HomesteadBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -628,7 +628,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.DAOForkBlock = &v if err := m.DAOForkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -684,7 +684,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.EIP150Block = &v if err := m.EIP150Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -752,7 +752,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.EIP155Block = &v if err := m.EIP155Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -788,7 +788,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.EIP158Block = &v if err := m.EIP158Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -824,7 +824,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ByzantiumBlock = &v if err := m.ByzantiumBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -860,7 +860,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ConstantinopleBlock = &v if err := m.ConstantinopleBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -896,7 +896,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.PetersburgBlock = &v if err := m.PetersburgBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -932,7 +932,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.IstanbulBlock = &v if err := m.IstanbulBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -968,7 +968,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.MuirGlacierBlock = &v if err := m.MuirGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1004,7 +1004,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.BerlinBlock = &v if err := m.BerlinBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1040,7 +1040,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.LondonBlock = &v if err := m.LondonBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1076,7 +1076,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ArrowGlacierBlock = &v if err := m.ArrowGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1112,7 +1112,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.GrayGlacierBlock = &v if err := m.GrayGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1148,7 +1148,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.MergeNetsplitBlock = &v if err := m.MergeNetsplitBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1184,7 +1184,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ShanghaiBlock = &v if err := m.ShanghaiBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1220,7 +1220,7 @@ func (m *V0ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.CancunBlock = &v if err := m.CancunBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/evm/migrations/v4/migrate.go b/x/evm/migrations/v4/migrate.go index 4d21489162..281b9845de 100644 --- a/x/evm/migrations/v4/migrate.go +++ b/x/evm/migrations/v4/migrate.go @@ -1,8 +1,8 @@ package v4 import ( + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" v0types "github.com/evmos/ethermint/x/evm/migrations/v0/types" diff --git a/x/evm/migrations/v4/types/params_v4.pb.go b/x/evm/migrations/v4/types/params_v4.pb.go index e6691cda7c..3b7e32580b 100644 --- a/x/evm/migrations/v4/types/params_v4.pb.go +++ b/x/evm/migrations/v4/types/params_v4.pb.go @@ -800,4 +800,4 @@ var ( ErrInvalidLengthParamsV4 = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParamsV4 = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParamsV4 = fmt.Errorf("proto: unexpected end of group") -) \ No newline at end of file +) diff --git a/x/evm/migrations/v5/migrate.go b/x/evm/migrations/v5/migrate.go index 920bfcfe8e..145f9552f6 100644 --- a/x/evm/migrations/v5/migrate.go +++ b/x/evm/migrations/v5/migrate.go @@ -1,8 +1,8 @@ package v5 import ( + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" v0types "github.com/evmos/ethermint/x/evm/migrations/v0/types" v4types "github.com/evmos/ethermint/x/evm/migrations/v4/types" diff --git a/x/evm/migrations/v6/migrate.go b/x/evm/migrations/v6/migrate.go index be13affc4b..aa19859611 100644 --- a/x/evm/migrations/v6/migrate.go +++ b/x/evm/migrations/v6/migrate.go @@ -1,8 +1,9 @@ package v6 import ( + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" v4types "github.com/evmos/ethermint/x/evm/migrations/v4/types" "github.com/evmos/ethermint/x/evm/types" @@ -24,7 +25,7 @@ func MigrateStore( bz := store.Get(types.KeyPrefixParams) cdc.MustUnmarshal(bz, ¶ms) newParams = params.ToParams() - shanghaiTime := sdk.ZeroInt() + shanghaiTime := sdkmath.ZeroInt() newParams.ChainConfig.ShanghaiTime = &shanghaiTime if err := newParams.Validate(); err != nil { return err diff --git a/x/evm/module.go b/x/evm/module.go index a5ecad8f0d..d9fb76f98f 100644 --- a/x/evm/module.go +++ b/x/evm/module.go @@ -20,6 +20,7 @@ import ( "encoding/json" "fmt" + "cosmossdk.io/core/appmodule" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -42,6 +43,9 @@ import ( var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} + + _ appmodule.HasEndBlocker = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the evm module. @@ -89,6 +93,11 @@ func (b AppModuleBasic) RegisterGRPCGatewayRoutes(c client.Context, serveMux *ru } } +// RegisterInterfaces registers interfaces and implementations of the evm module. +func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + // GetTxCmd returns the root tx command for the evm module. func (AppModuleBasic) GetTxCmd() *cobra.Command { return cli.GetTxCmd() @@ -99,11 +108,6 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -// RegisterInterfaces registers interfaces and implementations of the evm module. -func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { - types.RegisterInterfaces(registry) -} - // ____________________________________________________________________________ // AppModule implements an application module for the evm module. @@ -156,14 +160,14 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } // BeginBlock returns the begin block for the evm module. -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { - am.keeper.BeginBlock(ctx, req) +func (am AppModule) BeginBlock(ctx context.Context) error { + return am.keeper.BeginBlock(sdk.UnwrapSDKContext(ctx)) } // EndBlock returns the end blocker for the evm module. It returns no validator // updates. -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { - return am.keeper.EndBlock(ctx, req) +func (am AppModule) EndBlock(ctx context.Context) error { + return am.keeper.EndBlock(sdk.UnwrapSDKContext(ctx)) } // InitGenesis performs genesis initialization for the evm module. It returns @@ -183,7 +187,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // RegisterStoreDecoder registers a decoder for evm module's types -func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { +func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry) { sdr[types.StoreKey] = simulation.NewDecodeStore() } @@ -198,3 +202,9 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp simState.AppParams, simState.Cdc, am.ak, am.keeper, ) } + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} diff --git a/x/evm/simulation/genesis.go b/x/evm/simulation/genesis.go index c32719ceb3..21b79c6eb5 100644 --- a/x/evm/simulation/genesis.go +++ b/x/evm/simulation/genesis.go @@ -44,7 +44,7 @@ func RandomizedGenState(simState *module.SimulationState) { var extraEIPs []int64 simState.AppParams.GetOrGenerate( - simState.Cdc, extraEIPsKey, &extraEIPs, simState.Rand, + extraEIPsKey, &extraEIPs, simState.Rand, func(r *rand.Rand) { extraEIPs = GenExtraEIPs(r) }, ) diff --git a/x/evm/simulation/operations.go b/x/evm/simulation/operations.go index 0fc41e8a05..b28abd9957 100644 --- a/x/evm/simulation/operations.go +++ b/x/evm/simulation/operations.go @@ -13,7 +13,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" sdktx "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/x/auth/tx" @@ -60,20 +59,20 @@ type simulateContext struct { // WeightedOperations generate Two kinds of operations: SimulateEthSimpleTransfer, SimulateEthCreateContract. // Contract call operations work as the future operations of SimulateEthCreateContract. func WeightedOperations( - appParams simtypes.AppParams, cdc codec.JSONCodec, ak types.AccountKeeper, k *keeper.Keeper, + appParams simtypes.AppParams, _ codec.JSONCodec, ak types.AccountKeeper, k *keeper.Keeper, ) simulation.WeightedOperations { var ( weightMsgEthSimpleTransfer int weightMsgEthCreateContract int ) - appParams.GetOrGenerate(cdc, OpWeightMsgEthSimpleTransfer, &weightMsgEthSimpleTransfer, nil, + appParams.GetOrGenerate(OpWeightMsgEthSimpleTransfer, &weightMsgEthSimpleTransfer, nil, func(_ *rand.Rand) { weightMsgEthSimpleTransfer = WeightMsgEthSimpleTransfer }, ) - appParams.GetOrGenerate(cdc, OpWeightMsgEthCreateContract, &weightMsgEthCreateContract, nil, + appParams.GetOrGenerate(OpWeightMsgEthCreateContract, &weightMsgEthCreateContract, nil, func(_ *rand.Rand) { weightMsgEthCreateContract = WeightMsgEthCreateContract }, @@ -188,7 +187,7 @@ func SimulateEthTx( return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgEthereumTx, "can not create valid eth tx"), nil, err } - txConfig := encoding.MakeConfig(module.NewBasicManager()).TxConfig + txConfig := encoding.MakeConfig().TxConfig txBuilder := txConfig.NewTxBuilder() signedTx, err := GetSignedTx(ctx, txBuilder, ethTx, prv) if err != nil { @@ -243,7 +242,7 @@ func EstimateGas(ctx *simulateContext, from, to *common.Address, data *hexutil.B return 0, err } - res, err := ctx.keeper.EstimateGas(sdk.WrapSDKContext(ctx.context), &types.EthCallRequest{ + res, err := ctx.keeper.EstimateGas(ctx.context, &types.EthCallRequest{ Args: args, GasCap: gasCap, }) diff --git a/x/evm/statedb/interfaces.go b/x/evm/statedb/interfaces.go index ae7e1fd250..95d3c8641b 100644 --- a/x/evm/statedb/interfaces.go +++ b/x/evm/statedb/interfaces.go @@ -18,7 +18,7 @@ package statedb import ( "math/big" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" evmtypes "github.com/evmos/ethermint/x/evm/types" diff --git a/x/evm/statedb/native.go b/x/evm/statedb/native.go index 50306f5fce..4abd4d9489 100644 --- a/x/evm/statedb/native.go +++ b/x/evm/statedb/native.go @@ -1,7 +1,7 @@ package statedb import ( - "github.com/cosmos/cosmos-sdk/store/types" + "cosmossdk.io/store/types" "github.com/ethereum/go-ethereum/common" ) diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index 5ace8b3a40..f4effb5e90 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -21,6 +21,8 @@ import ( "sort" errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -327,11 +329,11 @@ func (s *StateDB) setStateObject(object *stateObject) { s.stateObjects[object.Address()] = object } -func (s *StateDB) cloneNativeState() sdk.MultiStore { +func (s *StateDB) cloneNativeState() storetypes.MultiStore { return s.cacheMultiStore().Clone() } -func (s *StateDB) restoreNativeState(ms sdk.MultiStore) { +func (s *StateDB) restoreNativeState(ms storetypes.MultiStore) { manager := sdk.NewEventManager() s.cacheCtx = s.cacheCtx.WithMultiStore(ms).WithEventManager(manager) } @@ -369,7 +371,7 @@ func (s *StateDB) AddBalance(addr common.Address, amount *big.Int) { if amount.Sign() <= 0 { return } - coins := sdk.Coins{sdk.NewCoin(s.evmDenom, sdk.NewIntFromBigInt(amount))} + coins := sdk.Coins{sdk.NewCoin(s.evmDenom, sdkmath.NewIntFromBigInt(amount))} if err := s.ExecuteNativeAction(common.Address{}, nil, func(ctx sdk.Context) error { return s.keeper.AddBalance(ctx, sdk.AccAddress(addr.Bytes()), coins) }); err != nil { @@ -382,7 +384,7 @@ func (s *StateDB) SubBalance(addr common.Address, amount *big.Int) { if amount.Sign() <= 0 { return } - coins := sdk.Coins{sdk.NewCoin(s.evmDenom, sdk.NewIntFromBigInt(amount))} + coins := sdk.Coins{sdk.NewCoin(s.evmDenom, sdkmath.NewIntFromBigInt(amount))} if err := s.ExecuteNativeAction(common.Address{}, nil, func(ctx sdk.Context) error { return s.keeper.SubBalance(ctx, sdk.AccAddress(addr.Bytes()), coins) }); err != nil { diff --git a/x/evm/statedb/statedb_test.go b/x/evm/statedb/statedb_test.go index 9c88b2680e..5cae6986fe 100644 --- a/x/evm/statedb/statedb_test.go +++ b/x/evm/statedb/statedb_test.go @@ -5,25 +5,26 @@ import ( "math/big" "testing" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" + "cosmossdk.io/log" + "cosmossdk.io/store/metrics" + "cosmossdk.io/store/rootmulti" + storetypes "cosmossdk.io/store/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/store/rootmulti" - storetypes "github.com/cosmos/cosmos-sdk/store/types" + dbm "github.com/cosmos/cosmos-db" + sdkaddress "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" "github.com/evmos/ethermint/app" - "github.com/evmos/ethermint/encoding" ethermint "github.com/evmos/ethermint/types" evmkeeper "github.com/evmos/ethermint/x/evm/keeper" "github.com/evmos/ethermint/x/evm/statedb" @@ -36,7 +37,6 @@ var ( emptyCodeHash = crypto.Keccak256(nil) address common.Address = common.BigToAddress(big.NewInt(101)) address2 common.Address = common.BigToAddress(big.NewInt(102)) - address3 common.Address = common.BigToAddress(big.NewInt(103)) blockHash common.Hash = common.BigToHash(big.NewInt(9999)) emptyTxConfig statedb.TxConfig = statedb.NewEmptyTxConfig(blockHash) ) @@ -54,9 +54,9 @@ func (suite *StateDBTestSuite) TestAccount() { txConfig.TxHash = common.BigToHash(big.NewInt(100)) testCases := []struct { name string - malleate func(*statedb.StateDB, sdk.MultiStore) + malleate func(*statedb.StateDB, storetypes.MultiStore) }{ - {"non-exist account", func(db *statedb.StateDB, cms sdk.MultiStore) { + {"non-exist account", func(db *statedb.StateDB, cms storetypes.MultiStore) { suite.Require().Equal(false, db.Exist(address)) suite.Require().Equal(true, db.Empty(address)) suite.Require().Equal(big.NewInt(0), db.GetBalance(address)) @@ -64,7 +64,7 @@ func (suite *StateDBTestSuite) TestAccount() { suite.Require().Equal(common.Hash{}, db.GetCodeHash(address)) suite.Require().Equal(uint64(0), db.GetNonce(address)) }}, - {"empty account", func(db *statedb.StateDB, cms sdk.MultiStore) { + {"empty account", func(db *statedb.StateDB, cms storetypes.MultiStore) { db.CreateAccount(address) suite.Require().NoError(db.Commit()) @@ -81,7 +81,7 @@ func (suite *StateDBTestSuite) TestAccount() { suite.Require().Equal(common.BytesToHash(emptyCodeHash), db.GetCodeHash(address)) suite.Require().Equal(uint64(0), db.GetNonce(address)) }}, - {"suicide", func(db *statedb.StateDB, cms sdk.MultiStore) { + {"suicide", func(db *statedb.StateDB, cms storetypes.MultiStore) { // non-exist account. suite.Require().False(db.Suicide(address)) suite.Require().False(db.HasSuicided(address)) @@ -766,12 +766,12 @@ func CollectContractStorage(db vm.StateDB, address common.Address) statedb.Stora } var ( - testStoreKeys = sdk.NewKVStoreKeys(authtypes.StoreKey, banktypes.StoreKey, evmtypes.StoreKey, "testnative") - testTransientKeys = sdk.NewTransientStoreKeys(evmtypes.TransientKey) - testMemKeys = sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) + testStoreKeys = storetypes.NewKVStoreKeys(authtypes.StoreKey, banktypes.StoreKey, evmtypes.StoreKey, "testnative") + testTransientKeys = storetypes.NewTransientStoreKeys(evmtypes.TransientKey) + testMemKeys = storetypes.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) ) -func cloneRawState(t *testing.T, cms sdk.MultiStore) map[string]map[string][]byte { +func cloneRawState(t *testing.T, cms storetypes.MultiStore) map[string]map[string][]byte { result := make(map[string]map[string][]byte) for name, key := range testStoreKeys { @@ -790,24 +790,27 @@ func cloneRawState(t *testing.T, cms sdk.MultiStore) map[string]map[string][]byt return result } -func newTestKeeper(t *testing.T, cms sdk.MultiStore) (sdk.Context, *evmkeeper.Keeper) { - appCodec := encoding.MakeConfig(app.ModuleBasics).Codec +func newTestKeeper(t *testing.T, cms storetypes.MultiStore) (sdk.Context, *evmkeeper.Keeper) { + appCodec := app.MakeConfigForTest().Codec authAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() accountKeeper := authkeeper.NewAccountKeeper( - appCodec, testStoreKeys[authtypes.StoreKey], + appCodec, + runtime.NewKVStoreService(testStoreKeys[authtypes.StoreKey]), ethermint.ProtoAccount, map[string][]string{ evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, }, + sdkaddress.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix()), sdk.GetConfig().GetBech32AccountAddrPrefix(), authAddr, ) bankKeeper := bankkeeper.NewBaseKeeper( appCodec, - testStoreKeys[banktypes.StoreKey], + runtime.NewKVStoreService(testStoreKeys[banktypes.StoreKey]), accountKeeper, map[string]bool{}, authAddr, + log.NewNopLogger(), ) allKeys := make(map[string]storetypes.StoreKey, len(testStoreKeys)+len(testTransientKeys)+len(testMemKeys)) for k, v := range testStoreKeys { @@ -820,10 +823,12 @@ func newTestKeeper(t *testing.T, cms sdk.MultiStore) (sdk.Context, *evmkeeper.Ke allKeys[k] = v } evmKeeper := evmkeeper.NewKeeper( - appCodec, testStoreKeys[evmtypes.StoreKey], testTransientKeys[evmtypes.TransientKey], authtypes.NewModuleAddress(govtypes.ModuleName), + appCodec, + runtime.NewKVStoreService(testStoreKeys[evmtypes.StoreKey]), + testStoreKeys[evmtypes.StoreKey], testTransientKeys[evmtypes.TransientKey], authtypes.NewModuleAddress(govtypes.ModuleName), accountKeeper, bankKeeper, nil, nil, "", - paramstypes.Subspace{}, nil, + nil, allKeys, ) @@ -831,9 +836,9 @@ func newTestKeeper(t *testing.T, cms sdk.MultiStore) (sdk.Context, *evmkeeper.Ke return ctx, evmKeeper } -func setupTestEnv(t *testing.T) (sdk.MultiStore, sdk.Context, *evmkeeper.Keeper) { +func setupTestEnv(t *testing.T) (storetypes.MultiStore, sdk.Context, *evmkeeper.Keeper) { db := dbm.NewMemDB() - cms := rootmulti.NewStore(db, log.NewNopLogger()) + cms := rootmulti.NewStore(db, log.NewNopLogger(), metrics.NewNoOpMetrics()) for _, key := range testStoreKeys { cms.MountStoreWithDB(key, storetypes.StoreTypeIAVL, nil) } diff --git a/x/evm/types/chain_config.go b/x/evm/types/chain_config.go index 53f4e04cea..cdbee60aec 100644 --- a/x/evm/types/chain_config.go +++ b/x/evm/types/chain_config.go @@ -21,7 +21,6 @@ import ( errorsmod "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" ) @@ -59,22 +58,22 @@ func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig { // DefaultChainConfig returns default evm parameters. func DefaultChainConfig() ChainConfig { - homesteadBlock := sdk.ZeroInt() - daoForkBlock := sdk.ZeroInt() - eip150Block := sdk.ZeroInt() - eip155Block := sdk.ZeroInt() - eip158Block := sdk.ZeroInt() - byzantiumBlock := sdk.ZeroInt() - constantinopleBlock := sdk.ZeroInt() - petersburgBlock := sdk.ZeroInt() - istanbulBlock := sdk.ZeroInt() - muirGlacierBlock := sdk.ZeroInt() - berlinBlock := sdk.ZeroInt() - londonBlock := sdk.ZeroInt() - arrowGlacierBlock := sdk.ZeroInt() - grayGlacierBlock := sdk.ZeroInt() - mergeNetsplitBlock := sdk.ZeroInt() - shanghaiTime := sdk.ZeroInt() + homesteadBlock := sdkmath.ZeroInt() + daoForkBlock := sdkmath.ZeroInt() + eip150Block := sdkmath.ZeroInt() + eip155Block := sdkmath.ZeroInt() + eip158Block := sdkmath.ZeroInt() + byzantiumBlock := sdkmath.ZeroInt() + constantinopleBlock := sdkmath.ZeroInt() + petersburgBlock := sdkmath.ZeroInt() + istanbulBlock := sdkmath.ZeroInt() + muirGlacierBlock := sdkmath.ZeroInt() + berlinBlock := sdkmath.ZeroInt() + londonBlock := sdkmath.ZeroInt() + arrowGlacierBlock := sdkmath.ZeroInt() + grayGlacierBlock := sdkmath.ZeroInt() + mergeNetsplitBlock := sdkmath.ZeroInt() + shanghaiTime := sdkmath.ZeroInt() return ChainConfig{ HomesteadBlock: &homesteadBlock, diff --git a/x/evm/types/chain_config.pb.go b/x/evm/types/chain_config.pb.go index 50c3be885d..933635d904 100644 --- a/x/evm/types/chain_config.pb.go +++ b/x/evm/types/chain_config.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -24,50 +24,50 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +// ChainConfig defines the Ethereum ChainConfig parameters using *sdkmath.Int values // instead of *big.Int. type ChainConfig struct { // homestead_block switch (nil no fork, 0 = already homestead) - HomesteadBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` + HomesteadBlock *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=cosmossdk.io/math.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) - DAOForkBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` + DAOForkBlock *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=cosmossdk.io/math.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` // dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork DAOForkSupport bool `protobuf:"varint,3,opt,name=dao_fork_support,json=daoForkSupport,proto3" json:"dao_fork_support,omitempty" yaml:"dao_fork_support"` // eip150_block: EIP150 implements the Gas price changes // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) - EIP150Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` + EIP150Block *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` // eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) EIP150Hash string `protobuf:"bytes,5,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"` // eip155_block: EIP155Block HF block - EIP155Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` + EIP155Block *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` // eip158_block: EIP158 HF block - EIP158Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` + EIP158Block *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=cosmossdk.io/math.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` // byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) - ByzantiumBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` + ByzantiumBlock *cosmossdk_io_math.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=cosmossdk.io/math.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` // constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) - ConstantinopleBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` + ConstantinopleBlock *cosmossdk_io_math.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=cosmossdk.io/math.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` // petersburg_block: Petersburg switch block (nil same as Constantinople) - PetersburgBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` + PetersburgBlock *cosmossdk_io_math.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=cosmossdk.io/math.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` // istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) - IstanbulBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` + IstanbulBlock *cosmossdk_io_math.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=cosmossdk.io/math.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` // muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) - MuirGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` + MuirGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` // berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) - BerlinBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` + BerlinBlock *cosmossdk_io_math.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=cosmossdk.io/math.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` // london_block: London switch block (nil = no fork, 0 = already on london) - LondonBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"london_block,omitempty" yaml:"london_block"` + LondonBlock *cosmossdk_io_math.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=cosmossdk.io/math.Int" json:"london_block,omitempty" yaml:"london_block"` // arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - ArrowGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` + ArrowGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` // gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) - GrayGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,20,opt,name=gray_glacier_block,json=grayGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gray_glacier_block,omitempty" yaml:"gray_glacier_block"` + GrayGlacierBlock *cosmossdk_io_math.Int `protobuf:"bytes,20,opt,name=gray_glacier_block,json=grayGlacierBlock,proto3,customtype=cosmossdk.io/math.Int" json:"gray_glacier_block,omitempty" yaml:"gray_glacier_block"` // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter - MergeNetsplitBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"` + MergeNetsplitBlock *cosmossdk_io_math.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=cosmossdk.io/math.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"` // shanghai switch time (nil = no fork, 0 = already on shanghai) - ShanghaiTime *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,22,opt,name=shanghai_time,json=shanghaiTime,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shanghai_time,omitempty" yaml:"shanghai_time"` + ShanghaiTime *cosmossdk_io_math.Int `protobuf:"bytes,22,opt,name=shanghai_time,json=shanghaiTime,proto3,customtype=cosmossdk.io/math.Int" json:"shanghai_time,omitempty" yaml:"shanghai_time"` // cancun switch time (nil = no fork, 0 = already on cancun) - CancunTime *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,23,opt,name=cancun_time,json=cancunTime,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"cancun_time,omitempty" yaml:"cancun_time"` + CancunTime *cosmossdk_io_math.Int `protobuf:"bytes,23,opt,name=cancun_time,json=cancunTime,proto3,customtype=cosmossdk.io/math.Int" json:"cancun_time,omitempty" yaml:"cancun_time"` // prague switch time (nil = no fork, 0 = already on prague) - PragueTime *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,24,opt,name=prague_time,json=pragueTime,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"prague_time,omitempty" yaml:"prague_time"` + PragueTime *cosmossdk_io_math.Int `protobuf:"bytes,24,opt,name=prague_time,json=pragueTime,proto3,customtype=cosmossdk.io/math.Int" json:"prague_time,omitempty" yaml:"prague_time"` } func (m *ChainConfig) Reset() { *m = ChainConfig{} } @@ -127,57 +127,57 @@ func init() { var fileDescriptor_7a2bf715c16bc5d4 = []byte{ // 809 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0xd6, 0x4d, 0x6f, 0xfa, 0x36, - 0x1c, 0x07, 0xf0, 0xb2, 0xb1, 0x8e, 0x3a, 0x10, 0x42, 0xa0, 0x2d, 0xeb, 0x24, 0xa8, 0x3c, 0x69, - 0xea, 0xa5, 0x50, 0x54, 0x21, 0x55, 0x3b, 0xb5, 0xb4, 0x5d, 0x0b, 0x87, 0xad, 0x72, 0x27, 0x4d, - 0xda, 0x25, 0x32, 0xc1, 0x4d, 0x32, 0x92, 0x38, 0xca, 0x03, 0x2d, 0xdb, 0x5e, 0xc4, 0x5e, 0xd6, - 0x8e, 0x3d, 0x4e, 0x3b, 0xa0, 0x89, 0xbe, 0x83, 0x5e, 0x77, 0x99, 0x62, 0x9b, 0x40, 0x28, 0x87, - 0x7f, 0x38, 0xb5, 0xfe, 0xe1, 0x7c, 0x3f, 0x3f, 0x3b, 0x0f, 0x32, 0xf8, 0x86, 0x84, 0x26, 0xf1, - 0x1d, 0xcb, 0x0d, 0xdb, 0x64, 0xe2, 0xb4, 0x27, 0x9d, 0xb6, 0x6e, 0x62, 0xcb, 0xd5, 0x74, 0xea, - 0x3e, 0x59, 0x46, 0xcb, 0xf3, 0x69, 0x48, 0x55, 0x25, 0x99, 0xd4, 0x22, 0x13, 0xa7, 0x35, 0xe9, - 0x1c, 0xd5, 0x0c, 0x6a, 0x50, 0xf6, 0x63, 0x3b, 0xfe, 0x8f, 0xcf, 0x83, 0xff, 0x55, 0x80, 0x74, - 0x1d, 0x5f, 0x7e, 0xcd, 0xae, 0x56, 0x1d, 0x50, 0x36, 0xa9, 0x43, 0x82, 0x90, 0xe0, 0x91, 0x36, - 0xb4, 0xa9, 0x3e, 0xae, 0xe7, 0x8e, 0x73, 0x27, 0x7b, 0xbd, 0x9b, 0x7f, 0x66, 0xcd, 0x6f, 0x0d, - 0x2b, 0x34, 0xa3, 0x61, 0x4b, 0xa7, 0x4e, 0x5b, 0xa7, 0x81, 0x43, 0x03, 0xf1, 0xe7, 0x34, 0x18, - 0x8d, 0xdb, 0xe1, 0xd4, 0x23, 0x41, 0xab, 0xef, 0x86, 0xef, 0xb3, 0xe6, 0xc1, 0x14, 0x3b, 0xf6, - 0x77, 0x70, 0x2d, 0x0a, 0x22, 0x39, 0xa9, 0xf4, 0xe2, 0x82, 0x3a, 0x05, 0xf2, 0x08, 0x53, 0xed, - 0x89, 0xfa, 0x63, 0xa1, 0x7d, 0xc6, 0xb4, 0xc7, 0x4f, 0xd7, 0xe6, 0xb3, 0x66, 0xf1, 0xe6, 0xea, - 0xc7, 0xef, 0xa9, 0x3f, 0x66, 0x99, 0xef, 0xb3, 0xe6, 0x3e, 0xd7, 0xd3, 0xc9, 0x10, 0x15, 0x47, - 0x98, 0x26, 0xd3, 0xd4, 0x9f, 0x81, 0x92, 0x4c, 0x08, 0x22, 0xcf, 0xa3, 0x7e, 0x58, 0xff, 0xfc, - 0x38, 0x77, 0x52, 0xe8, 0x9d, 0xce, 0x67, 0x4d, 0x59, 0x44, 0x3e, 0xf2, 0x5f, 0xde, 0x67, 0xcd, - 0xc3, 0xb5, 0x50, 0x71, 0x0d, 0x44, 0xb2, 0x88, 0x15, 0x53, 0xd5, 0x00, 0x14, 0x89, 0xe5, 0x75, - 0xba, 0x67, 0x62, 0x45, 0x79, 0xb6, 0xa2, 0x87, 0x4c, 0x2b, 0x92, 0x6e, 0xfb, 0x0f, 0x9d, 0xee, - 0xd9, 0x62, 0x41, 0x55, 0x6e, 0xaf, 0xc6, 0x42, 0x24, 0xf1, 0x21, 0x5f, 0x4d, 0x1f, 0x88, 0xa1, - 0x66, 0xe2, 0xc0, 0xac, 0x7f, 0xc1, 0xcc, 0x93, 0xf9, 0xac, 0x09, 0x78, 0xd2, 0x3d, 0x0e, 0xcc, - 0xe5, 0x7d, 0x19, 0x4e, 0x7f, 0xc3, 0x6e, 0x68, 0x45, 0xce, 0x22, 0x0b, 0xf0, 0x8b, 0xe3, 0x59, - 0x49, 0xff, 0x5d, 0xd1, 0xff, 0xee, 0xd6, 0xfd, 0x77, 0x37, 0xf5, 0xdf, 0x4d, 0xf7, 0xcf, 0xe7, - 0x24, 0xe8, 0x85, 0x40, 0xbf, 0xdc, 0x1a, 0xbd, 0xd8, 0x84, 0x5e, 0xa4, 0x51, 0x3e, 0x27, 0x7e, - 0xd8, 0xd7, 0x76, 0xa2, 0x5e, 0xd8, 0xfe, 0x61, 0xff, 0xb0, 0xa9, 0x72, 0x52, 0xe1, 0xdc, 0x1f, - 0xa0, 0xa6, 0x53, 0x37, 0x08, 0xe3, 0x9a, 0x4b, 0x3d, 0x9b, 0x08, 0x73, 0x8f, 0x99, 0xfd, 0x4c, - 0xe6, 0xd7, 0xdc, 0xdc, 0x94, 0x07, 0x51, 0x35, 0x5d, 0xe6, 0xba, 0x07, 0x14, 0x8f, 0x84, 0xc4, - 0x0f, 0x86, 0x91, 0x6f, 0x08, 0x19, 0x30, 0xf9, 0x36, 0x93, 0x2c, 0xde, 0x83, 0xf5, 0x2c, 0x88, - 0xca, 0xcb, 0x12, 0x17, 0x7f, 0x05, 0xb2, 0x15, 0xb7, 0x31, 0x8c, 0x6c, 0xe1, 0x49, 0xcc, 0xbb, - 0xce, 0xe4, 0x89, 0x97, 0x39, 0x9d, 0x04, 0x51, 0x69, 0x51, 0xe0, 0x56, 0x04, 0x54, 0x27, 0xb2, - 0x7c, 0xcd, 0xb0, 0xb1, 0x6e, 0x11, 0x5f, 0x78, 0x45, 0xe6, 0xdd, 0x65, 0xf2, 0xbe, 0xe2, 0xde, - 0xc7, 0x34, 0x88, 0x94, 0xb8, 0x78, 0xc7, 0x6b, 0x9c, 0x1d, 0x81, 0xe2, 0x90, 0xf8, 0xb6, 0xe5, - 0x0a, 0xb0, 0xc4, 0xc0, 0xab, 0x4c, 0xa0, 0x78, 0x4e, 0x57, 0x73, 0x20, 0x92, 0xf8, 0x30, 0x51, - 0x6c, 0xea, 0x8e, 0xe8, 0x42, 0xa9, 0x6c, 0xaf, 0xac, 0xe6, 0x40, 0x24, 0xf1, 0x21, 0x57, 0x5e, - 0x40, 0x15, 0xfb, 0x3e, 0x7d, 0x5e, 0xdb, 0x43, 0x95, 0x61, 0xf7, 0x99, 0xb0, 0x23, 0x8e, 0x6d, - 0x88, 0x83, 0xa8, 0xc2, 0xaa, 0xa9, 0x5d, 0x8c, 0x80, 0x6a, 0xf8, 0x78, 0xba, 0x06, 0xd7, 0xb6, - 0xbf, 0x79, 0x1f, 0xd3, 0x20, 0x52, 0xe2, 0x62, 0x8a, 0xfd, 0x1d, 0xd4, 0x1c, 0xe2, 0x1b, 0x44, - 0x73, 0x49, 0x18, 0x78, 0xb6, 0x15, 0x0a, 0x78, 0x7f, 0xfb, 0xf7, 0x71, 0x53, 0x1e, 0x44, 0x2a, - 0x2b, 0xff, 0x20, 0xaa, 0x1c, 0x37, 0x40, 0x29, 0x30, 0xb1, 0x6b, 0x98, 0xd8, 0xd2, 0x42, 0xcb, - 0x21, 0xf5, 0x03, 0xa6, 0xf6, 0x32, 0xa9, 0x35, 0xae, 0xa6, 0x82, 0x20, 0x2a, 0x2e, 0xc6, 0x3f, - 0x59, 0x0e, 0x51, 0x31, 0x90, 0x74, 0xec, 0xea, 0x91, 0xcb, 0x99, 0x43, 0xc6, 0x5c, 0x66, 0x62, - 0x54, 0xf1, 0xb1, 0x59, 0xc6, 0x40, 0x04, 0xf8, 0x68, 0x41, 0x78, 0x3e, 0x36, 0x22, 0xc2, 0x89, - 0xfa, 0xf6, 0xc4, 0x4a, 0x0c, 0x44, 0x80, 0x8f, 0x62, 0x62, 0x90, 0x2f, 0xc8, 0x4a, 0x79, 0x90, - 0x2f, 0x94, 0x15, 0x65, 0x90, 0x2f, 0x28, 0x4a, 0x65, 0x90, 0x2f, 0x54, 0x95, 0x1a, 0x2a, 0x4d, - 0xa9, 0x4d, 0xb5, 0xc9, 0x39, 0xdf, 0x6a, 0x24, 0x91, 0x67, 0x1c, 0x88, 0x0f, 0x30, 0x92, 0x75, - 0x1c, 0x62, 0x7b, 0x1a, 0x88, 0xfb, 0x80, 0x14, 0x7e, 0x77, 0x96, 0x47, 0x82, 0xde, 0xe5, 0x5f, - 0xf3, 0x46, 0xee, 0x75, 0xde, 0xc8, 0xfd, 0x3b, 0x6f, 0xe4, 0xfe, 0x7c, 0x6b, 0xec, 0xbc, 0xbe, - 0x35, 0x76, 0xfe, 0x7e, 0x6b, 0xec, 0xfc, 0xb2, 0xda, 0x39, 0x99, 0xc4, 0x8d, 0x2f, 0x4f, 0x5d, - 0x2f, 0xec, 0xdc, 0xc5, 0xba, 0x1f, 0xee, 0xb2, 0x63, 0xd4, 0xf9, 0xff, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x93, 0x90, 0xdb, 0x81, 0x95, 0x09, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x96, 0xcf, 0x6e, 0xf3, 0x44, + 0x14, 0xc5, 0x1b, 0x08, 0x1f, 0xe9, 0x38, 0x71, 0x5c, 0x27, 0x6d, 0x43, 0x91, 0x92, 0x6a, 0x90, + 0x50, 0x37, 0x24, 0x0d, 0x25, 0x10, 0xb1, 0x01, 0x52, 0xfe, 0x35, 0x0b, 0xa8, 0xa6, 0x08, 0x04, + 0x42, 0xb2, 0xc6, 0xce, 0xd4, 0x36, 0xb1, 0x3d, 0x96, 0x3d, 0x4e, 0x09, 0x4f, 0xc1, 0x63, 0xc1, + 0xae, 0x4b, 0xc4, 0x22, 0x42, 0xe9, 0x1b, 0xf4, 0x09, 0x90, 0x67, 0x26, 0x4e, 0x9c, 0xe6, 0xb3, + 0xb2, 0xeb, 0x3d, 0xbe, 0xe7, 0x77, 0xae, 0xaf, 0xc6, 0xcd, 0x80, 0xf7, 0x08, 0x73, 0x48, 0xe4, + 0xbb, 0x01, 0xeb, 0x91, 0x99, 0xdf, 0x9b, 0xf5, 0x7b, 0x96, 0x83, 0xdd, 0xc0, 0xb0, 0x68, 0x70, + 0xef, 0xda, 0xdd, 0x30, 0xa2, 0x8c, 0xea, 0x5a, 0xd6, 0xd4, 0x25, 0x33, 0xbf, 0x3b, 0xeb, 0x9f, + 0x35, 0x6d, 0x6a, 0x53, 0xfe, 0xb0, 0x97, 0xfe, 0x25, 0xfa, 0xe0, 0xdf, 0x75, 0xa0, 0x5c, 0xa7, + 0xf6, 0x6b, 0xee, 0xd6, 0x7f, 0x05, 0x75, 0x87, 0xfa, 0x24, 0x66, 0x04, 0x4f, 0x0c, 0xd3, 0xa3, + 0xd6, 0xb4, 0x55, 0x3a, 0x2f, 0x5d, 0x1c, 0x8e, 0xae, 0xfe, 0x5d, 0x74, 0x8e, 0x2d, 0x1a, 0xfb, + 0x34, 0x8e, 0x27, 0xd3, 0xae, 0x4b, 0x7b, 0x3e, 0x66, 0x4e, 0xf7, 0x26, 0x60, 0xcf, 0x8b, 0xce, + 0xc9, 0x1c, 0xfb, 0xde, 0xa7, 0x70, 0xcb, 0x09, 0x91, 0x9a, 0x29, 0xa3, 0x54, 0xd0, 0x1d, 0xa0, + 0x4e, 0x30, 0x35, 0xee, 0x69, 0x34, 0x95, 0xf0, 0x37, 0x38, 0x7c, 0xf4, 0x5a, 0xf8, 0x72, 0xd1, + 0xa9, 0x7e, 0xf9, 0xc5, 0xf7, 0x5f, 0xd3, 0x68, 0xca, 0x11, 0xcf, 0x8b, 0xce, 0xb1, 0x08, 0xcb, + 0x83, 0x20, 0xaa, 0x4e, 0x30, 0xcd, 0xda, 0xf4, 0x9f, 0x80, 0x96, 0x35, 0xc4, 0x49, 0x18, 0xd2, + 0x88, 0xb5, 0xde, 0x3c, 0x2f, 0x5d, 0x54, 0x46, 0x1f, 0x2c, 0x17, 0x1d, 0x55, 0x22, 0xef, 0xc4, + 0x93, 0xe7, 0x45, 0xe7, 0x74, 0x0b, 0x2a, 0x3d, 0x10, 0xa9, 0x12, 0x2b, 0x5b, 0x75, 0x13, 0x54, + 0x89, 0x1b, 0xf6, 0x07, 0x97, 0xf2, 0x05, 0xca, 0xfc, 0x05, 0x3e, 0x2b, 0x7a, 0x01, 0xe5, 0xab, + 0x9b, 0xdb, 0xfe, 0xe0, 0x72, 0x35, 0x7f, 0x43, 0x44, 0x6d, 0x52, 0x20, 0x52, 0x44, 0x29, 0x86, + 0xbf, 0x01, 0xb2, 0x34, 0x1c, 0x1c, 0x3b, 0xad, 0xb7, 0x78, 0xc4, 0xc5, 0x72, 0xd1, 0x01, 0x82, + 0xf4, 0x2d, 0x8e, 0x9d, 0xf5, 0xd6, 0xcd, 0xf9, 0x1f, 0x38, 0x60, 0x6e, 0xe2, 0xaf, 0x58, 0x40, + 0x98, 0xd3, 0xae, 0x6c, 0xdc, 0x81, 0x1c, 0xf7, 0xd5, 0xbe, 0xe3, 0x0e, 0x76, 0x8d, 0x3b, 0xc8, + 0x8f, 0x2b, 0x7a, 0xb2, 0x8c, 0xa1, 0xcc, 0x78, 0x7b, 0xdf, 0x8c, 0xe1, 0xae, 0x8c, 0x61, 0x3e, + 0x43, 0xf4, 0xa4, 0xe7, 0x72, 0xeb, 0x3d, 0x5b, 0x95, 0xbd, 0xcf, 0xe5, 0x8b, 0x0d, 0xa9, 0x99, + 0x22, 0xe8, 0x53, 0xd0, 0xb4, 0x68, 0x10, 0xb3, 0x54, 0x0b, 0x68, 0xe8, 0x11, 0x19, 0x71, 0xc8, + 0x23, 0x86, 0x45, 0x11, 0xef, 0x8a, 0x88, 0x5d, 0x76, 0x88, 0x1a, 0x79, 0x59, 0x84, 0x19, 0x40, + 0x0b, 0x09, 0x23, 0x51, 0x6c, 0x26, 0x91, 0x2d, 0x83, 0x00, 0x0f, 0xfa, 0xa8, 0x28, 0x48, 0x9e, + 0xd0, 0x6d, 0x2b, 0x44, 0xf5, 0xb5, 0x24, 0x02, 0x7e, 0x06, 0xaa, 0x9b, 0xa6, 0x9a, 0x89, 0x27, + 0xf1, 0x0a, 0xc7, 0x7f, 0x58, 0x84, 0x97, 0x5f, 0x55, 0xde, 0x08, 0x51, 0x6d, 0x25, 0x08, 0xf4, + 0x04, 0xe8, 0x7e, 0xe2, 0x46, 0x86, 0xed, 0x61, 0xcb, 0x25, 0x91, 0xc4, 0x57, 0x39, 0xfe, 0xe3, + 0x22, 0xfc, 0x3b, 0x02, 0xff, 0xd2, 0x0c, 0x91, 0x96, 0x8a, 0xdf, 0x08, 0x4d, 0xa4, 0xdc, 0x81, + 0xaa, 0x49, 0x22, 0xcf, 0x0d, 0x24, 0xbf, 0xc6, 0xf9, 0x97, 0x45, 0x7c, 0x79, 0x82, 0x36, 0x6d, + 0x10, 0x29, 0xa2, 0xcc, 0xa0, 0x1e, 0x0d, 0x26, 0x74, 0x05, 0x3d, 0xda, 0x1b, 0xba, 0x69, 0x83, + 0x48, 0x11, 0xa5, 0x80, 0xda, 0xa0, 0x81, 0xa3, 0x88, 0x3e, 0x6c, 0x2d, 0x44, 0xe7, 0xec, 0x4f, + 0x8a, 0xd8, 0x67, 0x82, 0xbd, 0xc3, 0x0d, 0xd1, 0x11, 0x57, 0x73, 0x2b, 0x99, 0x00, 0xdd, 0x8e, + 0xf0, 0x7c, 0x2b, 0xa7, 0xb9, 0xf7, 0xe2, 0x5f, 0x9a, 0x21, 0xd2, 0x52, 0x31, 0x97, 0xf2, 0x1b, + 0x68, 0xfa, 0x24, 0xb2, 0x89, 0x11, 0x10, 0x16, 0x87, 0x9e, 0xcb, 0x64, 0xce, 0xf1, 0xde, 0xdf, + 0xc1, 0x2e, 0x3b, 0x44, 0x3a, 0x97, 0xbf, 0x93, 0xaa, 0xc8, 0xfa, 0x11, 0xd4, 0x62, 0x07, 0x07, + 0xb6, 0x83, 0x5d, 0x83, 0xb9, 0x3e, 0x69, 0x9d, 0xf0, 0x90, 0x7e, 0x51, 0x48, 0x53, 0x84, 0xe4, + 0x7c, 0x10, 0x55, 0x57, 0xf5, 0x0f, 0xae, 0x4f, 0xf4, 0x5b, 0xa0, 0x58, 0x38, 0xb0, 0x92, 0x40, + 0x50, 0x4f, 0x39, 0xb5, 0x57, 0x44, 0xd5, 0xe5, 0x27, 0xbc, 0x76, 0x41, 0x04, 0x44, 0xb5, 0x22, + 0x86, 0x11, 0xb6, 0x13, 0x22, 0x88, 0xad, 0xbd, 0x89, 0x1b, 0x2e, 0x88, 0x80, 0xa8, 0x52, 0xe2, + 0xb8, 0x5c, 0x51, 0xb5, 0xfa, 0xb8, 0x5c, 0xa9, 0x6b, 0xda, 0xb8, 0x5c, 0xd1, 0xb4, 0xa3, 0x71, + 0xb9, 0xd2, 0xd0, 0x9a, 0xa8, 0x36, 0xa7, 0x1e, 0x35, 0x66, 0x57, 0x62, 0x6f, 0x48, 0x21, 0x0f, + 0x38, 0x96, 0xff, 0xb4, 0x90, 0x6a, 0x61, 0x86, 0xbd, 0x79, 0x2c, 0x97, 0x8a, 0x34, 0xb1, 0xea, + 0xf5, 0x4f, 0xe0, 0xe8, 0xf3, 0xbf, 0x96, 0xed, 0xd2, 0xe3, 0xb2, 0x5d, 0xfa, 0x6f, 0xd9, 0x2e, + 0xfd, 0xf9, 0xd4, 0x3e, 0x78, 0x7c, 0x6a, 0x1f, 0xfc, 0xf3, 0xd4, 0x3e, 0xf8, 0xe5, 0x7d, 0xdb, + 0x65, 0x4e, 0x62, 0x76, 0x2d, 0xea, 0xa7, 0x77, 0x06, 0x1a, 0xf7, 0xd6, 0x77, 0x88, 0xdf, 0xf9, + 0x2d, 0x82, 0xcd, 0x43, 0x12, 0x9b, 0xaf, 0xf8, 0xa5, 0xe0, 0xea, 0xff, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x9d, 0xd4, 0x41, 0xff, 0x63, 0x08, 0x00, 0x00, } func (m *ChainConfig) Marshal() (dAtA []byte, err error) { @@ -614,7 +614,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.HomesteadBlock = &v if err := m.HomesteadBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -650,7 +650,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.DAOForkBlock = &v if err := m.DAOForkBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -706,7 +706,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.EIP150Block = &v if err := m.EIP150Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -774,7 +774,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.EIP155Block = &v if err := m.EIP155Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -810,7 +810,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.EIP158Block = &v if err := m.EIP158Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -846,7 +846,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ByzantiumBlock = &v if err := m.ByzantiumBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -882,7 +882,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ConstantinopleBlock = &v if err := m.ConstantinopleBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -918,7 +918,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.PetersburgBlock = &v if err := m.PetersburgBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -954,7 +954,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.IstanbulBlock = &v if err := m.IstanbulBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -990,7 +990,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.MuirGlacierBlock = &v if err := m.MuirGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1026,7 +1026,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.BerlinBlock = &v if err := m.BerlinBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1062,7 +1062,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.LondonBlock = &v if err := m.LondonBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1098,7 +1098,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ArrowGlacierBlock = &v if err := m.ArrowGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1134,7 +1134,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.GrayGlacierBlock = &v if err := m.GrayGlacierBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1170,7 +1170,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.MergeNetsplitBlock = &v if err := m.MergeNetsplitBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1206,7 +1206,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ShanghaiTime = &v if err := m.ShanghaiTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1242,7 +1242,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.CancunTime = &v if err := m.CancunTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1278,7 +1278,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.PragueTime = &v if err := m.PragueTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/evm/types/codec.go b/x/evm/types/codec.go index 7fa39b26da..9b681d4846 100644 --- a/x/evm/types/codec.go +++ b/x/evm/types/codec.go @@ -33,7 +33,7 @@ var ( ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) // AminoCdc is a amino codec created to support amino JSON compatible msgs. - AminoCdc = codec.NewAminoCodec(amino) + AminoCdc = codec.NewAminoCodec(amino) //nolint:staticcheck ) const ( diff --git a/x/evm/types/dynamic_fee_tx_test.go b/x/evm/types/dynamic_fee_tx_test.go index 20e883c4ee..891d033d79 100644 --- a/x/evm/types/dynamic_fee_tx_test.go +++ b/x/evm/types/dynamic_fee_tx_test.go @@ -6,7 +6,6 @@ import ( sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" @@ -39,7 +38,7 @@ func (suite *TxDataTestSuite) SetupTest() { suite.bigInt = big.NewInt(1) suite.hexBigInt = hexutil.Big(*big.NewInt(1)) suite.overflowBigInt = big.NewInt(0).Exp(big.NewInt(10), big.NewInt(256), nil) - suite.sdkZeroInt = sdk.ZeroInt() + suite.sdkZeroInt = sdkmath.ZeroInt() suite.sdkMinusOneInt = sdkmath.NewInt(-1) suite.invalidAddr = "123456" suite.addr = tests.GenerateAddress() diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index 8253dd22cd..4081471129 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -16,8 +16,10 @@ package types import ( + context "context" "math/big" + "github.com/cosmos/cosmos-sdk/x/auth/ante" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -31,32 +33,29 @@ import ( // AccountKeeper defines the expected account keeper interface type AccountKeeper interface { - NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + ante.AccountKeeper + NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI GetModuleAddress(moduleName string) sdk.AccAddress - GetAllAccounts(ctx sdk.Context) (accounts []authtypes.AccountI) - IterateAccounts(ctx sdk.Context, cb func(account authtypes.AccountI) bool) - GetSequence(sdk.Context, sdk.AccAddress) (uint64, error) - GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI - SetAccount(ctx sdk.Context, account authtypes.AccountI) - RemoveAccount(ctx sdk.Context, account authtypes.AccountI) - GetParams(ctx sdk.Context) (params authtypes.Params) + GetAllAccounts(ctx context.Context) (accounts []sdk.AccountI) + IterateAccounts(ctx context.Context, cb func(account sdk.AccountI) bool) + GetSequence(context.Context, sdk.AccAddress) (uint64, error) + RemoveAccount(ctx context.Context, account sdk.AccountI) } // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { authtypes.BankKeeper - GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error - IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error + GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin + SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error BlockedAddr(addr sdk.AccAddress) bool } // StakingKeeper returns the historical headers kept in store. type StakingKeeper interface { - GetHistoricalInfo(ctx sdk.Context, height int64) (stakingtypes.HistoricalInfo, bool) - GetValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, found bool) + GetHistoricalInfo(ctx context.Context, height int64) (stakingtypes.HistoricalInfo, error) + GetValidatorByConsAddr(ctx context.Context, consAddr sdk.ConsAddress) (validator stakingtypes.Validator, err error) } // FeeMarketKeeper diff --git a/x/evm/types/msg.go b/x/evm/types/msg.go index fef2fee8d3..7df29ed13e 100644 --- a/x/evm/types/msg.go +++ b/x/evm/types/msg.go @@ -22,6 +22,7 @@ import ( "math/big" sdkmath "cosmossdk.io/math" + "google.golang.org/protobuf/proto" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" @@ -29,8 +30,9 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/cosmos/cosmos-sdk/x/auth/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" "github.com/ethereum/go-ethereum/common" @@ -234,13 +236,8 @@ func (msg *MsgEthereumTx) GetMsgs() []sdk.Msg { return []sdk.Msg{msg} } -// GetSigners returns the expected signers for an Ethereum transaction message. -// For such a message, there should exist only a single 'signer'. -func (msg *MsgEthereumTx) GetSigners() []sdk.AccAddress { - if len(msg.From) == 0 { - return nil - } - return []sdk.AccAddress{msg.GetFrom()} +func (msg *MsgEthereumTx) GetMsgsV2() ([]proto.Message, error) { + return nil, errors.New("not implemented") } // GetSender convert the From field to common.Address @@ -292,7 +289,7 @@ func (msg *MsgEthereumTx) Sign(ethSigner ethtypes.Signer, keyringSigner keyring. tx := msg.AsTransaction() txHash := ethSigner.Hash(tx) - sig, _, err := keyringSigner.SignByAddress(from, txHash.Bytes()) + sig, _, err := keyringSigner.SignByAddress(from, txHash.Bytes(), signing.SignMode_SIGN_MODE_TEXTUAL) if err != nil { return err } @@ -404,7 +401,7 @@ func (msg *MsgEthereumTx) UnmarshalBinary(b []byte, chainID *big.Int) error { } // BuildTx builds the canonical cosmos tx from ethereum msg -func (msg *MsgEthereumTx) BuildTx(b client.TxBuilder, evmDenom string) (signing.Tx, error) { +func (msg *MsgEthereumTx) BuildTx(b client.TxBuilder, evmDenom string) (authsigning.Tx, error) { builder, ok := b.(authtx.ExtensionOptionsTxBuilder) if !ok { return nil, errors.New("unsupported builder") @@ -437,13 +434,6 @@ func (msg *MsgEthereumTx) BuildTx(b client.TxBuilder, evmDenom string) (signing. return tx, nil } -// GetSigners returns the expected signers for a MsgUpdateParams message. -func (m MsgUpdateParams) GetSigners() []sdk.AccAddress { - //#nosec G703 -- gosec raises a warning about a non-handled error which we deliberately ignore here - addr, _ := sdk.AccAddressFromBech32(m.Authority) - return []sdk.AccAddress{addr} -} - // ValidateBasic does a sanity check of the provided data func (m *MsgUpdateParams) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { diff --git a/x/evm/types/msg_test.go b/x/evm/types/msg_test.go index f6dd866dc3..e5d818e5e5 100644 --- a/x/evm/types/msg_test.go +++ b/x/evm/types/msg_test.go @@ -13,6 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/evmos/ethermint/app" "github.com/evmos/ethermint/crypto/ethsecp256k1" "github.com/evmos/ethermint/tests" @@ -20,8 +21,6 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/ethermint/app" - "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/x/evm/types" ) @@ -52,7 +51,7 @@ func (suite *MsgsTestSuite) SetupTest() { suite.chainID = big.NewInt(1) suite.hundredBigInt = big.NewInt(100) - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + encodingConfig := app.MakeConfigForTest() suite.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig) } @@ -64,7 +63,6 @@ func (suite *MsgsTestSuite) TestMsgEthereumTx_Constructor() { suite.Require().Equal(msg.Type(), types.TypeMsgEthereumTx) // suite.Require().NotNil(msg.To()) suite.Require().Equal(msg.GetMsgs(), []sdk.Msg{msg}) - suite.Require().Empty(msg.GetSigners()) suite.Require().Panics(func() { msg.GetSignBytes() }) msg = types.NewTxContract(nil, 0, nil, 100000, nil, nil, nil, []byte("test"), nil) diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 4e61877c18..253948b1c9 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -5,6 +5,7 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" @@ -1431,7 +1432,7 @@ var xxx_messageInfo_QueryBaseFeeRequest proto.InternalMessageInfo // QueryBaseFeeResponse returns the EIP1559 base fee. type QueryBaseFeeResponse struct { // base_fee is the EIP1559 base fee - BaseFee *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee,omitempty"` + BaseFee *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=cosmossdk.io/math.Int" json:"base_fee,omitempty"` } func (m *QueryBaseFeeResponse) Reset() { *m = QueryBaseFeeResponse{} } @@ -1499,105 +1500,105 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1559 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x5f, 0x6f, 0x13, 0xc7, - 0x16, 0xcf, 0xc6, 0x4e, 0x6c, 0x8f, 0x13, 0xf0, 0x1d, 0xc2, 0xc5, 0xec, 0x4d, 0xec, 0xb0, 0x21, - 0x7f, 0x09, 0xbb, 0x37, 0xbe, 0x57, 0x48, 0xe5, 0xa5, 0x60, 0x2b, 0x50, 0x0a, 0x54, 0x74, 0x1b, - 0xf5, 0xa1, 0x12, 0xb2, 0xc6, 0xeb, 0x61, 0x6d, 0xc5, 0xbb, 0x63, 0x76, 0xd6, 0xae, 0xc3, 0x9f, - 0x3e, 0x54, 0x2d, 0xa5, 0x42, 0xaa, 0x90, 0xfa, 0x5e, 0xf1, 0x0d, 0xfa, 0x35, 0x78, 0x44, 0xaa, - 0x2a, 0x55, 0x7d, 0xa0, 0x08, 0xfa, 0xd0, 0x4f, 0xd0, 0x87, 0x3e, 0x55, 0x33, 0x3b, 0x6b, 0xef, - 0x7a, 0xbd, 0x76, 0xa8, 0xa8, 0x84, 0xd4, 0x27, 0xcf, 0x9f, 0x33, 0xe7, 0xfc, 0xce, 0x9c, 0x33, - 0xe7, 0xfc, 0xd6, 0x60, 0x11, 0xbb, 0x0d, 0xec, 0x58, 0x4d, 0xdb, 0xd5, 0x70, 0xd7, 0xd2, 0xba, - 0x3b, 0xda, 0xed, 0x0e, 0x76, 0x0e, 0xd4, 0xb6, 0x43, 0x5c, 0x02, 0x73, 0xfd, 0x5d, 0x15, 0x77, - 0x2d, 0xb5, 0xbb, 0x23, 0x6f, 0x19, 0x84, 0x5a, 0x84, 0x6a, 0x35, 0x44, 0xb1, 0x27, 0xaa, 0x75, - 0x77, 0x6a, 0xd8, 0x45, 0x3b, 0x5a, 0x1b, 0x99, 0x4d, 0x1b, 0xb9, 0x4d, 0x62, 0x7b, 0xa7, 0xe5, - 0x93, 0x11, 0xdd, 0x6e, 0x4f, 0x6c, 0xc9, 0x91, 0xad, 0x16, 0x31, 0xc5, 0xde, 0x52, 0x64, 0xaf, - 0x8d, 0x1c, 0x64, 0x51, 0xb1, 0xbd, 0x12, 0xd5, 0xea, 0x20, 0x03, 0x57, 0x0d, 0x62, 0xdf, 0x6a, - 0xfa, 0x3a, 0x16, 0x4c, 0x62, 0x12, 0x3e, 0xd4, 0xd8, 0x48, 0xac, 0x2e, 0x9a, 0x84, 0x98, 0x2d, - 0xac, 0xa1, 0x76, 0x53, 0x43, 0xb6, 0x4d, 0x5c, 0x8e, 0xd6, 0x57, 0x5c, 0x14, 0xbb, 0x7c, 0x56, - 0xeb, 0xdc, 0xd2, 0xdc, 0xa6, 0x85, 0xa9, 0x8b, 0xac, 0xb6, 0x27, 0xa0, 0xbc, 0x03, 0x8e, 0x7d, - 0xc8, 0x3c, 0xbe, 0x68, 0x18, 0xa4, 0x63, 0xbb, 0x3a, 0xbe, 0xdd, 0xc1, 0xd4, 0x85, 0x79, 0x90, - 0x42, 0xf5, 0xba, 0x83, 0x29, 0xcd, 0x4b, 0xcb, 0xd2, 0x46, 0x46, 0xf7, 0xa7, 0xe7, 0xd3, 0x0f, - 0x9f, 0x14, 0xa7, 0x7e, 0x7b, 0x52, 0x9c, 0x52, 0x0c, 0xb0, 0x10, 0x3e, 0x4a, 0xdb, 0xc4, 0xa6, - 0x98, 0x9d, 0xad, 0xa1, 0x16, 0xb2, 0x0d, 0xec, 0x9f, 0x15, 0x53, 0xf8, 0x1f, 0x90, 0x31, 0x48, - 0x1d, 0x57, 0x1b, 0x88, 0x36, 0xf2, 0xd3, 0x7c, 0x2f, 0xcd, 0x16, 0xde, 0x43, 0xb4, 0x01, 0x17, - 0xc0, 0x8c, 0x4d, 0xd8, 0xa1, 0xc4, 0xb2, 0xb4, 0x91, 0xd4, 0xbd, 0x89, 0xf2, 0x2e, 0x38, 0xc9, - 0x8d, 0x54, 0x78, 0x88, 0xfe, 0x02, 0xca, 0x07, 0x12, 0x90, 0x47, 0x69, 0x10, 0x60, 0x57, 0xc1, - 0x11, 0x2f, 0xfa, 0xd5, 0xb0, 0xa6, 0x79, 0x6f, 0xf5, 0xa2, 0xb7, 0x08, 0x65, 0x90, 0xa6, 0xcc, - 0x28, 0xc3, 0x37, 0xcd, 0xf1, 0xf5, 0xe7, 0x4c, 0x05, 0xf2, 0xb4, 0x56, 0xed, 0x8e, 0x55, 0xc3, - 0x8e, 0xf0, 0x60, 0x5e, 0xac, 0x7e, 0xc0, 0x17, 0x95, 0xab, 0x60, 0x91, 0xe3, 0xf8, 0x18, 0xb5, - 0x9a, 0x75, 0xe4, 0x12, 0x67, 0xc8, 0x99, 0x53, 0x60, 0xce, 0x20, 0xf6, 0x30, 0x8e, 0x2c, 0x5b, - 0xbb, 0x18, 0xf1, 0xea, 0x91, 0x04, 0x96, 0x62, 0xb4, 0x09, 0xc7, 0xd6, 0xc1, 0x51, 0x1f, 0x55, - 0x58, 0xa3, 0x0f, 0xf6, 0x0d, 0xba, 0xe6, 0x27, 0x51, 0xd9, 0x8b, 0xf3, 0xeb, 0x84, 0xe7, 0xbf, - 0x22, 0x89, 0xfa, 0x47, 0x27, 0x25, 0x91, 0x72, 0x55, 0x18, 0xfb, 0xc8, 0x25, 0x0e, 0x32, 0x27, - 0x1b, 0x83, 0x39, 0x90, 0xd8, 0xc7, 0x07, 0x22, 0xdf, 0xd8, 0x30, 0x60, 0x7e, 0x5b, 0x98, 0xef, - 0x2b, 0x13, 0xe6, 0x17, 0xc0, 0x4c, 0x17, 0xb5, 0x3a, 0xbe, 0x71, 0x6f, 0xa2, 0x9c, 0x03, 0x39, - 0x91, 0x4a, 0xf5, 0xd7, 0x72, 0x72, 0x1d, 0xfc, 0x2b, 0x70, 0x4e, 0x98, 0x80, 0x20, 0xc9, 0x72, - 0x9f, 0x9f, 0x9a, 0xd3, 0xf9, 0x58, 0xb9, 0x03, 0x20, 0x17, 0xdc, 0xeb, 0x5d, 0x23, 0x26, 0xf5, - 0x4d, 0x40, 0x90, 0xe4, 0x2f, 0xc6, 0xd3, 0xcf, 0xc7, 0xf0, 0x12, 0x00, 0x83, 0xda, 0xc4, 0x7d, - 0xcb, 0x96, 0xd6, 0x54, 0x2f, 0x69, 0x55, 0x56, 0xc8, 0x54, 0xaf, 0xe6, 0x89, 0x42, 0xa6, 0xde, - 0x18, 0x5c, 0x95, 0x1e, 0x38, 0x19, 0x00, 0xf9, 0xb5, 0x24, 0x2e, 0xd6, 0x37, 0x2e, 0x70, 0x6e, - 0x82, 0x64, 0x8b, 0x98, 0xcc, 0xbb, 0xc4, 0x46, 0xb6, 0x74, 0x5c, 0x1d, 0x2e, 0x9f, 0xea, 0x35, - 0x62, 0xea, 0x5c, 0x04, 0x5e, 0x1e, 0x01, 0x6a, 0x7d, 0x22, 0x28, 0xcf, 0x4e, 0x10, 0x95, 0xb2, - 0x20, 0xee, 0xe1, 0x06, 0x2f, 0x92, 0x02, 0xb7, 0x72, 0x5d, 0x00, 0xf4, 0x57, 0x05, 0xc0, 0x73, - 0x60, 0xd6, 0x2b, 0xa6, 0xfc, 0x82, 0xb2, 0xa5, 0x7c, 0x14, 0xa2, 0x77, 0xa2, 0x9c, 0x7c, 0xfa, - 0xbc, 0x38, 0xa5, 0x0b, 0x69, 0xe5, 0x47, 0x09, 0x1c, 0xd9, 0x75, 0x1b, 0x15, 0xd4, 0x6a, 0x05, - 0x6e, 0x1a, 0x39, 0x26, 0xf5, 0x63, 0xc2, 0xc6, 0xf0, 0x04, 0x48, 0x99, 0x88, 0x56, 0x0d, 0xd4, - 0x16, 0xcf, 0x63, 0xd6, 0x44, 0xb4, 0x82, 0xda, 0xf0, 0x26, 0xc8, 0xb5, 0x1d, 0xd2, 0x26, 0x14, - 0x3b, 0xfd, 0x27, 0xc6, 0x9e, 0xc7, 0x5c, 0xb9, 0xf4, 0xc7, 0xf3, 0xa2, 0x6a, 0x36, 0xdd, 0x46, - 0xa7, 0xa6, 0x1a, 0xc4, 0xd2, 0x44, 0x7f, 0xf1, 0x7e, 0xce, 0xd2, 0xfa, 0xbe, 0xe6, 0x1e, 0xb4, - 0x31, 0x55, 0x2b, 0x83, 0xb7, 0xad, 0x1f, 0xf5, 0x75, 0xf9, 0xef, 0xf2, 0x24, 0x48, 0x1b, 0x0d, - 0xd4, 0xb4, 0xab, 0xcd, 0x7a, 0x3e, 0xb9, 0x2c, 0x6d, 0x24, 0xf4, 0x14, 0x9f, 0x5f, 0xa9, 0xc3, - 0x45, 0x90, 0x21, 0x5d, 0xec, 0x38, 0xcd, 0x3a, 0xa6, 0xf9, 0x19, 0x8e, 0x75, 0xb0, 0xa0, 0xec, - 0x81, 0x63, 0xbb, 0xd4, 0x6d, 0x5a, 0xc8, 0xc5, 0x97, 0xd1, 0xe0, 0x9a, 0x72, 0x20, 0x61, 0x22, - 0xcf, 0xb5, 0xa4, 0xce, 0x86, 0x6c, 0xc5, 0xc1, 0x2e, 0xf7, 0x6a, 0x4e, 0x67, 0x43, 0x66, 0xb3, - 0x6b, 0x55, 0xb1, 0xe3, 0x10, 0xef, 0xa5, 0x67, 0xf4, 0x54, 0xd7, 0xda, 0x65, 0x53, 0xe5, 0x45, - 0xc2, 0x4f, 0x0f, 0xd6, 0x99, 0xf6, 0x7a, 0xfe, 0x95, 0xed, 0x80, 0x84, 0x45, 0x4d, 0x71, 0xf5, - 0xc5, 0xe8, 0xd5, 0x5f, 0xa7, 0xe6, 0x2e, 0x5b, 0xc3, 0x1d, 0x6b, 0xaf, 0xa7, 0x33, 0x59, 0x78, - 0x01, 0xcc, 0x05, 0xdb, 0x1b, 0xb7, 0x94, 0x2d, 0x2d, 0x45, 0xcf, 0x72, 0x53, 0x15, 0x2e, 0xa4, - 0x67, 0xdd, 0xc1, 0x04, 0x56, 0xc0, 0x5c, 0xdb, 0xc1, 0x75, 0x6c, 0x60, 0x4a, 0x89, 0x43, 0xf3, - 0x49, 0x9e, 0x9b, 0x13, 0xad, 0x87, 0x0e, 0xb1, 0x82, 0x5b, 0x6b, 0x11, 0x63, 0xdf, 0x2f, 0x6d, - 0x33, 0xfc, 0x92, 0xb3, 0x7c, 0xcd, 0x2b, 0x6c, 0x70, 0x09, 0x00, 0x4f, 0x84, 0xbf, 0xbf, 0x59, - 0x7e, 0x23, 0x19, 0xbe, 0xc2, 0x5b, 0x56, 0xc5, 0xdf, 0x66, 0x5d, 0x35, 0x9f, 0xe2, 0x6e, 0xc8, - 0xaa, 0xd7, 0x72, 0x55, 0xbf, 0xe5, 0xaa, 0x7b, 0x7e, 0xcb, 0x2d, 0xa7, 0x59, 0xfe, 0x3d, 0xfe, - 0xa5, 0x28, 0x09, 0x25, 0x6c, 0x67, 0x64, 0x1a, 0xa5, 0xff, 0x9e, 0x34, 0xca, 0x84, 0xd2, 0xe8, - 0xfd, 0x64, 0x7a, 0x3a, 0x97, 0xd0, 0xd3, 0x6e, 0xaf, 0xda, 0xb4, 0xeb, 0xb8, 0xa7, 0x6c, 0x89, - 0x62, 0xd8, 0x8f, 0xf0, 0xa0, 0x52, 0xd5, 0x91, 0x8b, 0xfc, 0x57, 0xc1, 0xc6, 0xca, 0x57, 0x09, - 0x70, 0x7c, 0x20, 0xfc, 0xb6, 0xbe, 0xa1, 0xe1, 0x4c, 0x4b, 0xbe, 0x76, 0xa6, 0xbd, 0x25, 0x49, - 0x12, 0x8c, 0x62, 0x3a, 0x14, 0x45, 0x65, 0x1b, 0xfc, 0x7b, 0x38, 0x10, 0x63, 0xe2, 0xf6, 0x4d, - 0x22, 0x28, 0x5e, 0x66, 0x06, 0x02, 0x2f, 0xd9, 0xed, 0xf9, 0x75, 0x7e, 0xf2, 0x4b, 0x76, 0x7b, - 0xf4, 0x0d, 0xbc, 0xe4, 0x7f, 0xfa, 0x23, 0x54, 0xce, 0x82, 0x13, 0x91, 0x78, 0x8c, 0x89, 0xdf, - 0xf1, 0x3e, 0xd5, 0xa2, 0xf8, 0x12, 0xf6, 0x5b, 0xba, 0x72, 0xb3, 0x4f, 0xa3, 0xc4, 0xb2, 0x50, - 0xb1, 0x0b, 0xd2, 0xac, 0xef, 0x56, 0x6f, 0x61, 0x41, 0x65, 0xca, 0x5b, 0x3f, 0x3f, 0x2f, 0xae, - 0x1d, 0xc2, 0x9f, 0x2b, 0xb6, 0xcb, 0x38, 0x17, 0x57, 0x57, 0xfa, 0x7d, 0x1e, 0xcc, 0x70, 0xfd, - 0xf0, 0x4b, 0x09, 0xa4, 0x04, 0xd5, 0x84, 0xab, 0xd1, 0x38, 0x8f, 0xf8, 0x96, 0x90, 0xd7, 0x26, - 0x89, 0x79, 0x58, 0x95, 0x33, 0x9f, 0xff, 0xf0, 0xeb, 0xb7, 0xd3, 0xab, 0x70, 0x45, 0x8b, 0x7c, - 0x0d, 0x09, 0xba, 0xa9, 0xdd, 0x15, 0xb1, 0xb9, 0x0f, 0xbf, 0x93, 0xc0, 0x7c, 0x88, 0xd1, 0xc3, - 0x33, 0x31, 0x66, 0x46, 0x7d, 0x39, 0xc8, 0xdb, 0x87, 0x13, 0x16, 0xc8, 0x4a, 0x1c, 0xd9, 0x36, - 0xdc, 0x8a, 0x22, 0xf3, 0x3f, 0x1e, 0x22, 0x00, 0xbf, 0x97, 0x40, 0x6e, 0x98, 0x9c, 0x43, 0x35, - 0xc6, 0x6c, 0xcc, 0x37, 0x81, 0xac, 0x1d, 0x5a, 0x5e, 0x20, 0x3d, 0xcf, 0x91, 0xfe, 0x1f, 0x96, - 0xa2, 0x48, 0xbb, 0xfe, 0x99, 0x01, 0xd8, 0xe0, 0xf7, 0xc6, 0x7d, 0xf8, 0x40, 0x02, 0x29, 0x41, - 0xc3, 0x63, 0x43, 0x1b, 0x66, 0xf8, 0xb1, 0xa1, 0x1d, 0x62, 0xf3, 0xca, 0x36, 0x87, 0xb5, 0x06, - 0x4f, 0x47, 0x61, 0x09, 0x5a, 0x4f, 0x03, 0x57, 0xf7, 0x48, 0x02, 0x29, 0x41, 0xc8, 0x63, 0x81, - 0x84, 0xd9, 0x7f, 0x2c, 0x90, 0x21, 0x5e, 0xaf, 0xec, 0x70, 0x20, 0x67, 0xe0, 0x66, 0x14, 0x08, - 0xf5, 0x44, 0x07, 0x38, 0xb4, 0xbb, 0xfb, 0xf8, 0xe0, 0x3e, 0xbc, 0x03, 0x92, 0x8c, 0xb7, 0x43, - 0x25, 0x36, 0x65, 0xfa, 0x1f, 0x03, 0xf2, 0xca, 0x58, 0x19, 0x81, 0x61, 0x93, 0x63, 0x58, 0x81, - 0xa7, 0x46, 0x65, 0x53, 0x3d, 0x74, 0x13, 0x9f, 0x82, 0x59, 0x8f, 0xba, 0xc2, 0xd3, 0x31, 0x9a, - 0x43, 0x0c, 0x59, 0x5e, 0x9d, 0x20, 0x25, 0x10, 0x2c, 0x73, 0x04, 0x32, 0xcc, 0x6b, 0x31, 0x7f, - 0x4b, 0xc0, 0x1e, 0x48, 0x09, 0x6a, 0x0c, 0x97, 0xa3, 0x3a, 0xc3, 0xac, 0x59, 0x5e, 0x9f, 0xd4, - 0x2b, 0x7c, 0xbb, 0x0a, 0xb7, 0xbb, 0x08, 0xe5, 0xa8, 0x5d, 0xec, 0x36, 0xaa, 0x06, 0x33, 0xf7, - 0x19, 0xc8, 0x06, 0xd8, 0xeb, 0x21, 0xac, 0x8f, 0xf0, 0x79, 0x04, 0xfd, 0x55, 0xd6, 0xb8, 0xed, - 0x65, 0x58, 0x18, 0x61, 0x5b, 0x88, 0x57, 0x19, 0x29, 0xbe, 0x07, 0x52, 0x82, 0xff, 0xc4, 0xe6, - 0x5e, 0x98, 0x01, 0xc7, 0xe6, 0xde, 0x10, 0x8d, 0x1a, 0xe7, 0xbd, 0xd7, 0x44, 0xdd, 0x1e, 0x7c, - 0x28, 0x01, 0x30, 0xe8, 0x04, 0x70, 0x63, 0x9c, 0xea, 0x60, 0xf3, 0x96, 0x37, 0x0f, 0x21, 0x29, - 0x70, 0xac, 0x72, 0x1c, 0x45, 0xb8, 0x14, 0x87, 0x83, 0xb7, 0x45, 0xf8, 0x85, 0x04, 0x32, 0x7d, - 0x4e, 0x01, 0xd7, 0xc7, 0xe9, 0x0f, 0x86, 0x63, 0x63, 0xb2, 0xa0, 0xc0, 0x71, 0x9a, 0xe3, 0x28, - 0xc0, 0xc5, 0x38, 0x1c, 0x3c, 0x1f, 0xee, 0xb1, 0xa2, 0xc4, 0xbb, 0xd0, 0x98, 0xa2, 0x14, 0xec, - 0x85, 0x63, 0x8a, 0x52, 0xa8, 0x37, 0x8e, 0x8b, 0x87, 0xdf, 0x33, 0xcb, 0x17, 0x9e, 0xbe, 0x2c, - 0x48, 0xcf, 0x5e, 0x16, 0xa4, 0x17, 0x2f, 0x0b, 0xd2, 0xe3, 0x57, 0x85, 0xa9, 0x67, 0xaf, 0x0a, - 0x53, 0x3f, 0xbd, 0x2a, 0x4c, 0x7d, 0x12, 0xec, 0xa1, 0xb8, 0xcb, 0x5a, 0xe8, 0x40, 0x4b, 0x8f, - 0xeb, 0xe1, 0x7d, 0xb4, 0x36, 0xcb, 0x29, 0xc8, 0xff, 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x01, - 0x7d, 0x10, 0x8e, 0x95, 0x14, 0x00, 0x00, + // 1566 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4d, 0x6f, 0x13, 0xc7, + 0x1b, 0xcf, 0xc6, 0x4e, 0xec, 0x8c, 0x13, 0xc8, 0x7f, 0x48, 0xfe, 0x38, 0xdb, 0xc4, 0x0e, 0x1b, + 0xf2, 0x06, 0x61, 0xb7, 0x71, 0x11, 0x52, 0xb9, 0x14, 0x62, 0x05, 0x4a, 0x81, 0x8a, 0x6e, 0xa3, + 0x1e, 0x2a, 0x55, 0xd6, 0x78, 0x3d, 0xac, 0xad, 0x78, 0x77, 0xcc, 0xce, 0xd8, 0x75, 0x78, 0xe9, + 0xa1, 0x6a, 0x29, 0x15, 0x52, 0x85, 0xd4, 0x7b, 0xc5, 0x37, 0xe8, 0xd7, 0xe0, 0x88, 0x54, 0x55, + 0xaa, 0x7a, 0xa0, 0x08, 0x7a, 0xe8, 0x27, 0xe8, 0xa1, 0xa7, 0x6a, 0x66, 0x67, 0xed, 0xb5, 0xd7, + 0x6b, 0x87, 0x8a, 0x4a, 0x48, 0x3d, 0x79, 0x5e, 0x9e, 0x79, 0x9e, 0xdf, 0xcc, 0xf3, 0xf6, 0x5b, + 0x83, 0x45, 0xcc, 0xaa, 0xd8, 0x73, 0x6a, 0x2e, 0x33, 0x70, 0xcb, 0x31, 0x5a, 0xdb, 0xc6, 0xad, + 0x26, 0xf6, 0x0e, 0xf4, 0x86, 0x47, 0x18, 0x81, 0xb3, 0x9d, 0x5d, 0x1d, 0xb7, 0x1c, 0xbd, 0xb5, + 0xad, 0x9e, 0xb2, 0x08, 0x75, 0x08, 0x35, 0xca, 0x88, 0x62, 0x5f, 0xd4, 0x68, 0x6d, 0x97, 0x31, + 0x43, 0xdb, 0x46, 0x03, 0xd9, 0x35, 0x17, 0xb1, 0x1a, 0x71, 0xfd, 0xd3, 0xea, 0x42, 0x44, 0x37, + 0x6b, 0xcb, 0x2d, 0x35, 0xb2, 0x55, 0x27, 0xb6, 0xdc, 0x5b, 0x8a, 0xec, 0x35, 0x90, 0x87, 0x1c, + 0x2a, 0xb7, 0x57, 0xa2, 0x5a, 0x3d, 0x64, 0xe1, 0x92, 0x45, 0xdc, 0x9b, 0xb5, 0x40, 0xc7, 0x9c, + 0x4d, 0x6c, 0x22, 0x86, 0x06, 0x1f, 0xc9, 0xd5, 0x45, 0x9b, 0x10, 0xbb, 0x8e, 0x0d, 0xd4, 0xa8, + 0x19, 0xc8, 0x75, 0x09, 0x13, 0x68, 0x03, 0xc5, 0x79, 0xb9, 0x2b, 0x66, 0xe5, 0xe6, 0x4d, 0x83, + 0xd5, 0x1c, 0x4c, 0x19, 0x72, 0x1a, 0xbe, 0x80, 0xf6, 0x2e, 0x38, 0xf6, 0x11, 0xbf, 0xf1, 0x45, + 0xcb, 0x22, 0x4d, 0x97, 0x99, 0xf8, 0x56, 0x13, 0x53, 0x06, 0xb3, 0x20, 0x85, 0x2a, 0x15, 0x0f, + 0x53, 0x9a, 0x55, 0x96, 0x95, 0x8d, 0x29, 0x33, 0x98, 0x9e, 0x4f, 0x3f, 0x78, 0x9c, 0x1f, 0xfb, + 0xe3, 0x71, 0x7e, 0x4c, 0xb3, 0xc0, 0x5c, 0xef, 0x51, 0xda, 0x20, 0x2e, 0xc5, 0xfc, 0x6c, 0x19, + 0xd5, 0x91, 0x6b, 0xe1, 0xe0, 0xac, 0x9c, 0xc2, 0xb7, 0xc0, 0x94, 0x45, 0x2a, 0xb8, 0x54, 0x45, + 0xb4, 0x9a, 0x1d, 0x17, 0x7b, 0x69, 0xbe, 0xf0, 0x3e, 0xa2, 0x55, 0x38, 0x07, 0x26, 0x5c, 0xc2, + 0x0f, 0x25, 0x96, 0x95, 0x8d, 0xa4, 0xe9, 0x4f, 0xb4, 0xf7, 0xc0, 0x82, 0x30, 0x52, 0x14, 0x2e, + 0xfa, 0x07, 0x28, 0xef, 0x2b, 0x40, 0x1d, 0xa4, 0x41, 0x82, 0x5d, 0x05, 0x47, 0x7c, 0xef, 0x97, + 0x7a, 0x35, 0xcd, 0xf8, 0xab, 0x17, 0xfd, 0x45, 0xa8, 0x82, 0x34, 0xe5, 0x46, 0x39, 0xbe, 0x71, + 0x81, 0xaf, 0x33, 0xe7, 0x2a, 0x90, 0xaf, 0xb5, 0xe4, 0x36, 0x9d, 0x32, 0xf6, 0xe4, 0x0d, 0x66, + 0xe4, 0xea, 0x87, 0x62, 0x51, 0xbb, 0x0a, 0x16, 0x05, 0x8e, 0x4f, 0x50, 0xbd, 0x56, 0x41, 0x8c, + 0x78, 0x7d, 0x97, 0x39, 0x01, 0xa6, 0x2d, 0xe2, 0xf6, 0xe3, 0xc8, 0xf0, 0xb5, 0x8b, 0x91, 0x5b, + 0x3d, 0x54, 0xc0, 0x52, 0x8c, 0x36, 0x79, 0xb1, 0x75, 0x70, 0x34, 0x40, 0xd5, 0xab, 0x31, 0x00, + 0xfb, 0x1a, 0xaf, 0x16, 0x04, 0xd1, 0x8e, 0xef, 0xe7, 0x57, 0x71, 0xcf, 0xdb, 0x32, 0x88, 0x3a, + 0x47, 0x47, 0x05, 0x91, 0x76, 0x55, 0x1a, 0xfb, 0x98, 0x11, 0x0f, 0xd9, 0xa3, 0x8d, 0xc1, 0x59, + 0x90, 0xd8, 0xc7, 0x07, 0x32, 0xde, 0xf8, 0x30, 0x64, 0x7e, 0x4b, 0x9a, 0xef, 0x28, 0x93, 0xe6, + 0xe7, 0xc0, 0x44, 0x0b, 0xd5, 0x9b, 0x81, 0x71, 0x7f, 0xa2, 0x9d, 0x03, 0xb3, 0x32, 0x94, 0x2a, + 0xaf, 0x74, 0xc9, 0x75, 0xf0, 0xbf, 0xd0, 0x39, 0x69, 0x02, 0x82, 0x24, 0x8f, 0x7d, 0x71, 0x6a, + 0xda, 0x14, 0x63, 0xed, 0x36, 0x80, 0x42, 0x70, 0xaf, 0x7d, 0x8d, 0xd8, 0x34, 0x30, 0x01, 0x41, + 0x52, 0x64, 0x8c, 0xaf, 0x5f, 0x8c, 0xe1, 0x25, 0x00, 0xba, 0xb5, 0x49, 0xdc, 0x2d, 0x53, 0x58, + 0xd3, 0xfd, 0xa0, 0xd5, 0x79, 0x21, 0xd3, 0xfd, 0x9a, 0x27, 0x0b, 0x99, 0x7e, 0xa3, 0xfb, 0x54, + 0x66, 0xe8, 0x64, 0x08, 0xe4, 0xb7, 0x8a, 0x7c, 0xd8, 0xc0, 0xb8, 0xc4, 0xb9, 0x09, 0x92, 0x75, + 0x62, 0xf3, 0xdb, 0x25, 0x36, 0x32, 0x85, 0x79, 0xbd, 0xbf, 0x7c, 0xea, 0xd7, 0x88, 0x6d, 0x0a, + 0x11, 0x78, 0x79, 0x00, 0xa8, 0xf5, 0x91, 0xa0, 0x7c, 0x3b, 0x61, 0x54, 0xda, 0x9c, 0x7c, 0x87, + 0x1b, 0xa2, 0x48, 0x4a, 0xdc, 0xda, 0x75, 0x09, 0x30, 0x58, 0x95, 0x00, 0xcf, 0x81, 0x49, 0xbf, + 0x98, 0x8a, 0x07, 0xca, 0x14, 0xb2, 0x51, 0x88, 0xfe, 0x89, 0x9d, 0xe4, 0x93, 0x67, 0xf9, 0x31, + 0x53, 0x4a, 0x6b, 0x3f, 0x2b, 0xe0, 0xc8, 0x2e, 0xab, 0x16, 0x51, 0xbd, 0x1e, 0x7a, 0x69, 0xe4, + 0xd9, 0x34, 0xf0, 0x09, 0x1f, 0xc3, 0xe3, 0x20, 0x65, 0x23, 0x5a, 0xb2, 0x50, 0x43, 0xa6, 0xc7, + 0xa4, 0x8d, 0x68, 0x11, 0x35, 0xe0, 0x67, 0x60, 0xb6, 0xe1, 0x91, 0x06, 0xa1, 0xd8, 0xeb, 0xa4, + 0x18, 0x4f, 0x8f, 0xe9, 0x9d, 0xc2, 0x5f, 0xcf, 0xf2, 0xba, 0x5d, 0x63, 0xd5, 0x66, 0x59, 0xb7, + 0x88, 0x63, 0xc8, 0xfe, 0xe2, 0xff, 0x9c, 0xa1, 0x95, 0x7d, 0x83, 0x1d, 0x34, 0x30, 0xd5, 0x8b, + 0xdd, 0xdc, 0x36, 0x8f, 0x06, 0xba, 0x82, 0xbc, 0x5c, 0x00, 0x69, 0xab, 0x8a, 0x6a, 0x6e, 0xa9, + 0x56, 0xc9, 0x26, 0x97, 0x95, 0x8d, 0x84, 0x99, 0x12, 0xf3, 0x2b, 0x15, 0xb8, 0x08, 0xa6, 0x48, + 0x0b, 0x7b, 0x5e, 0xad, 0x82, 0x69, 0x76, 0x42, 0x60, 0xed, 0x2e, 0x68, 0x7b, 0xe0, 0xd8, 0x2e, + 0x65, 0x35, 0x07, 0x31, 0x7c, 0x19, 0x75, 0x9f, 0x69, 0x16, 0x24, 0x6c, 0xe4, 0x5f, 0x2d, 0x69, + 0xf2, 0x21, 0x5f, 0xf1, 0x30, 0x13, 0xb7, 0x9a, 0x36, 0xf9, 0x90, 0xdb, 0x6c, 0x39, 0x25, 0xec, + 0x79, 0xc4, 0xcf, 0xf4, 0x29, 0x33, 0xd5, 0x72, 0x76, 0xf9, 0x54, 0x7b, 0x9e, 0x08, 0xc2, 0x83, + 0x77, 0xa6, 0xbd, 0x76, 0xf0, 0x64, 0xdb, 0x20, 0xe1, 0x50, 0x5b, 0x3e, 0x7d, 0x3e, 0xfa, 0xf4, + 0xd7, 0xa9, 0xbd, 0xcb, 0xd7, 0x70, 0xd3, 0xd9, 0x6b, 0x9b, 0x5c, 0x16, 0x5e, 0x00, 0xd3, 0xe1, + 0xf6, 0x26, 0x2c, 0x65, 0x0a, 0x4b, 0xd1, 0xb3, 0xc2, 0x54, 0x51, 0x08, 0x99, 0x19, 0xd6, 0x9d, + 0xc0, 0x22, 0x98, 0x6e, 0x78, 0xb8, 0x82, 0x2d, 0x4c, 0x29, 0xf1, 0x68, 0x36, 0x29, 0x62, 0x73, + 0xa4, 0xf5, 0x9e, 0x43, 0xbc, 0xe0, 0x96, 0xeb, 0xc4, 0xda, 0x0f, 0x4a, 0xdb, 0x84, 0x78, 0xe4, + 0x8c, 0x58, 0xf3, 0x0b, 0x1b, 0x5c, 0x02, 0xc0, 0x17, 0x11, 0xf9, 0x37, 0x29, 0x5e, 0x64, 0x4a, + 0xac, 0x88, 0x96, 0x55, 0x0c, 0xb6, 0x79, 0x57, 0xcd, 0xa6, 0xc4, 0x35, 0x54, 0xdd, 0x6f, 0xb9, + 0x7a, 0xd0, 0x72, 0xf5, 0xbd, 0xa0, 0xe5, 0xee, 0xa4, 0x79, 0xfc, 0x3d, 0xfa, 0x2d, 0xaf, 0x48, + 0x25, 0x7c, 0x67, 0x60, 0x18, 0xa5, 0xff, 0x9d, 0x30, 0x9a, 0xea, 0x09, 0xa3, 0x0f, 0x92, 0xe9, + 0xf1, 0xd9, 0x84, 0x99, 0x66, 0xed, 0x52, 0xcd, 0xad, 0xe0, 0xb6, 0x76, 0x4a, 0x16, 0xc3, 0x8e, + 0x87, 0xbb, 0x95, 0xaa, 0x82, 0x18, 0x0a, 0xb2, 0x82, 0x8f, 0xb5, 0x6f, 0x12, 0x60, 0xbe, 0x2b, + 0xfc, 0xa6, 0xe6, 0x50, 0x7f, 0xa4, 0x25, 0x5f, 0x39, 0xd2, 0xde, 0x90, 0x20, 0x09, 0x7b, 0x31, + 0xdd, 0xe3, 0x45, 0x6d, 0x0b, 0xfc, 0xbf, 0xdf, 0x11, 0x43, 0xfc, 0xf6, 0x5d, 0x22, 0x2c, 0xbe, + 0xc3, 0x0d, 0x84, 0x32, 0x99, 0xb5, 0x83, 0x3a, 0x3f, 0x3a, 0x93, 0x59, 0x9b, 0xbe, 0x86, 0x4c, + 0xfe, 0xaf, 0x27, 0xa1, 0x76, 0x06, 0x1c, 0x8f, 0xf8, 0x63, 0x88, 0xff, 0xe6, 0x3b, 0x54, 0x8b, + 0xe2, 0x4b, 0x38, 0x68, 0xe9, 0xda, 0xb5, 0x0e, 0x8d, 0x92, 0xcb, 0x52, 0xc5, 0x59, 0x90, 0xe6, + 0x7d, 0xb7, 0x74, 0x13, 0x4b, 0x2a, 0xb3, 0xb3, 0xf0, 0xeb, 0xb3, 0xfc, 0xbc, 0x8f, 0x9e, 0x56, + 0xf6, 0xf5, 0x1a, 0x31, 0x1c, 0xc4, 0xaa, 0xfa, 0x15, 0x97, 0x71, 0x8a, 0x25, 0x4e, 0x17, 0xfe, + 0x9c, 0x01, 0x13, 0x42, 0x1d, 0xfc, 0x5a, 0x01, 0x29, 0xc9, 0x2c, 0xe1, 0x6a, 0xd4, 0xad, 0x03, + 0x3e, 0x1d, 0xd4, 0xb5, 0x51, 0x62, 0x3e, 0x34, 0xed, 0xf4, 0x97, 0x3f, 0xfd, 0xfe, 0xfd, 0xf8, + 0x2a, 0x5c, 0x31, 0x22, 0x1f, 0x3f, 0x92, 0x5d, 0x1a, 0x77, 0xa4, 0x2b, 0xee, 0xc1, 0x1f, 0x14, + 0x30, 0xd3, 0x43, 0xe0, 0xe1, 0xe9, 0x18, 0x33, 0x83, 0x3e, 0x14, 0xd4, 0xad, 0xc3, 0x09, 0x4b, + 0x64, 0x05, 0x81, 0x6c, 0x0b, 0x9e, 0x8a, 0x22, 0x0b, 0xbe, 0x15, 0x22, 0x00, 0x7f, 0x54, 0xc0, + 0x6c, 0x3f, 0x17, 0x87, 0x7a, 0x8c, 0xd9, 0x98, 0x4f, 0x00, 0xd5, 0x38, 0xb4, 0xbc, 0x44, 0x7a, + 0x5e, 0x20, 0x3d, 0x0b, 0x0b, 0x51, 0xa4, 0xad, 0xe0, 0x4c, 0x17, 0x6c, 0xf8, 0xf3, 0xe2, 0x1e, + 0xbc, 0xaf, 0x80, 0x94, 0x64, 0xdd, 0xb1, 0xae, 0xed, 0x25, 0xf4, 0xb1, 0xae, 0xed, 0x23, 0xef, + 0xda, 0x96, 0x80, 0xb5, 0x06, 0x4f, 0x46, 0x61, 0x49, 0x16, 0x4f, 0x43, 0x4f, 0xf7, 0x50, 0x01, + 0x29, 0xc9, 0xbf, 0x63, 0x81, 0xf4, 0x92, 0xfd, 0x58, 0x20, 0x7d, 0x34, 0x5e, 0xdb, 0x16, 0x40, + 0x4e, 0xc3, 0xcd, 0x28, 0x10, 0xea, 0x8b, 0x76, 0x71, 0x18, 0x77, 0xf6, 0xf1, 0xc1, 0x3d, 0x78, + 0x1b, 0x24, 0x39, 0x4d, 0x87, 0x5a, 0x6c, 0xc8, 0x74, 0xb8, 0xbf, 0xba, 0x32, 0x54, 0x46, 0x62, + 0xd8, 0x14, 0x18, 0x56, 0xe0, 0x89, 0x41, 0xd1, 0x54, 0xe9, 0x79, 0x89, 0xcf, 0xc1, 0xa4, 0xcf, + 0x54, 0xe1, 0xc9, 0x18, 0xcd, 0x3d, 0x84, 0x58, 0x5d, 0x1d, 0x21, 0x25, 0x11, 0x2c, 0x0b, 0x04, + 0x2a, 0xcc, 0x1a, 0x31, 0xff, 0x42, 0xc0, 0x36, 0x48, 0x49, 0x26, 0x0c, 0x97, 0xa3, 0x3a, 0x7b, + 0x49, 0xb2, 0xba, 0x3e, 0xaa, 0x35, 0x04, 0x76, 0x35, 0x61, 0x77, 0x11, 0xaa, 0x51, 0xbb, 0x98, + 0x55, 0x4b, 0x16, 0x37, 0xf7, 0x05, 0xc8, 0x84, 0xc8, 0xea, 0x21, 0xac, 0x0f, 0xb8, 0xf3, 0x00, + 0xb6, 0xab, 0xad, 0x09, 0xdb, 0xcb, 0x30, 0x37, 0xc0, 0xb6, 0x14, 0x2f, 0x71, 0x0e, 0x7c, 0x17, + 0xa4, 0x24, 0xdd, 0x89, 0x8d, 0xbd, 0x5e, 0xc2, 0x1b, 0x1b, 0x7b, 0x7d, 0xac, 0x69, 0xd8, 0xed, + 0xfd, 0x9e, 0xc9, 0xda, 0xf0, 0x81, 0x02, 0x40, 0xb7, 0xf0, 0xc3, 0x8d, 0x61, 0xaa, 0xc3, 0xbd, + 0x5a, 0xdd, 0x3c, 0x84, 0xa4, 0xc4, 0xb1, 0x2a, 0x70, 0xe4, 0xe1, 0x52, 0x1c, 0x0e, 0xd1, 0x05, + 0xe1, 0x57, 0x0a, 0x98, 0xea, 0x50, 0x08, 0xb8, 0x3e, 0x4c, 0x7f, 0xd8, 0x1d, 0x1b, 0xa3, 0x05, + 0x25, 0x8e, 0x93, 0x02, 0x47, 0x0e, 0x2e, 0xc6, 0xe1, 0x10, 0xf1, 0x70, 0x97, 0x17, 0x25, 0xd1, + 0x85, 0x86, 0x14, 0xa5, 0x70, 0xeb, 0x1b, 0x52, 0x94, 0x7a, 0x5a, 0xe1, 0x30, 0x7f, 0x04, 0x2d, + 0x72, 0xe7, 0xc2, 0x93, 0x17, 0x39, 0xe5, 0xe9, 0x8b, 0x9c, 0xf2, 0xfc, 0x45, 0x4e, 0x79, 0xf4, + 0x32, 0x37, 0xf6, 0xf4, 0x65, 0x6e, 0xec, 0x97, 0x97, 0xb9, 0xb1, 0x4f, 0xd7, 0x42, 0x14, 0x00, + 0xb7, 0x38, 0x03, 0xe8, 0x6a, 0x69, 0x0b, 0x3d, 0x82, 0x06, 0x94, 0x27, 0x05, 0xe3, 0x78, 0xe7, + 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x0f, 0xce, 0x6b, 0x84, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -6685,7 +6686,7 @@ func (m *QueryBaseFeeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.BaseFee = &v if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/evm/types/tx.pb.go b/x/evm/types/tx.pb.go index 4ae36eceea..5a7e977ec7 100644 --- a/x/evm/types/tx.pb.go +++ b/x/evm/types/tx.pb.go @@ -5,11 +5,11 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" encoding_binary "encoding/binary" fmt "fmt" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -89,13 +89,13 @@ type LegacyTx struct { // nonce corresponds to the account nonce (transaction sequence). Nonce uint64 `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"` // gas_price defines the value for each gas unit - GasPrice *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_price,omitempty"` + GasPrice *cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=gas_price,json=gasPrice,proto3,customtype=cosmossdk.io/math.Int" json:"gas_price,omitempty"` // gas defines the gas limit defined for the transaction. GasLimit uint64 `protobuf:"varint,3,opt,name=gas,proto3" json:"gas,omitempty"` // to is the hex formatted address of the recipient To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` // value defines the unsigned integer value of the transaction amount. - Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"` + Amount *cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` // data is the data payload bytes of the transaction. Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` // v defines the signature value @@ -142,17 +142,17 @@ var xxx_messageInfo_LegacyTx proto.InternalMessageInfo // AccessListTx is the data of EIP-2930 access list transactions. type AccessListTx struct { // chain_id of the destination EVM chain - ChainID *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"` + ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` // nonce corresponds to the account nonce (transaction sequence). Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` // gas_price defines the value for each gas unit - GasPrice *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_price,omitempty"` + GasPrice *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice,proto3,customtype=cosmossdk.io/math.Int" json:"gas_price,omitempty"` // gas defines the gas limit defined for the transaction. GasLimit uint64 `protobuf:"varint,4,opt,name=gas,proto3" json:"gas,omitempty"` // to is the recipient address in hex format To string `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"` // value defines the unsigned integer value of the transaction amount. - Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"` + Amount *cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` // data is the data payload bytes of the transaction. Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` // accesses is an array of access tuples @@ -201,19 +201,19 @@ var xxx_messageInfo_AccessListTx proto.InternalMessageInfo // DynamicFeeTx is the data of EIP-1559 dinamic fee transactions. type DynamicFeeTx struct { // chain_id of the destination EVM chain - ChainID *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"` + ChainID *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=cosmossdk.io/math.Int" json:"chainID"` // nonce corresponds to the account nonce (transaction sequence). Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` // gas_tip_cap defines the max value for the gas tip - GasTipCap *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=gas_tip_cap,json=gasTipCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_tip_cap,omitempty"` + GasTipCap *cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=gas_tip_cap,json=gasTipCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_tip_cap,omitempty"` // gas_fee_cap defines the max value for the gas fee - GasFeeCap *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=gas_fee_cap,json=gasFeeCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"gas_fee_cap,omitempty"` + GasFeeCap *cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=gas_fee_cap,json=gasFeeCap,proto3,customtype=cosmossdk.io/math.Int" json:"gas_fee_cap,omitempty"` // gas defines the gas limit defined for the transaction. GasLimit uint64 `protobuf:"varint,5,opt,name=gas,proto3" json:"gas,omitempty"` // to is the hex formatted address of the recipient To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"` // value defines the the transaction amount. - Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"` + Amount *cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=cosmossdk.io/math.Int" json:"value,omitempty"` // data is the data payload bytes of the transaction. Data []byte `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"` // accesses is an array of access tuples @@ -457,72 +457,72 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } var fileDescriptor_f75ac0a12d075f21 = []byte{ - // 1035 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x8f, 0xdb, 0x44, - 0x14, 0x8e, 0x13, 0xe7, 0x87, 0x27, 0x61, 0x5b, 0x8d, 0xb6, 0xaa, 0x13, 0xb1, 0x71, 0x08, 0x02, - 0xd2, 0xa2, 0xd8, 0xea, 0x82, 0x7a, 0xd8, 0x53, 0x37, 0xed, 0x6e, 0x69, 0xb5, 0x2b, 0x2a, 0x93, - 0x5e, 0x28, 0x52, 0x34, 0x6b, 0xcf, 0x3a, 0x56, 0x63, 0x8f, 0xe5, 0x99, 0x58, 0x09, 0x12, 0x97, - 0x9e, 0x38, 0x82, 0xf8, 0x07, 0x38, 0x73, 0x42, 0xa2, 0x47, 0x0e, 0x48, 0x5c, 0x2a, 0x4e, 0x15, - 0x5c, 0x10, 0x87, 0x80, 0xb2, 0x48, 0x48, 0x7b, 0x83, 0xbf, 0x00, 0xcd, 0x8c, 0xb3, 0xd9, 0xd4, - 0x6c, 0x0b, 0xa5, 0x88, 0x53, 0xe6, 0xcd, 0xfb, 0xfc, 0xe6, 0xcd, 0xfb, 0xbe, 0x37, 0x2f, 0xa0, - 0x8e, 0xd9, 0x10, 0xc7, 0x81, 0x1f, 0x32, 0x0b, 0x27, 0x81, 0x95, 0x5c, 0xb1, 0xd8, 0xc4, 0x8c, - 0x62, 0xc2, 0x08, 0x3c, 0x7f, 0xe2, 0x32, 0x71, 0x12, 0x98, 0xc9, 0x95, 0xc6, 0x45, 0x87, 0xd0, - 0x80, 0x50, 0x2b, 0xa0, 0x1e, 0x47, 0x06, 0xd4, 0x93, 0xd0, 0x46, 0x5d, 0x3a, 0x06, 0xc2, 0xb2, - 0xa4, 0x91, 0xba, 0xd6, 0x3d, 0xe2, 0x11, 0xb9, 0xcf, 0x57, 0xe9, 0xee, 0xcb, 0x1e, 0x21, 0xde, - 0x08, 0x5b, 0x28, 0xf2, 0x2d, 0x14, 0x86, 0x84, 0x21, 0xe6, 0x93, 0x70, 0xf1, 0x4d, 0x3d, 0xf5, - 0x0a, 0xeb, 0x60, 0x7c, 0x68, 0xa1, 0x70, 0x9a, 0xba, 0x5e, 0xcd, 0xe4, 0x8b, 0x1c, 0x07, 0x53, - 0x3a, 0x60, 0xe3, 0x68, 0x84, 0x53, 0x50, 0x23, 0x03, 0x1a, 0x91, 0x45, 0xaa, 0x1b, 0x19, 0x5f, - 0x84, 0x62, 0x14, 0xa4, 0x47, 0xb7, 0xbf, 0x56, 0xc0, 0x4b, 0xfb, 0xd4, 0xdb, 0xe1, 0x20, 0x3c, - 0x0e, 0xfa, 0x13, 0xd8, 0x01, 0xaa, 0x8b, 0x18, 0xd2, 0x95, 0x96, 0xd2, 0xa9, 0x6e, 0xae, 0x9b, - 0x32, 0x37, 0x73, 0x91, 0x9b, 0xb9, 0x1d, 0x4e, 0x6d, 0x81, 0x80, 0x75, 0xa0, 0x52, 0xff, 0x43, - 0xac, 0xe7, 0x5b, 0x4a, 0x47, 0xe9, 0x15, 0x8f, 0x67, 0x86, 0xd2, 0xb5, 0xc5, 0x16, 0x34, 0x80, - 0x3a, 0x44, 0x74, 0xa8, 0x17, 0x5a, 0x4a, 0x47, 0xeb, 0x55, 0xff, 0x98, 0x19, 0xe5, 0x78, 0x14, - 0x6d, 0xb5, 0xbb, 0x6d, 0x5b, 0x38, 0xe0, 0x9b, 0xe0, 0x9c, 0x8b, 0xa3, 0x18, 0x3b, 0x88, 0x61, - 0x77, 0x70, 0x18, 0x93, 0x40, 0x57, 0x05, 0x36, 0xaf, 0x2b, 0xf6, 0xda, 0xd2, 0xb5, 0x1b, 0x93, - 0x00, 0x42, 0xa0, 0x0a, 0x44, 0xb1, 0xa5, 0x74, 0x6a, 0xb6, 0x58, 0x6f, 0xa9, 0x1f, 0x7f, 0x6e, - 0xe4, 0xda, 0x5f, 0xe5, 0x41, 0x65, 0x0f, 0x7b, 0xc8, 0x99, 0xf6, 0x27, 0x70, 0x1d, 0x14, 0x43, - 0x12, 0x3a, 0x58, 0xa4, 0xae, 0xda, 0xd2, 0x80, 0x37, 0x81, 0xe6, 0x21, 0x4e, 0x95, 0xef, 0xc8, - 0x54, 0xb5, 0xde, 0xe5, 0x9f, 0x66, 0xc6, 0xeb, 0x9e, 0xcf, 0x86, 0xe3, 0x03, 0xd3, 0x21, 0x41, - 0x4a, 0x60, 0xfa, 0xd3, 0xa5, 0xee, 0x7d, 0x8b, 0x4d, 0x23, 0x4c, 0xcd, 0x5b, 0x21, 0xb3, 0x2b, - 0x1e, 0xa2, 0x77, 0xf8, 0xb7, 0xb0, 0x09, 0x0a, 0x1e, 0xa2, 0xe2, 0x4a, 0x6a, 0xaf, 0x36, 0x9f, - 0x19, 0x95, 0x9b, 0x88, 0xee, 0xf9, 0x81, 0xcf, 0x6c, 0xee, 0x80, 0x6b, 0x20, 0xcf, 0x88, 0xbc, - 0x85, 0x9d, 0x67, 0x04, 0xde, 0x06, 0xc5, 0x04, 0x8d, 0xc6, 0x58, 0xa4, 0xad, 0xf5, 0xde, 0xfe, - 0xfb, 0x87, 0xce, 0x67, 0x46, 0x69, 0x3b, 0x20, 0xe3, 0x90, 0xd9, 0x32, 0x04, 0xaf, 0x80, 0x20, - 0xa5, 0x24, 0x2b, 0x20, 0xca, 0x5f, 0x03, 0x4a, 0xa2, 0x97, 0xc5, 0x86, 0x92, 0x70, 0x2b, 0xd6, - 0x2b, 0xd2, 0x8a, 0xb9, 0x45, 0x75, 0x4d, 0x5a, 0x74, 0x6b, 0x8d, 0xd7, 0xea, 0xbb, 0x87, 0xdd, - 0x52, 0x7f, 0x72, 0x03, 0x31, 0xd4, 0xfe, 0xbd, 0x00, 0x6a, 0xdb, 0x42, 0x46, 0x7b, 0x3e, 0x65, - 0xfd, 0x09, 0xbc, 0x07, 0x2a, 0xce, 0x10, 0xf9, 0xe1, 0xc0, 0x77, 0x45, 0xf1, 0xb4, 0xde, 0xb5, - 0x7f, 0x94, 0x6d, 0xf9, 0x3a, 0xff, 0xfa, 0xd6, 0x8d, 0xe3, 0x99, 0x51, 0x76, 0xe4, 0xd2, 0x4e, - 0x17, 0xee, 0x92, 0x96, 0xfc, 0x99, 0xb4, 0x14, 0xfe, 0x3d, 0x2d, 0xea, 0xd3, 0x69, 0x29, 0x66, - 0x69, 0x29, 0xbd, 0x38, 0x5a, 0xca, 0xa7, 0x68, 0xb9, 0x07, 0x2a, 0xb2, 0x45, 0x31, 0xd5, 0x2b, - 0xad, 0x42, 0xa7, 0xba, 0xb9, 0x61, 0x3e, 0xf9, 0xb2, 0x98, 0xb2, 0xfa, 0x7d, 0xde, 0xc3, 0xbd, - 0xd6, 0xa3, 0x99, 0x91, 0x3b, 0x9e, 0x19, 0x00, 0x9d, 0x50, 0xf2, 0xc5, 0xcf, 0x06, 0x58, 0x12, - 0x64, 0x9f, 0x04, 0x94, 0x9c, 0x6b, 0x2b, 0x9c, 0x83, 0x15, 0xce, 0xab, 0x67, 0x71, 0xfe, 0x8d, - 0x0a, 0x6a, 0x37, 0xa6, 0x21, 0x0a, 0x7c, 0x67, 0x17, 0xe3, 0xff, 0x87, 0xf3, 0xdb, 0xa0, 0xca, - 0x39, 0x67, 0x7e, 0x34, 0x70, 0x50, 0xf4, 0x1c, 0xac, 0x73, 0xc9, 0xf4, 0xfd, 0xe8, 0x3a, 0x8a, - 0x16, 0xb1, 0x0e, 0x31, 0x16, 0xb1, 0xd4, 0xe7, 0x8a, 0xb5, 0x8b, 0x31, 0x8f, 0x95, 0x4a, 0xa8, - 0xf8, 0x74, 0x09, 0x95, 0xb2, 0x12, 0x2a, 0xbf, 0x38, 0x09, 0x55, 0xce, 0x90, 0x90, 0xf6, 0x9f, - 0x48, 0x08, 0xac, 0x48, 0xa8, 0xba, 0x22, 0xa1, 0xda, 0x59, 0x12, 0x6a, 0x83, 0xc6, 0xce, 0x84, - 0xe1, 0x90, 0xfa, 0x24, 0x7c, 0x37, 0x12, 0x03, 0x6c, 0x39, 0x37, 0xd2, 0x07, 0xf9, 0x5b, 0x05, - 0x5c, 0x58, 0x99, 0x27, 0x36, 0xa6, 0x11, 0x09, 0xa9, 0xb8, 0xa8, 0x18, 0x09, 0x42, 0x6b, 0xe9, - 0x14, 0xb8, 0x04, 0xd4, 0x11, 0xf1, 0xa8, 0x9e, 0x17, 0x97, 0xbc, 0x90, 0xbd, 0xe4, 0x1e, 0xf1, - 0x6c, 0x01, 0x81, 0xe7, 0x41, 0x21, 0xc6, 0x4c, 0x68, 0xa6, 0x66, 0xf3, 0x25, 0xac, 0x83, 0x4a, - 0x12, 0x0c, 0x70, 0x1c, 0x93, 0x38, 0x7d, 0x75, 0xcb, 0x49, 0xb0, 0xc3, 0x4d, 0xee, 0xe2, 0xe2, - 0x18, 0x53, 0xec, 0x4a, 0x56, 0xed, 0xb2, 0x87, 0xe8, 0x5d, 0x8a, 0x5d, 0xb8, 0x01, 0xc0, 0xc1, - 0x88, 0x38, 0xf7, 0x07, 0x22, 0x19, 0xf9, 0x9e, 0x6a, 0x62, 0xe7, 0x1d, 0x44, 0x87, 0xe9, 0x2d, - 0x3e, 0x55, 0xc0, 0xb9, 0x7d, 0xea, 0xdd, 0x8d, 0x5c, 0xc4, 0xf0, 0x1d, 0x31, 0x2f, 0xe1, 0x55, - 0xa0, 0xa1, 0x31, 0x1b, 0x92, 0xd8, 0x67, 0xd3, 0xb4, 0x61, 0xf4, 0xef, 0x1f, 0x76, 0xd7, 0xd3, - 0xe9, 0xbf, 0xed, 0xba, 0x31, 0xa6, 0xf4, 0x3d, 0x16, 0xfb, 0xa1, 0x67, 0x2f, 0xa1, 0xf0, 0x2a, - 0x28, 0xc9, 0x89, 0x2b, 0x7a, 0xa1, 0xba, 0xa9, 0x67, 0x6f, 0x29, 0x4f, 0xe8, 0xa9, 0x9c, 0x45, - 0x3b, 0x45, 0x6f, 0xad, 0x3d, 0xf8, 0xed, 0xcb, 0xcb, 0xcb, 0x38, 0xed, 0x3a, 0xb8, 0xf8, 0x44, - 0x4a, 0x8b, 0xd2, 0x6e, 0xce, 0x15, 0x50, 0xd8, 0xa7, 0x1e, 0xfc, 0x08, 0x80, 0x53, 0x83, 0xdc, - 0xc8, 0x1e, 0xb4, 0xc2, 0x4c, 0xe3, 0x8d, 0x67, 0x00, 0x16, 0xf1, 0xdb, 0xaf, 0x3d, 0xf8, 0xe1, - 0xd7, 0xcf, 0xf2, 0x46, 0x7b, 0xc3, 0xca, 0xfc, 0x99, 0xc0, 0x29, 0x7a, 0xc0, 0x26, 0xf0, 0x03, - 0x50, 0x5b, 0xa9, 0xd8, 0x2b, 0x7f, 0x19, 0xff, 0x34, 0xa4, 0x71, 0xe9, 0x99, 0x90, 0x45, 0x12, - 0xbd, 0x6b, 0x8f, 0xe6, 0x4d, 0xe5, 0xf1, 0xbc, 0xa9, 0xfc, 0x32, 0x6f, 0x2a, 0x9f, 0x1c, 0x35, - 0x73, 0x8f, 0x8f, 0x9a, 0xb9, 0x1f, 0x8f, 0x9a, 0xb9, 0xf7, 0x4f, 0xf7, 0x1e, 0x4e, 0x78, 0xeb, - 0x2d, 0xd3, 0x9c, 0x88, 0x44, 0x45, 0xff, 0x1d, 0x94, 0xc4, 0x7f, 0x98, 0xb7, 0xfe, 0x0c, 0x00, - 0x00, 0xff, 0xff, 0x96, 0x99, 0xa8, 0xe1, 0x04, 0x0a, 0x00, 0x00, + // 1032 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xda, 0xeb, 0x5f, 0xcf, 0x26, 0xad, 0x56, 0x89, 0xba, 0xb6, 0x88, 0xd7, 0xb8, 0x02, + 0xdc, 0xa2, 0xec, 0xaa, 0x41, 0xaa, 0xd4, 0x9c, 0x88, 0x9b, 0x04, 0x8a, 0x12, 0x51, 0x2d, 0xee, + 0x05, 0x90, 0xac, 0xc9, 0xee, 0x64, 0xbd, 0xaa, 0x77, 0x67, 0xb5, 0x33, 0xb6, 0x6c, 0x24, 0x24, + 0xd4, 0x13, 0x47, 0x10, 0xff, 0x00, 0x67, 0x4e, 0x3d, 0xf4, 0x88, 0xb8, 0x70, 0xa9, 0x38, 0x55, + 0x70, 0x41, 0x1c, 0x0c, 0x72, 0x90, 0x2a, 0x72, 0xe4, 0xcc, 0x01, 0xcd, 0xcc, 0x3a, 0x8e, 0x6b, + 0x9c, 0x40, 0x24, 0xb8, 0xcd, 0x9b, 0xf7, 0xcd, 0xcc, 0xf7, 0xbe, 0x6f, 0xf6, 0xcd, 0x42, 0x05, + 0xb3, 0x2e, 0x8e, 0x03, 0x3f, 0x64, 0x16, 0x1e, 0x04, 0xd6, 0xe0, 0x96, 0xc5, 0x86, 0x66, 0x14, + 0x13, 0x46, 0xb4, 0xab, 0xa7, 0x29, 0x13, 0x0f, 0x02, 0x73, 0x70, 0xab, 0x7a, 0xcd, 0x21, 0x34, + 0x20, 0xd4, 0x0a, 0xa8, 0xc7, 0x91, 0x01, 0xf5, 0x24, 0xb4, 0x5a, 0x91, 0x89, 0x8e, 0x88, 0x2c, + 0x19, 0x24, 0xa9, 0x55, 0x8f, 0x78, 0x44, 0xce, 0xf3, 0x51, 0x32, 0xfb, 0xb2, 0x47, 0x88, 0xd7, + 0xc3, 0x16, 0x8a, 0x7c, 0x0b, 0x85, 0x21, 0x61, 0x88, 0xf9, 0x24, 0x9c, 0xae, 0xa9, 0x24, 0x59, + 0x11, 0x1d, 0xf6, 0x8f, 0x2c, 0x14, 0x8e, 0x92, 0xd4, 0xf5, 0x05, 0xbe, 0xc8, 0x71, 0x30, 0xa5, + 0x1d, 0xd6, 0x8f, 0x7a, 0x38, 0x01, 0x55, 0x17, 0x40, 0x3d, 0x32, 0xa5, 0xba, 0xbe, 0x90, 0x8b, + 0x50, 0x8c, 0x82, 0xe4, 0xe8, 0xc6, 0x37, 0x0a, 0xbc, 0x74, 0x40, 0xbd, 0x5d, 0x0e, 0xc2, 0xfd, + 0xa0, 0x3d, 0xd4, 0x9a, 0xa0, 0xba, 0x88, 0x21, 0x5d, 0xa9, 0x2b, 0xcd, 0xd2, 0xe6, 0xaa, 0x29, + 0xb9, 0x99, 0x53, 0x6e, 0xe6, 0x76, 0x38, 0xb2, 0x05, 0x42, 0xab, 0x80, 0x4a, 0xfd, 0x8f, 0xb1, + 0x9e, 0xae, 0x2b, 0x4d, 0xa5, 0x95, 0x3d, 0x19, 0x1b, 0xca, 0x86, 0x2d, 0xa6, 0x34, 0x03, 0xd4, + 0x2e, 0xa2, 0x5d, 0x3d, 0x53, 0x57, 0x9a, 0xc5, 0x56, 0xe9, 0x8f, 0xb1, 0x91, 0x8f, 0x7b, 0xd1, + 0x56, 0x63, 0xa3, 0x61, 0x8b, 0x84, 0xf6, 0x06, 0x5c, 0x71, 0x71, 0x14, 0x63, 0x07, 0x31, 0xec, + 0x76, 0x8e, 0x62, 0x12, 0xe8, 0xaa, 0xc0, 0xa6, 0x75, 0xc5, 0x5e, 0x99, 0xa5, 0xf6, 0x62, 0x12, + 0x68, 0x1a, 0xa8, 0x02, 0x91, 0xad, 0x2b, 0xcd, 0xb2, 0x2d, 0xc6, 0x5b, 0xea, 0x67, 0x5f, 0x19, + 0xa9, 0xc6, 0x17, 0x69, 0x28, 0xec, 0x63, 0x0f, 0x39, 0xa3, 0xf6, 0x50, 0x5b, 0x85, 0x6c, 0x48, + 0x42, 0x07, 0x0b, 0xea, 0xaa, 0x2d, 0x03, 0xed, 0x36, 0x14, 0x3d, 0xc4, 0xad, 0xf2, 0x1d, 0x49, + 0xb5, 0xd8, 0xaa, 0xfc, 0x3c, 0x36, 0xd6, 0xa4, 0x6b, 0xd4, 0x7d, 0x68, 0xfa, 0xc4, 0x0a, 0x10, + 0xeb, 0x9a, 0xf7, 0x42, 0x66, 0x17, 0x3c, 0x44, 0xef, 0x73, 0xa8, 0x56, 0x83, 0x8c, 0x87, 0xa8, + 0xa8, 0x40, 0x6d, 0x95, 0x27, 0x63, 0xa3, 0xf0, 0x36, 0xa2, 0xfb, 0x7e, 0xe0, 0x33, 0x9b, 0x27, + 0xb4, 0x15, 0x48, 0x33, 0x22, 0x49, 0xdb, 0x69, 0x46, 0xb4, 0x3b, 0x90, 0x1d, 0xa0, 0x5e, 0x1f, + 0x0b, 0x96, 0xc5, 0xd6, 0xf5, 0xa5, 0x67, 0x4c, 0xc6, 0x46, 0x6e, 0x3b, 0x20, 0xfd, 0x90, 0xd9, + 0x72, 0x05, 0xaf, 0x4f, 0x48, 0x9e, 0x93, 0xf5, 0x09, 0x71, 0xcb, 0xa0, 0x0c, 0xf4, 0xbc, 0x98, + 0x50, 0x06, 0x3c, 0x8a, 0xf5, 0x82, 0x8c, 0x62, 0x1e, 0x51, 0xbd, 0x28, 0x23, 0xba, 0xb5, 0xc2, + 0x95, 0xf8, 0xfe, 0xc9, 0x46, 0xae, 0x3d, 0xdc, 0x41, 0x0c, 0x35, 0xbe, 0xcd, 0x40, 0x79, 0x5b, + 0x5c, 0x92, 0x7d, 0x9f, 0xb2, 0xf6, 0x50, 0x7b, 0x17, 0x0a, 0x4e, 0x17, 0xf9, 0x61, 0xc7, 0x77, + 0x85, 0x34, 0xc5, 0x96, 0x75, 0x1e, 0xb9, 0xfc, 0x5d, 0x0e, 0xbe, 0xb7, 0x73, 0x32, 0x36, 0xf2, + 0x8e, 0x1c, 0xda, 0xc9, 0xc0, 0x9d, 0x69, 0x9c, 0x5e, 0xaa, 0x71, 0xe6, 0x5f, 0x6b, 0xac, 0x9e, + 0xaf, 0x71, 0x76, 0x51, 0xe3, 0xdc, 0xa5, 0x35, 0xce, 0x9f, 0xd1, 0xf8, 0x43, 0x28, 0xc8, 0xaf, + 0x09, 0x53, 0xbd, 0x50, 0xcf, 0x34, 0x4b, 0x9b, 0xeb, 0xe6, 0x8b, 0x4d, 0xc0, 0x94, 0x52, 0xb6, + 0xf9, 0xe7, 0xd6, 0xaa, 0x3f, 0x1d, 0x1b, 0xa9, 0x93, 0xb1, 0x01, 0xe8, 0x54, 0xdf, 0xaf, 0x7f, + 0x31, 0x60, 0xa6, 0xb6, 0x7d, 0xba, 0xa1, 0x34, 0xb0, 0x38, 0x67, 0x20, 0xcc, 0x19, 0x58, 0x5a, + 0x66, 0xe0, 0x9f, 0x19, 0x28, 0xef, 0x8c, 0x42, 0x14, 0xf8, 0xce, 0x1e, 0xc6, 0xff, 0x8b, 0x81, + 0x77, 0xa0, 0xc4, 0x0d, 0x64, 0x7e, 0xd4, 0x71, 0x50, 0x74, 0xb1, 0x85, 0xdc, 0xee, 0xb6, 0x1f, + 0xdd, 0x45, 0xd1, 0x74, 0xe9, 0x11, 0xc6, 0x62, 0xa9, 0xfa, 0x4f, 0x96, 0xee, 0x61, 0xcc, 0x97, + 0x26, 0xf6, 0x67, 0xcf, 0xb7, 0x3f, 0xb7, 0x68, 0x7f, 0xfe, 0xd2, 0xf6, 0x17, 0x96, 0xd8, 0x5f, + 0xfc, 0x4f, 0xec, 0x87, 0x39, 0xfb, 0x4b, 0x73, 0xf6, 0x97, 0x97, 0xd9, 0xdf, 0x80, 0xea, 0xee, + 0x90, 0xe1, 0x90, 0xfa, 0x24, 0x7c, 0x2f, 0x12, 0xef, 0xc4, 0xac, 0x3d, 0x27, 0x7d, 0xef, 0x3b, + 0x05, 0xd6, 0xe6, 0xda, 0xb6, 0x8d, 0x69, 0x44, 0x42, 0x2a, 0x0a, 0x15, 0x9d, 0x57, 0xdc, 0x93, + 0xa4, 0xd9, 0xde, 0x00, 0xb5, 0x47, 0x3c, 0xaa, 0xa7, 0x45, 0x91, 0x6b, 0x8b, 0x45, 0xee, 0x13, + 0xcf, 0x16, 0x10, 0xed, 0x2a, 0x64, 0x62, 0xcc, 0xc4, 0x05, 0x28, 0xdb, 0x7c, 0xa8, 0x55, 0xa0, + 0x30, 0x08, 0x3a, 0x38, 0x8e, 0x49, 0x9c, 0x74, 0xbb, 0xfc, 0x20, 0xd8, 0xe5, 0x21, 0x4f, 0x71, + 0xeb, 0xfb, 0x14, 0xbb, 0xd2, 0x44, 0x3b, 0xef, 0x21, 0xfa, 0x80, 0x62, 0x57, 0x5b, 0x07, 0x38, + 0xec, 0x11, 0xe7, 0x61, 0x47, 0x90, 0x91, 0x8d, 0xad, 0x28, 0x66, 0xde, 0x41, 0xb4, 0x3b, 0xed, + 0xde, 0x0a, 0x5c, 0x39, 0xa0, 0xde, 0x83, 0xc8, 0x45, 0x0c, 0xdf, 0x17, 0xcf, 0x12, 0x6f, 0x25, + 0xa8, 0xcf, 0xba, 0x24, 0xf6, 0xd9, 0x28, 0xb9, 0xec, 0xfa, 0x0f, 0x4f, 0x36, 0x56, 0x93, 0x47, + 0x76, 0xdb, 0x75, 0x63, 0x4c, 0xe9, 0xfb, 0x2c, 0xf6, 0x43, 0xcf, 0x9e, 0x41, 0xb5, 0xdb, 0x90, + 0x93, 0x0f, 0x9b, 0xb8, 0xd8, 0xa5, 0x4d, 0x7d, 0xb1, 0x4a, 0x79, 0x42, 0x4b, 0xe5, 0x2e, 0xda, + 0x09, 0x7a, 0x6b, 0xe5, 0xd1, 0xf3, 0xc7, 0x37, 0x67, 0xfb, 0x34, 0x2a, 0x70, 0xed, 0x05, 0x4a, + 0x53, 0x69, 0x37, 0x7f, 0x57, 0x20, 0x73, 0x40, 0x3d, 0xed, 0x13, 0x80, 0x33, 0xef, 0xa5, 0xb1, + 0x78, 0xd0, 0x9c, 0x33, 0xd5, 0xd7, 0x2f, 0x00, 0x4c, 0xf7, 0x6f, 0xbc, 0xfa, 0xe8, 0xc7, 0xdf, + 0xbe, 0x4c, 0x1b, 0x8d, 0x75, 0x6b, 0xe1, 0xcd, 0xc6, 0x09, 0xba, 0xc3, 0x86, 0xda, 0x47, 0x50, + 0x9e, 0x53, 0xec, 0x95, 0xbf, 0xdd, 0xff, 0x2c, 0xa4, 0x7a, 0xe3, 0x42, 0xc8, 0x94, 0x44, 0x35, + 0xfb, 0xe9, 0xf3, 0xc7, 0x37, 0x95, 0xd6, 0x5b, 0x4f, 0x27, 0x35, 0xe5, 0xd9, 0xa4, 0xa6, 0xfc, + 0x3a, 0xa9, 0x29, 0x9f, 0x1f, 0xd7, 0x52, 0xcf, 0x8e, 0x6b, 0xa9, 0x9f, 0x8e, 0x6b, 0xa9, 0x0f, + 0x5e, 0xf3, 0x7c, 0xd6, 0xed, 0x1f, 0x9a, 0x0e, 0x09, 0x38, 0x3b, 0x42, 0xcf, 0xb0, 0x1d, 0x0a, + 0xbe, 0x6c, 0x14, 0x61, 0x7a, 0x98, 0x13, 0x7f, 0x0c, 0x6f, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, + 0x8d, 0x16, 0xc5, 0x4e, 0x72, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1743,7 +1743,7 @@ func (m *LegacyTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.GasPrice = &v if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1830,7 +1830,7 @@ func (m *LegacyTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.Amount = &v if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2052,7 +2052,7 @@ func (m *AccessListTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ChainID = &v if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2107,7 +2107,7 @@ func (m *AccessListTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.GasPrice = &v if err := m.GasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2194,7 +2194,7 @@ func (m *AccessListTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.Amount = &v if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2450,7 +2450,7 @@ func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.ChainID = &v if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2505,7 +2505,7 @@ func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.GasTipCap = &v if err := m.GasTipCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2541,7 +2541,7 @@ func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.GasFeeCap = &v if err := m.GasFeeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -2628,7 +2628,7 @@ func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.Amount = &v if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/evm/types/utils_test.go b/x/evm/types/utils_test.go index 500071dd70..981c742cb5 100644 --- a/x/evm/types/utils_test.go +++ b/x/evm/types/utils_test.go @@ -11,7 +11,6 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" proto "github.com/cosmos/gogoproto/proto" "github.com/evmos/ethermint/app" - "github.com/evmos/ethermint/encoding" evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/evmos/ethermint/tests" @@ -52,7 +51,7 @@ func TestUnwrapEthererumMsg(t *testing.T) { _, err := evmtypes.UnwrapEthereumMsg(nil, common.Hash{}) require.NotNil(t, err) - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + encodingConfig := app.MakeConfigForTest() clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig) builder, _ := clientCtx.TxConfig.NewTxBuilder().(authtx.ExtensionOptionsTxBuilder) diff --git a/x/feemarket/handler.go b/x/feemarket/handler.go deleted file mode 100644 index fea12b3661..0000000000 --- a/x/feemarket/handler.go +++ /dev/null @@ -1,26 +0,0 @@ -package feemarket - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/evmos/ethermint/x/feemarket/types" -) - -// NewHandler returns a handler for Ethermint type messages. -func NewHandler(server types.MsgServer) sdk.Handler { - return func(ctx sdk.Context, msg sdk.Msg) (result *sdk.Result, err error) { - ctx = ctx.WithEventManager(sdk.NewEventManager()) - - switch msg := msg.(type) { - case *types.MsgUpdateParams: - // execute state transition - res, err := server.UpdateParams(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - - default: - err := errorsmod.Wrapf(errortypes.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) - return nil, err - } - } -} diff --git a/x/feemarket/keeper/abci.go b/x/feemarket/keeper/abci.go index 23a69b9b68..21c234aff0 100644 --- a/x/feemarket/keeper/abci.go +++ b/x/feemarket/keeper/abci.go @@ -16,22 +16,24 @@ package keeper import ( + "errors" "fmt" + "math" - abci "github.com/cometbft/cometbft/abci/types" "github.com/evmos/ethermint/x/feemarket/types" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" ) // BeginBlock updates base fee -func (k *Keeper) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { +func (k *Keeper) BeginBlock(ctx sdk.Context) error { baseFee := k.CalculateBaseFee(ctx) // return immediately if base fee is nil if baseFee == nil { - return + return nil } k.SetBaseFee(ctx, baseFee) @@ -47,27 +49,35 @@ func (k *Keeper) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { sdk.NewAttribute(types.AttributeKeyBaseFee, baseFee.String()), ), }) + return nil } // EndBlock update block gas wanted. // The EVM end block logic doesn't update the validator set, thus it returns // an empty slice. -func (k *Keeper) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) { +func (k *Keeper) EndBlock(ctx sdk.Context) error { if ctx.BlockGasMeter() == nil { - k.Logger(ctx).Error("block gas meter is nil when setting block gas wanted") - return + return errors.New("block gas meter is nil when setting block gas wanted") } gasWanted := k.GetTransientGasWanted(ctx) gasUsed := ctx.BlockGasMeter().GasConsumedToLimit() + if gasWanted > math.MaxInt64 { + return fmt.Errorf("integer overflow by integer type conversion. Gas wanted %d > MaxInt64", gasWanted) + } + + if gasUsed > math.MaxInt64 { + return fmt.Errorf("integer overflow by integer type conversion. Gas used %d > MaxInt64", gasUsed) + } + // to prevent BaseFee manipulation we limit the gasWanted so that // gasWanted = max(gasWanted * MinGasMultiplier, gasUsed) // this will be keep BaseFee protected from un-penalized manipulation // more info here https://github.com/evmos/ethermint/pull/1105#discussion_r888798925 minGasMultiplier := k.GetParams(ctx).MinGasMultiplier - limitedGasWanted := sdk.NewDec(int64(gasWanted)).Mul(minGasMultiplier) - gasWanted = sdk.MaxDec(limitedGasWanted, sdk.NewDec(int64(gasUsed))).TruncateInt().Uint64() + limitedGasWanted := sdkmath.LegacyNewDec(int64(gasWanted)).Mul(minGasMultiplier) + gasWanted = sdkmath.LegacyMaxDec(limitedGasWanted, sdkmath.LegacyNewDec(int64(gasUsed))).TruncateInt().Uint64() k.SetBlockGasWanted(ctx, gasWanted) defer func() { @@ -79,4 +89,5 @@ func (k *Keeper) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) { sdk.NewAttribute("height", fmt.Sprintf("%d", ctx.BlockHeight())), sdk.NewAttribute("amount", fmt.Sprintf("%d", gasWanted)), )) + return nil } diff --git a/x/feemarket/keeper/abci_test.go b/x/feemarket/keeper/abci_test.go index e6d8ca716c..863772eaed 100644 --- a/x/feemarket/keeper/abci_test.go +++ b/x/feemarket/keeper/abci_test.go @@ -4,8 +4,7 @@ import ( "fmt" "testing" - "github.com/cometbft/cometbft/abci/types" - sdk "github.com/cosmos/cosmos-sdk/types" + storetypes "cosmossdk.io/store/types" "github.com/evmos/ethermint/testutil" "github.com/stretchr/testify/suite" ) @@ -35,7 +34,7 @@ func (suite *ABCITestSuite) TestEndBlock() { "pass", false, func() { - meter := sdk.NewGasMeter(uint64(1000000000)) + meter := storetypes.NewGasMeter(uint64(1000000000)) suite.Ctx = suite.Ctx.WithBlockGasMeter(meter) suite.App.FeeMarketKeeper.SetTransientBlockGasWanted(suite.Ctx, 5000000) }, @@ -50,7 +49,8 @@ func (suite *ABCITestSuite) TestEndBlock() { suite.App.FeeMarketKeeper.SetParams(suite.Ctx, params) tc.malleate() - suite.App.FeeMarketKeeper.EndBlock(suite.Ctx, types.RequestEndBlock{Height: 1}) + + suite.App.FeeMarketKeeper.EndBlock(suite.Ctx) gasWanted := suite.App.FeeMarketKeeper.GetBlockGasWanted(suite.Ctx) suite.Require().Equal(tc.expGasWanted, gasWanted, tc.name) }) diff --git a/x/feemarket/keeper/eip1559.go b/x/feemarket/keeper/eip1559.go index a52630bb9a..0a6d53fc99 100644 --- a/x/feemarket/keeper/eip1559.go +++ b/x/feemarket/keeper/eip1559.go @@ -57,7 +57,7 @@ func (k Keeper) CalculateBaseFee(ctx sdk.Context) *big.Int { parentGasUsed := k.GetBlockGasWanted(ctx) // NOTE: a MaxGas equal to -1 means that block gas is unlimited - if consParams == nil || consParams.Block == nil || consParams.Block.MaxGas <= -1 { + if consParams.Block == nil || consParams.Block.MaxGas <= -1 { panic(fmt.Sprintf("get invalid consensus params: %s", consParams)) } gasLimit := big.NewInt(consParams.Block.MaxGas) diff --git a/x/feemarket/keeper/eip1559_test.go b/x/feemarket/keeper/eip1559_test.go index 2bad86da4f..97fd63c769 100644 --- a/x/feemarket/keeper/eip1559_test.go +++ b/x/feemarket/keeper/eip1559_test.go @@ -2,11 +2,10 @@ package keeper_test import ( "fmt" - "math/big" "testing" + sdkmath "cosmossdk.io/math" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/evmos/ethermint/testutil" "github.com/stretchr/testify/suite" ) @@ -25,15 +24,15 @@ func (suite *EIP1559TestSuite) TestCalculateBaseFee() { NoBaseFee bool blockHeight int64 parentBlockGasWanted uint64 - minGasPrice sdk.Dec - expFee *big.Int + minGasPrice sdkmath.LegacyDec + expFee func(baseFee sdkmath.Int) sdkmath.Int }{ { "without BaseFee", true, 0, 0, - sdk.ZeroDec(), + sdkmath.LegacyZeroDec(), nil, }, { @@ -41,56 +40,56 @@ func (suite *EIP1559TestSuite) TestCalculateBaseFee() { false, 0, 0, - sdk.ZeroDec(), - suite.App.FeeMarketKeeper.GetParams(suite.Ctx).BaseFee.BigInt(), + sdkmath.LegacyZeroDec(), + func(baseFee sdkmath.Int) sdkmath.Int { return suite.App.FeeMarketKeeper.GetParams(suite.Ctx).BaseFee }, }, { "with BaseFee - parent block wanted the same gas as its target (ElasticityMultiplier = 2)", false, 1, 50, - sdk.ZeroDec(), - suite.App.FeeMarketKeeper.GetParams(suite.Ctx).BaseFee.BigInt(), + sdkmath.LegacyZeroDec(), + func(baseFee sdkmath.Int) sdkmath.Int { return suite.App.FeeMarketKeeper.GetParams(suite.Ctx).BaseFee }, }, { "with BaseFee - parent block wanted the same gas as its target, with higher min gas price (ElasticityMultiplier = 2)", false, 1, 50, - sdk.NewDec(1500000000), - suite.App.FeeMarketKeeper.GetParams(suite.Ctx).BaseFee.BigInt(), + sdkmath.LegacyNewDec(1500000000), + func(baseFee sdkmath.Int) sdkmath.Int { return suite.App.FeeMarketKeeper.GetParams(suite.Ctx).BaseFee }, }, { "with BaseFee - parent block wanted more gas than its target (ElasticityMultiplier = 2)", false, 1, 100, - sdk.ZeroDec(), - big.NewInt(1125000000), + sdkmath.LegacyZeroDec(), + func(baseFee sdkmath.Int) sdkmath.Int { return baseFee.Add(sdkmath.NewInt(109375000)) }, }, { "with BaseFee - parent block wanted more gas than its target, with higher min gas price (ElasticityMultiplier = 2)", false, 1, 100, - sdk.NewDec(1500000000), - big.NewInt(1125000000), + sdkmath.LegacyNewDec(1500000000), + func(baseFee sdkmath.Int) sdkmath.Int { return baseFee.Add(sdkmath.NewInt(109375000)) }, }, { "with BaseFee - Parent gas wanted smaller than parent gas target (ElasticityMultiplier = 2)", false, 1, 25, - sdk.ZeroDec(), - big.NewInt(937500000), + sdkmath.LegacyZeroDec(), + func(baseFee sdkmath.Int) sdkmath.Int { return baseFee.Sub(sdkmath.NewInt(54687500)) }, }, { "with BaseFee - Parent gas wanted smaller than parent gas target, with higher min gas price (ElasticityMultiplier = 2)", false, 1, 25, - sdk.NewDec(1500000000), - big.NewInt(1500000000), + sdkmath.LegacyNewDec(1500000000), + func(baseFee sdkmath.Int) sdkmath.Int { return sdkmath.NewInt(1500000000) }, }, } for _, tc := range testCases { @@ -100,8 +99,9 @@ func (suite *EIP1559TestSuite) TestCalculateBaseFee() { params := suite.App.FeeMarketKeeper.GetParams(suite.Ctx) params.NoBaseFee = tc.NoBaseFee params.MinGasPrice = tc.minGasPrice - suite.App.FeeMarketKeeper.SetParams(suite.Ctx, params) + err := suite.App.FeeMarketKeeper.SetParams(suite.Ctx, params) + suite.Require().NoError(err) // Set block height suite.Ctx = suite.Ctx.WithBlockHeight(tc.blockHeight) @@ -114,13 +114,13 @@ func (suite *EIP1559TestSuite) TestCalculateBaseFee() { MaxBytes: 10, } consParams := tmproto.ConsensusParams{Block: &blockParams} - suite.Ctx = suite.Ctx.WithConsensusParams(&consParams) + suite.Ctx = suite.Ctx.WithConsensusParams(consParams) fee := suite.App.FeeMarketKeeper.CalculateBaseFee(suite.Ctx) if tc.NoBaseFee { suite.Require().Nil(fee, tc.name) } else { - suite.Require().Equal(tc.expFee, fee, tc.name) + suite.Require().Equal(tc.expFee(params.BaseFee), sdkmath.NewIntFromBigInt(fee), tc.name) } }) } diff --git a/x/feemarket/keeper/grpc_query_test.go b/x/feemarket/keeper/grpc_query_test.go index f4d59dc838..673d37d704 100644 --- a/x/feemarket/keeper/grpc_query_test.go +++ b/x/feemarket/keeper/grpc_query_test.go @@ -4,7 +4,6 @@ import ( "testing" sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" ethparams "github.com/ethereum/go-ethereum/params" "github.com/evmos/ethermint/testutil" "github.com/evmos/ethermint/x/feemarket/types" @@ -65,7 +64,7 @@ func (suite *GRPCServerTestSuite) TestQueryBaseFee() { { "pass - non-nil Base Fee", func() { - baseFee := sdk.OneInt().BigInt() + baseFee := sdkmath.OneInt().BigInt() suite.App.FeeMarketKeeper.SetBaseFee(suite.Ctx, baseFee) aux = sdkmath.NewIntFromBigInt(baseFee) diff --git a/x/feemarket/keeper/integration_test.go b/x/feemarket/keeper/integration_test.go index 40cee8e7ac..4d99925f9f 100644 --- a/x/feemarket/keeper/integration_test.go +++ b/x/feemarket/keeper/integration_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "context" "math/big" "strings" "testing" @@ -10,20 +11,17 @@ import ( . "github.com/onsi/gomega" "github.com/stretchr/testify/suite" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/server" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/ethermint/app" - "github.com/evmos/ethermint/encoding" "github.com/evmos/ethermint/tests" "github.com/evmos/ethermint/testutil" - - abci "github.com/cometbft/cometbft/abci/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" evmtypes "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" ) @@ -54,7 +52,7 @@ var _ = Describe("Feemarket", func() { Describe("Performing Cosmos transactions", func() { Context("with min-gas-prices (local) < MinGasPrices (feemarket param)", func() { BeforeEach(func() { - msg = setupTest("1", sdk.NewDec(3), sdk.ZeroInt()) + msg = setupTest("1", sdkmath.LegacyNewDec(3), sdkmath.ZeroInt()) }) Context("during CheckTx", func() { @@ -96,7 +94,7 @@ var _ = Describe("Feemarket", func() { Context("with min-gas-prices (local) == MinGasPrices (feemarket param)", func() { BeforeEach(func() { - msg = setupTest("3", sdk.NewDec(3), sdk.ZeroInt()) + msg = setupTest("3", sdkmath.LegacyNewDec(3), sdkmath.ZeroInt()) }) Context("during CheckTx", func() { @@ -138,7 +136,7 @@ var _ = Describe("Feemarket", func() { Context("with MinGasPrices (feemarket param) < min-gas-prices (local)", func() { BeforeEach(func() { - msg = setupTest("5", sdk.NewDec(3), sdk.NewInt(5)) + msg = setupTest("5", sdkmath.LegacyNewDec(3), sdkmath.NewInt(5)) }) Context("during CheckTx", func() { It("should reject transactions with gasPrice < MinGasPrices", func() { @@ -214,7 +212,7 @@ var _ = Describe("Feemarket", func() { // 100000`. With the fee calculation `Fee = (baseFee + tip) * gasLimit`, // a `minGasPrices = 40_000_000_000` results in `minGlobalFee = // 4000000000000000` - setupTest("1", sdk.NewDec(minGasPrices), sdkmath.NewInt(baseFee)) + setupTest("1", sdkmath.LegacyNewDec(minGasPrices), sdkmath.NewInt(baseFee)) }) Context("during CheckTx", func() { @@ -238,9 +236,6 @@ var _ = Describe("Feemarket", func() { // Note that max priority fee per gas can't be higher than the max fee per gas (gasFeeCap), i.e. 30_000_000_000) return txParams{nil, big.NewInt(minGasPrices - 10_000_000_000), big.NewInt(30_000_000_000), ðtypes.AccessList{}} }), - Entry("dynamic tx with GasFeeCap > MinGasPrices, EffectivePrice < MinGasPrices", func() txParams { - return txParams{nil, big.NewInt(minGasPrices + 10_000_000_000), big.NewInt(0), ðtypes.AccessList{}} - }), ) DescribeTable("should accept transactions with gasPrice >= MinGasPrices", @@ -314,7 +309,7 @@ var _ = Describe("Feemarket", func() { // 100_000`. With the fee calculation `Fee = (baseFee + tip) * gasLimit`, // a `minGasPrices = 5_000_000_000` results in `minGlobalFee = // 500_000_000_000_000` - setupTest("1", sdk.NewDec(minGasPrices), sdkmath.NewInt(baseFee)) + setupTest("1", sdkmath.LegacyNewDec(minGasPrices), sdkmath.NewInt(baseFee)) }) Context("during CheckTx", func() { @@ -350,10 +345,10 @@ var _ = Describe("Feemarket", func() { ).To(BeTrue(), res.GetLog()) }, Entry("legacy tx", func() txParams { - return txParams{big.NewInt(baseFee - 1_000_000_000), nil, nil, nil} + return txParams{big.NewInt(baseFee - 2_000_000_000), nil, nil, nil} }), Entry("dynamic tx", func() txParams { - return txParams{nil, big.NewInt(baseFee - 1_000_000_000), big.NewInt(0), ðtypes.AccessList{}} + return txParams{nil, big.NewInt(baseFee - 2_000_000_000), big.NewInt(0), ðtypes.AccessList{}} }), ) @@ -403,10 +398,10 @@ var _ = Describe("Feemarket", func() { }, // Note that the baseFee is not 10_000_000_000 anymore but updates to 8_750_000_000 because of the s.Commit Entry("legacy tx", func() txParams { - return txParams{big.NewInt(baseFee - 2_000_000_000), nil, nil, nil} + return txParams{big.NewInt(baseFee - 2_500_000_000), nil, nil, nil} }), Entry("dynamic tx", func() txParams { - return txParams{nil, big.NewInt(baseFee - 2_000_000_000), big.NewInt(0), ðtypes.AccessList{}} + return txParams{nil, big.NewInt(baseFee - 2_500_000_000), big.NewInt(0), ðtypes.AccessList{}} }), ) @@ -434,9 +429,10 @@ type IntegrationTestSuite struct { // SetupTest sets up a test chain with an example Cosmos send msg, // given a local (validator config) and a gloabl (feemarket param) minGasPrice -func setupTest(valMinGasPrice string, minGasPrice sdk.Dec, baseFee sdkmath.Int) banktypes.MsgSend { +func setupTest(valMinGasPrice string, minGasPrice sdkmath.LegacyDec, baseFee sdkmath.Int) banktypes.MsgSend { + t := s.T() s.SetupTestWithCbAndOpts( - s.T(), + t, nil, simtestutil.AppOptionsMap{server.FlagMinGasPrices: valMinGasPrice + evmtypes.DefaultEVMDenom}, ) @@ -456,17 +452,17 @@ func setupTest(valMinGasPrice string, minGasPrice sdk.Dec, baseFee sdkmath.Int) Amount: sdkmath.NewInt(10000), }}, } - s.Commit() + s.Commit(t) params := feemarkettypes.DefaultParams() params.MinGasPrice = minGasPrice s.App.FeeMarketKeeper.SetParams(s.Ctx, params) s.App.FeeMarketKeeper.SetBaseFee(s.Ctx, baseFee.BigInt()) - s.Commit() + s.Commit(t) return msg } func prepareCosmosTx(gasPrice *sdkmath.Int, msgs ...sdk.Msg) []byte { - encodingConfig := encoding.MakeConfig(app.ModuleBasics) + encodingConfig := s.App.EncodingConfig() accountAddress := sdk.AccAddress(s.PrivKey.PubKey().Address().Bytes()) txBuilder := encodingConfig.TxConfig.NewTxBuilder() @@ -484,12 +480,15 @@ func prepareCosmosTx(gasPrice *sdkmath.Int, msgs ...sdk.Msg) []byte { seq, err := s.App.AccountKeeper.GetSequence(s.Ctx, accountAddress) s.Require().NoError(err) + defaultMode, err := authsigning.APISignModeToInternal(encodingConfig.TxConfig.SignModeHandler().DefaultMode()) + s.Require().NoError(err) + // First round: we gather all the signer infos. We use the "set empty // signature" hack to do that. sigV2 := signing.SignatureV2{ PubKey: s.PrivKey.PubKey(), Data: &signing.SingleSignatureData{ - SignMode: encodingConfig.TxConfig.SignModeHandler().DefaultMode(), + SignMode: defaultMode, Signature: nil, }, Sequence: seq, @@ -508,7 +507,8 @@ func prepareCosmosTx(gasPrice *sdkmath.Int, msgs ...sdk.Msg) []byte { Sequence: seq, } sigV2, err = tx.SignWithPrivKey( - encodingConfig.TxConfig.SignModeHandler().DefaultMode(), signerData, + context.Background(), + defaultMode, signerData, txBuilder, s.PrivKey, encodingConfig.TxConfig, seq, ) @@ -535,6 +535,6 @@ func checkTx(gasPrice *sdkmath.Int, msgs ...sdk.Msg) abci.ResponseCheckTx { return s.CheckTx(prepareCosmosTx(gasPrice, msgs...)) } -func deliverTx(gasPrice *sdkmath.Int, msgs ...sdk.Msg) abci.ResponseDeliverTx { +func deliverTx(gasPrice *sdkmath.Int, msgs ...sdk.Msg) *abci.ExecTxResult { return s.DeliverTx(prepareCosmosTx(gasPrice, msgs...)) } diff --git a/x/feemarket/keeper/keeper.go b/x/feemarket/keeper/keeper.go index 5720f0ed51..83b2862c2b 100644 --- a/x/feemarket/keeper/keeper.go +++ b/x/feemarket/keeper/keeper.go @@ -18,11 +18,11 @@ package keeper import ( "math/big" - "github.com/cometbft/cometbft/libs/log" + corestoretypes "cosmossdk.io/core/store" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/evmos/ethermint/x/feemarket/types" ) @@ -33,19 +33,21 @@ var KeyPrefixBaseFeeV1 = []byte{2} // Keeper grants access to the Fee Market module state. type Keeper struct { // Protobuf codec - cdc codec.BinaryCodec + cdc codec.BinaryCodec + storeService corestoretypes.KVStoreService // Store key required for the Fee Market Prefix KVStore. storeKey storetypes.StoreKey transientKey storetypes.StoreKey // the address capable of executing a MsgUpdateParams message. Typically, this should be the x/gov module account. authority sdk.AccAddress - // Legacy subspace - ss paramstypes.Subspace } // NewKeeper generates new fee market module keeper func NewKeeper( - cdc codec.BinaryCodec, authority sdk.AccAddress, storeKey, transientKey storetypes.StoreKey, ss paramstypes.Subspace, + cdc codec.BinaryCodec, + storeService corestoretypes.KVStoreService, + authority sdk.AccAddress, + storeKey, transientKey storetypes.StoreKey, ) Keeper { // ensure authority account is correctly formatted if err := sdk.VerifyAddressFormat(authority); err != nil { @@ -54,16 +56,17 @@ func NewKeeper( return Keeper{ cdc: cdc, + storeService: storeService, storeKey: storeKey, authority: authority, transientKey: transientKey, - ss: ss, } } // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", "x/"+types.ModuleName) + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", "x/"+types.ModuleName) } // ---------------------------------------------------------------------------- diff --git a/x/feemarket/keeper/keeper_test.go b/x/feemarket/keeper/keeper_test.go index 5ee72ba0ab..9f1243d7f9 100644 --- a/x/feemarket/keeper/keeper_test.go +++ b/x/feemarket/keeper/keeper_test.go @@ -5,12 +5,10 @@ import ( "math/big" "testing" - "github.com/stretchr/testify/suite" - - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - "github.com/evmos/ethermint/testutil" + "github.com/stretchr/testify/suite" ) type KeeperTestSuite struct { @@ -27,7 +25,9 @@ func (suite *KeeperTestSuite) SetupTest() { suite.SetupTestWithCb(t, nil) validator := suite.BaseTestSuiteWithAccount.PostSetupValidator(t) validator = stakingkeeper.TestingUpdateValidator(suite.App.StakingKeeper, suite.Ctx, validator, true) - err := suite.App.StakingKeeper.Hooks().AfterValidatorCreated(suite.Ctx, validator.GetOperator()) + valBz, err := suite.App.StakingKeeper.ValidatorAddressCodec().StringToBytes(validator.GetOperator()) + suite.Require().NoError(err) + err = suite.App.StakingKeeper.Hooks().AfterValidatorCreated(suite.Ctx, valBz) suite.Require().NoError(err) err = suite.App.StakingKeeper.SetValidatorByConsAddr(suite.Ctx, validator) suite.Require().NoError(err) @@ -67,9 +67,9 @@ func (suite *KeeperTestSuite) TestSetGetGasFee() { { "with last block given", func() { - suite.App.FeeMarketKeeper.SetBaseFee(suite.Ctx, sdk.OneDec().BigInt()) + suite.App.FeeMarketKeeper.SetBaseFee(suite.Ctx, sdkmath.LegacyOneDec().BigInt()) }, - sdk.OneDec().BigInt(), + sdkmath.LegacyOneDec().BigInt(), }, } for _, tc := range testCases { diff --git a/x/feemarket/keeper/params.go b/x/feemarket/keeper/params.go index 3e11a48c83..eab87a3945 100644 --- a/x/feemarket/keeper/params.go +++ b/x/feemarket/keeper/params.go @@ -18,36 +18,34 @@ package keeper import ( "math/big" + sdkmath "cosmossdk.io/math" "github.com/evmos/ethermint/x/feemarket/types" sdk "github.com/cosmos/cosmos-sdk/types" ) // GetParams returns the total set of fee market parameters. -func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.ParamsKey) - if len(bz) == 0 { - var p types.Params - k.ss.GetParamSetIfExists(ctx, &p) +func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) { + store := k.storeService.OpenKVStore(ctx) + bz, err := store.Get(types.ParamsKey) + if err != nil { + panic(err) + } + if bz == nil { return p } - - k.cdc.MustUnmarshal(bz, ¶ms) - return params + k.cdc.MustUnmarshal(bz, &p) + return p } // SetParams sets the fee market params in a single key -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { - store := ctx.KVStore(k.storeKey) - bz, err := k.cdc.Marshal(¶ms) - if err != nil { +func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error { + if err := p.Validate(); err != nil { return err } - - store.Set(types.ParamsKey, bz) - - return nil + store := k.storeService.OpenKVStore(ctx) + bz := k.cdc.MustMarshal(&p) + return store.Set(types.ParamsKey, bz) } // ---------------------------------------------------------------------------- @@ -73,7 +71,7 @@ func (k Keeper) GetBaseFee(ctx sdk.Context) *big.Int { // SetBaseFee set's the base fee in the store func (k Keeper) SetBaseFee(ctx sdk.Context, baseFee *big.Int) { params := k.GetParams(ctx) - params.BaseFee = sdk.NewIntFromBigInt(baseFee) + params.BaseFee = sdkmath.NewIntFromBigInt(baseFee) err := k.SetParams(ctx, params) if err != nil { return diff --git a/x/feemarket/keeper/params_test.go b/x/feemarket/keeper/params_test.go index b3a44eccad..bf412f5a58 100644 --- a/x/feemarket/keeper/params_test.go +++ b/x/feemarket/keeper/params_test.go @@ -18,7 +18,7 @@ func TestParamsTestSuite(t *testing.T) { } func (suite *ParamsTestSuite) TestSetGetParams() { - params := suite.App.FeeMarketKeeper.GetParams(suite.Ctx) + params := types.DefaultParams() suite.App.FeeMarketKeeper.SetParams(suite.Ctx, params) testCases := []struct { name string diff --git a/x/feemarket/migrations/v4/migrate.go b/x/feemarket/migrations/v4/migrate.go index a13861e861..66a1fdb2de 100644 --- a/x/feemarket/migrations/v4/migrate.go +++ b/x/feemarket/migrations/v4/migrate.go @@ -1,8 +1,8 @@ package v4 import ( + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/evmos/ethermint/x/feemarket/types" ) diff --git a/x/feemarket/migrations/v4/migrate_test.go b/x/feemarket/migrations/v4/migrate_test.go index 959bf16e5f..60bc092d7a 100644 --- a/x/feemarket/migrations/v4/migrate_test.go +++ b/x/feemarket/migrations/v4/migrate_test.go @@ -3,10 +3,10 @@ package v4_test import ( "testing" + storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/evmos/ethermint/app" - "github.com/evmos/ethermint/encoding" v4 "github.com/evmos/ethermint/x/feemarket/migrations/v4" "github.com/evmos/ethermint/x/feemarket/types" "github.com/stretchr/testify/require" @@ -29,11 +29,11 @@ func (ms mockSubspace) GetParamSetIfExists(ctx sdk.Context, ps types.LegacyParam } func TestMigrate(t *testing.T) { - encCfg := encoding.MakeConfig(app.ModuleBasics) + encCfg := app.MakeConfigForTest() cdc := encCfg.Codec - storeKey := sdk.NewKVStoreKey(types.ModuleName) - tKey := sdk.NewTransientStoreKey("transient_test") + storeKey := storetypes.NewKVStoreKey(types.ModuleName) + tKey := storetypes.NewTransientStoreKey("transient_test") ctx := testutil.DefaultContext(storeKey, tKey) kvStore := ctx.KVStore(storeKey) diff --git a/x/feemarket/migrations/v4/types/feemarket.pb.go b/x/feemarket/migrations/v4/types/feemarket.pb.go index 063f7532c7..b8022c1f87 100644 --- a/x/feemarket/migrations/v4/types/feemarket.pb.go +++ b/x/feemarket/migrations/v4/types/feemarket.pb.go @@ -5,12 +5,13 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + sdkmath "cosmossdk.io/math" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. @@ -37,12 +38,12 @@ type Params struct { // enable_height defines at which block height the base fee calculation is enabled. EnableHeight int64 `protobuf:"varint,5,opt,name=enable_height,json=enableHeight,proto3" json:"enable_height,omitempty"` // base_fee for EIP-1559 blocks. - BaseFee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee"` + BaseFee sdkmath.Int `protobuf:"bytes,6,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee"` // min_gas_price defines the minimum gas price value for cosmos and eth transactions - MinGasPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=min_gas_price,json=minGasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_gas_price"` + MinGasPrice sdkmath.LegacyDec `protobuf:"bytes,7,opt,name=min_gas_price,json=minGasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_gas_price"` // min_gas_multiplier bounds the minimum gas used to be charged // to senders based on gas limit - MinGasMultiplier github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=min_gas_multiplier,json=minGasMultiplier,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_gas_multiplier"` + MinGasMultiplier sdkmath.LegacyDec `protobuf:"bytes,8,opt,name=min_gas_multiplier,json=minGasMultiplier,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_gas_multiplier"` } func (m *Params) Reset() { *m = Params{} } diff --git a/x/feemarket/migrations/v4/types/params.go b/x/feemarket/migrations/v4/types/params.go index 7d96e9f222..82e68be2a8 100644 --- a/x/feemarket/migrations/v4/types/params.go +++ b/x/feemarket/migrations/v4/types/params.go @@ -6,7 +6,6 @@ import ( "github.com/evmos/ethermint/x/feemarket/types" sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/ethereum/go-ethereum/params" ) @@ -27,9 +26,9 @@ var ( var ( // DefaultMinGasMultiplier is 0.5 or 50% - DefaultMinGasMultiplier = sdk.NewDecWithPrec(50, 2) + DefaultMinGasMultiplier = sdkmath.LegacyNewDecWithPrec(50, 2) // DefaultMinGasPrice is 0 (i.e disabled) - DefaultMinGasPrice = sdk.ZeroDec() + DefaultMinGasPrice = sdkmath.LegacyZeroDec() DefaultEnableHeight = int64(0) DefaultNoBaseFee = false ) @@ -59,8 +58,8 @@ func NewParams( elasticityMultiplier uint32, baseFee uint64, enableHeight int64, - minGasPrice sdk.Dec, - minGasPriceMultiplier sdk.Dec, + minGasPrice sdkmath.LegacyDec, + minGasPriceMultiplier sdkmath.LegacyDec, ) Params { return Params{ NoBaseFee: noBaseFee, @@ -163,7 +162,7 @@ func validateEnableHeight(i interface{}) error { } func validateMinGasPrice(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(sdkmath.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -181,7 +180,7 @@ func validateMinGasPrice(i interface{}) error { } func validateMinGasMultiplier(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(sdkmath.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -195,7 +194,7 @@ func validateMinGasMultiplier(i interface{}) error { return fmt.Errorf("value cannot be negative: %s", v) } - if v.GT(sdk.OneDec()) { + if v.GT(sdkmath.LegacyOneDec()) { return fmt.Errorf("value cannot be greater than 1: %s", v) } return nil diff --git a/x/feemarket/module.go b/x/feemarket/module.go index 5eb52e8925..68fdb89505 100644 --- a/x/feemarket/module.go +++ b/x/feemarket/module.go @@ -26,6 +26,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" + "cosmossdk.io/core/appmodule" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -42,6 +43,9 @@ import ( var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} + + _ appmodule.HasEndBlocker = AppModule{} + _ appmodule.HasBeginBlocker = AppModule{} ) // AppModuleBasic defines the basic application module used by the fee market module. @@ -89,6 +93,11 @@ func (b AppModuleBasic) RegisterGRPCGatewayRoutes(c client.Context, serveMux *ru } } +// RegisterInterfaces registers interfaces and implementations of the fee market module. +func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) +} + // GetTxCmd returns the root tx command for the fee market module. func (AppModuleBasic) GetTxCmd() *cobra.Command { return nil @@ -99,11 +108,6 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -// RegisterInterfaces registers interfaces and implementations of the fee market module. -func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { - types.RegisterInterfaces(registry) -} - // ____________________________________________________________________________ // AppModule implements an application module for the fee market module. @@ -145,15 +149,14 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { } // BeginBlock returns the begin block for the fee market module. -func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { - am.keeper.BeginBlock(ctx, req) +func (am AppModule) BeginBlock(ctx context.Context) error { + return am.keeper.BeginBlock(sdk.UnwrapSDKContext(ctx)) } // EndBlock returns the end blocker for the fee market module. It returns no validator // updates. -func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { - am.keeper.EndBlock(ctx, req) - return []abci.ValidatorUpdate{} +func (am AppModule) EndBlock(ctx context.Context) error { + return am.keeper.EndBlock(sdk.UnwrapSDKContext(ctx)) } // InitGenesis performs genesis initialization for the fee market module. It returns @@ -174,7 +177,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // RegisterStoreDecoder registers a decoder for fee market module's types -func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} +func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} // GenerateGenesisState creates a randomized GenState of the fee market module. func (AppModule) GenerateGenesisState(simState *module.SimulationState) { @@ -185,3 +188,9 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return nil } + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} diff --git a/x/feemarket/simulation/genesis.go b/x/feemarket/simulation/genesis.go index 987e4c1ba7..3068faaaaa 100644 --- a/x/feemarket/simulation/genesis.go +++ b/x/feemarket/simulation/genesis.go @@ -4,9 +4,8 @@ import ( "encoding/json" "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" + sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/evmos/ethermint/x/feemarket/types" ) @@ -17,7 +16,7 @@ func RandomizedGenState(simState *module.SimulationState) { simState.Rand.Uint32(), simState.Rand.Uint64(), simState.Rand.Int63(), - sdk.ZeroDec(), + sdkmath.LegacyZeroDec(), types.DefaultMinGasMultiplier) blockGas := simState.Rand.Uint64() diff --git a/x/feemarket/types/codec.go b/x/feemarket/types/codec.go index ecfb0d9c27..9899e9cdf9 100644 --- a/x/feemarket/types/codec.go +++ b/x/feemarket/types/codec.go @@ -14,7 +14,7 @@ var ( ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) // AminoCdc is a amino codec created to support amino JSON compatible msgs. - AminoCdc = codec.NewAminoCodec(amino) + AminoCdc = codec.NewAminoCodec(amino) //nolint:staticcheck ) const ( diff --git a/x/feemarket/types/feemarket.pb.go b/x/feemarket/types/feemarket.pb.go index 063f7532c7..f4f44b4995 100644 --- a/x/feemarket/types/feemarket.pb.go +++ b/x/feemarket/types/feemarket.pb.go @@ -4,8 +4,8 @@ package types import ( + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -37,12 +37,12 @@ type Params struct { // enable_height defines at which block height the base fee calculation is enabled. EnableHeight int64 `protobuf:"varint,5,opt,name=enable_height,json=enableHeight,proto3" json:"enable_height,omitempty"` // base_fee for EIP-1559 blocks. - BaseFee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee"` + BaseFee cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=base_fee,json=baseFee,proto3,customtype=cosmossdk.io/math.Int" json:"base_fee"` // min_gas_price defines the minimum gas price value for cosmos and eth transactions - MinGasPrice github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=min_gas_price,json=minGasPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_gas_price"` + MinGasPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=min_gas_price,json=minGasPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_gas_price"` // min_gas_multiplier bounds the minimum gas used to be charged // to senders based on gas limit - MinGasMultiplier github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=min_gas_multiplier,json=minGasMultiplier,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min_gas_multiplier"` + MinGasMultiplier cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=min_gas_multiplier,json=minGasMultiplier,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_gas_multiplier"` } func (m *Params) Reset() { *m = Params{} } @@ -115,32 +115,33 @@ func init() { } var fileDescriptor_4feb8b20cf98e6e1 = []byte{ - // 388 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0xc1, 0x8a, 0xdb, 0x30, - 0x14, 0xb4, 0x9a, 0xdd, 0xac, 0x57, 0xdb, 0x40, 0x10, 0xdb, 0x62, 0x5a, 0xf0, 0x9a, 0x16, 0x16, - 0x1f, 0x5a, 0x9b, 0x65, 0xcf, 0xbd, 0xa4, 0x21, 0x6d, 0x0a, 0x85, 0xe0, 0x63, 0x29, 0x08, 0xd9, - 0x79, 0xb1, 0x45, 0x2c, 0xc9, 0x58, 0x4a, 0x68, 0xfe, 0xa2, 0x9f, 0x95, 0x63, 0x4e, 0xa5, 0xf4, - 0x10, 0x4a, 0xf2, 0x23, 0x25, 0x76, 0x62, 0xe7, 0xda, 0x3d, 0x49, 0x7a, 0x33, 0x9a, 0x79, 0xd2, - 0x1b, 0x7c, 0x0f, 0x26, 0x83, 0x52, 0x70, 0x69, 0xc2, 0x19, 0x80, 0x60, 0xe5, 0x1c, 0x4c, 0xb8, - 0x7c, 0x68, 0x0f, 0x41, 0x51, 0x2a, 0xa3, 0xc8, 0xcb, 0x86, 0x17, 0xb4, 0xd0, 0xf2, 0xe1, 0xd5, - 0x6d, 0xaa, 0x52, 0x55, 0x51, 0xc2, 0xc3, 0xae, 0x66, 0xbf, 0xf9, 0xd5, 0xc1, 0xdd, 0x09, 0x2b, - 0x99, 0xd0, 0xc4, 0xc5, 0x37, 0x52, 0xd1, 0x98, 0x69, 0xa0, 0x33, 0x00, 0x07, 0x79, 0xc8, 0xb7, - 0xa3, 0x6b, 0xa9, 0x06, 0x4c, 0xc3, 0x08, 0x80, 0x7c, 0xc0, 0xaf, 0x4f, 0x20, 0x4d, 0x32, 0x26, - 0x53, 0xa0, 0x53, 0x90, 0x4a, 0x70, 0xc9, 0x8c, 0x2a, 0x9d, 0x67, 0x1e, 0xf2, 0x7b, 0x91, 0x13, - 0xd7, 0xec, 0x8f, 0x15, 0x61, 0xd8, 0xe2, 0xe4, 0x11, 0xbf, 0x80, 0x9c, 0x69, 0xc3, 0x13, 0x6e, - 0x56, 0x54, 0x2c, 0x72, 0xc3, 0x8b, 0x9c, 0x43, 0xe9, 0x74, 0xaa, 0x8b, 0xb7, 0x2d, 0xf8, 0xb5, - 0xc1, 0xc8, 0x5b, 0xdc, 0x03, 0xc9, 0xe2, 0x1c, 0x68, 0x06, 0x3c, 0xcd, 0x8c, 0x73, 0xe9, 0x21, - 0xbf, 0x13, 0x3d, 0xaf, 0x8b, 0x9f, 0xab, 0x1a, 0x19, 0x63, 0xbb, 0xe9, 0xba, 0xeb, 0x21, 0xff, - 0x7a, 0x10, 0xac, 0xb7, 0x77, 0xd6, 0x9f, 0xed, 0xdd, 0x7d, 0xca, 0x4d, 0xb6, 0x88, 0x83, 0x44, - 0x89, 0x30, 0x51, 0x5a, 0x28, 0x7d, 0x5c, 0xde, 0xeb, 0xe9, 0x3c, 0x34, 0xab, 0x02, 0x74, 0x30, - 0x96, 0x26, 0xba, 0x3a, 0x76, 0x4d, 0x22, 0xdc, 0x13, 0x5c, 0xd2, 0x94, 0x69, 0x5a, 0x94, 0x3c, - 0x01, 0xe7, 0xea, 0xbf, 0xf5, 0x86, 0x90, 0x44, 0x37, 0x82, 0xcb, 0x4f, 0x4c, 0x4f, 0x0e, 0x12, - 0xe4, 0x3b, 0x26, 0x27, 0xcd, 0xb3, 0x57, 0xdb, 0x4f, 0x12, 0xee, 0xd7, 0xc2, 0xed, 0x0f, 0x7d, - 0xb9, 0xb0, 0x2f, 0xfa, 0x97, 0x51, 0x9f, 0x4b, 0x6e, 0x38, 0xcb, 0x9b, 0xf1, 0x0d, 0x46, 0xeb, - 0x9d, 0x8b, 0x36, 0x3b, 0x17, 0xfd, 0xdd, 0xb9, 0xe8, 0xe7, 0xde, 0xb5, 0x36, 0x7b, 0xd7, 0xfa, - 0xbd, 0x77, 0xad, 0x6f, 0xef, 0xce, 0xbc, 0x60, 0x79, 0xb0, 0x6a, 0x93, 0xf5, 0xe3, 0x2c, 0x5b, - 0x95, 0x6b, 0xdc, 0xad, 0x72, 0xf2, 0xf8, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa5, 0xce, 0xeb, 0x97, - 0x7f, 0x02, 0x00, 0x00, + // 401 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x6a, 0xdb, 0x40, + 0x14, 0x45, 0x35, 0x75, 0xe2, 0x28, 0x93, 0x1a, 0xcc, 0x90, 0x14, 0xd1, 0x50, 0x45, 0x34, 0x50, + 0xb4, 0x28, 0x12, 0x21, 0x9b, 0x6e, 0xba, 0x71, 0x43, 0xdc, 0x96, 0x16, 0x5c, 0x2d, 0xbb, 0x19, + 0x46, 0xf2, 0xb3, 0x34, 0x58, 0x33, 0x23, 0x34, 0x63, 0x53, 0xff, 0x45, 0xff, 0xa4, 0xbf, 0xe1, + 0xa5, 0x97, 0xa5, 0x0b, 0x53, 0xec, 0x1f, 0x29, 0x96, 0x6c, 0xc9, 0xd0, 0x4d, 0x76, 0xd2, 0xbb, + 0xf7, 0x5c, 0xde, 0x63, 0x2e, 0x7e, 0x03, 0x26, 0x83, 0x52, 0x70, 0x69, 0xc2, 0x09, 0x80, 0x60, + 0xe5, 0x14, 0x4c, 0x38, 0xbf, 0x6b, 0x7f, 0x82, 0xa2, 0x54, 0x46, 0x91, 0x17, 0x8d, 0x2f, 0x68, + 0xa5, 0xf9, 0xdd, 0xcb, 0xcb, 0x54, 0xa5, 0xaa, 0xb2, 0x84, 0xbb, 0xaf, 0xda, 0xfd, 0xfa, 0x57, + 0x07, 0x77, 0x47, 0xac, 0x64, 0x42, 0x13, 0x17, 0x5f, 0x48, 0x45, 0x63, 0xa6, 0x81, 0x4e, 0x00, + 0x1c, 0xe4, 0x21, 0xdf, 0x8e, 0xce, 0xa5, 0x1a, 0x30, 0x0d, 0x8f, 0x00, 0xe4, 0x3d, 0xbe, 0x3e, + 0x88, 0x34, 0xc9, 0x98, 0x4c, 0x81, 0x8e, 0x41, 0x2a, 0xc1, 0x25, 0x33, 0xaa, 0x74, 0x9e, 0x79, + 0xc8, 0xef, 0x45, 0x4e, 0x5c, 0xbb, 0x3f, 0x54, 0x86, 0x87, 0x56, 0x27, 0xf7, 0xf8, 0x0a, 0x72, + 0xa6, 0x0d, 0x4f, 0xb8, 0x59, 0x50, 0x31, 0xcb, 0x0d, 0x2f, 0x72, 0x0e, 0xa5, 0xd3, 0xa9, 0xc0, + 0xcb, 0x56, 0xfc, 0xda, 0x68, 0xe4, 0x16, 0xf7, 0x40, 0xb2, 0x38, 0x07, 0x9a, 0x01, 0x4f, 0x33, + 0xe3, 0x9c, 0x7a, 0xc8, 0xef, 0x44, 0xcf, 0xeb, 0xe1, 0xc7, 0x6a, 0x46, 0xde, 0x61, 0xbb, 0xd9, + 0xba, 0xeb, 0x21, 0xff, 0x7c, 0xf0, 0x6a, 0xb9, 0xbe, 0xb1, 0xfe, 0xac, 0x6f, 0xae, 0x12, 0xa5, + 0x85, 0xd2, 0x7a, 0x3c, 0x0d, 0xb8, 0x0a, 0x05, 0x33, 0x59, 0xf0, 0x49, 0x9a, 0xe8, 0x6c, 0xbf, + 0x24, 0x19, 0xe2, 0x9e, 0xe0, 0x92, 0xa6, 0x4c, 0xd3, 0xa2, 0xe4, 0x09, 0x38, 0x67, 0x15, 0x7e, + 0xbb, 0xc7, 0xaf, 0xff, 0xc7, 0xbf, 0x40, 0xca, 0x92, 0xc5, 0x03, 0x24, 0xd1, 0x85, 0xe0, 0x72, + 0xc8, 0xf4, 0x68, 0xc7, 0x91, 0x6f, 0x98, 0x1c, 0x82, 0x8e, 0x2e, 0xb3, 0x9f, 0x9e, 0xd6, 0xaf, + 0xd3, 0xda, 0xd3, 0x3f, 0x9f, 0xd8, 0x27, 0xfd, 0xd3, 0xa8, 0xcf, 0x25, 0x37, 0x9c, 0xe5, 0xcd, + 0xbb, 0x0c, 0x1e, 0x97, 0x1b, 0x17, 0xad, 0x36, 0x2e, 0xfa, 0xbb, 0x71, 0xd1, 0xcf, 0xad, 0x6b, + 0xad, 0xb6, 0xae, 0xf5, 0x7b, 0xeb, 0x5a, 0xdf, 0xdf, 0xa6, 0xdc, 0x64, 0xb3, 0x38, 0x48, 0x94, + 0x08, 0x61, 0x2e, 0x94, 0x0e, 0xdb, 0xca, 0xfc, 0x38, 0x2a, 0x8d, 0x59, 0x14, 0xa0, 0xe3, 0x6e, + 0x55, 0x80, 0xfb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x77, 0x52, 0x39, 0x58, 0x02, 0x00, + 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/feemarket/types/params.go b/x/feemarket/types/params.go index f2511c38bc..8e2000e733 100644 --- a/x/feemarket/types/params.go +++ b/x/feemarket/types/params.go @@ -20,16 +20,15 @@ import ( "math/big" sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/ethereum/go-ethereum/params" ) var ( // DefaultMinGasMultiplier is 0.5 or 50% - DefaultMinGasMultiplier = sdk.NewDecWithPrec(50, 2) + DefaultMinGasMultiplier = sdkmath.LegacyNewDecWithPrec(50, 2) // DefaultMinGasPrice is 0 (i.e disabled) - DefaultMinGasPrice = sdk.ZeroDec() + DefaultMinGasPrice = sdkmath.LegacyZeroDec() // DefaultEnableHeight is 0 (i.e disabled) DefaultEnableHeight = int64(0) // DefaultNoBaseFee is false @@ -73,8 +72,8 @@ func NewParams( elasticityMultiplier uint32, baseFee uint64, enableHeight int64, - minGasPrice sdk.Dec, - minGasPriceMultiplier sdk.Dec, + minGasPrice sdkmath.LegacyDec, + minGasPriceMultiplier sdkmath.LegacyDec, ) Params { return Params{ NoBaseFee: noBaseFee, @@ -142,7 +141,7 @@ func (p Params) GetBaseFee() *big.Int { } func validateMinGasPrice(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(sdkmath.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -207,7 +206,7 @@ func validateEnableHeight(i interface{}) error { } func validateMinGasMultiplier(i interface{}) error { - v, ok := i.(sdk.Dec) + v, ok := i.(sdkmath.LegacyDec) if !ok { return fmt.Errorf("invalid parameter type: %T", i) @@ -221,7 +220,7 @@ func validateMinGasMultiplier(i interface{}) error { return fmt.Errorf("value cannot be negative: %s", v) } - if v.GT(sdk.OneDec()) { + if v.GT(sdkmath.LegacyOneDec()) { return fmt.Errorf("value cannot be greater than 1: %s", v) } return nil diff --git a/x/feemarket/types/params_test.go b/x/feemarket/types/params_test.go index 822fb08d01..1f9c182e1c 100644 --- a/x/feemarket/types/params_test.go +++ b/x/feemarket/types/params_test.go @@ -5,8 +5,6 @@ import ( sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/suite" - - sdk "github.com/cosmos/cosmos-sdk/types" ) type ParamsTestSuite struct { @@ -26,7 +24,7 @@ func (suite *ParamsTestSuite) TestParamsValidate() { {"default", DefaultParams(), false}, { "valid", - NewParams(true, 7, 3, 2000000000, int64(544435345345435345), sdk.NewDecWithPrec(20, 4), DefaultMinGasMultiplier), + NewParams(true, 7, 3, 2000000000, int64(544435345345435345), sdkmath.LegacyNewDecWithPrec(20, 4), DefaultMinGasMultiplier), false, }, { @@ -36,27 +34,27 @@ func (suite *ParamsTestSuite) TestParamsValidate() { }, { "base fee change denominator is 0 ", - NewParams(true, 0, 3, 2000000000, int64(544435345345435345), sdk.NewDecWithPrec(20, 4), DefaultMinGasMultiplier), + NewParams(true, 0, 3, 2000000000, int64(544435345345435345), sdkmath.LegacyNewDecWithPrec(20, 4), DefaultMinGasMultiplier), true, }, { "invalid: min gas price negative", - NewParams(true, 7, 3, 2000000000, int64(544435345345435345), sdk.NewDecFromInt(sdkmath.NewInt(-1)), DefaultMinGasMultiplier), + NewParams(true, 7, 3, 2000000000, int64(544435345345435345), sdkmath.LegacyNewDecFromInt(sdkmath.NewInt(-1)), DefaultMinGasMultiplier), true, }, { "valid: min gas multiplier zero", - NewParams(true, 7, 3, 2000000000, int64(544435345345435345), DefaultMinGasPrice, sdk.ZeroDec()), + NewParams(true, 7, 3, 2000000000, int64(544435345345435345), DefaultMinGasPrice, sdkmath.LegacyZeroDec()), false, }, { "invalid: min gas multiplier is negative", - NewParams(true, 7, 3, 2000000000, int64(544435345345435345), DefaultMinGasPrice, sdk.NewDecWithPrec(-5, 1)), + NewParams(true, 7, 3, 2000000000, int64(544435345345435345), DefaultMinGasPrice, sdkmath.LegacyNewDecWithPrec(-5, 1)), true, }, { "invalid: min gas multiplier bigger than 1", - NewParams(true, 7, 3, 2000000000, int64(544435345345435345), sdk.NewDecWithPrec(20, 4), sdk.NewDec(2)), + NewParams(true, 7, 3, 2000000000, int64(544435345345435345), sdkmath.LegacyNewDecWithPrec(20, 4), sdkmath.LegacyNewDec(2)), true, }, } @@ -87,9 +85,9 @@ func (suite *ParamsTestSuite) TestParamsValidatePriv() { suite.Require().Error(validateEnableHeight("")) suite.Require().Error(validateEnableHeight(int64(-544435345345435345))) suite.Require().NoError(validateEnableHeight(int64(544435345345435345))) - suite.Require().Error(validateMinGasPrice(sdk.Dec{})) - suite.Require().Error(validateMinGasMultiplier(sdk.NewDec(-5))) - suite.Require().Error(validateMinGasMultiplier(sdk.Dec{})) + suite.Require().Error(validateMinGasPrice(sdkmath.LegacyDec{})) + suite.Require().Error(validateMinGasMultiplier(sdkmath.LegacyNewDec(-5))) + suite.Require().Error(validateMinGasMultiplier(sdkmath.LegacyDec{})) suite.Require().Error(validateMinGasMultiplier("")) } @@ -100,13 +98,13 @@ func (suite *ParamsTestSuite) TestParamsValidateMinGasPrice() { expError bool }{ {"default", DefaultParams().MinGasPrice, false}, - {"valid", sdk.NewDecFromInt(sdkmath.NewInt(1)), false}, + {"valid", sdkmath.LegacyNewDecFromInt(sdkmath.NewInt(1)), false}, {"invalid - wrong type - bool", false, true}, {"invalid - wrong type - string", "", true}, {"invalid - wrong type - int64", int64(123), true}, {"invalid - wrong type - sdkmath.Int", sdkmath.NewInt(1), true}, {"invalid - is nil", nil, true}, - {"invalid - is negative", sdk.NewDecFromInt(sdkmath.NewInt(-1)), true}, + {"invalid - is negative", sdkmath.LegacyNewDecFromInt(sdkmath.NewInt(-1)), true}, } for _, tc := range testCases { diff --git a/x/feemarket/types/query.pb.go b/x/feemarket/types/query.pb.go index 5921320378..ca85f5978b 100644 --- a/x/feemarket/types/query.pb.go +++ b/x/feemarket/types/query.pb.go @@ -5,8 +5,8 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -154,7 +154,7 @@ var xxx_messageInfo_QueryBaseFeeRequest proto.InternalMessageInfo // QueryBaseFeeResponse returns the EIP1559 base fee. type QueryBaseFeeResponse struct { // base_fee is the EIP1559 base fee - BaseFee *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"base_fee,omitempty"` + BaseFee *cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=base_fee,json=baseFee,proto3,customtype=cosmossdk.io/math.Int" json:"base_fee,omitempty"` } func (m *QueryBaseFeeResponse) Reset() { *m = QueryBaseFeeResponse{} } @@ -288,35 +288,35 @@ func init() { } var fileDescriptor_71a07c1ffd85fde2 = []byte{ - // 443 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xf5, 0x12, 0x48, 0xcb, 0x72, 0x41, 0x4b, 0x5a, 0x21, 0x0b, 0x6d, 0x83, 0x91, 0xa2, 0xb6, - 0xb4, 0x5e, 0xb5, 0x5c, 0x39, 0x59, 0xa2, 0x88, 0x1b, 0x98, 0x1b, 0x12, 0xaa, 0xd6, 0x61, 0xea, - 0x5a, 0xa9, 0xbd, 0xae, 0x77, 0x13, 0xd1, 0x2b, 0x37, 0x2e, 0x08, 0xc1, 0xd7, 0xf0, 0x07, 0x39, - 0x46, 0xe2, 0x82, 0x38, 0x44, 0x28, 0xe1, 0x43, 0x90, 0x77, 0xd7, 0x49, 0x0c, 0x18, 0x72, 0xca, - 0x6a, 0xf2, 0xe6, 0xbd, 0x37, 0x6f, 0xc6, 0xd8, 0x03, 0x75, 0x0e, 0x45, 0x9a, 0x64, 0x8a, 0x9d, - 0x01, 0xa4, 0xbc, 0x18, 0x80, 0x62, 0xa3, 0x23, 0x76, 0x39, 0x84, 0xe2, 0xca, 0xcf, 0x0b, 0xa1, - 0x04, 0xd9, 0x5e, 0x60, 0xfc, 0x05, 0xc6, 0x1f, 0x1d, 0xb9, 0x9d, 0x58, 0xc4, 0x42, 0x43, 0x58, - 0xf9, 0x32, 0x68, 0xb7, 0xd7, 0xc0, 0xb8, 0x6c, 0x35, 0xb8, 0x7b, 0xb1, 0x10, 0xf1, 0x05, 0x30, - 0x9e, 0x27, 0x8c, 0x67, 0x99, 0x50, 0x5c, 0x25, 0x22, 0x93, 0xe6, 0x5f, 0xaf, 0x83, 0xc9, 0x8b, - 0xd2, 0xc2, 0x73, 0x5e, 0xf0, 0x54, 0x86, 0x70, 0x39, 0x04, 0xa9, 0xbc, 0x97, 0xf8, 0x4e, 0xad, - 0x2a, 0x73, 0x91, 0x49, 0x20, 0x8f, 0x71, 0x3b, 0xd7, 0x95, 0xbb, 0xa8, 0x8b, 0x76, 0x6f, 0x1d, - 0x53, 0xff, 0xef, 0x8e, 0x7d, 0xd3, 0x17, 0x5c, 0x1f, 0x4f, 0x77, 0x9c, 0xd0, 0xf6, 0x78, 0x5b, - 0x96, 0x34, 0xe0, 0x12, 0x4e, 0x00, 0x2a, 0xad, 0xd7, 0xb8, 0x53, 0x2f, 0x5b, 0xb1, 0x27, 0x78, - 0x33, 0xe2, 0x12, 0x4e, 0xcf, 0x00, 0xb4, 0xdc, 0xcd, 0x60, 0xff, 0xfb, 0x74, 0xa7, 0x17, 0x27, - 0xea, 0x7c, 0x18, 0xf9, 0x7d, 0x91, 0xb2, 0xbe, 0x90, 0xa9, 0x90, 0xf6, 0xe7, 0x50, 0xbe, 0x19, - 0x30, 0x75, 0x95, 0x83, 0xf4, 0x9f, 0x65, 0x2a, 0xdc, 0x88, 0x0c, 0x9d, 0xb7, 0x5d, 0xd1, 0x5f, - 0x88, 0xfe, 0xe0, 0x29, 0x5f, 0x8c, 0xb8, 0x87, 0xb7, 0x7e, 0xab, 0x5b, 0xdd, 0xdb, 0xb8, 0x15, - 0x73, 0x33, 0x61, 0x2b, 0x2c, 0x9f, 0xc7, 0x5f, 0x5a, 0xf8, 0x86, 0xc6, 0x92, 0xf7, 0x08, 0xb7, - 0xcd, 0x6c, 0x64, 0xbf, 0x69, 0xf6, 0x3f, 0xe3, 0x74, 0x1f, 0xae, 0x85, 0x35, 0xfa, 0x5e, 0xef, - 0xdd, 0xd7, 0x9f, 0x9f, 0xaf, 0x75, 0x09, 0x65, 0x0d, 0x0b, 0x36, 0x71, 0x92, 0x0f, 0x08, 0x6f, - 0xd8, 0xcc, 0xc8, 0xbf, 0x05, 0xea, 0x81, 0xbb, 0x07, 0xeb, 0x81, 0xad, 0x9d, 0x5d, 0x6d, 0xc7, - 0x23, 0xdd, 0x26, 0x3b, 0xd5, 0x92, 0xc8, 0x27, 0x84, 0x37, 0xab, 0x34, 0xc9, 0x7f, 0x44, 0xea, - 0xcb, 0x70, 0x0f, 0xd7, 0x44, 0x5b, 0x4f, 0x7b, 0xda, 0xd3, 0x03, 0x72, 0xbf, 0xd1, 0x53, 0xd9, - 0x71, 0x1a, 0x73, 0x19, 0x9c, 0x8c, 0x67, 0x14, 0x4d, 0x66, 0x14, 0xfd, 0x98, 0x51, 0xf4, 0x71, - 0x4e, 0x9d, 0xc9, 0x9c, 0x3a, 0xdf, 0xe6, 0xd4, 0x79, 0x75, 0xb0, 0x72, 0x49, 0x30, 0x2a, 0x0f, - 0x69, 0x49, 0xf6, 0x76, 0x85, 0x4e, 0xdf, 0x54, 0xd4, 0xd6, 0x9f, 0xcb, 0xa3, 0x5f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x61, 0x3c, 0x39, 0xd8, 0xc8, 0x03, 0x00, 0x00, + // 437 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x3f, 0x8f, 0xd3, 0x30, + 0x14, 0x8f, 0x29, 0xf4, 0x0e, 0xb3, 0x20, 0xd3, 0x9e, 0x20, 0x42, 0xbe, 0x12, 0xa4, 0xd3, 0x1d, + 0x1c, 0xb6, 0xee, 0x60, 0x64, 0xca, 0x70, 0x08, 0x89, 0x01, 0xc2, 0xc6, 0x52, 0x39, 0xe5, 0x35, + 0x8d, 0xda, 0xc4, 0x69, 0xec, 0x56, 0x74, 0x65, 0x63, 0x41, 0x08, 0x3e, 0x0d, 0xdf, 0xa0, 0x63, + 0x25, 0x16, 0xc4, 0x50, 0xa1, 0x96, 0x0f, 0x82, 0x12, 0x27, 0xa5, 0x01, 0x02, 0xdd, 0xac, 0x97, + 0xdf, 0xbf, 0xf7, 0x7b, 0x0a, 0x76, 0x40, 0x0f, 0x20, 0x8d, 0xc2, 0x58, 0xf3, 0x3e, 0x40, 0x24, + 0xd2, 0x21, 0x68, 0x3e, 0x3d, 0xe3, 0xe3, 0x09, 0xa4, 0x33, 0x96, 0xa4, 0x52, 0x4b, 0x72, 0xb0, + 0xc1, 0xb0, 0x0d, 0x86, 0x4d, 0xcf, 0xec, 0x56, 0x20, 0x03, 0x99, 0x43, 0x78, 0xf6, 0x32, 0x68, + 0xfb, 0xa8, 0x46, 0xf1, 0x17, 0xd5, 0xe0, 0x6e, 0x07, 0x52, 0x06, 0x23, 0xe0, 0x22, 0x09, 0xb9, + 0x88, 0x63, 0xa9, 0x85, 0x0e, 0x65, 0xac, 0xcc, 0x57, 0xa7, 0x85, 0xc9, 0x8b, 0x2c, 0xc2, 0x73, + 0x91, 0x8a, 0x48, 0x79, 0x30, 0x9e, 0x80, 0xd2, 0xce, 0x4b, 0x7c, 0xa3, 0x32, 0x55, 0x89, 0x8c, + 0x15, 0x90, 0xc7, 0xb8, 0x99, 0xe4, 0x93, 0x9b, 0xa8, 0x83, 0x8e, 0xaf, 0x9d, 0x53, 0xf6, 0xf7, + 0xc4, 0xcc, 0xf0, 0xdc, 0xcb, 0xf3, 0xe5, 0xa1, 0xe5, 0x15, 0x1c, 0xa7, 0x5d, 0x88, 0xba, 0x42, + 0xc1, 0x05, 0x40, 0xe9, 0xf5, 0x0c, 0xb7, 0xaa, 0xe3, 0xc2, 0xec, 0x11, 0xde, 0xf7, 0x85, 0x82, + 0x6e, 0x1f, 0x20, 0xb7, 0xbb, 0xea, 0xde, 0xfa, 0xb6, 0x3c, 0x6c, 0xf7, 0xa4, 0x8a, 0xa4, 0x52, + 0xaf, 0x87, 0x2c, 0x94, 0x3c, 0x12, 0x7a, 0xc0, 0x9e, 0xc6, 0xda, 0xdb, 0xf3, 0x0d, 0xdb, 0x39, + 0x28, 0xd5, 0x46, 0xb2, 0x37, 0x7c, 0x22, 0x36, 0x1b, 0x9d, 0xe0, 0xf6, 0x6f, 0xf3, 0xc2, 0xe6, + 0x3a, 0x6e, 0x04, 0xc2, 0x2c, 0xd4, 0xf0, 0xb2, 0xe7, 0xf9, 0xe7, 0x06, 0xbe, 0x92, 0x63, 0xc9, + 0x3b, 0x84, 0x9b, 0x66, 0x15, 0x72, 0xaf, 0x6e, 0xd5, 0x3f, 0xdb, 0xb3, 0xef, 0xef, 0x84, 0x35, + 0xfe, 0xce, 0xd1, 0xdb, 0x2f, 0x3f, 0x3e, 0x5d, 0xea, 0x10, 0xca, 0x6b, 0xee, 0x69, 0xda, 0x23, + 0xef, 0x11, 0xde, 0x2b, 0x2a, 0x22, 0xff, 0x36, 0xa8, 0xf6, 0x6b, 0x9f, 0xee, 0x06, 0x2e, 0xe2, + 0x1c, 0xe7, 0x71, 0x1c, 0xd2, 0xa9, 0x8b, 0x53, 0xde, 0x84, 0x7c, 0x44, 0x78, 0xbf, 0x6c, 0x93, + 0xfc, 0xc7, 0xa4, 0x7a, 0x0c, 0xfb, 0xc1, 0x8e, 0xe8, 0x22, 0xd3, 0x49, 0x9e, 0xe9, 0x2e, 0xb9, + 0x53, 0x9b, 0x29, 0x63, 0x74, 0x03, 0xa1, 0xdc, 0x8b, 0xf9, 0x8a, 0xa2, 0xc5, 0x8a, 0xa2, 0xef, + 0x2b, 0x8a, 0x3e, 0xac, 0xa9, 0xb5, 0x58, 0x53, 0xeb, 0xeb, 0x9a, 0x5a, 0xaf, 0x4e, 0x83, 0x50, + 0x0f, 0x26, 0x3e, 0xeb, 0xc9, 0x88, 0xc3, 0x34, 0x92, 0x6a, 0x4b, 0xec, 0xcd, 0x96, 0x9c, 0x9e, + 0x25, 0xa0, 0xfc, 0x66, 0xfe, 0x77, 0x3c, 0xfc, 0x19, 0x00, 0x00, 0xff, 0xff, 0x15, 0x29, 0x2d, + 0xfd, 0xb7, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -964,7 +964,7 @@ func (m *QueryBaseFeeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v cosmossdk_io_math.Int m.BaseFee = &v if err := m.BaseFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/feemarket/types/tx.pb.go b/x/feemarket/types/tx.pb.go index 6142dbd984..836ca3ab6a 100644 --- a/x/feemarket/types/tx.pb.go +++ b/x/feemarket/types/tx.pb.go @@ -132,7 +132,7 @@ func init() { func init() { proto.RegisterFile("ethermint/feemarket/v1/tx.proto", fileDescriptor_78aff2584dbf2838) } var fileDescriptor_78aff2584dbf2838 = []byte{ - // 319 bytes of a gzipped FileDescriptorProto + // 327 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x2d, 0xc9, 0x48, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 0x2b, 0xd0, @@ -146,13 +146,14 @@ var fileDescriptor_78aff2584dbf2838 = []byte{ 0xe6, 0xa5, 0x07, 0x21, 0x94, 0x0a, 0xd9, 0x70, 0xb1, 0x15, 0x80, 0x4d, 0x90, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd3, 0xc3, 0xee, 0x4d, 0x3d, 0x88, 0x3d, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0xf5, 0x58, 0xf1, 0x35, 0x3d, 0xdf, 0xa0, 0x85, 0x30, 0x4d, 0x49, 0x92, 0x4b, - 0x1c, 0xcd, 0x61, 0x41, 0xa9, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x46, 0xf9, 0x5c, 0xcc, 0xbe, + 0x1c, 0xcd, 0x61, 0x41, 0xa9, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x46, 0x65, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0x19, 0x5c, 0x3c, 0x28, 0xee, 0x56, 0xc7, 0x65, 0x1f, 0x9a, 0x39, 0x52, 0xfa, - 0x44, 0x2a, 0x84, 0x59, 0xe8, 0xe4, 0x76, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, - 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, - 0x51, 0x3a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xa9, 0x65, 0xa0, - 0xb8, 0x43, 0x44, 0x47, 0x05, 0x52, 0x84, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x03, - 0xdd, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xc8, 0xd6, 0x7f, 0x38, 0x21, 0x02, 0x00, 0x00, + 0x44, 0x2a, 0x84, 0x59, 0x28, 0xc5, 0xda, 0xf0, 0x7c, 0x83, 0x16, 0xa3, 0x93, 0xdb, 0x89, 0x47, + 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, + 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, + 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0x96, 0x81, 0xa2, 0x10, 0x11, 0x2b, 0x15, 0x48, 0xf1, 0x52, 0x52, + 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x7b, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, + 0xa8, 0x62, 0xbb, 0x28, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used.