From 03fa9dfd57b661e2a94deefbb5789c30ffe34880 Mon Sep 17 00:00:00 2001 From: yihuang Date: Mon, 4 Jul 2022 10:21:51 +0800 Subject: [PATCH] Problem: basic json-rpc failed on pruned nodes (#550) * Problem: json-rpc failed on pruned nodes Solution: - Make basic json-rpc apis works on pruned nodes - Test with integration tests * fix pystarport * remove duplicated call * fix pystarport * fix integration test * check eth_balance/eth_call don't work on pruned heights --- CHANGELOG.md | 1 + app/app.go | 28 ++--- app/encoding.go | 2 +- app/prefix.go | 2 +- app/sim_test.go | 2 +- cmd/cronosd/cmd/genaccounts.go | 6 +- cmd/cronosd/cmd/root.go | 10 +- docs/api/proto-docs.md | 36 ++++++ go.mod | 18 +-- go.sum | 78 ++++++++++-- gomod2nix.toml | 53 ++++---- integration_tests/configs/pruned-node.yaml | 65 ++++++++++ integration_tests/cosmoscli.py | 12 +- integration_tests/poetry.lock | 81 ++++++++---- integration_tests/pyproject.toml | 2 +- integration_tests/shell.nix | 1 - integration_tests/test_ibc.py | 4 +- integration_tests/test_pruned_node.py | 116 ++++++++++++++++++ nix/default.nix | 8 +- nix/scripts.nix | 6 +- nix/sources.json | 13 -- nix/testenv.nix | 5 + scripts/cronos-devnet.yaml | 2 +- .../crypto/v1/ethsecp256k1/keys.proto | 6 +- third_party/proto/ethermint/evm/v1/evm.proto | 48 +++++--- .../proto/ethermint/evm/v1/genesis.proto | 11 +- .../proto/ethermint/evm/v1/query.proto | 69 +++++++++-- third_party/proto/ethermint/evm/v1/tx.proto | 9 +- .../ethermint/feemarket/v1/feemarket.proto | 15 ++- .../ethermint/feemarket/v1/genesis.proto | 14 +-- .../proto/ethermint/feemarket/v1/query.proto | 21 ++-- .../proto/ethermint/types/v1/account.proto | 17 +-- .../proto/ethermint/types/v1/web3.proto | 6 +- x/cronos/client/cli/query.go | 2 +- x/cronos/handler_test.go | 2 +- x/cronos/keeper/evm.go | 2 +- x/cronos/keeper/evm_test.go | 2 +- x/cronos/keeper/grpc_query.go | 2 +- x/cronos/keeper/ibc_test.go | 2 +- x/cronos/keeper/keeper_test.go | 6 +- x/cronos/keeper/params.go | 2 +- x/cronos/rpc/api.go | 52 ++++---- x/cronos/types/interfaces.go | 2 +- x/cronos/types/query.pb.go | 2 +- 44 files changed, 604 insertions(+), 239 deletions(-) create mode 100644 integration_tests/configs/pruned-node.yaml create mode 100644 integration_tests/test_pruned_node.py diff --git a/CHANGELOG.md b/CHANGELOG.md index cf0aeee753..cfa58c4cfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - [cronos#418](https://github.com/crypto-org-chain/cronos/pull/418) Support logs in evm-hooks and return id for SendToEthereum events - [cronos#489](https://github.com/crypto-org-chain/cronos/pull/489) Enable jemalloc memory allocator, and update rocksdb src to `v6.29.5`. - [cronos#511](https://github.com/crypto-org-chain/cronos/pull/511) Replace ibc-hook with ibc middleware, use ibc-go upstream version. +- [cronos#550](https://github.com/crypto-org-chain/cronos/pull/550) Support basic json-rpc apis on pruned nodes. *May 3, 2022* diff --git a/app/app.go b/app/app.go index e18785c60d..b76e43940c 100644 --- a/app/app.go +++ b/app/app.go @@ -97,16 +97,16 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper" tmjson "github.com/tendermint/tendermint/libs/json" - evmante "github.com/tharsis/ethermint/app/ante" - srvflags "github.com/tharsis/ethermint/server/flags" - ethermint "github.com/tharsis/ethermint/types" - "github.com/tharsis/ethermint/x/evm" - evmrest "github.com/tharsis/ethermint/x/evm/client/rest" - evmkeeper "github.com/tharsis/ethermint/x/evm/keeper" - evmtypes "github.com/tharsis/ethermint/x/evm/types" - "github.com/tharsis/ethermint/x/feemarket" - feemarketkeeper "github.com/tharsis/ethermint/x/feemarket/keeper" - feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types" + evmante "github.com/evmos/ethermint/app/ante" + srvflags "github.com/evmos/ethermint/server/flags" + ethermint "github.com/evmos/ethermint/types" + "github.com/evmos/ethermint/x/evm" + evmrest "github.com/evmos/ethermint/x/evm/client/rest" + evmkeeper "github.com/evmos/ethermint/x/evm/keeper" + evmtypes "github.com/evmos/ethermint/x/evm/types" + "github.com/evmos/ethermint/x/feemarket" + feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" + feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" "github.com/peggyjv/gravity-bridge/module/v2/x/gravity" gravitykeeper "github.com/peggyjv/gravity-bridge/module/v2/x/gravity/keeper" @@ -334,7 +334,7 @@ func New( } // Add the EVM transient store key - tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey) + tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientKey, feemarkettypes.TransientKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) app := &App{ @@ -419,7 +419,7 @@ func New( // Create Ethermint keepers app.FeeMarketKeeper = feemarketkeeper.NewKeeper( - appCodec, keys[feemarkettypes.StoreKey], app.GetSubspace(feemarkettypes.ModuleName), + appCodec, app.GetSubspace(feemarkettypes.ModuleName), keys[feemarkettypes.StoreKey], tkeys[feemarkettypes.TransientKey], ) app.EvmKeeper = evmkeeper.NewKeeper( @@ -616,6 +616,8 @@ func New( minttypes.ModuleName, crisistypes.ModuleName, ibchost.ModuleName, + evmtypes.ModuleName, + feemarkettypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName, @@ -624,8 +626,6 @@ func New( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, - evmtypes.ModuleName, - feemarkettypes.ModuleName, cronostypes.ModuleName, } diff --git a/app/encoding.go b/app/encoding.go index 9d9b15fc0c..89fe7e3fc0 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -2,7 +2,7 @@ package app import ( "github.com/cosmos/cosmos-sdk/simapp/params" - evmenc "github.com/tharsis/ethermint/encoding" + evmenc "github.com/evmos/ethermint/encoding" ) // MakeEncodingConfig creates the EncodingConfig for cronos chain diff --git a/app/prefix.go b/app/prefix.go index 63e8173074..83a8bc1c61 100644 --- a/app/prefix.go +++ b/app/prefix.go @@ -3,7 +3,7 @@ package app import ( sdk "github.com/cosmos/cosmos-sdk/types" cmdcfg "github.com/crypto-org-chain/cronos/cmd/cronosd/config" - ethcfg "github.com/tharsis/ethermint/cmd/config" + ethcfg "github.com/evmos/ethermint/cmd/config" ) func SetConfig() { diff --git a/app/sim_test.go b/app/sim_test.go index 9ac8f11558..a83b997b44 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -12,7 +12,7 @@ import ( "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/store" diff --git a/cmd/cronosd/cmd/genaccounts.go b/cmd/cronosd/cmd/genaccounts.go index 1eb13d120b..c09b110838 100644 --- a/cmd/cronosd/cmd/genaccounts.go +++ b/cmd/cronosd/cmd/genaccounts.go @@ -20,9 +20,9 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/tharsis/ethermint/crypto/hd" - ethermint "github.com/tharsis/ethermint/types" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + "github.com/evmos/ethermint/crypto/hd" + ethermint "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" ) const ( diff --git a/cmd/cronosd/cmd/root.go b/cmd/cronosd/cmd/root.go index 5583bc811d..dbfec44e3b 100644 --- a/cmd/cronosd/cmd/root.go +++ b/cmd/cronosd/cmd/root.go @@ -35,11 +35,11 @@ import ( "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - ethermintclient "github.com/tharsis/ethermint/client" - "github.com/tharsis/ethermint/crypto/hd" - ethermintserver "github.com/tharsis/ethermint/server" - servercfg "github.com/tharsis/ethermint/server/config" - ethermint "github.com/tharsis/ethermint/types" + ethermintclient "github.com/evmos/ethermint/client" + "github.com/evmos/ethermint/crypto/hd" + ethermintserver "github.com/evmos/ethermint/server" + servercfg "github.com/evmos/ethermint/server/config" + ethermint "github.com/evmos/ethermint/types" "github.com/crypto-org-chain/cronos/app" // this line is used by starport scaffolding # stargate/root/import diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 1af582e5de..65c2642db1 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -17,6 +17,8 @@ - [ContractByDenomResponse](#cronos.ContractByDenomResponse) - [DenomByContractRequest](#cronos.DenomByContractRequest) - [DenomByContractResponse](#cronos.DenomByContractResponse) + - [ReplayBlockRequest](#cronos.ReplayBlockRequest) + - [ReplayBlockResponse](#cronos.ReplayBlockResponse) - [Query](#cronos.Query) @@ -202,6 +204,39 @@ DenomByContractResponse is the response type of DenomByContract call + + + +### ReplayBlockRequest +ReplayBlockRequest + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msgs` | [ethermint.evm.v1.MsgEthereumTx](#ethermint.evm.v1.MsgEthereumTx) | repeated | the eth messages in the block | +| `block_number` | [int64](#int64) | | | +| `block_hash` | [string](#string) | | | +| `block_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | + + + + + + + + +### ReplayBlockResponse +ReplayBlockResponse + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `responses` | [ethermint.evm.v1.MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | repeated | | + + + + + @@ -218,6 +253,7 @@ Query defines the gRPC querier service. | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `ContractByDenom` | [ContractByDenomRequest](#cronos.ContractByDenomRequest) | [ContractByDenomResponse](#cronos.ContractByDenomResponse) | ContractByDenom queries contract addresses by native denom | GET|/cronos/v1/contract_by_denom/{denom}| | `DenomByContract` | [DenomByContractRequest](#cronos.DenomByContractRequest) | [DenomByContractResponse](#cronos.DenomByContractResponse) | DenomByContract queries native denom by contract address | GET|/cronos/v1/denom_by_contract/{contract}| +| `ReplayBlock` | [ReplayBlockRequest](#cronos.ReplayBlockRequest) | [ReplayBlockResponse](#cronos.ReplayBlockResponse) | ReplayBlock replay the eth messages in the block to recover the results of false-failed txs. | | diff --git a/go.mod b/go.mod index 04574e0b09..ad5d839450 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,9 @@ go 1.17 require ( github.com/armon/go-metrics v0.4.0 github.com/cosmos/cosmos-sdk v0.45.5-0.20220523154235-2921a1c3c918 - github.com/cosmos/ibc-go/v3 v3.0.0 + github.com/cosmos/ibc-go/v3 v3.1.0 github.com/ethereum/go-ethereum v1.10.17 + github.com/evmos/ethermint v0.6.1-0.20220629170828-b7878fd6f125 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 @@ -14,14 +15,13 @@ require ( github.com/peggyjv/gravity-bridge/module/v2 v2.0.0-20220420162017-838c0d25e974 github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.4.0 + github.com/spf13/cobra v1.5.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.7.5 github.com/tendermint/tendermint v0.34.20-0.20220517115723-e6f071164839 github.com/tendermint/tm-db v0.6.7 - github.com/tharsis/ethermint v0.6.1-0.20220531102640-5533beed71e1 - google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd - google.golang.org/grpc v1.46.2 + google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad + google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -139,16 +139,16 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/zondax/hid v0.9.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 // indirect + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 // indirect - gopkg.in/yaml.v3 v3.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect ) diff --git a/go.sum b/go.sum index 5dbecee19b..c24a4a88b4 100644 --- a/go.sum +++ b/go.sum @@ -42,6 +42,8 @@ cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -271,8 +273,9 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= -github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= +github.com/cosmos/ibc-go/v3 v3.1.0 h1:aVPqkrGBluz6t9+d/sLZIG/zQ9O1KJzVeR4UlL/IFTQ= +github.com/cosmos/ibc-go/v3 v3.1.0/go.mod h1:DbOlOa4yKumaHGKApKkJN90L88PCjSD9ZBdAfL9tT40= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= @@ -281,6 +284,7 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc 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.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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/gravity-bridge/module/v2 v2.0.0-20220620100333-f9256032790b h1:ke3+KfBD6u1wv5amegov8hTBUZXXclGcvo40yNh15+E= @@ -350,15 +354,21 @@ github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPO github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= +github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.11/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= +github.com/ethereum/go-ethereum v1.10.16/go.mod h1:Anj6cxczl+AHy63o4X9O8yWNHuN5wMpfb8MAnHkWn7Y= github.com/ethereum/go-ethereum v1.10.17 h1:XEcumY+qSr1cZQaWsQs5Kck3FHB0V2RiMHPdTBJ+oT8= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= +github.com/evmos/ethermint v0.6.1-0.20220629170828-b7878fd6f125 h1:k578/Ex65RmVMmCsjxBxnMDaBjmFS3VvVKVBELvL6I4= +github.com/evmos/ethermint v0.6.1-0.20220629170828-b7878fd6f125/go.mod h1:BmXULZy8lbld5KgNE0zM4b7Dy1irPpL6nsDH11SMNzQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -378,6 +388,7 @@ github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= 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.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -515,6 +526,7 @@ 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 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/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.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= @@ -537,6 +549,7 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe 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-20210407192527-94a9f03dee38/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= @@ -554,6 +567,7 @@ github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pf github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= 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/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= @@ -657,6 +671,7 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= +github.com/huin/goupnp v1.0.1-0.20210310174557-0ca763054c88/go.mod h1:nNs7wvRfN1eKaMknBydLNQU6146XQim8t4h+q90biWo= github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204 h1:+EYBkW+dbi3F/atB+LSQZSWh7+HNrV3A/N0y6DSoy9k= github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= @@ -741,6 +756,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 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= @@ -808,6 +824,7 @@ github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKju github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/miguelmota/go-ethereum-hdwallet v0.1.1 h1:zdXGlHao7idpCBjEGTXThVAtMKs+IxAgivZ75xqkWK0= +github.com/miguelmota/go-ethereum-hdwallet v0.1.1/go.mod h1:f9m9uXokAHA6WNoYOPjj4AqjJS5pquQRiYYj/XSyPYc= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -881,14 +898,19 @@ 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.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= +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 v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -967,6 +989,7 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= @@ -1023,6 +1046,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= @@ -1040,6 +1064,7 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/sagikazarmark/crypt v0.5.0/go.mod h1:l+nzl7KWh51rpzp2h7t4MZWyiEWdhNpOAnclKvg+mdA= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= @@ -1082,8 +1107,9 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= 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= @@ -1112,8 +1138,9 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= 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.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1121,13 +1148,15 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 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 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.5 h1:s5PTfem8p8EbKQOctVV53k6jCJt3UX4IEJzwh+C324Q= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= +github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= 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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= @@ -1145,8 +1174,6 @@ github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8 github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= -github.com/tharsis/ethermint v0.6.1-0.20220531102640-5533beed71e1 h1:mVilg8qjOA6cv5aPAACmD4uOMv9xRM6cRcg/qmIIpUc= -github.com/tharsis/ethermint v0.6.1-0.20220531102640-5533beed71e1/go.mod h1:x5kd4qhUF3j2TShHImrb2NXsUluPFfQJ193m/rF641k= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -1196,6 +1223,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de 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.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -1207,13 +1235,17 @@ go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mI go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/pkg/v3 v3.5.2/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.etcd.io/etcd/client/v2 v2.305.2/go.mod h1:2D7ZejHVMIfog1221iLSYlQRzrtECw3kz4I4VAQm3qI= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1269,10 +1301,11 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 h1:SLP7Q4Di66FONjDJbCYrCRrh97focO6sLogHO7/g8F0= -golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1316,6 +1349,7 @@ 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.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= 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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1378,12 +1412,14 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b/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= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1416,8 +1452,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1521,6 +1558,7 @@ golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/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-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/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-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1529,8 +1567,10 @@ golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1624,11 +1664,13 @@ 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.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= @@ -1674,6 +1716,9 @@ google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQ google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= 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= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1765,8 +1810,14 @@ google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad h1:kqrS+lhvaMHCxul6sKQvKJ8nAAhlVItmZV822hYFH/U= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1824,8 +1875,9 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= gopkg.in/yaml.v3 v3.0.0/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/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= 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= diff --git a/gomod2nix.toml b/gomod2nix.toml index 773063c19b..44aed7b86a 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -394,8 +394,8 @@ schema = 1 version = "v0.17.3" hash = "sha256-gRWMH/ijkw569JSYsAVnZljH3Q6ywTTc6P8DdyJKKAk=" [mod."github.com/cosmos/ibc-go/v3"] - version = "v3.0.0" - hash = "sha256-RukNWraHwPQdVZ8CC1uTDD0CcNG1cH2zPdC7KquTawA=" + version = "v3.1.0" + hash = "sha256-WC85lenP1oiZmcb9CD+02hodGA4JYy4dhNDTUmFjn1I=" [mod."github.com/cosmos/ledger-cosmos-go"] version = "v0.11.1" hash = "sha256-yli+VvVtZmHo2LPvCY6lYVUfcCDn3sBLDL+a8KIlqDA=" @@ -406,8 +406,8 @@ schema = 1 version = "v1.0.10" hash = "sha256-XP8oKAx5LgQ0fO1rjO9tWnbXB431VOzXVaRDPUP900g=" [mod."github.com/cpuguy83/go-md2man/v2"] - version = "v2.0.1" - hash = "sha256-R+8iYit0mZjCxiGlp2C3Y5tGhySSNFU1v6wqsWKGBPM=" + version = "v2.0.2" + hash = "sha256-OvWCtDsVrYzM84SMQwOXPLBxnWnMC1hDm+KiI6zm3uk=" [mod."github.com/creack/pty"] version = "v1.1.9" hash = "sha256-Rj6c4/3IApJcS36iPVIEdlMSC/SWmywnpqk1500ik5k=" @@ -519,6 +519,9 @@ schema = 1 [mod."github.com/ethereum/go-ethereum"] version = "v1.10.17" hash = "sha256-oFSly6cELr9SSNG/2sCvOXJCZ8DKRRZtj9zsKdHoM0o=" + [mod."github.com/evmos/ethermint"] + version = "v0.6.1-0.20220629170828-b7878fd6f125" + hash = "sha256-2b0modIaqL8hTCYmjEMHKmD/RW8Pq5L5fcHEFuIrJ9U=" [mod."github.com/facebookgo/ensure"] version = "v0.0.0-20200202191622-63f1cf65ac4c" hash = "sha256-ZvQLMu0LBtRB4lMgY4DlsKxiRUzmh8W4KvGYJF4icRc=" @@ -1163,11 +1166,14 @@ schema = 1 version = "v0.0.5" hash = "sha256-/5i70IkH/qSW5KjGzv8aQNKh9tHoz98tqtL0K2DMFn4=" [mod."github.com/onsi/ginkgo"] - version = "v1.16.5" - hash = "sha256-Q3CKWQyIJKOiX9cs4t5Nz4pYxj6CT3AWnMXRNiM71GQ=" + version = "v1.16.4" + hash = "sha256-+rsbCrlS+05k+G14Ov/GYAmpLN09Vp0F2LMKkyUIftE=" + [mod."github.com/onsi/ginkgo/v2"] + version = "v2.1.4" + hash = "sha256-b/5ByIRFvmRp++0oGZCYcHhAFbk4Cborj2BmvmvVzV0=" [mod."github.com/onsi/gomega"] - version = "v1.13.0" - hash = "sha256-D2mta6XvgQHXpi87y9eemauEE5SEHel2Jx8EIOnCifQ=" + version = "v1.19.0" + hash = "sha256-0bCCq8v8m2VqUM1zmS0NfXSjMXS39GXB1mTqkyaHVyQ=" [mod."github.com/op/go-logging"] version = "v0.0.0-20160315200505-970db520ece7" hash = "sha256-kk1wY0YgUzB7OvV0LzX/Dak5243/TJt3+OEAWrpQ9rI=" @@ -1389,8 +1395,8 @@ schema = 1 version = "v1.5.0" hash = "sha256-Pdp+wC5FWqyJKzyYHb7JCcV9BoJk/sxQw6nLyuLJvuQ=" [mod."github.com/spf13/cobra"] - version = "v1.4.0" - hash = "sha256-I6j9sD61Ztcc2W/WGeWo3ggYtnGTxNxZ2EFPdtO0UEY=" + version = "v1.5.0" + hash = "sha256-rcyHWrxshA5DVpxrSba5X4NjppqOGrJ64QkUKKnfW2E=" [mod."github.com/spf13/jwalterweatherman"] version = "v1.1.0" hash = "sha256-62BQtqTLF/eVrTOr7pUXE7AiHRjOVC8jQs3/Ehmflfs=" @@ -1416,11 +1422,11 @@ schema = 1 version = "v0.0.0-20200128134331-0f66f006fb2e" hash = "sha256-xAc83ej4LLjtU6VZY7ELYpOkppRlNS0n+tVI12wwlQ0=" [mod."github.com/stretchr/objx"] - version = "v0.2.0" - hash = "sha256-fx9mfz6FjbV2YtLQzk7Wzd+saejwoad2scLLC7Apvnw=" + version = "v0.4.0" + hash = "sha256-W6ycaeD/okr4udpCAGDsByr3OmiR0fuBzJUXHaHEFC0=" [mod."github.com/stretchr/testify"] - version = "v1.7.1" - hash = "sha256-FcMk8eXO4sgVOYdpTZb8T+HpSXlZ0v4qd3UpP7DE6jk=" + version = "v1.7.5" + hash = "sha256-XLXQfoP1BQPOHsewXV8VNRWeb0275PlFRSL906eUxnI=" [mod."github.com/subosito/gotenv"] version = "v1.3.0" hash = "sha256-8AjkGo9t2W/VCr1bD6JJXRYUkRFyIOR5ipiAxhHnAEs=" @@ -1448,9 +1454,6 @@ schema = 1 [mod."github.com/tendermint/tm-db"] version = "v0.6.7" hash = "sha256-hl/3RrBrpkk2zA6dmrNlIYKs1/GfqegSscDSkA5Pjlo=" - [mod."github.com/tharsis/ethermint"] - version = "v0.6.1-0.20220531102640-5533beed71e1" - hash = "sha256-pOGBpj7HAaTP1OnuL2VmVxcJTnJroMp7/8ZL5EqUrjI=" [mod."github.com/tidwall/gjson"] version = "v1.6.7" hash = "sha256-GL6MI9oNq+Pjxai9RtDPBeSpIuMTPQZPsB2vcntCBr8=" @@ -1578,8 +1581,8 @@ schema = 1 version = "v1.19.1" hash = "sha256-n4fccCHVtdrDpZSo98wQVrPl+vB/O1/hFC4htiV/Knk=" [mod."golang.org/x/crypto"] - version = "v0.0.0-20220518034528-6f7dac969898" - hash = "sha256-1b+B1A2YNDlkdoXlFaFt2hdH9/JY7DblweNLbPI05qs=" + version = "v0.0.0-20220525230936-793ad666bf5e" + hash = "sha256-xc+juPFuN1rbn+hqHuLNO39KFilw4aAm6NnxeKMAI+0=" [mod."golang.org/x/exp"] version = "v0.0.0-20200331195152-e8c3332aa8e5" hash = "sha256-MExE79kQMuY+sd0QmVBKKEl0pvJTmwm85HTxsFwMDB8=" @@ -1602,8 +1605,8 @@ schema = 1 version = "v0.0.0-20220411215720-9780585627b5" hash = "sha256-PubcNZWej7Pb8TnHNfXPkRo3Gj91YfePvvN5ImftEbs=" [mod."golang.org/x/sync"] - version = "v0.0.0-20210220032951-036812b2e83c" - hash = "sha256-qyBoAsnVWZyQM7UkJ573EjijMHK0q5mVoY/o4a8Agr4=" + version = "v0.0.0-20220513210516-0976fa681c29" + hash = "sha256-26T9yWx1pkXjXzBn0yj+trVpXPX6rTtly9pPzwVgAyg=" [mod."golang.org/x/sys"] version = "v0.0.0-20220520151302-bc2c85ada10a" hash = "sha256-3xm4LbLhZjjeb8scaNFRa9zYb8z2fZj+/JBcoyXGPR8=" @@ -1638,8 +1641,8 @@ schema = 1 version = "v1.6.7" hash = "sha256-zIxGRHiq4QBvRqkrhMGMGCaVL4iM4TtlYpAi/hrivS4=" [mod."google.golang.org/genproto"] - version = "v0.0.0-20220519153652-3a47de7e79bd" - hash = "sha256-BDKaNIbYYg39KoooEIXB+0t6WuuaUsAB2D9SUEmQ+fg=" + version = "v0.0.0-20220617124728-180714bec0ad" + hash = "sha256-9h/04xtGU2XSEK4gNjjolBZK0sSrw9zZS6Ec6YAb8Sw=" [mod."google.golang.org/grpc"] version = "v1.33.2" hash = "sha256-0vOeuHDvRviofJmr4dOzUh4Y1y2X6ujGCcLcICVnQ0Q=" @@ -1693,8 +1696,8 @@ schema = 1 version = "v2.4.0" hash = "sha256-uVEGglIedjOIGZzHW4YwN1VoRSTK8o0eGZqzd+TNdd0=" [mod."gopkg.in/yaml.v3"] - version = "v3.0.0" - hash = "sha256-XWfvIV7+KXlZV4sBZd0srGeuQonS9cTYptCc6NcgVvc=" + version = "v3.0.1" + hash = "sha256-FqL9TKYJ0XkNwJFnq9j0VvJ5ZUU1RvH/52h/f5bkYAU=" [mod."gotest.tools"] version = "v2.2.0+incompatible" hash = "sha256-BYTGCeD1GH0nUMxaP1ARTpfGk3vQroDNAgb3LYKhon4=" diff --git a/integration_tests/configs/pruned-node.yaml b/integration_tests/configs/pruned-node.yaml new file mode 100644 index 0000000000..d0ce85d1b5 --- /dev/null +++ b/integration_tests/configs/pruned-node.yaml @@ -0,0 +1,65 @@ +dotenv: ../../scripts/.env +cronos_777-1: + cmd: cronosd + start-flags: "--trace" + app-config: + minimum-gas-prices: 0basetcro + index-events: + - ethereum_tx.ethereumTxHash + pruning: "everything" + state-sync: + snapshot-interval: 0 + json-rpc: + address: "0.0.0.0:{EVMRPC_PORT}" + ws-address: "0.0.0.0:{EVMRPC_PORT_WS}" + api: "eth,net,web3,debug,cronos" + validators: + - coins: 1000000000000000000stake,10000000000000000000000basetcro + staked: 1000000000000000000stake + mnemonic: ${VALIDATOR1_MNEMONIC} + - coins: 1000000000000000000stake,10000000000000000000000basetcro + staked: 1000000000000000000stake + mnemonic: ${VALIDATOR2_MNEMONIC} + accounts: + - name: community + coins: 10000000000000000000000basetcro + mnemonic: ${COMMUNITY_MNEMONIC} + - name: signer1 + coins: 20000000000000000000000basetcro + mnemonic: ${SIGNER1_MNEMONIC} + - name: signer2 + coins: 30000000000000000000000basetcro + mnemonic: ${SIGNER2_MNEMONIC} + + + genesis: + consensus_params: + block: + max_bytes: "1048576" + max_gas: "81500000" + app_state: + evm: + params: + evm_denom: basetcro + cronos: + params: + cronos_admin: ${CRONOS_ADMIN} + enable_auto_deployment: true + ibc_cro_denom: ${IBC_CRO_DENOM} + gov: + voting_params: + voting_period: "10s" + deposit_params: + max_deposit_period: "10s" + min_deposit: + - denom: "basetcro" + amount: "1" + transfer: + params: + receive_enabled: true + send_enabled: true + feemarket: + params: + no_base_fee: false + base_fee: "100000000000" + min_gas_multiplier: "0" diff --git a/integration_tests/cosmoscli.py b/integration_tests/cosmoscli.py index 2fa0058c2d..5d113176e4 100644 --- a/integration_tests/cosmoscli.py +++ b/integration_tests/cosmoscli.py @@ -1,6 +1,7 @@ import enum import hashlib import json +import subprocess import tempfile import bech32 @@ -37,10 +38,10 @@ class ChainCommand: def __init__(self, cmd): self.cmd = cmd - def __call__(self, cmd, *args, stdin=None, **kwargs): + def __call__(self, cmd, *args, stdin=None, stderr=subprocess.STDOUT, **kwargs): "execute chain-maind" args = " ".join(build_cli_args_safe(cmd, *args, **kwargs)) - return interact(f"{self.cmd} {args}", input=stdin) + return interact(f"{self.cmd} {args}", input=stdin, stderr=stderr) class CosmosCLI: @@ -1037,6 +1038,10 @@ def build_evm_tx(self, raw_tx: str, **kwargs): ) def transfer_tokens(self, from_, to, amount, **kwargs): + default_kwargs = { + "gas": "auto", + "gas_adjustment": "1.5", + } return json.loads( self.raw( "tx", @@ -1047,6 +1052,7 @@ def transfer_tokens(self, from_, to, amount, **kwargs): amount, "-y", home=self.data_dir, - **kwargs, + stderr=subprocess.DEVNULL, + **(default_kwargs | kwargs), ) ) diff --git a/integration_tests/poetry.lock b/integration_tests/poetry.lock index 2cf4ce2229..ab9c862aaf 100644 --- a/integration_tests/poetry.lock +++ b/integration_tests/poetry.lock @@ -162,21 +162,20 @@ cython = ["cython"] [[package]] name = "docker" -version = "4.4.4" +version = "5.0.3" description = "A Python library for the Docker Engine API." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" [package.dependencies] pywin32 = {version = "227", markers = "sys_platform == \"win32\""} requests = ">=2.14.2,<2.18.0 || >2.18.0" -six = ">=1.4.0" websocket-client = ">=0.32.0" [package.extras] ssh = ["paramiko (>=2.4.2)"] -tls = ["pyOpenSSL (>=17.5.0)", "cryptography (>=1.3.4)", "idna (>=2.0.0)"] +tls = ["pyOpenSSL (>=17.5.0)", "cryptography (>=3.4.7)", "idna (>=2.0.0)"] [[package]] name = "durations" @@ -521,6 +520,14 @@ python-versions = "*" [package.dependencies] jsonschema = "*" +[[package]] +name = "jsonnet" +version = "0.18.0" +description = "Python bindings for Jsonnet - The data templating language" +category = "main" +optional = false +python-versions = "*" + [[package]] name = "jsonschema" version = "4.4.0" @@ -741,20 +748,29 @@ version = "0.2.4" description = "Spawn local devnets for cosmos-sdk chains" category = "main" optional = false -python-versions = ">=3.8,<4.0" +python-versions = "^3.8" +develop = false [package.dependencies] -bech32 = ">=1.1.0,<2.0.0" -docker = ">=4.3.1,<5.0.0" -durations = ">=0.3.3,<0.4.0" -fire = ">=0.4.0,<0.5.0" -jsonmerge = ">=1.7.0,<2.0.0" -multitail2 = ">=1.5.2,<2.0.0" -python-dateutil = ">=2.8.1,<3.0.0" -python-dotenv = ">=0.19.2,<0.20.0" -PyYAML = ">=5.3.1,<6.0.0" -supervisor = ">=4.2.1,<5.0.0" -tomlkit = ">=0.7.0,<0.8.0" +bech32 = "^1.1.0" +docker = "^5.0.3" +durations = "^0.3.3" +fire = "^0.4.0" +jsonmerge = "^1.7.0" +jsonnet = "^0.18.0" +multitail2 = "^1.5.2" +python-dateutil = "^2.8.1" +python-dotenv = "^0.19.2" +PyYAML = "^5.3.1" +pyyaml-include = "^1.3" +supervisor = "^4.2.1" +tomlkit = "^0.7.0" + +[package.source] +type = "git" +url = "https://github.com/crypto-com/pystarport.git" +reference = "main" +resolved_reference = "dd759fdfb2e1a7320133a315817ae45c849efb8b" [[package]] name = "pytest" @@ -826,6 +842,21 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +[[package]] +name = "pyyaml-include" +version = "1.3" +description = "Extending PyYAML with a custom constructor for including YAML files within YAML files" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +PyYAML = ">=5.1,<7.0" + +[package.extras] +all = ["toml"] +toml = ["toml"] + [[package]] name = "requests" version = "2.27.1" @@ -1041,7 +1072,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "cbc2a1d2ee11b7aad3a3ad84ebfd0efdd113573e4b319eca94ca4893e3f53dab" +content-hash = "a0b34c794fd9b13cda601a3869b2f9ea3df0feac941ace93b7ae12fab47eaaec" [metadata.files] aiohttp = [ @@ -1184,14 +1215,13 @@ click = [ ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, - {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] cytoolz = [ {file = "cytoolz-0.11.2.tar.gz", hash = "sha256:ea23663153806edddce7e4153d1d407d62357c05120a4e8485bddf1bd5ab22b4"}, ] docker = [ - {file = "docker-4.4.4-py2.py3-none-any.whl", hash = "sha256:f3607d5695be025fa405a12aca2e5df702a57db63790c73b927eb6a94aac60af"}, - {file = "docker-4.4.4.tar.gz", hash = "sha256:d3393c878f575d3a9ca3b94471a3c89a6d960b35feb92f033c0de36cc9d934db"}, + {file = "docker-5.0.3-py2.py3-none-any.whl", hash = "sha256:7a79bb439e3df59d0a72621775d600bc8bc8b422d285824cb37103eab91d1ce0"}, + {file = "docker-5.0.3.tar.gz", hash = "sha256:d916a26b62970e7c2f554110ed6af04c7ccff8e9f81ad17d0d40c75637e227fb"}, ] durations = [ {file = "durations-0.3.3.tar.gz", hash = "sha256:820ffe09c390469dc621b6a0aa46d3a624b6dadf09b439e175696b6f6b77ef2f"}, @@ -1395,6 +1425,9 @@ isort = [ jsonmerge = [ {file = "jsonmerge-1.8.0.tar.gz", hash = "sha256:a86bfc44f32f6a28b749743df8960a4ce1930666b3b73882513825f845cb9558"}, ] +jsonnet = [ + {file = "jsonnet-0.18.0.tar.gz", hash = "sha256:4ccd13427e9097b6b7d6d38f78f638a55ab8b452a257639e8e9af2178ec235d4"}, +] jsonschema = [ {file = "jsonschema-4.4.0-py3-none-any.whl", hash = "sha256:77281a1f71684953ee8b3d488371b162419767973789272434bbc3f29d9c8823"}, {file = "jsonschema-4.4.0.tar.gz", hash = "sha256:636694eb41b3535ed608fe04129f26542b59ed99808b4f688aa32dcf55317a83"}, @@ -1625,9 +1658,7 @@ pysha3 = [ {file = "pysha3-1.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:0060a66be16665d90c432f55a0ba1f6480590cfb7d2ad389e688a399183474f0"}, {file = "pysha3-1.0.2.tar.gz", hash = "sha256:fe988e73f2ce6d947220624f04d467faf05f1bbdbc64b0a201296bb3af92739e"}, ] -pystarport = [ - {file = "pystarport-0.2.4-py3-none-any.whl", hash = "sha256:b412df8f9aea9a66b579faf142f14fe7b9965c5ebce75f7c8314951eb62c9053"}, -] +pystarport = [] pytest = [ {file = "pytest-7.1.1-py3-none-any.whl", hash = "sha256:92f723789a8fdd7180b6b06483874feca4c48a5c76968e03bb3e7f806a1869ea"}, {file = "pytest-7.1.1.tar.gz", hash = "sha256:841132caef6b1ad17a9afde46dc4f6cfa59a05f9555aae5151f73bdf2820ca63"}, @@ -1689,6 +1720,10 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, ] +pyyaml-include = [ + {file = "pyyaml-include-1.3.tar.gz", hash = "sha256:f7fbeb8e71b50be0e6e07472f7c79dbfb1a15bade9c93a078369ff49e57e6771"}, + {file = "pyyaml_include-1.3-py3-none-any.whl", hash = "sha256:5142a0b0f93d9b1e5872d5a814f3681ffbc70638128ced1acfd9fb57da7825ca"}, +] requests = [ {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, diff --git a/integration_tests/pyproject.toml b/integration_tests/pyproject.toml index d5dd308c32..9a074c91a1 100644 --- a/integration_tests/pyproject.toml +++ b/integration_tests/pyproject.toml @@ -20,7 +20,7 @@ python-dateutil = "^2.8.1" web3 = "^5.20.1" eth-bloom = "^1.0.4" python-dotenv = "^0.19.2" -pystarport = "^0.2.3" +pystarport = { git = "https://github.com/crypto-com/pystarport.git", branch = "main" } websockets = "^9.1" toml = "^0.10.2" pysha3 = "^1.0.2" diff --git a/integration_tests/shell.nix b/integration_tests/shell.nix index f9f0449375..935874ac16 100644 --- a/integration_tests/shell.nix +++ b/integration_tests/shell.nix @@ -9,7 +9,6 @@ pkgs.mkShell { }) # cronosd pkgs.start-scripts pkgs.go-ethereum - pkgs.pystarport pkgs.gorc pkgs.cosmovisor pkgs.poetry diff --git a/integration_tests/test_ibc.py b/integration_tests/test_ibc.py index 9a7271264e..e9c1f6260b 100644 --- a/integration_tests/test_ibc.py +++ b/integration_tests/test_ibc.py @@ -99,7 +99,9 @@ def test_cronos_transfer_tokens(cronos, chainmain, hermes): oldbalance = get_balance(chainmain, coin_receiver, "basecro") cli = cronos.cosmos_cli() rsp = cli.transfer_tokens( - cli.address("signer2"), coin_receiver, f"{src_amount}basetcro" + cli.address("signer2"), + coin_receiver, + f"{src_amount}basetcro", ) assert rsp["code"] == 0, rsp["raw_log"] diff --git a/integration_tests/test_pruned_node.py b/integration_tests/test_pruned_node.py new file mode 100644 index 0000000000..e738aec4e1 --- /dev/null +++ b/integration_tests/test_pruned_node.py @@ -0,0 +1,116 @@ +from pathlib import Path + +import pytest +from eth_bloom import BloomFilter +from eth_utils import abi, big_endian_to_int +from hexbytes import HexBytes +from web3.datastructures import AttributeDict + +from .network import setup_custom_cronos +from .utils import ( + ADDRS, + CONTRACTS, + KEYS, + deploy_contract, + sign_transaction, + wait_for_new_blocks, +) + + +@pytest.fixture(scope="module") +def cronos(request, tmp_path_factory): + """start-cronos + params: enable_auto_deployment + """ + yield from setup_custom_cronos( + tmp_path_factory.mktemp("pruned"), + 26900, + Path(__file__).parent / "configs/pruned-node.yaml", + ) + + +def test_pruned_node(cronos): + """ + test basic json-rpc apis works in pruned node + """ + w3 = cronos.w3 + erc20 = deploy_contract( + w3, + CONTRACTS["TestERC20A"], + key=KEYS["validator"], + ) + tx = erc20.functions.transfer(ADDRS["community"], 10).buildTransaction( + {"from": ADDRS["validator"]} + ) + signed = sign_transaction(w3, tx, KEYS["validator"]) + txhash = w3.eth.send_raw_transaction(signed.rawTransaction) + + print("wait for prunning happens") + wait_for_new_blocks(cronos.cosmos_cli(0), 10) + + txreceipt = w3.eth.wait_for_transaction_receipt(txhash) + assert len(txreceipt.logs) == 1 + expect_log = { + "address": erc20.address, + "topics": [ + HexBytes( + abi.event_signature_to_log_topic("Transfer(address,address,uint256)") + ), + HexBytes(b"\x00" * 12 + HexBytes(ADDRS["validator"])), + HexBytes(b"\x00" * 12 + HexBytes(ADDRS["community"])), + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000a", + "transactionIndex": 0, + "logIndex": 0, + "removed": False, + } + assert expect_log.items() <= txreceipt.logs[0].items() + + # check get_balance and eth_call don't work on pruned state + with pytest.raises(Exception): + w3.eth.get_balance(ADDRS["validator"], block_identifier=txreceipt.blockNumber) + with pytest.raises(Exception): + erc20.caller(block_identifier=txreceipt.blockNumber).balanceOf( + ADDRS["validator"] + ) + + # check block bloom + block = w3.eth.get_block(txreceipt.blockNumber) + assert "baseFeePerGas" in block + assert block.miner == "0x0000000000000000000000000000000000000000" + bloom = BloomFilter(big_endian_to_int(block.logsBloom)) + assert HexBytes(erc20.address) in bloom + for topic in expect_log["topics"]: + assert topic in bloom + + tx1 = w3.eth.get_transaction(txhash) + tx2 = w3.eth.get_transaction_by_block( + txreceipt.blockNumber, txreceipt.transactionIndex + ) + exp_tx = AttributeDict( + { + "from": "0x57f96e6B86CdeFdB3d412547816a82E3E0EbF9D2", + "gas": 51503, + "input": ( + "0xa9059cbb000000000000000000000000378c50d9264c63f3f92b806d4ee56e" + "9d86ffb3ec000000000000000000000000000000000000000000000000000000" + "000000000a" + ), + "nonce": 2, + "to": erc20.address, + "transactionIndex": 0, + "value": 0, + "type": "0x2", + "accessList": [], + "chainId": "0x309", + } + ) + assert tx1 == tx2 + for name in exp_tx.keys(): + assert tx1[name] == tx2[name] == exp_tx[name] + + print( + w3.eth.get_logs( + {"fromBlock": txreceipt.blockNumber, "toBlock": txreceipt.blockNumber} + ) + ) diff --git a/nix/default.nix b/nix/default.nix index 40e6e82c3a..b37733ec91 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -22,13 +22,7 @@ import sources.nixpkgs { }; }) # update to a version that supports eip-1559 (import (sources.gomod2nix + "/overlay.nix")) - (_: pkgs: { - pystarport = pkgs.poetry2nix.mkPoetryApplication rec { - projectDir = sources.pystarport; - src = projectDir; - }; - }) - (_: pkgs: + (pkgs: _: import ./scripts.nix { inherit pkgs; config = { diff --git a/nix/scripts.nix b/nix/scripts.nix index 677a40c6fa..ebbbc79aaa 100644 --- a/nix/scripts.nix +++ b/nix/scripts.nix @@ -6,16 +6,16 @@ }: rec { start-chainmain = pkgs.writeShellScriptBin "start-chainmain" '' - export PATH=${pkgs.pystarport}/bin:${chainmain}/bin:$PATH + export PATH=${pkgs.test-env}/bin:${chainmain}/bin:$PATH ${../scripts/start-chainmain} ${config.chainmain-config} ${config.dotenv} $@ ''; start-cronos = pkgs.writeShellScriptBin "start-cronos" '' # rely on environment to provide cronosd - export PATH=${pkgs.pystarport}/bin:$PATH + export PATH=${pkgs.test-env}/bin:$PATH ${../scripts/start-cronos} ${config.cronos-config} ${config.dotenv} $@ ''; start-geth = pkgs.writeShellScriptBin "start-geth" '' - export PATH=${pkgs.go-ethereum}/bin:$PATH + export PATH=${pkgs.test-env}/bin:${pkgs.go-ethereum}/bin:$PATH source ${config.dotenv} ${../scripts/start-geth} ${config.geth-genesis} $@ ''; diff --git a/nix/sources.json b/nix/sources.json index b2f22f59ab..d8f0e98d57 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -84,19 +84,6 @@ "url": "https://github.com/nix-community/poetry2nix/archive/302a559a298ba39a0bec53f46479da9c5b2558cd.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, - "pystarport": { - "branch": "main", - "description": "pystarport setup and run local devnet for cosmos like blockchains", - "homepage": null, - "owner": "crypto-com", - "repo": "pystarport", - "rev": "5a2732f7de8dc3db23e44db1cb332926741222c4", - "sha256": "0wqkkr7flhvmczw1y2y0v698ywnq6b6rfwhx58r1zg7nwyla32hm", - "type": "tarball", - "url": "https://github.com/crypto-com/pystarport/archive/5a2732f7de8dc3db23e44db1cb332926741222c4.tar.gz", - "url_template": "https://github.com///archive/.tar.gz", - "version": "v0.2.3" - }, "rocksdb": { "branch": "v6.29.5", "description": "A library that provides an embeddable, persistent key-value store for fast storage.", diff --git a/nix/testenv.nix b/nix/testenv.nix index c6b9b6af2e..fcf38bf8a2 100644 --- a/nix/testenv.nix +++ b/nix/testenv.nix @@ -36,5 +36,10 @@ pkgs.poetry2nix.mkPoetryEnv { } ); + pystarport = super.pystarport.overridePythonAttrs ( + old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.poetry ]; + } + ); }); } diff --git a/scripts/cronos-devnet.yaml b/scripts/cronos-devnet.yaml index a4c1b6046e..0b9b865e1a 100644 --- a/scripts/cronos-devnet.yaml +++ b/scripts/cronos-devnet.yaml @@ -37,7 +37,6 @@ cronos_777-1: evm: params: evm_denom: basetcro - min_gas_multiplier: "0" cronos: params: cronos_admin: ${CRONOS_ADMIN} @@ -59,3 +58,4 @@ cronos_777-1: params: no_base_fee: false base_fee: "100000000000" + min_gas_multiplier: "0" diff --git a/third_party/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto b/third_party/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto index 9eeb1f16e0..4bde4739bc 100644 --- a/third_party/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto +++ b/third_party/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto @@ -3,7 +3,7 @@ package ethermint.crypto.v1.ethsecp256k1; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/crypto/ethsecp256k1"; +option go_package = "github.com/evmos/ethermint/crypto/ethsecp256k1"; // PubKey defines a type alias for an ecdsa.PublicKey that implements // Tendermint's PubKey interface. It represents the 33-byte compressed public @@ -16,6 +16,4 @@ message PubKey { // PrivKey defines a type alias for an ecdsa.PrivateKey that implements // Tendermint's PrivateKey interface. -message PrivKey { - bytes key = 1; -} +message PrivKey { bytes key = 1; } diff --git a/third_party/proto/ethermint/evm/v1/evm.proto b/third_party/proto/ethermint/evm/v1/evm.proto index da184eb850..b74b27aef0 100644 --- a/third_party/proto/ethermint/evm/v1/evm.proto +++ b/third_party/proto/ethermint/evm/v1/evm.proto @@ -3,12 +3,10 @@ package ethermint.evm.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/x/evm/types"; +option go_package = "github.com/evmos/ethermint/x/evm/types"; // Params defines the EVM module parameters message Params { - option (gogoproto.goproto_stringer) = false; - // evm denom represents the token denomination used to run the EVM state // transitions. string evm_denom = 1 [ (gogoproto.moretags) = "yaml:\"evm_denom\"" ]; @@ -26,6 +24,9 @@ message Params { (gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false ]; + // Allow unprotected transactions defines if replay-protected (i.e non EIP155 + // signed) transactions can be executed on the state machine. + bool allow_unprotected_txs = 6; } // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values @@ -101,19 +102,24 @@ message ChainConfig { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"berlin_block\"" ]; - // DEPRECATED: EWASM and YOLOV3 block have been deprecated - reserved 14, 15; - reserved "yolo_v3_block", "ewasm_block"; - // Catalyst switch block (nil = no fork, 0 = already on catalyst) - string catalyst_block = 16 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"catalyst_block\"" - ]; + // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated + reserved 14, 15, 16; + reserved "yolo_v3_block", "ewasm_block", "catalyst_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.moretags) = "yaml:\"london_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.moretags) = "yaml:\"arrow_glacier_block\"" + ]; + // EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in merge proceedings) + string merge_fork_block = 19 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"merge_fork_block\"" + ]; } // State represents a single Storage key value pair item. @@ -200,24 +206,30 @@ message AccessTuple { // TraceConfig holds extra parameters to trace functions. message TraceConfig { + // DEPRECATED: DisableMemory and DisableReturnData have been renamed to + // Enable*. + reserved 4, 7; + reserved "disable_memory", "disable_return_data"; + // custom javascript tracer string tracer = 1; - // overrides the default timeout of 5 seconds for JavaScript-based tracing calls + // overrides the default timeout of 5 seconds for JavaScript-based tracing + // calls string timeout = 2; // number of blocks the tracer is willing to go back - uint64 reexec = 3; - // disable memory capture - bool disable_memory = 4 [ (gogoproto.jsontag) = "disableMemory" ]; + uint64 reexec = 3; // disable stack capture bool disable_stack = 5 [ (gogoproto.jsontag) = "disableStack" ]; // disable storage capture bool disable_storage = 6 [ (gogoproto.jsontag) = "disableStorage" ]; - // disable return data capture - bool disable_return_data = 7 [ (gogoproto.jsontag) = "disableReturnData" ]; // print output during capture end bool debug = 8; // maximum length of output, but zero means unlimited int32 limit = 9; // Chain overrides, can be used to execute a trace using future fork rules ChainConfig overrides = 10; -} \ No newline at end of file + // enable memory capture + bool enable_memory = 11 [ (gogoproto.jsontag) = "enableMemory" ]; + // enable return data capture + bool enable_return_data = 12 [ (gogoproto.jsontag) = "enableReturnData" ]; +} diff --git a/third_party/proto/ethermint/evm/v1/genesis.proto b/third_party/proto/ethermint/evm/v1/genesis.proto index 2e0343f176..196bbd23a9 100644 --- a/third_party/proto/ethermint/evm/v1/genesis.proto +++ b/third_party/proto/ethermint/evm/v1/genesis.proto @@ -4,14 +4,14 @@ package ethermint.evm.v1; import "gogoproto/gogo.proto"; import "ethermint/evm/v1/evm.proto"; -option go_package = "github.com/tharsis/ethermint/x/evm/types"; +option go_package = "github.com/evmos/ethermint/x/evm/types"; // GenesisState defines the evm module's genesis state. message GenesisState { // accounts is an array containing the ethereum genesis accounts. - repeated GenesisAccount accounts = 1 [(gogoproto.nullable) = false]; - // params defines all the paramaters of the module. - Params params = 3 [(gogoproto.nullable) = false]; + repeated GenesisAccount accounts = 1 [ (gogoproto.nullable) = false ]; + // params defines all the parameters of the module. + Params params = 2 [ (gogoproto.nullable) = false ]; } // GenesisAccount defines an account to be initialized in the genesis state. @@ -23,5 +23,6 @@ message GenesisAccount { // code defines the hex bytes of the account code. string code = 2; // storage defines the set of state key values for the account. - repeated State storage = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage"]; + repeated State storage = 3 + [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage" ]; } diff --git a/third_party/proto/ethermint/evm/v1/query.proto b/third_party/proto/ethermint/evm/v1/query.proto index 57d547aa6a..537bc7cf63 100644 --- a/third_party/proto/ethermint/evm/v1/query.proto +++ b/third_party/proto/ethermint/evm/v1/query.proto @@ -6,8 +6,9 @@ import "cosmos/base/query/v1beta1/pagination.proto"; import "google/api/annotations.proto"; import "ethermint/evm/v1/evm.proto"; import "ethermint/evm/v1/tx.proto"; +import "google/protobuf/timestamp.proto"; -option go_package = "github.com/tharsis/ethermint/x/evm/types"; +option go_package = "github.com/evmos/ethermint/x/evm/types"; // Query defines the gRPC querier service. service Query { @@ -19,8 +20,7 @@ service Query { // CosmosAccount queries an Ethereum account's Cosmos Address. rpc CosmosAccount(QueryCosmosAccountRequest) returns (QueryCosmosAccountResponse) { - option (google.api.http).get = - "/ethermint/evm/v1/cosmos_account/{address}"; + option (google.api.http).get = "/ethermint/evm/v1/cosmos_account/{address}"; } // ValidatorAccount queries an Ethereum account's from a validator consensus @@ -39,8 +39,7 @@ service Query { // Storage queries the balance of all coins for a single account. rpc Storage(QueryStorageRequest) returns (QueryStorageResponse) { - option (google.api.http).get = - "/ethermint/evm/v1/storage/{address}/{key}"; + option (google.api.http).get = "/ethermint/evm/v1/storage/{address}/{key}"; } // Code queries the balance of all coins for a single account. @@ -52,7 +51,7 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/ethermint/evm/v1/params"; } - + // EthCall implements the `eth_call` rpc api rpc EthCall(EthCallRequest) returns (MsgEthereumTxResponse) { option (google.api.http).get = "/ethermint/evm/v1/eth_call"; @@ -67,6 +66,18 @@ service Query { rpc TraceTx(QueryTraceTxRequest) returns (QueryTraceTxResponse) { option (google.api.http).get = "/ethermint/evm/v1/trace_tx"; } + + // TraceBlock implements the `debug_traceBlockByNumber` and `debug_traceBlockByHash` rpc api + rpc TraceBlock(QueryTraceBlockRequest) returns (QueryTraceBlockResponse) { + option (google.api.http).get = "/ethermint/evm/v1/trace_block"; + } + + // BaseFee queries the base fee of the parent block of the current block, + // it's similar to feemarket module's method, but also checks london hardfork status. + rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) { + option (google.api.http).get = "/ethermint/evm/v1/base_fee"; + } + } // QueryAccountRequest is the request type for the Query/Account RPC method. @@ -208,9 +219,6 @@ message QueryParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } -// QueryStaticCallRequest defines static call response -message QueryStaticCallResponse { bytes data = 1; } - // EthCallRequest defines EthCall request message EthCallRequest { // same json format as the json rpc api. @@ -229,10 +237,20 @@ message EstimateGasResponse { message QueryTraceTxRequest { // msgEthereumTx for the requested transaction MsgEthereumTx msg = 1; - // transaction index - uint64 tx_index = 2; + // tx_index is not necessary anymore + reserved 2; + reserved "tx_index"; // TraceConfig holds extra parameters to trace functions. TraceConfig trace_config = 3; + // the predecessor transactions included in the same block + // need to be replayed first to get correct context for tracing. + repeated MsgEthereumTx predecessors = 4; + // block number of requested transaction + int64 block_number = 5; + // block hex hash of requested transaction + string block_hash = 6; + // block time of requested transaction + google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // QueryTraceTxResponse defines TraceTx response @@ -240,3 +258,32 @@ message QueryTraceTxResponse { // response serialized in bytes bytes data = 1; } + +// QueryTraceBlockRequest defines TraceTx request +message QueryTraceBlockRequest { + // txs messages in the block + repeated MsgEthereumTx txs = 1; + // TraceConfig holds extra parameters to trace functions. + TraceConfig trace_config = 3; + // block number + int64 block_number = 5; + // block hex hash + string block_hash = 6; + // block time + google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// QueryTraceBlockResponse defines TraceBlock response +message QueryTraceBlockResponse { + bytes data = 1; +} + +// QueryBaseFeeRequest defines the request type for querying the EIP1559 base +// fee. +message QueryBaseFeeRequest {} + +// BaseFeeResponse returns the EIP1559 base fee. +message QueryBaseFeeResponse { + string base_fee = 1 + [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; +} diff --git a/third_party/proto/ethermint/evm/v1/tx.proto b/third_party/proto/ethermint/evm/v1/tx.proto index a6f0af9add..9dc53f2fa0 100644 --- a/third_party/proto/ethermint/evm/v1/tx.proto +++ b/third_party/proto/ethermint/evm/v1/tx.proto @@ -2,16 +2,19 @@ syntax = "proto3"; package ethermint.evm.v1; import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; import "ethermint/evm/v1/evm.proto"; -option go_package = "github.com/tharsis/ethermint/x/evm/types"; +option go_package = "github.com/evmos/ethermint/x/evm/types"; // Msg defines the evm Msg service. service Msg { // EthereumTx defines a method submitting Ethereum transactions. - rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse); + rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse) { + option (google.api.http).post = "/ethermint/evm/v1/ethereum_tx"; + }; } // MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. @@ -33,6 +36,8 @@ message MsgEthereumTx { } // LegacyTx is the transaction data of regular Ethereum transactions. +// NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the +// AllowUnprotectedTxs parameter is disabled. message LegacyTx { option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "TxData"; diff --git a/third_party/proto/ethermint/feemarket/v1/feemarket.proto b/third_party/proto/ethermint/feemarket/v1/feemarket.proto index 1aab31e2a3..8508ec715f 100644 --- a/third_party/proto/ethermint/feemarket/v1/feemarket.proto +++ b/third_party/proto/ethermint/feemarket/v1/feemarket.proto @@ -3,7 +3,7 @@ package ethermint.feemarket.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/x/feemarket/types"; +option go_package = "github.com/evmos/ethermint/x/feemarket/types"; // Params defines the EVM module parameters message Params { @@ -25,4 +25,15 @@ message Params { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; -} \ No newline at end of file + // 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 + ]; + // min gas denominator bounds the minimum gasUsed to be charged + // to senders based on GasLimit + string min_gas_multiplier = 8 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/third_party/proto/ethermint/feemarket/v1/genesis.proto b/third_party/proto/ethermint/feemarket/v1/genesis.proto index 9e4a1db714..e3307844fb 100644 --- a/third_party/proto/ethermint/feemarket/v1/genesis.proto +++ b/third_party/proto/ethermint/feemarket/v1/genesis.proto @@ -4,19 +4,17 @@ package ethermint.feemarket.v1; import "gogoproto/gogo.proto"; import "ethermint/feemarket/v1/feemarket.proto"; -option go_package = "github.com/tharsis/ethermint/x/feemarket/types"; +option go_package = "github.com/evmos/ethermint/x/feemarket/types"; // GenesisState defines the feemarket module's genesis state. message GenesisState { // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false]; - // base fee is the exported value from previous software version. + Params params = 1 [ (gogoproto.nullable) = false ]; + // DEPRECATED: base fee is the exported value from previous software version. // Zero by default. - string base_fee = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // block gas is the amount of gas used on the last block before the upgrade. + reserved 2; + reserved "base_fee"; + // block gas is the amount of gas wanted on the last block before the upgrade. // Zero by default. uint64 block_gas = 3; } \ No newline at end of file diff --git a/third_party/proto/ethermint/feemarket/v1/query.proto b/third_party/proto/ethermint/feemarket/v1/query.proto index 71589e7e16..f8b672b026 100644 --- a/third_party/proto/ethermint/feemarket/v1/query.proto +++ b/third_party/proto/ethermint/feemarket/v1/query.proto @@ -6,23 +6,23 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "ethermint/feemarket/v1/feemarket.proto"; -option go_package = "github.com/tharsis/ethermint/x/feemarket/types"; +option go_package = "github.com/evmos/ethermint/x/feemarket/types"; // Query defines the gRPC querier service. service Query { // Params queries the parameters of x/feemarket module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/feemarket/evm/v1/params"; + option (google.api.http).get = "/ethermint/feemarket/v1/params"; } - + // BaseFee queries the base fee of the parent block of the current block. rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) { - option (google.api.http).get = "/feemarket/evm/v1/base_fee"; + option (google.api.http).get = "/ethermint/feemarket/v1/base_fee"; } // BlockGas queries the gas used at a given block height rpc BlockGas(QueryBlockGasRequest) returns (QueryBlockGasResponse) { - option (google.api.http).get = "/feemarket/evm/v1/block_gas"; + option (google.api.http).get = "/ethermint/feemarket/v1/block_gas"; } } @@ -41,18 +41,13 @@ message QueryBaseFeeRequest {} // BaseFeeResponse returns the EIP1559 base fee. message QueryBaseFeeResponse { - string base_fee = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; + string base_fee = 1 + [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; } // QueryBlockGasRequest defines the request type for querying the EIP1559 base // fee. message QueryBlockGasRequest {} - // QueryBlockGasResponse returns block gas used for a given height. -message QueryBlockGasResponse { - int64 gas = 1; -} \ No newline at end of file +message QueryBlockGasResponse { int64 gas = 1; } \ No newline at end of file diff --git a/third_party/proto/ethermint/types/v1/account.proto b/third_party/proto/ethermint/types/v1/account.proto index 62dab78964..4a3a5d5d78 100644 --- a/third_party/proto/ethermint/types/v1/account.proto +++ b/third_party/proto/ethermint/types/v1/account.proto @@ -5,18 +5,21 @@ import "cosmos/auth/v1beta1/auth.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/types"; +option go_package = "github.com/evmos/ethermint/types"; // EthAccount implements the authtypes.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_getters) = false; option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; - option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI"; + option (cosmos_proto.implements_interface) = + "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI"; - cosmos.auth.v1beta1.BaseAccount base_account = 1 - [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; - string code_hash = 2 [(gogoproto.moretags) = "yaml:\"code_hash\""]; + cosmos.auth.v1beta1.BaseAccount base_account = 1 [ + (gogoproto.embed) = true, + (gogoproto.moretags) = "yaml:\"base_account\"" + ]; + string code_hash = 2 [ (gogoproto.moretags) = "yaml:\"code_hash\"" ]; } diff --git a/third_party/proto/ethermint/types/v1/web3.proto b/third_party/proto/ethermint/types/v1/web3.proto index 71a8d5590a..df6bf65b22 100644 --- a/third_party/proto/ethermint/types/v1/web3.proto +++ b/third_party/proto/ethermint/types/v1/web3.proto @@ -3,7 +3,7 @@ package ethermint.types.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/tharsis/ethermint/types"; +option go_package = "github.com/evmos/ethermint/types"; message ExtensionOptionsWeb3Tx { option (gogoproto.goproto_getters) = false; @@ -17,9 +17,9 @@ message ExtensionOptionsWeb3Tx { // fee payer is an account address for the fee payer. It will be validated // during EIP712 signature checking. - string fee_payer = 2 [(gogoproto.jsontag) = "feePayer,omitempty"]; + string fee_payer = 2 [ (gogoproto.jsontag) = "feePayer,omitempty" ]; // fee payer sig is a signature data from the fee paying account, // allows to perform fee delegation when using EIP712 Domain. - bytes fee_payer_sig = 3 [(gogoproto.jsontag) = "feePayerSig,omitempty"]; + bytes fee_payer_sig = 3 [ (gogoproto.jsontag) = "feePayerSig,omitempty" ]; } diff --git a/x/cronos/client/cli/query.go b/x/cronos/client/cli/query.go index 601f233283..5ed6411e3a 100644 --- a/x/cronos/client/cli/query.go +++ b/x/cronos/client/cli/query.go @@ -3,8 +3,8 @@ package cli import ( "fmt" + rpctypes "github.com/evmos/ethermint/rpc/types" "github.com/spf13/cobra" - rpctypes "github.com/tharsis/ethermint/rpc/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/cronos/handler_test.go b/x/cronos/handler_test.go index 5d26adf108..6f108316f0 100644 --- a/x/cronos/handler_test.go +++ b/x/cronos/handler_test.go @@ -14,7 +14,7 @@ import ( "github.com/crypto-org-chain/cronos/x/cronos/types" "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tharsis/ethermint/crypto/ethsecp256k1" + "github.com/evmos/ethermint/crypto/ethsecp256k1" ) type CronosTestSuite struct { diff --git a/x/cronos/keeper/evm.go b/x/cronos/keeper/evm.go index f1086dfca3..0b135c24d8 100644 --- a/x/cronos/keeper/evm.go +++ b/x/cronos/keeper/evm.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/crypto-org-chain/cronos/x/cronos/types" ) diff --git a/x/cronos/keeper/evm_test.go b/x/cronos/keeper/evm_test.go index 0c29c352e8..953498957b 100644 --- a/x/cronos/keeper/evm_test.go +++ b/x/cronos/keeper/evm_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/tharsis/ethermint/crypto/ethsecp256k1" + "github.com/evmos/ethermint/crypto/ethsecp256k1" ) func (suite *KeeperTestSuite) TestDeployContract() { diff --git a/x/cronos/keeper/grpc_query.go b/x/cronos/keeper/grpc_query.go index b651b822af..9446d407d9 100644 --- a/x/cronos/keeper/grpc_query.go +++ b/x/cronos/keeper/grpc_query.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/crypto-org-chain/cronos/x/cronos/types" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/cronos/keeper/ibc_test.go b/x/cronos/keeper/ibc_test.go index 0549c9dd43..b0750b071e 100644 --- a/x/cronos/keeper/ibc_test.go +++ b/x/cronos/keeper/ibc_test.go @@ -12,7 +12,7 @@ import ( keepertest "github.com/crypto-org-chain/cronos/x/cronos/keeper/mock" "github.com/crypto-org-chain/cronos/x/cronos/types" "github.com/ethereum/go-ethereum/common" - "github.com/tharsis/ethermint/crypto/ethsecp256k1" + "github.com/evmos/ethermint/crypto/ethsecp256k1" ) const CorrectIbcDenom = "ibc/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" diff --git a/x/cronos/keeper/keeper_test.go b/x/cronos/keeper/keeper_test.go index 0b751ff48e..f0292d1200 100644 --- a/x/cronos/keeper/keeper_test.go +++ b/x/cronos/keeper/keeper_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - evmtypes "github.com/tharsis/ethermint/x/evm/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -22,8 +22,8 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" tmversion "github.com/tendermint/tendermint/proto/tendermint/version" "github.com/tendermint/tendermint/version" - "github.com/tharsis/ethermint/crypto/ethsecp256k1" - ethermint "github.com/tharsis/ethermint/types" + "github.com/evmos/ethermint/crypto/ethsecp256k1" + ethermint "github.com/evmos/ethermint/types" "github.com/crypto-org-chain/cronos/app" ) diff --git a/x/cronos/keeper/params.go b/x/cronos/keeper/params.go index e153b52b00..66458434e3 100644 --- a/x/cronos/keeper/params.go +++ b/x/cronos/keeper/params.go @@ -7,7 +7,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" transferTypes "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" "github.com/crypto-org-chain/cronos/x/cronos/types" - evmTypes "github.com/tharsis/ethermint/x/evm/types" + evmTypes "github.com/evmos/ethermint/x/evm/types" ) // GetParams returns the total set of cronos parameters. diff --git a/x/cronos/rpc/api.go b/x/cronos/rpc/api.go index 6c2b122e6d..607e8416e7 100644 --- a/x/cronos/rpc/api.go +++ b/x/cronos/rpc/api.go @@ -14,14 +14,14 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rpc" + evmrpc "github.com/evmos/ethermint/rpc" + "github.com/evmos/ethermint/rpc/backend" + rpctypes "github.com/evmos/ethermint/rpc/types" + ethermint "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/tendermint/tendermint/libs/log" coretypes "github.com/tendermint/tendermint/rpc/core/types" rpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" - evmrpc "github.com/tharsis/ethermint/rpc" - "github.com/tharsis/ethermint/rpc/backend" - rpctypes "github.com/tharsis/ethermint/rpc/types" - ethermint "github.com/tharsis/ethermint/types" - evmtypes "github.com/tharsis/ethermint/x/evm/types" ) const ( @@ -40,8 +40,8 @@ func init() { } // CreateCronosRPCAPIs creates extension json-rpc apis -func CreateCronosRPCAPIs(ctx *server.Context, clientCtx client.Context, tmWSClient *rpcclient.WSClient) []rpc.API { - evmBackend := backend.NewBackend(ctx, ctx.Logger, clientCtx) +func CreateCronosRPCAPIs(ctx *server.Context, clientCtx client.Context, tmWSClient *rpcclient.WSClient, allowUnprotectedTxs bool) []rpc.API { + evmBackend := backend.NewBackend(ctx, ctx.Logger, clientCtx, allowUnprotectedTxs) return []rpc.API{ { Namespace: CronosNamespace, @@ -93,23 +93,19 @@ func (api *CronosAPI) getBlockDetail(blockNrOrHash rpctypes.BlockNumberOrHash) ( err error, ) { var blockNum rpctypes.BlockNumber - blockNum, err = api.getBlockNumber(blockNrOrHash) + resBlock, err = api.getBlock(blockNrOrHash) if err != nil { - return - } - resBlock, err = api.clientCtx.Client.Block(api.ctx, blockNum.TmHeight()) - if err != nil { - api.logger.Debug("block not found", "height", blockNum, "error", err.Error()) + api.logger.Debug("block not found", "height", blockNrOrHash, "error", err.Error()) return } blockNumber = resBlock.Block.Height blockHash = common.BytesToHash(resBlock.Block.Header.Hash()).Hex() - blockRes, err = api.clientCtx.Client.BlockResults(api.ctx, &blockNumber) + blockRes, err = api.backend.GetTendermintBlockResultByNumber(&blockNumber) if err != nil { api.logger.Debug("failed to retrieve block results", "height", blockNum, "error", err.Error()) return } - baseFee, err = api.backend.BaseFee(blockNumber) + baseFee, err = api.backend.BaseFee(blockRes) if err != nil { return } @@ -390,20 +386,18 @@ func (api *CronosAPI) ReplayBlock(blockNrOrHash rpctypes.BlockNumberOrHash, post return receipts, nil } -// getBlockNumber returns the BlockNumber from BlockNumberOrHash -func (api *CronosAPI) getBlockNumber(blockNrOrHash rpctypes.BlockNumberOrHash) (rpctypes.BlockNumber, error) { - switch { - case blockNrOrHash.BlockHash == nil && blockNrOrHash.BlockNumber == nil: - return rpctypes.EthEarliestBlockNumber, fmt.Errorf("types BlockHash and BlockNumber cannot be both nil") - case blockNrOrHash.BlockHash != nil: - blockHeader, err := api.backend.HeaderByHash(*blockNrOrHash.BlockHash) - if err != nil { - return rpctypes.EthEarliestBlockNumber, err +// getBlock returns the block from BlockNumberOrHash +func (api *CronosAPI) getBlock(blockNrOrHash rpctypes.BlockNumberOrHash) (blk *coretypes.ResultBlock, err error) { + if blockNrOrHash.BlockHash != nil { + blk, err = api.backend.GetTendermintBlockByHash(*blockNrOrHash.BlockHash) + } else { + var blockNumber rpctypes.BlockNumber + if blockNrOrHash.BlockNumber != nil { + blockNumber = *blockNrOrHash.BlockNumber + } else if blockNrOrHash.BlockHash == nil && blockNrOrHash.BlockNumber == nil { + return nil, fmt.Errorf("types BlockHash and BlockNumber cannot be both nil") } - return rpctypes.NewBlockNumber(blockHeader.Number), nil - case blockNrOrHash.BlockNumber != nil: - return *blockNrOrHash.BlockNumber, nil - default: - return rpctypes.EthEarliestBlockNumber, nil + blk, err = api.backend.GetTendermintBlockByNumber(blockNumber) } + return } diff --git a/x/cronos/types/interfaces.go b/x/cronos/types/interfaces.go index f79c0c5285..53f638ff93 100644 --- a/x/cronos/types/interfaces.go +++ b/x/cronos/types/interfaces.go @@ -11,9 +11,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/vm" + evmtypes "github.com/evmos/ethermint/x/evm/types" gravitytypes "github.com/peggyjv/gravity-bridge/module/v2/x/gravity/types" tmbytes "github.com/tendermint/tendermint/libs/bytes" - evmtypes "github.com/tharsis/ethermint/x/evm/types" ) // BankKeeper defines the expected interface needed to retrieve account balances. diff --git a/x/cronos/types/query.pb.go b/x/cronos/types/query.pb.go index b94f478a28..57b3c4e794 100644 --- a/x/cronos/types/query.pb.go +++ b/x/cronos/types/query.pb.go @@ -7,11 +7,11 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types/query" + types "github.com/evmos/ethermint/x/evm/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - types "github.com/tharsis/ethermint/x/evm/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes"