From 8cf25fc02cc0a7651b8929874a52178e7fa308ef Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Wed, 5 Jul 2023 14:54:08 +0800 Subject: [PATCH 01/15] bump up cosmos-sdk to v0.47.3 --- Makefile | 25 +- ante/decorators.go | 16 +- ante/handler_options.go | 44 +- app/app.go | 186 ++-- app/export.go | 77 +- app/modules.go | 271 +++++- app/sim_bench_test.go | 77 +- app/sim_test.go | 257 ++++-- app/upgrades/types.go | 6 +- app/upgrades/v110/htlc/migrate.go | 10 +- app/upgrades/v110/service/migrate.go | 9 +- app/upgrades/v120/upgrades.go | 18 +- app/upgrades/v140/upgrades.go | 14 +- app/upgrades/v200/upgrades.go | 10 +- buf.work.yaml | 8 + cmd/iris/cmd/genesis.go | 4 +- cmd/iris/cmd/keys.go | 13 +- cmd/iris/cmd/root.go | 68 +- cmd/iris/cmd/testnet.go | 107 ++- cmd/iris/cmd/util.go | 31 +- contrib/devtools/Makefile | 109 +-- docs/endpoints/grpc-client.md | 2 +- docs/features/mint.md | 2 +- go.mod | 195 +++-- go.sum | 815 +++++++++++++----- keystore/keys.go | 4 +- lite/swagger-ui/swagger.yaml | 4 +- modules/evm/eip1559.go | 2 +- modules/evm/keeper.go | 21 +- modules/evm/moudle.go | 9 +- modules/guardian/client/cli/cli_test.go | 61 +- .../guardian/client/testutil/test_helpers.go | 26 +- modules/guardian/genesis_test.go | 2 +- modules/guardian/keeper/keeper.go | 2 +- modules/guardian/keeper/keeper_test.go | 20 +- modules/guardian/keeper/querier.go | 40 - modules/guardian/keeper/querier_test.go | 39 - modules/guardian/module.go | 39 +- modules/guardian/types/genesis.pb.go | 40 +- modules/guardian/types/guardian.pb.go | 56 +- modules/guardian/types/msgs_test.go | 2 +- modules/guardian/types/query.pb.go | 67 +- modules/guardian/types/query.pb.gw.go | 11 +- modules/guardian/types/tx.pb.go | 58 +- modules/mint/abci_test.go | 2 +- modules/mint/client/testutil/test_helpers.go | 2 +- modules/mint/keeper/keeper.go | 9 +- modules/mint/keeper/keeper_test.go | 7 +- modules/mint/keeper/querier.go | 34 - modules/mint/keeper/querier_test.go | 32 - modules/mint/module.go | 39 +- modules/mint/simulation/params.go | 27 - modules/mint/types/genesis.pb.go | 38 +- modules/mint/types/mint.pb.go | 70 +- modules/mint/types/params.go | 14 +- modules/mint/types/query.pb.go | 64 +- modules/mint/types/query.pb.gw.go | 11 +- proto/buf.gen.gogo.yaml | 8 + proto/buf.gen.pulsar.yaml | 18 + proto/buf.lock | 23 + proto/buf.yaml | 25 + proto/{ => irishub}/guardian/genesis.proto | 2 +- proto/{ => irishub}/guardian/guardian.proto | 0 proto/{ => irishub}/guardian/query.proto | 2 +- proto/{ => irishub}/guardian/tx.proto | 0 proto/{ => irishub}/mint/genesis.proto | 2 +- proto/{ => irishub}/mint/mint.proto | 0 proto/{ => irishub}/mint/query.proto | 2 +- scripts/protoc-swagger-gen-ibc.sh | 6 +- scripts/protocgen.sh | 28 +- server/start.go | 297 ++++--- server/utils.go | 6 +- simapp/app.go | 734 +++++----------- simapp/encoding.go | 2 +- simapp/export.go | 74 +- simapp/test_helpers.go | 268 ++++-- third_party/proto/confio/proofs.proto | 234 ----- .../proto/cosmos/bank/v1beta1/bank.proto | 27 - .../base/query/v1beta1/pagination.proto | 49 -- .../proto/cosmos/base/v1beta1/coin.proto | 40 - third_party/proto/cosmos_proto/cosmos.proto | 16 - third_party/proto/gogoproto/gogo.proto | 145 ---- .../proto/google/api/annotations.proto | 31 - third_party/proto/google/api/http.proto | 318 ------- third_party/proto/google/api/httpbody.proto | 78 -- third_party/proto/google/protobuf/any.proto | 161 ---- .../proto/tendermint/abci/types/types.proto | 346 -------- .../proto/tendermint/crypto/keys.proto | 16 - .../proto/tendermint/crypto/proof.proto | 41 - .../proto/tendermint/libs/bits/types.proto | 9 - third_party/proto/tendermint/p2p/types.proto | 34 - .../proto/tendermint/types/block.proto | 15 - .../proto/tendermint/types/evidence.proto | 38 - .../proto/tendermint/types/params.proto | 80 -- .../proto/tendermint/types/types.proto | 157 ---- .../proto/tendermint/types/validator.proto | 25 - .../proto/tendermint/version/types.proto | 24 - types/runtime.go | 2 +- 98 files changed, 2773 insertions(+), 3836 deletions(-) create mode 100644 buf.work.yaml delete mode 100644 modules/guardian/keeper/querier.go delete mode 100644 modules/guardian/keeper/querier_test.go delete mode 100644 modules/mint/keeper/querier.go delete mode 100644 modules/mint/keeper/querier_test.go delete mode 100644 modules/mint/simulation/params.go create mode 100644 proto/buf.gen.gogo.yaml create mode 100644 proto/buf.gen.pulsar.yaml create mode 100644 proto/buf.lock create mode 100644 proto/buf.yaml rename proto/{ => irishub}/guardian/genesis.proto (87%) rename proto/{ => irishub}/guardian/guardian.proto (100%) rename proto/{ => irishub}/guardian/query.proto (95%) rename proto/{ => irishub}/guardian/tx.proto (100%) rename proto/{ => irishub}/mint/genesis.proto (90%) rename proto/{ => irishub}/mint/mint.proto (100%) rename proto/{ => irishub}/mint/query.proto (95%) delete mode 100644 third_party/proto/confio/proofs.proto delete mode 100644 third_party/proto/cosmos/bank/v1beta1/bank.proto delete mode 100644 third_party/proto/cosmos/base/query/v1beta1/pagination.proto delete mode 100644 third_party/proto/cosmos/base/v1beta1/coin.proto delete mode 100644 third_party/proto/cosmos_proto/cosmos.proto delete mode 100644 third_party/proto/gogoproto/gogo.proto delete mode 100644 third_party/proto/google/api/annotations.proto delete mode 100644 third_party/proto/google/api/http.proto delete mode 100644 third_party/proto/google/api/httpbody.proto delete mode 100644 third_party/proto/google/protobuf/any.proto delete mode 100644 third_party/proto/tendermint/abci/types/types.proto delete mode 100644 third_party/proto/tendermint/crypto/keys.proto delete mode 100644 third_party/proto/tendermint/crypto/proof.proto delete mode 100644 third_party/proto/tendermint/libs/bits/types.proto delete mode 100644 third_party/proto/tendermint/p2p/types.proto delete mode 100644 third_party/proto/tendermint/types/block.proto delete mode 100644 third_party/proto/tendermint/types/evidence.proto delete mode 100644 third_party/proto/tendermint/types/params.proto delete mode 100644 third_party/proto/tendermint/types/types.proto delete mode 100644 third_party/proto/tendermint/types/validator.proto delete mode 100644 third_party/proto/tendermint/version/types.proto diff --git a/Makefile b/Makefile index bba382c25..75ed9f8bd 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') NetworkType := $(shell if [ -z ${NetworkType} ]; then echo "mainnet"; else echo ${NetworkType}; fi) CURRENT_DIR = $(shell pwd) PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git) +DOCKER := $(shell which docker) # default mainnet EVM_CHAIN_ID EVM_CHAIN_ID ?= 6688 @@ -141,21 +142,25 @@ distclean: clean ### Protobuf ### ############################################################################### -protoVer=v0.7 -protoImageName=tendermintdev/sdk-proto-gen:$(protoVer) -containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer) -containerProtoGenAny=$(PROJECT_NAME)-proto-gen-any-$(protoVer) -containerProtoGenSwagger=$(PROJECT_NAME)-proto-gen-swagger-$(protoVer) -containerProtoFmt=$(PROJECT_NAME)-proto-fmt-$(protoVer) -proto-all: proto-tools proto-gen proto-swagger-gen +protoVer=0.13.0 +protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) +protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) + +proto-all: proto-format proto-lint proto-gen proto-gen: - @./scripts/protocgen.sh + @echo "Generating Protobuf files" + @$(protoImage) sh ./scripts/protocgen.sh proto-swagger-gen: @echo "Generating Protobuf Swagger" - @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenSwagger}$$"; then docker start -a $(containerProtoGenSwagger); else docker run --name $(containerProtoGenSwagger) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \ - sh ./scripts/protoc-swagger-gen.sh; fi + @$(protoImage) sh ./scripts/protoc-swagger-gen.sh + +proto-format: + @$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; + +proto-lint: + @$(protoImage) buf lint --error-format=json ######################################## ### Testing diff --git a/ante/decorators.go b/ante/decorators.go index a735fdb2b..15ff3725b 100644 --- a/ante/decorators.go +++ b/ante/decorators.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" servicetypes "github.com/irisnet/irismod/modules/service/types" @@ -28,7 +28,12 @@ func NewValidateTokenDecorator(tk tokenkeeper.Keeper) ValidateTokenDecorator { } // AnteHandle checks the transaction -func (vtd ValidateTokenDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (vtd ValidateTokenDecorator) AnteHandle( + ctx sdk.Context, + tx sdk.Tx, + simulate bool, + next sdk.AnteHandler, +) (sdk.Context, error) { for _, msg := range tx.GetMsgs() { switch msg := msg.(type) { case *ibctransfertypes.MsgTransfer: @@ -65,7 +70,12 @@ func NewValidateServiceDecorator() ValidateServiceDecorator { } // AnteHandle checks the transaction -func (vsd ValidateServiceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { +func (vsd ValidateServiceDecorator) AnteHandle( + ctx sdk.Context, + tx sdk.Tx, + simulate bool, + next sdk.AnteHandler, +) (sdk.Context, error) { for _, msg := range tx.GetMsgs() { switch msg := msg.(type) { case *servicetypes.MsgCallService: diff --git a/ante/handler_options.go b/ante/handler_options.go index 4dfa99353..726be16d9 100644 --- a/ante/handler_options.go +++ b/ante/handler_options.go @@ -6,8 +6,8 @@ import ( authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - ibcante "github.com/cosmos/ibc-go/v5/modules/core/ante" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" + ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" ethante "github.com/evmos/ethermint/app/ante" @@ -36,9 +36,16 @@ type HandlerOptions struct { // newCosmosAnteHandler creates the default ante handler for Ethereum transactions func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { return sdk.ChainAnteDecorators( - ethante.NewEthSetUpContextDecorator(options.EvmKeeper), // outermost AnteDecorator. SetUpContext must be called first - ethante.NewEthMempoolFeeDecorator(options.EvmKeeper), // Check eth effective gas price against the node's minimal-gas-prices config - ethante.NewEthMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), // Check eth effective gas price against the global MinGasPrice + ethante.NewEthSetUpContextDecorator( + options.EvmKeeper, + ), // outermost AnteDecorator. SetUpContext must be called first + ethante.NewEthMempoolFeeDecorator( + options.EvmKeeper, + ), // Check eth effective gas price against the node's minimal-gas-prices config + ethante.NewEthMinGasPriceDecorator( + options.FeeMarketKeeper, + options.EvmKeeper, + ), // Check eth effective gas price against the global MinGasPrice ethante.NewEthValidateBasicDecorator(options.EvmKeeper), ethante.NewEthSigVerificationDecorator(options.EvmKeeper), ethante.NewEthAccountVerificationDecorator(options.AccountKeeper, options.EvmKeeper), @@ -47,7 +54,9 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { ethante.NewEthGasConsumeDecorator(options.EvmKeeper, options.MaxTxGasWanted), ethante.NewEthIncrementSenderSequenceDecorator(options.AccountKeeper), ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), - ethante.NewEthEmitEventDecorator(options.EvmKeeper), // emit eth tx hash and index at the very last ante handler. + ethante.NewEthEmitEventDecorator( + options.EvmKeeper, + ), // emit eth tx hash and index at the very last ante handler. ) } @@ -61,8 +70,15 @@ func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { ante.NewTxTimeoutHeightDecorator(), ante.NewValidateMemoDecorator(options.AccountKeeper), ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), - ante.NewSetPubKeyDecorator(options.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators + ante.NewDeductFeeDecorator( + options.AccountKeeper, + options.BankKeeper, + options.FeegrantKeeper, + options.TxFeeChecker, + ), + ante.NewSetPubKeyDecorator( + options.AccountKeeper, + ), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewValidateSigCountDecorator(options.AccountKeeper), ante.NewSigGasConsumeDecorator(options.AccountKeeper, DefaultSigVerificationGasConsumer), ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), @@ -85,13 +101,21 @@ func newCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler { ethante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper), ante.NewValidateMemoDecorator(options.AccountKeeper), ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker), + ante.NewDeductFeeDecorator( + options.AccountKeeper, + options.BankKeeper, + options.FeegrantKeeper, + options.TxFeeChecker, + ), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewSetPubKeyDecorator(options.AccountKeeper), ante.NewValidateSigCountDecorator(options.AccountKeeper), ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), // Note: signature verification uses EIP instead of the cosmos signature validator - ethante.NewLegacyEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + ethante.NewLegacyEip712SigVerificationDecorator( + options.AccountKeeper, + options.SignModeHandler, + ), ante.NewIncrementSequenceDecorator(options.AccountKeeper), ibcante.NewRedundantRelayDecorator(options.IBCKeeper), ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper), diff --git a/app/app.go b/app/app.go index ff1986c4c..4a93b7024 100644 --- a/app/app.go +++ b/app/app.go @@ -1,24 +1,26 @@ package app import ( + "encoding/json" "io" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + tmjson "github.com/cometbft/cometbft/libs/json" + "github.com/cometbft/cometbft/libs/log" + tmos "github.com/cometbft/cometbft/libs/os" "github.com/spf13/cast" - abci "github.com/tendermint/tendermint/abci/types" - tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/store/streaming" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -33,10 +35,11 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/crisis" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distr "github.com/cosmos/cosmos-sdk/x/distribution" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" @@ -46,31 +49,24 @@ import ( govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - "github.com/cosmos/cosmos-sdk/x/params" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v5/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" - ibcclienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" + "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" coinswapkeeper "github.com/irisnet/irismod/modules/coinswap/keeper" coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" - "github.com/irisnet/irismod/modules/farm" farmkeeper "github.com/irisnet/irismod/modules/farm/keeper" farmtypes "github.com/irisnet/irismod/modules/farm/types" htlckeeper "github.com/irisnet/irismod/modules/htlc/keeper" @@ -99,7 +95,6 @@ import ( tibcnfttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" tibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" tibcroutingtypes "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/types" - tibccli "github.com/bianjieai/tibc-go/modules/tibc/core/client/cli" tibckeeper "github.com/bianjieai/tibc-go/modules/tibc/core/keeper" "github.com/evmos/ethermint/ethereum/eip712" @@ -123,7 +118,7 @@ import ( ) var ( - _ simapp.App = (*IrisApp)(nil) + _ runtime.AppI = (*IrisApp)(nil) _ servertypes.Application = (*IrisApp)(nil) ) @@ -145,20 +140,21 @@ type IrisApp struct { memKeys map[string]*storetypes.MemoryStoreKey // cosmos - FeeGrantKeeper feegrantkeeper.Keeper - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - EvidenceKeeper evidencekeeper.Keeper - AuthzKeeper authzkeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + CapabilityKeeper *capabilitykeeper.Keeper + StakingKeeper *stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + MintKeeper mintkeeper.Keeper + DistrKeeper distrkeeper.Keeper + GovKeeper *govkeeper.Keeper + CrisisKeeper *crisiskeeper.Keeper + UpgradeKeeper *upgradekeeper.Keeper + ParamsKeeper paramskeeper.Keeper + EvidenceKeeper *evidencekeeper.Keeper + AuthzKeeper authzkeeper.Keeper + ConsensusParamsKeeper consensuskeeper.Keeper //ibc IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly @@ -237,10 +233,12 @@ func NewIrisApp( minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, + crisistypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, - ibchost.StoreKey, + ibcexported.StoreKey, upgradetypes.StoreKey, + consensustypes.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, @@ -273,7 +271,7 @@ func NewIrisApp( // configure state listening capabilities using AppOptions // we are doing nothing with the returned streamingServices and waitGroup in this case - if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, keys); err != nil { + if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, logger, keys); err != nil { tmos.Exit(err.Error()) } @@ -296,28 +294,31 @@ func NewIrisApp( keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey], ) - // set the BaseApp's parameter store - bApp.SetParamStore( - app.ParamsKeeper.Subspace(baseapp.Paramspace). - WithKeyTable(paramstypes.ConsensusParamsKeyTable()), + app.ConsensusParamsKeeper = consensuskeeper.NewKeeper( + appCodec, + keys[consensustypes.StoreKey], + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + // set the BaseApp's parameter store + bApp.SetParamStore(&app.ConsensusParamsKeeper) + // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper( appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey], ) - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) + scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, keys[authtypes.StoreKey], - app.GetSubspace(authtypes.ModuleName), ethermint.ProtoAccount, maccPerms, address.Bech32PrefixAccAddr, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.FeeGrantKeeper = feegrantkeeper.NewKeeper( @@ -330,16 +331,16 @@ func NewIrisApp( appCodec, keys[banktypes.StoreKey], app.AccountKeeper, - app.GetSubspace(banktypes.ModuleName), app.BlockedModuleAccountAddrs(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - stakingKeeper := stakingkeeper.NewKeeper( + app.StakingKeeper = stakingkeeper.NewKeeper( appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.GetSubspace(stakingtypes.ModuleName), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.MintKeeper = mintkeeper.NewKeeper( @@ -354,30 +355,33 @@ func NewIrisApp( app.DistrKeeper = distrkeeper.NewKeeper( appCodec, keys[distrtypes.StoreKey], - app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, + app.StakingKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, + legacyAmino, keys[slashingtypes.StoreKey], - &stakingKeeper, - app.GetSubspace(slashingtypes.ModuleName), + app.StakingKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), + appCodec, + keys[crisistypes.StoreKey], invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = *stakingKeeper.SetHooks( + app.StakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) @@ -403,8 +407,8 @@ func NewIrisApp( // UpgradeKeeper must be created before IBCKeeper app.IBCKeeper = ibckeeper.NewKeeper( appCodec, - keys[ibchost.StoreKey], - app.GetSubspace(ibchost.ModuleName), + keys[ibcexported.StoreKey], + app.GetSubspace(ibcexported.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, @@ -476,14 +480,12 @@ func NewIrisApp( app.TIBCKeeper.SetRouter(tibcRouter) // create evidence keeper with router - evidenceKeeper := evidencekeeper.NewKeeper( + app.EvidenceKeeper = evidencekeeper.NewKeeper( appCodec, keys[evidencetypes.StoreKey], - &app.StakingKeeper, + app.StakingKeeper, app.SlashingKeeper, ) - // If evidence needs to be handled for the app, set routes in router here and seal - app.EvidenceKeeper = *evidenceKeeper app.GuardianKeeper = guardiankeeper.NewKeeper( appCodec, @@ -493,10 +495,9 @@ func NewIrisApp( app.TokenKeeper = tokenkeeper.NewKeeper( appCodec, keys[tokentypes.StoreKey], - app.GetSubspace(tokentypes.ModuleName), app.BankKeeper, - app.ModuleAccountAddrs(), authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ).WithSwapRegistry(tokenv1.SwapRegistry{ iristypes.NativeToken.MinUnit: tokenv1.SwapParams{ MinUnit: iristypes.EvmToken.MinUnit, @@ -515,20 +516,18 @@ func NewIrisApp( app.HTLCKeeper = htlckeeper.NewKeeper( appCodec, keys[htlctypes.StoreKey], - app.GetSubspace(htlctypes.ModuleName), app.AccountKeeper, app.BankKeeper, - app.ModuleAccountAddrs(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.CoinswapKeeper = coinswapkeeper.NewKeeper( appCodec, keys[coinswaptypes.StoreKey], - app.GetSubspace(coinswaptypes.ModuleName), app.BankKeeper, app.AccountKeeper, - app.ModuleAccountAddrs(), authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.ServiceKeeper = servicekeeper.NewKeeper( @@ -536,15 +535,13 @@ func NewIrisApp( keys[servicetypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.GetSubspace(servicetypes.ModuleName), - app.ModuleAccountAddrs(), servicetypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.OracleKeeper = oraclekeeper.NewKeeper( appCodec, keys[oracletypes.StoreKey], - app.GetSubspace(oracletypes.ModuleName), app.ServiceKeeper, ) @@ -560,61 +557,63 @@ func NewIrisApp( app.BankKeeper, app.AccountKeeper, app.DistrKeeper, - &app.GovKeeper, - app.CoinswapKeeper.ValidatePool, - app.GetSubspace(farmtypes.ModuleName), + app.GovKeeper, + app.CoinswapKeeper, authtypes.FeeCollectorName, distrtypes.ModuleName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - govRouter := govv1beta1.NewRouter() - govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). - AddRoute(tibchost.RouterKey, tibccli.NewProposalHandler(app.TIBCKeeper)). - AddRoute(farmtypes.RouterKey, farm.NewCommunityPoolCreateFarmProposalHandler(app.FarmKeeper)) + // govRouter := govv1beta1.NewRouter() + // govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). + // AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). + // AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). + // AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). + // AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). + // AddRoute(tibchost.RouterKey, tibccli.NewProposalHandler(app.TIBCKeeper)). + // AddRoute(farmtypes.RouterKey, farm.NewCommunityPoolCreateFarmProposalHandler(app.FarmKeeper)) govConfig := govtypes.DefaultConfig() app.GovKeeper = govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], - app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.StakingKeeper, - govRouter, app.MsgServiceRouter(), govConfig, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - govHooks := govtypes.NewMultiGovHooks(farmkeeper.NewGovHook(app.FarmKeeper)) - app.GovKeeper.SetHooks(govHooks) + app.GovKeeper.SetHooks(govtypes.NewMultiGovHooks( + farmkeeper.NewGovHook(app.FarmKeeper), + )) tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) // Create Ethermint keepers app.FeeMarketKeeper = feemarketkeeper.NewKeeper( appCodec, - app.GetSubspace(feemarkettypes.ModuleName), + authtypes.NewModuleAddress(govtypes.ModuleName), keys[feemarkettypes.StoreKey], tkeys[feemarkettypes.TransientKey], + app.GetSubspace(feemarkettypes.ModuleName), ) app.EvmKeeper = evmkeeper.NewKeeper( appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], - app.GetSubspace(evmtypes.ModuleName), + authtypes.NewModuleAddress(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, + app.StakingKeeper, app.FeeMarketKeeper, nil, geth.NewEVM, tracer, + app.GetSubspace(evmtypes.ModuleName), ) /**** Module Options ****/ @@ -647,8 +646,8 @@ func NewIrisApp( app.MsgServiceRouter(), app.GRPCQueryRouter(), ) - app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) + app.mm.RegisterInvariants(app.CrisisKeeper) + // app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) app.mm.RegisterServices(app.configurator) // create the simulation manager and define the order of the modules for deterministic simulations @@ -862,6 +861,15 @@ func (app *IrisApp) RegisterTendermintService(clientCtx client.Context) { ) } +func (app *IrisApp) RegisterNodeService(clientCtx client.Context) { + nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +} + +// DefaultGenesis returns a default genesis from the registered AppModuleBasic's. +func (app *IrisApp) DefaultGenesis() map[string]json.RawMessage { + return ModuleBasics.DefaultGenesis(app.AppCodec()) +} + func (app *IrisApp) init() { eip712.InjectCodec(eip712.Codec{ InterfaceRegistry: app.interfaceRegistry, @@ -891,7 +899,7 @@ func initParamsKeeper( paramsKeeper.Subspace(htlctypes.ModuleName) paramsKeeper.Subspace(coinswaptypes.ModuleName) paramsKeeper.Subspace(servicetypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) + paramsKeeper.Subspace(ibcexported.ModuleName) paramsKeeper.Subspace(farmtypes.ModuleName) paramsKeeper.Subspace(tibchost.ModuleName) diff --git a/app/export.go b/app/export.go index 6154ffd18..f206f8ec5 100644 --- a/app/export.go +++ b/app/export.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -22,6 +22,7 @@ import ( // ExportAppStateAndValidators exports the state of the application for a genesis file. func (app *IrisApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, + modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) @@ -37,7 +38,7 @@ func (app *IrisApp) ExportAppStateAndValidators( service.PrepForZeroHeightGenesis(ctx, app.ServiceKeeper) } - genState := app.mm.ExportGenesis(ctx, app.appCodec) + genState := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err @@ -80,10 +81,13 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ /* Handle fee distribution state. */ // withdraw all validator commission - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) - return false - }) + app.StakingKeeper.IterateValidators( + ctx, + func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) + return false + }, + ) // withdraw all delegator rewards dels := app.StakingKeeper.GetAllDelegations(ctx) @@ -111,18 +115,21 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ ctx = ctx.WithBlockHeight(0) // reinitialize all validators - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) - feePool := app.DistrKeeper.GetFeePool(ctx) - feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) - app.DistrKeeper.SetFeePool(ctx, feePool) - - if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil { - panic(err) - } - return false - }) + app.StakingKeeper.IterateValidators( + ctx, + func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + // donate any unwithdrawn outstanding reward fraction tokens to the community pool + scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) + feePool := app.DistrKeeper.GetFeePool(ctx) + feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) + app.DistrKeeper.SetFeePool(ctx, feePool) + + if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil { + panic(err) + } + return false + }, + ) // reinitialize all delegations for _, del := range dels { @@ -149,22 +156,28 @@ func (app *IrisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ /* Handle staking state. */ // iterate through redelegations, reset creation height - app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { - for i := range red.Entries { - red.Entries[i].CreationHeight = 0 - } - app.StakingKeeper.SetRedelegation(ctx, red) - return false - }) + app.StakingKeeper.IterateRedelegations( + ctx, + func(_ int64, red stakingtypes.Redelegation) (stop bool) { + for i := range red.Entries { + red.Entries[i].CreationHeight = 0 + } + app.StakingKeeper.SetRedelegation(ctx, red) + return false + }, + ) // iterate through unbonding delegations, reset creation height - app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { - for i := range ubd.Entries { - ubd.Entries[i].CreationHeight = 0 - } - app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) - return false - }) + app.StakingKeeper.IterateUnbondingDelegations( + ctx, + func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { + for i := range ubd.Entries { + ubd.Entries[i].CreationHeight = 0 + } + app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + return false + }, + ) // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. diff --git a/app/modules.go b/app/modules.go index a873ff500..1518422ef 100644 --- a/app/modules.go +++ b/app/modules.go @@ -13,10 +13,11 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/capability" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + "github.com/cosmos/cosmos-sdk/x/consensus" + consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/crisis" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/evidence" evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" @@ -38,11 +39,11 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v5/modules/apps/transfer" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v5/modules/core" - ibcclientclient "github.com/cosmos/ibc-go/v5/modules/core/02-client/client" - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" + "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v7/modules/core" + ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" "github.com/irisnet/irismod/modules/coinswap" coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" @@ -89,7 +90,7 @@ import ( var ( legacyProposalHandlers = []govclient.ProposalHandler{ paramsclient.ProposalHandler, - distrclient.ProposalHandler, + //distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, @@ -121,6 +122,7 @@ var ( vesting.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, authzmodule.AppModuleBasic{}, + consensus.AppModuleBasic{}, guardian.AppModuleBasic{}, token.AppModuleBasic{}, @@ -162,7 +164,10 @@ var ( tibcnfttypes.ModuleName: nil, tibcmttypes.ModuleName: nil, nfttypes.ModuleName: nil, - evmtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, // used for secure addition and subtraction of balance using module account + evmtypes.ModuleName: { + authtypes.Minter, + authtypes.Burner, + }, // used for secure addition and subtraction of balance using module account } ) @@ -178,40 +183,128 @@ func appModules( app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, encodingConfig.TxConfig, ), - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), + auth.NewAppModule( + appCodec, + app.AccountKeeper, + authsims.RandomGenesisAccounts, + app.GetSubspace(authtypes.ModuleName), + ), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), + bank.NewAppModule( + appCodec, + app.BankKeeper, + app.AccountKeeper, + app.GetSubspace(banktypes.ModuleName), + ), + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), + crisis.NewAppModule( + app.CrisisKeeper, + skipGenesisInvariants, + app.GetSubspace(crisistypes.ModuleName), + ), + gov.NewAppModule( + appCodec, + app.GovKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(govtypes.ModuleName), + ), mint.NewAppModule(appCodec, app.MintKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), + slashing.NewAppModule( + appCodec, + app.SlashingKeeper, + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.GetSubspace(slashingtypes.ModuleName), + ), + distr.NewAppModule( + appCodec, + app.DistrKeeper, + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.GetSubspace(distrtypes.ModuleName), + ), + staking.NewAppModule( + appCodec, + app.StakingKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(stakingtypes.ModuleName), + ), upgrade.NewAppModule(app.UpgradeKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), + evidence.NewAppModule(*app.EvidenceKeeper), + feegrantmodule.NewAppModule( + appCodec, + app.AccountKeeper, + app.BankKeeper, + app.FeeGrantKeeper, + app.interfaceRegistry, + ), + authzmodule.NewAppModule( + appCodec, + app.AuthzKeeper, + app.AccountKeeper, + app.BankKeeper, + app.interfaceRegistry, + ), + consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper), ibc.NewAppModule(app.IBCKeeper), tibc.NewAppModule(app.TIBCKeeper), params.NewAppModule(app.ParamsKeeper), app.transferModule, app.nfttransferModule, app.mttransferModule, guardian.NewAppModule(appCodec, app.GuardianKeeper), - token.NewAppModule(appCodec, app.TokenKeeper, app.AccountKeeper, app.BankKeeper), + token.NewAppModule( + appCodec, + app.TokenKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(tokentypes.ModuleName), + ), record.NewAppModule(appCodec, app.RecordKeeper, app.AccountKeeper, app.BankKeeper), nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper), mt.NewAppModule(appCodec, app.MTKeeper, app.AccountKeeper, app.BankKeeper), - htlc.NewAppModule(appCodec, app.HTLCKeeper, app.AccountKeeper, app.BankKeeper), - coinswap.NewAppModule(appCodec, app.CoinswapKeeper, app.AccountKeeper, app.BankKeeper), - service.NewAppModule(appCodec, app.ServiceKeeper, app.AccountKeeper, app.BankKeeper), + htlc.NewAppModule( + appCodec, + app.HTLCKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(htlctypes.ModuleName), + ), + coinswap.NewAppModule( + appCodec, + app.CoinswapKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(coinswaptypes.ModuleName), + ), + service.NewAppModule( + appCodec, + app.ServiceKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(servicetypes.ModuleName), + ), oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), random.NewAppModule(appCodec, app.RandomKeeper, app.AccountKeeper, app.BankKeeper), - farm.NewAppModule(appCodec, app.FarmKeeper, app.AccountKeeper, app.BankKeeper), + farm.NewAppModule( + appCodec, + app.FarmKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(farmtypes.ModuleName), + ), // Ethermint app modules - irisevm.NewAppModule(app.EvmKeeper, app.AccountKeeper, app.BankKeeper), - feemarket.NewAppModule(app.FeeMarketKeeper), + irisevm.NewAppModule( + app.EvmKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(evmtypes.ModuleName), + ), + feemarket.NewAppModule(app.FeeMarketKeeper, app.GetSubspace(feemarkettypes.ModuleName)), } } @@ -225,35 +318,118 @@ func simulationModules( appCodec := encodingConfig.Marshaler return []module.AppModuleSimulation{ - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), + auth.NewAppModule( + appCodec, + app.AccountKeeper, + authsims.RandomGenesisAccounts, + app.GetSubspace(authtypes.ModuleName), + ), + bank.NewAppModule( + appCodec, + app.BankKeeper, + app.AccountKeeper, + app.GetSubspace(banktypes.ModuleName), + ), + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), + gov.NewAppModule( + appCodec, + app.GovKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(govtypes.ModuleName), + ), mint.NewAppModule(appCodec, app.MintKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), + feegrantmodule.NewAppModule( + appCodec, + app.AccountKeeper, + app.BankKeeper, + app.FeeGrantKeeper, + app.interfaceRegistry, + ), + staking.NewAppModule( + appCodec, + app.StakingKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(stakingtypes.ModuleName), + ), + distr.NewAppModule( + appCodec, + app.DistrKeeper, + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.GetSubspace(distrtypes.ModuleName), + ), + slashing.NewAppModule( + appCodec, + app.SlashingKeeper, + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.GetSubspace(slashingtypes.ModuleName), + ), params.NewAppModule(app.ParamsKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), + evidence.NewAppModule(*app.EvidenceKeeper), + authzmodule.NewAppModule( + appCodec, + app.AuthzKeeper, + app.AccountKeeper, + app.BankKeeper, + app.interfaceRegistry, + ), ibc.NewAppModule(app.IBCKeeper), app.transferModule, guardian.NewAppModule(appCodec, app.GuardianKeeper), - token.NewAppModule(appCodec, app.TokenKeeper, app.AccountKeeper, app.BankKeeper), + token.NewAppModule( + appCodec, + app.TokenKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(tokentypes.ModuleName), + ), record.NewAppModule(appCodec, app.RecordKeeper, app.AccountKeeper, app.BankKeeper), nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper), - htlc.NewAppModule(appCodec, app.HTLCKeeper, app.AccountKeeper, app.BankKeeper), - coinswap.NewAppModule(appCodec, app.CoinswapKeeper, app.AccountKeeper, app.BankKeeper), - service.NewAppModule(appCodec, app.ServiceKeeper, app.AccountKeeper, app.BankKeeper), + htlc.NewAppModule( + appCodec, + app.HTLCKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(htlctypes.ModuleName), + ), + coinswap.NewAppModule( + appCodec, + app.CoinswapKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(coinswaptypes.ModuleName), + ), + service.NewAppModule( + appCodec, + app.ServiceKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(servicetypes.ModuleName), + ), oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), random.NewAppModule(appCodec, app.RandomKeeper, app.AccountKeeper, app.BankKeeper), - farm.NewAppModule(appCodec, app.FarmKeeper, app.AccountKeeper, app.BankKeeper), + farm.NewAppModule( + appCodec, + app.FarmKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(farmtypes.ModuleName), + ), tibc.NewAppModule(app.TIBCKeeper), // Ethermint app modules - evm.NewAppModule(app.EvmKeeper, app.AccountKeeper), - feemarket.NewAppModule(app.FeeMarketKeeper), + irisevm.NewAppModule( + app.EvmKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(evmtypes.ModuleName), + ), + feemarket.NewAppModule(app.FeeMarketKeeper, app.GetSubspace(feemarkettypes.ModuleName)), } } @@ -285,12 +461,13 @@ func orderBeginBlockers() []string { govtypes.ModuleName, crisistypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, genutiltypes.ModuleName, authz.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, vestingtypes.ModuleName, + consensustypes.ModuleName, //self module tokentypes.ModuleName, @@ -326,7 +503,7 @@ func orderEndBlockers() []string { evmtypes.ModuleName, feemarkettypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, @@ -340,6 +517,7 @@ func orderEndBlockers() []string { paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, + consensustypes.ModuleName, //self module tokentypes.ModuleName, @@ -378,7 +556,7 @@ func orderInitBlockers() []string { slashingtypes.ModuleName, minttypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, authz.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, @@ -390,6 +568,7 @@ func orderInitBlockers() []string { feemarkettypes.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, + consensustypes.ModuleName, //self module tokentypes.ModuleName, diff --git a/app/sim_bench_test.go b/app/sim_bench_test.go index 0bb181480..b28ca1972 100644 --- a/app/sim_bench_test.go +++ b/app/sim_bench_test.go @@ -5,21 +5,36 @@ import ( "os" "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/irisnet/irishub/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/simapp" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" + simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" ) // Profile with: // /usr/local/go/bin/go test -benchmem -run=^$ github.com/irisnet/app -bench ^BenchmarkFullAppSimulation$ -Commit=true -cpuprofile cpu.out func BenchmarkFullAppSimulation(b *testing.B) { - config, db, dir, logger, _, err := simapp.SetupSimulation("goleveldb-app-sim", "Simulation") + b.ReportAllocs() + + config := simcli.NewConfigFromFlags() + config.ChainID = AppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation( + config, + "goleveldb-app-sim", + "Simulation", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) if err != nil { b.Fatalf("simulation setup failed: %s", err.Error()) } + if skip { + b.Skip("skipping benchmark application simulation") + } defer func() { db.Close() @@ -29,23 +44,34 @@ func BenchmarkFullAppSimulation(b *testing.B) { } }() - app := NewIrisApp(logger, db, nil, true, map[int64]bool{}, types.DefaultNodeHome, simapp.FlagPeriodValue, MakeEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt()) + app := NewIrisApp( + logger, + db, + nil, + true, + map[int64]bool{}, + types.DefaultNodeHome, + simcli.FlagPeriodValue, + MakeEncodingConfig(), + EmptyAppOptions{}, + interBlockCacheOpt(), + ) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( b, os.Stdout, app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(app, app.AppCodec(), config), + simtestutil.SimulationOperations(app, app.AppCodec(), config), app.ModuleAccountAddrs(), config, app.AppCodec(), ) // export state and simParams before the simulation error is checked - if err = simapp.CheckExportSimulation(app, config, simParams); err != nil { + if err = simtestutil.CheckExportSimulation(app, config, simParams); err != nil { b.Fatal(err) } @@ -54,15 +80,27 @@ func BenchmarkFullAppSimulation(b *testing.B) { } if config.Commit { - simapp.PrintStats(db) + simtestutil.PrintStats(db) } } func BenchmarkInvariants(b *testing.B) { - config, db, dir, logger, _, err := simapp.SetupSimulation("leveldb-app-invariant-bench", "Simulation") + config := simcli.NewConfigFromFlags() + config.ChainID = AppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation( + config, + "goleveldb-app-sim", + "Simulation", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) if err != nil { b.Fatalf("simulation setup failed: %s", err.Error()) } + if skip { + b.Skip("skipping benchmark application simulation") + } config.AllInvariants = false @@ -74,23 +112,34 @@ func BenchmarkInvariants(b *testing.B) { } }() - app := NewIrisApp(logger, db, nil, true, map[int64]bool{}, types.DefaultNodeHome, simapp.FlagPeriodValue, MakeEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt()) + app := NewIrisApp( + logger, + db, + nil, + true, + map[int64]bool{}, + types.DefaultNodeHome, + simcli.FlagPeriodValue, + MakeEncodingConfig(), + EmptyAppOptions{}, + interBlockCacheOpt(), + ) // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( b, os.Stdout, app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(app, app.AppCodec(), config), + simtestutil.SimulationOperations(app, app.AppCodec(), config), app.ModuleAccountAddrs(), config, app.AppCodec(), ) // export state and simParams before the simulation error is checked - if err = simapp.CheckExportSimulation(app, config, simParams); err != nil { + if err = simtestutil.CheckExportSimulation(app, config, simParams); err != nil { b.Fatal(err) } @@ -99,7 +148,7 @@ func BenchmarkInvariants(b *testing.B) { } if config.Commit { - simapp.PrintStats(db) + simtestutil.PrintStats(db) } ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight() + 1}) diff --git a/app/sim_test.go b/app/sim_test.go index 7b1575012..8715a0748 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -21,16 +21,15 @@ import ( tokentypes "github.com/irisnet/irismod/modules/token/types" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/simapp" - "github.com/cosmos/cosmos-sdk/simapp/helpers" "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -42,15 +41,19 @@ import ( minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/simulation" + simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ) +// AppChainID hardcoded chainID for simulation +const AppChainID = "irishub-1" + // Get flags every time the simulator is run func init() { - simapp.GetSimulatorFlags() + simcli.GetSimulatorFlags() } type StoreKeysPrefixes struct { @@ -72,9 +75,19 @@ func interBlockCacheOpt() func(*baseapp.BaseApp) { } func TestFullAppSimulation(t *testing.T) { - config, db, dir, logger, skip, err := simapp.SetupSimulation("leveldb-app-sim", "Simulation") + config := simcli.NewConfigFromFlags() + config.ChainID = AppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation( + config, + "goleveldb-app-sim", + "Simulation", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) + if skip { - t.Skip("skipping application simulation") + t.Skip("skipping benchmark application simulation") } require.NoError(t, err, "simulation setup failed") @@ -83,7 +96,18 @@ func TestFullAppSimulation(t *testing.T) { require.NoError(t, os.RemoveAll(dir)) }() - app := NewIrisApp(logger, db, nil, true, map[int64]bool{}, types.DefaultNodeHome, simapp.FlagPeriodValue, MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) + app := NewIrisApp( + logger, + db, + nil, + true, + map[int64]bool{}, + types.DefaultNodeHome, + simcli.FlagPeriodValue, + MakeEncodingConfig(), + EmptyAppOptions{}, + fauxMerkleModeOpt, + ) require.Equal(t, "IrisApp", app.Name()) // run randomized simulation @@ -91,28 +115,38 @@ func TestFullAppSimulation(t *testing.T) { t, os.Stdout, app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(app, app.AppCodec(), config), + simtestutil.SimulationOperations(app, app.AppCodec(), config), app.ModuleAccountAddrs(), config, app.AppCodec(), ) // export state and simParams before the simulation error is checked - err = simapp.CheckExportSimulation(app, config, simParams) + err = simtestutil.CheckExportSimulation(app, config, simParams) require.NoError(t, err) require.NoError(t, simErr) if config.Commit { - simapp.PrintStats(db) + simtestutil.PrintStats(db) } } func TestAppImportExport(t *testing.T) { - config, db, dir, logger, skip, err := simapp.SetupSimulation("leveldb-app-sim", "Simulation") + config := simcli.NewConfigFromFlags() + config.ChainID = AppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation( + config, + "goleveldb-app-sim", + "Simulation", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) + if skip { - t.Skip("skipping application import/export simulation") + t.Skip("skipping benchmark application simulation") } require.NoError(t, err, "simulation setup failed") @@ -121,7 +155,18 @@ func TestAppImportExport(t *testing.T) { require.NoError(t, os.RemoveAll(dir)) }() - app := NewIrisApp(logger, db, nil, true, map[int64]bool{}, types.DefaultNodeHome, simapp.FlagPeriodValue, MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) + app := NewIrisApp( + logger, + db, + nil, + true, + map[int64]bool{}, + types.DefaultNodeHome, + simcli.FlagPeriodValue, + MakeEncodingConfig(), + EmptyAppOptions{}, + fauxMerkleModeOpt, + ) require.Equal(t, "IrisApp", app.Name()) // Run randomized simulation @@ -129,31 +174,37 @@ func TestAppImportExport(t *testing.T) { t, os.Stdout, app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(app, app.AppCodec(), config), + simtestutil.SimulationOperations(app, app.AppCodec(), config), app.ModuleAccountAddrs(), config, app.AppCodec(), ) // export state and simParams before the simulation error is checked - err = simapp.CheckExportSimulation(app, config, simParams) + err = simtestutil.CheckExportSimulation(app, config, simParams) require.NoError(t, err) require.NoError(t, simErr) if config.Commit { - simapp.PrintStats(db) + simtestutil.PrintStats(db) } fmt.Printf("exporting genesis...\n") - exported, err := app.ExportAppStateAndValidators(false, []string{}) + exported, err := app.ExportAppStateAndValidators(false, []string{}, []string{}) require.NoError(t, err) fmt.Printf("importing genesis...\n") - _, newDB, newDir, _, _, err := simapp.SetupSimulation("leveldb-app-sim-2", "Simulation-2") + newDB, newDir, _, _, err := simtestutil.SetupSimulation( + config, + "goleveldb-app-sim-2", + "Simulation-2", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) require.NoError(t, err, "simulation setup failed") defer func() { @@ -161,7 +212,18 @@ func TestAppImportExport(t *testing.T) { require.NoError(t, os.RemoveAll(newDir)) }() - newApp := NewIrisApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, types.DefaultNodeHome, simapp.FlagPeriodValue, MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) + newApp := NewIrisApp( + log.NewNopLogger(), + newDB, + nil, + true, + map[int64]bool{}, + types.DefaultNodeHome, + simcli.FlagPeriodValue, + MakeEncodingConfig(), + EmptyAppOptions{}, + fauxMerkleModeOpt, + ) require.Equal(t, "IrisApp", newApp.Name()) var genesisState iristypes.GenesisState @@ -196,12 +258,16 @@ func TestAppImportExport(t *testing.T) { {app.keys[slashingtypes.StoreKey], newApp.keys[slashingtypes.StoreKey], [][]byte{}}, {app.keys[minttypes.StoreKey], newApp.keys[minttypes.StoreKey], [][]byte{}}, {app.keys[distrtypes.StoreKey], newApp.keys[distrtypes.StoreKey], [][]byte{}}, - {app.keys[banktypes.StoreKey], newApp.keys[banktypes.StoreKey], [][]byte{banktypes.BalancesPrefix}}, + { + app.keys[banktypes.StoreKey], + newApp.keys[banktypes.StoreKey], + [][]byte{banktypes.BalancesPrefix}, + }, {app.keys[paramtypes.StoreKey], newApp.keys[paramtypes.StoreKey], [][]byte{}}, {app.keys[govtypes.StoreKey], newApp.keys[govtypes.StoreKey], [][]byte{}}, {app.keys[evidencetypes.StoreKey], newApp.keys[evidencetypes.StoreKey], [][]byte{}}, {app.keys[capabilitytypes.StoreKey], newApp.keys[capabilitytypes.StoreKey], [][]byte{}}, - {app.keys[ibchost.StoreKey], newApp.keys[ibchost.StoreKey], [][]byte{}}, + {app.keys[ibcexported.StoreKey], newApp.keys[ibcexported.StoreKey], [][]byte{}}, {app.keys[ibctransfertypes.StoreKey], newApp.keys[ibctransfertypes.StoreKey], [][]byte{}}, // check irismod module @@ -210,8 +276,16 @@ func TestAppImportExport(t *testing.T) { //mt.Supply is InitSupply, can be not equal to TotalSupply {app.keys[mttypes.StoreKey], newApp.keys[mttypes.StoreKey], [][]byte{mttypes.PrefixMT}}, {app.keys[nfttypes.StoreKey], newApp.keys[nfttypes.StoreKey], [][]byte{{0x05}}}, - {app.keys[servicetypes.StoreKey], newApp.keys[servicetypes.StoreKey], [][]byte{servicetypes.InternalCounterKey}}, - {app.keys[randomtypes.StoreKey], newApp.keys[randomtypes.StoreKey], [][]byte{randomtypes.RandomKey}}, + { + app.keys[servicetypes.StoreKey], + newApp.keys[servicetypes.StoreKey], + [][]byte{servicetypes.InternalCounterKey}, + }, + { + app.keys[randomtypes.StoreKey], + newApp.keys[randomtypes.StoreKey], + [][]byte{randomtypes.RandomKey}, + }, {app.keys[htlctypes.StoreKey], newApp.keys[htlctypes.StoreKey], [][]byte{}}, {app.keys[coinswaptypes.StoreKey], newApp.keys[coinswaptypes.StoreKey], [][]byte{}}, } @@ -223,15 +297,40 @@ func TestAppImportExport(t *testing.T) { failedKVAs, failedKVBs := sdk.DiffKVStores(storeA, storeB, skp.Prefixes) require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare") - fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), skp.A, skp.B) - require.Equal(t, len(failedKVAs), 0, simapp.GetSimulationLog(skp.A.Name(), app.SimulationManager().StoreDecoders, failedKVAs, failedKVBs)) + fmt.Printf( + "compared %d different key/value pairs between %s and %s\n", + len(failedKVAs), + skp.A, + skp.B, + ) + require.Equal( + t, + len(failedKVAs), + 0, + simtestutil.GetSimulationLog( + skp.A.Name(), + app.SimulationManager().StoreDecoders, + failedKVAs, + failedKVBs, + ), + ) } } func TestAppSimulationAfterImport(t *testing.T) { - config, db, dir, logger, skip, err := simapp.SetupSimulation("leveldb-app-sim", "Simulation") + config := simcli.NewConfigFromFlags() + config.ChainID = AppChainID + + db, dir, logger, skip, err := simtestutil.SetupSimulation( + config, + "goleveldb-app-sim", + "Simulation", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) + if skip { - t.Skip("skipping application simulation after import") + t.Skip("skipping benchmark application simulation") } require.NoError(t, err, "simulation setup failed") @@ -240,7 +339,18 @@ func TestAppSimulationAfterImport(t *testing.T) { require.NoError(t, os.RemoveAll(dir)) }() - app := NewIrisApp(logger, db, nil, true, map[int64]bool{}, types.DefaultNodeHome, simapp.FlagPeriodValue, MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) + app := NewIrisApp( + logger, + db, + nil, + true, + map[int64]bool{}, + types.DefaultNodeHome, + simcli.FlagPeriodValue, + MakeEncodingConfig(), + EmptyAppOptions{}, + fauxMerkleModeOpt, + ) require.Equal(t, "IrisApp", app.Name()) // Run randomized simulation @@ -248,21 +358,21 @@ func TestAppSimulationAfterImport(t *testing.T) { t, os.Stdout, app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(app, app.AppCodec(), config), + simtestutil.SimulationOperations(app, app.AppCodec(), config), app.ModuleAccountAddrs(), config, app.AppCodec(), ) // export state and simParams before the simulation error is checked - err = simapp.CheckExportSimulation(app, config, simParams) + err = simtestutil.CheckExportSimulation(app, config, simParams) require.NoError(t, err) require.NoError(t, simErr) if config.Commit { - simapp.PrintStats(db) + simtestutil.PrintStats(db) } if stopEarly { @@ -272,12 +382,18 @@ func TestAppSimulationAfterImport(t *testing.T) { fmt.Printf("exporting genesis...\n") - exported, err := app.ExportAppStateAndValidators(true, []string{}) + exported, err := app.ExportAppStateAndValidators(true, []string{}, []string{}) require.NoError(t, err) fmt.Printf("importing genesis...\n") - _, newDB, newDir, _, _, err := simapp.SetupSimulation("leveldb-app-sim-2", "Simulation-2") + newDB, newDir, _, _, err := simtestutil.SetupSimulation( + config, + "goleveldb-app-sim-2", + "Simulation-2", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) require.NoError(t, err, "simulation setup failed") defer func() { @@ -285,7 +401,18 @@ func TestAppSimulationAfterImport(t *testing.T) { require.NoError(t, os.RemoveAll(newDir)) }() - newApp := NewIrisApp(log.NewNopLogger(), newDB, nil, true, map[int64]bool{}, types.DefaultNodeHome, simapp.FlagPeriodValue, MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt) + newApp := NewIrisApp( + log.NewNopLogger(), + newDB, + nil, + true, + map[int64]bool{}, + types.DefaultNodeHome, + simcli.FlagPeriodValue, + MakeEncodingConfig(), + EmptyAppOptions{}, + fauxMerkleModeOpt, + ) require.Equal(t, "IrisApp", newApp.Name()) newApp.InitChain(abci.RequestInitChain{ @@ -296,9 +423,9 @@ func TestAppSimulationAfterImport(t *testing.T) { t, os.Stdout, newApp.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), app.DefaultGenesis()), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(newApp, newApp.AppCodec(), config), + simtestutil.SimulationOperations(newApp, newApp.AppCodec(), config), app.ModuleAccountAddrs(), config, newApp.AppCodec(), @@ -309,16 +436,16 @@ func TestAppSimulationAfterImport(t *testing.T) { // TODO: Make another test for the fuzzer itself, which just has noOp txs // and doesn't depend on the application. func TestAppStateDeterminism(t *testing.T) { - if !simapp.FlagEnabledValue { + if !simcli.FlagEnabledValue { t.Skip("skipping application simulation") } - config := simapp.NewConfigFromFlags() + config := simcli.NewConfigFromFlags() config.InitialBlockHeight = 1 config.ExportParamsPath = "" config.OnOperation = false config.AllInvariants = false - config.ChainID = helpers.SimAppChainID + config.ChainID = AppChainID numSeeds := 3 numTimesToRunPerSeed := 5 @@ -329,14 +456,25 @@ func TestAppStateDeterminism(t *testing.T) { for j := 0; j < numTimesToRunPerSeed; j++ { var logger log.Logger - if simapp.FlagVerboseValue { + if simcli.FlagVerboseValue { logger = log.TestingLogger() } else { logger = log.NewNopLogger() } db := dbm.NewMemDB() - app := NewIrisApp(logger, db, nil, true, map[int64]bool{}, types.DefaultNodeHome, simapp.FlagPeriodValue, MakeEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt()) + app := NewIrisApp( + logger, + db, + nil, + true, + map[int64]bool{}, + types.DefaultNodeHome, + simcli.FlagPeriodValue, + MakeEncodingConfig(), + EmptyAppOptions{}, + interBlockCacheOpt(), + ) fmt.Printf( "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", @@ -347,9 +485,13 @@ func TestAppStateDeterminism(t *testing.T) { t, os.Stdout, app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), + simtestutil.AppStateFn( + app.AppCodec(), + app.SimulationManager(), + app.DefaultGenesis(), + ), simtypes.RandomAccounts, // Replace with own random account function if using keys other than secp256k1 - simapp.SimulationOperations(app, app.AppCodec(), config), + simtestutil.SimulationOperations(app, app.AppCodec(), config), app.ModuleAccountAddrs(), config, app.AppCodec(), @@ -357,7 +499,7 @@ func TestAppStateDeterminism(t *testing.T) { require.NoError(t, err) if config.Commit { - simapp.PrintStats(db) + simtestutil.PrintStats(db) } appHash := app.LastCommitID().Hash @@ -365,8 +507,15 @@ func TestAppStateDeterminism(t *testing.T) { if j != 0 { require.Equal( - t, string(appHashList[0]), string(appHashList[j]), - "non-determinism in seed %d: %d/%d, attempt: %d/%d\n", config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, + t, + string(appHashList[0]), + string(appHashList[j]), + "non-determinism in seed %d: %d/%d, attempt: %d/%d\n", + config.Seed, + i+1, + numSeeds, + j+1, + numTimesToRunPerSeed, ) } } diff --git a/app/upgrades/types.go b/app/upgrades/types.go index 060444813..f4ce455d5 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -1,7 +1,7 @@ package upgrades import ( - abci "github.com/tendermint/tendermint/abci/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" store "github.com/cosmos/cosmos-sdk/store/types" @@ -38,8 +38,8 @@ type Upgrade struct { } type ConsensusParamsReaderWriter interface { - StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusParams) - GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams + StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams) + GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams } type AppKeepers struct { diff --git a/app/upgrades/v110/htlc/migrate.go b/app/upgrades/v110/htlc/migrate.go index 8ca28138b..a8bc8b0d5 100644 --- a/app/upgrades/v110/htlc/migrate.go +++ b/app/upgrades/v110/htlc/migrate.go @@ -3,7 +3,7 @@ package htlc import ( "time" - tmbytes "github.com/tendermint/tendermint/libs/bytes" + tmbytes "github.com/cometbft/cometbft/libs/bytes" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -14,7 +14,13 @@ import ( htlctypes "github.com/irisnet/irismod/modules/htlc/types" ) -func Migrate(ctx sdk.Context, cdc codec.Codec, k htlckeeper.Keeper, bk bankkeeper.Keeper, key *storetypes.KVStoreKey) error { +func Migrate( + ctx sdk.Context, + cdc codec.Codec, + k htlckeeper.Keeper, + bk bankkeeper.Keeper, + key *storetypes.KVStoreKey, +) error { if err := k.EnsureModuleAccountPermissions(ctx); err != nil { return err } diff --git a/app/upgrades/v110/service/migrate.go b/app/upgrades/v110/service/migrate.go index 4d2a3d464..f62497eab 100644 --- a/app/upgrades/v110/service/migrate.go +++ b/app/upgrades/v110/service/migrate.go @@ -1,7 +1,7 @@ package service import ( - "github.com/tendermint/tendermint/crypto" + "github.com/cometbft/cometbft/crypto" sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" @@ -31,5 +31,10 @@ func Migrate(ctx sdk.Context, k servicekeeper.Keeper, bk bankkeeper.Keeper) erro ) k.SetParams(ctx, params) - return bk.SendCoinsFromAccountToModule(ctx, oldAcc, servicetypes.FeeCollectorName, bk.GetAllBalances(ctx, oldAcc)) + return bk.SendCoinsFromAccountToModule( + ctx, + oldAcc, + servicetypes.FeeCollectorName, + bk.GetAllBalances(ctx, oldAcc), + ) } diff --git a/app/upgrades/v120/upgrades.go b/app/upgrades/v120/upgrades.go index 33e77b031..663937c05 100644 --- a/app/upgrades/v120/upgrades.go +++ b/app/upgrades/v120/upgrades.go @@ -24,8 +24,7 @@ import ( slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" farmtypes "github.com/irisnet/irismod/modules/farm/types" @@ -61,11 +60,20 @@ var Upgrade = upgrades.Upgrade{ UpgradeName: "v1.2", UpgradeHandlerConstructor: upgradeHandlerConstructor, StoreUpgrades: &store.StoreUpgrades{ - Added: []string{farmtypes.StoreKey, feegrant.StoreKey, tibchost.StoreKey, tibcnfttypes.StoreKey}, + Added: []string{ + farmtypes.StoreKey, + feegrant.StoreKey, + tibchost.StoreKey, + tibcnfttypes.StoreKey, + }, }, } -func upgradeHandlerConstructor(m *module.Manager, c module.Configurator, app upgrades.AppKeepers) upgradetypes.UpgradeHandler { +func upgradeHandlerConstructor( + m *module.Manager, + c module.Configurator, + app upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { // init farm params amount := sdkmath.NewIntWithDecimal(1000, int(types.NativeToken.Scale)) @@ -93,7 +101,7 @@ func upgradeHandlerConstructor(m *module.Manager, c module.Configurator, app upg fromVM[distrtypes.ModuleName] = 1 fromVM[slashingtypes.ModuleName] = 1 fromVM[coinswaptypes.ModuleName] = 1 - fromVM[ibchost.ModuleName] = 1 + fromVM[ibcexported.ModuleName] = 1 fromVM[capabilitytypes.ModuleName] = capability.AppModule{}.ConsensusVersion() fromVM[genutiltypes.ModuleName] = genutil.AppModule{}.ConsensusVersion() fromVM[minttypes.ModuleName] = mint.AppModule{}.ConsensusVersion() diff --git a/app/upgrades/v140/upgrades.go b/app/upgrades/v140/upgrades.go index d90ab72a1..0797937e0 100644 --- a/app/upgrades/v140/upgrades.go +++ b/app/upgrades/v140/upgrades.go @@ -6,10 +6,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" "github.com/irisnet/irishub/app/upgrades" ) @@ -22,7 +22,11 @@ var Upgrade = upgrades.Upgrade{ }, } -func upgradeHandlerConstructor(m *module.Manager, c module.Configurator, app upgrades.AppKeepers) upgradetypes.UpgradeHandler { +func upgradeHandlerConstructor( + m *module.Manager, + c module.Configurator, + app upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { // version upgrade: // nft : 1 -> 2 diff --git a/app/upgrades/v200/upgrades.go b/app/upgrades/v200/upgrades.go index 22d1030b0..ae889e38f 100644 --- a/app/upgrades/v200/upgrades.go +++ b/app/upgrades/v200/upgrades.go @@ -11,8 +11,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" evmtypes "github.com/evmos/ethermint/x/evm/types" "github.com/evmos/ethermint/x/feemarket" @@ -31,7 +31,11 @@ var Upgrade = upgrades.Upgrade{ }, } -func upgradeHandlerConstructor(m *module.Manager, c module.Configurator, app upgrades.AppKeepers) upgradetypes.UpgradeHandler { +func upgradeHandlerConstructor( + m *module.Manager, + c module.Configurator, + app upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { fromVM[evmtypes.ModuleName] = irisevm.AppModule{}.ConsensusVersion() fromVM[feemarkettypes.ModuleName] = feemarket.AppModule{}.ConsensusVersion() diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 000000000..56378cdee --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,8 @@ +# Generated by "buf config migrate-v1beta1". Edit as necessary, and +# remove this comment when you're finished. +# +# This workspace file points to the roots found in your +# previous "buf.yaml" configuration. +version: v1 +directories: + - proto \ No newline at end of file diff --git a/cmd/iris/cmd/genesis.go b/cmd/iris/cmd/genesis.go index 0fbcc7bf1..7f5ef96dd 100644 --- a/cmd/iris/cmd/genesis.go +++ b/cmd/iris/cmd/genesis.go @@ -7,8 +7,8 @@ import ( "github.com/spf13/cobra" - tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/types" + tmjson "github.com/cometbft/cometbft/libs/json" + "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/cmd/iris/cmd/keys.go b/cmd/iris/cmd/keys.go index 3c9274fcf..1aa434f78 100644 --- a/cmd/iris/cmd/keys.go +++ b/cmd/iris/cmd/keys.go @@ -12,11 +12,11 @@ import ( clientkeys "github.com/evmos/ethermint/client/keys" "github.com/spf13/cobra" + "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" "github.com/cosmos/cosmos-sdk/client/keys" - "github.com/tendermint/tendermint/libs/cli" "github.com/irisnet/irishub/keystore" ) @@ -54,7 +54,7 @@ The pass backend requires GnuPG: https://gnupg.org/ addCmd := keys.AddKeyCommand() // update the default signing algorithm value to "secp256k1" - algoFlag := addCmd.Flag(flags.FlagKeyAlgorithm) + algoFlag := addCmd.Flag(flags.FlagKeyType) algoFlag.DefValue = string(cosmoshd.Secp256k1Type) err := algoFlag.Value.Set(string(cosmoshd.Secp256k1Type)) if err != nil { @@ -79,8 +79,10 @@ The pass backend requires GnuPG: https://gnupg.org/ ) cmd.PersistentFlags().String(flags.FlagHome, defaultNodeHome, "The application home directory") - cmd.PersistentFlags().String(flags.FlagKeyringDir, "", "The client Keyring directory; if omitted, the default 'home' directory will be used") - cmd.PersistentFlags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)") + cmd.PersistentFlags(). + String(flags.FlagKeyringDir, "", "The client Keyring directory; if omitted, the default 'home' directory will be used") + cmd.PersistentFlags(). + String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)") cmd.PersistentFlags().String(cli.OutputFlag, "text", "Output format (text|json)") return cmd @@ -126,7 +128,8 @@ func getArmor(privBytes []byte, passphrase string) (string, error) { } func runAddCmd(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd).WithKeyringOptions(etherminthd.EthSecp256k1Option()) + clientCtx := client.GetClientContextFromCmd(cmd). + WithKeyringOptions(etherminthd.EthSecp256k1Option()) clientCtx, err := client.ReadPersistentCommandFlags(clientCtx, cmd.Flags()) if err != nil { return err diff --git a/cmd/iris/cmd/root.go b/cmd/iris/cmd/root.go index 039445d24..a14a8197e 100644 --- a/cmd/iris/cmd/root.go +++ b/cmd/iris/cmd/root.go @@ -10,15 +10,16 @@ import ( "github.com/spf13/cast" "github.com/spf13/cobra" - tmcfg "github.com/tendermint/tendermint/config" - tmcli "github.com/tendermint/tendermint/libs/cli" - "github.com/tendermint/tendermint/libs/log" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" + tmcfg "github.com/cometbft/cometbft/config" + tmcli "github.com/cometbft/cometbft/libs/cli" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -53,7 +54,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). + WithBroadcastMode(flags.BroadcastSync). WithHomeDir(iristypes.DefaultNodeHome). WithKeyringOptions(etherminthd.EthSecp256k1Option()). WithViper("") @@ -80,7 +81,12 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { customTemplate, customIRISHubConfig := initAppConfig() customTMConfig := initTendermintConfig() - return server.InterceptConfigsPreRunHandler(cmd, customTemplate, customIRISHubConfig, customTMConfig) + return server.InterceptConfigsPreRunHandler( + cmd, + customTemplate, + customIRISHubConfig, + customTMConfig, + ) }, PersistentPostRun: func(cmd *cobra.Command, _ []string) { converter.handlePostRun(cmd) @@ -120,10 +126,12 @@ func initAppConfig() (string, interface{}) { } func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { + ac := appCreator{ + encCfg: encodingConfig, + } + rootCmd.AddCommand( genutilcli.InitCmd(app.ModuleBasics, iristypes.DefaultNodeHome), - genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, iristypes.DefaultNodeHome), - genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, iristypes.DefaultNodeHome), genutilcli.ValidateGenesisCmd(app.ModuleBasics), AddGenesisAccountCmd(iristypes.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), @@ -131,23 +139,41 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { ethermintdebug.Cmd(), config.Cmd(), mergeGenesisCmd(encodingConfig), + pruning.PruningCmd(ac.newApp), ) - ac := appCreator{ - encCfg: encodingConfig, - } - - irisserver.AddCommands(rootCmd, iristypes.DefaultNodeHome, ac.newApp, ac.appExport, addModuleInitFlags) + irisserver.AddCommands( + rootCmd, + iristypes.DefaultNodeHome, + ac.newApp, + ac.appExport, + addModuleInitFlags, + ) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( rpc.StatusCommand(), + genesisCommand(encodingConfig), queryCommand(), txCommand(), Commands(iristypes.DefaultNodeHome), ) } +// genesisCommand builds genesis-related `simd genesis` command. Users may provide application specific commands as a parameter +func genesisCommand(encodingConfig params.EncodingConfig, cmds ...*cobra.Command) *cobra.Command { + cmd := genutilcli.GenesisCoreCommand( + encodingConfig.TxConfig, + app.ModuleBasics, + iristypes.DefaultNodeHome, + ) + + for _, sub_cmd := range cmds { + cmd.AddCommand(sub_cmd) + } + return cmd +} + func addModuleInitFlags(rootCmd *cobra.Command) { crisis.AddModuleInitFlags(rootCmd) } @@ -206,7 +232,12 @@ type appCreator struct { encCfg params.EncodingConfig } -func (ac appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts servertypes.AppOptions) servertypes.Application { +func (ac appCreator) newApp( + logger log.Logger, + db dbm.DB, + traceStore io.Writer, + appOpts servertypes.AppOptions, +) servertypes.Application { var cache sdk.MultiStorePersistentCache if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { @@ -224,7 +255,7 @@ func (ac appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, } snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") - snapshotDB, err := sdk.NewLevelDB("metadata", snapshotDir) + snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir) if err != nil { panic(err) } @@ -266,9 +297,8 @@ func (ac appCreator) appExport( forZeroHeight bool, jailAllowedAddrs []string, appOpts servertypes.AppOptions, -) ( - servertypes.ExportedApp, error, -) { + modulesToExport []string, +) (servertypes.ExportedApp, error) { homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { return servertypes.ExportedApp{}, errors.New("application home is not set") @@ -297,5 +327,5 @@ func (ac appCreator) appExport( } } - return irisApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) + return irisApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } diff --git a/cmd/iris/cmd/testnet.go b/cmd/iris/cmd/testnet.go index d6328cebc..92cd68ed3 100644 --- a/cmd/iris/cmd/testnet.go +++ b/cmd/iris/cmd/testnet.go @@ -16,11 +16,11 @@ import ( "github.com/spf13/cobra" - tmconfig "github.com/tendermint/tendermint/config" - tmos "github.com/tendermint/tendermint/libs/os" - tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/types" - tmtime "github.com/tendermint/tendermint/types/time" + tmconfig "github.com/cometbft/cometbft/config" + tmos "github.com/cometbft/cometbft/libs/os" + tmrand "github.com/cometbft/cometbft/libs/rand" + "github.com/cometbft/cometbft/types" + tmtime "github.com/cometbft/cometbft/types/time" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -62,7 +62,10 @@ const nativeIrisMinUnit = "uiris" var PowerReduction = sdk.NewIntFromUint64(1000000000000000000) // get cmd to initialize all files for tendermint testnet and application -func testnetCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator) *cobra.Command { +func testnetCmd( + mbm module.BasicManager, + genBalIterator banktypes.GenesisBalancesIterator, +) *cobra.Command { cmd := &cobra.Command{ Use: "testnet", Short: "Initialize files for a simapp testnet", @@ -87,25 +90,46 @@ Example: nodeCLIHome, _ := cmd.Flags().GetString(flagNodeCLIHome) startingIPAddress, _ := cmd.Flags().GetString(flagStartingIPAddress) numValidators, _ := cmd.Flags().GetInt(flagNumValidators) - algo, _ := cmd.Flags().GetString(flags.FlagKeyAlgorithm) + algo, _ := cmd.Flags().GetString(flags.FlagKeyType) return InitTestnet( - clientCtx, cmd, config, mbm, genBalIterator, outputDir, chainID, minGasPrices, - nodeDirPrefix, nodeDaemonHome, nodeCLIHome, startingIPAddress, keyringBackend, algo, numValidators, + clientCtx, + cmd, + config, + mbm, + genBalIterator, + outputDir, + chainID, + minGasPrices, + nodeDirPrefix, + nodeDaemonHome, + nodeCLIHome, + startingIPAddress, + keyringBackend, + algo, + numValidators, ) }, } cmd.Flags().Int(flagNumValidators, 4, "Number of validators to initialize the testnet with") - cmd.Flags().StringP(flagOutputDir, "o", "./mytestnet", "Directory to store initialization data for the testnet") - cmd.Flags().String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)") - cmd.Flags().String(flagNodeDaemonHome, "iris", "Home directory of the node's daemon configuration") + cmd.Flags(). + StringP(flagOutputDir, "o", "./mytestnet", "Directory to store initialization data for the testnet") + cmd.Flags(). + String(flagNodeDirPrefix, "node", "Prefix the directory name for each node with (node results in node0, node1, ...)") + cmd.Flags(). + String(flagNodeDaemonHome, "iris", "Home directory of the node's daemon configuration") cmd.Flags().String(flagNodeCLIHome, "iriscli", "Home directory of the node's cli configuration") - cmd.Flags().String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)") - cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created") - cmd.Flags().String(server.FlagMinGasPrices, fmt.Sprintf("0.000006%s", sdk.DefaultBondDenom), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photino,0.001stake)") - cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)") - cmd.Flags().String(flags.FlagKeyAlgorithm, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for") + cmd.Flags(). + String(flagStartingIPAddress, "192.168.0.1", "Starting IP address (192.168.0.1 results in persistent peers list ID0@192.168.0.1:46656, ID1@192.168.0.2:46656, ...)") + cmd.Flags(). + String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created") + cmd.Flags(). + String(server.FlagMinGasPrices, fmt.Sprintf("0.000006%s", sdk.DefaultBondDenom), "Minimum gas prices to accept for transactions; All fees in a tx must meet this minimum (e.g. 0.01photino,0.001stake)") + cmd.Flags(). + String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|test)") + cmd.Flags(). + String(flags.FlagKeyType, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for") return cmd } @@ -189,7 +213,13 @@ func InitTestnet( memo := fmt.Sprintf("%s@%s:26656", nodeIDs[i], ip) genFiles = append(genFiles, nodeConfig.GenesisFile()) - kb, err := keyring.New(sdk.KeyringServiceName(), keyringBackend, nodeDir, inBuf, clientCtx.Codec) + kb, err := keyring.New( + sdk.KeyringServiceName(), + keyringBackend, + nodeDir, + inBuf, + clientCtx.Codec, + ) if err != nil { return err } @@ -230,7 +260,10 @@ func InitTestnet( sdk.NewCoin(nativeIrisMinUnit, accIrisTokens), } - genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) + genBalances = append( + genBalances, + banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}, + ) genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) valTokens := sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction) @@ -342,9 +375,18 @@ func initGenFiles( //set system service in the genesis state var serviceGenState servicetypes.GenesisState clientCtx.Codec.MustUnmarshalJSON(appGenState[servicetypes.ModuleName], &serviceGenState) - serviceGenState.Definitions = append(serviceGenState.Definitions, servicetypes.GenOraclePriceSvcDefinition()) - serviceGenState.Bindings = append(serviceGenState.Bindings, servicetypes.GenOraclePriceSvcBinding(iristypes.NativeToken.MinUnit)) - serviceGenState.Definitions = append(serviceGenState.Definitions, randomtypes.GetSvcDefinition()) + serviceGenState.Definitions = append( + serviceGenState.Definitions, + servicetypes.GenOraclePriceSvcDefinition(), + ) + serviceGenState.Bindings = append( + serviceGenState.Bindings, + servicetypes.GenOraclePriceSvcBinding(iristypes.NativeToken.MinUnit), + ) + serviceGenState.Definitions = append( + serviceGenState.Definitions, + randomtypes.GetSvcDefinition(), + ) appGenState[servicetypes.ModuleName] = clientCtx.Codec.MustMarshalJSON(&serviceGenState) // set the evm fee token denom in the genesis state @@ -374,9 +416,14 @@ func initGenFiles( } func collectGenFiles( - clientCtx client.Context, nodeConfig *tmconfig.Config, chainID string, - nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, - outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, + clientCtx client.Context, + nodeConfig *tmconfig.Config, + chainID string, + nodeIDs []string, + valPubKeys []cryptotypes.PubKey, + numValidators int, + outputDir, nodeDirPrefix, nodeDaemonHome string, + genBalIterator banktypes.GenesisBalancesIterator, ) error { var appState json.RawMessage @@ -398,7 +445,15 @@ func collectGenFiles( return err } - nodeAppState, err := genutil.GenAppStateFromConfig(clientCtx.Codec, clientCtx.TxConfig, nodeConfig, initCfg, *genDoc, genBalIterator) + nodeAppState, err := genutil.GenAppStateFromConfig( + clientCtx.Codec, + clientCtx.TxConfig, + nodeConfig, + initCfg, + *genDoc, + genBalIterator, + genutiltypes.DefaultMessageValidator, + ) if err != nil { return err } diff --git a/cmd/iris/cmd/util.go b/cmd/iris/cmd/util.go index 029b659d1..a75980eba 100644 --- a/cmd/iris/cmd/util.go +++ b/cmd/iris/cmd/util.go @@ -13,7 +13,7 @@ import ( "github.com/spf13/pflag" "github.com/spf13/viper" - "github.com/tendermint/tendermint/libs/cli" + "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -135,7 +135,9 @@ func (it *coinConverter) registerCmdWithFlag(parentCmd, cmd, flagNm string) *coi return it } -func (it *coinConverter) registerCmdForResponse(parentCmd, cmd, jsonPath, typ string) *coinConverter { +func (it *coinConverter) registerCmdForResponse( + parentCmd, cmd, jsonPath, typ string, +) *coinConverter { commands, ok := it.cmds[cmd] if !ok { commands = command{ @@ -150,7 +152,10 @@ func (it *coinConverter) registerCmdForResponse(parentCmd, cmd, jsonPath, typ st return it } -func (it *coinConverter) registerCmdForResponses(parentCmd, cmd string, fields ...field) *coinConverter { +func (it *coinConverter) registerCmdForResponses( + parentCmd, cmd string, + fields ...field, +) *coinConverter { commands, ok := it.cmds[cmd] if !ok { commands = command{ @@ -307,7 +312,10 @@ func (it coinConverter) resolvePath(cfg *config.Config, path string) (paths []st return paths } -func (it *coinConverter) queryToken(cmd *cobra.Command, denom string) (ft tokenv1.TokenI, err error) { +func (it *coinConverter) queryToken( + cmd *cobra.Command, + denom string, +) (ft tokenv1.TokenI, err error) { if ft, ok := it.tokens[denom]; ok { return ft, nil } @@ -387,7 +395,10 @@ func (it *coinConverter) handleMap(cmd *cobra.Command, cfg *config.Config, path _ = cfg.Set(path, dstCoin) } -func (it *coinConverter) convertCoins(cmd *cobra.Command, coinsStr string) (dstCoinsStr string, err error) { +func (it *coinConverter) convertCoins( + cmd *cobra.Command, + coinsStr string, +) (dstCoinsStr string, err error) { cs, err := it.parseCoins(coinsStr) if err != nil { return coinsStr, err @@ -404,7 +415,10 @@ func (it *coinConverter) convertCoins(cmd *cobra.Command, coinsStr string) (dstC return dstCoins.String(), nil } -func (it *coinConverter) convertToMinCoin(cmd *cobra.Command, srcCoin sdk.DecCoin) (coin sdk.Coin, err error) { +func (it *coinConverter) convertToMinCoin( + cmd *cobra.Command, + srcCoin sdk.DecCoin, +) (coin sdk.Coin, err error) { ft, err := it.queryToken(cmd, srcCoin.Denom) if err != nil { return coin, err @@ -412,7 +426,10 @@ func (it *coinConverter) convertToMinCoin(cmd *cobra.Command, srcCoin sdk.DecCoi return ft.ToMinCoin(srcCoin) } -func (it *coinConverter) convertToMainCoin(cmd *cobra.Command, srcCoin sdk.Coin) (coin sdk.DecCoin, err error) { +func (it *coinConverter) convertToMainCoin( + cmd *cobra.Command, + srcCoin sdk.Coin, +) (coin sdk.DecCoin, err error) { ft, err := it.queryToken(cmd, srcCoin.Denom) if err != nil { return coin, err diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index 75e6e52c7..f8a5de4ed 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -15,13 +15,9 @@ ifeq ($(GO),) $(error could not find go. Is it in PATH? $(GO)) endif -GOPATH ?= $(shell $(GO) env GOPATH) -GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com -GOLANGCI_LINT_HASHSUM := 8d21cc95da8d3daf8321ac40091456fc26123c964d7c2281d339d431f2f4c840 - -### -# Functions -### +############################################################################### +### Functions ### +############################################################################### go_get = $(if $(findstring Windows_NT,$(OS)),\ IF NOT EXIST $(GITHUBDIR)$(FS)$(1)$(FS) ( mkdir $(GITHUBDIR)$(FS)$(1) ) else (cd .) &\ @@ -35,96 +31,39 @@ cd $(GITHUBDIR)$(FS)$(1)$(FS)$(2) && git fetch origin && git checkout -q $(3) mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) mkfile_dir := $(shell cd $(shell dirname $(mkfile_path)); pwd) -### -# tools -### + +############################################################################### +### Tools ### +############################################################################### PREFIX ?= /usr/local BIN ?= $(PREFIX)/bin UNAME_S ?= $(shell uname -s) UNAME_M ?= $(shell uname -m) -TOOLS_DESTDIR ?= $(GOPATH)/bin - -GOLANGCI_LINT = $(TOOLS_DESTDIR)/golangci-lint -STATIK = $(TOOLS_DESTDIR)/statik - -all: tools +GOPATH ?= $(shell $(GO) env GOPATH) +GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com -tools: statik golangci-lint proto-tools +BUF_VERSION ?= 0.11.0 -golangci-lint: $(GOLANGCI_LINT) -$(GOLANGCI_LINT): $(mkfile_dir)/install-golangci-lint.sh - @echo "Installing golangci-lint..." - @bash $(mkfile_dir)/install-golangci-lint.sh $(TOOLS_DESTDIR) $(GOLANGCI_LINT_HASHSUM) +TOOLS_DESTDIR ?= $(GOPATH)/bin +STATIK = $(TOOLS_DESTDIR)/statik +RUNSIM = $(TOOLS_DESTDIR)/runsim + +tools: tools-stamp +tools-stamp: statik runsim + # Create dummy file to satisfy dependency and avoid + # rebuilding when this Makefile target is hit twice + # in a row. + touch $@ +# Install the runsim binary statik: $(STATIK) $(STATIK): @echo "Installing statik..." - @(cd /tmp && go install github.com/rakyll/statik@v0.1.6) - -PROTOC_VERSION ?= 3.13.0 -PROTOC_GRPC_GATEWAY_VERSION = 1.14.7 -ifeq ($(UNAME_S),Linux) - PROTOC_ZIP ?= protoc-3.13.0-linux-x86_64.zip - PROTOC_GRPC_GATEWAY_BIN ?= protoc-gen-grpc-gateway-v1.14.7-linux-x86_64 -endif -ifeq ($(UNAME_S),Darwin) - PROTOC_ZIP ?= protoc-3.13.0-osx-x86_64.zip - PROTOC_GRPC_GATEWAY_BIN ?= protoc-gen-grpc-gateway-v1.14.7-darwin-x86_64 -endif - -proto-tools: buf -ifeq (, $(shell which protoc)) - @echo "Installing protoc compiler..." - @(cd /tmp; \ - curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"; \ - unzip -o ${PROTOC_ZIP} -d $(PREFIX) bin/protoc; \ - unzip -o ${PROTOC_ZIP} -d $(PREFIX) 'include/*'; \ - rm -f ${PROTOC_ZIP}) -else - @echo "protoc already installed; skipping..." -endif - -ifeq (, $(shell which protoc-gen-gocosmos)) - @echo "Installing protoc-gen-gocosmos..." - @go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos -else - @echo "protoc-gen-gocosmos already installed; skipping..." -endif - -ifeq (, $(shell which protoc-gen-grpc-gateway)) - @echo "Installing protoc-gen-grpc-gateway..." - @curl -o "${BIN}/protoc-gen-grpc-gateway" -L "https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v${PROTOC_GRPC_GATEWAY_VERSION}/${PROTOC_GRPC_GATEWAY_BIN}" - @chmod +x "${BIN}/protoc-gen-grpc-gateway" -else - @echo "protoc-gen-grpc-gateway already installed; skipping..." -endif - -ifeq (, $(shell which protoc-gen-swagger)) - @echo "Installing protoc-gen-swagger..." - @go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger - @npm install -g swagger-combine -else - @echo "protoc-gen-grpc-gateway already installed; skipping..." -endif - -buf: buf-stamp - -buf-stamp: - @echo "Installing buf..." - @curl -sSL \ - "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \ - -o "${BIN}/buf" && \ - chmod +x "${BIN}/buf" - - touch $@ + @go install github.com/rakyll/statik@v0.1.6 -# Install the runsim binary with a temporary workaround of entering an outside -# directory as the "go get" command ignores the -mod option and will polute the -# go.{mod, sum} files. -# -# ref: https://github.com/golang/go/issues/30515 +# Install the runsim binary runsim: $(RUNSIM) $(RUNSIM): @echo "Installing runsim..." @@ -134,4 +73,4 @@ tools-clean: rm -f $(STATIK) $(GOLANGCI_LINT) $(RUNSIM) rm -f tools-stamp -.PHONY: tools-clean statik runsim +.PHONY: tools-clean statik runsim \ No newline at end of file diff --git a/docs/endpoints/grpc-client.md b/docs/endpoints/grpc-client.md index 6eb7782f4..dbaccf66d 100644 --- a/docs/endpoints/grpc-client.md +++ b/docs/endpoints/grpc-client.md @@ -29,7 +29,7 @@ Before generating a transaction, a new instance of a `TxBuilder` needs to be cre ```go import ( - "github.com/cosmos/cosmos-sdk/simapp" + "cosmossdk.io/simapp" ) func sendTx() error { diff --git a/docs/features/mint.md b/docs/features/mint.md index a71493149..2d4bd8ea8 100644 --- a/docs/features/mint.md +++ b/docs/features/mint.md @@ -12,7 +12,7 @@ The reward is composed by two parts, one is the collected transaction fee from t ### Block Time -The block time is not the machine time, because different machines may not have exactly the same time. They must have some deviation more or less which will result in non-deterministic. So here the block time is the BFT time. Please refer to this [tendermint bft-time](https://github.com/tendermint/tendermint/blob/master/docs/spec/consensus/bft-time.md) for detailed description. +The block time is not the machine time, because different machines may not have exactly the same time. They must have some deviation more or less which will result in non-deterministic. So here the block time is the BFT time. Please refer to this [tendermint bft-time](https://github.com/cometbft/cometbft/blob/master/docs/spec/consensus/bft-time.md) for detailed description. ### Inflation Rate diff --git a/go.mod b/go.mod index b8d2db48c..6431f7ee4 100644 --- a/go.mod +++ b/go.mod @@ -1,112 +1,136 @@ module github.com/irisnet/irishub -go 1.18 +go 1.19 require ( - cosmossdk.io/math v1.0.0-beta.4 - github.com/bianjieai/tibc-go v0.4.3 - github.com/cosmos/cosmos-sdk v0.46.9 - github.com/cosmos/ibc-go/v5 v5.2.0 + github.com/bianjieai/tibc-go v0.4.4-0.20230703020917-f2c4f40e4f3f + github.com/cometbft/cometbft v0.37.2 + github.com/cometbft/cometbft-db v0.8.0 + github.com/cosmos/cosmos-sdk v0.47.3 + github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/iavl v0.20.0 // indirect + github.com/cosmos/ibc-go/v7 v7.2.0 github.com/evmos/ethermint v0.20.0 - github.com/gogo/protobuf v1.3.3 - github.com/golang/protobuf v1.5.2 + github.com/irisnet/irismod v1.7.4-0.20230704022721-11481f2b93ed +) + +require ( + cosmossdk.io/api v0.3.1 // indirect + cosmossdk.io/core v0.5.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.3 // indirect + cosmossdk.io/math v1.0.1 + github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect + github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/irisnet/irismod v1.7.3 - github.com/olebedev/config v0.0.0-20190528211619-364964f3a8e4 - github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 - github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa - github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.6.1 + github.com/spf13/cast v1.5.1 + github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 - github.com/spf13/viper v1.14.0 - github.com/stretchr/testify v1.8.1 - github.com/tendermint/tendermint v0.34.26 - github.com/tendermint/tm-db v0.6.7 - golang.org/x/crypto v0.5.0 - google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 - google.golang.org/grpc v1.52.0 + github.com/stretchr/testify v1.8.4 + github.com/tidwall/gjson v1.14.4 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 + google.golang.org/grpc v1.55.0 + google.golang.org/protobuf v1.30.0 gopkg.in/yaml.v2 v2.4.0 + sigs.k8s.io/yaml v1.3.0 // indirect +) + +require ( + cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d + github.com/gogo/protobuf v1.3.2 + github.com/olebedev/config v0.0.0-20190528211619-364964f3a8e4 + github.com/pkg/errors v0.9.1 + github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa + github.com/spf13/viper v1.16.0 + golang.org/x/crypto v0.9.0 ) require ( - cloud.google.com/go/compute/metadata v0.2.1 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + cosmossdk.io/log v1.1.0 // indirect + cosmossdk.io/tools/rosetta v0.2.1 // indirect + github.com/btcsuite/btcd/btcutil v1.1.3 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect - github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect - github.com/cosmos/gogoproto v1.4.3 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf // indirect + github.com/go-playground/locales v0.14.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect - github.com/tidwall/btree v1.5.0 // indirect + github.com/gogo/googleapis v1.4.1 // indirect + github.com/golang/mock v1.6.0 // indirect + github.com/google/s2a-go v0.1.3 // indirect + github.com/huandu/skiplist v1.2.0 // indirect + github.com/linxGnu/grocksdb v1.7.16 // indirect + github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/sjson v1.2.5 // indirect github.com/zondax/ledger-go v0.14.1 // indirect + pgregory.net/rapid v0.5.5 // indirect ) require ( - cloud.google.com/go v0.105.0 // indirect - cloud.google.com/go/compute v1.12.1 // indirect - cloud.google.com/go/iam v0.7.0 // indirect - cloud.google.com/go/storage v1.27.0 // indirect + cloud.google.com/go v0.110.0 // indirect + cloud.google.com/go/compute v1.19.0 // indirect + cloud.google.com/go/iam v0.13.0 // indirect + cloud.google.com/go/storage v1.29.0 // indirect cosmossdk.io/errors v1.0.0-beta.7 - filippo.io/edwards25519 v1.0.0-rc.1 // indirect + filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect - github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/armon/go-metrics v0.4.1 - github.com/aws/aws-sdk-go v1.40.45 // indirect + github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd v0.22.1 // indirect + github.com/btcsuite/btcd v0.23.4 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/confio/ics23/go v0.9.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.1 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.5 // indirect github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect - github.com/creachadair/taskgroup v0.3.2 // indirect + github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set v1.8.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.0 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/ethereum/go-ethereum v1.10.26 - github.com/felixge/httpsnoop v1.0.1 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect - github.com/go-logfmt/logfmt v0.5.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-stack/stack v1.8.0 // indirect + github.com/go-stack/stack v1.8.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect - github.com/gogo/gateway v1.1.0 // indirect - github.com/golang/glog v1.0.0 // indirect + github.com/golang/glog v1.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.0.1 // indirect + github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect - github.com/googleapis/gax-go/v2 v2.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect + github.com/googleapis/gax-go/v2 v2.8.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -114,96 +138,85 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.6.1 // indirect + github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.1 // indirect + github.com/holiman/uint256 v1.2.2 // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/improbable-eng/grpc-web v0.15.0 - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.15.11 // indirect - github.com/lib/pq v1.10.6 // indirect + github.com/klauspost/compress v1.16.3 // indirect + github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.18 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-testing-interface v1.0.0 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect - github.com/pelletier/go-toml/v2 v2.0.5 // indirect - github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/prometheus/tsdb v0.7.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.28.0 // indirect + github.com/rs/zerolog v1.29.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/status-im/keycard-go v0.2.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/gjson v1.14.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect - github.com/ulikunitz/xz v0.5.8 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect + github.com/ulikunitz/xz v0.5.11 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/zondax/hid v0.9.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - go.opencensus.io v0.23.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.5.0 - golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect + go.etcd.io/bbolt v1.3.7 // indirect + go.opencensus.io v0.24.0 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/net v0.10.0 + golang.org/x/oauth2 v0.7.0 // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/term v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.102.0 // indirect + google.golang.org/api v0.122.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect ) -replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 - replace github.com/zondax/hid => github.com/zondax/hid v0.9.0 -// use informal system fork of tendermint -replace github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26 - // use bianjieai fork of ethermint -replace github.com/evmos/ethermint => github.com/bianjieai/ethermint v0.20.1-0.20230605095401-15e71e5689f8 +replace github.com/evmos/ethermint => github.com/bianjieai/ethermint v0.6.1-0.20230704054052-1d6b3c366199 diff --git a/go.sum b/go.sum index b02a111a4..f9dcd7439 100644 --- a/go.sum +++ b/go.sum @@ -19,44 +19,199 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= +cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +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/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= +cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= 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/iam v0.7.0 h1:k4MuwOsS7zGJJ+QfZ5vBK8SgHBAvYN/23BWsiihJ1vs= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= +cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= +cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= +cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= +cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= +cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/math v1.0.0-beta.4 h1:JtKedVLGzA0vv84xjYmZ75RKG35Kf2WwcFu8IjRkIIw= -cosmossdk.io/math v1.0.0-beta.4/go.mod h1:An0MllWJY6PxibUpnwGk8jOm+a/qIxlKmL5Zyp9NnaM= +cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= +cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= +cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= +cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I= +cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d/go.mod h1:xbjky3L3DJEylaho6gXplkrMvJ5sFgv+qNX+Nn47bzY= +cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= +cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= +filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= @@ -88,13 +243,12 @@ github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= -github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -115,10 +269,10 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI= -github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= +github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= @@ -138,21 +292,29 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bianjieai/ethermint v0.20.1-0.20230605095401-15e71e5689f8 h1:SiMobVHil1Z7qi0yKGHORsobo/VzwxQjUdrlxOW8UVU= -github.com/bianjieai/ethermint v0.20.1-0.20230605095401-15e71e5689f8/go.mod h1:6GwJlPogJh9aiWrDGNIOIQ0fX2Lo3Tc7sTvrSe+BFL4= -github.com/bianjieai/tibc-go v0.4.3 h1:SlV6nmZZHTgkdpPLFnSoKPyKZJRZMKcTPxoF7UWdCm4= -github.com/bianjieai/tibc-go v0.4.3/go.mod h1:aHGACCjSgovxA5+H/WP7xLz+tTjGxul804Xese2TQ3k= +github.com/bianjieai/ethermint v0.6.1-0.20230704054052-1d6b3c366199 h1:lcfs68cN7F7o7496OusRGvBQV+cXWSTUErxRK19y6lE= +github.com/bianjieai/ethermint v0.6.1-0.20230704054052-1d6b3c366199/go.mod h1:3s8Z5Gb/lhW0hi5je917LUqH5tvmUdEwn55A1LaPIPk= +github.com/bianjieai/tibc-go v0.4.4-0.20230703020917-f2c4f40e4f3f h1:EWr2g45dzSgGppbjrGLB/lUz3yTuZZCkVV6qF9wTiUg= +github.com/bianjieai/tibc-go v0.4.4-0.20230703020917-f2c4f40e4f3f/go.mod h1:Q1mspLk9w0O5oBWkRpeCC8kdoZ0Ev8hkknkqu2cXDW8= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= -github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= +github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/btcsuite/btcd v0.23.4 h1:IzV6qqkfwbItOS/sg/aDfPDsjPP8twrCOE2R93hxMlQ= +github.com/btcsuite/btcd v0.23.4/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= +github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= @@ -160,7 +322,6 @@ github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufo github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= @@ -169,6 +330,7 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= @@ -183,15 +345,18 @@ github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= +github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= +github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= +github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= @@ -200,13 +365,24 @@ github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3h github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= +github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= +github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= +github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= @@ -218,36 +394,43 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0= -github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE= -github.com/cosmos/cosmos-sdk v0.46.9 h1:s19zY5vX0kjV2eJOzR0Y3P6EqgtgpwMdPmXM05TQsXM= -github.com/cosmos/cosmos-sdk v0.46.9/go.mod h1:ZFL/yjcIZq67H8FiWoLCnnaChkXnbRRYEEhGrFq8fzE= +github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= +github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= +github.com/cosmos/cosmos-sdk v0.47.3 h1:r0hGmZoAzP2D+MaPaFGHwAaTdFQq3pNpHaUp1BsffbM= +github.com/cosmos/cosmos-sdk v0.47.3/go.mod h1:c4OfLdAykA9zsj1CqrxBRqXzVz48I++JSvIMPSPcEmk= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/gogoproto v1.4.3 h1:RP3yyVREh9snv/lsOvmsAPQt8f44LgL281X0IOIhhcI= -github.com/cosmos/gogoproto v1.4.3/go.mod h1:0hLIG5TR7IvV1fme1HCFKjfzW9X2x0Mo+RooWXCnOWU= -github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= -github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= -github.com/cosmos/iavl v0.19.5 h1:rGA3hOrgNxgRM5wYcSCxgQBap7fW82WZgY78V9po/iY= -github.com/cosmos/iavl v0.19.5/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v5 v5.2.0 h1:LxwttRQqdUJpQ3/Gc3XPg5lkRo3pcbzx65dxFIY6ONE= -github.com/cosmos/ibc-go/v5 v5.2.0/go.mod h1:MhDUMDVSboK5JW2pEWHNcw0wJHaHqKV/vwwP7awGhzI= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= +github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= +github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= +github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= +github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= +github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= -github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= +github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= +github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= 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/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= +github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= @@ -260,8 +443,9 @@ github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsP github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= @@ -271,8 +455,8 @@ github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdw github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= -github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= +github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= +github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -291,8 +475,9 @@ github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf h1:Yt+4K30SdjOkRoRRm3v github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -307,26 +492,29 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/ethereum/go-ethereum v1.10.26 h1:i/7d9RBBwiXCEuyduBQzJw/mKmnvzsN14jqBmytw72s= github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= 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.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= @@ -337,7 +525,7 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= @@ -349,15 +537,13 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -366,38 +552,51 @@ github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiU github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= -github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= +github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -411,7 +610,9 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -428,8 +629,10 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -437,8 +640,8 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -451,17 +654,21 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/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= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -474,19 +681,39 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-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 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= +github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +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/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= +github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= @@ -507,7 +734,6 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaD github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -527,8 +753,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= -github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= +github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= +github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -543,7 +769,6 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -558,14 +783,18 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 h1:aSVUgRRRtOrZOC1fYmY9gV0e9z/Iu+xNVSASWjsuyGU= -github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3/go.mod h1:5PC6ZNPde8bBqU/ewGZig35+UIZtw9Ytxez8/q5ZyFE= +github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= +github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/holiman/uint256 v1.2.1 h1:XRtyuda/zw2l+Bq/38n5XUoEF72aSOu/77Thd9pPp2o= -github.com/holiman/uint256 v1.2.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/uint256 v1.2.2 h1:TXKcSGc2WaxPD2+bmzAsVthL4+pEN0YwXcL5qED83vk= +github.com/holiman/uint256 v1.2.2/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= +github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= +github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.3-0.20220313090229-ca81a64b4204/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= @@ -576,8 +805,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= @@ -590,17 +819,14 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/informalsystems/tendermint v0.34.26 h1:89XvVexAy62geGWxmDmdmmJvfindx+Su2oTuwfSWMeU= -github.com/informalsystems/tendermint v0.34.26/go.mod h1:q3uAZ/t5+MblQhFuHSd4flqaLDx7iUtWpwWbwvHAFhs= -github.com/irisnet/irismod v1.7.3 h1:+U1sH5CS6i3d08xXD6ZnSnKspuF6LqIH10AFg9rOakc= -github.com/irisnet/irismod v1.7.3/go.mod h1:B9WxUyCBkMRSaQ+LxXGKhyAPCXDaoXBv8/4T5SH1xR8= +github.com/irisnet/irismod v1.7.4-0.20230704022721-11481f2b93ed h1:gR6n+jqK0T8IOZn7e7wOI+X/8mYfdqRLYCsa4Rsnc6U= +github.com/irisnet/irismod v1.7.4-0.20230704022721-11481f2b93ed/go.mod h1:QL525InqKzSgxPmmRhjKmiGJqTUMm8BRZt11PQ3mQ9M= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -616,9 +842,7 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= @@ -628,16 +852,18 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= +github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -647,7 +873,7 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 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= @@ -656,20 +882,22 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= +github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= @@ -689,8 +917,9 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -699,10 +928,9 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miguelmota/go-ethereum-hdwallet v0.1.1 h1:zdXGlHao7idpCBjEGTXThVAtMKs+IxAgivZ75xqkWK0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= @@ -712,8 +940,9 @@ github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceT github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -730,7 +959,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= @@ -750,8 +978,9 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -764,13 +993,18 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 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.1 h1:foqVmeWDD6yYpK+Yz3fHyNIxFYNxswxqNFjSKe+vI54= -github.com/onsi/ginkgo/v2 v2.5.1 h1:auzK7OI497k6x4OvWq+TKAcpcSAlod0doAH72oIN0Jw= +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 v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= 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.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= @@ -792,17 +1026,15 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -821,8 +1053,6 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -841,20 +1071,16 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= @@ -862,23 +1088,20 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg= -github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= 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.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= -github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= +github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -911,15 +1134,15 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/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= @@ -928,11 +1151,11 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= -github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= +github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= +github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 h1:Oo2KZNP70KE0+IUJSidPj/BFS/RXNHmKIJOdckzml2E= -github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -949,29 +1172,34 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -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/tidwall/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= -github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= +github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= +github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.12.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.14.0 h1:6aeJ0bzojgWLa82gDQHcx3S0Lr/O51I9bJ5nv6JFx5w= github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= +github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.4/go.mod h1:098SZ494YoMWPmMO6ct4dcFnqxwj9r/gF0Etp19pSNM= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= @@ -979,7 +1207,6 @@ github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZF github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= @@ -988,10 +1215,11 @@ github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3C github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= +github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= @@ -1003,8 +1231,9 @@ github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+ github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= @@ -1019,13 +1248,14 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1035,8 +1265,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1067,9 +1299,11 @@ golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/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.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= 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= @@ -1084,8 +1318,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1100,6 +1334,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1111,7 +1346,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1159,16 +1395,28 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/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-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +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-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1178,10 +1426,24 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1193,6 +1455,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ 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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1250,42 +1515,69 @@ golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-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-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/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-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/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-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1295,18 +1587,22 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= +golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1354,20 +1650,28 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +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.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/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= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= @@ -1396,8 +1700,37 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.102.0 h1:JxJl2qQ85fRMPNvlZY/enexbxpCjLwGhZUtgfGeQ51I= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +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.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= +google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1431,7 +1764,6 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1450,12 +1782,78 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 h1:a2S6M0+660BgMNl++4JPlcAO/CjkqYItDEZwkoDQK7c= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +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-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-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= +google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1477,8 +1875,27 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1491,8 +1908,11 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk= -google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1529,7 +1949,9 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1541,7 +1963,8 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= -pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M= +pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= +pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/keystore/keys.go b/keystore/keys.go index 2ddff5c5f..9b896785e 100644 --- a/keystore/keys.go +++ b/keystore/keys.go @@ -4,8 +4,8 @@ import ( "encoding/json" "fmt" - tmcrypto "github.com/tendermint/tendermint/crypto" - "github.com/tendermint/tendermint/crypto/secp256k1" + tmcrypto "github.com/cometbft/cometbft/crypto" + "github.com/cometbft/cometbft/crypto/secp256k1" "github.com/cosmos/cosmos-sdk/crypto" sdksecp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" diff --git a/lite/swagger-ui/swagger.yaml b/lite/swagger-ui/swagger.yaml index 615a66f40..0cfb91781 100644 --- a/lite/swagger-ui/swagger.yaml +++ b/lite/swagger-ui/swagger.yaml @@ -8532,7 +8532,7 @@ paths: Tendermint sha256 hash of the transaction bytes. See - https://github.com/tendermint/tendermint/issues/6539 for + https://github.com/cometbft/cometbft/issues/6539 for reference logs: type: array @@ -57586,7 +57586,7 @@ definitions: Tendermint sha256 hash of the transaction bytes. See - https://github.com/tendermint/tendermint/issues/6539 for reference + https://github.com/cometbft/cometbft/issues/6539 for reference logs: type: array items: diff --git a/modules/evm/eip1559.go b/modules/evm/eip1559.go index cb559d5d8..b450f5f98 100644 --- a/modules/evm/eip1559.go +++ b/modules/evm/eip1559.go @@ -10,7 +10,7 @@ import ( ) func (k *Keeper) burnBaseFee(ctx sdk.Context, gasUsed uint64, baseFee *big.Int) error { - evmDenom := k.evmkeeper.GetEVMDenom(ctx) + evmDenom := k.evmkeeper.GetParams(ctx).EvmDenom burntAmt := new(big.Int).Mul(baseFee, new(big.Int).SetUint64(gasUsed)) burnCoin := sdk.NewCoin(evmDenom, sdkmath.NewIntFromBigInt(burntAmt)) if err := k.bankKeeper.BurnCoins(ctx, authtypes.FeeCollectorName, sdk.NewCoins(burnCoin)); err != nil { diff --git a/modules/evm/keeper.go b/modules/evm/keeper.go index 39d1429be..6d5028e76 100644 --- a/modules/evm/keeper.go +++ b/modules/evm/keeper.go @@ -6,8 +6,8 @@ import ( "fmt" "strconv" - tmbytes "github.com/tendermint/tendermint/libs/bytes" - tmtypes "github.com/tendermint/tendermint/types" + tmbytes "github.com/cometbft/cometbft/libs/bytes" + tmtypes "github.com/cometbft/cometbft/types" errorsmod "cosmossdk.io/errors" "github.com/armon/go-metrics" @@ -30,7 +30,10 @@ var _ types.MsgServer = &Keeper{} // executed (i.e applied) against the go-ethereum EVM. The provided SDK Context is set to the Keeper // so that it can implements and call the StateDB methods without receiving it as a function // parameter. -func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*types.MsgEthereumTxResponse, error) { +func (k *Keeper) EthereumTx( + goCtx context.Context, + msg *types.MsgEthereumTx, +) (*types.MsgEthereumTxResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) sender := msg.From @@ -100,7 +103,10 @@ func (k *Keeper) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*t } if response.Failed() { - attrs = append(attrs, sdk.NewAttribute(types.AttributeKeyEthereumTxFailed, response.VmError)) + attrs = append( + attrs, + sdk.NewAttribute(types.AttributeKeyEthereumTxFailed, response.VmError), + ) } txLogAttrs := make([]sdk.Attribute, len(response.Logs)) @@ -141,3 +147,10 @@ func (k *Keeper) SetHooks(eh types.EvmHooks) *Keeper { hasHook: true, } } + +func (k *Keeper) UpdateParams( + goCtx context.Context, + msg *types.MsgUpdateParams, +) (*types.MsgUpdateParamsResponse, error) { + return k.evmkeeper.UpdateParams(goCtx, msg) +} diff --git a/modules/evm/moudle.go b/modules/evm/moudle.go index aa539e94e..3f6cca58f 100644 --- a/modules/evm/moudle.go +++ b/modules/evm/moudle.go @@ -21,9 +21,14 @@ type AppModule struct { } // NewAppModule creates a new AppModule object -func NewAppModule(k *keeper.Keeper, ak types.AccountKeeper, bankKeeper types.BankKeeper) AppModule { +func NewAppModule( + k *keeper.Keeper, + ak types.AccountKeeper, + bankKeeper types.BankKeeper, + ss types.Subspace, +) AppModule { return AppModule{ - AppModule: ethermint.NewAppModule(k, ak), + AppModule: ethermint.NewAppModule(k, ak, ss), k: &Keeper{k, bankKeeper, false}, } } diff --git a/modules/guardian/client/cli/cli_test.go b/modules/guardian/client/cli/cli_test.go index e9d61d08c..cb1e090c5 100644 --- a/modules/guardian/client/cli/cli_test.go +++ b/modules/guardian/client/cli/cli_test.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil/network" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" - banktestutil "github.com/cosmos/cosmos-sdk/x/bank/client/testutil" + bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/cli" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" @@ -74,15 +74,24 @@ func (s *IntegrationTestSuite) TestGuardian() { clientCtx.Keyring.ImportPrivKey(addr.String(), privKeyStr, "") pubKeyStr := cosmoscrypto.ArmorPubKeyBytes(pubKey.Bytes(), "") clientCtx.Keyring.ImportPubKey(addr.String(), pubKeyStr) + expectedCode := uint32(0) amount := sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(100000000)) args := []string{ + from.String(), + addr.String(), + amount.String(), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf( + "--%s=%s", + flags.FlagFees, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String(), + ), } - _, err := banktestutil.MsgSendExec(clientCtx, from, addr, amount, args...) - s.Require().NoError(err) + + result := simapp.ExecTxCmdWithResult(s.T(), s.network, clientCtx, bankcli.NewSendTxCmd(), args) + s.Require().Equal(uint32(0), result.TxResult.Code, result.TxResult.Log) //------test GetCmdQuerySupers()------------- respType := proto.Message(&guardiantypes.QuerySupersResponse{}) @@ -98,18 +107,20 @@ func (s *IntegrationTestSuite) TestGuardian() { fmt.Sprintf("--%s=%s", guardiancli.FlagDescription, description), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf( + "--%s=%s", + flags.FlagFees, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String(), + ), } - respType = proto.Message(&sdk.TxResponse{}) - expectedCode := uint32(0) - - bz, err = guardiantestutil.CreateSuperExec(val.ClientCtx, addr.String(), args...) - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(bz.Bytes(), respType), bz.String()) - txResp := respType.(*sdk.TxResponse) - s.Require().Equal(expectedCode, txResp.Code) + result = guardiantestutil.CreateSuperExec( + s.T(), + s.network, + val.ClientCtx, addr.String(), args..., + ) + s.Require().Equal(expectedCode, result.TxResult.Code, result.TxResult.Log) respType = proto.Message(&guardiantypes.QuerySupersResponse{}) bz, err = guardiantestutil.QuerySupersExec(clientCtx) @@ -123,17 +134,19 @@ func (s *IntegrationTestSuite) TestGuardian() { fmt.Sprintf("--%s=%s", guardiancli.FlagAddress, from.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), + fmt.Sprintf( + "--%s=%s", + flags.FlagFees, + sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String(), + ), } - respType = proto.Message(&sdk.TxResponse{}) - - bz, err = guardiantestutil.DeleteSuperExec(val.ClientCtx, addr.String(), args...) - s.Require().NoError(err) - s.Require().NoError(clientCtx.Codec.UnmarshalJSON(bz.Bytes(), respType), bz.String()) - txResp = respType.(*sdk.TxResponse) - s.Require().Equal(expectedCode, txResp.Code) + result = guardiantestutil.DeleteSuperExec( + s.T(), + s.network, + val.ClientCtx, addr.String(), args...) + s.Require().Equal(expectedCode, result.TxResult.Code, result.TxResult.Log) respType = proto.Message(&guardiantypes.QuerySupersResponse{}) bz, err = guardiantestutil.QuerySupersExec(clientCtx) diff --git a/modules/guardian/client/testutil/test_helpers.go b/modules/guardian/client/testutil/test_helpers.go index 6a41b3f71..85b725e45 100644 --- a/modules/guardian/client/testutil/test_helpers.go +++ b/modules/guardian/client/testutil/test_helpers.go @@ -2,34 +2,50 @@ package testutil import ( "fmt" + "testing" - "github.com/tendermint/tendermint/libs/cli" + "github.com/cometbft/cometbft/libs/cli" + coretypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/cosmos/cosmos-sdk/testutil/network" guardiancli "github.com/irisnet/irishub/modules/guardian/client/cli" + "github.com/irisnet/irishub/simapp" ) // MsgRedelegateExec creates a redelegate message. -func CreateSuperExec(clientCtx client.Context, from string, extraArgs ...string) (testutil.BufferWriter, error) { +func CreateSuperExec( + t *testing.T, + network *network.Network, + clientCtx client.Context, + from string, + extraArgs ...string, +) *coretypes.ResultTx { args := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, from), } args = append(args, extraArgs...) - return clitestutil.ExecTestCLICmd(clientCtx, guardiancli.GetCmdCreateSuper(), args) + return simapp.ExecTxCmdWithResult(t, network, clientCtx, guardiancli.GetCmdCreateSuper(), args) } -func DeleteSuperExec(clientCtx client.Context, from string, extraArgs ...string) (testutil.BufferWriter, error) { +func DeleteSuperExec( + t *testing.T, + network *network.Network, + clientCtx client.Context, + from string, + extraArgs ...string, +) *coretypes.ResultTx { args := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, from), } args = append(args, extraArgs...) - return clitestutil.ExecTestCLICmd(clientCtx, guardiancli.GetCmdDeleteSuper(), args) + return simapp.ExecTxCmdWithResult(t, network, clientCtx, guardiancli.GetCmdDeleteSuper(), args) } func QuerySupersExec(clientCtx client.Context, extraArgs ...string) (testutil.BufferWriter, error) { diff --git a/modules/guardian/genesis_test.go b/modules/guardian/genesis_test.go index 89b3f662b..a8d65c3f4 100644 --- a/modules/guardian/genesis_test.go +++ b/modules/guardian/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/modules/guardian/keeper/keeper.go b/modules/guardian/keeper/keeper.go index 698e2df2a..74abbd8fe 100644 --- a/modules/guardian/keeper/keeper.go +++ b/modules/guardian/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" diff --git a/modules/guardian/keeper/keeper_test.go b/modules/guardian/keeper/keeper_test.go index 143e45967..15652f435 100644 --- a/modules/guardian/keeper/keeper_test.go +++ b/modules/guardian/keeper/keeper_test.go @@ -6,11 +6,10 @@ import ( "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" - abci "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -90,21 +89,6 @@ func (suite *KeeperTestSuite) TestDeleteSuper() { suite.False(found) } -func (suite *KeeperTestSuite) TestQuerySupers() { - super := types.NewSuper("test", types.Genesis, addrs[0], addrs[1]) - suite.keeper.AddSuper(suite.ctx, super) - - var supers []types.Super - querier := keeper.NewQuerier(suite.keeper, suite.cdc) - res, sdkErr := querier(suite.ctx, []string{types.QuerySupers}, abci.RequestQuery{}) - suite.NoError(sdkErr) - - err := suite.cdc.UnmarshalJSON(res, &supers) - suite.NoError(err) - suite.Len(supers, 1) - suite.Contains(supers, super) -} - func newPubKey(pk string) (res cryptotypes.PubKey) { pkBytes, err := hex.DecodeString(pk) if err != nil { diff --git a/modules/guardian/keeper/querier.go b/modules/guardian/keeper/querier.go deleted file mode 100644 index 389c6d895..000000000 --- a/modules/guardian/keeper/querier.go +++ /dev/null @@ -1,40 +0,0 @@ -package keeper - -import ( - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/irisnet/irishub/modules/guardian/types" -) - -// NewQuerier creates a querier for guardian REST endpoints -func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return func(ctx sdk.Context, path []string, _ abci.RequestQuery) ([]byte, error) { - switch path[0] { - case types.QuerySupers: - return querySupers(ctx, k, legacyQuerierCdc) - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) - } - } -} - -func querySupers(ctx sdk.Context, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - var supers []types.Super - k.IterateSupers( - ctx, - func(super types.Super) bool { - supers = append(supers, super) - return false - }, - ) - - bz, err := codec.MarshalJSONIndent(legacyQuerierCdc, supers) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - return bz, nil -} diff --git a/modules/guardian/keeper/querier_test.go b/modules/guardian/keeper/querier_test.go deleted file mode 100644 index 3de13b522..000000000 --- a/modules/guardian/keeper/querier_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/stretchr/testify/suite" - - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/irisnet/irishub/modules/guardian/keeper" - "github.com/irisnet/irishub/modules/guardian/types" -) - -func TestQuerierSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) -} - -func (suite *KeeperTestSuite) TestNewQuerier() { - req := abci.RequestQuery{ - Path: "", - Data: []byte{}, - } - querier := keeper.NewQuerier(suite.keeper, suite.cdc) - res, err := querier(suite.ctx, []string{"other"}, req) - suite.Error(err) - suite.Nil(res) - - // test querySupers - res, err = querier(suite.ctx, []string{types.QuerySupers}, abci.RequestQuery{}) - suite.NoError(err) - var supers []types.Super - e := suite.cdc.UnmarshalJSON(res, &supers) - suite.NoError(e) - - for i, val := range supers { - equal := val.Equal(types.DefaultGenesisState().Supers[i]) - suite.True(equal) - } -} diff --git a/modules/guardian/module.go b/modules/guardian/module.go index 56f76fd32..fd7dac586 100644 --- a/modules/guardian/module.go +++ b/modules/guardian/module.go @@ -4,13 +4,12 @@ import ( "context" "encoding/json" "fmt" - "math/rand" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -50,7 +49,11 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the guardian module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis( + cdc codec.JSONCodec, + config client.TxEncodingConfig, + bz json.RawMessage, +) error { var data types.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -113,22 +116,16 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { } -// Route returns the message routing key for the guardian module. -func (am AppModule) Route() sdk.Route { - return sdk.NewRoute(types.RouterKey, NewHandler(am.keeper)) -} - // QuerierRoute returns the guardian module's querier route name. func (AppModule) QuerierRoute() string { return types.RouterKey } -// LegacyQuerierHandler returns the guardian module sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return keeper.NewQuerier(am.keeper, legacyQuerierCdc) -} - // InitGenesis performs genesis initialization for the guardian module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis( + ctx sdk.Context, + cdc codec.JSONCodec, + data json.RawMessage, +) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) @@ -169,21 +166,13 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } -// ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { - return nil -} - -// RandomizedParams creates randomized guardian param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { - return nil -} - // RegisterStoreDecoder registers a decoder for guardian module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { } // WeightedOperations returns the all the guardian module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +func (am AppModule) WeightedOperations( + simState module.SimulationState, +) []simtypes.WeightedOperation { return []simtypes.WeightedOperation{} } diff --git a/modules/guardian/types/genesis.pb.go b/modules/guardian/types/genesis.pb.go index 23188cf45..ab36ca059 100644 --- a/modules/guardian/types/genesis.pb.go +++ b/modules/guardian/types/genesis.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: guardian/genesis.proto +// source: irishub/guardian/genesis.proto package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -32,7 +32,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_5203106ad1456439, []int{0} + return fileDescriptor_430b7f41c0a2b3b1, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -72,23 +72,23 @@ func init() { proto.RegisterType((*GenesisState)(nil), "irishub.guardian.GenesisState") } -func init() { proto.RegisterFile("guardian/genesis.proto", fileDescriptor_5203106ad1456439) } +func init() { proto.RegisterFile("irishub/guardian/genesis.proto", fileDescriptor_430b7f41c0a2b3b1) } -var fileDescriptor_5203106ad1456439 = []byte{ - // 195 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0x2f, 0x4d, 0x2c, - 0x4a, 0xc9, 0x4c, 0xcc, 0xd3, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0x12, 0xc8, 0x2c, 0xca, 0x2c, 0xce, 0x28, 0x4d, 0xd2, 0x83, 0xc9, 0x4b, 0x89, - 0x23, 0x54, 0x42, 0x19, 0x10, 0xa5, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, - 0x05, 0x11, 0x55, 0x72, 0xe5, 0xe2, 0x71, 0x87, 0x98, 0x18, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0x64, - 0xca, 0xc5, 0x56, 0x5c, 0x5a, 0x90, 0x5a, 0x54, 0x2c, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0x24, - 0xae, 0x87, 0x6e, 0x83, 0x5e, 0x30, 0x48, 0xde, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xa8, - 0x62, 0x27, 0xef, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, - 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, - 0x2c, 0x01, 0x69, 0x4f, 0xce, 0xcf, 0xd5, 0x07, 0x19, 0x95, 0x97, 0x5a, 0xa2, 0x0f, 0x35, 0x52, - 0x3f, 0x37, 0x3f, 0xa5, 0x34, 0x27, 0xb5, 0x18, 0xee, 0x52, 0xfd, 0x92, 0xca, 0x82, 0xd4, 0xe2, - 0x24, 0x36, 0xb0, 0xd3, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x50, 0x6e, 0x87, 0x2a, 0xf5, - 0x00, 0x00, 0x00, +var fileDescriptor_430b7f41c0a2b3b1 = []byte{ + // 196 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x2c, 0xca, 0x2c, + 0xce, 0x28, 0x4d, 0xd2, 0x4f, 0x2f, 0x4d, 0x2c, 0x4a, 0xc9, 0x4c, 0xcc, 0xd3, 0x4f, 0x4f, 0xcd, + 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xca, 0xeb, 0xc1, + 0xe4, 0xa5, 0xe4, 0x31, 0x75, 0x40, 0x19, 0x10, 0x2d, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, + 0xa6, 0x3e, 0x88, 0x05, 0x11, 0x55, 0x72, 0xe5, 0xe2, 0x71, 0x87, 0x98, 0x1c, 0x5c, 0x92, 0x58, + 0x92, 0x2a, 0x64, 0xca, 0xc5, 0x56, 0x5c, 0x5a, 0x90, 0x5a, 0x54, 0x2c, 0xc1, 0xa8, 0xc0, 0xac, + 0xc1, 0x6d, 0x24, 0xae, 0x87, 0x6e, 0x93, 0x5e, 0x30, 0x48, 0xde, 0x89, 0xe5, 0xc4, 0x3d, 0x79, + 0x86, 0x20, 0xa8, 0x62, 0x27, 0xef, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, + 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, + 0x32, 0x4c, 0xcf, 0x2c, 0x01, 0x69, 0x4f, 0xce, 0xcf, 0xd5, 0x07, 0x19, 0x95, 0x97, 0x5a, 0xa2, + 0x0f, 0x73, 0x6a, 0x6e, 0x7e, 0x4a, 0x69, 0x4e, 0x6a, 0x31, 0xc2, 0xc9, 0x25, 0x95, 0x05, 0xa9, + 0xc5, 0x49, 0x6c, 0x60, 0xa7, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xda, 0x0f, 0x65, 0xe4, + 0x05, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/guardian/types/guardian.pb.go b/modules/guardian/types/guardian.pb.go index 9efc2fb31..7a624fb64 100644 --- a/modules/guardian/types/guardian.pb.go +++ b/modules/guardian/types/guardian.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: guardian/guardian.proto +// source: irishub/guardian/guardian.proto package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -48,7 +48,7 @@ func (x AccountType) String() string { } func (AccountType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_07c8fad859e95e75, []int{0} + return fileDescriptor_cbcdd28e3c2705db, []int{0} } // Super defines the super standard @@ -63,7 +63,7 @@ func (m *Super) Reset() { *m = Super{} } func (m *Super) String() string { return proto.CompactTextString(m) } func (*Super) ProtoMessage() {} func (*Super) Descriptor() ([]byte, []int) { - return fileDescriptor_07c8fad859e95e75, []int{0} + return fileDescriptor_cbcdd28e3c2705db, []int{0} } func (m *Super) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -125,31 +125,31 @@ func init() { proto.RegisterType((*Super)(nil), "irishub.guardian.Super") } -func init() { proto.RegisterFile("guardian/guardian.proto", fileDescriptor_07c8fad859e95e75) } +func init() { proto.RegisterFile("irishub/guardian/guardian.proto", fileDescriptor_cbcdd28e3c2705db) } -var fileDescriptor_07c8fad859e95e75 = []byte{ +var fileDescriptor_cbcdd28e3c2705db = []byte{ // 325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0x2f, 0x4d, 0x2c, - 0x4a, 0xc9, 0x4c, 0xcc, 0xd3, 0x87, 0x31, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x32, - 0x8b, 0x32, 0x8b, 0x33, 0x4a, 0x93, 0xf4, 0x60, 0xe2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, - 0x49, 0x7d, 0x10, 0x0b, 0xa2, 0x4e, 0x69, 0x27, 0x23, 0x17, 0x6b, 0x70, 0x69, 0x41, 0x6a, 0x91, - 0x90, 0x02, 0x17, 0x77, 0x4a, 0x6a, 0x71, 0x72, 0x51, 0x66, 0x41, 0x49, 0x66, 0x7e, 0x9e, 0x04, - 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0xb2, 0x90, 0x50, 0x24, 0x17, 0x4f, 0x62, 0x72, 0x72, 0x7e, - 0x69, 0x5e, 0x49, 0x7c, 0x49, 0x65, 0x41, 0xaa, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0xac, - 0x1e, 0xba, 0x55, 0x7a, 0x8e, 0x10, 0x55, 0x21, 0x95, 0x05, 0xa9, 0x4e, 0xe2, 0x9f, 0xee, 0xc9, - 0x0b, 0x57, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x21, 0x6b, 0x56, 0x0a, 0xe2, 0x4e, 0x44, 0xa8, 0x12, - 0x92, 0xe0, 0x62, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x96, 0x60, 0x06, 0x5b, 0x0c, 0xe3, - 0x0a, 0x49, 0x72, 0x71, 0x24, 0xa6, 0xa4, 0xa4, 0xa6, 0xc4, 0x27, 0x55, 0x4a, 0xb0, 0xc0, 0xa5, - 0x52, 0x53, 0x9c, 0x2a, 0xb5, 0x3c, 0xb9, 0xb8, 0x1d, 0x51, 0xcd, 0x70, 0x77, 0xf5, 0x73, 0x0d, - 0xf6, 0x0c, 0x16, 0x60, 0x90, 0xe2, 0xee, 0x9a, 0xab, 0xc0, 0xee, 0x9e, 0x9a, 0x97, 0x5a, 0x9c, - 0x59, 0x2c, 0x24, 0xc5, 0xc5, 0xe1, 0x1f, 0xe4, 0xe2, 0xe9, 0xe7, 0x18, 0x14, 0x29, 0xc0, 0x28, - 0xc5, 0xd3, 0x35, 0x57, 0x81, 0xc3, 0xbf, 0x28, 0x25, 0x33, 0x2f, 0xb1, 0xa8, 0x52, 0x8a, 0xa5, - 0x63, 0xb1, 0x1c, 0x83, 0x93, 0xf7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, - 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, - 0x19, 0xa6, 0x67, 0x96, 0x80, 0x3c, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf2, 0x68, 0x5e, 0x6a, 0x89, - 0x3e, 0xd4, 0xc3, 0xfa, 0xb9, 0xf9, 0x29, 0xa5, 0x39, 0xa9, 0xc5, 0xf0, 0xb0, 0xd7, 0x07, 0xf9, - 0xac, 0x38, 0x89, 0x0d, 0x1c, 0xb4, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x96, 0xfb, - 0xdc, 0x9d, 0x01, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcf, 0x2c, 0xca, 0x2c, + 0xce, 0x28, 0x4d, 0xd2, 0x4f, 0x2f, 0x4d, 0x2c, 0x4a, 0xc9, 0x4c, 0xcc, 0x83, 0x33, 0xf4, 0x0a, + 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0xa0, 0x0a, 0xf4, 0x60, 0xe2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, + 0xf9, 0x60, 0x49, 0x7d, 0x10, 0x0b, 0xa2, 0x4e, 0x69, 0x27, 0x23, 0x17, 0x6b, 0x70, 0x69, 0x41, + 0x6a, 0x91, 0x90, 0x02, 0x17, 0x77, 0x4a, 0x6a, 0x71, 0x72, 0x51, 0x66, 0x41, 0x49, 0x66, 0x7e, + 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0xb2, 0x90, 0x50, 0x24, 0x17, 0x4f, 0x62, 0x72, + 0x72, 0x7e, 0x69, 0x5e, 0x49, 0x7c, 0x49, 0x65, 0x41, 0xaa, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x9f, + 0x91, 0xac, 0x1e, 0xba, 0x55, 0x7a, 0x8e, 0x10, 0x55, 0x21, 0x95, 0x05, 0xa9, 0x4e, 0xe2, 0x9f, + 0xee, 0xc9, 0x0b, 0x57, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x21, 0x6b, 0x56, 0x0a, 0xe2, 0x4e, 0x44, + 0xa8, 0x12, 0x92, 0xe0, 0x62, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x96, 0x60, 0x06, 0x5b, + 0x0c, 0xe3, 0x0a, 0x49, 0x72, 0x71, 0x24, 0xa6, 0xa4, 0xa4, 0xa6, 0xc4, 0x27, 0x55, 0x4a, 0xb0, + 0xc0, 0xa5, 0x52, 0x53, 0x9c, 0x2a, 0xb5, 0x3c, 0xb9, 0xb8, 0x1d, 0x51, 0xcd, 0x70, 0x77, 0xf5, + 0x73, 0x0d, 0xf6, 0x0c, 0x16, 0x60, 0x90, 0xe2, 0xee, 0x9a, 0xab, 0xc0, 0xee, 0x9e, 0x9a, 0x97, + 0x5a, 0x9c, 0x59, 0x2c, 0x24, 0xc5, 0xc5, 0xe1, 0x1f, 0xe4, 0xe2, 0xe9, 0xe7, 0x18, 0x14, 0x29, + 0xc0, 0x28, 0xc5, 0xd3, 0x35, 0x57, 0x81, 0xc3, 0xbf, 0x28, 0x25, 0x33, 0x2f, 0xb1, 0xa8, 0x52, + 0x8a, 0xa5, 0x63, 0xb1, 0x1c, 0x83, 0x93, 0xf7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, + 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, + 0x31, 0x44, 0x19, 0xa6, 0x67, 0x96, 0x80, 0x3c, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf2, 0x68, 0x5e, + 0x6a, 0x89, 0x3e, 0x2c, 0xf0, 0x73, 0xf3, 0x53, 0x4a, 0x73, 0x52, 0x8b, 0x11, 0x91, 0x00, 0xf2, + 0x59, 0x71, 0x12, 0x1b, 0x38, 0x68, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x17, 0xb4, + 0x41, 0xa5, 0x01, 0x00, 0x00, } func (m *Super) Marshal() (dAtA []byte, err error) { diff --git a/modules/guardian/types/msgs_test.go b/modules/guardian/types/msgs_test.go index b534e4045..18e5c434f 100644 --- a/modules/guardian/types/msgs_test.go +++ b/modules/guardian/types/msgs_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto" + "github.com/cometbft/cometbft/crypto" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/modules/guardian/types/query.pb.go b/modules/guardian/types/query.pb.go index 437acff21..9779a3955 100644 --- a/modules/guardian/types/query.pb.go +++ b/modules/guardian/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: guardian/query.proto +// source: irishub/guardian/query.proto package types @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -40,7 +40,7 @@ func (m *QuerySupersRequest) Reset() { *m = QuerySupersRequest{} } func (m *QuerySupersRequest) String() string { return proto.CompactTextString(m) } func (*QuerySupersRequest) ProtoMessage() {} func (*QuerySupersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_20cf24f8e5be2110, []int{0} + return fileDescriptor_49841d96de191552, []int{0} } func (m *QuerySupersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -86,7 +86,7 @@ func (m *QuerySupersResponse) Reset() { *m = QuerySupersResponse{} } func (m *QuerySupersResponse) String() string { return proto.CompactTextString(m) } func (*QuerySupersResponse) ProtoMessage() {} func (*QuerySupersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_20cf24f8e5be2110, []int{1} + return fileDescriptor_49841d96de191552, []int{1} } func (m *QuerySupersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,33 +134,32 @@ func init() { proto.RegisterType((*QuerySupersResponse)(nil), "irishub.guardian.QuerySupersResponse") } -func init() { proto.RegisterFile("guardian/query.proto", fileDescriptor_20cf24f8e5be2110) } - -var fileDescriptor_20cf24f8e5be2110 = []byte{ - // 353 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xcb, 0x4e, 0x32, 0x31, - 0x14, 0xc7, 0xa7, 0x7c, 0x9f, 0x2c, 0xca, 0xc6, 0x54, 0x12, 0xc8, 0xc4, 0x8c, 0x84, 0x78, 0x21, - 0x2e, 0xda, 0x80, 0xf1, 0x05, 0x58, 0xe8, 0xc2, 0x8d, 0xe2, 0xce, 0xb8, 0xe9, 0x40, 0x53, 0x27, - 0x81, 0x9e, 0x61, 0xda, 0xd1, 0xb0, 0x33, 0x3e, 0x81, 0x89, 0xf1, 0x9d, 0x58, 0x92, 0xb8, 0x71, - 0x65, 0x0c, 0xf8, 0x20, 0x66, 0xda, 0xe1, 0x26, 0x0b, 0x76, 0x4d, 0xcf, 0xef, 0x7f, 0x69, 0x0f, - 0x2e, 0xcb, 0x94, 0x27, 0xbd, 0x88, 0x2b, 0x36, 0x4c, 0x45, 0x32, 0xa2, 0x71, 0x02, 0x06, 0xc8, - 0x6e, 0x94, 0x44, 0xfa, 0x21, 0x0d, 0xe9, 0x7c, 0xea, 0x97, 0x25, 0x48, 0xb0, 0x43, 0x96, 0x9d, - 0x1c, 0xe7, 0x57, 0x16, 0xea, 0xf9, 0x21, 0x1f, 0xec, 0x4b, 0x00, 0xd9, 0x17, 0x8c, 0xc7, 0x11, - 0xe3, 0x4a, 0x81, 0xe1, 0x26, 0x02, 0xa5, 0xf3, 0xe9, 0x69, 0x17, 0xf4, 0x00, 0x34, 0x0b, 0xb9, - 0x16, 0x2e, 0x97, 0x3d, 0x36, 0x43, 0x61, 0x78, 0x93, 0xc5, 0x5c, 0x46, 0xca, 0xc2, 0x8e, 0xad, - 0xdf, 0x63, 0x72, 0x93, 0x11, 0xb7, 0x69, 0x2c, 0x12, 0xdd, 0x11, 0xc3, 0x54, 0x68, 0x43, 0x2e, - 0x30, 0x5e, 0x92, 0x55, 0x54, 0x43, 0x8d, 0x52, 0xeb, 0x98, 0x3a, 0x5b, 0x9a, 0xd9, 0x52, 0xf7, - 0x9c, 0xdc, 0x96, 0x5e, 0x73, 0x29, 0x72, 0x6d, 0x67, 0x45, 0x59, 0x7f, 0x47, 0x78, 0x6f, 0xcd, - 0x5e, 0xc7, 0xa0, 0xb4, 0x20, 0xe7, 0xb8, 0xa8, 0xed, 0x4d, 0x15, 0xd5, 0xfe, 0x35, 0x4a, 0xad, - 0x0a, 0xfd, 0xfb, 0x23, 0xd4, 0x2a, 0xda, 0xff, 0xc7, 0x5f, 0x07, 0x5e, 0x27, 0x87, 0xc9, 0xe5, - 0x5a, 0xad, 0x82, 0xad, 0x75, 0xb2, 0xb5, 0x96, 0xcb, 0x5c, 0xed, 0xd5, 0x7a, 0x46, 0x78, 0xc7, - 0xf6, 0x22, 0x4f, 0xb8, 0xe8, 0xba, 0x91, 0xc3, 0xcd, 0x0e, 0x9b, 0x3f, 0xe3, 0x1f, 0x6d, 0xa1, - 0x5c, 0x58, 0xbd, 0xf6, 0xf2, 0xf1, 0xf3, 0x56, 0xf0, 0x49, 0x95, 0xe5, 0xf8, 0x62, 0x83, 0xcc, - 0xbd, 0xa5, 0x7d, 0x35, 0x9e, 0x06, 0x68, 0x32, 0x0d, 0xd0, 0xf7, 0x34, 0x40, 0xaf, 0xb3, 0xc0, - 0x9b, 0xcc, 0x02, 0xef, 0x73, 0x16, 0x78, 0x77, 0x4d, 0x19, 0x99, 0x2c, 0xa0, 0x0b, 0x03, 0xab, - 0x56, 0xc2, 0x2c, 0x5c, 0x06, 0xd0, 0x4b, 0xfb, 0x42, 0x2f, 0xdd, 0xcc, 0x28, 0x16, 0x3a, 0x2c, - 0xda, 0x65, 0x9e, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x85, 0xe3, 0x24, 0xf2, 0x6f, 0x02, 0x00, - 0x00, +func init() { proto.RegisterFile("irishub/guardian/query.proto", fileDescriptor_49841d96de191552) } + +var fileDescriptor_49841d96de191552 = []byte{ + // 352 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xbf, 0x4e, 0x02, 0x31, + 0x1c, 0xc7, 0xaf, 0xa8, 0x0c, 0x65, 0x31, 0xd5, 0x44, 0x72, 0x21, 0x07, 0x21, 0xfe, 0x21, 0x0e, + 0x6d, 0xc0, 0xf8, 0x02, 0x0c, 0x3a, 0xb8, 0x28, 0x6e, 0xc6, 0xa5, 0x07, 0x4d, 0x6d, 0x02, 0xed, + 0x71, 0xed, 0x69, 0xd8, 0x8c, 0x4f, 0x60, 0x62, 0x7c, 0x27, 0x46, 0x12, 0x17, 0x27, 0x63, 0x38, + 0x1f, 0xc4, 0x5c, 0x7b, 0x08, 0x78, 0x03, 0x5b, 0xd3, 0xdf, 0xe7, 0xfb, 0xa7, 0xfd, 0xc1, 0x9a, + 0x88, 0x85, 0x7e, 0x48, 0x42, 0xc2, 0x13, 0x1a, 0x0f, 0x04, 0x95, 0x64, 0x9c, 0xb0, 0x78, 0x82, + 0xa3, 0x58, 0x19, 0x85, 0x76, 0xf3, 0x29, 0x5e, 0x4c, 0xfd, 0x7d, 0xae, 0xb8, 0xb2, 0x43, 0x92, + 0x9d, 0x1c, 0xe7, 0xd7, 0x0b, 0x2e, 0x8b, 0x43, 0x0e, 0xd4, 0xb8, 0x52, 0x7c, 0xc8, 0x08, 0x8d, + 0x04, 0xa1, 0x52, 0x2a, 0x43, 0x8d, 0x50, 0x52, 0xe7, 0xd3, 0xd3, 0xbe, 0xd2, 0x23, 0xa5, 0x49, + 0x48, 0x35, 0x73, 0xf9, 0xe4, 0xb1, 0x1d, 0x32, 0x43, 0xdb, 0x24, 0xa2, 0x5c, 0x48, 0x0b, 0x3b, + 0xb6, 0x79, 0x0f, 0xd1, 0x4d, 0x46, 0xdc, 0x26, 0x11, 0x8b, 0x75, 0x8f, 0x8d, 0x13, 0xa6, 0x0d, + 0xba, 0x80, 0x70, 0x49, 0x56, 0x41, 0x03, 0xb4, 0x2a, 0x9d, 0x63, 0xec, 0x6c, 0x71, 0x66, 0x8b, + 0xdd, 0xb3, 0x72, 0x5b, 0x7c, 0x4d, 0x39, 0xcb, 0xb5, 0xbd, 0x15, 0x65, 0xf3, 0x1d, 0xc0, 0xbd, + 0x35, 0x7b, 0x1d, 0x29, 0xa9, 0x19, 0x3a, 0x87, 0x65, 0x6d, 0x6f, 0xaa, 0xa0, 0xb1, 0xd5, 0xaa, + 0x74, 0x0e, 0xf0, 0xff, 0x9f, 0xc1, 0x56, 0xd1, 0xdd, 0x9e, 0x7e, 0xd5, 0xbd, 0x5e, 0x0e, 0xa3, + 0xcb, 0xb5, 0x5a, 0x25, 0x5b, 0xeb, 0x64, 0x63, 0x2d, 0x97, 0xb9, 0xda, 0xab, 0xf3, 0x0c, 0xe0, + 0x8e, 0xed, 0x85, 0x9e, 0x60, 0xd9, 0x75, 0x43, 0x87, 0xc5, 0x0e, 0xc5, 0x9f, 0xf1, 0x8f, 0x36, + 0x50, 0x2e, 0xac, 0xd9, 0x78, 0xf9, 0xf8, 0x79, 0x2b, 0xf9, 0xa8, 0x4a, 0x0a, 0xab, 0x74, 0x6f, + 0xe9, 0x5e, 0x4d, 0xe7, 0x01, 0x98, 0xcd, 0x03, 0xf0, 0x3d, 0x0f, 0xc0, 0x6b, 0x1a, 0x78, 0xb3, + 0x34, 0xf0, 0x3e, 0xd3, 0xc0, 0xbb, 0x6b, 0x73, 0x61, 0xb2, 0x80, 0xbe, 0x1a, 0x59, 0xb5, 0x64, + 0xe6, 0xcf, 0x65, 0xa4, 0x06, 0xc9, 0x90, 0xe9, 0xa5, 0x9b, 0x99, 0x44, 0x4c, 0x87, 0x65, 0xbb, + 0xcc, 0xb3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x9d, 0x59, 0x80, 0x7f, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -242,7 +241,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "guardian/query.proto", + Metadata: "irishub/guardian/query.proto", } func (m *QuerySupersRequest) Marshal() (dAtA []byte, err error) { diff --git a/modules/guardian/types/query.pb.gw.go b/modules/guardian/types/query.pb.gw.go index 9df2659d3..98174729a 100644 --- a/modules/guardian/types/query.pb.gw.go +++ b/modules/guardian/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: guardian/query.proto +// source: irishub/guardian/query.proto /* Package types is a reverse proxy. @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join var ( filter_Query_Supers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} @@ -70,12 +72,14 @@ func local_request_Query_Supers_0(ctx context.Context, marshaler runtime.Marshal // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Supers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -83,6 +87,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Supers_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -158,7 +163,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Supers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"irishub", "guardian", "supers"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Supers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"irishub", "guardian", "supers"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/modules/guardian/types/tx.pb.go b/modules/guardian/types/tx.pb.go index c5b8e4f0e..66d815497 100644 --- a/modules/guardian/types/tx.pb.go +++ b/modules/guardian/types/tx.pb.go @@ -1,13 +1,13 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: guardian/tx.proto +// source: irishub/guardian/tx.proto package types import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -38,7 +38,7 @@ func (m *MsgAddSuper) Reset() { *m = MsgAddSuper{} } func (m *MsgAddSuper) String() string { return proto.CompactTextString(m) } func (*MsgAddSuper) ProtoMessage() {} func (*MsgAddSuper) Descriptor() ([]byte, []int) { - return fileDescriptor_b62288115d705ce8, []int{0} + return fileDescriptor_02bb99d7e79743a5, []int{0} } func (m *MsgAddSuper) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -96,7 +96,7 @@ func (m *MsgAddSuperResponse) Reset() { *m = MsgAddSuperResponse{} } func (m *MsgAddSuperResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddSuperResponse) ProtoMessage() {} func (*MsgAddSuperResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b62288115d705ce8, []int{1} + return fileDescriptor_02bb99d7e79743a5, []int{1} } func (m *MsgAddSuperResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -135,7 +135,7 @@ func (m *MsgDeleteSuper) Reset() { *m = MsgDeleteSuper{} } func (m *MsgDeleteSuper) String() string { return proto.CompactTextString(m) } func (*MsgDeleteSuper) ProtoMessage() {} func (*MsgDeleteSuper) Descriptor() ([]byte, []int) { - return fileDescriptor_b62288115d705ce8, []int{2} + return fileDescriptor_02bb99d7e79743a5, []int{2} } func (m *MsgDeleteSuper) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -186,7 +186,7 @@ func (m *MsgDeleteSuperResponse) Reset() { *m = MsgDeleteSuperResponse{} func (m *MsgDeleteSuperResponse) String() string { return proto.CompactTextString(m) } func (*MsgDeleteSuperResponse) ProtoMessage() {} func (*MsgDeleteSuperResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b62288115d705ce8, []int{3} + return fileDescriptor_02bb99d7e79743a5, []int{3} } func (m *MsgDeleteSuperResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -222,29 +222,29 @@ func init() { proto.RegisterType((*MsgDeleteSuperResponse)(nil), "irishub.guardian.MsgDeleteSuperResponse") } -func init() { proto.RegisterFile("guardian/tx.proto", fileDescriptor_b62288115d705ce8) } +func init() { proto.RegisterFile("irishub/guardian/tx.proto", fileDescriptor_02bb99d7e79743a5) } -var fileDescriptor_b62288115d705ce8 = []byte{ +var fileDescriptor_02bb99d7e79743a5 = []byte{ // 298 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0x2f, 0x4d, 0x2c, - 0x4a, 0xc9, 0x4c, 0xcc, 0xd3, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc8, - 0x2c, 0xca, 0x2c, 0xce, 0x28, 0x4d, 0xd2, 0x83, 0x49, 0x29, 0xa5, 0x70, 0x71, 0xfb, 0x16, 0xa7, - 0x3b, 0xa6, 0xa4, 0x04, 0x97, 0x16, 0xa4, 0x16, 0x09, 0x29, 0x70, 0x71, 0xa7, 0xa4, 0x16, 0x27, - 0x17, 0x65, 0x16, 0x94, 0x64, 0xe6, 0xe7, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x21, 0x0b, - 0x09, 0x49, 0x70, 0xb1, 0x27, 0xa6, 0xa4, 0x14, 0xa5, 0x16, 0x17, 0x4b, 0x30, 0x81, 0x65, 0x61, - 0x5c, 0x21, 0x49, 0x2e, 0x8e, 0xc4, 0x94, 0x94, 0xd4, 0x94, 0xf8, 0xa4, 0x4a, 0x09, 0x66, 0xb8, - 0x54, 0x6a, 0x8a, 0x53, 0xa5, 0x92, 0x28, 0x97, 0x30, 0x92, 0x2d, 0x41, 0xa9, 0xc5, 0x05, 0xf9, - 0x79, 0xc5, 0xa9, 0x4a, 0x9e, 0x5c, 0x7c, 0xbe, 0xc5, 0xe9, 0x2e, 0xa9, 0x39, 0xa9, 0x25, 0xa9, - 0x10, 0xfb, 0x71, 0x9b, 0x2e, 0xcb, 0xc5, 0x95, 0x02, 0x56, 0x88, 0x64, 0x3e, 0x27, 0x54, 0xc4, - 0xa9, 0x52, 0x49, 0x82, 0x4b, 0x0c, 0xd5, 0x28, 0x98, 0x25, 0x46, 0x9b, 0x18, 0xb9, 0x98, 0x7d, - 0x8b, 0xd3, 0x85, 0x02, 0xb8, 0x38, 0xe0, 0xde, 0x94, 0xd5, 0x43, 0x0f, 0x08, 0x3d, 0x24, 0xf7, - 0x49, 0xa9, 0xe2, 0x95, 0x86, 0x99, 0x2c, 0x14, 0xc9, 0xc5, 0x8d, 0xec, 0x76, 0x05, 0xac, 0xba, - 0x90, 0x54, 0x48, 0x69, 0x10, 0x52, 0x01, 0x33, 0xda, 0xc9, 0xfb, 0xc4, 0x23, 0x39, 0xc6, 0x0b, - 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, - 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x0c, 0xd3, 0x33, 0x4b, 0x40, 0x26, 0x24, 0xe7, 0xe7, 0xea, 0x83, - 0x4c, 0xcb, 0x4b, 0x2d, 0xd1, 0x87, 0x9a, 0xaa, 0x9f, 0x9b, 0x9f, 0x52, 0x9a, 0x93, 0x5a, 0xac, - 0x8f, 0x88, 0xf8, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0xe4, 0x1b, 0x03, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x31, 0x10, 0x08, 0xaa, 0x11, 0x02, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xcd, 0x4a, 0x03, 0x31, + 0x14, 0x85, 0x1b, 0x0b, 0xda, 0xde, 0x82, 0x48, 0x44, 0x99, 0x16, 0x1a, 0xca, 0x80, 0xd0, 0xd5, + 0x0c, 0xea, 0x13, 0x58, 0xdc, 0x88, 0x14, 0xa4, 0xae, 0x74, 0x23, 0xd3, 0xde, 0xcb, 0x18, 0x68, + 0x27, 0x43, 0x92, 0x01, 0xe7, 0x2d, 0x7c, 0x16, 0x9f, 0xc2, 0x65, 0x97, 0x2e, 0xa5, 0xf3, 0x22, + 0xd2, 0xb1, 0x29, 0x51, 0xfc, 0x59, 0xe6, 0x9e, 0x93, 0xef, 0xdc, 0xe4, 0x40, 0x57, 0x6a, 0x69, + 0x1e, 0x8b, 0x69, 0x9c, 0x16, 0x89, 0x46, 0x99, 0x64, 0xb1, 0x7d, 0x8a, 0x72, 0xad, 0xac, 0xe2, + 0x07, 0x1b, 0x29, 0x72, 0x52, 0x88, 0xd0, 0x19, 0x9b, 0xf4, 0x02, 0xf1, 0xb6, 0xc8, 0x49, 0xf3, + 0x01, 0x74, 0x90, 0xcc, 0x4c, 0xcb, 0xdc, 0x4a, 0x95, 0x05, 0x6c, 0xc0, 0x86, 0xed, 0x89, 0x3f, + 0xe2, 0x01, 0xec, 0x25, 0x88, 0x9a, 0x8c, 0x09, 0x76, 0x6a, 0xd5, 0x1d, 0x79, 0x17, 0x5a, 0x09, + 0x22, 0xe1, 0xc3, 0xb4, 0x0c, 0x9a, 0x5b, 0x89, 0x70, 0x54, 0x86, 0x47, 0x70, 0xe8, 0xa5, 0x4c, + 0xc8, 0xe4, 0x2a, 0x33, 0x14, 0x5e, 0xc1, 0xfe, 0xd8, 0xa4, 0x97, 0x34, 0x27, 0x4b, 0x9f, 0xf9, + 0xbf, 0xd3, 0xfb, 0x00, 0x58, 0x1b, 0x3d, 0x7e, 0x7b, 0x33, 0x19, 0x95, 0x61, 0x00, 0xc7, 0x5f, + 0x51, 0x2e, 0xe4, 0xec, 0x85, 0x41, 0x73, 0x6c, 0x52, 0x7e, 0x03, 0xad, 0xed, 0x33, 0xfb, 0xd1, + 0xf7, 0x8f, 0x88, 0xbc, 0xfd, 0x7a, 0x27, 0x7f, 0xca, 0x8e, 0xcc, 0xef, 0xa0, 0xe3, 0xef, 0x3e, + 0xf8, 0xf1, 0x96, 0xe7, 0xe8, 0x0d, 0xff, 0x73, 0x38, 0xf4, 0xe8, 0xfa, 0x75, 0x25, 0xd8, 0x72, + 0x25, 0xd8, 0xfb, 0x4a, 0xb0, 0xe7, 0x4a, 0x34, 0x96, 0x95, 0x68, 0xbc, 0x55, 0xa2, 0x71, 0x7f, + 0x9a, 0x4a, 0xbb, 0x26, 0xcc, 0xd4, 0x22, 0x5e, 0xd3, 0x32, 0xb2, 0xb1, 0x2b, 0x7c, 0xa1, 0xb0, + 0x98, 0x93, 0xf1, 0x8a, 0x2f, 0x73, 0x32, 0xd3, 0xdd, 0xba, 0xfc, 0xf3, 0x8f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xe7, 0x88, 0xdd, 0xcd, 0x19, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -364,7 +364,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "guardian/tx.proto", + Metadata: "irishub/guardian/tx.proto", } func (m *MsgAddSuper) Marshal() (dAtA []byte, err error) { diff --git a/modules/mint/abci_test.go b/modules/mint/abci_test.go index 25ac803a8..45098f129 100644 --- a/modules/mint/abci_test.go +++ b/modules/mint/abci_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" diff --git a/modules/mint/client/testutil/test_helpers.go b/modules/mint/client/testutil/test_helpers.go index 913e9e397..b9a9ff2b8 100644 --- a/modules/mint/client/testutil/test_helpers.go +++ b/modules/mint/client/testutil/test_helpers.go @@ -3,7 +3,7 @@ package testutil import ( "fmt" - "github.com/tendermint/tendermint/libs/cli" + "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/testutil" diff --git a/modules/mint/keeper/keeper.go b/modules/mint/keeper/keeper.go index 9310ace64..58134352e 100644 --- a/modules/mint/keeper/keeper.go +++ b/modules/mint/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -80,7 +80,12 @@ func (k Keeper) MintCoins(ctx sdk.Context, newCoins sdk.Coins) error { // AddCollectedFees implements an alias call to the underlying supply keeper's // AddCollectedFees to be used in BeginBlocker. func (k Keeper) AddCollectedFees(ctx sdk.Context, coins sdk.Coins) error { - return k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, k.feeCollectorName, coins) + return k.bankKeeper.SendCoinsFromModuleToModule( + ctx, + types.ModuleName, + k.feeCollectorName, + coins, + ) } // GetParamSet returns inflation params from the global param store diff --git a/modules/mint/keeper/keeper_test.go b/modules/mint/keeper/keeper_test.go index f3323aaec..1fd62fce6 100644 --- a/modules/mint/keeper/keeper_test.go +++ b/modules/mint/keeper/keeper_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -85,7 +85,10 @@ func (suite *KeeperTestSuite) TestAddCollectedFees() { coins = suite.app.BankKeeper.GetAllBalances(suite.ctx, acc.GetAddress()) require.True(suite.T(), coins.Empty()) - feeCollectorTotalBalance := suite.app.BankKeeper.GetAllBalances(suite.ctx, feeCollector.GetAddress()) + feeCollectorTotalBalance := suite.app.BankKeeper.GetAllBalances( + suite.ctx, + feeCollector.GetAddress(), + ) expectedCollectedFees := feeCollectorTotalBalance.Sub(feeCollectorBalance...) require.Equal(suite.T(), expectedCollectedFees, mintCoins) diff --git a/modules/mint/keeper/querier.go b/modules/mint/keeper/querier.go deleted file mode 100644 index 9a1d515dd..000000000 --- a/modules/mint/keeper/querier.go +++ /dev/null @@ -1,34 +0,0 @@ -package keeper - -import ( - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/irisnet/irishub/modules/mint/types" -) - -// NewQuerier returns a minting Querier handler. -func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return func(ctx sdk.Context, path []string, _ abci.RequestQuery) ([]byte, error) { - switch path[0] { - case types.QueryParameters: - return queryParams(ctx, k, legacyQuerierCdc) - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown query path: %s", path[0]) - } - } -} - -func queryParams(ctx sdk.Context, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { - params := k.GetParamSet(ctx) - - res, err := codec.MarshalJSONIndent(legacyQuerierCdc, params) - if err != nil { - return nil, sdkerrors.Wrap(sdkerrors.ErrJSONMarshal, err.Error()) - } - - return res, nil -} diff --git a/modules/mint/keeper/querier_test.go b/modules/mint/keeper/querier_test.go deleted file mode 100644 index 2a64d1229..000000000 --- a/modules/mint/keeper/querier_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/stretchr/testify/suite" - - abci "github.com/tendermint/tendermint/abci/types" - - "github.com/irisnet/irishub/modules/mint/keeper" - "github.com/irisnet/irishub/modules/mint/types" -) - -func TestQuerierSuite(t *testing.T) { - suite.Run(t, new(KeeperTestSuite)) -} - -func (suite *KeeperTestSuite) TestNewQuerier() { - querier := keeper.NewQuerier(suite.app.MintKeeper, suite.cdc) - res, err := querier(suite.ctx, []string{"other"}, abci.RequestQuery{}) - suite.Error(err) - suite.Nil(res) - - // test queryParams - - res, err = querier(suite.ctx, []string{types.QueryParameters}, abci.RequestQuery{}) - suite.NoError(err) - var params types.Params - e := suite.cdc.UnmarshalJSON(res, ¶ms) - suite.NoError(e) - suite.Equal(suite.app.MintKeeper.GetParamSet(suite.ctx), params) -} diff --git a/modules/mint/module.go b/modules/mint/module.go index 96593890a..77a7d552d 100644 --- a/modules/mint/module.go +++ b/modules/mint/module.go @@ -4,13 +4,12 @@ import ( "context" "encoding/json" "fmt" - "math/rand" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -51,7 +50,11 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { } // ValidateGenesis performs genesis state validation for the mint module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { +func (AppModuleBasic) ValidateGenesis( + cdc codec.JSONCodec, + config client.TxEncodingConfig, + bz json.RawMessage, +) error { var data types.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -113,19 +116,9 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { } -// Route returns the message routing key for the mint module. -func (am AppModule) Route() sdk.Route { - return sdk.Route{} -} - // QuerierRoute returns the mint module's querier route name. func (AppModule) QuerierRoute() string { return types.RouterKey } -// LegacyQuerierHandler returns the mint module sdk.Querier. -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return keeper.NewQuerier(am.keeper, legacyQuerierCdc) -} - // ConsensusVersion is a sequence number for state-breaking change of the // module. It should be incremented on each consensus-breaking change // introduced by the module. To avoid wrong/empty versions, the initial version @@ -136,7 +129,11 @@ func (am AppModule) ConsensusVersion() uint64 { // InitGenesis performs genesis initialization for the mint module. It returns // no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { +func (am AppModule) InitGenesis( + ctx sdk.Context, + cdc codec.JSONCodec, + data json.RawMessage, +) []abci.ValidatorUpdate { var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) @@ -171,22 +168,14 @@ func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Validato func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } -// ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { - return nil -} - -// RandomizedParams creates randomized mint param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange { - return simulation.ParamChanges(r) -} - // RegisterStoreDecoder registers a decoder for mint module's types func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry) { sdr[types.StoreKey] = simulation.NewDecodeStore(am.cdc) } // WeightedOperations returns the all the mint module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { +func (am AppModule) WeightedOperations( + simState module.SimulationState, +) []simtypes.WeightedOperation { return []simtypes.WeightedOperation{} } diff --git a/modules/mint/simulation/params.go b/modules/mint/simulation/params.go deleted file mode 100644 index 02e5147d8..000000000 --- a/modules/mint/simulation/params.go +++ /dev/null @@ -1,27 +0,0 @@ -package simulation - -// DONTCOVER - -import ( - "fmt" - "math/rand" - - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" - - "github.com/irisnet/irishub/modules/mint/types" -) - -// ParamChanges defines the parameters that can be modified by param change proposals -// on the simulation -func ParamChanges(r *rand.Rand) []simtypes.ParamChange { - return []simtypes.ParamChange{ - simulation.NewSimParamChange( - types.ModuleName, - string(types.KeyInflation), - func(r *rand.Rand) string { - return fmt.Sprintf("\"%s\"", GenInflation(r)) - }, - ), - } -} diff --git a/modules/mint/types/genesis.pb.go b/modules/mint/types/genesis.pb.go index a04d1e352..9e2995f1f 100644 --- a/modules/mint/types/genesis.pb.go +++ b/modules/mint/types/genesis.pb.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mint/genesis.proto +// source: irishub/mint/genesis.proto package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -33,7 +33,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_50813f2cd53c1776, []int{0} + return fileDescriptor_79c69a4fab6b38a3, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,23 +80,23 @@ func init() { proto.RegisterType((*GenesisState)(nil), "irishub.mint.GenesisState") } -func init() { proto.RegisterFile("mint/genesis.proto", fileDescriptor_50813f2cd53c1776) } +func init() { proto.RegisterFile("irishub/mint/genesis.proto", fileDescriptor_79c69a4fab6b38a3) } -var fileDescriptor_50813f2cd53c1776 = []byte{ +var fileDescriptor_79c69a4fab6b38a3 = []byte{ // 208 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0xcd, 0xcc, 0x2b, - 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, - 0xc9, 0x2c, 0xca, 0x2c, 0xce, 0x28, 0x4d, 0xd2, 0x03, 0xc9, 0x49, 0xf1, 0x83, 0x55, 0x80, 0x08, - 0x88, 0xb4, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x44, 0x95, 0xca, - 0xb8, 0x78, 0xdc, 0x21, 0xa6, 0x04, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x19, 0x71, 0xb1, 0x81, 0xf4, - 0xa4, 0x16, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x89, 0xe8, 0x21, 0x9b, 0xaa, 0xe7, 0x0b, - 0x96, 0x73, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0x12, 0xa4, 0xa7, 0x20, 0xb1, 0x28, - 0x31, 0xb7, 0x58, 0x82, 0x09, 0x9b, 0x9e, 0x00, 0xb0, 0x1c, 0x4c, 0x0f, 0x44, 0xa5, 0x93, 0xfb, - 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, - 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa6, 0x67, 0x96, 0x80, 0xf4, - 0x26, 0xe7, 0xe7, 0xea, 0x83, 0xcc, 0xc9, 0x4b, 0x2d, 0xd1, 0x87, 0x9a, 0xa7, 0x9f, 0x9b, 0x9f, - 0x52, 0x9a, 0x93, 0x5a, 0x0c, 0xf6, 0x96, 0x7e, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, - 0x1f, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x26, 0x3f, 0xb8, 0x15, 0x12, 0x01, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x2c, 0xca, 0x2c, + 0xce, 0x28, 0x4d, 0xd2, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0xca, 0xe9, 0x81, 0xe4, 0xa4, 0xc4, 0x51, + 0x54, 0x82, 0x08, 0x88, 0x32, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0x30, 0x53, 0x1f, 0xc4, 0x82, + 0x88, 0x2a, 0x95, 0x71, 0xf1, 0xb8, 0x43, 0x4c, 0x0b, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x32, 0xe2, + 0x62, 0x03, 0xe9, 0x49, 0x2d, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd1, 0x43, 0x36, + 0x5d, 0xcf, 0x17, 0x2c, 0xe7, 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x54, 0x25, 0x48, 0x4f, + 0x41, 0x62, 0x51, 0x62, 0x6e, 0xb1, 0x04, 0x13, 0x36, 0x3d, 0x01, 0x60, 0x39, 0x98, 0x1e, 0x88, + 0x4a, 0x27, 0xf7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, + 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4d, 0xcf, + 0x2c, 0x01, 0xe9, 0x4d, 0xce, 0xcf, 0xd5, 0x07, 0x99, 0x93, 0x97, 0x5a, 0xa2, 0x0f, 0xf7, 0x53, + 0x7e, 0x4a, 0x69, 0x4e, 0x6a, 0x31, 0xc4, 0x6f, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, + 0x7f, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x96, 0xa5, 0x48, 0x3e, 0x22, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/mint/types/mint.pb.go b/modules/mint/types/mint.pb.go index 0facff693..0e7985e07 100644 --- a/modules/mint/types/mint.pb.go +++ b/modules/mint/types/mint.pb.go @@ -1,15 +1,15 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mint/mint.proto +// source: irishub/mint/mint.proto package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/golang/protobuf/ptypes/timestamp" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" @@ -40,7 +40,7 @@ func (m *Minter) Reset() { *m = Minter{} } func (m *Minter) String() string { return proto.CompactTextString(m) } func (*Minter) ProtoMessage() {} func (*Minter) Descriptor() ([]byte, []int) { - return fileDescriptor_e1b9fbb701b2a577, []int{0} + return fileDescriptor_06d871d90c4bc3c9, []int{0} } func (m *Minter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,7 +87,7 @@ type Params struct { func (m *Params) Reset() { *m = Params{} } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_e1b9fbb701b2a577, []int{1} + return fileDescriptor_06d871d90c4bc3c9, []int{1} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -128,33 +128,33 @@ func init() { proto.RegisterType((*Params)(nil), "irishub.mint.Params") } -func init() { proto.RegisterFile("mint/mint.proto", fileDescriptor_e1b9fbb701b2a577) } +func init() { proto.RegisterFile("irishub/mint/mint.proto", fileDescriptor_06d871d90c4bc3c9) } -var fileDescriptor_e1b9fbb701b2a577 = []byte{ +var fileDescriptor_06d871d90c4bc3c9 = []byte{ // 355 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xc1, 0x4a, 0xeb, 0x40, - 0x14, 0x86, 0x33, 0x97, 0x4b, 0x21, 0xd3, 0x7b, 0x15, 0x82, 0x42, 0x29, 0x98, 0x94, 0x2c, 0xa4, - 0x9b, 0xce, 0x80, 0xee, 0xba, 0x0c, 0x85, 0x22, 0x28, 0x48, 0xd0, 0x8d, 0x2e, 0xca, 0xa4, 0x99, - 0xc6, 0xc1, 0xcc, 0x4c, 0xc8, 0x4c, 0x16, 0xc5, 0x97, 0xe8, 0xd2, 0xa5, 0x8f, 0xd3, 0x65, 0x37, - 0x82, 0xb8, 0x88, 0xd2, 0xbe, 0x41, 0x9f, 0x40, 0x26, 0x69, 0x6b, 0x5d, 0xba, 0x49, 0xe6, 0xfc, - 0x73, 0xce, 0x37, 0xe7, 0x9c, 0x1f, 0x1e, 0x72, 0x26, 0x34, 0x36, 0x1f, 0x94, 0xe5, 0x52, 0x4b, - 0xe7, 0x1f, 0xcb, 0x99, 0x7a, 0x28, 0x22, 0x64, 0xb4, 0xf6, 0x51, 0x22, 0x13, 0x59, 0x5d, 0x60, - 0x73, 0xaa, 0x73, 0xda, 0x5e, 0x22, 0x65, 0x92, 0x52, 0x5c, 0x45, 0x51, 0x31, 0xc1, 0x9a, 0x71, - 0xaa, 0x34, 0xe1, 0x59, 0x9d, 0xe0, 0xbf, 0x02, 0xd8, 0xb8, 0x62, 0x42, 0xd3, 0xdc, 0xb9, 0x87, - 0xcd, 0x94, 0x28, 0x3d, 0x2a, 0xb2, 0x98, 0x68, 0xda, 0x02, 0x1d, 0xd0, 0x6d, 0x9e, 0xb5, 0x51, - 0x4d, 0x40, 0x5b, 0x02, 0xba, 0xd9, 0x12, 0x02, 0x77, 0x5e, 0x7a, 0xd6, 0xba, 0xf4, 0x9c, 0x29, - 0xe1, 0x69, 0xdf, 0xdf, 0x2b, 0xf6, 0x67, 0x1f, 0x1e, 0x08, 0xa1, 0x51, 0x6e, 0x2b, 0xc1, 0x11, - 0xf0, 0x80, 0x89, 0x49, 0x4a, 0x34, 0x93, 0x62, 0x14, 0x11, 0x45, 0x5b, 0x7f, 0x3a, 0xa0, 0x6b, - 0x07, 0x43, 0xc3, 0x78, 0x2f, 0xbd, 0xd3, 0x84, 0x69, 0x33, 0xcb, 0x58, 0x72, 0x3c, 0x96, 0x8a, - 0x4b, 0xb5, 0xf9, 0xf5, 0x54, 0xfc, 0x88, 0xf5, 0x34, 0xa3, 0x0a, 0x5d, 0x08, 0xbd, 0x2e, 0xbd, - 0xe3, 0xfa, 0xb5, 0x9f, 0x34, 0x3f, 0xfc, 0xbf, 0x13, 0x02, 0x13, 0x3f, 0xc1, 0xc6, 0x35, 0xc9, - 0x09, 0x57, 0xce, 0x09, 0x84, 0x66, 0x41, 0xa3, 0x98, 0x0a, 0xc9, 0xab, 0xa9, 0xec, 0xd0, 0x36, - 0xca, 0xc0, 0x08, 0xce, 0x25, 0xb4, 0x77, 0x95, 0x9b, 0x9e, 0xd0, 0x2f, 0x7a, 0x1a, 0xd0, 0x71, - 0xf8, 0x0d, 0xe8, 0xff, 0x7d, 0x7e, 0xf1, 0xac, 0x60, 0x38, 0x5f, 0xba, 0x60, 0xb1, 0x74, 0xc1, - 0xe7, 0xd2, 0x05, 0xb3, 0x95, 0x6b, 0x2d, 0x56, 0xae, 0xf5, 0xb6, 0x72, 0xad, 0xbb, 0xde, 0x1e, - 0xd2, 0xd8, 0x27, 0xa8, 0xc6, 0x1b, 0x1b, 0x31, 0x97, 0x71, 0x91, 0x52, 0x55, 0x59, 0x5c, 0xd3, - 0xa3, 0x46, 0xb5, 0xf5, 0xf3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x4e, 0xb8, 0x09, 0xfc, - 0x01, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xbd, 0x6a, 0xeb, 0x30, + 0x14, 0xc7, 0xad, 0xcb, 0x25, 0x60, 0xe5, 0xde, 0x0e, 0xa6, 0xa5, 0x21, 0x50, 0x3b, 0x78, 0x28, + 0x59, 0x62, 0x41, 0xbb, 0x65, 0x34, 0x81, 0x50, 0x68, 0xa1, 0x98, 0x76, 0x69, 0x87, 0x20, 0xc7, + 0x8a, 0x2b, 0x6a, 0x49, 0xc6, 0x92, 0x87, 0xd0, 0x97, 0xc8, 0xd8, 0xb1, 0x8f, 0x93, 0x31, 0x4b, + 0xa1, 0x74, 0x70, 0x4b, 0xf2, 0x06, 0x79, 0x82, 0x22, 0x39, 0x49, 0xd3, 0xb1, 0x8b, 0xa4, 0xf3, + 0x3f, 0xe7, 0xfc, 0x74, 0x3e, 0xe0, 0x31, 0x2d, 0xa8, 0x7c, 0x28, 0x63, 0xc4, 0x28, 0x57, 0xe6, + 0x08, 0xf2, 0x42, 0x28, 0xe1, 0xfc, 0xdb, 0x38, 0x02, 0xad, 0xb5, 0x0f, 0x53, 0x91, 0x0a, 0xe3, + 0x40, 0xfa, 0x55, 0xc7, 0xb4, 0xbd, 0x54, 0x88, 0x34, 0x23, 0xc8, 0x58, 0x71, 0x39, 0x41, 0x8a, + 0x32, 0x22, 0x15, 0x66, 0x79, 0x1d, 0xe0, 0xbf, 0x02, 0xd8, 0xb8, 0xa2, 0x5c, 0x91, 0xc2, 0xb9, + 0x87, 0xcd, 0x0c, 0x4b, 0x35, 0x2a, 0xf3, 0x04, 0x2b, 0xd2, 0x02, 0x1d, 0xd0, 0x6d, 0x9e, 0xb5, + 0x83, 0x9a, 0x10, 0x6c, 0x09, 0xc1, 0xcd, 0x96, 0x10, 0xba, 0xf3, 0xca, 0xb3, 0xd6, 0x95, 0xe7, + 0x4c, 0x31, 0xcb, 0xfa, 0xfe, 0x5e, 0xb2, 0x3f, 0xfb, 0xf0, 0x40, 0x04, 0xb5, 0x72, 0x6b, 0x04, + 0x87, 0xc3, 0x03, 0xca, 0x27, 0x19, 0x56, 0x54, 0xf0, 0x51, 0x8c, 0x25, 0x69, 0xfd, 0xe9, 0x80, + 0xae, 0x1d, 0x0e, 0x35, 0xe3, 0xbd, 0xf2, 0x4e, 0x53, 0xaa, 0x74, 0x2f, 0x63, 0xc1, 0xd0, 0x58, + 0x48, 0x26, 0xe4, 0xe6, 0xea, 0xc9, 0xe4, 0x11, 0xa9, 0x69, 0x4e, 0x64, 0x70, 0xc1, 0xd5, 0xba, + 0xf2, 0x8e, 0xea, 0xdf, 0x7e, 0xd2, 0xfc, 0xe8, 0xff, 0x4e, 0x08, 0xb5, 0xfd, 0x04, 0x1b, 0xd7, + 0xb8, 0xc0, 0x4c, 0x3a, 0x27, 0x10, 0xea, 0x01, 0x8d, 0x12, 0xc2, 0x05, 0x33, 0x5d, 0xd9, 0x91, + 0xad, 0x95, 0x81, 0x16, 0x9c, 0x4b, 0x68, 0xef, 0x32, 0x37, 0x35, 0x05, 0xbf, 0xa8, 0x69, 0x40, + 0xc6, 0xd1, 0x37, 0xa0, 0xff, 0xf7, 0xf9, 0xc5, 0xb3, 0xc2, 0xe1, 0x7c, 0xe9, 0x82, 0xc5, 0xd2, + 0x05, 0x9f, 0x4b, 0x17, 0xcc, 0x56, 0xae, 0xb5, 0x58, 0xb9, 0xd6, 0xdb, 0xca, 0xb5, 0xee, 0x7a, + 0x7b, 0x48, 0xbd, 0x3e, 0x4e, 0x14, 0xda, 0xed, 0x57, 0x24, 0x65, 0x46, 0x64, 0xbd, 0x67, 0x43, + 0x8f, 0x1b, 0x66, 0xea, 0xe7, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xe5, 0x9b, 0x14, 0x04, + 0x02, 0x00, 0x00, } func (m *Minter) Marshal() (dAtA []byte, err error) { @@ -187,7 +187,7 @@ func (m *Minter) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastUpdate, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastUpdate):]) + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastUpdate, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastUpdate):]) if err1 != nil { return 0, err1 } @@ -255,7 +255,7 @@ func (m *Minter) Size() (n int) { } var l int _ = l - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastUpdate) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastUpdate) n += 1 + l + sovMint(uint64(l)) l = m.InflationBase.Size() n += 1 + l + sovMint(uint64(l)) @@ -341,7 +341,7 @@ func (m *Minter) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastUpdate, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LastUpdate, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/modules/mint/types/params.go b/modules/mint/types/params.go index 7ffabfa6d..a7fb4505a 100644 --- a/modules/mint/types/params.go +++ b/modules/mint/types/params.go @@ -15,7 +15,6 @@ import ( // default paramspace for params keeper const ( DefaultParamSpace = "mint" - MintDenom = sdk.DefaultBondDenom ) // Parameter store key @@ -23,6 +22,7 @@ var ( // params store for inflation params KeyInflation = []byte("Inflation") KeyMintDenom = []byte("MintDenom") + MintDenom = sdk.DefaultBondDenom ) // ParamTable for mint module @@ -67,10 +67,18 @@ func (p *Params) GetParamSpace() string { // Validate returns err if the Params is invalid func (p Params) Validate() error { if p.Inflation.GT(sdk.NewDecWithPrec(2, 1)) || p.Inflation.LT(sdk.ZeroDec()) { - return sdkerrors.Wrapf(ErrInvalidMintInflation, "Mint inflation [%s] should be between [0, 0.2] ", p.Inflation.String()) + return sdkerrors.Wrapf( + ErrInvalidMintInflation, + "Mint inflation [%s] should be between [0, 0.2] ", + p.Inflation.String(), + ) } if len(p.MintDenom) == 0 { - return sdkerrors.Wrapf(ErrInvalidMintDenom, "Mint denom [%s] should not be empty", p.MintDenom) + return sdkerrors.Wrapf( + ErrInvalidMintDenom, + "Mint denom [%s] should not be empty", + p.MintDenom, + ) } return nil } diff --git a/modules/mint/types/query.pb.go b/modules/mint/types/query.pb.go index 40525a8aa..f90bd191f 100644 --- a/modules/mint/types/query.pb.go +++ b/modules/mint/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: mint/query.proto +// source: irishub/mint/query.proto package types @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -38,7 +38,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3082aecef156f565, []int{0} + return fileDescriptor_f3acdec2e023e167, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +77,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3082aecef156f565, []int{1} + return fileDescriptor_f3acdec2e023e167, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -125,31 +125,31 @@ func init() { proto.RegisterType((*QueryParamsResponse)(nil), "irishub.mint.QueryParamsResponse") } -func init() { proto.RegisterFile("mint/query.proto", fileDescriptor_3082aecef156f565) } - -var fileDescriptor_3082aecef156f565 = []byte{ - // 327 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xc1, 0x4a, 0x3b, 0x31, - 0x10, 0xc6, 0x77, 0xfb, 0xff, 0xdb, 0x43, 0x14, 0x94, 0xb8, 0x48, 0x29, 0x65, 0xad, 0xbd, 0x28, - 0x82, 0x09, 0xad, 0x27, 0xaf, 0xbd, 0x78, 0xad, 0x3d, 0x7a, 0xcb, 0xd6, 0x10, 0x83, 0xdd, 0xcc, - 0x76, 0x27, 0x2b, 0xf4, 0x2a, 0x3e, 0x80, 0xe0, 0x4b, 0xf5, 0x58, 0xf0, 0xe2, 0x49, 0xa4, 0xf5, - 0x41, 0x24, 0xc9, 0x8a, 0x16, 0xc1, 0x4b, 0x08, 0x33, 0xdf, 0xf7, 0x9b, 0x6f, 0x86, 0xec, 0xe5, - 0xda, 0x58, 0x3e, 0xab, 0x64, 0x39, 0x67, 0x45, 0x09, 0x16, 0xe8, 0x8e, 0x2e, 0x35, 0xde, 0x56, - 0x19, 0x73, 0x9d, 0xf6, 0xe9, 0x04, 0x30, 0x07, 0xe4, 0x99, 0x40, 0x19, 0x64, 0xfc, 0xbe, 0x9f, - 0x49, 0x2b, 0xfa, 0xbc, 0x10, 0x4a, 0x1b, 0x61, 0x35, 0x98, 0xe0, 0x6c, 0xef, 0x7a, 0x96, 0x7b, - 0xea, 0x42, 0xa2, 0x40, 0x81, 0xff, 0x72, 0xf7, 0xab, 0xab, 0x1d, 0x05, 0xa0, 0xa6, 0x92, 0x8b, - 0x42, 0x73, 0x61, 0x0c, 0x58, 0xcf, 0xc0, 0xd0, 0xed, 0x25, 0x84, 0x5e, 0xb9, 0x31, 0x23, 0x51, - 0x8a, 0x1c, 0xc7, 0x72, 0x56, 0x49, 0xb4, 0xbd, 0xc7, 0x98, 0xec, 0x6f, 0x94, 0xb1, 0x00, 0x83, - 0x92, 0x0e, 0x48, 0xb3, 0xf0, 0x95, 0x56, 0xdc, 0x8d, 0x4f, 0xb6, 0x07, 0x09, 0xfb, 0x99, 0x9e, - 0x05, 0xf5, 0xf0, 0xff, 0xe2, 0xed, 0x30, 0x1a, 0xd7, 0x4a, 0x7a, 0x41, 0xfe, 0x95, 0x12, 0x5b, - 0x0d, 0x6f, 0x38, 0x66, 0x61, 0x41, 0xe6, 0x16, 0x64, 0xe1, 0x0e, 0xf5, 0x82, 0x6c, 0x24, 0x94, - 0xfc, 0x9a, 0x34, 0x76, 0x9e, 0x81, 0x25, 0x5b, 0x3e, 0x05, 0xbd, 0x23, 0xcd, 0xc0, 0xa6, 0xdd, - 0xcd, 0x89, 0xbf, 0xb3, 0xb7, 0x8f, 0xfe, 0x50, 0x04, 0x78, 0xaf, 0xf3, 0xf0, 0xf2, 0xf1, 0xdc, - 0x38, 0xa0, 0x09, 0xaf, 0xa5, 0xfe, 0x8a, 0x3c, 0x04, 0x1e, 0x5e, 0x2e, 0x56, 0x69, 0xbc, 0x5c, - 0xa5, 0xf1, 0xfb, 0x2a, 0x8d, 0x9f, 0xd6, 0x69, 0xb4, 0x5c, 0xa7, 0xd1, 0xeb, 0x3a, 0x8d, 0xae, - 0xcf, 0x94, 0xb6, 0x0e, 0x3c, 0x81, 0xdc, 0x3b, 0x8d, 0xb4, 0xdf, 0x04, 0xb8, 0xa9, 0xa6, 0x12, - 0x03, 0xc9, 0xce, 0x0b, 0x89, 0x59, 0xd3, 0x9f, 0xf8, 0xfc, 0x33, 0x00, 0x00, 0xff, 0xff, 0xac, - 0x02, 0x2e, 0xf3, 0xf5, 0x01, 0x00, 0x00, +func init() { proto.RegisterFile("irishub/mint/query.proto", fileDescriptor_f3acdec2e023e167) } + +var fileDescriptor_f3acdec2e023e167 = []byte{ + // 326 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x31, 0x4b, 0x03, 0x31, + 0x14, 0xc7, 0xef, 0xaa, 0x76, 0x88, 0x4e, 0xf1, 0xd0, 0x52, 0xca, 0x59, 0xbb, 0x28, 0x82, 0x09, + 0xad, 0x93, 0x6b, 0x17, 0xd7, 0xda, 0xd1, 0x2d, 0x57, 0x43, 0x0c, 0xf6, 0xf2, 0xd2, 0x4b, 0x4e, + 0xe8, 0x2a, 0x7e, 0x00, 0xc1, 0x2f, 0xd5, 0xb1, 0xe0, 0xe2, 0x24, 0xd2, 0xf3, 0x83, 0x48, 0x92, + 0x13, 0x3d, 0x04, 0x97, 0x10, 0xde, 0xfb, 0xff, 0x7f, 0xef, 0xfd, 0x1f, 0xea, 0xc8, 0x42, 0x9a, + 0xbb, 0x32, 0xa3, 0xb9, 0x54, 0x96, 0x2e, 0x4a, 0x5e, 0x2c, 0x89, 0x2e, 0xc0, 0x02, 0xde, 0xab, + 0x3b, 0xc4, 0x75, 0xba, 0x67, 0x33, 0x30, 0x39, 0x18, 0x9a, 0x31, 0xc3, 0x83, 0x8c, 0x3e, 0x0c, + 0x33, 0x6e, 0xd9, 0x90, 0x6a, 0x26, 0xa4, 0x62, 0x56, 0x82, 0x0a, 0xce, 0xee, 0x61, 0x83, 0xe9, + 0x9e, 0xba, 0x91, 0x08, 0x10, 0xe0, 0xbf, 0xd4, 0xfd, 0xea, 0x6a, 0x4f, 0x00, 0x88, 0x39, 0xa7, + 0x4c, 0x4b, 0xca, 0x94, 0x02, 0xeb, 0x59, 0x26, 0x74, 0x07, 0x09, 0xc2, 0xd7, 0x6e, 0xdc, 0x84, + 0x15, 0x2c, 0x37, 0x53, 0xbe, 0x28, 0xb9, 0xb1, 0x83, 0xa7, 0x18, 0xed, 0x37, 0xca, 0x46, 0x83, + 0x32, 0x1c, 0x8f, 0x50, 0x5b, 0xfb, 0x4a, 0x27, 0xee, 0xc7, 0xa7, 0xbb, 0xa3, 0x84, 0xfc, 0x4e, + 0x41, 0x82, 0x7a, 0xbc, 0xbd, 0x7a, 0x3f, 0x8a, 0xa6, 0xb5, 0x12, 0x5f, 0xa2, 0xad, 0x82, 0x9b, + 0x4e, 0xcb, 0x1b, 0x4e, 0x48, 0x08, 0x4a, 0x5c, 0x50, 0x12, 0xee, 0x51, 0x07, 0x25, 0x13, 0x26, + 0xf8, 0xf7, 0xa4, 0xa9, 0xf3, 0x8c, 0x2c, 0xda, 0xf1, 0x5b, 0xe0, 0x7b, 0xd4, 0x0e, 0x6c, 0xdc, + 0x6f, 0x4e, 0xfc, 0xbb, 0x7b, 0xf7, 0xf8, 0x1f, 0x45, 0x80, 0x0f, 0x7a, 0x8f, 0xaf, 0x9f, 0x2f, + 0xad, 0x03, 0x9c, 0xd0, 0xc6, 0x29, 0xc3, 0xc2, 0xe3, 0xab, 0xd5, 0x26, 0x8d, 0xd7, 0x9b, 0x34, + 0xfe, 0xd8, 0xa4, 0xf1, 0x73, 0x95, 0x46, 0xeb, 0x2a, 0x8d, 0xde, 0xaa, 0x34, 0xba, 0x39, 0x17, + 0xd2, 0x3a, 0xf0, 0x0c, 0x72, 0xef, 0x54, 0xdc, 0xfe, 0x10, 0xe0, 0xb6, 0x9c, 0x73, 0x13, 0x48, + 0x76, 0xa9, 0xb9, 0xc9, 0xda, 0xfe, 0xc4, 0x17, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x70, + 0xc2, 0x08, 0x05, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -231,7 +231,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "mint/query.proto", + Metadata: "irishub/mint/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { diff --git a/modules/mint/types/query.pb.gw.go b/modules/mint/types/query.pb.gw.go index 597c55248..e9257d333 100644 --- a/modules/mint/types/query.pb.gw.go +++ b/modules/mint/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: mint/query.proto +// source: irishub/mint/query.proto /* Package types is a reverse proxy. @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -52,12 +54,14 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -65,6 +69,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -140,7 +145,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"irishub", "mint", "params"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"irishub", "mint", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/proto/buf.gen.gogo.yaml b/proto/buf.gen.gogo.yaml new file mode 100644 index 000000000..855ea251a --- /dev/null +++ b/proto/buf.gen.gogo.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - name: gocosmos + out: .. + opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types + - name: grpc-gateway + out: .. + opt: logtostderr=true,allow_colon_final_segments=true \ No newline at end of file diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml new file mode 100644 index 000000000..ae4fcb5d6 --- /dev/null +++ b/proto/buf.gen.pulsar.yaml @@ -0,0 +1,18 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: cosmossdk.io/api + except: + - buf.build/googleapis/googleapis + - buf.build/cosmos/gogo-proto + - buf.build/cosmos/cosmos-proto + override: + buf.build/irisnet/irishub: github.com/irisnet/irishub/api +plugins: + - name: go-pulsar + out: ../api + opt: paths=source_relative + - name: go-grpc + out: ../api + opt: paths=source_relative diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 000000000..7c5bd180f --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,23 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 1935555c206d4afb9e94615dfd0fad31 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 7ea623782a4d4f11b35627913a7bc481 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 34d970b699f84aa382f3c29773a60836 + - remote: buf.build + owner: cosmos + repository: ics23 + commit: 55085f7c710a45f58fa09947208eb70b + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 8d7204855ec14631a499bd7393ce1970 diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 000000000..e58791be7 --- /dev/null +++ b/proto/buf.yaml @@ -0,0 +1,25 @@ +version: v1 +name: buf.build/irisnet/irishub +deps: + # TODO: update sdk buf dependency when v0.47.0 is tagged and pushed to BSR + # see: (https://github.com/cosmos/cosmos-sdk/tree/main/proto#sdk-x-buf) + - buf.build/cosmos/cosmos-sdk:7ea623782a4d4f11b35627913a7bc481 + - buf.build/cosmos/cosmos-proto:1935555c206d4afb9e94615dfd0fad31 + - buf.build/cosmos/gogo-proto:a14993478f40695898ed8a86931094b6656e8a5d + - buf.build/googleapis/googleapis:8d7204855ec14631a499bd7393ce1970 + - buf.build/cosmos/ics23:b1abd8678aab07165efd453c96796a179eb3131f +breaking: + use: + - FILE +lint: + use: + - DEFAULT + - COMMENTS + - FILE_LOWER_SNAKE_CASE + except: + - UNARY_RPC + - COMMENT_FIELD + - SERVICE_SUFFIX + - PACKAGE_VERSION_SUFFIX + - RPC_REQUEST_STANDARD_NAME + - ENUM_ZERO_VALUE_SUFFIX \ No newline at end of file diff --git a/proto/guardian/genesis.proto b/proto/irishub/guardian/genesis.proto similarity index 87% rename from proto/guardian/genesis.proto rename to proto/irishub/guardian/genesis.proto index fb1746ab2..0b15915a2 100644 --- a/proto/guardian/genesis.proto +++ b/proto/irishub/guardian/genesis.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package irishub.guardian; -import "guardian/guardian.proto"; +import "irishub/guardian/guardian.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irishub/modules/guardian/types"; diff --git a/proto/guardian/guardian.proto b/proto/irishub/guardian/guardian.proto similarity index 100% rename from proto/guardian/guardian.proto rename to proto/irishub/guardian/guardian.proto diff --git a/proto/guardian/query.proto b/proto/irishub/guardian/query.proto similarity index 95% rename from proto/guardian/query.proto rename to proto/irishub/guardian/query.proto index b98fe2645..be1da4af0 100644 --- a/proto/guardian/query.proto +++ b/proto/irishub/guardian/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package irishub.guardian; import "gogoproto/gogo.proto"; -import "guardian/guardian.proto"; +import "irishub/guardian/guardian.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; diff --git a/proto/guardian/tx.proto b/proto/irishub/guardian/tx.proto similarity index 100% rename from proto/guardian/tx.proto rename to proto/irishub/guardian/tx.proto diff --git a/proto/mint/genesis.proto b/proto/irishub/mint/genesis.proto similarity index 90% rename from proto/mint/genesis.proto rename to proto/irishub/mint/genesis.proto index a1a6daefa..2064a6147 100644 --- a/proto/mint/genesis.proto +++ b/proto/irishub/mint/genesis.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package irishub.mint; -import "mint/mint.proto"; +import "irishub/mint/mint.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/irisnet/irishub/modules/mint/types"; diff --git a/proto/mint/mint.proto b/proto/irishub/mint/mint.proto similarity index 100% rename from proto/mint/mint.proto rename to proto/irishub/mint/mint.proto diff --git a/proto/mint/query.proto b/proto/irishub/mint/query.proto similarity index 95% rename from proto/mint/query.proto rename to proto/irishub/mint/query.proto index b71beb9e3..0192961b7 100644 --- a/proto/mint/query.proto +++ b/proto/irishub/mint/query.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package irishub.mint; import "cosmos/base/query/v1beta1/pagination.proto"; -import "mint/mint.proto"; +import "irishub/mint/mint.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; diff --git a/scripts/protoc-swagger-gen-ibc.sh b/scripts/protoc-swagger-gen-ibc.sh index 766823b2f..f89d6b815 100755 --- a/scripts/protoc-swagger-gen-ibc.sh +++ b/scripts/protoc-swagger-gen-ibc.sh @@ -1,9 +1,9 @@ -IBC_GO=v5.2.0 +IBC_GO=v7.2.0 -go mod download github.com/cosmos/ibc-go/v5@${IBC_GO} +go mod download github.com/cosmos/ibc-go/v7@${IBC_GO} -IBC_PATH=${GOPATH}/pkg/mod/github.com/cosmos/ibc-go/v5@${IBC_GO} +IBC_PATH=${GOPATH}/pkg/mod/github.com/cosmos/ibc-go/v7@${IBC_GO} proto_dirs=$(find ${IBC_PATH}/proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 69cae0615..67c2897b8 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -2,24 +2,22 @@ set -eo pipefail -proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +echo "Generating gogo proto code" +cd proto +proto_dirs=$(find ./irishub -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do - protoc \ - -I "proto" \ - -I "third_party/proto" \ - --gocosmos_out=plugins=interfacetype+grpc,\ -Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - - # command to generate gRPC gateway (*.pb.gw.go in respective modules) files - protoc \ - -I "proto" \ - -I "third_party/proto" \ - --grpc-gateway_out=logtostderr=true:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - + for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do + # this regex checks if a proto file has its go_package set to cosmossdk.io/api/... + # gogo proto files SHOULD ONLY be generated if this is false + # we don't want gogo proto to run for proto files which are natively built for google.golang.org/protobuf + # if grep -q "option go_package" "$file" && grep -H -o -c 'option go_package.*cosmossdk.io/api' "$file" | grep -q ':0$'; then + buf generate --template buf.gen.gogo.yaml $file + # fi + done done +cd .. + # move proto files to the right places cp -r github.com/irisnet/irishub/* ./ rm -rf github.com diff --git a/server/start.go b/server/start.go index 2dd1ad86f..f89c2c88b 100644 --- a/server/start.go +++ b/server/start.go @@ -2,6 +2,7 @@ package server import ( "context" + "errors" "fmt" "io" "net" @@ -20,31 +21,28 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - abciserver "github.com/tendermint/tendermint/abci/server" - tcmd "github.com/tendermint/tendermint/cmd/tendermint/commands" - tmos "github.com/tendermint/tendermint/libs/os" - "github.com/tendermint/tendermint/node" - "github.com/tendermint/tendermint/p2p" - pvm "github.com/tendermint/tendermint/privval" - "github.com/tendermint/tendermint/proxy" - "github.com/tendermint/tendermint/rpc/client/local" - dbm "github.com/tendermint/tm-db" - - "github.com/cosmos/cosmos-sdk/server/rosetta" - crgserver "github.com/cosmos/cosmos-sdk/server/rosetta/lib/server" + dbm "github.com/cometbft/cometbft-db" + abciserver "github.com/cometbft/cometbft/abci/server" + tcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" + tmos "github.com/cometbft/cometbft/libs/os" + "github.com/cometbft/cometbft/node" + "github.com/cometbft/cometbft/p2p" + pvm "github.com/cometbft/cometbft/privval" + "github.com/cometbft/cometbft/proxy" + rpcclient "github.com/cometbft/cometbft/rpc/client" + "github.com/cometbft/cometbft/rpc/client/local" ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" "github.com/cosmos/cosmos-sdk/server/types" - sdk "github.com/cosmos/cosmos-sdk/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/evmos/ethermint/indexer" ethdebug "github.com/evmos/ethermint/rpc/namespaces/ethereum/debug" @@ -134,55 +132,108 @@ which accepts a path for the resulting pprof file. } cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") - cmd.Flags().Bool(srvflags.WithTendermint, true, "Run abci app embedded in-process with tendermint") + cmd.Flags(). + Bool(srvflags.WithTendermint, true, "Run abci app embedded in-process with tendermint") cmd.Flags().String(srvflags.Address, "tcp://0.0.0.0:26658", "Listen address") cmd.Flags().String(srvflags.Transport, "socket", "Transport protocol: socket, grpc") cmd.Flags().String(srvflags.TraceStore, "", "Enable KVStore tracing to an output file") - cmd.Flags().String(server.FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 0.01photon;0.0001stake)") //nolint:lll - cmd.Flags().IntSlice(server.FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary") - cmd.Flags().Uint64(server.FlagHaltHeight, 0, "Block height at which to gracefully halt the chain and shutdown the node") - cmd.Flags().Uint64(server.FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node") + cmd.Flags(). + String(server.FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 0.01photon;0.0001stake)") + + //nolint:lll + cmd.Flags(). + IntSlice(server.FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary") + cmd.Flags(). + Uint64(server.FlagHaltHeight, 0, "Block height at which to gracefully halt the chain and shutdown the node") + cmd.Flags(). + Uint64(server.FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node") cmd.Flags().Bool(server.FlagInterBlockCache, true, "Enable inter-block caching") - cmd.Flags().String(srvflags.CPUProfile, "", "Enable CPU profiling and write to the provided file") + cmd.Flags(). + String(srvflags.CPUProfile, "", "Enable CPU profiling and write to the provided file") cmd.Flags().Bool(server.FlagTrace, false, "Provide full stack traces for errors in ABCI Log") - cmd.Flags().String(server.FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") - cmd.Flags().Uint64(server.FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") - cmd.Flags().Uint64(server.FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") //nolint:lll + cmd.Flags(). + String(server.FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") + cmd.Flags(). + Uint64(server.FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") + cmd.Flags(). + Uint64(server.FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") + + //nolint:lll cmd.Flags().Uint(server.FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") - cmd.Flags().Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks") - cmd.Flags().String(srvflags.AppDBBackend, "", "The type of database for application and snapshots databases") + cmd.Flags(). + Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks") + cmd.Flags(). + String(srvflags.AppDBBackend, "", "The type of database for application and snapshots databases") - cmd.Flags().Bool(srvflags.GRPCOnly, false, "Start the node in gRPC query only mode without Tendermint process") + cmd.Flags(). + Bool(srvflags.GRPCOnly, false, "Start the node in gRPC query only mode without Tendermint process") cmd.Flags().Bool(srvflags.GRPCEnable, true, "Define if the gRPC server should be enabled") - cmd.Flags().String(srvflags.GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") - cmd.Flags().Bool(srvflags.GRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)") - cmd.Flags().String(srvflags.GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on") - - cmd.Flags().Bool(srvflags.RPCEnable, false, "Defines if Cosmos-sdk REST server should be enabled") - cmd.Flags().Bool(srvflags.EnabledUnsafeCors, false, "Defines if CORS should be enabled (unsafe - use it at your own risk)") - - cmd.Flags().Bool(srvflags.JSONRPCEnable, true, "Define if the JSON-RPC server should be enabled") - cmd.Flags().StringSlice(srvflags.JSONRPCAPI, config.GetDefaultAPINamespaces(), "Defines a list of JSON-RPC namespaces that should be enabled") - cmd.Flags().String(srvflags.JSONRPCAddress, config.DefaultJSONRPCAddress, "the JSON-RPC server address to listen on") - cmd.Flags().String(srvflags.JSONWsAddress, config.DefaultJSONRPCWsAddress, "the JSON-RPC WS server address to listen on") - cmd.Flags().Uint64(srvflags.JSONRPCGasCap, config.DefaultGasCap, "Sets a cap on gas that can be used in eth_call/estimateGas unit is aphoton (0=infinite)") //nolint:lll - cmd.Flags().Float64(srvflags.JSONRPCTxFeeCap, config.DefaultTxFeeCap, "Sets a cap on transaction fee that can be sent via the RPC APIs (1 = default 1 photon)") //nolint:lll - cmd.Flags().Int32(srvflags.JSONRPCFilterCap, config.DefaultFilterCap, "Sets the global cap for total number of filters that can be created") - cmd.Flags().Duration(srvflags.JSONRPCEVMTimeout, config.DefaultEVMTimeout, "Sets a timeout used for eth_call (0=infinite)") - cmd.Flags().Duration(srvflags.JSONRPCHTTPTimeout, config.DefaultHTTPTimeout, "Sets a read/write timeout for json-rpc http server (0=infinite)") - cmd.Flags().Duration(srvflags.JSONRPCHTTPIdleTimeout, config.DefaultHTTPIdleTimeout, "Sets a idle timeout for json-rpc http server (0=infinite)") - cmd.Flags().Bool(srvflags.JSONRPCAllowUnprotectedTxs, config.DefaultAllowUnprotectedTxs, "Allow for unprotected (non EIP155 signed) transactions to be submitted via the node's RPC when the global parameter is disabled") //nolint:lll - cmd.Flags().Int32(srvflags.JSONRPCLogsCap, config.DefaultLogsCap, "Sets the max number of results can be returned from single `eth_getLogs` query") - cmd.Flags().Int32(srvflags.JSONRPCBlockRangeCap, config.DefaultBlockRangeCap, "Sets the max block range allowed for `eth_getLogs` query") - cmd.Flags().Int(srvflags.JSONRPCMaxOpenConnections, config.DefaultMaxOpenConnections, "Sets the maximum number of simultaneous connections for the server listener") //nolint:lll - cmd.Flags().Bool(srvflags.JSONRPCEnableIndexer, false, "Enable the custom tx indexer for json-rpc") - cmd.Flags().Bool(srvflags.JSONRPCEnableMetrics, false, "Define if EVM rpc metrics server should be enabled") - - cmd.Flags().String(srvflags.EVMTracer, config.DefaultEVMTracer, "the EVM tracer type to collect execution traces from the EVM transaction execution (json|struct|access_list|markdown)") //nolint:lll - cmd.Flags().Uint64(srvflags.EVMMaxTxGasWanted, config.DefaultMaxTxGasWanted, "the gas wanted for each eth tx returned in ante handler in check tx mode") //nolint:lll - - cmd.Flags().String(srvflags.TLSCertPath, "", "the cert.pem file path for the server TLS configuration") - cmd.Flags().String(srvflags.TLSKeyPath, "", "the key.pem file path for the server TLS configuration") + cmd.Flags(). + String(srvflags.GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") + cmd.Flags(). + Bool(srvflags.GRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)") + cmd.Flags(). + String(srvflags.GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on") + + cmd.Flags(). + Bool(srvflags.RPCEnable, false, "Defines if Cosmos-sdk REST server should be enabled") + cmd.Flags(). + Bool(srvflags.EnabledUnsafeCors, false, "Defines if CORS should be enabled (unsafe - use it at your own risk)") + + cmd.Flags(). + Bool(srvflags.JSONRPCEnable, true, "Define if the JSON-RPC server should be enabled") + cmd.Flags(). + StringSlice(srvflags.JSONRPCAPI, config.GetDefaultAPINamespaces(), "Defines a list of JSON-RPC namespaces that should be enabled") + cmd.Flags(). + String(srvflags.JSONRPCAddress, config.DefaultJSONRPCAddress, "the JSON-RPC server address to listen on") + cmd.Flags(). + String(srvflags.JSONWsAddress, config.DefaultJSONRPCWsAddress, "the JSON-RPC WS server address to listen on") + cmd.Flags(). + Uint64(srvflags.JSONRPCGasCap, config.DefaultGasCap, "Sets a cap on gas that can be used in eth_call/estimateGas unit is aphoton (0=infinite)") + + //nolint:lll + cmd.Flags(). + Float64(srvflags.JSONRPCTxFeeCap, config.DefaultTxFeeCap, "Sets a cap on transaction fee that can be sent via the RPC APIs (1 = default 1 photon)") + + //nolint:lll + cmd.Flags(). + Int32(srvflags.JSONRPCFilterCap, config.DefaultFilterCap, "Sets the global cap for total number of filters that can be created") + cmd.Flags(). + Duration(srvflags.JSONRPCEVMTimeout, config.DefaultEVMTimeout, "Sets a timeout used for eth_call (0=infinite)") + cmd.Flags(). + Duration(srvflags.JSONRPCHTTPTimeout, config.DefaultHTTPTimeout, "Sets a read/write timeout for json-rpc http server (0=infinite)") + cmd.Flags(). + Duration(srvflags.JSONRPCHTTPIdleTimeout, config.DefaultHTTPIdleTimeout, "Sets a idle timeout for json-rpc http server (0=infinite)") + cmd.Flags(). + Bool(srvflags.JSONRPCAllowUnprotectedTxs, config.DefaultAllowUnprotectedTxs, "Allow for unprotected (non EIP155 signed) transactions to be submitted via the node's RPC when the global parameter is disabled") + + //nolint:lll + cmd.Flags(). + Int32(srvflags.JSONRPCLogsCap, config.DefaultLogsCap, "Sets the max number of results can be returned from single `eth_getLogs` query") + cmd.Flags(). + Int32(srvflags.JSONRPCBlockRangeCap, config.DefaultBlockRangeCap, "Sets the max block range allowed for `eth_getLogs` query") + cmd.Flags(). + Int(srvflags.JSONRPCMaxOpenConnections, config.DefaultMaxOpenConnections, "Sets the maximum number of simultaneous connections for the server listener") + + //nolint:lll + cmd.Flags(). + Bool(srvflags.JSONRPCEnableIndexer, false, "Enable the custom tx indexer for json-rpc") + cmd.Flags(). + Bool(srvflags.JSONRPCEnableMetrics, false, "Define if EVM rpc metrics server should be enabled") + + cmd.Flags(). + String(srvflags.EVMTracer, config.DefaultEVMTracer, "the EVM tracer type to collect execution traces from the EVM transaction execution (json|struct|access_list|markdown)") + + //nolint:lll + cmd.Flags(). + Uint64(srvflags.EVMMaxTxGasWanted, config.DefaultMaxTxGasWanted, "the gas wanted for each eth tx returned in ante handler in check tx mode") + + //nolint:lll + + cmd.Flags(). + String(srvflags.TLSCertPath, "", "the cert.pem file path for the server TLS configuration") + cmd.Flags(). + String(srvflags.TLSKeyPath, "", "the key.pem file path for the server TLS configuration") cmd.Flags().Uint64(server.FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") cmd.Flags().Uint32(server.FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") @@ -254,7 +305,11 @@ func startStandAlone(ctx *server.Context, appCreator types.AppCreator) error { } // legacyAminoCdc is used for the legacy REST API -func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator types.AppCreator) (err error) { +func startInProcess( + ctx *server.Context, + clientCtx client.Context, + appCreator types.AppCreator, +) (err error) { cfg := ctx.Config home := cfg.RootDir logger := ctx.Logger @@ -262,7 +317,11 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty if cpuProfile := ctx.Viper.GetString(srvflags.CPUProfile); cpuProfile != "" { fp, err := ethdebug.ExpandHome(cpuProfile) if err != nil { - ctx.Logger.Debug("failed to get filepath for the CPU profile file", "error", err.Error()) + ctx.Logger.Debug( + "failed to get filepath for the CPU profile file", + "error", + err.Error(), + ) return err } @@ -367,15 +426,13 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty // Add the tx service to the gRPC router. We only need to register this // service if API or gRPC or JSONRPC is enabled, and avoid doing so in the general // case, because it spawns a new local tendermint RPC client. - if (config.API.Enable || config.GRPC.Enable || config.JSONRPC.Enable || config.JSONRPC.EnableIndexer) && tmNode != nil { + if (config.API.Enable || config.GRPC.Enable || config.JSONRPC.Enable || config.JSONRPC.EnableIndexer) && + tmNode != nil { clientCtx = clientCtx.WithClient(local.New(tmNode)) app.RegisterTxService(clientCtx) app.RegisterTendermintService(clientCtx) - - if a, ok := app.(types.ApplicationQueryService); ok { - a.RegisterNodeService(clientCtx) - } + app.RegisterNodeService(clientCtx) } metrics, err := startTelemetry(config) @@ -399,7 +456,14 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty idxLogger := ctx.Logger.With("indexer", "evm") idxer = indexer.NewKVIndexer(idxDB, idxLogger, clientCtx) - indexerService := ethermintserver.NewEVMIndexerService(idxer, clientCtx.Client) + client, ok := clientCtx.Client.(rpcclient.Client) + if !ok { + return errors.New("clientCtx.Client not implements rpcclient.Client") + } + indexerService := ethermintserver.NewEVMIndexerService( + idxer, + client, + ) indexerService.SetLogger(idxLogger) errCh := make(chan error) @@ -531,7 +595,14 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty tmEndpoint := "/websocket" tmRPCAddr := cfg.RPC.ListenAddress - httpSrv, httpSrvDone, err = ethermintserver.StartJSONRPC(ctx, clientCtx, tmRPCAddr, tmEndpoint, &config, idxer) + httpSrv, httpSrvDone, err = ethermintserver.StartJSONRPC( + ctx, + clientCtx, + tmRPCAddr, + tmEndpoint, + &config, + idxer, + ) if err != nil { return err } @@ -557,55 +628,55 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty return server.WaitForQuitSignals() } - var rosettaSrv crgserver.Server - if config.Rosetta.Enable { - offlineMode := config.Rosetta.Offline - - // If GRPC is not enabled rosetta cannot work in online mode, so it works in - // offline mode. - if !config.GRPC.Enable { - offlineMode = true - } - - minGasPrices, err := sdk.ParseDecCoins(config.MinGasPrices) - if err != nil { - ctx.Logger.Error("failed to parse minimum-gas-prices", "error", err.Error()) - return err - } - - conf := &rosetta.Config{ - Blockchain: config.Rosetta.Blockchain, - Network: config.Rosetta.Network, - TendermintRPC: ctx.Config.RPC.ListenAddress, - GRPCEndpoint: config.GRPC.Address, - Addr: config.Rosetta.Address, - Retries: config.Rosetta.Retries, - Offline: offlineMode, - GasToSuggest: config.Rosetta.GasToSuggest, - EnableFeeSuggestion: config.Rosetta.EnableFeeSuggestion, - GasPrices: minGasPrices.Sort(), - Codec: clientCtx.Codec.(*codec.ProtoCodec), - InterfaceRegistry: clientCtx.InterfaceRegistry, - } - - rosettaSrv, err = rosetta.ServerFromConfig(conf) - if err != nil { - return err - } - - errCh := make(chan error) - go func() { - if err := rosettaSrv.Start(); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } - } + // var rosettaSrv crgserver.Server + // if config.Rosetta.Enable { + // offlineMode := config.Rosetta.Offline + + // // If GRPC is not enabled rosetta cannot work in online mode, so it works in + // // offline mode. + // if !config.GRPC.Enable { + // offlineMode = true + // } + + // minGasPrices, err := sdk.ParseDecCoins(config.MinGasPrices) + // if err != nil { + // ctx.Logger.Error("failed to parse minimum-gas-prices", "error", err.Error()) + // return err + // } + + // conf := &rosetta.Config{ + // Blockchain: config.Rosetta.Blockchain, + // Network: config.Rosetta.Network, + // TendermintRPC: ctx.Config.RPC.ListenAddress, + // GRPCEndpoint: config.GRPC.Address, + // Addr: config.Rosetta.Address, + // Retries: config.Rosetta.Retries, + // Offline: offlineMode, + // GasToSuggest: config.Rosetta.GasToSuggest, + // EnableFeeSuggestion: config.Rosetta.EnableFeeSuggestion, + // GasPrices: minGasPrices.Sort(), + // Codec: clientCtx.Codec.(*codec.ProtoCodec), + // InterfaceRegistry: clientCtx.InterfaceRegistry, + // } + + // rosettaSrv, err = rosetta.ServerFromConfig(conf) + // if err != nil { + // return err + // } + + // errCh := make(chan error) + // go func() { + // if err := rosettaSrv.Start(); err != nil { + // errCh <- err + // } + // }() + + // select { + // case err := <-errCh: + // return err + // case <-time.After(types.ServerStartTime): // assume server started successfully + // } + // } // Wait for SIGINT or SIGTERM signal return server.WaitForQuitSignals() } diff --git a/server/utils.go b/server/utils.go index 5ba7d75ab..061078951 100644 --- a/server/utils.go +++ b/server/utils.go @@ -15,9 +15,9 @@ import ( "github.com/cosmos/cosmos-sdk/server/types" "github.com/cosmos/cosmos-sdk/version" - tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands" - tmlog "github.com/tendermint/tendermint/libs/log" - rpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" + tmcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" + tmlog "github.com/cometbft/cometbft/libs/log" + rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" ethermintserver "github.com/evmos/ethermint/server" ) diff --git a/simapp/app.go b/simapp/app.go index c50d630d4..eb5336c33 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -1,26 +1,28 @@ package simapp import ( + "encoding/json" "io" "os" "path/filepath" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto" - tmjson "github.com/tendermint/tendermint/libs/json" - "github.com/tendermint/tendermint/libs/log" - tmos "github.com/tendermint/tendermint/libs/os" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto" + tmjson "github.com/cometbft/cometbft/libs/json" + "github.com/cometbft/cometbft/libs/log" + tmos "github.com/cometbft/cometbft/libs/os" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/store/streaming" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -39,80 +41,32 @@ import ( "github.com/cosmos/cosmos-sdk/x/capability" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + "github.com/cosmos/cosmos-sdk/x/consensus" + consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" "github.com/cosmos/cosmos-sdk/x/crisis" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distr "github.com/cosmos/cosmos-sdk/x/distribution" - distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/cosmos/cosmos-sdk/x/gov" - govclient "github.com/cosmos/cosmos-sdk/x/gov/client" - govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/params" - paramsclient "github.com/cosmos/cosmos-sdk/x/params/client" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" "github.com/cosmos/cosmos-sdk/x/slashing" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/cosmos-sdk/x/upgrade" - upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" - upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/cosmos/ibc-go/v5/modules/apps/transfer" - ibctransferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v5/modules/core" - ibcclient "github.com/cosmos/ibc-go/v5/modules/core/02-client" - ibcclientclient "github.com/cosmos/ibc-go/v5/modules/core/02-client/client" - ibcclienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" - - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" - "github.com/irisnet/irismod/modules/coinswap" - coinswapkeeper "github.com/irisnet/irismod/modules/coinswap/keeper" - coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" - "github.com/irisnet/irismod/modules/htlc" - htlckeeper "github.com/irisnet/irismod/modules/htlc/keeper" - htlctypes "github.com/irisnet/irismod/modules/htlc/types" - "github.com/irisnet/irismod/modules/mt" - mtkeeper "github.com/irisnet/irismod/modules/mt/keeper" - mttypes "github.com/irisnet/irismod/modules/mt/types" - nftkeeper "github.com/irisnet/irismod/modules/nft/keeper" - nftmodule "github.com/irisnet/irismod/modules/nft/module" - nfttypes "github.com/irisnet/irismod/modules/nft/types" - "github.com/irisnet/irismod/modules/oracle" - oraclekeeper "github.com/irisnet/irismod/modules/oracle/keeper" - oracletypes "github.com/irisnet/irismod/modules/oracle/types" - "github.com/irisnet/irismod/modules/random" - randomkeeper "github.com/irisnet/irismod/modules/random/keeper" - randomtypes "github.com/irisnet/irismod/modules/random/types" - "github.com/irisnet/irismod/modules/record" - recordkeeper "github.com/irisnet/irismod/modules/record/keeper" - recordtypes "github.com/irisnet/irismod/modules/record/types" - "github.com/irisnet/irismod/modules/service" - servicekeeper "github.com/irisnet/irismod/modules/service/keeper" - servicetypes "github.com/irisnet/irismod/modules/service/types" - - tokenkeeper "github.com/irisnet/irismod/modules/token/keeper" + "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + + simappparams "cosmossdk.io/simapp/params" + tokentypes "github.com/irisnet/irismod/modules/token/types" tokenv1 "github.com/irisnet/irismod/modules/token/types/v1" @@ -125,22 +79,8 @@ import ( mintkeeper "github.com/irisnet/irishub/modules/mint/keeper" minttypes "github.com/irisnet/irishub/modules/mint/types" - "github.com/irisnet/irismod/modules/farm" - farmkeeper "github.com/irisnet/irismod/modules/farm/keeper" - farmtypes "github.com/irisnet/irismod/modules/farm/types" - "github.com/irisnet/irismod/modules/token" - tibcmttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer" - tibcmttransferkeeper "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/keeper" - tibcmttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/types" tibcnfttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer" - tibcnfttransferkeeper "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/keeper" - tibcnfttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" - tibc "github.com/bianjieai/tibc-go/modules/tibc/core" - tibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" - tibcroutingtypes "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/types" - tibccli "github.com/bianjieai/tibc-go/modules/tibc/core/client/cli" - tibckeeper "github.com/bianjieai/tibc-go/modules/tibc/core/keeper" ) const appName = "SimApp" @@ -154,54 +94,24 @@ var ( // overwite sdk reDnmString reDnmString = `[a-zA-Z][a-zA-Z0-9/-]{2,127}` - legacyProposalHandlers = []govclient.ProposalHandler{ - paramsclient.ProposalHandler, - distrclient.ProposalHandler, - upgradeclient.LegacyProposalHandler, - upgradeclient.LegacyCancelProposalHandler, - ibcclientclient.UpdateClientProposalHandler, - ibcclientclient.UpgradeProposalHandler, - } - // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, - //authzmodule.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, - mint.AppModuleBasic{}, distr.AppModuleBasic{}, - gov.NewAppModuleBasic( - append(legacyProposalHandlers, tibccli.GovHandlers...), - ), params.AppModuleBasic{}, - crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, - ibc.AppModuleBasic{}, - upgrade.AppModuleBasic{}, - evidence.AppModuleBasic{}, - transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, - feegrantmodule.AppModuleBasic{}, + consensus.AppModuleBasic{}, + crisis.AppModuleBasic{}, guardian.AppModuleBasic{}, - token.AppModuleBasic{}, - record.AppModuleBasic{}, - nftmodule.AppModuleBasic{}, - htlc.AppModuleBasic{}, - coinswap.AppModuleBasic{}, - service.AppModuleBasic{}, - oracle.AppModuleBasic{}, - random.AppModuleBasic{}, - farm.AppModuleBasic{}, - tibc.AppModuleBasic{}, - tibcnfttransfer.AppModuleBasic{}, - tibcmttransfer.AppModuleBasic{}, - mt.AppModuleBasic{}, + mint.AppModuleBasic{}, ) // module account permissions @@ -211,27 +121,13 @@ var ( minttypes.ModuleName: {authtypes.Minter}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - govtypes.ModuleName: {authtypes.Burner}, - ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - tokentypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - htlctypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - coinswaptypes.ModuleName: {authtypes.Minter, authtypes.Burner}, - servicetypes.DepositAccName: {authtypes.Burner}, - servicetypes.RequestAccName: nil, - servicetypes.FeeCollectorName: {authtypes.Burner}, - farmtypes.ModuleName: {authtypes.Burner}, - farmtypes.RewardCollector: nil, - farmtypes.EscrowCollector: nil, - tibcnfttypes.ModuleName: nil, - tibcmttypes.ModuleName: nil, - nfttypes.ModuleName: nil, } nativeToken tokenv1.Token ) var ( - _ simapp.App = (*SimApp)(nil) + _ runtime.AppI = (*SimApp)(nil) _ servertypes.Application = (*SimApp)(nil) ) @@ -243,6 +139,8 @@ type SimApp struct { legacyAmino *codec.LegacyAmino appCodec codec.Codec interfaceRegistry types.InterfaceRegistry + configurator module.Configurator + txConfig client.TxConfig invCheckPeriod uint @@ -251,51 +149,29 @@ type SimApp struct { tkeys map[string]*storetypes.TransientStoreKey memKeys map[string]*storetypes.MemoryStoreKey - // keepers - FeeGrantKeeper feegrantkeeper.Keeper - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - - // make scoped keepers public for test purposes - scopedIBCKeeper capabilitykeeper.ScopedKeeper - scopedTransferKeeper capabilitykeeper.ScopedKeeper - scopedIBCMockKeeper capabilitykeeper.ScopedKeeper - // tibc - scopedTIBCKeeper capabilitykeeper.ScopedKeeper - scopedTIBCMockKeeper capabilitykeeper.ScopedKeeper - - GuardianKeeper guardiankeeper.Keeper - TokenKeeper tokenkeeper.Keeper - RecordKeeper recordkeeper.Keeper - NFTKeeper nftkeeper.Keeper - MTKeeper mtkeeper.Keeper - HTLCKeeper htlckeeper.Keeper - CoinswapKeeper coinswapkeeper.Keeper - ServiceKeeper servicekeeper.Keeper - OracleKeeper oraclekeeper.Keeper - RandomKeeper randomkeeper.Keeper - FarmKeeper farmkeeper.Keeper - TIBCKeeper *tibckeeper.Keeper - NFTTransferKeeper tibcnfttransferkeeper.Keeper - MTTransferKeeper tibcmttransferkeeper.Keeper + // cosmos + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + CapabilityKeeper *capabilitykeeper.Keeper + StakingKeeper *stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + CrisisKeeper *crisiskeeper.Keeper + DistrKeeper distrkeeper.Keeper + ParamsKeeper paramskeeper.Keeper + ConsensusParamsKeeper consensuskeeper.Keeper + + GuardianKeeper guardiankeeper.Keeper + MintKeeper mintkeeper.Keeper // the module manager mm *module.Manager // simulation manager sm *module.SimulationManager + + transferModule transfer.AppModule + nfttransferModule tibcnfttransfer.AppModule + mttransferModule tibcmttransfer.AppModule } func init() { @@ -363,26 +239,35 @@ func NewSimApp( legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry - bApp := baseapp.NewBaseApp(appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) + bApp := baseapp.NewBaseApp( + appName, + logger, + db, + encodingConfig.TxConfig.TxDecoder(), + baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) keys := sdk.NewKVStoreKeys( - authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, - minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, - govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, - evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey, - guardiantypes.StoreKey, tokentypes.StoreKey, nfttypes.StoreKey, htlctypes.StoreKey, recordtypes.StoreKey, - coinswaptypes.StoreKey, servicetypes.StoreKey, oracletypes.StoreKey, randomtypes.StoreKey, - farmtypes.StoreKey, feegrant.StoreKey, tibchost.StoreKey, tibcnfttypes.StoreKey, tibcmttypes.StoreKey, mttypes.StoreKey, + authtypes.StoreKey, + banktypes.StoreKey, + stakingtypes.StoreKey, + distrtypes.StoreKey, + slashingtypes.StoreKey, + crisistypes.StoreKey, + consensustypes.StoreKey, + paramstypes.StoreKey, + capabilitytypes.StoreKey, + guardiantypes.StoreKey, + minttypes.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) // configure state listening capabilities using AppOptions // we are doing nothing with the returned streamingServices and waitGroup in this case - if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, keys); err != nil { + if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, logger, keys); err != nil { tmos.Exit(err.Error()) } @@ -395,44 +280,54 @@ func NewSimApp( keys: keys, tkeys: tkeys, memKeys: memKeys, + txConfig: encodingConfig.TxConfig, } - app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) - // set the BaseApp's parameter store - bApp.SetParamStore( - app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()), + app.ParamsKeeper = initParamsKeeper( + appCodec, + legacyAmino, + keys[paramstypes.StoreKey], + tkeys[paramstypes.TStoreKey], ) + app.ConsensusParamsKeeper = consensuskeeper.NewKeeper( + appCodec, + keys[consensustypes.StoreKey], + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + // set the BaseApp's parameter store + bApp.SetParamStore(&app.ConsensusParamsKeeper) + // add capability keeper and ScopeToModule for ibc module - app.CapabilityKeeper = capabilitykeeper.NewKeeper(appCodec, keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey]) - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) - scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) + app.CapabilityKeeper = capabilitykeeper.NewKeeper( + appCodec, + keys[capabilitytypes.StoreKey], + memKeys[capabilitytypes.MemStoreKey], + ) app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, keys[authtypes.StoreKey], - app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, - sdk.Bech32MainPrefix, - ) - - app.FeeGrantKeeper = feegrantkeeper.NewKeeper( - appCodec, - keys[feegrant.StoreKey], - app.AccountKeeper, + address.Bech32PrefixAccAddr, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, keys[banktypes.StoreKey], app.AccountKeeper, - app.GetSubspace(banktypes.ModuleName), app.BlockedModuleAccountAddrs(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - stakingKeeper := stakingkeeper.NewKeeper( - appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName), + app.StakingKeeper = stakingkeeper.NewKeeper( + appCodec, + keys[stakingtypes.StoreKey], + app.AccountKeeper, + app.BankKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.MintKeeper = mintkeeper.NewKeeper( @@ -447,229 +342,41 @@ func NewSimApp( app.DistrKeeper = distrkeeper.NewKeeper( appCodec, keys[distrtypes.StoreKey], - app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, + app.StakingKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, + legacyAmino, keys[slashingtypes.StoreKey], - &stakingKeeper, - app.GetSubspace(slashingtypes.ModuleName), + app.StakingKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), + appCodec, + keys[crisistypes.StoreKey], invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = *stakingKeeper.SetHooks( + app.StakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) - // set the governance module account as the authority for conducting upgrades - // UpgradeKeeper must be created before IBCKeeper - app.UpgradeKeeper = upgradekeeper.NewKeeper( - skipUpgradeHeights, - keys[upgradetypes.StoreKey], - appCodec, - homePath, - app.BaseApp, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - - scopedTIBCKeeper := app.CapabilityKeeper.ScopeToModule(tibchost.ModuleName) - // UpgradeKeeper must be created before IBCKeeper - app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, - keys[ibchost.StoreKey], - app.GetSubspace(ibchost.ModuleName), - app.StakingKeeper, - app.UpgradeKeeper, - scopedIBCKeeper, - ) - - // register the proposal types - app.TIBCKeeper = tibckeeper.NewKeeper( - appCodec, - keys[tibchost.StoreKey], - app.GetSubspace(tibchost.ModuleName), app.StakingKeeper, - ) - - app.NFTKeeper = nftkeeper.NewKeeper( - appCodec, - keys[nfttypes.StoreKey], - app.AccountKeeper, - app.BankKeeper, - ) - - app.NFTTransferKeeper = tibcnfttransferkeeper.NewKeeper( - appCodec, - keys[tibcnfttypes.StoreKey], - app.GetSubspace(tibcnfttypes.ModuleName), - app.AccountKeeper, - nftkeeper.NewLegacyKeeper(app.NFTKeeper), - app.TIBCKeeper.PacketKeeper, - app.TIBCKeeper.ClientKeeper, - ) - - app.MTKeeper = mtkeeper.NewKeeper( - appCodec, keys[mttypes.StoreKey], - ) - - app.MTTransferKeeper = tibcmttransferkeeper.NewKeeper( - appCodec, - keys[tibcnfttypes.StoreKey], - app.GetSubspace(tibcnfttypes.ModuleName), - app.AccountKeeper, app.MTKeeper, - app.TIBCKeeper.PacketKeeper, - app.TIBCKeeper.ClientKeeper, - ) - - app.TransferKeeper = ibctransferkeeper.NewKeeper( - appCodec, - keys[ibctransfertypes.StoreKey], - app.GetSubspace(ibctransfertypes.ModuleName), - app.IBCKeeper.ChannelKeeper, - app.IBCKeeper.ChannelKeeper, - &app.IBCKeeper.PortKeeper, - app.AccountKeeper, - app.BankKeeper, - scopedTransferKeeper, - ) - transferModule := transfer.NewAppModule(app.TransferKeeper) - transferIBCModule := transfer.NewIBCModule(app.TransferKeeper) - - // routerModule := router.NewAppModule(app.RouterKeeper, transferIBCModule) - // create static IBC router, add transfer route, then set and seal it - ibcRouter := porttypes.NewRouter() - ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule) - app.IBCKeeper.SetRouter(ibcRouter) - - nfttransferModule := tibcnfttransfer.NewAppModule(app.NFTTransferKeeper) - mttransferModule := tibcmttransfer.NewAppModule(app.MTTransferKeeper) - - tibcRouter := tibcroutingtypes.NewRouter() - tibcRouter.AddRoute(tibcnfttypes.ModuleName, nfttransferModule). - AddRoute(tibcmttypes.ModuleName, mttransferModule) - app.TIBCKeeper.SetRouter(tibcRouter) - - // create evidence keeper with router - evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, - keys[evidencetypes.StoreKey], - &app.StakingKeeper, - app.SlashingKeeper, - ) - // If evidence needs to be handled for the app, set routes in router here and seal - app.EvidenceKeeper = *evidenceKeeper - app.GuardianKeeper = guardiankeeper.NewKeeper( appCodec, keys[guardiantypes.StoreKey], ) - app.TokenKeeper = tokenkeeper.NewKeeper( - appCodec, - keys[tokentypes.StoreKey], - app.GetSubspace(tokentypes.ModuleName), - app.BankKeeper, - app.ModuleAccountAddrs(), - authtypes.FeeCollectorName, - ) - - app.RecordKeeper = recordkeeper.NewKeeper( - appCodec, - keys[recordtypes.StoreKey], - ) - - app.HTLCKeeper = htlckeeper.NewKeeper( - appCodec, keys[htlctypes.StoreKey], - app.GetSubspace(htlctypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.ModuleAccountAddrs(), - ) - - app.CoinswapKeeper = coinswapkeeper.NewKeeper( - appCodec, - keys[coinswaptypes.StoreKey], - app.GetSubspace(coinswaptypes.ModuleName), - app.BankKeeper, - app.AccountKeeper, - app.ModuleAccountAddrs(), - authtypes.FeeCollectorName, - ) - - app.ServiceKeeper = servicekeeper.NewKeeper( - appCodec, - keys[servicetypes.StoreKey], - app.AccountKeeper, - app.BankKeeper, - app.GetSubspace(servicetypes.ModuleName), - app.ModuleAccountAddrs(), - servicetypes.FeeCollectorName, - ) - - app.OracleKeeper = oraclekeeper.NewKeeper( - appCodec, - keys[oracletypes.StoreKey], - app.GetSubspace(oracletypes.ModuleName), - app.ServiceKeeper, - ) - - app.RandomKeeper = randomkeeper.NewKeeper( - appCodec, - keys[randomtypes.StoreKey], - app.BankKeeper, - app.ServiceKeeper, - ) - - app.FarmKeeper = farmkeeper.NewKeeper(appCodec, - keys[farmtypes.StoreKey], - app.BankKeeper, - app.AccountKeeper, - app.DistrKeeper, - &app.GovKeeper, - app.CoinswapKeeper.ValidatePool, - app.GetSubspace(farmtypes.ModuleName), - authtypes.FeeCollectorName, - distrtypes.ModuleName, - ) - - govRouter := govv1beta1.NewRouter() - govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). - AddRoute(tibchost.RouterKey, tibccli.NewProposalHandler(app.TIBCKeeper)). - AddRoute(farmtypes.RouterKey, farm.NewCommunityPoolCreateFarmProposalHandler(app.FarmKeeper)) - - govConfig := govtypes.DefaultConfig() - - app.GovKeeper = govkeeper.NewKeeper( - appCodec, - keys[govtypes.StoreKey], - app.GetSubspace(govtypes.ModuleName), - app.AccountKeeper, - app.BankKeeper, - app.StakingKeeper, - govRouter, - app.MsgServiceRouter(), - govConfig, - ) - - govHooks := govtypes.NewMultiGovHooks(farmkeeper.NewGovHook(app.FarmKeeper)) - app.GovKeeper.SetHooks(govHooks) - /**** Module Options ****/ var skipGenesisInvariants = false opt := appOpts.Get(crisis.FlagSkipGenesisInvariants) @@ -684,35 +391,54 @@ func NewSimApp( app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, encodingConfig.TxConfig, ), - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), + auth.NewAppModule( + appCodec, + app.AccountKeeper, + authsims.RandomGenesisAccounts, + app.GetSubspace(authtypes.ModuleName), + ), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), + bank.NewAppModule( + appCodec, + app.BankKeeper, + app.AccountKeeper, + app.GetSubspace(banktypes.ModuleName), + ), + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), + crisis.NewAppModule( + app.CrisisKeeper, + skipGenesisInvariants, + app.GetSubspace(crisistypes.ModuleName), + ), mint.NewAppModule(appCodec, app.MintKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - upgrade.NewAppModule(app.UpgradeKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - ibc.NewAppModule(app.IBCKeeper), tibc.NewAppModule(app.TIBCKeeper), + slashing.NewAppModule( + appCodec, + app.SlashingKeeper, + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.GetSubspace(slashingtypes.ModuleName), + ), + distr.NewAppModule( + appCodec, + app.DistrKeeper, + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.GetSubspace(distrtypes.ModuleName), + ), + staking.NewAppModule( + appCodec, + app.StakingKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(stakingtypes.ModuleName), + ), + consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper), + vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), + params.NewAppModule(app.ParamsKeeper), - transferModule, - nfttransferModule, - mttransferModule, guardian.NewAppModule(appCodec, app.GuardianKeeper), - token.NewAppModule(appCodec, app.TokenKeeper, app.AccountKeeper, app.BankKeeper), - record.NewAppModule(appCodec, app.RecordKeeper, app.AccountKeeper, app.BankKeeper), - nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper), - mt.NewAppModule(appCodec, app.MTKeeper, app.AccountKeeper, app.BankKeeper), - htlc.NewAppModule(appCodec, app.HTLCKeeper, app.AccountKeeper, app.BankKeeper), - coinswap.NewAppModule(appCodec, app.CoinswapKeeper, app.AccountKeeper, app.BankKeeper), - service.NewAppModule(appCodec, app.ServiceKeeper, app.AccountKeeper, app.BankKeeper), - oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), - random.NewAppModule(appCodec, app.RandomKeeper, app.AccountKeeper, app.BankKeeper), - farm.NewAppModule(appCodec, app.FarmKeeper, app.AccountKeeper, app.BankKeeper), ) // During begin block slashing happens after distr.BeginBlocker so that @@ -720,7 +446,6 @@ func NewSimApp( // CanWithdrawInvariant invariant. // NOTE: staking module is required if HistoricalEntries param > 0 app.mm.SetOrderBeginBlockers( - //sdk module upgradetypes.ModuleName, capabilitytypes.ModuleName, authtypes.ModuleName, @@ -728,32 +453,13 @@ func NewSimApp( distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, - govtypes.ModuleName, - minttypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, - evidencetypes.ModuleName, - feegrant.ModuleName, paramstypes.ModuleName, - ibctransfertypes.ModuleName, - ibchost.ModuleName, vestingtypes.ModuleName, + consensustypes.ModuleName, - //self module - tokentypes.ModuleName, - tibchost.ModuleName, - ibctransfertypes.ModuleName, - nfttypes.ModuleName, - htlctypes.ModuleName, - recordtypes.ModuleName, - coinswaptypes.ModuleName, - servicetypes.ModuleName, - oracletypes.ModuleName, - randomtypes.ModuleName, - farmtypes.ModuleName, - mttypes.ModuleName, - tibcnfttypes.ModuleName, - tibcmttypes.ModuleName, + minttypes.ModuleName, guardiantypes.ModuleName, ) app.mm.SetOrderEndBlockers( @@ -765,33 +471,15 @@ func NewSimApp( distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, - govtypes.ModuleName, - minttypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, - evidencetypes.ModuleName, - feegrant.ModuleName, paramstypes.ModuleName, - ibctransfertypes.ModuleName, - ibchost.ModuleName, vestingtypes.ModuleName, + consensustypes.ModuleName, //self module - tokentypes.ModuleName, - tibchost.ModuleName, - ibctransfertypes.ModuleName, - nfttypes.ModuleName, - htlctypes.ModuleName, - recordtypes.ModuleName, - coinswaptypes.ModuleName, - servicetypes.ModuleName, - oracletypes.ModuleName, - randomtypes.ModuleName, - farmtypes.ModuleName, - mttypes.ModuleName, - tibcnfttypes.ModuleName, - tibcmttypes.ModuleName, guardiantypes.ModuleName, + minttypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -808,38 +496,19 @@ func NewSimApp( distrtypes.ModuleName, stakingtypes.ModuleName, slashingtypes.ModuleName, - govtypes.ModuleName, - minttypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName, - evidencetypes.ModuleName, - feegrant.ModuleName, paramstypes.ModuleName, - ibctransfertypes.ModuleName, - ibchost.ModuleName, vestingtypes.ModuleName, + consensustypes.ModuleName, //self module - tokentypes.ModuleName, - tibchost.ModuleName, - ibctransfertypes.ModuleName, - nfttypes.ModuleName, - htlctypes.ModuleName, - recordtypes.ModuleName, - coinswaptypes.ModuleName, - servicetypes.ModuleName, - oracletypes.ModuleName, - randomtypes.ModuleName, - farmtypes.ModuleName, - mttypes.ModuleName, - tibcnfttypes.ModuleName, - tibcmttypes.ModuleName, guardiantypes.ModuleName, + minttypes.ModuleName, ) cfg := module.NewConfigurator(appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) - app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) + app.mm.RegisterInvariants(app.CrisisKeeper) app.mm.RegisterServices(cfg) // create the simulation manager and define the order of the modules for deterministic simulations @@ -847,32 +516,45 @@ func NewSimApp( // NOTE: this is not required apps that don't use the simulator for fuzz testing // transactions app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), + auth.NewAppModule( + appCodec, + app.AccountKeeper, + authsims.RandomGenesisAccounts, + app.GetSubspace(authtypes.ModuleName), + ), + bank.NewAppModule( + appCodec, + app.BankKeeper, + app.AccountKeeper, + app.GetSubspace(banktypes.ModuleName), + ), + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), mint.NewAppModule(appCodec, app.MintKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), + staking.NewAppModule( + appCodec, + app.StakingKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(stakingtypes.ModuleName), + ), + distr.NewAppModule( + appCodec, + app.DistrKeeper, + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.GetSubspace(distrtypes.ModuleName), + ), + slashing.NewAppModule( + appCodec, + app.SlashingKeeper, + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.GetSubspace(slashingtypes.ModuleName), + ), params.NewAppModule(app.ParamsKeeper), - evidence.NewAppModule(app.EvidenceKeeper), - ibc.NewAppModule(app.IBCKeeper), - transferModule, - nfttransferModule, - mttransferModule, guardian.NewAppModule(appCodec, app.GuardianKeeper), - token.NewAppModule(appCodec, app.TokenKeeper, app.AccountKeeper, app.BankKeeper), - record.NewAppModule(appCodec, app.RecordKeeper, app.AccountKeeper, app.BankKeeper), - nftmodule.NewAppModule(appCodec, app.NFTKeeper, app.AccountKeeper, app.BankKeeper), - htlc.NewAppModule(appCodec, app.HTLCKeeper, app.AccountKeeper, app.BankKeeper), - coinswap.NewAppModule(appCodec, app.CoinswapKeeper, app.AccountKeeper, app.BankKeeper), - service.NewAppModule(appCodec, app.ServiceKeeper, app.AccountKeeper, app.BankKeeper), - oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), - random.NewAppModule(appCodec, app.RandomKeeper, app.AccountKeeper, app.BankKeeper), - farm.NewAppModule(appCodec, app.FarmKeeper, app.AccountKeeper, app.BankKeeper), - tibc.NewAppModule(app.TIBCKeeper), ) app.sm.RegisterStoreDecoders() @@ -901,9 +583,6 @@ func NewSimApp( // `loadLatest` is set to true. app.CapabilityKeeper.Seal() } - app.scopedTIBCKeeper = scopedTIBCKeeper - app.scopedIBCKeeper = scopedIBCKeeper - app.scopedTransferKeeper = scopedTransferKeeper return app } @@ -919,7 +598,10 @@ func MakeCodecs() (codec.Codec, *codec.LegacyAmino) { func (app *SimApp) Name() string { return app.BaseApp.Name() } // BeginBlocker application updates every begin block -func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { +func (app *SimApp) BeginBlocker( + ctx sdk.Context, + req abci.RequestBeginBlock, +) abci.ResponseBeginBlock { return app.mm.BeginBlock(ctx, req) } @@ -934,15 +616,6 @@ func (app *SimApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci. if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) } - - // add system service at InitChainer, overwrite if it exists - var serviceGenState servicetypes.GenesisState - app.appCodec.MustUnmarshalJSON(genesisState[servicetypes.ModuleName], &serviceGenState) - serviceGenState.Definitions = append(serviceGenState.Definitions, servicetypes.GenOraclePriceSvcDefinition()) - serviceGenState.Bindings = append(serviceGenState.Bindings, servicetypes.GenOraclePriceSvcBinding(nativeToken.MinUnit)) - serviceGenState.Definitions = append(serviceGenState.Definitions, randomtypes.GetSvcDefinition()) - genesisState[servicetypes.ModuleName] = app.appCodec.MustMarshalJSON(&serviceGenState) - return app.mm.InitGenesis(ctx, app.appCodec, genesisState) } @@ -983,6 +656,16 @@ func (app *SimApp) LegacyAmino() *codec.LegacyAmino { return app.legacyAmino } +// TxConfig returns SimApp's TxConfig +func (app *SimApp) TxConfig() client.TxConfig { + return app.txConfig +} + +// DefaultGenesis returns a default genesis from the registered AppModuleBasic's. +func (a *SimApp) DefaultGenesis() map[string]json.RawMessage { + return ModuleBasics.DefaultGenesis(a.AppCodec()) +} + // AppCodec returns IrisApp's app codec. // // NOTE: This is solely to be used for testing purposes as it may be desirable @@ -1049,7 +732,12 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon // RegisterTxService implements the Application.RegisterTxService method. func (app *SimApp) RegisterTxService(clientCtx client.Context) { - authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) + authtx.RegisterTxService( + app.BaseApp.GRPCQueryRouter(), + clientCtx, + app.BaseApp.Simulate, + app.interfaceRegistry, + ) } // RegisterTendermintService implements the Application.RegisterTendermintService method. @@ -1062,6 +750,10 @@ func (app *SimApp) RegisterTendermintService(clientCtx client.Context) { ) } +func (app *SimApp) RegisterNodeService(clientCtx client.Context) { + nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) +} + // GetMaccPerms returns a copy of the module account permissions func GetMaccPerms() map[string][]string { dupMaccPerms := make(map[string][]string) @@ -1072,7 +764,11 @@ func GetMaccPerms() map[string][]string { } // initParamsKeeper init params keeper and its subspaces -func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey storetypes.StoreKey) paramskeeper.Keeper { +func initParamsKeeper( + appCodec codec.BinaryCodec, + legacyAmino *codec.LegacyAmino, + key, tkey storetypes.StoreKey, +) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) paramsKeeper.Subspace(authtypes.ModuleName) @@ -1081,17 +777,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(minttypes.ModuleName) paramsKeeper.Subspace(distrtypes.ModuleName) paramsKeeper.Subspace(slashingtypes.ModuleName) - paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(tokentypes.ModuleName) - paramsKeeper.Subspace(recordtypes.ModuleName) - paramsKeeper.Subspace(htlctypes.ModuleName) - paramsKeeper.Subspace(coinswaptypes.ModuleName) - paramsKeeper.Subspace(servicetypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) - paramsKeeper.Subspace(farmtypes.ModuleName) - paramsKeeper.Subspace(tibchost.ModuleName) return paramsKeeper } diff --git a/simapp/encoding.go b/simapp/encoding.go index 954f4a117..61cb2018e 100644 --- a/simapp/encoding.go +++ b/simapp/encoding.go @@ -1,7 +1,7 @@ package simapp import ( - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + simappparams "cosmossdk.io/simapp/params" "github.com/cosmos/cosmos-sdk/std" ) diff --git a/simapp/export.go b/simapp/export.go index f4fc5b0b2..bbd8db02c 100644 --- a/simapp/export.go +++ b/simapp/export.go @@ -4,7 +4,7 @@ import ( "encoding/json" "log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,7 +16,7 @@ import ( // ExportAppStateAndValidators exports the state of the application for a genesis // file. func (app *SimApp) ExportAppStateAndValidators( - forZeroHeight bool, jailAllowedAddrs []string, + forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) @@ -29,7 +29,7 @@ func (app *SimApp) ExportAppStateAndValidators( app.prepForZeroHeightGenesis(ctx, jailAllowedAddrs) } - genState := app.mm.ExportGenesis(ctx, app.appCodec) + genState := app.mm.ExportGenesisForModules(ctx, app.appCodec, modulesToExport) appState, err := json.MarshalIndent(genState, "", " ") if err != nil { return servertypes.ExportedApp{}, err @@ -72,10 +72,13 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] /* Handle fee distribution state. */ // withdraw all validator commission - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) - return false - }) + app.StakingKeeper.IterateValidators( + ctx, + func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + _, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator()) + return false + }, + ) // withdraw all delegator rewards dels := app.StakingKeeper.GetAllDelegations(ctx) @@ -103,16 +106,19 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] ctx = ctx.WithBlockHeight(0) // reinitialize all validators - app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) { - // donate any unwithdrawn outstanding reward fraction tokens to the community pool - scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) - feePool := app.DistrKeeper.GetFeePool(ctx) - feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) - app.DistrKeeper.SetFeePool(ctx, feePool) - - app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) - return false - }) + app.StakingKeeper.IterateValidators( + ctx, + func(_ int64, val stakingtypes.ValidatorI) (stop bool) { + // donate any unwithdrawn outstanding reward fraction tokens to the community pool + scraps := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator()) + feePool := app.DistrKeeper.GetFeePool(ctx) + feePool.CommunityPool = feePool.CommunityPool.Add(scraps...) + app.DistrKeeper.SetFeePool(ctx, feePool) + + app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()) + return false + }, + ) // reinitialize all delegations for _, del := range dels { @@ -134,22 +140,28 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] /* Handle staking state. */ // iterate through redelegations, reset creation height - app.StakingKeeper.IterateRedelegations(ctx, func(_ int64, red stakingtypes.Redelegation) (stop bool) { - for i := range red.Entries { - red.Entries[i].CreationHeight = 0 - } - app.StakingKeeper.SetRedelegation(ctx, red) - return false - }) + app.StakingKeeper.IterateRedelegations( + ctx, + func(_ int64, red stakingtypes.Redelegation) (stop bool) { + for i := range red.Entries { + red.Entries[i].CreationHeight = 0 + } + app.StakingKeeper.SetRedelegation(ctx, red) + return false + }, + ) // iterate through unbonding delegations, reset creation height - app.StakingKeeper.IterateUnbondingDelegations(ctx, func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { - for i := range ubd.Entries { - ubd.Entries[i].CreationHeight = 0 - } - app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) - return false - }) + app.StakingKeeper.IterateUnbondingDelegations( + ctx, + func(_ int64, ubd stakingtypes.UnbondingDelegation) (stop bool) { + for i := range ubd.Entries { + ubd.Entries[i].CreationHeight = 0 + } + app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) + return false + }, + ) // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 01fad1872..df94ca2ba 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -2,22 +2,30 @@ package simapp import ( "bytes" + "context" "encoding/hex" "encoding/json" "fmt" + "os" "strconv" + "strings" "testing" "time" + "github.com/gogo/protobuf/proto" + "github.com/spf13/cobra" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" - dbm "github.com/tendermint/tm-db" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + coretypes "github.com/cometbft/cometbft/rpc/core/types" + tmtypes "github.com/cometbft/cometbft/types" bam "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -25,10 +33,14 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/mock" "github.com/cosmos/cosmos-sdk/testutil/network" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/types/module/testutil" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -36,29 +48,20 @@ import ( minttypes "github.com/irisnet/irishub/modules/mint/types" ) -// DefaultConsensusParams defines the default Tendermint consensus params used in -// SimApp testing. -var DefaultConsensusParams = &abci.ConsensusParams{ - Block: &abci.BlockParams{ - MaxBytes: 200000, - MaxGas: 2000000, - }, - Evidence: &tmproto.EvidenceParams{ - MaxAgeNumBlocks: 302400, - MaxAgeDuration: 504 * time.Hour, // 3 weeks is the max duration - MaxBytes: 10000, - }, - Validator: &tmproto.ValidatorParams{ - PubKeyTypes: []string{ - tmtypes.ABCIPubKeyTypeEd25519, - }, - }, -} - func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { db := dbm.NewMemDB() encCdc := MakeTestEncodingConfig() - app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, invCheckPeriod, encCdc, EmptyAppOptions{}) + app := NewSimApp( + log.NewNopLogger(), + db, + nil, + true, + map[int64]bool{}, + DefaultNodeHome, + invCheckPeriod, + encCdc, + EmptyAppOptions{}, + ) if withGenesis { return app, NewDefaultGenesisState(encCdc.Codec) } @@ -66,7 +69,7 @@ func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { } // Setup initializes a new SimApp. A Nop logger is set in SimApp. -func Setup(t *testing.T, isCheckTx bool) *SimApp { +func Setup(t *testing.T, _ bool) *SimApp { t.Helper() privVal := mock.NewPV() @@ -79,7 +82,12 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp { // generate genesis account senderPrivKey := secp256k1.GenPrivKey() - acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) + acc := authtypes.NewBaseAccount( + senderPrivKey.PubKey().Address().Bytes(), + senderPrivKey.PubKey(), + 0, + 0, + ) balance := banktypes.Balance{ Address: acc.GetAddress().String(), Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))), @@ -91,13 +99,27 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp { } func NewConfig() network.Config { - cfg := network.DefaultConfig() - encCfg := MakeTestEncodingConfig() + cfg := network.DefaultConfig(NewTestNetworkFixture) + encCfg := MakeTestEncodingConfig() // redundant cfg.Codec = encCfg.Codec cfg.TxConfig = encCfg.TxConfig cfg.LegacyAmino = encCfg.Amino cfg.InterfaceRegistry = encCfg.InterfaceRegistry - cfg.AppConstructor = SimAppConstructor + cfg.AppConstructor = func(val network.ValidatorI) servertypes.Application { + return NewSimApp( + val.GetCtx().Logger, + dbm.NewMemDB(), + nil, + true, + nil, + DefaultNodeHome, + 0, + encCfg, + EmptyAppOptions{}, + bam.SetMinGasPrices(val.GetAppConfig().MinGasPrices), + bam.SetChainID(cfg.ChainID), + ) + } cfg.GenesisState = NewDefaultGenesisState(cfg.Codec) return cfg } @@ -114,11 +136,21 @@ func SimAppConstructor(val network.Validator) servertypes.Application { // that also act as delegators. For simplicity, each validator is bonded with a delegation // of one consensus engine unit (10^6) in the default token of the simapp from first genesis // account. A Nop logger is set in SimApp. -func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { +func SetupWithGenesisValSet( + t *testing.T, + valSet *tmtypes.ValidatorSet, + genAccs []authtypes.GenesisAccount, + balances ...banktypes.Balance, +) *SimApp { t.Helper() app, genesisState := setup(true, 5) - genesisState, err := GenesisStateWithValSet(app.AppCodec(), genesisState, valSet, genAccs, balances...) + genesisState, err := GenesisStateWithValSet( + app.AppCodec(), + genesisState, + valSet, + genAccs, + balances...) require.NoError(t, err) stateBytes, err := json.MarshalIndent(genesisState, "", " ") @@ -128,7 +160,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs app.InitChain( abci.RequestInitChain{ Validators: []abci.ValidatorUpdate{}, - ConsensusParams: DefaultConsensusParams, + ConsensusParams: simtestutil.DefaultConsensusParams, AppStateBytes: stateBytes, }, ) @@ -171,24 +203,35 @@ func GenesisStateWithValSet(codec codec.Codec, genesisState map[string]json.RawM } validator := stakingtypes.Validator{ - OperatorAddress: sdk.ValAddress(val.Address).String(), - ConsensusPubkey: pkAny, - Jailed: false, - Status: stakingtypes.Bonded, - Tokens: bondAmt, - DelegatorShares: sdk.OneDec(), - Description: stakingtypes.Description{}, - UnbondingHeight: int64(0), - UnbondingTime: time.Unix(0, 0).UTC(), - Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()), + OperatorAddress: sdk.ValAddress(val.Address).String(), + ConsensusPubkey: pkAny, + Jailed: false, + Status: stakingtypes.Bonded, + Tokens: bondAmt, + DelegatorShares: sdk.OneDec(), + Description: stakingtypes.Description{}, + UnbondingHeight: int64(0), + UnbondingTime: time.Unix(0, 0).UTC(), + Commission: stakingtypes.NewCommission( + sdk.ZeroDec(), + sdk.ZeroDec(), + sdk.ZeroDec(), + ), MinSelfDelegation: sdk.ZeroInt(), } validators = append(validators, validator) - delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec())) + delegations = append( + delegations, + stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec()), + ) } // set validators and delegations - stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations) + stakingGenesis := stakingtypes.NewGenesisState( + stakingtypes.DefaultParams(), + validators, + delegations, + ) genesisState[stakingtypes.ModuleName] = codec.MustMarshalJSON(stakingGenesis) totalSupply := sdk.NewCoins() @@ -209,7 +252,13 @@ func GenesisStateWithValSet(codec codec.Codec, genesisState map[string]json.RawM }) // update total supply - bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}) + bankGenesis := banktypes.NewGenesisState( + banktypes.DefaultGenesisState().Params, + balances, + totalSupply, + []banktypes.Metadata{}, + nil, + ) genesisState[banktypes.ModuleName] = codec.MustMarshalJSON(bankGenesis) return genesisState, nil @@ -251,7 +300,12 @@ func createIncrementalAccounts(accNum int) []sdk.AccAddress { } // AddTestAddrsFromPubKeys adds the addresses into the SimApp providing only the public keys. -func AddTestAddrsFromPubKeys(app *SimApp, ctx sdk.Context, pubKeys []cryptotypes.PubKey, accAmt sdk.Int) { +func AddTestAddrsFromPubKeys( + app *SimApp, + ctx sdk.Context, + pubKeys []cryptotypes.PubKey, + accAmt sdk.Int, +) { initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) // fill all the addresses with some coins, set the loose pool tokens simultaneously for _, pubKey := range pubKeys { @@ -267,11 +321,22 @@ func AddTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sd // AddTestAddrsIncremental constructs and returns accNum amount of accounts with an // initial balance of accAmt in random order -func AddTestAddrsIncremental(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress { +func AddTestAddrsIncremental( + app *SimApp, + ctx sdk.Context, + accNum int, + accAmt sdk.Int, +) []sdk.AccAddress { return addTestAddrs(app, ctx, accNum, accAmt, createIncrementalAccounts) } -func addTestAddrs(app *SimApp, ctx sdk.Context, accNum int, accAmt sdk.Int, strategy GenerateAccountStrategy) []sdk.AccAddress { +func addTestAddrs( + app *SimApp, + ctx sdk.Context, + accNum int, + accAmt sdk.Int, + strategy GenerateAccountStrategy, +) []sdk.AccAddress { testAddrs := strategy(accNum) initCoins := sdk.NewCoins(sdk.NewCoin(app.StakingKeeper.BondDenom(ctx), accAmt)) @@ -336,8 +401,12 @@ func CreateTestPubKeys(numPubKeys int) []cryptotypes.PubKey { // start at 10 to avoid changing 1 to 01, 2 to 02, etc for i := 100; i < (numPubKeys + 100); i++ { numString := strconv.Itoa(i) - buffer.WriteString("0B485CFC0EECC619440448436F8FC9DF40566F2369E72400281454CB552AF") // base pubkey string - buffer.WriteString(numString) // adding on final two digits to make pubkeys unique + buffer.WriteString( + "0B485CFC0EECC619440448436F8FC9DF40566F2369E72400281454CB552AF", + ) // base pubkey string + buffer.WriteString( + numString, + ) // adding on final two digits to make pubkeys unique publicKeys = append(publicKeys, NewPubKeyFromHex(buffer.String())) buffer.Reset() } @@ -364,3 +433,100 @@ type EmptyAppOptions struct{} func (ao EmptyAppOptions) Get(o string) interface{} { return nil } + +// NewTestNetworkFixture returns a new simapp AppConstructor for network simulation tests +func NewTestNetworkFixture() network.TestFixture { + dir, err := os.MkdirTemp("", "simapp") + if err != nil { + panic(fmt.Sprintf("failed creating temporary directory: %v", err)) + } + defer os.RemoveAll(dir) + + encodingConfig := MakeTestEncodingConfig() + + app := NewSimApp( + log.NewNopLogger(), + dbm.NewMemDB(), + nil, + true, + nil, + DefaultNodeHome, + 0, + encodingConfig, // redundant + simtestutil.NewAppOptionsWithFlagHome(dir), + ) + + appCtr := func(val network.ValidatorI) servertypes.Application { + return NewSimApp( + val.GetCtx().Logger, + dbm.NewMemDB(), + nil, + true, + nil, + DefaultNodeHome, + 0, + encodingConfig, // redundant + simtestutil.NewAppOptionsWithFlagHome(val.GetCtx().Config.RootDir), + bam.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), + bam.SetMinGasPrices(val.GetAppConfig().MinGasPrices), + bam.SetChainID(val.GetCtx().Viper.GetString(flags.FlagChainID)), + ) + } + + return network.TestFixture{ + AppConstructor: appCtr, + GenesisState: app.DefaultGenesis(), + EncodingConfig: testutil.TestEncodingConfig{ + InterfaceRegistry: app.InterfaceRegistry(), + Codec: app.AppCodec(), + TxConfig: app.TxConfig(), + Amino: app.LegacyAmino(), + }, + } +} + +func ExecTxCmdWithResult( + t *testing.T, + network *network.Network, + clientCtx client.Context, + cmd *cobra.Command, + extraArgs []string, +) *coretypes.ResultTx { + buf, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, extraArgs) + require.NoError(t, err, "ExecTestCLICmd failed") + require.NoError(t, network.WaitForNextBlock(), "network.WaitForNextBlock failed") + + respType := proto.Message(&sdk.TxResponse{}) + require.NoError(t, clientCtx.Codec.UnmarshalJSON(buf.Bytes(), respType), buf.String()) + + txResp := respType.(*sdk.TxResponse) + require.Equal(t, uint32(0), txResp.Code) + return WaitForTx(t, network, clientCtx, txResp.TxHash) +} + +func WaitForTx( + t *testing.T, + network *network.Network, + clientCtx client.Context, + txHash string, +) *coretypes.ResultTx { + var ( + result *coretypes.ResultTx + err error + tryCnt = 3 + ) + + txHashBz, err := hex.DecodeString(txHash) + require.NoError(t, err, "hex.DecodeString failed") + +reTry: + result, err = clientCtx.Client.Tx(context.Background(), txHashBz, false) + if err != nil && strings.Contains(err.Error(), "not found") && tryCnt > 0 { + require.NoError(t, network.WaitForNextBlock(), "network.WaitForNextBlock failed") + tryCnt-- + goto reTry + } + + require.NoError(t, err, "query tx failed") + return result +} diff --git a/third_party/proto/confio/proofs.proto b/third_party/proto/confio/proofs.proto deleted file mode 100644 index 469b94b68..000000000 --- a/third_party/proto/confio/proofs.proto +++ /dev/null @@ -1,234 +0,0 @@ -syntax = "proto3"; - -package ics23; -option go_package = "github.com/confio/ics23/go"; - -enum HashOp { - // NO_HASH is the default if no data passed. Note this is an illegal argument some places. - NO_HASH = 0; - SHA256 = 1; - SHA512 = 2; - KECCAK = 3; - RIPEMD160 = 4; - BITCOIN = 5; // ripemd160(sha256(x)) -} - -/** -LengthOp defines how to process the key and value of the LeafOp -to include length information. After encoding the length with the given -algorithm, the length will be prepended to the key and value bytes. -(Each one with it's own encoded length) -*/ -enum LengthOp { - // NO_PREFIX don't include any length info - NO_PREFIX = 0; - // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VAR_PROTO = 1; - // VAR_RLP uses rlp int encoding of the length - VAR_RLP = 2; - // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - FIXED32_BIG = 3; - // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - FIXED32_LITTLE = 4; - // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - FIXED64_BIG = 5; - // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - FIXED64_LITTLE = 6; - // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - REQUIRE_32_BYTES = 7; - // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) - REQUIRE_64_BYTES = 8; -} - -/** -ExistenceProof takes a key and a value and a set of steps to perform on it. -The result of peforming all these steps will provide a "root hash", which can -be compared to the value in a header. - -Since it is computationally infeasible to produce a hash collission for any of the used -cryptographic hash functions, if someone can provide a series of operations to transform -a given key and value into a root hash that matches some trusted root, these key and values -must be in the referenced merkle tree. - -The only possible issue is maliablity in LeafOp, such as providing extra prefix data, -which should be controlled by a spec. Eg. with lengthOp as NONE, - prefix = FOO, key = BAR, value = CHOICE -and - prefix = F, key = OOBAR, value = CHOICE -would produce the same value. - -With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field -in the ProofSpec is valuable to prevent this mutability. And why all trees should -length-prefix the data before hashing it. -*/ -message ExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - repeated InnerOp path = 4; -} - -/* -NonExistenceProof takes a proof of two neighbors, one left of the desired key, -one right of the desired key. If both proofs are valid AND they are neighbors, -then there is no valid proof for the given key. -*/ -message NonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - ExistenceProof left = 2; - ExistenceProof right = 3; -} - -/* -CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages -*/ -message CommitmentProof { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - BatchProof batch = 3; - CompressedBatchProof compressed = 4; - } -} - -/** -LeafOp represents the raw key-value data we wish to prove, and -must be flexible to represent the internal transformation from -the original key-value pairs into the basis hash, for many existing -merkle trees. - -key and value are passed in. So that the signature of this operation is: - leafOp(key, value) -> output - -To process this, first prehash the keys and values if needed (ANY means no hash in this case): - hkey = prehashKey(key) - hvalue = prehashValue(value) - -Then combine the bytes, and hash it - output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) -*/ -message LeafOp { - HashOp hash = 1; - HashOp prehash_key = 2; - HashOp prehash_value = 3; - LengthOp length = 4; - // prefix is a fixed bytes that may optionally be included at the beginning to differentiate - // a leaf node from an inner node. - bytes prefix = 5; -} - -/** -InnerOp represents a merkle-proof step that is not a leaf. -It represents concatenating two children and hashing them to provide the next result. - -The result of the previous step is passed in, so the signature of this op is: - innerOp(child) -> output - -The result of applying InnerOp should be: - output = op.hash(op.prefix || child || op.suffix) - - where the || operator is concatenation of binary data, -and child is the result of hashing all the tree below this step. - -Any special data, like prepending child with the length, or prepending the entire operation with -some value to differentiate from leaf nodes, should be included in prefix and suffix. -If either of prefix or suffix is empty, we just treat it as an empty string -*/ -message InnerOp { - HashOp hash = 1; - bytes prefix = 2; - bytes suffix = 3; -} - - -/** -ProofSpec defines what the expected parameters are for a given proof type. -This can be stored in the client and used to validate any incoming proofs. - - verify(ProofSpec, Proof) -> Proof | Error - -As demonstrated in tests, if we don't fix the algorithm used to calculate the -LeafHash for a given tree, there are many possible key-value pairs that can -generate a given hash (by interpretting the preimage differently). -We need this for proper security, requires client knows a priori what -tree format server uses. But not in code, rather a configuration object. -*/ -message ProofSpec { - // any field in the ExistenceProof must be the same as in this spec. - // except Prefix, which is just the first bytes of prefix (spec can be longer) - LeafOp leaf_spec = 1; - InnerSpec inner_spec = 2; - // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) - int32 max_depth = 3; - // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) - int32 min_depth = 4; -} - -/* -InnerSpec contains all store-specific structure info to determine if two proofs from a -given store are neighbors. - -This enables: - - isLeftMost(spec: InnerSpec, op: InnerOp) - isRightMost(spec: InnerSpec, op: InnerOp) - isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) -*/ -message InnerSpec { - // Child order is the ordering of the children node, must count from 0 - // iavl tree is [0, 1] (left then right) - // merk is [0, 2, 1] (left, right, here) - repeated int32 child_order = 1; - int32 child_size = 2; - int32 min_prefix_length = 3; - int32 max_prefix_length = 4; - // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) - bytes empty_child = 5; - // hash is the algorithm that must be used for each InnerOp - HashOp hash = 6; -} - -/* -BatchProof is a group of multiple proof types than can be compressed -*/ -message BatchProof { - repeated BatchEntry entries = 1; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message BatchEntry { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - } -} - - -/****** all items here are compressed forms *******/ - -message CompressedBatchProof { - repeated CompressedBatchEntry entries = 1; - repeated InnerOp lookup_inners = 2; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message CompressedBatchEntry { - oneof proof { - CompressedExistenceProof exist = 1; - CompressedNonExistenceProof nonexist = 2; - } -} - -message CompressedExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - // these are indexes into the lookup_inners table in CompressedBatchProof - repeated int32 path = 4; -} - -message CompressedNonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - CompressedExistenceProof left = 2; - CompressedExistenceProof right = 3; -} diff --git a/third_party/proto/cosmos/bank/v1beta1/bank.proto b/third_party/proto/cosmos/bank/v1beta1/bank.proto deleted file mode 100644 index dd6e2c212..000000000 --- a/third_party/proto/cosmos/bank/v1beta1/bank.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Input models transaction input. -message Input { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1; - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Output models transaction outputs. -message Output { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1; - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} diff --git a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto b/third_party/proto/cosmos/base/query/v1beta1/pagination.proto deleted file mode 100644 index b46c0516b..000000000 --- a/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; -package cosmos.base.query.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/types/query"; - -// PageRequest is to be embedded in gRPC request messages for efficient -// pagination. Ex: -// -// message SomeRequest { -// Foo some_parameter = 1; -// PageRequest page = 2; -// } -message PageRequest { - // key is a value returned in PageResponse.next_key to begin - // querying the next page most efficiently. Only one of offset or key - // should be set. - bytes key = 1; - - // offset is a numeric offset that can be used when key is unavailable. - // It is less efficient than using key. Only one of offset or key should - // be set. - uint64 offset = 2; - - // limit is the total number of results to be returned in the result page. - // If left empty it will default to a value to be set by each app. - uint64 limit = 3; - - // count_total is set to true to indicate that the result set should include - // a count of the total number of items available for pagination in UIs. count_total - // is only respected when offset is used. It is ignored when key is set. - bool count_total = 4; -} - -// PageResponse is to be embedded in gRPC response messages where the corresponding -// request message has used PageRequest -// -// message SomeResponse { -// repeated Bar results = 1; -// PageResponse page = 2; -// } -message PageResponse { - // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently - bytes next_key = 1; - - // total is total number of results available if PageRequest.count_total - // was set, its value is undefined otherwise - uint64 total = 2; -} diff --git a/third_party/proto/cosmos/base/v1beta1/coin.proto b/third_party/proto/cosmos/base/v1beta1/coin.proto deleted file mode 100644 index fab75284b..000000000 --- a/third_party/proto/cosmos/base/v1beta1/coin.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; -package cosmos.base.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; - -// Coin defines a token with a denomination and an amount. -// -// NOTE: The amount field is an Int which implements the custom method -// signatures required by gogoproto. -message Coin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; -} - -// DecCoin defines a token with a denomination and a decimal amount. -// -// NOTE: The amount field is an Dec which implements the custom method -// signatures required by gogoproto. -message DecCoin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; -} - -// IntProto defines a Protobuf wrapper around an Int object. -message IntProto { - string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; -} - -// DecProto defines a Protobuf wrapper around a Dec object. -message DecProto { - string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; -} diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto deleted file mode 100644 index 167b17075..000000000 --- a/third_party/proto/cosmos_proto/cosmos.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos_proto; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/regen-network/cosmos-proto"; - -extend google.protobuf.MessageOptions { - string interface_type = 93001; - - string implements_interface = 93002; -} - -extend google.protobuf.FieldOptions { - string accepts_interface = 93001; -} diff --git a/third_party/proto/gogoproto/gogo.proto b/third_party/proto/gogoproto/gogo.proto deleted file mode 100644 index 49e78f99f..000000000 --- a/third_party/proto/gogoproto/gogo.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "GoGoProtos"; -option go_package = "github.com/gogo/protobuf/gogoproto"; - -extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; -} - -extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; - - optional bool goproto_sizecache_all = 63034; - optional bool goproto_unkeyed_all = 63035; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; - - optional bool goproto_sizecache = 64034; - optional bool goproto_unkeyed = 64035; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; - optional bool wktpointer = 65012; - - optional string castrepeated = 65013; -} diff --git a/third_party/proto/google/api/annotations.proto b/third_party/proto/google/api/annotations.proto deleted file mode 100644 index 85c361b47..000000000 --- a/third_party/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/third_party/proto/google/api/http.proto b/third_party/proto/google/api/http.proto deleted file mode 100644 index 2bd3a19bf..000000000 --- a/third_party/proto/google/api/http.proto +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parmeters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST API methods. The mapping specifies how different portions of the RPC -// request message are mapped to URL path, URL query parameters, and -// HTTP request body. The mapping is typically specified as an -// `google.api.http` annotation on the RPC method, -// see "google/api/annotations.proto" for details. -// -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// SubMessage sub = 2; // `sub.subfield` is url-mapped -// } -// message Message { -// string text = 1; // content of the resource -// } -// -// The same http annotation can alternatively be expressed inside the -// `GRPC API Configuration` YAML file. -// -// http: -// rules: -// - selector: .Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// int64 revision = 2; // becomes a parameter -// SubMessage sub = 3; // `sub.subfield` becomes a parameter -// } -// -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` -// -// Note that fields which are mapped to HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. -// -// For HTTP method kinds which allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice of -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// -// This enables the following two alternative HTTP JSON to RPC -// mappings: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` -// -// # Rules for HTTP mapping -// -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: -// -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it indicates there is no HTTP request body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single path segment. The syntax `**` matches zero -// or more path segments, which must be the last part of the path except the -// `Verb`. The syntax `LITERAL` matches literal text in the path. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path, all characters -// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the -// Discovery Document as `{var}`. -// -// If a variable contains one or more path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path, all -// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables -// show up in the Discovery Document as `{+var}`. -// -// NOTE: While the single segment variable matches the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 -// Simple String Expansion, the multi segment variable **does not** match -// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. -// -// NOTE: the field paths in variables and in the `body` must not refer to -// repeated fields or map fields. -message HttpRule { - // Selects methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Used for listing and getting information about resources. - string get = 2; - - // Used for updating a resource. - string put = 3; - - // Used for creating a resource. - string post = 4; - - // Used for deleting a resource. - string delete = 5; - - // Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field and must be - // present at the top-level of request message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // body of response. Other response fields are ignored. When - // not set, the response message will be used as HTTP body of response. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/third_party/proto/google/api/httpbody.proto b/third_party/proto/google/api/httpbody.proto deleted file mode 100644 index 4428515c1..000000000 --- a/third_party/proto/google/api/httpbody.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; -option java_multiple_files = true; -option java_outer_classname = "HttpBodyProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Message that represents an arbitrary HTTP body. It should only be used for -// payload formats that can't be represented as JSON, such as raw binary or -// an HTML page. -// -// -// This message can be used both in streaming and non-streaming API methods in -// the request as well as the response. -// -// It can be used as a top-level request field, which is convenient if one -// wants to extract parameters from either the URL or HTTP template into the -// request fields and also want access to the raw HTTP body. -// -// Example: -// -// message GetResourceRequest { -// // A unique request id. -// string request_id = 1; -// -// // The raw HTTP body is bound to this field. -// google.api.HttpBody http_body = 2; -// } -// -// service ResourceService { -// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); -// rpc UpdateResource(google.api.HttpBody) returns -// (google.protobuf.Empty); -// } -// -// Example with streaming methods: -// -// service CaldavService { -// rpc GetCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// rpc UpdateCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// } -// -// Use of this type only changes how the request and response bodies are -// handled, all other features will continue to work unchanged. -message HttpBody { - // The HTTP Content-Type header value specifying the content type of the body. - string content_type = 1; - - // The HTTP request/response body as raw binary. - bytes data = 2; - - // Application specific response metadata. Must be set in the first response - // for streaming APIs. - repeated google.protobuf.Any extensions = 3; -} \ No newline at end of file diff --git a/third_party/proto/google/protobuf/any.proto b/third_party/proto/google/protobuf/any.proto deleted file mode 100644 index 1431810ea..000000000 --- a/third_party/proto/google/protobuf/any.proto +++ /dev/null @@ -1,161 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -import "gogoproto/gogo.proto"; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "AnyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -message Any { - // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. This string must contain at least - // one "/" character. The last segment of the URL's path must represent - // the fully qualified name of the type (as in - // `path/google.protobuf.Duration`). The name should be in a canonical form - // (e.g., leading "." is not accepted). - // - // In practice, teams usually precompile into the binary all types that they - // expect it to use in the context of Any. However, for URLs which use the - // scheme `http`, `https`, or no scheme, one can optionally set up a type - // server that maps type URLs to message definitions as follows: - // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Note: this functionality is not currently available in the official - // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - string type_url = 1; - - // Must be a valid serialized protocol buffer of the above specified type. - bytes value = 2; - - option (gogoproto.typedecl) = false; -} - -option (gogoproto.goproto_registration) = false; diff --git a/third_party/proto/tendermint/abci/types/types.proto b/third_party/proto/tendermint/abci/types/types.proto deleted file mode 100644 index 317a6cd4b..000000000 --- a/third_party/proto/tendermint/abci/types/types.proto +++ /dev/null @@ -1,346 +0,0 @@ -syntax = "proto3"; -package tendermint.abci.types; -option go_package = "github.com/tendermint/tendermint/abci/types"; - -// For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md -import "gogoproto/gogo.proto"; -import "tendermint/crypto/merkle/merkle.proto"; -import "tendermint/libs/kv/types.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; - -// This file is copied from http://github.com/tendermint/abci -// NOTE: When using custom types, mind the warnings. -// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues - -option (gogoproto.marshaler_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.goproto_registration) = true; -// Generate tests -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -//---------------------------------------- -// Request types - -message Request { - oneof value { - RequestEcho echo = 2; - RequestFlush flush = 3; - RequestInfo info = 4; - RequestSetOption set_option = 5; - RequestInitChain init_chain = 6; - RequestQuery query = 7; - RequestBeginBlock begin_block = 8; - RequestCheckTx check_tx = 9; - RequestDeliverTx deliver_tx = 19; - RequestEndBlock end_block = 11; - RequestCommit commit = 12; - } -} - -message RequestEcho { - string message = 1; -} - -message RequestFlush {} - -message RequestInfo { - string version = 1; - uint64 block_version = 2; - uint64 p2p_version = 3; -} - -// nondeterministic -message RequestSetOption { - string key = 1; - string value = 2; -} - -message RequestInitChain { - google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -message RequestBeginBlock { - bytes hash = 1; - Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; -} - -enum CheckTxType { - New = 0; - Recheck = 1; -} - -message RequestCheckTx { - bytes tx = 1; - CheckTxType type = 2; -} - -message RequestDeliverTx { - bytes tx = 1; -} - -message RequestEndBlock { - int64 height = 1; -} - -message RequestCommit {} - -//---------------------------------------- -// Response types - -message Response { - oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseSetOption set_option = 5; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - ResponseDeliverTx deliver_tx = 10; - ResponseEndBlock end_block = 11; - ResponseCommit commit = 12; - } -} - -// nondeterministic -message ResponseException { - string error = 1; -} - -message ResponseEcho { - string message = 1; -} - -message ResponseFlush {} - -message ResponseInfo { - string data = 1; - - string version = 2; - uint64 app_version = 3; - - int64 last_block_height = 4; - bytes last_block_app_hash = 5; -} - -// nondeterministic -message ResponseSetOption { - uint32 code = 1; - // bytes data = 2; - string log = 3; - string info = 4; -} - -message ResponseInitChain { - ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; -} - -message ResponseQuery { - uint32 code = 1; - // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - tendermint.crypto.merkle.Proof proof = 8; - int64 height = 9; - string codespace = 10; -} - -message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5; - int64 gas_used = 6; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; -} - -message ResponseDeliverTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5; - int64 gas_used = 6; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; -} - -message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; - ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCommit { - // reserve 1 - bytes data = 2; -} - -//---------------------------------------- -// Misc. - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -message ConsensusParams { - BlockParams block = 1; - EvidenceParams evidence = 2; - ValidatorParams validator = 3; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Note: must be greater than 0 - int64 max_bytes = 1; - // Note: must be greater or equal to -1 - int64 max_gas = 2; -} - -message EvidenceParams { - // Note: must be greater than 0 - int64 max_age_num_blocks = 1; - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; -} - -// ValidatorParams contains limits on validators. -message ValidatorParams { - repeated string pub_key_types = 1; -} - -message LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -message Event { - string type = 1; - repeated tendermint.libs.kv.Pair attributes = 2 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; -} - -//---------------------------------------- -// Blockchain Types - -message Header { - // basic block info - Version version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block -} - -message Version { - uint64 Block = 1; - uint64 App = 2; -} - -message BlockID { - bytes hash = 1; - PartSetHeader parts_header = 2 [(gogoproto.nullable) = false]; -} - -message PartSetHeader { - int32 total = 1; - bytes hash = 2; -} - -// Validator -message Validator { - bytes address = 1; - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; -} - -// ValidatorUpdate -message ValidatorUpdate { - PubKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; -} - -// VoteInfo -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; -} - -message PubKey { - string type = 1; - bytes data = 2; -} - -message Evidence { - string type = 1; - Validator validator = 2 [(gogoproto.nullable) = false]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - int64 total_voting_power = 5; -} - -//---------------------------------------- -// Service Definition - -service ABCIApplication { - rpc Echo(RequestEcho) returns (ResponseEcho); - rpc Flush(RequestFlush) returns (ResponseFlush); - rpc Info(RequestInfo) returns (ResponseInfo); - rpc SetOption(RequestSetOption) returns (ResponseSetOption); - rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); - rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); - rpc Query(RequestQuery) returns (ResponseQuery); - rpc Commit(RequestCommit) returns (ResponseCommit); - rpc InitChain(RequestInitChain) returns (ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); - rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); -} diff --git a/third_party/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto deleted file mode 100644 index af9db49fc..000000000 --- a/third_party/proto/tendermint/crypto/keys.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -// PublicKey defines the keys available for use with Tendermint Validators -message PublicKey { - option (gogoproto.compare) = true; - option (gogoproto.equal) = true; - - oneof sum { - bytes ed25519 = 1; - } -} diff --git a/third_party/proto/tendermint/crypto/proof.proto b/third_party/proto/tendermint/crypto/proof.proto deleted file mode 100644 index 975df7685..000000000 --- a/third_party/proto/tendermint/crypto/proof.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -message Proof { - int64 total = 1; - int64 index = 2; - bytes leaf_hash = 3; - repeated bytes aunts = 4; -} - -message ValueOp { - // Encoded in ProofOp.Key. - bytes key = 1; - - // To encode in ProofOp.Data - Proof proof = 2; -} - -message DominoOp { - string key = 1; - string input = 2; - string output = 3; -} - -// ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data -// for example neighbouring node hash -message ProofOp { - string type = 1; - bytes key = 2; - bytes data = 3; -} - -// ProofOps is Merkle proof defined by the list of ProofOps -message ProofOps { - repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; -} diff --git a/third_party/proto/tendermint/libs/bits/types.proto b/third_party/proto/tendermint/libs/bits/types.proto deleted file mode 100644 index 3111d113a..000000000 --- a/third_party/proto/tendermint/libs/bits/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package tendermint.libs.bits; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; - -message BitArray { - int64 bits = 1; - repeated uint64 elems = 2; -} diff --git a/third_party/proto/tendermint/p2p/types.proto b/third_party/proto/tendermint/p2p/types.proto deleted file mode 100644 index 0d42ea400..000000000 --- a/third_party/proto/tendermint/p2p/types.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package tendermint.p2p; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; - -import "gogoproto/gogo.proto"; - -message NetAddress { - string id = 1 [(gogoproto.customname) = "ID"]; - string ip = 2 [(gogoproto.customname) = "IP"]; - uint32 port = 3; -} - -message ProtocolVersion { - uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; - uint64 block = 2; - uint64 app = 3; -} - -message DefaultNodeInfo { - ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; - string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; - string listen_addr = 3; - string network = 4; - string version = 5; - bytes channels = 6; - string moniker = 7; - DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; -} - -message DefaultNodeInfoOther { - string tx_index = 1; - string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; -} diff --git a/third_party/proto/tendermint/types/block.proto b/third_party/proto/tendermint/types/block.proto deleted file mode 100644 index 84e9bb15d..000000000 --- a/third_party/proto/tendermint/types/block.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/evidence.proto"; - -message Block { - Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; -} diff --git a/third_party/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto deleted file mode 100644 index 3b234571b..000000000 --- a/third_party/proto/tendermint/types/evidence.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/validator.proto"; - -message Evidence { - oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; - LightClientAttackEvidence light_client_attack_evidence = 2; - } -} - -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; - repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message EvidenceList { - repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; -} diff --git a/third_party/proto/tendermint/types/params.proto b/third_party/proto/tendermint/types/params.proto deleted file mode 100644 index 0c432e74e..000000000 --- a/third_party/proto/tendermint/types/params.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option (gogoproto.equal_all) = true; - -// ConsensusParams contains consensus critical parameters that determine the -// validity of blocks. -message ConsensusParams { - BlockParams block = 1 [(gogoproto.nullable) = false]; - EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; - ValidatorParams validator = 3 [(gogoproto.nullable) = false]; - VersionParams version = 4 [(gogoproto.nullable) = false]; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Max block size, in bytes. - // Note: must be greater than 0 - int64 max_bytes = 1; - // Max gas per block. - // Note: must be greater or equal to -1 - int64 max_gas = 2; - // Minimum time increment between consecutive blocks (in milliseconds) If the - // block header timestamp is ahead of the system clock, decrease this value. - // - // Not exposed to the application. - int64 time_iota_ms = 3; -} - -// EvidenceParams determine how we handle evidence of malfeasance. -message EvidenceParams { - // Max age of evidence, in blocks. - // - // The basic formula for calculating this is: MaxAgeDuration / {average block - // time}. - int64 max_age_num_blocks = 1; - - // Max age of evidence, in time. - // - // It should correspond with an app's "unbonding period" or other similar - // mechanism for handling [Nothing-At-Stake - // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - - // This sets the maximum size of total evidence in bytes that can be committed in a single block. - // and should fall comfortably under the max block bytes. - // Default is 1048576 or 1MB - int64 max_bytes = 3; -} - -// ValidatorParams restrict the public key types validators can use. -// NOTE: uses ABCI pubkey naming, not Amino names. -message ValidatorParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - repeated string pub_key_types = 1; -} - -// VersionParams contains the ABCI application version. -message VersionParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - uint64 app_version = 1; -} - -// HashedParams is a subset of ConsensusParams. -// -// It is hashed into the Header.ConsensusHash. -message HashedParams { - int64 block_max_bytes = 1; - int64 block_max_gas = 2; -} diff --git a/third_party/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto deleted file mode 100644 index ebb8a418d..000000000 --- a/third_party/proto/tendermint/types/types.proto +++ /dev/null @@ -1,157 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/crypto/proof.proto"; -import "tendermint/version/types.proto"; -import "tendermint/types/validator.proto"; - -// BlockIdFlag indicates which BlcokID the signature is for -enum BlockIDFlag { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; -} - -// SignedMsgType is a type of signed message in the consensus. -enum SignedMsgType { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; - // Votes - SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; - SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; - - // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; -} - -// PartsetHeader -message PartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message Part { - uint32 index = 1; - bytes bytes = 2; - tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; -} - -// BlockID -message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; -} - -// -------------------------------- - -// Header defines the structure of a Tendermint block header. -message Header { - // basic block info - tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block -} - -// Data contains the set of transactions included in the block -message Data { - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - repeated bytes txs = 1; -} - -// Vote represents a prevote, precommit, or commit vote from validators for -// consensus. -message Vote { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; -} - -// Commit contains the evidence that a block was committed by a set of validators. -message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; -} - -// CommitSig is a part of the Vote included in a Commit. -message CommitSig { - BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; -} - -message Proposal { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - int32 pol_round = 4; - BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; -} - -message SignedHeader { - Header header = 1; - Commit commit = 2; -} - -message LightBlock { - SignedHeader signed_header = 1; - tendermint.types.ValidatorSet validator_set = 2; -} - -message BlockMeta { - BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - int64 block_size = 2; - Header header = 3 [(gogoproto.nullable) = false]; - int64 num_txs = 4; -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -message TxProof { - bytes root_hash = 1; - bytes data = 2; - tendermint.crypto.Proof proof = 3; -} diff --git a/third_party/proto/tendermint/types/validator.proto b/third_party/proto/tendermint/types/validator.proto deleted file mode 100644 index 49860b96d..000000000 --- a/third_party/proto/tendermint/types/validator.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/crypto/keys.proto"; - -message ValidatorSet { - repeated Validator validators = 1; - Validator proposer = 2; - int64 total_voting_power = 3; -} - -message Validator { - bytes address = 1; - tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -message SimpleValidator { - tendermint.crypto.PublicKey pub_key = 1; - int64 voting_power = 2; -} diff --git a/third_party/proto/tendermint/version/types.proto b/third_party/proto/tendermint/version/types.proto deleted file mode 100644 index 6061868bd..000000000 --- a/third_party/proto/tendermint/version/types.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package tendermint.version; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; - -import "gogoproto/gogo.proto"; - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -message App { - uint64 protocol = 1; - string software = 2; -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -message Consensus { - option (gogoproto.equal) = true; - - uint64 block = 1; - uint64 app = 2; -} diff --git a/types/runtime.go b/types/runtime.go index d2574bc33..a133f7925 100644 --- a/types/runtime.go +++ b/types/runtime.go @@ -5,7 +5,7 @@ import ( "os" "path/filepath" - "github.com/tendermint/tendermint/crypto" + "github.com/cometbft/cometbft/crypto" sdk "github.com/cosmos/cosmos-sdk/types" From 14a64794b9f8d883b0313be8f45eb47173787ebe Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Fri, 7 Jul 2023 14:54:00 +0800 Subject: [PATCH 02/15] fix error --- app/app.go | 28 +- app/sim_bench_test.go | 9 - app/sim_test.go | 25 - app/upgrades/v110/htlc/migrate.go | 4 +- app/upgrades/v110/service/migrate.go | 4 +- cmd/iris/cmd/genesis.go | 2 +- cmd/iris/cmd/root.go | 66 +-- server/start.go | 713 --------------------------- server/utils.go | 128 ----- 9 files changed, 21 insertions(+), 958 deletions(-) delete mode 100644 server/start.go delete mode 100644 server/utils.go diff --git a/app/app.go b/app/app.go index 4a93b7024..e551693de 100644 --- a/app/app.go +++ b/app/app.go @@ -13,11 +13,13 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -108,7 +110,6 @@ import ( "github.com/irisnet/irishub/address" irishubante "github.com/irisnet/irishub/ante" - irisappparams "github.com/irisnet/irishub/app/params" "github.com/irisnet/irishub/lite" guardiankeeper "github.com/irisnet/irishub/modules/guardian/keeper" guardiantypes "github.com/irisnet/irishub/modules/guardian/types" @@ -132,8 +133,6 @@ type IrisApp struct { interfaceRegistry types.InterfaceRegistry configurator module.Configurator - invCheckPeriod uint - // keys to access the substores keys map[string]*storetypes.KVStoreKey tkeys map[string]*storetypes.TransientStoreKey @@ -205,13 +204,10 @@ func NewIrisApp( db dbm.DB, traceStore io.Writer, loadLatest bool, - skipUpgradeHeights map[int64]bool, - homePath string, - invCheckPeriod uint, - encodingConfig irisappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *IrisApp { + encodingConfig := MakeConfig(ModuleBasics) appCodec := encodingConfig.Marshaler legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry @@ -280,7 +276,6 @@ func NewIrisApp( legacyAmino: legacyAmino, appCodec: appCodec, interfaceRegistry: interfaceRegistry, - invCheckPeriod: invCheckPeriod, keys: keys, tkeys: tkeys, memKeys: memKeys, @@ -370,6 +365,7 @@ func NewIrisApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) app.CrisisKeeper = crisiskeeper.NewKeeper( appCodec, keys[crisistypes.StoreKey], @@ -385,6 +381,12 @@ func NewIrisApp( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) + // get skipUpgradeHeights from the app options + skipUpgradeHeights := map[int64]bool{} + for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { + skipUpgradeHeights[int64(h)] = true + } + homePath := cast.ToString(appOpts.Get(flags.FlagHome)) // set the governance module account as the authority for conducting upgrades // UpgradeKeeper must be created before IBCKeeper app.UpgradeKeeper = upgradekeeper.NewKeeper( @@ -564,17 +566,7 @@ func NewIrisApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - // govRouter := govv1beta1.NewRouter() - // govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - // AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - // AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). - // AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). - // AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). - // AddRoute(tibchost.RouterKey, tibccli.NewProposalHandler(app.TIBCKeeper)). - // AddRoute(farmtypes.RouterKey, farm.NewCommunityPoolCreateFarmProposalHandler(app.FarmKeeper)) - govConfig := govtypes.DefaultConfig() - app.GovKeeper = govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], diff --git a/app/sim_bench_test.go b/app/sim_bench_test.go index b28ca1972..18fd7a507 100644 --- a/app/sim_bench_test.go +++ b/app/sim_bench_test.go @@ -6,7 +6,6 @@ import ( "testing" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/irisnet/irishub/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -49,10 +48,6 @@ func BenchmarkFullAppSimulation(b *testing.B) { db, nil, true, - map[int64]bool{}, - types.DefaultNodeHome, - simcli.FlagPeriodValue, - MakeEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt(), ) @@ -117,10 +112,6 @@ func BenchmarkInvariants(b *testing.B) { db, nil, true, - map[int64]bool{}, - types.DefaultNodeHome, - simcli.FlagPeriodValue, - MakeEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt(), ) diff --git a/app/sim_test.go b/app/sim_test.go index 8715a0748..466bc10eb 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -9,7 +9,6 @@ import ( "strings" "testing" - "github.com/irisnet/irishub/types" iristypes "github.com/irisnet/irishub/types" coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" htlctypes "github.com/irisnet/irismod/modules/htlc/types" @@ -101,10 +100,6 @@ func TestFullAppSimulation(t *testing.T) { db, nil, true, - map[int64]bool{}, - types.DefaultNodeHome, - simcli.FlagPeriodValue, - MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt, ) @@ -160,10 +155,6 @@ func TestAppImportExport(t *testing.T) { db, nil, true, - map[int64]bool{}, - types.DefaultNodeHome, - simcli.FlagPeriodValue, - MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt, ) @@ -217,10 +208,6 @@ func TestAppImportExport(t *testing.T) { newDB, nil, true, - map[int64]bool{}, - types.DefaultNodeHome, - simcli.FlagPeriodValue, - MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt, ) @@ -344,10 +331,6 @@ func TestAppSimulationAfterImport(t *testing.T) { db, nil, true, - map[int64]bool{}, - types.DefaultNodeHome, - simcli.FlagPeriodValue, - MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt, ) @@ -406,10 +389,6 @@ func TestAppSimulationAfterImport(t *testing.T) { newDB, nil, true, - map[int64]bool{}, - types.DefaultNodeHome, - simcli.FlagPeriodValue, - MakeEncodingConfig(), EmptyAppOptions{}, fauxMerkleModeOpt, ) @@ -468,10 +447,6 @@ func TestAppStateDeterminism(t *testing.T) { db, nil, true, - map[int64]bool{}, - types.DefaultNodeHome, - simcli.FlagPeriodValue, - MakeEncodingConfig(), EmptyAppOptions{}, interBlockCacheOpt(), ) diff --git a/app/upgrades/v110/htlc/migrate.go b/app/upgrades/v110/htlc/migrate.go index a8bc8b0d5..676ef4979 100644 --- a/app/upgrades/v110/htlc/migrate.go +++ b/app/upgrades/v110/htlc/migrate.go @@ -94,9 +94,7 @@ func Migrate( } // Set default params - k.SetParams(ctx, PresetHTLTParams()) - - return nil + return k.SetParams(ctx, PresetHTLTParams()) } func PresetHTLTParams() htlctypes.Params { diff --git a/app/upgrades/v110/service/migrate.go b/app/upgrades/v110/service/migrate.go index f62497eab..492967572 100644 --- a/app/upgrades/v110/service/migrate.go +++ b/app/upgrades/v110/service/migrate.go @@ -30,7 +30,9 @@ func Migrate(ctx sdk.Context, k servicekeeper.Keeper, bk bankkeeper.Keeper) erro false, ) - k.SetParams(ctx, params) + if err := k.SetParams(ctx, params); err != nil { + return err + } return bk.SendCoinsFromAccountToModule( ctx, oldAcc, diff --git a/cmd/iris/cmd/genesis.go b/cmd/iris/cmd/genesis.go index 7f5ef96dd..72093487f 100644 --- a/cmd/iris/cmd/genesis.go +++ b/cmd/iris/cmd/genesis.go @@ -31,7 +31,7 @@ func mergeGenesisCmd(encodingConfig params.EncodingConfig) *cobra.Command { cmd := &cobra.Command{ Use: "merge-genesis", Short: "merge genesis with testnet and mainnet", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { testnetGenesisPath, err := cmd.Flags().GetString(testnetFile) if err != nil { return err diff --git a/cmd/iris/cmd/root.go b/cmd/iris/cmd/root.go index a14a8197e..28951f754 100644 --- a/cmd/iris/cmd/root.go +++ b/cmd/iris/cmd/root.go @@ -5,9 +5,7 @@ import ( "fmt" "io" "os" - "path/filepath" - "github.com/spf13/cast" "github.com/spf13/cobra" dbm "github.com/cometbft/cometbft-db" @@ -15,7 +13,6 @@ import ( tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cometbft/cometbft/libs/log" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/flags" @@ -23,10 +20,6 @@ import ( "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/server" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/snapshots" - snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" - "github.com/cosmos/cosmos-sdk/store" - sdk "github.com/cosmos/cosmos-sdk/types" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -35,11 +28,11 @@ import ( ethermintdebug "github.com/evmos/ethermint/client/debug" etherminthd "github.com/evmos/ethermint/crypto/hd" + ethermintserver "github.com/evmos/ethermint/server" servercfg "github.com/evmos/ethermint/server/config" "github.com/irisnet/irishub/app" "github.com/irisnet/irishub/app/params" - irisserver "github.com/irisnet/irishub/server" iristypes "github.com/irisnet/irishub/types" ) @@ -142,10 +135,9 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { pruning.PruningCmd(ac.newApp), ) - irisserver.AddCommands( + ethermintserver.AddCommands( rootCmd, - iristypes.DefaultNodeHome, - ac.newApp, + ethermintserver.NewDefaultStartOptions(ac.newApp, iristypes.DefaultNodeHome), ac.appExport, addModuleInitFlags, ) @@ -238,53 +230,11 @@ func (ac appCreator) newApp( traceStore io.Writer, appOpts servertypes.AppOptions, ) servertypes.Application { - var cache sdk.MultiStorePersistentCache - - if cast.ToBool(appOpts.Get(server.FlagInterBlockCache)) { - cache = store.NewCommitKVStoreCacheManager() - } - - skipUpgradeHeights := make(map[int64]bool) - for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) { - skipUpgradeHeights[int64(h)] = true - } - - pruningOpts, err := server.GetPruningOptionsFromFlags(appOpts) - if err != nil { - panic(err) - } - - snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") - snapshotDB, err := dbm.NewDB("metadata", server.GetAppDBBackend(appOpts), snapshotDir) - if err != nil { - panic(err) - } - snapshotStore, err := snapshots.NewStore(snapshotDB, snapshotDir) - if err != nil { - panic(err) - } - snapshotOptions := snapshottypes.NewSnapshotOptions( - cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval)), - cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent)), - ) - + baseappOptions := server.DefaultBaseappOptions(appOpts) return app.NewIrisApp( - logger, db, traceStore, true, skipUpgradeHeights, - cast.ToString(appOpts.Get(flags.FlagHome)), - cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - ac.encCfg, // Ideally, we would reuse the one created by NewRootCmd. + logger, db, traceStore, true, appOpts, - baseapp.SetPruning(pruningOpts), - baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))), - baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(server.FlagHaltHeight))), - baseapp.SetHaltTime(cast.ToUint64(appOpts.Get(server.FlagHaltTime))), - baseapp.SetMinRetainBlocks(cast.ToUint64(appOpts.Get(server.FlagMinRetainBlocks))), - baseapp.SetInterBlockCache(cache), - baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), - baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), - baseapp.SetSnapshot(snapshotStore, snapshotOptions), - baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), - baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagDisableIAVLFastNode))), + baseappOptions..., ) } @@ -314,10 +264,6 @@ func (ac appCreator) appExport( db, traceStore, loadLatest, - map[int64]bool{}, - homePath, - cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - ac.encCfg, appOpts, ) diff --git a/server/start.go b/server/start.go deleted file mode 100644 index f89c2c88b..000000000 --- a/server/start.go +++ /dev/null @@ -1,713 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "io" - "net" - "net/http" - "os" - "path/filepath" - "runtime/pprof" - "time" - - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/telemetry" - - "github.com/spf13/cobra" - - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - - dbm "github.com/cometbft/cometbft-db" - abciserver "github.com/cometbft/cometbft/abci/server" - tcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" - tmos "github.com/cometbft/cometbft/libs/os" - "github.com/cometbft/cometbft/node" - "github.com/cometbft/cometbft/p2p" - pvm "github.com/cometbft/cometbft/privval" - "github.com/cometbft/cometbft/proxy" - rpcclient "github.com/cometbft/cometbft/rpc/client" - "github.com/cometbft/cometbft/rpc/client/local" - - ethmetricsexp "github.com/ethereum/go-ethereum/metrics/exp" - - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/server" - "github.com/cosmos/cosmos-sdk/server/api" - serverconfig "github.com/cosmos/cosmos-sdk/server/config" - servergrpc "github.com/cosmos/cosmos-sdk/server/grpc" - "github.com/cosmos/cosmos-sdk/server/types" - pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" - - "github.com/evmos/ethermint/indexer" - ethdebug "github.com/evmos/ethermint/rpc/namespaces/ethereum/debug" - ethermintserver "github.com/evmos/ethermint/server" - "github.com/evmos/ethermint/server/config" - srvflags "github.com/evmos/ethermint/server/flags" - ethermint "github.com/evmos/ethermint/types" -) - -// StartCmd runs the service passed in, either stand-alone or in-process with -// Tendermint. -func StartCmd(appCreator types.AppCreator, defaultNodeHome string) *cobra.Command { - cmd := &cobra.Command{ - Use: "start", - Short: "Run the full node", - Long: `Run the full node application with Tendermint in or out of process. By -default, the application will run with Tendermint in process. - -Pruning options can be provided via the '--pruning' flag or alternatively with '--pruning-keep-recent', -'pruning-keep-every', and 'pruning-interval' together. - -For '--pruning' the options are as follows: - -default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals -nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) -everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals -custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' - -Node halting configurations exist in the form of two flags: '--halt-height' and '--halt-time'. During -the ABCI Commit phase, the node will check if the current block height is greater than or equal to -the halt-height or if the current block time is greater than or equal to the halt-time. If so, the -node will attempt to gracefully shutdown and the block will not be committed. In addition, the node -will not be able to commit subsequent blocks. - -For profiling and benchmarking purposes, CPU profiling can be enabled via the '--cpu-profile' flag -which accepts a path for the resulting pprof file. -`, - PreRunE: func(cmd *cobra.Command, _ []string) error { - serverCtx := server.GetServerContextFromCmd(cmd) - - // Bind flags to the Context's Viper so the app construction can set - // options accordingly. - err := serverCtx.Viper.BindPFlags(cmd.Flags()) - if err != nil { - return err - } - - _, err = server.GetPruningOptionsFromFlags(serverCtx.Viper) - return err - }, - RunE: func(cmd *cobra.Command, _ []string) error { - serverCtx := server.GetServerContextFromCmd(cmd) - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - withTM, _ := cmd.Flags().GetBool(srvflags.WithTendermint) - if !withTM { - serverCtx.Logger.Info("starting ABCI without Tendermint") - return startStandAlone(serverCtx, appCreator) - } - - serverCtx.Logger.Info("Unlocking keyring") - - // fire unlock precess for keyring - keyringBackend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend) - if keyringBackend == keyring.BackendFile { - _, err = clientCtx.Keyring.List() - if err != nil { - return err - } - } - - serverCtx.Logger.Info("starting ABCI with Tendermint") - - // amino is needed here for backwards compatibility of REST routes - err = startInProcess(serverCtx, clientCtx, appCreator) - errCode, ok := err.(server.ErrorCode) - if !ok { - return err - } - - serverCtx.Logger.Debug(fmt.Sprintf("received quit signal: %d", errCode.Code)) - return nil - }, - } - - cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") - cmd.Flags(). - Bool(srvflags.WithTendermint, true, "Run abci app embedded in-process with tendermint") - cmd.Flags().String(srvflags.Address, "tcp://0.0.0.0:26658", "Listen address") - cmd.Flags().String(srvflags.Transport, "socket", "Transport protocol: socket, grpc") - cmd.Flags().String(srvflags.TraceStore, "", "Enable KVStore tracing to an output file") - cmd.Flags(). - String(server.FlagMinGasPrices, "", "Minimum gas prices to accept for transactions; Any fee in a tx must meet this minimum (e.g. 0.01photon;0.0001stake)") - - //nolint:lll - cmd.Flags(). - IntSlice(server.FlagUnsafeSkipUpgrades, []int{}, "Skip a set of upgrade heights to continue the old binary") - cmd.Flags(). - Uint64(server.FlagHaltHeight, 0, "Block height at which to gracefully halt the chain and shutdown the node") - cmd.Flags(). - Uint64(server.FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node") - cmd.Flags().Bool(server.FlagInterBlockCache, true, "Enable inter-block caching") - cmd.Flags(). - String(srvflags.CPUProfile, "", "Enable CPU profiling and write to the provided file") - cmd.Flags().Bool(server.FlagTrace, false, "Provide full stack traces for errors in ABCI Log") - cmd.Flags(). - String(server.FlagPruning, pruningtypes.PruningOptionDefault, "Pruning strategy (default|nothing|everything|custom)") - cmd.Flags(). - Uint64(server.FlagPruningKeepRecent, 0, "Number of recent heights to keep on disk (ignored if pruning is not 'custom')") - cmd.Flags(). - Uint64(server.FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") - - //nolint:lll - cmd.Flags().Uint(server.FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") - cmd.Flags(). - Uint64(server.FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks") - cmd.Flags(). - String(srvflags.AppDBBackend, "", "The type of database for application and snapshots databases") - - cmd.Flags(). - Bool(srvflags.GRPCOnly, false, "Start the node in gRPC query only mode without Tendermint process") - cmd.Flags().Bool(srvflags.GRPCEnable, true, "Define if the gRPC server should be enabled") - cmd.Flags(). - String(srvflags.GRPCAddress, serverconfig.DefaultGRPCAddress, "the gRPC server address to listen on") - cmd.Flags(). - Bool(srvflags.GRPCWebEnable, true, "Define if the gRPC-Web server should be enabled. (Note: gRPC must also be enabled.)") - cmd.Flags(). - String(srvflags.GRPCWebAddress, serverconfig.DefaultGRPCWebAddress, "The gRPC-Web server address to listen on") - - cmd.Flags(). - Bool(srvflags.RPCEnable, false, "Defines if Cosmos-sdk REST server should be enabled") - cmd.Flags(). - Bool(srvflags.EnabledUnsafeCors, false, "Defines if CORS should be enabled (unsafe - use it at your own risk)") - - cmd.Flags(). - Bool(srvflags.JSONRPCEnable, true, "Define if the JSON-RPC server should be enabled") - cmd.Flags(). - StringSlice(srvflags.JSONRPCAPI, config.GetDefaultAPINamespaces(), "Defines a list of JSON-RPC namespaces that should be enabled") - cmd.Flags(). - String(srvflags.JSONRPCAddress, config.DefaultJSONRPCAddress, "the JSON-RPC server address to listen on") - cmd.Flags(). - String(srvflags.JSONWsAddress, config.DefaultJSONRPCWsAddress, "the JSON-RPC WS server address to listen on") - cmd.Flags(). - Uint64(srvflags.JSONRPCGasCap, config.DefaultGasCap, "Sets a cap on gas that can be used in eth_call/estimateGas unit is aphoton (0=infinite)") - - //nolint:lll - cmd.Flags(). - Float64(srvflags.JSONRPCTxFeeCap, config.DefaultTxFeeCap, "Sets a cap on transaction fee that can be sent via the RPC APIs (1 = default 1 photon)") - - //nolint:lll - cmd.Flags(). - Int32(srvflags.JSONRPCFilterCap, config.DefaultFilterCap, "Sets the global cap for total number of filters that can be created") - cmd.Flags(). - Duration(srvflags.JSONRPCEVMTimeout, config.DefaultEVMTimeout, "Sets a timeout used for eth_call (0=infinite)") - cmd.Flags(). - Duration(srvflags.JSONRPCHTTPTimeout, config.DefaultHTTPTimeout, "Sets a read/write timeout for json-rpc http server (0=infinite)") - cmd.Flags(). - Duration(srvflags.JSONRPCHTTPIdleTimeout, config.DefaultHTTPIdleTimeout, "Sets a idle timeout for json-rpc http server (0=infinite)") - cmd.Flags(). - Bool(srvflags.JSONRPCAllowUnprotectedTxs, config.DefaultAllowUnprotectedTxs, "Allow for unprotected (non EIP155 signed) transactions to be submitted via the node's RPC when the global parameter is disabled") - - //nolint:lll - cmd.Flags(). - Int32(srvflags.JSONRPCLogsCap, config.DefaultLogsCap, "Sets the max number of results can be returned from single `eth_getLogs` query") - cmd.Flags(). - Int32(srvflags.JSONRPCBlockRangeCap, config.DefaultBlockRangeCap, "Sets the max block range allowed for `eth_getLogs` query") - cmd.Flags(). - Int(srvflags.JSONRPCMaxOpenConnections, config.DefaultMaxOpenConnections, "Sets the maximum number of simultaneous connections for the server listener") - - //nolint:lll - cmd.Flags(). - Bool(srvflags.JSONRPCEnableIndexer, false, "Enable the custom tx indexer for json-rpc") - cmd.Flags(). - Bool(srvflags.JSONRPCEnableMetrics, false, "Define if EVM rpc metrics server should be enabled") - - cmd.Flags(). - String(srvflags.EVMTracer, config.DefaultEVMTracer, "the EVM tracer type to collect execution traces from the EVM transaction execution (json|struct|access_list|markdown)") - - //nolint:lll - cmd.Flags(). - Uint64(srvflags.EVMMaxTxGasWanted, config.DefaultMaxTxGasWanted, "the gas wanted for each eth tx returned in ante handler in check tx mode") - - //nolint:lll - - cmd.Flags(). - String(srvflags.TLSCertPath, "", "the cert.pem file path for the server TLS configuration") - cmd.Flags(). - String(srvflags.TLSKeyPath, "", "the key.pem file path for the server TLS configuration") - - cmd.Flags().Uint64(server.FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") - cmd.Flags().Uint32(server.FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") - // add support for all Tendermint-specific command line options - tcmd.AddNodeFlags(cmd) - return cmd -} - -func startStandAlone(ctx *server.Context, appCreator types.AppCreator) error { - addr := ctx.Viper.GetString(srvflags.Address) - transport := ctx.Viper.GetString(srvflags.Transport) - home := ctx.Viper.GetString(flags.FlagHome) - - db, err := openDB(home, server.GetAppDBBackend(ctx.Viper)) - if err != nil { - return err - } - - defer func() { - if err := db.Close(); err != nil { - ctx.Logger.Error("error closing db", "error", err.Error()) - } - }() - - traceWriterFile := ctx.Viper.GetString(srvflags.TraceStore) - traceWriter, err := openTraceWriter(traceWriterFile) - if err != nil { - return err - } - - app := appCreator(ctx.Logger, db, traceWriter, ctx.Viper) - - config, err := config.GetConfig(ctx.Viper) - if err != nil { - ctx.Logger.Error("failed to get server config", "error", err.Error()) - return err - } - - if err := config.ValidateBasic(); err != nil { - ctx.Logger.Error("invalid server config", "error", err.Error()) - return err - } - - _, err = startTelemetry(config) - if err != nil { - return err - } - - svr, err := abciserver.NewServer(addr, transport, app) - if err != nil { - return fmt.Errorf("error creating listener: %v", err) - } - - svr.SetLogger(ctx.Logger.With("server", "abci")) - - err = svr.Start() - if err != nil { - tmos.Exit(err.Error()) - } - - defer func() { - if err = svr.Stop(); err != nil { - tmos.Exit(err.Error()) - } - }() - - // Wait for SIGINT or SIGTERM signal - return server.WaitForQuitSignals() -} - -// legacyAminoCdc is used for the legacy REST API -func startInProcess( - ctx *server.Context, - clientCtx client.Context, - appCreator types.AppCreator, -) (err error) { - cfg := ctx.Config - home := cfg.RootDir - logger := ctx.Logger - - if cpuProfile := ctx.Viper.GetString(srvflags.CPUProfile); cpuProfile != "" { - fp, err := ethdebug.ExpandHome(cpuProfile) - if err != nil { - ctx.Logger.Debug( - "failed to get filepath for the CPU profile file", - "error", - err.Error(), - ) - return err - } - - f, err := os.Create(fp) - if err != nil { - return err - } - - ctx.Logger.Info("starting CPU profiler", "profile", cpuProfile) - if err := pprof.StartCPUProfile(f); err != nil { - return err - } - - defer func() { - ctx.Logger.Info("stopping CPU profiler", "profile", cpuProfile) - pprof.StopCPUProfile() - if err := f.Close(); err != nil { - logger.Error("failed to close CPU profiler file", "error", err.Error()) - } - }() - } - - db, err := openDB(home, server.GetAppDBBackend(ctx.Viper)) - if err != nil { - logger.Error("failed to open DB", "error", err.Error()) - return err - } - - defer func() { - if err := db.Close(); err != nil { - ctx.Logger.With("error", err).Error("error closing db") - } - }() - - traceWriterFile := ctx.Viper.GetString(srvflags.TraceStore) - traceWriter, err := openTraceWriter(traceWriterFile) - if err != nil { - logger.Error("failed to open trace writer", "error", err.Error()) - return err - } - - config, err := config.GetConfig(ctx.Viper) - if err != nil { - logger.Error("failed to get server config", "error", err.Error()) - return err - } - - if err := config.ValidateBasic(); err != nil { - logger.Error("invalid server config", "error", err.Error()) - return err - } - - app := appCreator(ctx.Logger, db, traceWriter, ctx.Viper) - - nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile()) - if err != nil { - logger.Error("failed load or gen node key", "error", err.Error()) - return err - } - - genDocProvider := node.DefaultGenesisDocProviderFunc(cfg) - - var ( - tmNode *node.Node - gRPCOnly = ctx.Viper.GetBool(srvflags.GRPCOnly) - ) - - if gRPCOnly { - logger.Info("starting node in query only mode; Tendermint is disabled") - config.GRPC.Enable = true - config.JSONRPC.EnableIndexer = false - } else { - logger.Info("starting node with ABCI Tendermint in-process") - - tmNode, err = node.NewNode( - cfg, - pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()), - nodeKey, - proxy.NewLocalClientCreator(app), - genDocProvider, - node.DefaultDBProvider, - node.DefaultMetricsProvider(cfg.Instrumentation), - ctx.Logger.With("server", "node"), - ) - if err != nil { - logger.Error("failed init node", "error", err.Error()) - return err - } - - if err := tmNode.Start(); err != nil { - logger.Error("failed start tendermint server", "error", err.Error()) - return err - } - - defer func() { - if tmNode.IsRunning() { - _ = tmNode.Stop() - } - }() - } - - // Add the tx service to the gRPC router. We only need to register this - // service if API or gRPC or JSONRPC is enabled, and avoid doing so in the general - // case, because it spawns a new local tendermint RPC client. - if (config.API.Enable || config.GRPC.Enable || config.JSONRPC.Enable || config.JSONRPC.EnableIndexer) && - tmNode != nil { - clientCtx = clientCtx.WithClient(local.New(tmNode)) - - app.RegisterTxService(clientCtx) - app.RegisterTendermintService(clientCtx) - app.RegisterNodeService(clientCtx) - } - - metrics, err := startTelemetry(config) - if err != nil { - return err - } - - // Enable metrics if JSONRPC is enabled and --metrics is passed - // Flag not added in config to avoid user enabling in config without passing in CLI - if config.JSONRPC.Enable && ctx.Viper.GetBool(srvflags.JSONRPCEnableMetrics) { - ethmetricsexp.Setup(config.JSONRPC.MetricsAddress) - } - - var idxer ethermint.EVMTxIndexer - if config.JSONRPC.EnableIndexer { - idxDB, err := OpenIndexerDB(home, server.GetAppDBBackend(ctx.Viper)) - if err != nil { - logger.Error("failed to open evm indexer DB", "error", err.Error()) - return err - } - - idxLogger := ctx.Logger.With("indexer", "evm") - idxer = indexer.NewKVIndexer(idxDB, idxLogger, clientCtx) - client, ok := clientCtx.Client.(rpcclient.Client) - if !ok { - return errors.New("clientCtx.Client not implements rpcclient.Client") - } - indexerService := ethermintserver.NewEVMIndexerService( - idxer, - client, - ) - indexerService.SetLogger(idxLogger) - - errCh := make(chan error) - go func() { - if err := indexerService.Start(); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } - } - - if config.API.Enable || config.JSONRPC.Enable { - genDoc, err := genDocProvider() - if err != nil { - return err - } - - clientCtx = clientCtx. - WithHomeDir(home). - WithChainID(genDoc.ChainID) - - // Set `GRPCClient` to `clientCtx` to enjoy concurrent grpc query. - // only use it if gRPC server is enabled. - if config.GRPC.Enable { - _, port, err := net.SplitHostPort(config.GRPC.Address) - if err != nil { - return errorsmod.Wrapf(err, "invalid grpc address %s", config.GRPC.Address) - } - - maxSendMsgSize := config.GRPC.MaxSendMsgSize - if maxSendMsgSize == 0 { - maxSendMsgSize = serverconfig.DefaultGRPCMaxSendMsgSize - } - - maxRecvMsgSize := config.GRPC.MaxRecvMsgSize - if maxRecvMsgSize == 0 { - maxRecvMsgSize = serverconfig.DefaultGRPCMaxRecvMsgSize - } - - grpcAddress := fmt.Sprintf("127.0.0.1:%s", port) - - // If grpc is enabled, configure grpc client for grpc gateway and json-rpc. - grpcClient, err := grpc.Dial( - grpcAddress, - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithDefaultCallOptions( - grpc.ForceCodec(codec.NewProtoCodec(clientCtx.InterfaceRegistry).GRPCCodec()), - grpc.MaxCallRecvMsgSize(maxRecvMsgSize), - grpc.MaxCallSendMsgSize(maxSendMsgSize), - ), - ) - if err != nil { - return err - } - - clientCtx = clientCtx.WithGRPCClient(grpcClient) - ctx.Logger.Debug("gRPC client assigned to client context", "address", grpcAddress) - } - } - - var apiSrv *api.Server - if config.API.Enable { - apiSrv = api.New(clientCtx, ctx.Logger.With("server", "api")) - app.RegisterAPIRoutes(apiSrv, config.API) - - if config.Telemetry.Enabled { - apiSrv.SetTelemetry(metrics) - } - - errCh := make(chan error) - go func() { - if err := apiSrv.Start(config.Config); err != nil { - errCh <- err - } - }() - - select { - case err := <-errCh: - return err - case <-time.After(types.ServerStartTime): // assume server started successfully - } - - defer apiSrv.Close() - } - - var ( - grpcSrv *grpc.Server - grpcWebSrv *http.Server - ) - - if config.GRPC.Enable { - grpcSrv, err = servergrpc.StartGRPCServer(clientCtx, app, config.GRPC) - if err != nil { - return err - } - defer grpcSrv.Stop() - if config.GRPCWeb.Enable { - grpcWebSrv, err = servergrpc.StartGRPCWeb(grpcSrv, config.Config) - if err != nil { - ctx.Logger.Error("failed to start grpc-web http server", "error", err.Error()) - return err - } - - defer func() { - if err := grpcWebSrv.Close(); err != nil { - logger.Error("failed to close the grpc-web http server", "error", err.Error()) - } - }() - } - } - - var ( - httpSrv *http.Server - httpSrvDone chan struct{} - ) - - if config.JSONRPC.Enable { - genDoc, err := genDocProvider() - if err != nil { - return err - } - - clientCtx := clientCtx.WithChainID(genDoc.ChainID) - - tmEndpoint := "/websocket" - tmRPCAddr := cfg.RPC.ListenAddress - httpSrv, httpSrvDone, err = ethermintserver.StartJSONRPC( - ctx, - clientCtx, - tmRPCAddr, - tmEndpoint, - &config, - idxer, - ) - if err != nil { - return err - } - defer func() { - shutdownCtx, cancelFn := context.WithTimeout(context.Background(), 10*time.Second) - defer cancelFn() - if err := httpSrv.Shutdown(shutdownCtx); err != nil { - logger.Error("HTTP server shutdown produced a warning", "error", err.Error()) - } else { - logger.Info("HTTP server shut down, waiting 5 sec") - select { - case <-time.Tick(5 * time.Second): - case <-httpSrvDone: - } - } - }() - } - - // At this point it is safe to block the process if we're in query only mode as - // we do not need to start Rosetta or handle any Tendermint related processes. - if gRPCOnly { - // wait for signal capture and gracefully return - return server.WaitForQuitSignals() - } - - // var rosettaSrv crgserver.Server - // if config.Rosetta.Enable { - // offlineMode := config.Rosetta.Offline - - // // If GRPC is not enabled rosetta cannot work in online mode, so it works in - // // offline mode. - // if !config.GRPC.Enable { - // offlineMode = true - // } - - // minGasPrices, err := sdk.ParseDecCoins(config.MinGasPrices) - // if err != nil { - // ctx.Logger.Error("failed to parse minimum-gas-prices", "error", err.Error()) - // return err - // } - - // conf := &rosetta.Config{ - // Blockchain: config.Rosetta.Blockchain, - // Network: config.Rosetta.Network, - // TendermintRPC: ctx.Config.RPC.ListenAddress, - // GRPCEndpoint: config.GRPC.Address, - // Addr: config.Rosetta.Address, - // Retries: config.Rosetta.Retries, - // Offline: offlineMode, - // GasToSuggest: config.Rosetta.GasToSuggest, - // EnableFeeSuggestion: config.Rosetta.EnableFeeSuggestion, - // GasPrices: minGasPrices.Sort(), - // Codec: clientCtx.Codec.(*codec.ProtoCodec), - // InterfaceRegistry: clientCtx.InterfaceRegistry, - // } - - // rosettaSrv, err = rosetta.ServerFromConfig(conf) - // if err != nil { - // return err - // } - - // errCh := make(chan error) - // go func() { - // if err := rosettaSrv.Start(); err != nil { - // errCh <- err - // } - // }() - - // select { - // case err := <-errCh: - // return err - // case <-time.After(types.ServerStartTime): // assume server started successfully - // } - // } - // Wait for SIGINT or SIGTERM signal - return server.WaitForQuitSignals() -} - -func openDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error) { - dataDir := filepath.Join(rootDir, "data") - return dbm.NewDB("application", backendType, dataDir) -} - -// OpenIndexerDB opens the custom eth indexer db, using the same db backend as the main app -func OpenIndexerDB(rootDir string, backendType dbm.BackendType) (dbm.DB, error) { - dataDir := filepath.Join(rootDir, "data") - return dbm.NewDB("evmindexer", backendType, dataDir) -} - -func openTraceWriter(traceWriterFile string) (w io.Writer, err error) { - if traceWriterFile == "" { - return - } - - filePath := filepath.Clean(traceWriterFile) - return os.OpenFile( - filePath, - os.O_WRONLY|os.O_APPEND|os.O_CREATE, - 0o600, - ) -} - -func startTelemetry(cfg config.Config) (*telemetry.Metrics, error) { - if !cfg.Telemetry.Enabled { - return nil, nil - } - return telemetry.New(cfg.Telemetry) -} diff --git a/server/utils.go b/server/utils.go deleted file mode 100644 index 061078951..000000000 --- a/server/utils.go +++ /dev/null @@ -1,128 +0,0 @@ -package server - -import ( - "net" - "net/http" - "time" - - "github.com/evmos/ethermint/server/config" - "github.com/gorilla/mux" - "github.com/improbable-eng/grpc-web/go/grpcweb" - "github.com/spf13/cobra" - "golang.org/x/net/netutil" - - sdkserver "github.com/cosmos/cosmos-sdk/server" - "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/version" - - tmcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" - tmlog "github.com/cometbft/cometbft/libs/log" - rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" - - ethermintserver "github.com/evmos/ethermint/server" -) - -// AddCommands adds server commands -func AddCommands( - rootCmd *cobra.Command, - defaultNodeHome string, - appCreator types.AppCreator, - appExport types.AppExporter, - addStartFlags types.ModuleInitFlags, -) { - tendermintCmd := &cobra.Command{ - Use: "tendermint", - Short: "Tendermint subcommands", - } - - tendermintCmd.AddCommand( - sdkserver.ShowNodeIDCmd(), - sdkserver.ShowValidatorCmd(), - sdkserver.ShowAddressCmd(), - sdkserver.VersionCmd(), - tmcmd.ResetAllCmd, - tmcmd.ResetStateCmd, - ) - - startCmd := StartCmd(appCreator, defaultNodeHome) - addStartFlags(startCmd) - - rootCmd.AddCommand( - startCmd, - tendermintCmd, - sdkserver.ExportCmd(appExport, defaultNodeHome), - version.NewVersionCommand(), - sdkserver.NewRollbackCmd(appCreator, defaultNodeHome), - - // custom tx indexer command - ethermintserver.NewIndexTxCmd(), - ) -} - -func ConnectTmWS(tmRPCAddr, tmEndpoint string, logger tmlog.Logger) *rpcclient.WSClient { - tmWsClient, err := rpcclient.NewWS(tmRPCAddr, tmEndpoint, - rpcclient.MaxReconnectAttempts(256), - rpcclient.ReadWait(120*time.Second), - rpcclient.WriteWait(120*time.Second), - rpcclient.PingPeriod(50*time.Second), - rpcclient.OnReconnect(func() { - logger.Debug("EVM RPC reconnects to Tendermint WS", "address", tmRPCAddr+tmEndpoint) - }), - ) - - if err != nil { - logger.Error( - "Tendermint WS client could not be created", - "address", tmRPCAddr+tmEndpoint, - "error", err, - ) - } else if err := tmWsClient.OnStart(); err != nil { - logger.Error( - "Tendermint WS client could not start", - "address", tmRPCAddr+tmEndpoint, - "error", err, - ) - } - - return tmWsClient -} - -func MountGRPCWebServices( - router *mux.Router, - grpcWeb *grpcweb.WrappedGrpcServer, - grpcResources []string, - logger tmlog.Logger, -) { - for _, res := range grpcResources { - logger.Info("[GRPC Web] HTTP POST mounted", "resource", res) - - s := router.Methods("POST").Subrouter() - s.HandleFunc(res, func(resp http.ResponseWriter, req *http.Request) { - if grpcWeb.IsGrpcWebSocketRequest(req) { - grpcWeb.HandleGrpcWebsocketRequest(resp, req) - return - } - - if grpcWeb.IsGrpcWebRequest(req) { - grpcWeb.HandleGrpcWebRequest(resp, req) - return - } - }) - } -} - -// Listen starts a net.Listener on the tcp network on the given address. -// If there is a specified MaxOpenConnections in the config, it will also set the limitListener. -func Listen(addr string, config *config.Config) (net.Listener, error) { - if addr == "" { - addr = ":http" - } - ln, err := net.Listen("tcp", addr) - if err != nil { - return nil, err - } - if config.JSONRPC.MaxOpenConnections > 0 { - ln = netutil.LimitListener(ln, config.JSONRPC.MaxOpenConnections) - } - return ln, err -} From 82d8cdeb8fcac1ea04cca6b8a79b85521c0eec52 Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Mon, 10 Jul 2023 10:11:54 +0800 Subject: [PATCH 03/15] migrate mint params --- app/app.go | 2 +- app/modules.go | 8 +- app/upgrades/types.go | 28 +- app/upgrades/v200/upgrades.go | 11 +- app/upgrades/v210/upgrades.go | 48 ++ modules/mint/abci.go | 10 +- modules/mint/abci_test.go | 4 +- modules/mint/genesis.go | 6 +- modules/mint/keeper/grpc_query.go | 7 +- modules/mint/keeper/grpc_query_test.go | 2 +- modules/mint/keeper/keeper.go | 27 +- modules/mint/keeper/keeper_test.go | 8 +- modules/mint/keeper/migrations.go | 24 + modules/mint/keeper/msg_server.go | 43 ++ modules/mint/keeper/params.go | 35 ++ modules/mint/migrations/v2/migrate.go | 21 + modules/mint/migrations/v2/migrate_test.go | 34 ++ modules/mint/module.go | 33 +- modules/mint/types/codec.go | 10 + modules/mint/types/expected_keepers.go | 13 +- modules/mint/types/keys.go | 1 + modules/mint/types/tx.pb.go | 592 +++++++++++++++++++++ proto/irishub/mint/tx.proto | 42 ++ simapp/app.go | 6 +- 24 files changed, 951 insertions(+), 64 deletions(-) create mode 100644 app/upgrades/v210/upgrades.go create mode 100644 modules/mint/keeper/migrations.go create mode 100644 modules/mint/keeper/msg_server.go create mode 100644 modules/mint/keeper/params.go create mode 100644 modules/mint/migrations/v2/migrate.go create mode 100644 modules/mint/migrations/v2/migrate_test.go create mode 100644 modules/mint/types/tx.pb.go create mode 100644 proto/irishub/mint/tx.proto diff --git a/app/app.go b/app/app.go index e551693de..4a8aee82e 100644 --- a/app/app.go +++ b/app/app.go @@ -341,10 +341,10 @@ func NewIrisApp( app.MintKeeper = mintkeeper.NewKeeper( appCodec, keys[minttypes.StoreKey], - app.GetSubspace(minttypes.ModuleName), app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.DistrKeeper = distrkeeper.NewKeeper( diff --git a/app/modules.go b/app/modules.go index 1518422ef..f7e5706d1 100644 --- a/app/modules.go +++ b/app/modules.go @@ -209,7 +209,11 @@ func appModules( app.BankKeeper, app.GetSubspace(govtypes.ModuleName), ), - mint.NewAppModule(appCodec, app.MintKeeper), + mint.NewAppModule( + appCodec, + app.MintKeeper, + app.GetSubspace(minttypes.ModuleName), + ), slashing.NewAppModule( appCodec, app.SlashingKeeper, @@ -338,7 +342,7 @@ func simulationModules( app.BankKeeper, app.GetSubspace(govtypes.ModuleName), ), - mint.NewAppModule(appCodec, app.MintKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.GetSubspace(minttypes.ModuleName)), feegrantmodule.NewAppModule( appCodec, app.AccountKeeper, diff --git a/app/upgrades/types.go b/app/upgrades/types.go index f4ce455d5..c767a453f 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -10,6 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" tibckeeper "github.com/bianjieai/tibc-go/modules/tibc/core/keeper" @@ -43,18 +45,20 @@ type ConsensusParamsReaderWriter interface { } type AppKeepers struct { - AppCodec codec.Codec - HTLCKeeper htlckeeper.Keeper - AccountKeeper authkeeper.AccountKeeper - BankKeeper bankkeeper.Keeper - ServiceKeeper servicekeeper.Keeper - GetKey func(moduleName string) *storetypes.KVStoreKey - ModuleManager *module.Manager - TIBCkeeper *tibckeeper.Keeper - EvmKeeper *evmkeeper.Keeper - FeeMarketKeeper feemarketkeeper.Keeper - TokenKeeper tokenkeeper.Keeper - ReaderWriter ConsensusParamsReaderWriter + AppCodec codec.Codec + HTLCKeeper htlckeeper.Keeper + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.Keeper + ServiceKeeper servicekeeper.Keeper + GetKey func(moduleName string) *storetypes.KVStoreKey + ModuleManager *module.Manager + TIBCkeeper *tibckeeper.Keeper + EvmKeeper *evmkeeper.Keeper + FeeMarketKeeper feemarketkeeper.Keeper + TokenKeeper tokenkeeper.Keeper + ReaderWriter ConsensusParamsReaderWriter + ConsensusParamsKeeper consensuskeeper.Keeper + ParamsKeeper paramskeeper.Keeper } type upgradeRouter struct { diff --git a/app/upgrades/v200/upgrades.go b/app/upgrades/v200/upgrades.go index ae889e38f..622f66211 100644 --- a/app/upgrades/v200/upgrades.go +++ b/app/upgrades/v200/upgrades.go @@ -36,12 +36,17 @@ func upgradeHandlerConstructor( c module.Configurator, app upgrades.AppKeepers, ) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { fromVM[evmtypes.ModuleName] = irisevm.AppModule{}.ConsensusVersion() fromVM[feemarkettypes.ModuleName] = feemarket.AppModule{}.ConsensusVersion() - app.EvmKeeper.SetParams(ctx, evmParams) - app.FeeMarketKeeper.SetParams(ctx, generateFeemarketParams(ctx.BlockHeight())) + if err := app.EvmKeeper.SetParams(ctx, evmParams); err != nil { + return nil, err + } + + if err := app.FeeMarketKeeper.SetParams(ctx, generateFeemarketParams(ctx.BlockHeight())); err != nil { + return nil, err + } //transfer token ownership owner, err := sdk.AccAddressFromBech32(evmToken.Owner) diff --git a/app/upgrades/v210/upgrades.go b/app/upgrades/v210/upgrades.go new file mode 100644 index 000000000..7e653960d --- /dev/null +++ b/app/upgrades/v210/upgrades.go @@ -0,0 +1,48 @@ +package v210 + +import ( + "github.com/cosmos/cosmos-sdk/baseapp" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/irisnet/irishub/app/upgrades" +) + +var Upgrade = upgrades.Upgrade{ + UpgradeName: "v2.1", + UpgradeHandlerConstructor: upgradeHandlerConstructor, + StoreUpgrades: &storetypes.StoreUpgrades{ + Added: []string{crisistypes.StoreKey, consensustypes.StoreKey}, + }, +} + +func upgradeHandlerConstructor( + m *module.Manager, + c module.Configurator, + app upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // this migration is optional + // add proposal ids with proposers which are active (deposit or voting period) + // proposals := make(map[uint64]string) + // proposals[1] = "cosmos1luyncewxk4lm24k6gqy8y5dxkj0klr4tu0lmnj" + // v4.AddProposerAddressToProposal( + // ctx, + // sdk.NewKVStoreKey(v4.ModuleName), + // app.AppCodec, + // proposals, + // ) + + // Migrate Tendermint consensus parameters from x/params module to a + // dedicated x/consensus module. + baseAppLegacySS := app.ParamsKeeper.Subspace(baseapp.Paramspace). + WithKeyTable(paramstypes.ConsensusParamsKeyTable()) + baseapp.MigrateParams(ctx, baseAppLegacySS, &app.ConsensusParamsKeeper) + return app.ModuleManager.RunMigrations(ctx, c, fromVM) + } +} diff --git a/modules/mint/abci.go b/modules/mint/abci.go index fde1ee86f..b932ab493 100644 --- a/modules/mint/abci.go +++ b/modules/mint/abci.go @@ -20,8 +20,14 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { } // Calculate block mint amount - params := k.GetParamSet(ctx) - logger.Info("Mint parameters", "inflation_rate", params.Inflation.String(), "mint_denom", params.MintDenom) + params := k.GetParams(ctx) + logger.Info( + "Mint parameters", + "inflation_rate", + params.Inflation.String(), + "mint_denom", + params.MintDenom, + ) mintedCoin := minter.BlockProvision(params) logger.Info("Mint result", "block_provisions", mintedCoin.String(), "time", blockTime.String()) diff --git a/modules/mint/abci_test.go b/modules/mint/abci_test.go index 45098f129..18f41db75 100644 --- a/modules/mint/abci_test.go +++ b/modules/mint/abci_test.go @@ -20,7 +20,7 @@ func TestBeginBlocker(t *testing.T) { mint.BeginBlocker(ctx, app.MintKeeper) minter := app.MintKeeper.GetMinter(ctx) - param := app.MintKeeper.GetParamSet(ctx) + param := app.MintKeeper.GetParams(ctx) mintCoins := minter.BlockProvision(param) acc1 := app.AccountKeeper.GetModuleAccount(ctx, "fee_collector") @@ -33,7 +33,7 @@ func createTestApp(t *testing.T, isCheckTx bool) (*simapp.SimApp, sdk.Context) { app := simapp.Setup(t, false) ctx := app.BaseApp.NewContext(isCheckTx, tmproto.Header{Height: 2}) - app.MintKeeper.SetParamSet(ctx, types.NewParams( + app.MintKeeper.SetParams(ctx, types.NewParams( sdk.DefaultBondDenom, sdk.NewDecWithPrec(4, 2), )) diff --git a/modules/mint/genesis.go b/modules/mint/genesis.go index 72cc54579..d71adb471 100644 --- a/modules/mint/genesis.go +++ b/modules/mint/genesis.go @@ -16,13 +16,15 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data types.GenesisState) panic(fmt.Errorf("failed to initialize mint genesis state: %s", err.Error())) } keeper.SetMinter(ctx, data.Minter) - keeper.SetParamSet(ctx, data.Params) + if err := keeper.SetParams(ctx, data.Params); err != nil { + panic(fmt.Errorf("failed to set mint genesis state: %s", err.Error())) + } } // ExportGenesis returns a GenesisState for a given context and keeper. func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { minter := keeper.GetMinter(ctx) - params := keeper.GetParamSet(ctx) + params := keeper.GetParams(ctx) return types.NewGenesisState(minter, params) } diff --git a/modules/mint/keeper/grpc_query.go b/modules/mint/keeper/grpc_query.go index aedde46ca..7ea9c3545 100644 --- a/modules/mint/keeper/grpc_query.go +++ b/modules/mint/keeper/grpc_query.go @@ -11,9 +11,12 @@ import ( var _ types.QueryServer = Keeper{} // Params queries the staking parameters -func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { +func (k Keeper) Params( + c context.Context, + _ *types.QueryParamsRequest, +) (*types.QueryParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) - params := k.GetParamSet(ctx) + params := k.GetParams(ctx) return &types.QueryParamsResponse{Params: params}, nil } diff --git a/modules/mint/keeper/grpc_query_test.go b/modules/mint/keeper/grpc_query_test.go index 26d5f149d..a40f0c732 100644 --- a/modules/mint/keeper/grpc_query_test.go +++ b/modules/mint/keeper/grpc_query_test.go @@ -18,5 +18,5 @@ func (suite *KeeperTestSuite) TestGRPCQueryPoolParameters() { // Query Params resp, err := queryClient.Params(gocontext.Background(), &types.QueryParamsRequest{}) suite.NoError(err) - suite.Equal(app.MintKeeper.GetParamSet(ctx), resp.Params) + suite.Equal(app.MintKeeper.GetParams(ctx), resp.Params) } diff --git a/modules/mint/keeper/keeper.go b/modules/mint/keeper/keeper.go index 58134352e..f58aa5f8b 100644 --- a/modules/mint/keeper/keeper.go +++ b/modules/mint/keeper/keeper.go @@ -8,7 +8,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/irisnet/irishub/modules/mint/types" ) @@ -17,15 +16,19 @@ import ( type Keeper struct { cdc codec.Codec storeKey storetypes.StoreKey - paramSpace paramtypes.Subspace bankKeeper types.BankKeeper feeCollectorName string + authority string } // NewKeeper returns a mint keeper -func NewKeeper(cdc codec.Codec, key storetypes.StoreKey, - paramSpace paramtypes.Subspace, ak types.AccountKeeper, bk types.BankKeeper, - feeCollectorName string) Keeper { +func NewKeeper( + cdc codec.Codec, + key storetypes.StoreKey, + ak types.AccountKeeper, + bk types.BankKeeper, + feeCollectorName, authority string, +) Keeper { // ensure mint module account is set if addr := ak.GetModuleAddress(types.ModuleName); addr == nil { @@ -35,9 +38,9 @@ func NewKeeper(cdc codec.Codec, key storetypes.StoreKey, keeper := Keeper{ storeKey: key, cdc: cdc, - paramSpace: paramSpace.WithKeyTable(types.ParamKeyTable()), bankKeeper: bk, feeCollectorName: feeCollectorName, + authority: authority, } return keeper } @@ -87,15 +90,3 @@ func (k Keeper) AddCollectedFees(ctx sdk.Context, coins sdk.Coins) error { coins, ) } - -// GetParamSet returns inflation params from the global param store -func (k Keeper) GetParamSet(ctx sdk.Context) types.Params { - var params types.Params - k.paramSpace.GetParamSet(ctx, ¶ms) - return params -} - -// SetParamSet set inflation params from the global param store -func (k Keeper) SetParamSet(ctx sdk.Context, params types.Params) { - k.paramSpace.SetParamSet(ctx, ¶ms) -} diff --git a/modules/mint/keeper/keeper_test.go b/modules/mint/keeper/keeper_test.go index 1fd62fce6..cbf453f78 100644 --- a/modules/mint/keeper/keeper_test.go +++ b/modules/mint/keeper/keeper_test.go @@ -31,7 +31,8 @@ func (suite *KeeperTestSuite) SetupTest() { suite.ctx = app.BaseApp.NewContext(false, tmproto.Header{}) suite.app = app - app.MintKeeper.SetParamSet(suite.ctx, types.DefaultParams()) + err := app.MintKeeper.SetParams(suite.ctx, types.DefaultParams()) + require.NoError(suite.T(), err) app.MintKeeper.SetMinter(suite.ctx, types.DefaultMinter()) } @@ -48,9 +49,10 @@ func (suite *KeeperTestSuite) TestSetGetMinter() { } func (suite *KeeperTestSuite) TestSetGetParamSet() { - suite.app.MintKeeper.SetParamSet(suite.ctx, types.DefaultParams()) - expParamSet := suite.app.MintKeeper.GetParamSet(suite.ctx) + err := suite.app.MintKeeper.SetParams(suite.ctx, types.DefaultParams()) + require.NoError(suite.T(), err) + expParamSet := suite.app.MintKeeper.GetParams(suite.ctx) require.Equal(suite.T(), types.DefaultParams(), expParamSet) } diff --git a/modules/mint/keeper/migrations.go b/modules/mint/keeper/migrations.go new file mode 100644 index 000000000..626302e56 --- /dev/null +++ b/modules/mint/keeper/migrations.go @@ -0,0 +1,24 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + v2 "github.com/irisnet/irishub/modules/mint/migrations/v2" + "github.com/irisnet/irismod/types/exported" +) + +// Migrator is a struct for handling in-place store migrations. +type Migrator struct { + k Keeper + legacySubspace exported.Subspace +} + +// NewMigrator returns a new Migrator. +func NewMigrator(k Keeper, legacySubspace exported.Subspace) Migrator { + return Migrator{k: k, legacySubspace: legacySubspace} +} + +// Migrate1to2 migrates from version 1 to 2. +func (m Migrator) Migrate1to2(ctx sdk.Context) error { + return v2.Migrate(ctx, m.k, m.legacySubspace) +} diff --git a/modules/mint/keeper/msg_server.go b/modules/mint/keeper/msg_server.go new file mode 100644 index 000000000..ce6a7bdce --- /dev/null +++ b/modules/mint/keeper/msg_server.go @@ -0,0 +1,43 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/irisnet/irishub/modules/mint/types" +) + +type msgServer struct { + k Keeper +} + +var _ types.MsgServer = msgServer{} + +// NewMsgServerImpl returns an implementation of the mint MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{k: keeper} +} + +// UpdateParams implement the interface of types.MsgServer +func (m msgServer) UpdateParams( + goCtx context.Context, + msg *types.MsgUpdateParams, +) (*types.MsgUpdateParamsResponse, error) { + if m.k.authority != msg.Authority { + return nil, sdkerrors.Wrapf( + sdkerrors.ErrUnauthorized, + "invalid authority; expected %s, got %s", + m.k.authority, + msg.Authority, + ) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + if err := m.k.SetParams(ctx, msg.Params); err != nil { + return nil, err + } + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/modules/mint/keeper/params.go b/modules/mint/keeper/params.go new file mode 100644 index 000000000..5fc4842e7 --- /dev/null +++ b/modules/mint/keeper/params.go @@ -0,0 +1,35 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/irisnet/irishub/modules/mint/types" +) + +// GetParams sets the mint module parameters. +func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.ParamsKey) + if bz == nil { + return params + } + + k.cdc.MustUnmarshal(bz, ¶ms) + return params +} + +// SetParams sets the mint module parameters. +func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { + if err := params.Validate(); err != nil { + return err + } + + store := ctx.KVStore(k.storeKey) + bz, err := k.cdc.Marshal(¶ms) + if err != nil { + return err + } + store.Set(types.ParamsKey, bz) + + return nil +} diff --git a/modules/mint/migrations/v2/migrate.go b/modules/mint/migrations/v2/migrate.go new file mode 100644 index 000000000..40edf99cf --- /dev/null +++ b/modules/mint/migrations/v2/migrate.go @@ -0,0 +1,21 @@ +package v2 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/irisnet/irismod/types/exported" + + "github.com/irisnet/irishub/modules/mint/types" +) + +// MintKeeper defines a interface for SetParams function +type MintKeeper interface { + SetParams(ctx sdk.Context, params types.Params) error +} + +// Migrate migrate the coinswap params from legacy x/params module to mint module +func Migrate(ctx sdk.Context, k MintKeeper, legacySubspace exported.Subspace) error { + var params types.Params + legacySubspace.GetParamSet(ctx, ¶ms) + return k.SetParams(ctx, params) +} diff --git a/modules/mint/migrations/v2/migrate_test.go b/modules/mint/migrations/v2/migrate_test.go new file mode 100644 index 000000000..4d8d4a41f --- /dev/null +++ b/modules/mint/migrations/v2/migrate_test.go @@ -0,0 +1,34 @@ +package v2_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + + v3 "github.com/irisnet/irismod/modules/farm/migrations/v3" + farmtypes "github.com/irisnet/irismod/modules/farm/types" + "github.com/irisnet/irismod/simapp" +) + +func TestMigrate(t *testing.T) { + app := simapp.Setup(t, false) + ctx := app.BaseApp.NewContext(false, tmproto.Header{}) + + legacySubspace := app.GetSubspace(farmtypes.ModuleName) + + params := farmtypes.DefaultParams() + legacySubspace.SetParamSet(ctx, ¶ms) + + err := v3.Migrate( + ctx, + app.FarmKeeper, + legacySubspace, + ) + require.NoError(t, err) + + expParams := app.FarmKeeper.GetParams(ctx) + require.Equal(t, expParams, params, "v3.Migrate failed") + +} diff --git a/modules/mint/module.go b/modules/mint/module.go index 77a7d552d..48261d768 100644 --- a/modules/mint/module.go +++ b/modules/mint/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" - "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -18,13 +17,17 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/irisnet/irismod/types/exported" + "github.com/irisnet/irishub/modules/mint/client/cli" - "github.com/irisnet/irishub/modules/mint/client/rest" "github.com/irisnet/irishub/modules/mint/keeper" "github.com/irisnet/irishub/modules/mint/simulation" "github.com/irisnet/irishub/modules/mint/types" ) +// ConsensusVersion defines the current mint module consensus version. +const ConsensusVersion = 2 + var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} @@ -63,11 +66,6 @@ func (AppModuleBasic) ValidateGenesis( return ValidateGenesis(data) } -// RegisterRESTRoutes registers the REST routes for the mint module. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { - rest.RegisterHandlers(clientCtx, rtr) -} - // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the mint module. func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { _ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) @@ -84,7 +82,8 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { } // RegisterInterfaces registers interfaces and implementations of the mint module. -func (AppModuleBasic) RegisterInterfaces(_ codectypes.InterfaceRegistry) { +func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) } // ____________________________________________________________________________ @@ -93,14 +92,20 @@ func (AppModuleBasic) RegisterInterfaces(_ codectypes.InterfaceRegistry) { type AppModule struct { AppModuleBasic - keeper keeper.Keeper + keeper keeper.Keeper + legacySubspace exported.Subspace } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, + legacySubspace exported.Subspace, +) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc}, keeper: keeper, + legacySubspace: legacySubspace, } } @@ -110,6 +115,12 @@ func (AppModule) Name() string { return types.ModuleName } // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) + + m := keeper.NewMigrator(am.keeper, am.legacySubspace) + if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { + panic(err) + } } // RegisterInvariants registers the mint module invariants. @@ -124,7 +135,7 @@ func (AppModule) QuerierRoute() string { return types.RouterKey } // introduced by the module. To avoid wrong/empty versions, the initial version // should be set to 1. func (am AppModule) ConsensusVersion() uint64 { - return 1 + return ConsensusVersion } // InitGenesis performs genesis initialization for the mint module. It returns diff --git a/modules/mint/types/codec.go b/modules/mint/types/codec.go index 45b990fed..48d5047e7 100644 --- a/modules/mint/types/codec.go +++ b/modules/mint/types/codec.go @@ -2,7 +2,10 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) var ( @@ -15,3 +18,10 @@ func init() { cryptocodec.RegisterCrypto(amino) amino.Seal() } + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgUpdateParams{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/modules/mint/types/expected_keepers.go b/modules/mint/types/expected_keepers.go index 05e49dbbd..f2a201294 100644 --- a/modules/mint/types/expected_keepers.go +++ b/modules/mint/types/expected_keepers.go @@ -17,7 +17,16 @@ type AccountKeeper interface { // bankKeeper defines the contract needed to be fulfilled for banking and supply // dependencies. type BankKeeper interface { - SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount( + ctx sdk.Context, + senderModule string, + recipientAddr sdk.AccAddress, + amt sdk.Coins, + ) error + SendCoinsFromModuleToModule( + ctx sdk.Context, + senderModule, recipientModule string, + amt sdk.Coins, + ) error MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error } diff --git a/modules/mint/types/keys.go b/modules/mint/types/keys.go index 34c5accaa..09aa4a690 100644 --- a/modules/mint/types/keys.go +++ b/modules/mint/types/keys.go @@ -22,4 +22,5 @@ const ( var ( // use for the keeper store MinterKey = []byte{0x00} + ParamsKey = []byte{0x01} ) diff --git a/modules/mint/types/tx.pb.go b/modules/mint/types/tx.pb.go new file mode 100644 index 000000000..e7a38f4dc --- /dev/null +++ b/modules/mint/types/tx.pb.go @@ -0,0 +1,592 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: irishub/mint/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/mint parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_6ccd37db551d9a32, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6ccd37db551d9a32, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "irishub.mint.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "irishub.mint.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("irishub/mint/tx.proto", fileDescriptor_6ccd37db551d9a32) } + +var fileDescriptor_6ccd37db551d9a32 = []byte{ + // 334 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x2c, 0xca, 0x2c, + 0xce, 0x28, 0x4d, 0xd2, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0xe2, 0x81, 0x0a, 0xeb, 0x81, 0x84, 0xa5, 0xc4, 0x51, 0x14, 0x81, 0x08, 0x88, 0x32, + 0x29, 0xb9, 0xe4, 0xfc, 0xe2, 0xdc, 0xfc, 0x62, 0xfd, 0xa4, 0xc4, 0xe2, 0x54, 0xfd, 0x32, 0xc3, + 0xa4, 0xd4, 0x92, 0x44, 0x43, 0xfd, 0xe4, 0xfc, 0xcc, 0x3c, 0xa8, 0xbc, 0x38, 0x54, 0x3e, 0xb7, + 0x38, 0x5d, 0xbf, 0xcc, 0x10, 0x44, 0x41, 0x25, 0x24, 0x21, 0x12, 0xf1, 0x60, 0x9e, 0x3e, 0x84, + 0x03, 0x95, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x87, 0x88, 0x83, 0x58, 0x10, 0x51, 0xa5, 0x5e, 0x46, + 0x2e, 0x7e, 0xdf, 0xe2, 0xf4, 0xd0, 0x82, 0x94, 0xc4, 0x92, 0xd4, 0x80, 0xc4, 0xa2, 0xc4, 0xdc, + 0x62, 0x21, 0x33, 0x2e, 0xce, 0xc4, 0xd2, 0x92, 0x8c, 0xfc, 0xa2, 0xcc, 0x92, 0x4a, 0x09, 0x46, + 0x05, 0x46, 0x0d, 0x4e, 0x27, 0x89, 0x4b, 0x5b, 0x74, 0x45, 0xa0, 0xc6, 0x39, 0xa6, 0xa4, 0x14, + 0xa5, 0x16, 0x17, 0x07, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x07, 0x21, 0x94, 0x0a, 0x19, 0x71, 0xb1, + 0x15, 0x80, 0x4d, 0x90, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd1, 0x43, 0xf6, 0xad, 0x1e, + 0xc4, 0x74, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x2a, 0xad, 0xf8, 0x9a, 0x9e, 0x6f, + 0xd0, 0x42, 0x98, 0xa1, 0x24, 0xc9, 0x25, 0x8e, 0xe6, 0x9c, 0xa0, 0xd4, 0xe2, 0x82, 0xfc, 0xbc, + 0xe2, 0x54, 0xa3, 0x68, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0xa1, 0x10, 0x2e, 0x1e, 0x14, 0xd7, 0xca, + 0xa2, 0xda, 0x82, 0xa6, 0x5b, 0x4a, 0x15, 0xaf, 0x34, 0xcc, 0x70, 0x27, 0xef, 0x13, 0x0f, 0xe5, + 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, + 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x37, 0x3d, 0xb3, 0x04, + 0x64, 0x44, 0x72, 0x7e, 0xae, 0x3e, 0xc8, 0xb8, 0xbc, 0xd4, 0x12, 0x7d, 0x78, 0xdc, 0xe5, 0xa7, + 0x94, 0xe6, 0xa4, 0x16, 0x43, 0x23, 0xba, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0xb6, 0xc6, + 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x2f, 0x90, 0x3d, 0x05, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a governance operation for updating the x/coinswap + // module parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/irishub.mint.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a governance operation for updating the x/coinswap + // module parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/irishub.mint.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "irishub.mint.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "irishub/mint/tx.proto", +} + +func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/irishub/mint/tx.proto b/proto/irishub/mint/tx.proto new file mode 100644 index 000000000..e026dcfe1 --- /dev/null +++ b/proto/irishub/mint/tx.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; +package irishub.mint; + +import "irishub/mint/mint.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irishub/modules/mint/types"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the coinswap Msg service +service Msg { + // UpdateParams defines a governance operation for updating the x/coinswap + // module parameters. The authority is defined in the keeper. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address that controls the module (defaults to x/gov unless + // overwritten). + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // params defines the x/mint parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [ (gogoproto.nullable) = false ]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} \ No newline at end of file diff --git a/simapp/app.go b/simapp/app.go index eb5336c33..145675f2f 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -333,10 +333,10 @@ func NewSimApp( app.MintKeeper = mintkeeper.NewKeeper( appCodec, keys[minttypes.StoreKey], - app.GetSubspace(minttypes.ModuleName), app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.DistrKeeper = distrkeeper.NewKeeper( @@ -410,7 +410,7 @@ func NewSimApp( skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName), ), - mint.NewAppModule(appCodec, app.MintKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.GetSubspace(minttypes.ModuleName)), slashing.NewAppModule( appCodec, app.SlashingKeeper, @@ -529,7 +529,7 @@ func NewSimApp( app.GetSubspace(banktypes.ModuleName), ), capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), - mint.NewAppModule(appCodec, app.MintKeeper), + mint.NewAppModule(appCodec, app.MintKeeper, app.GetSubspace(minttypes.ModuleName)), staking.NewAppModule( appCodec, app.StakingKeeper, From 6d32ca8f3f0a62d058345ae732dc98828edee2dc Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Mon, 10 Jul 2023 10:32:00 +0800 Subject: [PATCH 04/15] fix test error --- modules/mint/types/msg.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 modules/mint/types/msg.go diff --git a/modules/mint/types/msg.go b/modules/mint/types/msg.go new file mode 100644 index 000000000..a8a81807f --- /dev/null +++ b/modules/mint/types/msg.go @@ -0,0 +1,31 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var ( + _ sdk.Msg = &MsgUpdateParams{} +) + +// GetSignBytes returns the raw bytes for a MsgUpdateParams message that +// the expected signer needs to sign. +func (m *MsgUpdateParams) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(m) + return sdk.MustSortJSON(bz) +} + +// ValidateBasic executes sanity validation on the provided data +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.Wrap(err, "invalid authority address") + } + return m.Params.Validate() +} + +// GetSigners returns the expected signers for a MsgUpdateParams message +func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Authority) + return []sdk.AccAddress{addr} +} From f7f0b393adb636a9d8d0d1638363e4347fd44032 Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Tue, 11 Jul 2023 16:19:43 +0800 Subject: [PATCH 05/15] fix error --- app/app.go | 4 +++- cmd/iris/cmd/root.go | 7 +++++++ go.mod | 8 +++++--- go.sum | 18 ++---------------- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/app/app.go b/app/app.go index 4a8aee82e..2063defaa 100644 --- a/app/app.go +++ b/app/app.go @@ -632,6 +632,7 @@ func NewIrisApp( // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. app.mm.SetOrderInitGenesis(orderInitBlockers()...) + app.mm.SetOrderExportGenesis(orderInitBlockers()...) app.configurator = module.NewConfigurator( appCodec, @@ -823,7 +824,8 @@ func (app *IrisApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICo authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - + // Register node gRPC service for grpc-gateway. + nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register grpc-gateway routes for all modules. ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) diff --git a/cmd/iris/cmd/root.go b/cmd/iris/cmd/root.go index 28951f754..119aab261 100644 --- a/cmd/iris/cmd/root.go +++ b/cmd/iris/cmd/root.go @@ -141,6 +141,13 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { ac.appExport, addModuleInitFlags, ) + // server.AddCommands( + // rootCmd, + // iristypes.DefaultNodeHome, + // ac.newApp, + // ac.appExport, + // addModuleInitFlags, + // ) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( diff --git a/go.mod b/go.mod index 6431f7ee4..caf1b4ac9 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.3 // indirect cosmossdk.io/math v1.0.1 - github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -148,7 +148,7 @@ require ( github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.2 // indirect github.com/huin/goupnp v1.0.3 // indirect - github.com/improbable-eng/grpc-web v0.15.0 + github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -201,7 +201,7 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/net v0.10.0 + golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.7.0 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.8.0 // indirect @@ -220,3 +220,5 @@ replace github.com/zondax/hid => github.com/zondax/hid v0.9.0 // use bianjieai fork of ethermint replace github.com/evmos/ethermint => github.com/bianjieai/ethermint v0.6.1-0.20230704054052-1d6b3c366199 + +replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 diff --git a/go.sum b/go.sum index f9dcd7439..5c4285c35 100644 --- a/go.sum +++ b/go.sum @@ -514,7 +514,6 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= 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.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= @@ -566,7 +565,6 @@ github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= @@ -683,7 +681,6 @@ 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 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= @@ -980,7 +977,6 @@ github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= @@ -993,17 +989,12 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= 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.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -1172,7 +1163,6 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= @@ -1180,9 +1170,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/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/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= @@ -1397,7 +1386,6 @@ golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1519,7 +1507,6 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1653,7 +1640,6 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= From f3778fb2d6735d3972380a09c4e9fd939213835f Mon Sep 17 00:00:00 2001 From: Yksirod <103229163+taramakage@users.noreply.github.com> Date: Wed, 11 Oct 2023 13:36:57 +0800 Subject: [PATCH 06/15] Upgrade IRISHub to v2.1 (#2863) * bump-up: cosmos-sdk v0.47.4 * bump-up: ibc, tibc, irismod, ethermint * fix: tibc keeper compile error * feat: load ibc nft-transfer module * upgrade: add plan v2.1 and fix consensus params migration logic * chore: update change log * chore: update changelog * chore: format code * bump-up: add v2 suffix to module paths * fix: revert path in docs * proto: regeneration * bump-up: irismod supports x/nft api * bump-up: nft-transfer * fix: vesting account loophole * chore: fix typo * fix: adjust ante sequence * ibc: register client app basic module * bump-up ethermint to resolve panic of accessing consensus parmas at upgrade block * fix: support legacy proposal and query on ibc nft * fix: use no-op-mempool to avoid evm tx failure with no signer * fix collect-gentxs command (#2866) * fix: adjust keeper init sequence of gov & farm * refine custom base option function * fix: set localhost for ibc allow clients * chore: fix typo in dockerfile * bump-up: irismod fix farm genesis validation --------- Co-authored-by: aofengli Co-authored-by: Dreamer <745124335@qq.com> --- CHANGELOG.md | 22 +++ Dockerfile | 4 +- Makefile | 4 +- ante/handler_options.go | 3 +- ante/vesting.go | 31 ++++ app/app.go | 138 ++++++++++----- app/encoding.go | 2 +- app/genesis.go | 2 +- app/modules.go | 30 +++- app/sim_test.go | 2 +- app/upgrade.go | 43 +++-- app/upgrades/types.go | 2 + app/upgrades/v110/upgrades.go | 6 +- app/upgrades/v120/upgrades.go | 14 +- app/upgrades/v130/upgrades.go | 4 +- app/upgrades/v140/upgrades.go | 2 +- app/upgrades/v200/config.go | 2 +- app/upgrades/v200/upgrades.go | 4 +- app/upgrades/v210/upgrades.go | 13 +- cmd/iris/cmd/genesis.go | 2 +- cmd/iris/cmd/keys.go | 2 +- cmd/iris/cmd/root.go | 6 +- cmd/iris/cmd/testnet.go | 4 +- cmd/iris/main.go | 6 +- docs/get-started/mainnet.md | 16 +- go.mod | 58 ++++--- go.sum | 110 ++++++------ lite/swagger.go | 2 +- modules/evm/moudle.go | 14 +- modules/guardian/client/cli/cli_test.go | 8 +- modules/guardian/client/cli/query.go | 2 +- modules/guardian/client/cli/tx.go | 2 +- .../guardian/client/testutil/test_helpers.go | 4 +- modules/guardian/genesis.go | 4 +- modules/guardian/genesis_test.go | 8 +- modules/guardian/handler.go | 4 +- modules/guardian/keeper/grpc_query.go | 2 +- modules/guardian/keeper/grpc_query_test.go | 2 +- modules/guardian/keeper/keeper.go | 2 +- modules/guardian/keeper/keeper_test.go | 6 +- modules/guardian/keeper/msg_service.go | 2 +- modules/guardian/module.go | 6 +- modules/guardian/types/genesis.pb.go | 12 +- modules/guardian/types/guardian.pb.go | 12 +- modules/guardian/types/msgs_test.go | 2 +- modules/guardian/types/query.pb.go | 47 ++--- modules/guardian/types/tx.pb.go | 36 ++-- modules/internft/interface.go | 49 ++++++ modules/internft/keeper.go | 164 ++++++++++++++++++ modules/mint/abci.go | 4 +- modules/mint/abci_test.go | 6 +- modules/mint/client/cli/cli_test.go | 6 +- modules/mint/client/cli/query.go | 2 +- modules/mint/client/rest/grpc_query_test.go | 4 +- modules/mint/client/testutil/test_helpers.go | 2 +- modules/mint/genesis.go | 4 +- modules/mint/keeper/grpc_query.go | 2 +- modules/mint/keeper/grpc_query_test.go | 2 +- modules/mint/keeper/keeper.go | 2 +- modules/mint/keeper/keeper_test.go | 4 +- modules/mint/keeper/migrations.go | 2 +- modules/mint/keeper/msg_server.go | 2 +- modules/mint/keeper/params.go | 2 +- modules/mint/migrations/v2/migrate.go | 2 +- modules/mint/module.go | 8 +- modules/mint/simulation/decoder.go | 2 +- modules/mint/simulation/decoder_test.go | 6 +- modules/mint/simulation/genesis.go | 2 +- modules/mint/types/genesis.pb.go | 13 +- modules/mint/types/mint.pb.go | 48 ++--- modules/mint/types/query.pb.go | 44 ++--- modules/mint/types/tx.pb.go | 13 +- proto/buf.gen.pulsar.yaml | 2 +- proto/irishub/guardian/genesis.proto | 2 +- proto/irishub/guardian/guardian.proto | 2 +- proto/irishub/guardian/query.proto | 2 +- proto/irishub/guardian/tx.proto | 2 +- proto/irishub/mint/genesis.proto | 2 +- proto/irishub/mint/mint.proto | 2 +- proto/irishub/mint/query.proto | 2 +- proto/irishub/mint/tx.proto | 2 +- scripts/protocgen.sh | 2 +- simapp/app.go | 16 +- simapp/test_helpers.go | 2 +- sims.mk | 2 +- types/runtime.go | 2 +- 86 files changed, 762 insertions(+), 384 deletions(-) create mode 100644 ante/vesting.go create mode 100644 modules/internft/interface.go create mode 100644 modules/internft/keeper.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 5258b26e3..d2923c74d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,30 @@ ## [Unreleased] +### API Breaking + +* (Auth) Query for BaseAccount type account is no longer supported and is replaced by EthAccount type. + +### State Machine Breaking + +* (IRISHub) [\#2863](https://github.com/irisnet/irishub/pull/2863) Bump up tibc-go version to xxx +* (IRISHub) [\#2863](https://github.com/irisnet/irishub/pull/2863) Bump up irismod version to xxx +* (IRISHub) [\#2863](https://github.com/irisnet/irishub/pull/2863) Bump up ethermint version to v0.22.0 +* (IRISHub) [\#2863](https://github.com/irisnet/irishub/pull/2863) Bump up ibc-go version to v7.3.0 +* (IRISHub) [\#2863](https://github.com/irisnet/irishub/pull/2863) Bump up cosmos-sdk to v0.47.4 +* (IRISHub) [\#2863](https://github.com/irisnet/irishub/pull/2863) Bump up cometbft to v0.37.2 + +### Features + +* (NFT-Transfer) [\#2863](https://github.com/irisnet/irishub/pull/2863) Feat: support inter nft-transfer module + ### Bug Fixes * (IRISHub) [\#2852](https://github.com/irisnet/irishub/pull/2852) refactor: fix eip712 signature and inject ParseChainID method +* (IRISMod) [irismod \#367](https://github.com/irisnet/irismod/pull/367) Fix rest uri conflict in mt module + +### Security + +* (IRISHub) [\#2865](https://github.com/irisnet/irishub/pull/2865) Disable the vesting account creation to prevent contract address front-running. ## 2.0.0 diff --git a/Dockerfile b/Dockerfile index bf6afb28a..299d97899 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # -# Build image: docker build -t irisnet/irishub:v2.0.0 --build-arg EVM_CHAIN_ID=6688 . +# Build image: docker build -t irisnet/irishub:v2.1.0 --build-arg EVM_CHAIN_ID=6688 . # -FROM golang:1.18-alpine3.16 as builder +FROM golang:1.19.13-alpine3.18 as builder ARG EVM_CHAIN_ID diff --git a/Makefile b/Makefile index 75ed9f8bd..f9cd5343f 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=iris \ -X github.com/cosmos/cosmos-sdk/version.AppName=iris \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ - -X github.com/irisnet/irishub/types.EIP155ChainID=$(EVM_CHAIN_ID) \ + -X github.com/irisnet/irishub/v2/types.EIP155ChainID=$(EVM_CHAIN_ID) \ -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" ifeq ($(WITH_CLEVELDB),yes) @@ -199,7 +199,7 @@ lint: golangci-lint format: find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./lite/statik/statik.go" -not -path "*.pb.go" | xargs gofmt -w -s find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./lite/statik/statik.go" -not -path "*.pb.go" | xargs misspell -w - find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./lite/statik/statik.go" -not -path "*.pb.go" | xargs goimports -w -local github.com/irisnet/irishub + find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./lite/statik/statik.go" -not -path "*.pb.go" | xargs goimports -w -local github.com/irisnet/irishub/v2 benchmark: @go test -mod=readonly -bench=. ./... diff --git a/ante/handler_options.go b/ante/handler_options.go index 726be16d9..fdd1ba244 100644 --- a/ante/handler_options.go +++ b/ante/handler_options.go @@ -14,7 +14,7 @@ import ( oraclekeeper "github.com/irisnet/irismod/modules/oracle/keeper" tokenkeeper "github.com/irisnet/irismod/modules/token/keeper" - guardiankeeper "github.com/irisnet/irishub/modules/guardian/keeper" + guardiankeeper "github.com/irisnet/irishub/v2/modules/guardian/keeper" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC @@ -64,6 +64,7 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { return sdk.ChainAnteDecorators( RejectMessagesDecorator{}, + NewRejectVestingDecorator(), ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), ante.NewValidateBasicDecorator(), diff --git a/ante/vesting.go b/ante/vesting.go new file mode 100644 index 000000000..87861df30 --- /dev/null +++ b/ante/vesting.go @@ -0,0 +1,31 @@ +package ante + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" +) + +// RejectVestingDecorator is responsible for rejecting the vesting msg +type RejectVestingDecorator struct{} + +// NewRejectVestingDecorator returns an instance of ValidateVestingDecorator +func NewRejectVestingDecorator() RejectVestingDecorator { + return RejectVestingDecorator{} +} + +// AnteHandle checks the transaction +func (vvd RejectVestingDecorator) AnteHandle(ctx sdk.Context, + tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + for _, msg := range tx.GetMsgs() { + switch msg.(type) { + case *vestingtypes.MsgCreateVestingAccount, + *vestingtypes.MsgCreatePermanentLockedAccount, + *vestingtypes.MsgCreatePeriodicVestingAccount: + return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, + "currently doesn't support creating vesting account") + } + } + return next(ctx, tx, simulate) +} diff --git a/app/app.go b/app/app.go index 2063defaa..7323b53b4 100644 --- a/app/app.go +++ b/app/app.go @@ -26,6 +26,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/streaming" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/mempool" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -51,24 +52,31 @@ import ( govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/cosmos/cosmos-sdk/x/params" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/cosmos/cosmos-sdk/x/upgrade" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/cosmos/ibc-go/v7/modules/apps/transfer" ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" + ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" coinswapkeeper "github.com/irisnet/irismod/modules/coinswap/keeper" coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" + "github.com/irisnet/irismod/modules/farm" farmkeeper "github.com/irisnet/irismod/modules/farm/keeper" farmtypes "github.com/irisnet/irismod/modules/farm/types" htlckeeper "github.com/irisnet/irismod/modules/htlc/keeper" @@ -97,6 +105,7 @@ import ( tibcnfttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" tibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" tibcroutingtypes "github.com/bianjieai/tibc-go/modules/tibc/core/26-routing/types" + tibccli "github.com/bianjieai/tibc-go/modules/tibc/core/client/cli" tibckeeper "github.com/bianjieai/tibc-go/modules/tibc/core/keeper" "github.com/evmos/ethermint/ethereum/eip712" @@ -108,14 +117,19 @@ import ( feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" - "github.com/irisnet/irishub/address" - irishubante "github.com/irisnet/irishub/ante" - "github.com/irisnet/irishub/lite" - guardiankeeper "github.com/irisnet/irishub/modules/guardian/keeper" - guardiantypes "github.com/irisnet/irishub/modules/guardian/types" - mintkeeper "github.com/irisnet/irishub/modules/mint/keeper" - minttypes "github.com/irisnet/irishub/modules/mint/types" - iristypes "github.com/irisnet/irishub/types" + nfttransfer "github.com/bianjieai/nft-transfer" + ibcnfttransferkeeper "github.com/bianjieai/nft-transfer/keeper" + ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types" + + "github.com/irisnet/irishub/v2/address" + irishubante "github.com/irisnet/irishub/v2/ante" + "github.com/irisnet/irishub/v2/lite" + guardiankeeper "github.com/irisnet/irishub/v2/modules/guardian/keeper" + guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/internft" + mintkeeper "github.com/irisnet/irishub/v2/modules/mint/keeper" + minttypes "github.com/irisnet/irishub/v2/modules/mint/types" + iristypes "github.com/irisnet/irishub/v2/types" ) var ( @@ -156,8 +170,9 @@ type IrisApp struct { ConsensusParamsKeeper consensuskeeper.Keeper //ibc - IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - IBCTransferKeeper ibctransferkeeper.Keeper + IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly + IBCTransferKeeper ibctransferkeeper.Keeper + IBCNFTTransferKeeper ibcnfttransferkeeper.Keeper // make scoped keepers public for test purposes scopedIBCKeeper capabilitykeeper.ScopedKeeper @@ -193,9 +208,10 @@ type IrisApp struct { // simulation manager sm *module.SimulationManager - transferModule transfer.AppModule - nfttransferModule tibcnfttransfer.AppModule - mttransferModule tibcmttransfer.AppModule + transferModule transfer.AppModule + nfttransferModule tibcnfttransfer.AppModule + mttransferModule tibcmttransfer.AppModule + ibcnfttransferModule nfttransfer.AppModule } // NewIrisApp returns a reference to an initialized IrisApp. @@ -212,6 +228,9 @@ func NewIrisApp( legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry + // Setup Mempool + baseAppOptions = append(baseAppOptions, NoOpMempoolOption()) + bApp := baseapp.NewBaseApp( iristypes.AppName, logger, @@ -237,6 +256,7 @@ func NewIrisApp( consensustypes.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, + ibcnfttransfertypes.StoreKey, capabilitytypes.StoreKey, guardiantypes.StoreKey, tokentypes.StoreKey, @@ -306,6 +326,7 @@ func NewIrisApp( ) scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) + scopedNFTTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibcnfttransfertypes.ModuleName) app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, @@ -420,7 +441,8 @@ func NewIrisApp( app.TIBCKeeper = tibckeeper.NewKeeper( appCodec, keys[tibchost.StoreKey], - app.GetSubspace(tibchost.ModuleName), app.StakingKeeper, + app.StakingKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.NFTKeeper = nftkeeper.NewKeeper( @@ -467,10 +489,25 @@ func NewIrisApp( app.transferModule = transfer.NewAppModule(app.IBCTransferKeeper) transferIBCModule := transfer.NewIBCModule(app.IBCTransferKeeper) + app.IBCNFTTransferKeeper = ibcnfttransferkeeper.NewKeeper( + appCodec, + keys[ibcnfttransfertypes.StoreKey], + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.IBCKeeper.ChannelKeeper, + app.IBCKeeper.ChannelKeeper, + &app.IBCKeeper.PortKeeper, + app.AccountKeeper, + internft.NewInterNftKeeper(appCodec, app.NFTKeeper, app.AccountKeeper), + scopedNFTTransferKeeper, + ) + app.ibcnfttransferModule = nfttransfer.NewAppModule(app.IBCNFTTransferKeeper) + nfttransferIBCModule := nfttransfer.NewIBCModule(app.IBCNFTTransferKeeper) + // routerModule := router.NewAppModule(app.RouterKeeper, transferIBCModule) // create static IBC router, add transfer route, then set and seal it ibcRouter := porttypes.NewRouter() - ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule) + ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule). + AddRoute(ibcnfttransfertypes.ModuleName, nfttransferIBCModule) app.IBCKeeper.SetRouter(ibcRouter) app.nfttransferModule = tibcnfttransfer.NewAppModule(app.TIBCNFTTransferKeeper) @@ -554,6 +591,18 @@ func NewIrisApp( app.ServiceKeeper, ) + govConfig := govtypes.DefaultConfig() + app.GovKeeper = govkeeper.NewKeeper( + appCodec, + keys[govtypes.StoreKey], + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.MsgServiceRouter(), + govConfig, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + app.FarmKeeper = farmkeeper.NewKeeper(appCodec, keys[farmtypes.StoreKey], app.BankKeeper, @@ -566,22 +615,21 @@ func NewIrisApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - govConfig := govtypes.DefaultConfig() - app.GovKeeper = govkeeper.NewKeeper( - appCodec, - keys[govtypes.StoreKey], - app.AccountKeeper, - app.BankKeeper, - app.StakingKeeper, - app.MsgServiceRouter(), - govConfig, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) + // register the proposal types + govRouter := govv1beta1.NewRouter() + govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). + AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). + AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). + AddRoute(tibchost.RouterKey, tibccli.NewProposalHandler(app.TIBCKeeper)). + AddRoute(farmtypes.RouterKey, farm.NewCommunityPoolCreateFarmProposalHandler(app.FarmKeeper)) app.GovKeeper.SetHooks(govtypes.NewMultiGovHooks( farmkeeper.NewGovHook(app.FarmKeeper), )) + app.GovKeeper.SetLegacyRouter(govRouter) + tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer)) // Create Ethermint keepers @@ -879,27 +927,37 @@ func initParamsKeeper( ) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) - paramsKeeper.Subspace(authtypes.ModuleName) - paramsKeeper.Subspace(banktypes.ModuleName) - paramsKeeper.Subspace(stakingtypes.ModuleName) - paramsKeeper.Subspace(minttypes.ModuleName) - paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(slashingtypes.ModuleName) + paramsKeeper.Subspace(authtypes.ModuleName).WithKeyTable(authtypes.ParamKeyTable()) + paramsKeeper.Subspace(banktypes.ModuleName).WithKeyTable(banktypes.ParamKeyTable()) + paramsKeeper.Subspace(stakingtypes.ModuleName).WithKeyTable(stakingtypes.ParamKeyTable()) + paramsKeeper.Subspace(minttypes.ModuleName).WithKeyTable(minttypes.ParamKeyTable()) + paramsKeeper.Subspace(distrtypes.ModuleName).WithKeyTable(distrtypes.ParamKeyTable()) + paramsKeeper.Subspace(slashingtypes.ModuleName).WithKeyTable(slashingtypes.ParamKeyTable()) paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) - paramsKeeper.Subspace(crisistypes.ModuleName) + paramsKeeper.Subspace(crisistypes.ModuleName).WithKeyTable(crisistypes.ParamKeyTable()) paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(tokentypes.ModuleName) + paramsKeeper.Subspace(tokentypes.ModuleName).WithKeyTable(tokenv1.ParamKeyTable()) paramsKeeper.Subspace(recordtypes.ModuleName) - paramsKeeper.Subspace(htlctypes.ModuleName) - paramsKeeper.Subspace(coinswaptypes.ModuleName) - paramsKeeper.Subspace(servicetypes.ModuleName) + paramsKeeper.Subspace(htlctypes.ModuleName).WithKeyTable(htlctypes.ParamKeyTable()) + paramsKeeper.Subspace(coinswaptypes.ModuleName).WithKeyTable(coinswaptypes.ParamKeyTable()) + paramsKeeper.Subspace(servicetypes.ModuleName).WithKeyTable(servicetypes.ParamKeyTable()) paramsKeeper.Subspace(ibcexported.ModuleName) - paramsKeeper.Subspace(farmtypes.ModuleName) + paramsKeeper.Subspace(farmtypes.ModuleName).WithKeyTable(farmtypes.ParamKeyTable()) paramsKeeper.Subspace(tibchost.ModuleName) // ethermint subspaces - paramsKeeper.Subspace(evmtypes.ModuleName) - paramsKeeper.Subspace(feemarkettypes.ModuleName) + paramsKeeper.Subspace(evmtypes.ModuleName).WithKeyTable(evmtypes.ParamKeyTable()) + paramsKeeper.Subspace(feemarkettypes.ModuleName).WithKeyTable(feemarkettypes.ParamKeyTable()) return paramsKeeper } + +func NoOpMempoolOption() func(*baseapp.BaseApp) { + return func(app *baseapp.BaseApp) { + memPool := mempool.NoOpMempool{} + app.SetMempool(memPool) + handler := baseapp.NewDefaultProposalHandler(memPool, app) + app.SetPrepareProposal(handler.PrepareProposalHandler()) + app.SetProcessProposal(handler.ProcessProposalHandler()) + } +} diff --git a/app/encoding.go b/app/encoding.go index 6b7befb3a..7edee87f6 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/tx" enccodec "github.com/evmos/ethermint/encoding/codec" - "github.com/irisnet/irishub/app/params" + "github.com/irisnet/irishub/v2/app/params" ) // MakeEncodingConfig creates an EncodingConfig for testing diff --git a/app/genesis.go b/app/genesis.go index 1a9dfcf57..c580dff07 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -1,7 +1,7 @@ package app import ( - "github.com/irisnet/irishub/types" + "github.com/irisnet/irishub/v2/types" ) // NewDefaultGenesisState generates the default state for the application. diff --git a/app/modules.go b/app/modules.go index f7e5706d1..be4dc7e33 100644 --- a/app/modules.go +++ b/app/modules.go @@ -44,6 +44,7 @@ import ( ibc "github.com/cosmos/ibc-go/v7/modules/core" ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" "github.com/irisnet/irismod/modules/coinswap" coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" @@ -79,12 +80,15 @@ import ( "github.com/evmos/ethermint/x/feemarket" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" - irisappparams "github.com/irisnet/irishub/app/params" - irisevm "github.com/irisnet/irishub/modules/evm" - "github.com/irisnet/irishub/modules/guardian" - guardiantypes "github.com/irisnet/irishub/modules/guardian/types" - "github.com/irisnet/irishub/modules/mint" - minttypes "github.com/irisnet/irishub/modules/mint/types" + nfttransfer "github.com/bianjieai/nft-transfer" + ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types" + + irisappparams "github.com/irisnet/irishub/v2/app/params" + irisevm "github.com/irisnet/irishub/v2/modules/evm" + "github.com/irisnet/irishub/v2/modules/guardian" + guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/mint" + minttypes "github.com/irisnet/irishub/v2/modules/mint/types" ) var ( @@ -103,7 +107,9 @@ var ( ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, authzmodule.AppModuleBasic{}, - genutil.AppModuleBasic{}, + genutil.AppModuleBasic{ + GenTxValidator: genutiltypes.DefaultMessageValidator, + }, bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, @@ -116,6 +122,7 @@ var ( crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, + ibctm.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, @@ -138,6 +145,7 @@ var ( tibcnfttransfer.AppModuleBasic{}, tibcmttransfer.AppModuleBasic{}, mt.AppModuleBasic{}, + nfttransfer.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, @@ -257,6 +265,7 @@ func appModules( ibc.NewAppModule(app.IBCKeeper), tibc.NewAppModule(app.TIBCKeeper), params.NewAppModule(app.ParamsKeeper), app.transferModule, + app.ibcnfttransferModule, app.nfttransferModule, app.mttransferModule, guardian.NewAppModule(appCodec, app.GuardianKeeper), @@ -384,6 +393,7 @@ func simulationModules( ), ibc.NewAppModule(app.IBCKeeper), app.transferModule, + app.ibcnfttransferModule, guardian.NewAppModule(appCodec, app.GuardianKeeper), token.NewAppModule( appCodec, @@ -488,6 +498,8 @@ func orderBeginBlockers() []string { tibcnfttypes.ModuleName, tibcmttypes.ModuleName, guardiantypes.ModuleName, + + ibcnfttransfertypes.ModuleName, } } @@ -538,6 +550,8 @@ func orderEndBlockers() []string { tibcnfttypes.ModuleName, tibcmttypes.ModuleName, guardiantypes.ModuleName, + + ibcnfttransfertypes.ModuleName, } } @@ -592,5 +606,7 @@ func orderInitBlockers() []string { guardiantypes.ModuleName, // NOTE: crisis module must go at the end to check for invariants on each module crisistypes.ModuleName, + + ibcnfttransfertypes.ModuleName, } } diff --git a/app/sim_test.go b/app/sim_test.go index 466bc10eb..87a863dd5 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - iristypes "github.com/irisnet/irishub/types" + iristypes "github.com/irisnet/irishub/v2/types" coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" htlctypes "github.com/irisnet/irismod/modules/htlc/types" mttypes "github.com/irisnet/irismod/modules/mt/types" diff --git a/app/upgrade.go b/app/upgrade.go index 8ccf810fb..d050e5bf0 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -5,12 +5,13 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/irisnet/irishub/app/upgrades" - v110 "github.com/irisnet/irishub/app/upgrades/v110" - v120 "github.com/irisnet/irishub/app/upgrades/v120" - v130 "github.com/irisnet/irishub/app/upgrades/v130" - v140 "github.com/irisnet/irishub/app/upgrades/v140" - v200 "github.com/irisnet/irishub/app/upgrades/v200" + "github.com/irisnet/irishub/v2/app/upgrades" + v110 "github.com/irisnet/irishub/v2/app/upgrades/v110" + v120 "github.com/irisnet/irishub/v2/app/upgrades/v120" + v130 "github.com/irisnet/irishub/v2/app/upgrades/v130" + v140 "github.com/irisnet/irishub/v2/app/upgrades/v140" + v200 "github.com/irisnet/irishub/v2/app/upgrades/v200" + v210 "github.com/irisnet/irishub/v2/app/upgrades/v210" ) var ( @@ -19,7 +20,8 @@ var ( Register(v120.Upgrade). Register(v130.Upgrade). Register(v140.Upgrade). - Register(v200.Upgrade) + Register(v200.Upgrade). + Register(v210.Upgrade) ) // RegisterUpgradePlans register a handler of upgrade plan @@ -30,18 +32,21 @@ func (app *IrisApp) RegisterUpgradePlans() { func (app *IrisApp) appKeepers() upgrades.AppKeepers { return upgrades.AppKeepers{ - AppCodec: app.AppCodec(), - HTLCKeeper: app.HTLCKeeper, - BankKeeper: app.BankKeeper, - AccountKeeper: app.AccountKeeper, - ServiceKeeper: app.ServiceKeeper, - GetKey: app.GetKey, - ModuleManager: app.mm, - TIBCkeeper: app.TIBCKeeper, - EvmKeeper: app.EvmKeeper, - FeeMarketKeeper: app.FeeMarketKeeper, - TokenKeeper: app.TokenKeeper, - ReaderWriter: app, + AppCodec: app.AppCodec(), + HTLCKeeper: app.HTLCKeeper, + BankKeeper: app.BankKeeper, + AccountKeeper: app.AccountKeeper, + ServiceKeeper: app.ServiceKeeper, + GetKey: app.GetKey, + ModuleManager: app.mm, + TIBCkeeper: app.TIBCKeeper, + IBCKeeper: app.IBCKeeper, + EvmKeeper: app.EvmKeeper, + FeeMarketKeeper: app.FeeMarketKeeper, + TokenKeeper: app.TokenKeeper, + ReaderWriter: app, + ConsensusParamsKeeper: app.ConsensusParamsKeeper, + ParamsKeeper: app.ParamsKeeper, } } diff --git a/app/upgrades/types.go b/app/upgrades/types.go index c767a453f..b20f49b07 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -13,6 +13,7 @@ import ( consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" tibckeeper "github.com/bianjieai/tibc-go/modules/tibc/core/keeper" @@ -53,6 +54,7 @@ type AppKeepers struct { GetKey func(moduleName string) *storetypes.KVStoreKey ModuleManager *module.Manager TIBCkeeper *tibckeeper.Keeper + IBCKeeper *ibckeeper.Keeper EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper TokenKeeper tokenkeeper.Keeper diff --git a/app/upgrades/v110/upgrades.go b/app/upgrades/v110/upgrades.go index e6d8fb5ee..77a1ff7e9 100644 --- a/app/upgrades/v110/upgrades.go +++ b/app/upgrades/v110/upgrades.go @@ -6,9 +6,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/irisnet/irishub/app/upgrades" - "github.com/irisnet/irishub/app/upgrades/v110/htlc" - "github.com/irisnet/irishub/app/upgrades/v110/service" + "github.com/irisnet/irishub/v2/app/upgrades" + "github.com/irisnet/irishub/v2/app/upgrades/v110/htlc" + "github.com/irisnet/irishub/v2/app/upgrades/v110/service" htlctypes "github.com/irisnet/irismod/modules/htlc/types" ) diff --git a/app/upgrades/v120/upgrades.go b/app/upgrades/v120/upgrades.go index 663937c05..1bd944b3c 100644 --- a/app/upgrades/v120/upgrades.go +++ b/app/upgrades/v120/upgrades.go @@ -47,13 +47,13 @@ import ( tibcclienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" tibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" - "github.com/irisnet/irishub/app/upgrades" - "github.com/irisnet/irishub/app/upgrades/v120/tibc" - "github.com/irisnet/irishub/modules/guardian" - guardiantypes "github.com/irisnet/irishub/modules/guardian/types" - "github.com/irisnet/irishub/modules/mint" - minttypes "github.com/irisnet/irishub/modules/mint/types" - "github.com/irisnet/irishub/types" + "github.com/irisnet/irishub/v2/app/upgrades" + "github.com/irisnet/irishub/v2/app/upgrades/v120/tibc" + "github.com/irisnet/irishub/v2/modules/guardian" + guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/mint" + minttypes "github.com/irisnet/irishub/v2/modules/mint/types" + "github.com/irisnet/irishub/v2/types" ) var Upgrade = upgrades.Upgrade{ diff --git a/app/upgrades/v130/upgrades.go b/app/upgrades/v130/upgrades.go index f043e49be..f1bd2d059 100644 --- a/app/upgrades/v130/upgrades.go +++ b/app/upgrades/v130/upgrades.go @@ -10,8 +10,8 @@ import ( mttypes "github.com/irisnet/irismod/modules/mt/types" - "github.com/irisnet/irishub/app/upgrades" - "github.com/irisnet/irishub/app/upgrades/v130/tibc" + "github.com/irisnet/irishub/v2/app/upgrades" + "github.com/irisnet/irishub/v2/app/upgrades/v130/tibc" ) var Upgrade = upgrades.Upgrade{ diff --git a/app/upgrades/v140/upgrades.go b/app/upgrades/v140/upgrades.go index 0797937e0..b5859ef15 100644 --- a/app/upgrades/v140/upgrades.go +++ b/app/upgrades/v140/upgrades.go @@ -11,7 +11,7 @@ import ( icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - "github.com/irisnet/irishub/app/upgrades" + "github.com/irisnet/irishub/v2/app/upgrades" ) var Upgrade = upgrades.Upgrade{ diff --git a/app/upgrades/v200/config.go b/app/upgrades/v200/config.go index df4d958ac..d3ffbf8ac 100644 --- a/app/upgrades/v200/config.go +++ b/app/upgrades/v200/config.go @@ -6,7 +6,7 @@ import ( etherminttypes "github.com/evmos/ethermint/x/evm/types" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" - "github.com/irisnet/irishub/types" + "github.com/irisnet/irishub/v2/types" ) // NOTE: Before the release of irishub 2.0.0, the configuration in this file must be modified diff --git a/app/upgrades/v200/upgrades.go b/app/upgrades/v200/upgrades.go index 622f66211..154ae5f3e 100644 --- a/app/upgrades/v200/upgrades.go +++ b/app/upgrades/v200/upgrades.go @@ -18,8 +18,8 @@ import ( "github.com/evmos/ethermint/x/feemarket" feemarkettypes "github.com/evmos/ethermint/x/feemarket/types" - "github.com/irisnet/irishub/app/upgrades" - irisevm "github.com/irisnet/irishub/modules/evm" + "github.com/irisnet/irishub/v2/app/upgrades" + irisevm "github.com/irisnet/irishub/v2/modules/evm" ) var Upgrade = upgrades.Upgrade{ diff --git a/app/upgrades/v210/upgrades.go b/app/upgrades/v210/upgrades.go index 7e653960d..dca36c71b 100644 --- a/app/upgrades/v210/upgrades.go +++ b/app/upgrades/v210/upgrades.go @@ -9,15 +9,18 @@ import ( crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/irisnet/irishub/app/upgrades" + ibcnfttransfertypes "github.com/bianjieai/nft-transfer/types" + + "github.com/irisnet/irishub/v2/app/upgrades" ) var Upgrade = upgrades.Upgrade{ UpgradeName: "v2.1", UpgradeHandlerConstructor: upgradeHandlerConstructor, StoreUpgrades: &storetypes.StoreUpgrades{ - Added: []string{crisistypes.StoreKey, consensustypes.StoreKey}, + Added: []string{crisistypes.StoreKey, consensustypes.StoreKey, ibcnfttransfertypes.StoreKey}, }, } @@ -38,6 +41,12 @@ func upgradeHandlerConstructor( // proposals, // ) + // Enable 09-localhost type in allowed clients according to + // https://github.com/cosmos/ibc-go/blob/v7.3.0/docs/migrations/v7-to-v7_1.md + params := app.IBCKeeper.ClientKeeper.GetParams(ctx) + params.AllowedClients = append(params.AllowedClients, exported.Localhost) + app.IBCKeeper.ClientKeeper.SetParams(ctx, params) + // Migrate Tendermint consensus parameters from x/params module to a // dedicated x/consensus module. baseAppLegacySS := app.ParamsKeeper.Subspace(baseapp.Paramspace). diff --git a/cmd/iris/cmd/genesis.go b/cmd/iris/cmd/genesis.go index 72093487f..69773dc12 100644 --- a/cmd/iris/cmd/genesis.go +++ b/cmd/iris/cmd/genesis.go @@ -16,7 +16,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/irisnet/irishub/app/params" + "github.com/irisnet/irishub/v2/app/params" ) const ( diff --git a/cmd/iris/cmd/keys.go b/cmd/iris/cmd/keys.go index 1aa434f78..99d89a664 100644 --- a/cmd/iris/cmd/keys.go +++ b/cmd/iris/cmd/keys.go @@ -18,7 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/input" "github.com/cosmos/cosmos-sdk/client/keys" - "github.com/irisnet/irishub/keystore" + "github.com/irisnet/irishub/v2/keystore" ) // Commands registers a sub-tree of commands to interact with diff --git a/cmd/iris/cmd/root.go b/cmd/iris/cmd/root.go index 119aab261..417c0c092 100644 --- a/cmd/iris/cmd/root.go +++ b/cmd/iris/cmd/root.go @@ -31,9 +31,9 @@ import ( ethermintserver "github.com/evmos/ethermint/server" servercfg "github.com/evmos/ethermint/server/config" - "github.com/irisnet/irishub/app" - "github.com/irisnet/irishub/app/params" - iristypes "github.com/irisnet/irishub/types" + "github.com/irisnet/irishub/v2/app" + "github.com/irisnet/irishub/v2/app/params" + iristypes "github.com/irisnet/irishub/v2/types" ) // NewRootCmd creates a new root command for simd. It is called once in the diff --git a/cmd/iris/cmd/testnet.go b/cmd/iris/cmd/testnet.go index 92cd68ed3..06769428c 100644 --- a/cmd/iris/cmd/testnet.go +++ b/cmd/iris/cmd/testnet.go @@ -41,8 +41,8 @@ import ( servercfg "github.com/evmos/ethermint/server/config" - guardiantypes "github.com/irisnet/irishub/modules/guardian/types" - iristypes "github.com/irisnet/irishub/types" + guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types" + iristypes "github.com/irisnet/irishub/v2/types" randomtypes "github.com/irisnet/irismod/modules/random/types" servicetypes "github.com/irisnet/irismod/modules/service/types" tokentypesv1 "github.com/irisnet/irismod/modules/token/types/v1" diff --git a/cmd/iris/main.go b/cmd/iris/main.go index ce434a0a4..d56ba05f8 100644 --- a/cmd/iris/main.go +++ b/cmd/iris/main.go @@ -6,9 +6,9 @@ import ( "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/irisnet/irishub/cmd/iris/cmd" - _ "github.com/irisnet/irishub/lite/statik" - "github.com/irisnet/irishub/types" + "github.com/irisnet/irishub/v2/cmd/iris/cmd" + _ "github.com/irisnet/irishub/v2/lite/statik" + "github.com/irisnet/irishub/v2/types" ) func main() { diff --git a/docs/get-started/mainnet.md b/docs/get-started/mainnet.md index 4923ec2ac..0ad53ae37 100644 --- a/docs/get-started/mainnet.md +++ b/docs/get-started/mainnet.md @@ -30,14 +30,14 @@ iris start Next, your node will process all chain upgrades. Between each upgrade, you must use the specified version to catch up with the block. Don't worry about using the old version at the upgrade height, the node will be halted automatically. -| Proposal | Start height | Upgrade height | irishub version | -| -------- | ------------ | -------------- | ----- | -| genesis | 9146456 | 9593205 | [v1.0.1](https://github.com/irisnet/irishub/releases/tag/v1.0.1) | -| [#1](https://irishub.iobscan.io/#/ProposalsDetail/1) | 9593206 | | [v1.1.0](https://github.com/irisnet/irishub/releases/tag/v1.1.0), [v1.1.1](https://github.com/irisnet/irishub/releases/tag/v1.1.1)| -| [#8](https://irishub.iobscan.io/#/ProposalsDetail/8) | 12393048 | 12534300 | [v1.2.0](https://github.com/irisnet/irishub/releases/tag/v1.2.0), [v1.2.1](https://github.com/irisnet/irishub/releases/tag/v1.2.1) | -| [#11](https://irishub.iobscan.io/#/ProposalsDetail/11) | 14166918 | 14301916 | [v1.3.0](https://github.com/irisnet/irishub/releases/tag/v1.3.0) | -| [#19](https://irishub.iobscan.io/#/gov/proposals/19) | | 17685953 | [v1.4.1](https://github.com/irisnet/irishub/releases/tag/v1.4.1) | - | [#39](https://irishub.iobscan.io/#/gov/proposals/39) | | 19514010 | [v2.0.0](https://github.com/irisnet/irishub/releases/tag/v2.0.0) | +| Proposal | Start height | Upgrade height | irishub version | +| ------------------------------------------------------ | ------------ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| genesis | 9146456 | 9593205 | [v1.0.1](https://github.com/irisnet/irishub/releases/tag/v1.0.1) | +| [#1](https://irishub.iobscan.io/#/ProposalsDetail/1) | 9593206 | | [v1.1.0](https://github.com/irisnet/irishub/releases/tag/v1.1.0), [v1.1.1](https://github.com/irisnet/irishub/releases/tag/v1.1.1) | +| [#8](https://irishub.iobscan.io/#/ProposalsDetail/8) | 12393048 | 12534300 | [v1.2.0](https://github.com/irisnet/irishub/releases/tag/v1.2.0), [v1.2.1](https://github.com/irisnet/irishub/releases/tag/v1.2.1) | +| [#11](https://irishub.iobscan.io/#/ProposalsDetail/11) | 14166918 | 14301916 | [v1.3.0](https://github.com/irisnet/irishub/releases/tag/v1.3.0) | +| [#19](https://irishub.iobscan.io/#/gov/proposals/19) | | 17685953 | [v1.4.1](https://github.com/irisnet/irishub/releases/tag/v1.4.1) | +| [#39](https://irishub.iobscan.io/#/gov/proposals/39) | | 19514010 | [v2.0.0](https://github.com/irisnet/irishub/releases/tag/v2.0.0) | :::tip You may see some connection errors, it does not matter, the P2P network is trying to find available connections diff --git a/go.mod b/go.mod index caf1b4ac9..085615ee5 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,18 @@ -module github.com/irisnet/irishub +module github.com/irisnet/irishub/v2 go 1.19 require ( - github.com/bianjieai/tibc-go v0.4.4-0.20230703020917-f2c4f40e4f3f + github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20230911023600-fa7bd3f3cb1e + github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 - github.com/cosmos/cosmos-sdk v0.47.3 + github.com/cosmos/cosmos-sdk v0.47.4 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ibc-go/v7 v7.2.0 - github.com/evmos/ethermint v0.20.0 - github.com/irisnet/irismod v1.7.4-0.20230704022721-11481f2b93ed + github.com/cosmos/ibc-go/v7 v7.3.0 + github.com/evmos/ethermint v0.22.0 + github.com/irisnet/irismod v1.7.4-0.20231010070045-9304e04cfc25 ) require ( @@ -30,9 +31,9 @@ require ( github.com/stretchr/testify v1.8.4 github.com/tidwall/gjson v1.14.4 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 - google.golang.org/grpc v1.55.0 - google.golang.org/protobuf v1.30.0 + google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect + google.golang.org/grpc v1.56.2 + google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 sigs.k8s.io/yaml v1.3.0 // indirect ) @@ -44,12 +45,13 @@ require ( github.com/pkg/errors v0.9.1 github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa github.com/spf13/viper v1.16.0 - golang.org/x/crypto v0.9.0 + golang.org/x/crypto v0.11.0 + google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 ) require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect - cosmossdk.io/log v1.1.0 // indirect + cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect @@ -58,25 +60,25 @@ require ( github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf // indirect - github.com/go-playground/locales v0.14.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/mock v1.6.0 // indirect - github.com/google/s2a-go v0.1.3 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/linxGnu/grocksdb v1.7.16 // indirect github.com/tidwall/btree v1.6.0 // indirect github.com/tidwall/sjson v1.2.5 // indirect github.com/zondax/ledger-go v0.14.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect pgregory.net/rapid v0.5.5 // indirect ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.19.0 // indirect - cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/storage v1.29.0 // indirect - cosmossdk.io/errors v1.0.0-beta.7 + cloud.google.com/go v0.110.4 // indirect + cloud.google.com/go/compute v1.20.1 // indirect + cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/storage v1.30.1 // indirect + cosmossdk.io/errors v1.0.0 filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -130,7 +132,7 @@ require ( github.com/google/orderedcode v0.0.1 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.8.0 // indirect + github.com/googleapis/gax-go/v2 v2.11.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -159,7 +161,7 @@ require ( github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect @@ -201,14 +203,14 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/term v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sync v0.2.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.122.0 // indirect + google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect @@ -219,6 +221,6 @@ require ( replace github.com/zondax/hid => github.com/zondax/hid v0.9.0 // use bianjieai fork of ethermint -replace github.com/evmos/ethermint => github.com/bianjieai/ethermint v0.6.1-0.20230704054052-1d6b3c366199 +replace github.com/evmos/ethermint => github.com/bianjieai/ethermint v0.6.1-0.20230914085944-3cc455cce3d4 replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 diff --git a/go.sum b/go.sum index 5c4285c35..753552726 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= +cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= +cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -73,8 +73,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= +cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= +cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -114,13 +114,12 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= +cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= +cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= @@ -178,8 +177,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -198,10 +197,10 @@ cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= -cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= -cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= +cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= +cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= +cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca h1:msenprh2BLLRwNT7zN56TbBHOGk/7ARQckXHxXyvjoQ= +cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca/go.mod h1:PkIAKXZvaxrTRc++z53XMRvFk8AcGGWYHcMIPzVYX9c= cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I= @@ -292,10 +291,12 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bianjieai/ethermint v0.6.1-0.20230704054052-1d6b3c366199 h1:lcfs68cN7F7o7496OusRGvBQV+cXWSTUErxRK19y6lE= -github.com/bianjieai/ethermint v0.6.1-0.20230704054052-1d6b3c366199/go.mod h1:3s8Z5Gb/lhW0hi5je917LUqH5tvmUdEwn55A1LaPIPk= -github.com/bianjieai/tibc-go v0.4.4-0.20230703020917-f2c4f40e4f3f h1:EWr2g45dzSgGppbjrGLB/lUz3yTuZZCkVV6qF9wTiUg= -github.com/bianjieai/tibc-go v0.4.4-0.20230703020917-f2c4f40e4f3f/go.mod h1:Q1mspLk9w0O5oBWkRpeCC8kdoZ0Ev8hkknkqu2cXDW8= +github.com/bianjieai/ethermint v0.6.1-0.20230914085944-3cc455cce3d4 h1:M3LU8I+hB9vqsK4oRFq0GxD+6Pzs48eWejvYuebtweQ= +github.com/bianjieai/ethermint v0.6.1-0.20230914085944-3cc455cce3d4/go.mod h1:JEhGmVj5rZX5bTfOqh3nltE2N6+qMI4HVNV2vW6PpOQ= +github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20230911023600-fa7bd3f3cb1e h1:6XiMxCG7DpIOBjqw2rGtZgMIOgS/0KsbU6m84BQ0mfo= +github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20230911023600-fa7bd3f3cb1e/go.mod h1:u2PNH4v8CD4AWU4Rf7yt8/qqQtrrwwHiw03qQSKERhg= +github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825 h1:+/6FK0V7uXouVYigb1EvPGuDN1ZDPfBnvzOUbTRe4rg= +github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825/go.mod h1:OBT3OZWqF8eTyQNGOvHycGg+pkhWWm5RwELT/NRZM9k= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= @@ -400,8 +401,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.3 h1:r0hGmZoAzP2D+MaPaFGHwAaTdFQq3pNpHaUp1BsffbM= -github.com/cosmos/cosmos-sdk v0.47.3/go.mod h1:c4OfLdAykA9zsj1CqrxBRqXzVz48I++JSvIMPSPcEmk= +github.com/cosmos/cosmos-sdk v0.47.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= +github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -412,8 +413,8 @@ github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoK github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= -github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/ibc-go/v7 v7.3.0 h1:QtGeVMi/3JeLWuvEuC60sBHpAF40Oenx/y+bP8+wRRw= +github.com/cosmos/ibc-go/v7 v7.3.0/go.mod h1:mUmaHFXpXrEdcxfdXyau+utZf14pGKVUiXwYftRZZfQ= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= @@ -553,7 +554,6 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= @@ -686,8 +686,8 @@ github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.3 h1:FAgZmpLl/SXurPEZyCMPBIiiYeTbqfjlbdnCNTAkbGE= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -708,8 +708,8 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.8.0 h1:UBtEZqx1bjXtOQ5BVTkuYghXrr3N4V123VKJK67vJZc= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= +github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -816,8 +816,8 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/irisnet/irismod v1.7.4-0.20230704022721-11481f2b93ed h1:gR6n+jqK0T8IOZn7e7wOI+X/8mYfdqRLYCsa4Rsnc6U= -github.com/irisnet/irismod v1.7.4-0.20230704022721-11481f2b93ed/go.mod h1:QL525InqKzSgxPmmRhjKmiGJqTUMm8BRZt11PQ3mQ9M= +github.com/irisnet/irismod v1.7.4-0.20231010070045-9304e04cfc25 h1:Q9d9JpHkMNlKgqJSKM8iCsOClUw+K2L0iejCjyQRNd8= +github.com/irisnet/irismod v1.7.4-0.20231010070045-9304e04cfc25/go.mod h1:6APlocacyWrjIK8YwrKK/jn3u5pJktppITU938rfc10= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= @@ -915,8 +915,8 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1291,8 +1291,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= 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= @@ -1403,8 +1403,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1430,8 +1430,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1446,8 +1446,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1557,14 +1557,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1576,8 +1576,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1715,8 +1715,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.122.0 h1:zDobeejm3E7pEG1mNHvdxvjs5XJoCMzyNH+CmwL94Es= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1836,8 +1836,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= +google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1879,8 +1883,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= +google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1897,8 +1901,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1937,7 +1941,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/lite/swagger.go b/lite/swagger.go index 962368a5a..cf13546a9 100644 --- a/lite/swagger.go +++ b/lite/swagger.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" - _ "github.com/irisnet/irishub/lite/statik" + _ "github.com/irisnet/irishub/v2/lite/statik" ) // RegisterSwaggerAPI registers swagger route with API Server diff --git a/modules/evm/moudle.go b/modules/evm/moudle.go index 3f6cca58f..5117f75ce 100644 --- a/modules/evm/moudle.go +++ b/modules/evm/moudle.go @@ -17,7 +17,8 @@ var ( // AppModule implements an application module for the evm module. type AppModule struct { ethermint.AppModule - k *Keeper + k *Keeper + ss types.Subspace } // NewAppModule creates a new AppModule object @@ -30,6 +31,7 @@ func NewAppModule( return AppModule{ AppModule: ethermint.NewAppModule(k, ak, ss), k: &Keeper{k, bankKeeper, false}, + ss: ss, } } @@ -38,4 +40,14 @@ func NewAppModule( func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), am.k) types.RegisterQueryServer(cfg.QueryServer(), am.k.evmkeeper) + + m := keeper.NewMigrator(*am.k.evmkeeper, am.ss) + + if err := cfg.RegisterMigration(types.ModuleName, 3, m.Migrate3to4); err != nil { + panic(err) + } + + if err := cfg.RegisterMigration(types.ModuleName, 4, m.Migrate4to5); err != nil { + panic(err) + } } diff --git a/modules/guardian/client/cli/cli_test.go b/modules/guardian/client/cli/cli_test.go index cb1e090c5..8e31f9ac5 100644 --- a/modules/guardian/client/cli/cli_test.go +++ b/modules/guardian/client/cli/cli_test.go @@ -15,10 +15,10 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - guardiancli "github.com/irisnet/irishub/modules/guardian/client/cli" - guardiantestutil "github.com/irisnet/irishub/modules/guardian/client/testutil" - guardiantypes "github.com/irisnet/irishub/modules/guardian/types" - "github.com/irisnet/irishub/simapp" + guardiancli "github.com/irisnet/irishub/v2/modules/guardian/client/cli" + guardiantestutil "github.com/irisnet/irishub/v2/modules/guardian/client/testutil" + guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types" + "github.com/irisnet/irishub/v2/simapp" ) var privKey cryptotypes.PrivKey diff --git a/modules/guardian/client/cli/query.go b/modules/guardian/client/cli/query.go index 2c0a071f3..84f1f6fb7 100644 --- a/modules/guardian/client/cli/query.go +++ b/modules/guardian/client/cli/query.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/version" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) // GetQueryCmd returns the cli query commands for the guardian module. diff --git a/modules/guardian/client/cli/tx.go b/modules/guardian/client/cli/tx.go index b978ecaa8..31c9f581e 100644 --- a/modules/guardian/client/cli/tx.go +++ b/modules/guardian/client/cli/tx.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) // NewTxCmd returns the transaction commands for the guardian module. diff --git a/modules/guardian/client/testutil/test_helpers.go b/modules/guardian/client/testutil/test_helpers.go index 85b725e45..ba87c26b5 100644 --- a/modules/guardian/client/testutil/test_helpers.go +++ b/modules/guardian/client/testutil/test_helpers.go @@ -13,8 +13,8 @@ import ( clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" - guardiancli "github.com/irisnet/irishub/modules/guardian/client/cli" - "github.com/irisnet/irishub/simapp" + guardiancli "github.com/irisnet/irishub/v2/modules/guardian/client/cli" + "github.com/irisnet/irishub/v2/simapp" ) // MsgRedelegateExec creates a redelegate message. diff --git a/modules/guardian/genesis.go b/modules/guardian/genesis.go index 64d196297..117e551e1 100644 --- a/modules/guardian/genesis.go +++ b/modules/guardian/genesis.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/guardian/keeper" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/keeper" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) // InitGenesis stores genesis data diff --git a/modules/guardian/genesis_test.go b/modules/guardian/genesis_test.go index a8d65c3f4..19e1198e7 100644 --- a/modules/guardian/genesis_test.go +++ b/modules/guardian/genesis_test.go @@ -10,10 +10,10 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/guardian" - "github.com/irisnet/irishub/modules/guardian/keeper" - "github.com/irisnet/irishub/modules/guardian/types" - "github.com/irisnet/irishub/simapp" + "github.com/irisnet/irishub/v2/modules/guardian" + "github.com/irisnet/irishub/v2/modules/guardian/keeper" + "github.com/irisnet/irishub/v2/modules/guardian/types" + "github.com/irisnet/irishub/v2/simapp" ) type TestSuite struct { diff --git a/modules/guardian/handler.go b/modules/guardian/handler.go index 4bf3fbb5d..8876ab7cb 100644 --- a/modules/guardian/handler.go +++ b/modules/guardian/handler.go @@ -4,8 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/irisnet/irishub/modules/guardian/keeper" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/keeper" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) // NewHandler returns a handler for all "guardian" type messages. diff --git a/modules/guardian/keeper/grpc_query.go b/modules/guardian/keeper/grpc_query.go index 3c64a317d..3d70064ac 100644 --- a/modules/guardian/keeper/grpc_query.go +++ b/modules/guardian/keeper/grpc_query.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) var _ types.QueryServer = Keeper{} diff --git a/modules/guardian/keeper/grpc_query_test.go b/modules/guardian/keeper/grpc_query_test.go index 46d7a354f..12809a862 100644 --- a/modules/guardian/keeper/grpc_query_test.go +++ b/modules/guardian/keeper/grpc_query_test.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/testutil/testdata" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) func (suite *KeeperTestSuite) TestGRPCQuerySupers() { diff --git a/modules/guardian/keeper/keeper.go b/modules/guardian/keeper/keeper.go index 74abbd8fe..74eb53844 100644 --- a/modules/guardian/keeper/keeper.go +++ b/modules/guardian/keeper/keeper.go @@ -9,7 +9,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) // Keeper of the guardian store diff --git a/modules/guardian/keeper/keeper_test.go b/modules/guardian/keeper/keeper_test.go index 15652f435..dceeff1a5 100644 --- a/modules/guardian/keeper/keeper_test.go +++ b/modules/guardian/keeper/keeper_test.go @@ -13,9 +13,9 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/guardian/keeper" - "github.com/irisnet/irishub/modules/guardian/types" - "github.com/irisnet/irishub/simapp" + "github.com/irisnet/irishub/v2/modules/guardian/keeper" + "github.com/irisnet/irishub/v2/modules/guardian/types" + "github.com/irisnet/irishub/v2/simapp" ) var ( diff --git a/modules/guardian/keeper/msg_service.go b/modules/guardian/keeper/msg_service.go index 20b7f5197..a10cc30e4 100644 --- a/modules/guardian/keeper/msg_service.go +++ b/modules/guardian/keeper/msg_service.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) type msgServer struct { diff --git a/modules/guardian/module.go b/modules/guardian/module.go index fd7dac586..9290e699c 100644 --- a/modules/guardian/module.go +++ b/modules/guardian/module.go @@ -18,9 +18,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/irisnet/irishub/modules/guardian/client/cli" - "github.com/irisnet/irishub/modules/guardian/keeper" - "github.com/irisnet/irishub/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/guardian/client/cli" + "github.com/irisnet/irishub/v2/modules/guardian/keeper" + "github.com/irisnet/irishub/v2/modules/guardian/types" ) var ( diff --git a/modules/guardian/types/genesis.pb.go b/modules/guardian/types/genesis.pb.go index ab36ca059..73f4809f1 100644 --- a/modules/guardian/types/genesis.pb.go +++ b/modules/guardian/types/genesis.pb.go @@ -75,7 +75,7 @@ func init() { func init() { proto.RegisterFile("irishub/guardian/genesis.proto", fileDescriptor_430b7f41c0a2b3b1) } var fileDescriptor_430b7f41c0a2b3b1 = []byte{ - // 196 bytes of a gzipped FileDescriptorProto + // 199 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x2c, 0xca, 0x2c, 0xce, 0x28, 0x4d, 0xd2, 0x4f, 0x2f, 0x4d, 0x2c, 0x4a, 0xc9, 0x4c, 0xcc, 0xd3, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xca, 0xeb, 0xc1, @@ -83,12 +83,12 @@ var fileDescriptor_430b7f41c0a2b3b1 = []byte{ 0xa6, 0x3e, 0x88, 0x05, 0x11, 0x55, 0x72, 0xe5, 0xe2, 0x71, 0x87, 0x98, 0x1c, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0x64, 0xca, 0xc5, 0x56, 0x5c, 0x5a, 0x90, 0x5a, 0x54, 0x2c, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xae, 0x87, 0x6e, 0x93, 0x5e, 0x30, 0x48, 0xde, 0x89, 0xe5, 0xc4, 0x3d, 0x79, - 0x86, 0x20, 0xa8, 0x62, 0x27, 0xef, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, + 0x86, 0x20, 0xa8, 0x62, 0x27, 0xbf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, - 0x32, 0x4c, 0xcf, 0x2c, 0x01, 0x69, 0x4f, 0xce, 0xcf, 0xd5, 0x07, 0x19, 0x95, 0x97, 0x5a, 0xa2, - 0x0f, 0x73, 0x6a, 0x6e, 0x7e, 0x4a, 0x69, 0x4e, 0x6a, 0x31, 0xc2, 0xc9, 0x25, 0x95, 0x05, 0xa9, - 0xc5, 0x49, 0x6c, 0x60, 0xa7, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xda, 0x0f, 0x65, 0xe4, - 0x05, 0x01, 0x00, 0x00, + 0x32, 0x49, 0xcf, 0x2c, 0x01, 0x69, 0x4f, 0xce, 0xcf, 0xd5, 0x07, 0x19, 0x95, 0x97, 0x5a, 0xa2, + 0x0f, 0x73, 0x6a, 0x99, 0x91, 0x7e, 0x6e, 0x7e, 0x4a, 0x69, 0x4e, 0x6a, 0x31, 0xc2, 0xd5, 0x25, + 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xd7, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x49, + 0x97, 0x2a, 0x9a, 0x08, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/guardian/types/guardian.pb.go b/modules/guardian/types/guardian.pb.go index 7a624fb64..6c95fa0d2 100644 --- a/modules/guardian/types/guardian.pb.go +++ b/modules/guardian/types/guardian.pb.go @@ -128,7 +128,7 @@ func init() { func init() { proto.RegisterFile("irishub/guardian/guardian.proto", fileDescriptor_cbcdd28e3c2705db) } var fileDescriptor_cbcdd28e3c2705db = []byte{ - // 325 bytes of a gzipped FileDescriptorProto + // 328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcf, 0x2c, 0xca, 0x2c, 0xce, 0x28, 0x4d, 0xd2, 0x4f, 0x2f, 0x4d, 0x2c, 0x4a, 0xc9, 0x4c, 0xcc, 0x83, 0x33, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0xa0, 0x0a, 0xf4, 0x60, 0xe2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, @@ -144,12 +144,12 @@ var fileDescriptor_cbcdd28e3c2705db = []byte{ 0x73, 0x0d, 0xf6, 0x0c, 0x16, 0x60, 0x90, 0xe2, 0xee, 0x9a, 0xab, 0xc0, 0xee, 0x9e, 0x9a, 0x97, 0x5a, 0x9c, 0x59, 0x2c, 0x24, 0xc5, 0xc5, 0xe1, 0x1f, 0xe4, 0xe2, 0xe9, 0xe7, 0x18, 0x14, 0x29, 0xc0, 0x28, 0xc5, 0xd3, 0x35, 0x57, 0x81, 0xc3, 0xbf, 0x28, 0x25, 0x33, 0x2f, 0xb1, 0xa8, 0x52, - 0x8a, 0xa5, 0x63, 0xb1, 0x1c, 0x83, 0x93, 0xf7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, + 0x8a, 0xa5, 0x63, 0xb1, 0x1c, 0x83, 0x93, 0xdf, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, - 0x31, 0x44, 0x19, 0xa6, 0x67, 0x96, 0x80, 0x3c, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf2, 0x68, 0x5e, - 0x6a, 0x89, 0x3e, 0x2c, 0xf0, 0x73, 0xf3, 0x53, 0x4a, 0x73, 0x52, 0x8b, 0x11, 0x91, 0x00, 0xf2, - 0x59, 0x71, 0x12, 0x1b, 0x38, 0x68, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x17, 0xb4, - 0x41, 0xa5, 0x01, 0x00, 0x00, + 0x31, 0x44, 0x99, 0xa4, 0x67, 0x96, 0x80, 0x3c, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf2, 0x68, 0x5e, + 0x6a, 0x89, 0x3e, 0x2c, 0xf0, 0xcb, 0x8c, 0xf4, 0x73, 0xf3, 0x53, 0x4a, 0x73, 0x52, 0x8b, 0x11, + 0xf1, 0x00, 0xf2, 0x5c, 0x71, 0x12, 0x1b, 0x38, 0x74, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x84, 0xb5, 0xea, 0xa9, 0xa8, 0x01, 0x00, 0x00, } func (m *Super) Marshal() (dAtA []byte, err error) { diff --git a/modules/guardian/types/msgs_test.go b/modules/guardian/types/msgs_test.go index 18e5c434f..21b329453 100644 --- a/modules/guardian/types/msgs_test.go +++ b/modules/guardian/types/msgs_test.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/address" + "github.com/irisnet/irishub/v2/address" ) // nolint: deadcode unused diff --git a/modules/guardian/types/query.pb.go b/modules/guardian/types/query.pb.go index 9779a3955..359bf891c 100644 --- a/modules/guardian/types/query.pb.go +++ b/modules/guardian/types/query.pb.go @@ -137,29 +137,30 @@ func init() { func init() { proto.RegisterFile("irishub/guardian/query.proto", fileDescriptor_49841d96de191552) } var fileDescriptor_49841d96de191552 = []byte{ - // 352 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xbf, 0x4e, 0x02, 0x31, - 0x1c, 0xc7, 0xaf, 0xa8, 0x0c, 0x65, 0x31, 0xd5, 0x44, 0x72, 0x21, 0x07, 0x21, 0xfe, 0x21, 0x0e, - 0x6d, 0xc0, 0xf8, 0x02, 0x0c, 0x3a, 0xb8, 0x28, 0x6e, 0xc6, 0xa5, 0x07, 0x4d, 0x6d, 0x02, 0xed, - 0x71, 0xed, 0x69, 0xd8, 0x8c, 0x4f, 0x60, 0x62, 0x7c, 0x27, 0x46, 0x12, 0x17, 0x27, 0x63, 0x38, - 0x1f, 0xc4, 0x5c, 0x7b, 0x08, 0x78, 0x03, 0x5b, 0xd3, 0xdf, 0xe7, 0xfb, 0xa7, 0xfd, 0xc1, 0x9a, - 0x88, 0x85, 0x7e, 0x48, 0x42, 0xc2, 0x13, 0x1a, 0x0f, 0x04, 0x95, 0x64, 0x9c, 0xb0, 0x78, 0x82, - 0xa3, 0x58, 0x19, 0x85, 0x76, 0xf3, 0x29, 0x5e, 0x4c, 0xfd, 0x7d, 0xae, 0xb8, 0xb2, 0x43, 0x92, - 0x9d, 0x1c, 0xe7, 0xd7, 0x0b, 0x2e, 0x8b, 0x43, 0x0e, 0xd4, 0xb8, 0x52, 0x7c, 0xc8, 0x08, 0x8d, - 0x04, 0xa1, 0x52, 0x2a, 0x43, 0x8d, 0x50, 0x52, 0xe7, 0xd3, 0xd3, 0xbe, 0xd2, 0x23, 0xa5, 0x49, - 0x48, 0x35, 0x73, 0xf9, 0xe4, 0xb1, 0x1d, 0x32, 0x43, 0xdb, 0x24, 0xa2, 0x5c, 0x48, 0x0b, 0x3b, - 0xb6, 0x79, 0x0f, 0xd1, 0x4d, 0x46, 0xdc, 0x26, 0x11, 0x8b, 0x75, 0x8f, 0x8d, 0x13, 0xa6, 0x0d, - 0xba, 0x80, 0x70, 0x49, 0x56, 0x41, 0x03, 0xb4, 0x2a, 0x9d, 0x63, 0xec, 0x6c, 0x71, 0x66, 0x8b, - 0xdd, 0xb3, 0x72, 0x5b, 0x7c, 0x4d, 0x39, 0xcb, 0xb5, 0xbd, 0x15, 0x65, 0xf3, 0x1d, 0xc0, 0xbd, - 0x35, 0x7b, 0x1d, 0x29, 0xa9, 0x19, 0x3a, 0x87, 0x65, 0x6d, 0x6f, 0xaa, 0xa0, 0xb1, 0xd5, 0xaa, - 0x74, 0x0e, 0xf0, 0xff, 0x9f, 0xc1, 0x56, 0xd1, 0xdd, 0x9e, 0x7e, 0xd5, 0xbd, 0x5e, 0x0e, 0xa3, - 0xcb, 0xb5, 0x5a, 0x25, 0x5b, 0xeb, 0x64, 0x63, 0x2d, 0x97, 0xb9, 0xda, 0xab, 0xf3, 0x0c, 0xe0, - 0x8e, 0xed, 0x85, 0x9e, 0x60, 0xd9, 0x75, 0x43, 0x87, 0xc5, 0x0e, 0xc5, 0x9f, 0xf1, 0x8f, 0x36, - 0x50, 0x2e, 0xac, 0xd9, 0x78, 0xf9, 0xf8, 0x79, 0x2b, 0xf9, 0xa8, 0x4a, 0x0a, 0xab, 0x74, 0x6f, - 0xe9, 0x5e, 0x4d, 0xe7, 0x01, 0x98, 0xcd, 0x03, 0xf0, 0x3d, 0x0f, 0xc0, 0x6b, 0x1a, 0x78, 0xb3, - 0x34, 0xf0, 0x3e, 0xd3, 0xc0, 0xbb, 0x6b, 0x73, 0x61, 0xb2, 0x80, 0xbe, 0x1a, 0x59, 0xb5, 0x64, - 0xe6, 0xcf, 0x65, 0xa4, 0x06, 0xc9, 0x90, 0xe9, 0xa5, 0x9b, 0x99, 0x44, 0x4c, 0x87, 0x65, 0xbb, - 0xcc, 0xb3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xce, 0x9d, 0x59, 0x80, 0x7f, 0x02, 0x00, 0x00, + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xcb, 0x4e, 0x2a, 0x31, + 0x18, 0xc7, 0xa7, 0x9c, 0x73, 0x58, 0x94, 0xcd, 0x49, 0x35, 0x91, 0x4c, 0xc8, 0x40, 0x88, 0x17, + 0xe2, 0xa2, 0x0d, 0xa3, 0xbe, 0x00, 0x0b, 0xdd, 0x19, 0xc5, 0x9d, 0x71, 0xd3, 0x81, 0xa6, 0x36, + 0x81, 0x76, 0x98, 0x76, 0x30, 0xec, 0x8c, 0x4f, 0x60, 0x62, 0x7c, 0x27, 0x96, 0x24, 0x6e, 0x5c, + 0x19, 0x03, 0x3e, 0x88, 0x99, 0x76, 0x10, 0x70, 0x16, 0xec, 0x9a, 0x7e, 0xbf, 0xff, 0xa5, 0xfd, + 0x60, 0x4d, 0x24, 0x42, 0xdf, 0xa7, 0x11, 0xe1, 0x29, 0x4d, 0xfa, 0x82, 0x4a, 0x32, 0x4a, 0x59, + 0x32, 0xc1, 0x71, 0xa2, 0x8c, 0x42, 0xff, 0xf3, 0x29, 0x5e, 0x4e, 0xfd, 0x5d, 0xae, 0xb8, 0xb2, + 0x43, 0x92, 0x9d, 0x1c, 0xe7, 0xd7, 0x0b, 0x2e, 0xcb, 0x43, 0x0e, 0xd4, 0xb8, 0x52, 0x7c, 0xc0, + 0x08, 0x8d, 0x05, 0xa1, 0x52, 0x2a, 0x43, 0x8d, 0x50, 0x52, 0xe7, 0xd3, 0xe3, 0x9e, 0xd2, 0x43, + 0xa5, 0x49, 0x44, 0x35, 0x73, 0xf9, 0x64, 0xdc, 0x8e, 0x98, 0xa1, 0x6d, 0x12, 0x53, 0x2e, 0xa4, + 0x85, 0x1d, 0xdb, 0xbc, 0x83, 0xe8, 0x3a, 0x23, 0x6e, 0xd2, 0x98, 0x25, 0xba, 0xcb, 0x46, 0x29, + 0xd3, 0x06, 0x9d, 0x43, 0xb8, 0x22, 0xab, 0xa0, 0x01, 0x5a, 0x95, 0xf0, 0x10, 0x3b, 0x5b, 0x9c, + 0xd9, 0x62, 0xf7, 0xac, 0xdc, 0x16, 0x5f, 0x51, 0xce, 0x72, 0x6d, 0x77, 0x4d, 0xd9, 0x7c, 0x05, + 0x70, 0x67, 0xc3, 0x5e, 0xc7, 0x4a, 0x6a, 0x86, 0xce, 0x60, 0x59, 0xdb, 0x9b, 0x2a, 0x68, 0xfc, + 0x69, 0x55, 0xc2, 0x3d, 0xfc, 0xfb, 0x67, 0xb0, 0x55, 0x74, 0xfe, 0x4e, 0x3f, 0xea, 0x5e, 0x37, + 0x87, 0xd1, 0xc5, 0x46, 0xad, 0x92, 0xad, 0x75, 0xb4, 0xb5, 0x96, 0xcb, 0x5c, 0xef, 0x15, 0x3e, + 0x02, 0xf8, 0xcf, 0xf6, 0x42, 0x0f, 0xb0, 0xec, 0xba, 0xa1, 0xfd, 0x62, 0x87, 0xe2, 0xcf, 0xf8, + 0x07, 0x5b, 0x28, 0x17, 0xd6, 0x6c, 0x3c, 0xbd, 0x7d, 0xbd, 0x94, 0x7c, 0x54, 0x25, 0x85, 0x55, + 0xba, 0xb7, 0x74, 0x2e, 0xa7, 0xf3, 0x00, 0xcc, 0xe6, 0x01, 0xf8, 0x9c, 0x07, 0xe0, 0x79, 0x11, + 0x78, 0xb3, 0x45, 0xe0, 0xbd, 0x2f, 0x02, 0xef, 0xf6, 0x94, 0x0b, 0x93, 0x05, 0xf4, 0xd4, 0xd0, + 0xaa, 0x25, 0x33, 0x3f, 0x2e, 0xe3, 0x90, 0x0c, 0x55, 0x3f, 0x1d, 0x30, 0xbd, 0x32, 0x34, 0x93, + 0x98, 0xe9, 0xa8, 0x6c, 0xf7, 0x79, 0xf2, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x08, 0x1d, 0xed, + 0x82, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/guardian/types/tx.pb.go b/modules/guardian/types/tx.pb.go index 66d815497..6a109209a 100644 --- a/modules/guardian/types/tx.pb.go +++ b/modules/guardian/types/tx.pb.go @@ -225,26 +225,26 @@ func init() { func init() { proto.RegisterFile("irishub/guardian/tx.proto", fileDescriptor_02bb99d7e79743a5) } var fileDescriptor_02bb99d7e79743a5 = []byte{ - // 298 bytes of a gzipped FileDescriptorProto + // 301 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xcd, 0x4a, 0x03, 0x31, 0x14, 0x85, 0x1b, 0x0b, 0xda, 0xde, 0x82, 0x48, 0x44, 0x99, 0x16, 0x1a, 0xca, 0x80, 0xd0, 0xd5, - 0x0c, 0xea, 0x13, 0x58, 0xdc, 0x88, 0x14, 0xa4, 0xae, 0x74, 0x23, 0xd3, 0xde, 0xcb, 0x18, 0x68, - 0x27, 0x43, 0x92, 0x01, 0xe7, 0x2d, 0x7c, 0x16, 0x9f, 0xc2, 0x65, 0x97, 0x2e, 0xa5, 0xf3, 0x22, - 0xd2, 0xb1, 0x29, 0x51, 0xfc, 0x59, 0xe6, 0x9e, 0x93, 0xef, 0xdc, 0xe4, 0x40, 0x57, 0x6a, 0x69, - 0x1e, 0x8b, 0x69, 0x9c, 0x16, 0x89, 0x46, 0x99, 0x64, 0xb1, 0x7d, 0x8a, 0x72, 0xad, 0xac, 0xe2, - 0x07, 0x1b, 0x29, 0x72, 0x52, 0x88, 0xd0, 0x19, 0x9b, 0xf4, 0x02, 0xf1, 0xb6, 0xc8, 0x49, 0xf3, - 0x01, 0x74, 0x90, 0xcc, 0x4c, 0xcb, 0xdc, 0x4a, 0x95, 0x05, 0x6c, 0xc0, 0x86, 0xed, 0x89, 0x3f, - 0xe2, 0x01, 0xec, 0x25, 0x88, 0x9a, 0x8c, 0x09, 0x76, 0x6a, 0xd5, 0x1d, 0x79, 0x17, 0x5a, 0x09, - 0x22, 0xe1, 0xc3, 0xb4, 0x0c, 0x9a, 0x5b, 0x89, 0x70, 0x54, 0x86, 0x47, 0x70, 0xe8, 0xa5, 0x4c, - 0xc8, 0xe4, 0x2a, 0x33, 0x14, 0x5e, 0xc1, 0xfe, 0xd8, 0xa4, 0x97, 0x34, 0x27, 0x4b, 0x9f, 0xf9, - 0xbf, 0xd3, 0xfb, 0x00, 0x58, 0x1b, 0x3d, 0x7e, 0x7b, 0x33, 0x19, 0x95, 0x61, 0x00, 0xc7, 0x5f, - 0x51, 0x2e, 0xe4, 0xec, 0x85, 0x41, 0x73, 0x6c, 0x52, 0x7e, 0x03, 0xad, 0xed, 0x33, 0xfb, 0xd1, - 0xf7, 0x8f, 0x88, 0xbc, 0xfd, 0x7a, 0x27, 0x7f, 0xca, 0x8e, 0xcc, 0xef, 0xa0, 0xe3, 0xef, 0x3e, - 0xf8, 0xf1, 0x96, 0xe7, 0xe8, 0x0d, 0xff, 0x73, 0x38, 0xf4, 0xe8, 0xfa, 0x75, 0x25, 0xd8, 0x72, - 0x25, 0xd8, 0xfb, 0x4a, 0xb0, 0xe7, 0x4a, 0x34, 0x96, 0x95, 0x68, 0xbc, 0x55, 0xa2, 0x71, 0x7f, - 0x9a, 0x4a, 0xbb, 0x26, 0xcc, 0xd4, 0x22, 0x5e, 0xd3, 0x32, 0xb2, 0xb1, 0x2b, 0x7c, 0xa1, 0xb0, - 0x98, 0x93, 0xf1, 0x8a, 0x2f, 0x73, 0x32, 0xd3, 0xdd, 0xba, 0xfc, 0xf3, 0x8f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xe7, 0x88, 0xdd, 0xcd, 0x19, 0x02, 0x00, 0x00, + 0x0c, 0x54, 0x5f, 0xc0, 0xe2, 0xc6, 0x45, 0x45, 0xea, 0x4a, 0x37, 0x32, 0xed, 0xbd, 0x8c, 0x81, + 0x76, 0x32, 0x24, 0x19, 0x71, 0xde, 0xc2, 0x67, 0xf1, 0x29, 0x5c, 0x76, 0xe9, 0x52, 0xda, 0x17, + 0x91, 0x8e, 0x4d, 0x89, 0xe2, 0xcf, 0x32, 0xf7, 0x9c, 0x7c, 0xe7, 0x26, 0x07, 0xda, 0x52, 0x4b, + 0xf3, 0x50, 0x4c, 0xe2, 0xb4, 0x48, 0x34, 0xca, 0x24, 0x8b, 0xed, 0x53, 0x94, 0x6b, 0x65, 0x15, + 0x3f, 0xd8, 0x48, 0x91, 0x93, 0x42, 0x84, 0xd6, 0xc8, 0xa4, 0xe7, 0x88, 0x37, 0x45, 0x4e, 0x9a, + 0xf7, 0xa0, 0x85, 0x64, 0xa6, 0x5a, 0xe6, 0x56, 0xaa, 0x2c, 0x60, 0x3d, 0xd6, 0x6f, 0x8e, 0xfd, + 0x11, 0x0f, 0x60, 0x2f, 0x41, 0xd4, 0x64, 0x4c, 0xb0, 0x53, 0xa9, 0xee, 0xc8, 0xdb, 0xd0, 0x48, + 0x10, 0x09, 0xef, 0x27, 0x65, 0x50, 0xdf, 0x4a, 0x84, 0xc3, 0x32, 0x3c, 0x82, 0x43, 0x2f, 0x65, + 0x4c, 0x26, 0x57, 0x99, 0xa1, 0xf0, 0x12, 0xf6, 0x47, 0x26, 0xbd, 0xa0, 0x19, 0x59, 0xfa, 0xcc, + 0xff, 0x9d, 0xde, 0x05, 0xc0, 0xca, 0xe8, 0xf1, 0x9b, 0x9b, 0xc9, 0xb0, 0x0c, 0x03, 0x38, 0xfe, + 0x8a, 0x72, 0x21, 0x83, 0x17, 0x06, 0xf5, 0x91, 0x49, 0xf9, 0x35, 0x34, 0xb6, 0xcf, 0xec, 0x46, + 0xdf, 0x3f, 0x22, 0xf2, 0xf6, 0xeb, 0x9c, 0xfc, 0x29, 0x3b, 0x32, 0xbf, 0x85, 0x96, 0xbf, 0x7b, + 0xef, 0xc7, 0x5b, 0x9e, 0xa3, 0xd3, 0xff, 0xcf, 0xe1, 0xd0, 0xc3, 0xab, 0xd7, 0xa5, 0x60, 0x8b, + 0xa5, 0x60, 0xef, 0x4b, 0xc1, 0x9e, 0x57, 0xa2, 0xb6, 0x58, 0x89, 0xda, 0xdb, 0x4a, 0xd4, 0xee, + 0xce, 0x52, 0x69, 0xd7, 0x84, 0xa9, 0x9a, 0xc7, 0x6b, 0x5a, 0x46, 0x36, 0x76, 0x85, 0x3f, 0x0e, + 0xe2, 0xb9, 0xc2, 0x62, 0x46, 0xc6, 0xeb, 0xbe, 0xcc, 0xc9, 0x4c, 0x76, 0xab, 0xfe, 0x4f, 0x3f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x91, 0xd4, 0xe1, 0x07, 0x1c, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/internft/interface.go b/modules/internft/interface.go new file mode 100644 index 000000000..431f9f383 --- /dev/null +++ b/modules/internft/interface.go @@ -0,0 +1,49 @@ +package internft + +import ( + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + + nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper" + nfttypes "github.com/irisnet/irismod/modules/nft/types" +) + +type ( + // AccountKeeper defines the contract required for account APIs. + AccountKeeper interface { + NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI + // Set an account in the store. + SetAccount(sdk.Context, authtypes.AccountI) + GetModuleAddress(name string) sdk.AccAddress + } + // InterNftKeeper defines the ICS721 Keeper + InterNftKeeper struct { + nk nftkeeper.Keeper + cdc codec.Codec + ak AccountKeeper + cb nfttypes.ClassBuilder + tb nfttypes.TokenBuilder + } + + InterClass struct { + ID string + URI string + Data string + } + + InterToken struct { + ClassID string + ID string + URI string + Data string + } +) + +func (d InterClass) GetID() string { return d.ID } +func (d InterClass) GetURI() string { return d.URI } +func (d InterClass) GetData() string { return d.Data } +func (t InterToken) GetClassID() string { return t.ClassID } +func (t InterToken) GetID() string { return t.ID } +func (t InterToken) GetURI() string { return t.URI } +func (t InterToken) GetData() string { return t.Data } diff --git a/modules/internft/keeper.go b/modules/internft/keeper.go new file mode 100644 index 000000000..175f7dd56 --- /dev/null +++ b/modules/internft/keeper.go @@ -0,0 +1,164 @@ +package internft + +import ( + "github.com/cometbft/cometbft/libs/log" + + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/nft" + + nfttransfer "github.com/bianjieai/nft-transfer/types" + + irismodnftkeeper "github.com/irisnet/irismod/modules/nft/keeper" + "github.com/irisnet/irismod/modules/nft/types" +) + +// NewInterNftKeeper creates a new ics721 Keeper instance +func NewInterNftKeeper(cdc codec.Codec, + k irismodnftkeeper.Keeper, + ak AccountKeeper, +) InterNftKeeper { + return InterNftKeeper{ + nk: k.NFTkeeper(), + cdc: cdc, + ak: ak, + cb: types.NewClassBuilder(cdc, ak.GetModuleAddress), + tb: types.NewTokenBuilder(cdc), + } +} + +// CreateOrUpdateClass implement the method of ICS721Keeper.CreateOrUpdateClass +func (ik InterNftKeeper) CreateOrUpdateClass(ctx sdk.Context, + classID, + classURI, + classData string, +) error { + var ( + class nft.Class + err error + ) + if len(classData) != 0 { + class, err = ik.cb.Build(classID, classURI, classData) + if err != nil { + return err + } + } else { + var denomMetadata = &types.DenomMetadata{ + Creator: ik.ak.GetModuleAddress(types.ModuleName).String(), + MintRestricted: true, + UpdateRestricted: true, + } + + metadata, err := codectypes.NewAnyWithValue(denomMetadata) + if err != nil { + return err + } + class = nft.Class{ + Id: classID, + Uri: classURI, + Data: metadata, + } + } + + if ik.nk.HasClass(ctx, classID) { + return ik.nk.UpdateClass(ctx, class) + } + return ik.nk.SaveClass(ctx, class) +} + +// Mint implement the method of ICS721Keeper.Mint +func (ik InterNftKeeper) Mint(ctx sdk.Context, + classID, + tokenID, + tokenURI, + tokenData string, + receiver sdk.AccAddress, +) error { + token, err := ik.tb.Build(classID, tokenID, tokenURI, tokenData) + if err != nil { + return err + } + return ik.nk.Mint(ctx, token, receiver) +} + +// Transfer implement the method of ICS721Keeper.Transfer +func (ik InterNftKeeper) Transfer( + ctx sdk.Context, + classID, + tokenID, + tokenData string, + receiver sdk.AccAddress, +) error { + if err := ik.nk.Transfer(ctx, classID, tokenID, receiver); err != nil { + return err + } + if len(tokenData) == 0 { + return nil + } + nft, _ := ik.nk.GetNFT(ctx, classID, tokenID) + token, err := ik.tb.Build(classID, tokenID, nft.Uri, tokenData) + if err != nil { + return err + } + + return ik.nk.Update(ctx, token) +} + +// GetClass implement the method of ICS721Keeper.GetClass +func (ik InterNftKeeper) GetClass(ctx sdk.Context, classID string) (nfttransfer.Class, bool) { + class, exist := ik.nk.GetClass(ctx, classID) + if !exist { + return nil, false + } + + metadata, err := ik.cb.BuildMetadata(class) + if err != nil { + ik.Logger(ctx).Error("encode class data failed") + return nil, false + } + return InterClass{ + ID: classID, + URI: class.Uri, + Data: metadata, + }, true +} + +// GetNFT implement the method of ICS721Keeper.GetNFT +func (ik InterNftKeeper) GetNFT(ctx sdk.Context, classID, tokenID string) (nfttransfer.NFT, bool) { + nft, has := ik.nk.GetNFT(ctx, classID, tokenID) + if !has { + return nil, false + } + metadata, err := ik.tb.BuildMetadata(nft) + if err != nil { + ik.Logger(ctx).Error("encode nft data failed") + return nil, false + } + return InterToken{ + ClassID: classID, + ID: tokenID, + URI: nft.Uri, + Data: metadata, + }, true +} + +// Burn implement the method of ICS721Keeper.Burn +func (ik InterNftKeeper) Burn(ctx sdk.Context, classID string, tokenID string) error { + return ik.nk.Burn(ctx, classID, tokenID) +} + +// GetOwner implement the method of ICS721Keeper.GetOwner +func (ik InterNftKeeper) GetOwner(ctx sdk.Context, classID string, tokenID string) sdk.AccAddress { + return ik.nk.GetOwner(ctx, classID, tokenID) +} + +// HasClass implement the method of ICS721Keeper.HasClass +func (ik InterNftKeeper) HasClass(ctx sdk.Context, classID string) bool { + return ik.nk.HasClass(ctx, classID) +} + +// Logger returns a module-specific logger. +func (ik InterNftKeeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", "ics721/NFTKeeper") +} diff --git a/modules/mint/abci.go b/modules/mint/abci.go index b932ab493..839ba4e6f 100644 --- a/modules/mint/abci.go +++ b/modules/mint/abci.go @@ -3,8 +3,8 @@ package mint import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/mint/keeper" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/keeper" + "github.com/irisnet/irishub/v2/modules/mint/types" ) // BeginBlocker handles block beginning logic for mint diff --git a/modules/mint/abci_test.go b/modules/mint/abci_test.go index 18f41db75..2ff04ee55 100644 --- a/modules/mint/abci_test.go +++ b/modules/mint/abci_test.go @@ -10,9 +10,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/irisnet/irishub/modules/mint" - "github.com/irisnet/irishub/modules/mint/types" - "github.com/irisnet/irishub/simapp" + "github.com/irisnet/irishub/v2/modules/mint" + "github.com/irisnet/irishub/v2/modules/mint/types" + "github.com/irisnet/irishub/v2/simapp" ) func TestBeginBlocker(t *testing.T) { diff --git a/modules/mint/client/cli/cli_test.go b/modules/mint/client/cli/cli_test.go index 5f8d38166..239bcd6bb 100644 --- a/modules/mint/client/cli/cli_test.go +++ b/modules/mint/client/cli/cli_test.go @@ -7,9 +7,9 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - minttestutil "github.com/irisnet/irishub/modules/mint/client/testutil" - minttypes "github.com/irisnet/irishub/modules/mint/types" - "github.com/irisnet/irishub/simapp" + minttestutil "github.com/irisnet/irishub/v2/modules/mint/client/testutil" + minttypes "github.com/irisnet/irishub/v2/modules/mint/types" + "github.com/irisnet/irishub/v2/simapp" ) type IntegrationTestSuite struct { diff --git a/modules/mint/client/cli/query.go b/modules/mint/client/cli/query.go index 2de167991..89514459f 100644 --- a/modules/mint/client/cli/query.go +++ b/modules/mint/client/cli/query.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) // GetQueryCmd returns the cli query commands for the mint module. diff --git a/modules/mint/client/rest/grpc_query_test.go b/modules/mint/client/rest/grpc_query_test.go index 56176555f..b5621392f 100644 --- a/modules/mint/client/rest/grpc_query_test.go +++ b/modules/mint/client/rest/grpc_query_test.go @@ -10,8 +10,8 @@ package rest_test // "github.com/cosmos/cosmos-sdk/testutil/network" // "github.com/cosmos/cosmos-sdk/types/rest" -// minttypes "github.com/irisnet/irishub/modules/mint/types" -// "github.com/irisnet/irishub/simapp" +// minttypes "github.com/irisnet/irishub/v2/modules/mint/types" +// "github.com/irisnet/irishub/v2/simapp" // ) // type IntegrationTestSuite struct { diff --git a/modules/mint/client/testutil/test_helpers.go b/modules/mint/client/testutil/test_helpers.go index b9a9ff2b8..bc4a9abe2 100644 --- a/modules/mint/client/testutil/test_helpers.go +++ b/modules/mint/client/testutil/test_helpers.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" - mintcli "github.com/irisnet/irishub/modules/mint/client/cli" + mintcli "github.com/irisnet/irishub/v2/modules/mint/client/cli" ) func QueryParamsExec(clientCtx client.Context, extraArgs ...string) (testutil.BufferWriter, error) { diff --git a/modules/mint/genesis.go b/modules/mint/genesis.go index d71adb471..c70888200 100644 --- a/modules/mint/genesis.go +++ b/modules/mint/genesis.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - "github.com/irisnet/irishub/modules/mint/keeper" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/keeper" + "github.com/irisnet/irishub/v2/modules/mint/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/modules/mint/keeper/grpc_query.go b/modules/mint/keeper/grpc_query.go index 7ea9c3545..e7aed2146 100644 --- a/modules/mint/keeper/grpc_query.go +++ b/modules/mint/keeper/grpc_query.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) var _ types.QueryServer = Keeper{} diff --git a/modules/mint/keeper/grpc_query_test.go b/modules/mint/keeper/grpc_query_test.go index a40f0c732..1326c297c 100644 --- a/modules/mint/keeper/grpc_query_test.go +++ b/modules/mint/keeper/grpc_query_test.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) func (suite *KeeperTestSuite) TestGRPCQueryPoolParameters() { diff --git a/modules/mint/keeper/keeper.go b/modules/mint/keeper/keeper.go index f58aa5f8b..db1f5eea9 100644 --- a/modules/mint/keeper/keeper.go +++ b/modules/mint/keeper/keeper.go @@ -9,7 +9,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) // keeper of the mint store diff --git a/modules/mint/keeper/keeper_test.go b/modules/mint/keeper/keeper_test.go index cbf453f78..24ac75758 100644 --- a/modules/mint/keeper/keeper_test.go +++ b/modules/mint/keeper/keeper_test.go @@ -12,8 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/mint/types" - "github.com/irisnet/irishub/simapp" + "github.com/irisnet/irishub/v2/modules/mint/types" + "github.com/irisnet/irishub/v2/simapp" ) type KeeperTestSuite struct { diff --git a/modules/mint/keeper/migrations.go b/modules/mint/keeper/migrations.go index 626302e56..e2d8d8712 100644 --- a/modules/mint/keeper/migrations.go +++ b/modules/mint/keeper/migrations.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v2 "github.com/irisnet/irishub/modules/mint/migrations/v2" + v2 "github.com/irisnet/irishub/v2/modules/mint/migrations/v2" "github.com/irisnet/irismod/types/exported" ) diff --git a/modules/mint/keeper/msg_server.go b/modules/mint/keeper/msg_server.go index ce6a7bdce..9f10fe9db 100644 --- a/modules/mint/keeper/msg_server.go +++ b/modules/mint/keeper/msg_server.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) type msgServer struct { diff --git a/modules/mint/keeper/params.go b/modules/mint/keeper/params.go index 5fc4842e7..3189fe837 100644 --- a/modules/mint/keeper/params.go +++ b/modules/mint/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) // GetParams sets the mint module parameters. diff --git a/modules/mint/migrations/v2/migrate.go b/modules/mint/migrations/v2/migrate.go index 40edf99cf..32b29b3ca 100644 --- a/modules/mint/migrations/v2/migrate.go +++ b/modules/mint/migrations/v2/migrate.go @@ -5,7 +5,7 @@ import ( "github.com/irisnet/irismod/types/exported" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) // MintKeeper defines a interface for SetParams function diff --git a/modules/mint/module.go b/modules/mint/module.go index 48261d768..6afd727ac 100644 --- a/modules/mint/module.go +++ b/modules/mint/module.go @@ -19,10 +19,10 @@ import ( "github.com/irisnet/irismod/types/exported" - "github.com/irisnet/irishub/modules/mint/client/cli" - "github.com/irisnet/irishub/modules/mint/keeper" - "github.com/irisnet/irishub/modules/mint/simulation" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/client/cli" + "github.com/irisnet/irishub/v2/modules/mint/keeper" + "github.com/irisnet/irishub/v2/modules/mint/simulation" + "github.com/irisnet/irishub/v2/modules/mint/types" ) // ConsensusVersion defines the current mint module consensus version. diff --git a/modules/mint/simulation/decoder.go b/modules/mint/simulation/decoder.go index c2d5917a6..554d03853 100644 --- a/modules/mint/simulation/decoder.go +++ b/modules/mint/simulation/decoder.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) // NewDecodeStore returns a function closure that unmarshals the KVPair's values diff --git a/modules/mint/simulation/decoder_test.go b/modules/mint/simulation/decoder_test.go index 780e7fd26..c74468b96 100644 --- a/modules/mint/simulation/decoder_test.go +++ b/modules/mint/simulation/decoder_test.go @@ -10,9 +10,9 @@ import ( sdkmath "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/types/kv" - "github.com/irisnet/irishub/modules/mint/simulation" - "github.com/irisnet/irishub/modules/mint/types" - "github.com/irisnet/irishub/simapp" + "github.com/irisnet/irishub/v2/modules/mint/simulation" + "github.com/irisnet/irishub/v2/modules/mint/types" + "github.com/irisnet/irishub/v2/simapp" ) func TestDecodeStore(t *testing.T) { diff --git a/modules/mint/simulation/genesis.go b/modules/mint/simulation/genesis.go index 9d5717d3f..2aa275887 100644 --- a/modules/mint/simulation/genesis.go +++ b/modules/mint/simulation/genesis.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/modules/mint/types" ) // Simulation parameter constants diff --git a/modules/mint/types/genesis.pb.go b/modules/mint/types/genesis.pb.go index 9e2995f1f..ba14bd079 100644 --- a/modules/mint/types/genesis.pb.go +++ b/modules/mint/types/genesis.pb.go @@ -83,7 +83,7 @@ func init() { func init() { proto.RegisterFile("irishub/mint/genesis.proto", fileDescriptor_79c69a4fab6b38a3) } var fileDescriptor_79c69a4fab6b38a3 = []byte{ - // 208 bytes of a gzipped FileDescriptorProto + // 212 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x2c, 0xca, 0x2c, 0xce, 0x28, 0x4d, 0xd2, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0xca, 0xe9, 0x81, 0xe4, 0xa4, 0xc4, 0x51, @@ -92,11 +92,12 @@ var fileDescriptor_79c69a4fab6b38a3 = []byte{ 0x62, 0x03, 0xe9, 0x49, 0x2d, 0x92, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x12, 0xd1, 0x43, 0x36, 0x5d, 0xcf, 0x17, 0x2c, 0xe7, 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x54, 0x25, 0x48, 0x4f, 0x41, 0x62, 0x51, 0x62, 0x6e, 0xb1, 0x04, 0x13, 0x36, 0x3d, 0x01, 0x60, 0x39, 0x98, 0x1e, 0x88, - 0x4a, 0x27, 0xf7, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, - 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4d, 0xcf, - 0x2c, 0x01, 0xe9, 0x4d, 0xce, 0xcf, 0xd5, 0x07, 0x99, 0x93, 0x97, 0x5a, 0xa2, 0x0f, 0xf7, 0x53, - 0x7e, 0x4a, 0x69, 0x4e, 0x6a, 0x31, 0xc4, 0x6f, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, - 0x7f, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x96, 0xa5, 0x48, 0x3e, 0x22, 0x01, 0x00, 0x00, + 0x4a, 0x27, 0xaf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, + 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x48, 0xcf, + 0x2c, 0x01, 0xe9, 0x4d, 0xce, 0xcf, 0xd5, 0x07, 0x99, 0x93, 0x97, 0x5a, 0xa2, 0x0f, 0xf3, 0x53, + 0x99, 0x91, 0x7e, 0x6e, 0x7e, 0x4a, 0x69, 0x4e, 0x6a, 0x31, 0xc4, 0x7b, 0x25, 0x95, 0x05, 0xa9, + 0xc5, 0x49, 0x6c, 0x60, 0xaf, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x9e, 0xc9, 0x3b, + 0x25, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/modules/mint/types/mint.pb.go b/modules/mint/types/mint.pb.go index 0e7985e07..203a1e219 100644 --- a/modules/mint/types/mint.pb.go +++ b/modules/mint/types/mint.pb.go @@ -131,30 +131,30 @@ func init() { func init() { proto.RegisterFile("irishub/mint/mint.proto", fileDescriptor_06d871d90c4bc3c9) } var fileDescriptor_06d871d90c4bc3c9 = []byte{ - // 355 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xbd, 0x6a, 0xeb, 0x30, - 0x14, 0xc7, 0xad, 0xcb, 0x25, 0x60, 0xe5, 0xde, 0x0e, 0xa6, 0xa5, 0x21, 0x50, 0x3b, 0x78, 0x28, - 0x59, 0x62, 0x41, 0xbb, 0x65, 0x34, 0x81, 0x50, 0x68, 0xa1, 0x98, 0x76, 0x69, 0x87, 0x20, 0xc7, - 0x8a, 0x2b, 0x6a, 0x49, 0xc6, 0x92, 0x87, 0xd0, 0x97, 0xc8, 0xd8, 0xb1, 0x8f, 0x93, 0x31, 0x4b, - 0xa1, 0x74, 0x70, 0x4b, 0xf2, 0x06, 0x79, 0x82, 0x22, 0x39, 0x49, 0xd3, 0xb1, 0x8b, 0xa4, 0xf3, - 0x3f, 0xe7, 0xfc, 0x74, 0x3e, 0xe0, 0x31, 0x2d, 0xa8, 0x7c, 0x28, 0x63, 0xc4, 0x28, 0x57, 0xe6, - 0x08, 0xf2, 0x42, 0x28, 0xe1, 0xfc, 0xdb, 0x38, 0x02, 0xad, 0xb5, 0x0f, 0x53, 0x91, 0x0a, 0xe3, - 0x40, 0xfa, 0x55, 0xc7, 0xb4, 0xbd, 0x54, 0x88, 0x34, 0x23, 0xc8, 0x58, 0x71, 0x39, 0x41, 0x8a, - 0x32, 0x22, 0x15, 0x66, 0x79, 0x1d, 0xe0, 0xbf, 0x02, 0xd8, 0xb8, 0xa2, 0x5c, 0x91, 0xc2, 0xb9, - 0x87, 0xcd, 0x0c, 0x4b, 0x35, 0x2a, 0xf3, 0x04, 0x2b, 0xd2, 0x02, 0x1d, 0xd0, 0x6d, 0x9e, 0xb5, - 0x83, 0x9a, 0x10, 0x6c, 0x09, 0xc1, 0xcd, 0x96, 0x10, 0xba, 0xf3, 0xca, 0xb3, 0xd6, 0x95, 0xe7, - 0x4c, 0x31, 0xcb, 0xfa, 0xfe, 0x5e, 0xb2, 0x3f, 0xfb, 0xf0, 0x40, 0x04, 0xb5, 0x72, 0x6b, 0x04, - 0x87, 0xc3, 0x03, 0xca, 0x27, 0x19, 0x56, 0x54, 0xf0, 0x51, 0x8c, 0x25, 0x69, 0xfd, 0xe9, 0x80, - 0xae, 0x1d, 0x0e, 0x35, 0xe3, 0xbd, 0xf2, 0x4e, 0x53, 0xaa, 0x74, 0x2f, 0x63, 0xc1, 0xd0, 0x58, - 0x48, 0x26, 0xe4, 0xe6, 0xea, 0xc9, 0xe4, 0x11, 0xa9, 0x69, 0x4e, 0x64, 0x70, 0xc1, 0xd5, 0xba, - 0xf2, 0x8e, 0xea, 0xdf, 0x7e, 0xd2, 0xfc, 0xe8, 0xff, 0x4e, 0x08, 0xb5, 0xfd, 0x04, 0x1b, 0xd7, - 0xb8, 0xc0, 0x4c, 0x3a, 0x27, 0x10, 0xea, 0x01, 0x8d, 0x12, 0xc2, 0x05, 0x33, 0x5d, 0xd9, 0x91, - 0xad, 0x95, 0x81, 0x16, 0x9c, 0x4b, 0x68, 0xef, 0x32, 0x37, 0x35, 0x05, 0xbf, 0xa8, 0x69, 0x40, - 0xc6, 0xd1, 0x37, 0xa0, 0xff, 0xf7, 0xf9, 0xc5, 0xb3, 0xc2, 0xe1, 0x7c, 0xe9, 0x82, 0xc5, 0xd2, - 0x05, 0x9f, 0x4b, 0x17, 0xcc, 0x56, 0xae, 0xb5, 0x58, 0xb9, 0xd6, 0xdb, 0xca, 0xb5, 0xee, 0x7a, - 0x7b, 0x48, 0xbd, 0x3e, 0x4e, 0x14, 0xda, 0xed, 0x57, 0x24, 0x65, 0x46, 0x64, 0xbd, 0x67, 0x43, - 0x8f, 0x1b, 0x66, 0xea, 0xe7, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xe5, 0x9b, 0x14, 0x04, - 0x02, 0x00, 0x00, + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0xbf, 0x4b, 0xc3, 0x40, + 0x14, 0xc7, 0x73, 0x22, 0x85, 0x5c, 0xd5, 0x21, 0x28, 0x96, 0x82, 0x49, 0xc9, 0x20, 0x5d, 0xcc, + 0x49, 0xdd, 0x3a, 0x86, 0x82, 0x28, 0x0a, 0x12, 0x74, 0xd1, 0xa1, 0x5c, 0x9a, 0x6b, 0x3c, 0xcc, + 0xdd, 0x85, 0xdc, 0x45, 0x28, 0xfe, 0x13, 0x1d, 0x1d, 0xfd, 0x73, 0x3a, 0x76, 0x11, 0xc4, 0x21, + 0x4a, 0xfb, 0x1f, 0xf4, 0x2f, 0x90, 0x4b, 0xda, 0x5a, 0x47, 0x97, 0xe4, 0xde, 0xf7, 0xbd, 0xf7, + 0x79, 0xbf, 0xe0, 0x21, 0xcd, 0xa8, 0x7c, 0xcc, 0x43, 0xc4, 0x28, 0x57, 0xe5, 0xc7, 0x4b, 0x33, + 0xa1, 0x84, 0xb5, 0xb3, 0x74, 0x78, 0x5a, 0x6b, 0xee, 0xc7, 0x22, 0x16, 0xa5, 0x03, 0xe9, 0x57, + 0x15, 0xd3, 0x74, 0x62, 0x21, 0xe2, 0x84, 0xa0, 0xd2, 0x0a, 0xf3, 0x21, 0x52, 0x94, 0x11, 0xa9, + 0x30, 0x4b, 0xab, 0x00, 0xf7, 0x1d, 0xc0, 0xda, 0x35, 0xe5, 0x8a, 0x64, 0xd6, 0x03, 0xac, 0x27, + 0x58, 0xaa, 0x7e, 0x9e, 0x46, 0x58, 0x91, 0x06, 0x68, 0x81, 0x76, 0xbd, 0xd3, 0xf4, 0x2a, 0x82, + 0xb7, 0x22, 0x78, 0xb7, 0x2b, 0x82, 0x6f, 0x4f, 0x0a, 0xc7, 0x58, 0x14, 0x8e, 0x35, 0xc2, 0x2c, + 0xe9, 0xba, 0x1b, 0xc9, 0xee, 0xf8, 0xcb, 0x01, 0x01, 0xd4, 0xca, 0x5d, 0x29, 0x58, 0x1c, 0xee, + 0x51, 0x3e, 0x4c, 0xb0, 0xa2, 0x82, 0xf7, 0x43, 0x2c, 0x49, 0x63, 0xab, 0x05, 0xda, 0xa6, 0x7f, + 0xae, 0x19, 0x9f, 0x85, 0x73, 0x1c, 0x53, 0xa5, 0x67, 0x19, 0x08, 0x86, 0x06, 0x42, 0x32, 0x21, + 0x97, 0xbf, 0x13, 0x19, 0x3d, 0x21, 0x35, 0x4a, 0x89, 0xf4, 0x2e, 0xb8, 0x5a, 0x14, 0xce, 0x41, + 0x55, 0xed, 0x2f, 0xcd, 0x0d, 0x76, 0xd7, 0x82, 0xaf, 0xed, 0x17, 0x58, 0xbb, 0xc1, 0x19, 0x66, + 0xd2, 0x3a, 0x82, 0x50, 0x2f, 0xa8, 0x1f, 0x11, 0x2e, 0x58, 0x39, 0x95, 0x19, 0x98, 0x5a, 0xe9, + 0x69, 0xc1, 0xba, 0x82, 0xe6, 0x3a, 0x73, 0xd9, 0x93, 0xf7, 0x8f, 0x9e, 0x7a, 0x64, 0x10, 0xfc, + 0x02, 0xba, 0xdb, 0xaf, 0x6f, 0x8e, 0xe1, 0x5f, 0x4e, 0x66, 0x36, 0x98, 0xce, 0x6c, 0xf0, 0x3d, + 0xb3, 0xc1, 0x78, 0x6e, 0x1b, 0xd3, 0xb9, 0x6d, 0x7c, 0xcc, 0x6d, 0xe3, 0xfe, 0x74, 0x03, 0xa9, + 0xcf, 0xc7, 0x89, 0x42, 0xab, 0xfb, 0x3e, 0x77, 0x10, 0x13, 0x51, 0x9e, 0x10, 0x59, 0x9d, 0xba, + 0x2c, 0x10, 0xd6, 0xca, 0xc5, 0x9f, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0xab, 0x43, 0x61, 0x1d, + 0x07, 0x02, 0x00, 0x00, } func (m *Minter) Marshal() (dAtA []byte, err error) { diff --git a/modules/mint/types/query.pb.go b/modules/mint/types/query.pb.go index f90bd191f..86799256c 100644 --- a/modules/mint/types/query.pb.go +++ b/modules/mint/types/query.pb.go @@ -128,28 +128,28 @@ func init() { func init() { proto.RegisterFile("irishub/mint/query.proto", fileDescriptor_f3acdec2e023e167) } var fileDescriptor_f3acdec2e023e167 = []byte{ - // 326 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x31, 0x4b, 0x03, 0x31, - 0x14, 0xc7, 0xef, 0xaa, 0x76, 0x88, 0x4e, 0xf1, 0xd0, 0x52, 0xca, 0x59, 0xbb, 0x28, 0x82, 0x09, - 0xad, 0x93, 0x6b, 0x17, 0xd7, 0xda, 0xd1, 0x2d, 0x57, 0x43, 0x0c, 0xf6, 0xf2, 0xd2, 0x4b, 0x4e, - 0xe8, 0x2a, 0x7e, 0x00, 0xc1, 0x2f, 0xd5, 0xb1, 0xe0, 0xe2, 0x24, 0xd2, 0xf3, 0x83, 0x48, 0x92, - 0x13, 0x3d, 0x04, 0x97, 0x10, 0xde, 0xfb, 0xff, 0x7f, 0xef, 0xfd, 0x1f, 0xea, 0xc8, 0x42, 0x9a, - 0xbb, 0x32, 0xa3, 0xb9, 0x54, 0x96, 0x2e, 0x4a, 0x5e, 0x2c, 0x89, 0x2e, 0xc0, 0x02, 0xde, 0xab, - 0x3b, 0xc4, 0x75, 0xba, 0x67, 0x33, 0x30, 0x39, 0x18, 0x9a, 0x31, 0xc3, 0x83, 0x8c, 0x3e, 0x0c, - 0x33, 0x6e, 0xd9, 0x90, 0x6a, 0x26, 0xa4, 0x62, 0x56, 0x82, 0x0a, 0xce, 0xee, 0x61, 0x83, 0xe9, - 0x9e, 0xba, 0x91, 0x08, 0x10, 0xe0, 0xbf, 0xd4, 0xfd, 0xea, 0x6a, 0x4f, 0x00, 0x88, 0x39, 0xa7, - 0x4c, 0x4b, 0xca, 0x94, 0x02, 0xeb, 0x59, 0x26, 0x74, 0x07, 0x09, 0xc2, 0xd7, 0x6e, 0xdc, 0x84, - 0x15, 0x2c, 0x37, 0x53, 0xbe, 0x28, 0xb9, 0xb1, 0x83, 0xa7, 0x18, 0xed, 0x37, 0xca, 0x46, 0x83, - 0x32, 0x1c, 0x8f, 0x50, 0x5b, 0xfb, 0x4a, 0x27, 0xee, 0xc7, 0xa7, 0xbb, 0xa3, 0x84, 0xfc, 0x4e, - 0x41, 0x82, 0x7a, 0xbc, 0xbd, 0x7a, 0x3f, 0x8a, 0xa6, 0xb5, 0x12, 0x5f, 0xa2, 0xad, 0x82, 0x9b, - 0x4e, 0xcb, 0x1b, 0x4e, 0x48, 0x08, 0x4a, 0x5c, 0x50, 0x12, 0xee, 0x51, 0x07, 0x25, 0x13, 0x26, - 0xf8, 0xf7, 0xa4, 0xa9, 0xf3, 0x8c, 0x2c, 0xda, 0xf1, 0x5b, 0xe0, 0x7b, 0xd4, 0x0e, 0x6c, 0xdc, - 0x6f, 0x4e, 0xfc, 0xbb, 0x7b, 0xf7, 0xf8, 0x1f, 0x45, 0x80, 0x0f, 0x7a, 0x8f, 0xaf, 0x9f, 0x2f, - 0xad, 0x03, 0x9c, 0xd0, 0xc6, 0x29, 0xc3, 0xc2, 0xe3, 0xab, 0xd5, 0x26, 0x8d, 0xd7, 0x9b, 0x34, - 0xfe, 0xd8, 0xa4, 0xf1, 0x73, 0x95, 0x46, 0xeb, 0x2a, 0x8d, 0xde, 0xaa, 0x34, 0xba, 0x39, 0x17, - 0xd2, 0x3a, 0xf0, 0x0c, 0x72, 0xef, 0x54, 0xdc, 0xfe, 0x10, 0xe0, 0xb6, 0x9c, 0x73, 0x13, 0x48, - 0x76, 0xa9, 0xb9, 0xc9, 0xda, 0xfe, 0xc4, 0x17, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x70, - 0xc2, 0x08, 0x05, 0x02, 0x00, 0x00, + // 330 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4e, 0xfb, 0x30, + 0x10, 0xc6, 0x93, 0xfe, 0xff, 0x74, 0x30, 0x4c, 0x26, 0x82, 0xaa, 0xaa, 0x42, 0xe9, 0x02, 0x62, + 0xb0, 0x69, 0x98, 0x58, 0x3b, 0x32, 0x95, 0x8e, 0x6c, 0x4e, 0xb1, 0x8c, 0x45, 0xe3, 0x73, 0x63, + 0xa7, 0x52, 0x57, 0xc4, 0x03, 0x20, 0xf1, 0x52, 0x1d, 0x2b, 0xb1, 0x30, 0x21, 0xd4, 0xf2, 0x20, + 0xc8, 0x76, 0x40, 0x44, 0x48, 0x2c, 0x96, 0x75, 0xf7, 0x7d, 0xbf, 0xbb, 0xef, 0x50, 0x47, 0x96, + 0xd2, 0xdc, 0x55, 0x39, 0x2d, 0xa4, 0xb2, 0x74, 0x5e, 0xf1, 0x72, 0x49, 0x74, 0x09, 0x16, 0xf0, + 0x5e, 0xdd, 0x21, 0xae, 0xd3, 0x3d, 0x9b, 0x82, 0x29, 0xc0, 0xd0, 0x9c, 0x19, 0x1e, 0x64, 0x74, + 0x31, 0xcc, 0xb9, 0x65, 0x43, 0xaa, 0x99, 0x90, 0x8a, 0x59, 0x09, 0x2a, 0x38, 0xbb, 0x87, 0x0d, + 0xa6, 0x7b, 0xea, 0x46, 0x22, 0x40, 0x80, 0xff, 0x52, 0xf7, 0xab, 0xab, 0x3d, 0x01, 0x20, 0x66, + 0x9c, 0x32, 0x2d, 0x29, 0x53, 0x0a, 0xac, 0x67, 0x99, 0xd0, 0x1d, 0x24, 0x08, 0x5f, 0xbb, 0x71, + 0x63, 0x56, 0xb2, 0xc2, 0x4c, 0xf8, 0xbc, 0xe2, 0xc6, 0x0e, 0x1e, 0x63, 0xb4, 0xdf, 0x28, 0x1b, + 0x0d, 0xca, 0x70, 0x9c, 0xa1, 0xb6, 0xf6, 0x95, 0x4e, 0xdc, 0x8f, 0x4f, 0x77, 0xb3, 0x84, 0xfc, + 0x4c, 0x41, 0x82, 0x7a, 0xf4, 0x7f, 0xf5, 0x76, 0x14, 0x4d, 0x6a, 0x25, 0xbe, 0x44, 0xff, 0x4a, + 0x6e, 0x3a, 0x2d, 0x6f, 0x38, 0x21, 0x21, 0x28, 0x71, 0x41, 0x49, 0xb8, 0x47, 0x1d, 0x94, 0x8c, + 0x99, 0xe0, 0x5f, 0x93, 0x26, 0xce, 0x93, 0x59, 0xb4, 0xe3, 0xb7, 0xc0, 0xf7, 0xa8, 0x1d, 0xd8, + 0xb8, 0xdf, 0x9c, 0xf8, 0x7b, 0xf7, 0xee, 0xf1, 0x1f, 0x8a, 0x00, 0x1f, 0xf4, 0x1e, 0x5e, 0x3e, + 0x9e, 0x5b, 0x07, 0x38, 0xa1, 0x8d, 0x53, 0x86, 0x85, 0x47, 0x57, 0xab, 0x4d, 0x1a, 0xaf, 0x37, + 0x69, 0xfc, 0xbe, 0x49, 0xe3, 0xa7, 0x6d, 0x1a, 0xad, 0xb7, 0x69, 0xf4, 0xba, 0x4d, 0xa3, 0x9b, + 0x73, 0x21, 0xad, 0x03, 0x4f, 0xa1, 0xf0, 0x4e, 0xc5, 0xed, 0x37, 0x61, 0x91, 0xd1, 0x02, 0x6e, + 0xab, 0x19, 0x37, 0x01, 0x66, 0x97, 0x9a, 0x9b, 0xbc, 0xed, 0xaf, 0x7c, 0xf1, 0x19, 0x00, 0x00, + 0xff, 0xff, 0xbe, 0x22, 0xb3, 0xbb, 0x08, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/mint/types/tx.pb.go b/modules/mint/types/tx.pb.go index e7a38f4dc..2589698cd 100644 --- a/modules/mint/types/tx.pb.go +++ b/modules/mint/types/tx.pb.go @@ -125,7 +125,7 @@ func init() { func init() { proto.RegisterFile("irishub/mint/tx.proto", fileDescriptor_6ccd37db551d9a32) } var fileDescriptor_6ccd37db551d9a32 = []byte{ - // 334 bytes of a gzipped FileDescriptorProto + // 338 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x2c, 0xca, 0x2c, 0xce, 0x28, 0x4d, 0xd2, 0xcf, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0x0a, 0xeb, 0x81, 0x84, 0xa5, 0xc4, 0x51, 0x14, 0x81, 0x08, 0x88, 0x32, @@ -141,12 +141,13 @@ var fileDescriptor_6ccd37db551d9a32 = []byte{ 0xc4, 0x74, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x2a, 0xad, 0xf8, 0x9a, 0x9e, 0x6f, 0xd0, 0x42, 0x98, 0xa1, 0x24, 0xc9, 0x25, 0x8e, 0xe6, 0x9c, 0xa0, 0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xa3, 0x68, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0xa1, 0x10, 0x2e, 0x1e, 0x14, 0xd7, 0xca, - 0xa2, 0xda, 0x82, 0xa6, 0x5b, 0x4a, 0x15, 0xaf, 0x34, 0xcc, 0x70, 0x27, 0xef, 0x13, 0x0f, 0xe5, + 0xa2, 0xda, 0x82, 0xa6, 0x5b, 0x4a, 0x15, 0xaf, 0x34, 0xcc, 0x70, 0x27, 0xbf, 0x13, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, - 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x37, 0x3d, 0xb3, 0x04, - 0x64, 0x44, 0x72, 0x7e, 0xae, 0x3e, 0xc8, 0xb8, 0xbc, 0xd4, 0x12, 0x7d, 0x78, 0xdc, 0xe5, 0xa7, - 0x94, 0xe6, 0xa4, 0x16, 0x43, 0x23, 0xba, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0xb6, 0xc6, - 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x2f, 0x90, 0x3d, 0x05, 0x02, 0x00, 0x00, + 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x20, 0x3d, 0xb3, 0x04, + 0x64, 0x44, 0x72, 0x7e, 0xae, 0x3e, 0xc8, 0xb8, 0xbc, 0xd4, 0x12, 0x7d, 0x58, 0xdc, 0x95, 0x19, + 0xe9, 0xe7, 0xe6, 0xa7, 0x94, 0xe6, 0xa4, 0x16, 0x43, 0xe3, 0xba, 0xb2, 0x20, 0xb5, 0x38, 0x89, + 0x0d, 0x1c, 0xbc, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x8e, 0xd1, 0x64, 0x08, 0x02, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml index ae4fcb5d6..fcb167981 100644 --- a/proto/buf.gen.pulsar.yaml +++ b/proto/buf.gen.pulsar.yaml @@ -8,7 +8,7 @@ managed: - buf.build/cosmos/gogo-proto - buf.build/cosmos/cosmos-proto override: - buf.build/irisnet/irishub: github.com/irisnet/irishub/api + buf.build/irisnet/irishub: github.com/irisnet/irishub/v2/api plugins: - name: go-pulsar out: ../api diff --git a/proto/irishub/guardian/genesis.proto b/proto/irishub/guardian/genesis.proto index 0b15915a2..04ea6b97c 100644 --- a/proto/irishub/guardian/genesis.proto +++ b/proto/irishub/guardian/genesis.proto @@ -4,7 +4,7 @@ package irishub.guardian; import "irishub/guardian/guardian.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/irisnet/irishub/modules/guardian/types"; +option go_package = "github.com/irisnet/irishub/v2/modules/guardian/types"; // GenesisState defines the guardian module's genesis state message GenesisState { diff --git a/proto/irishub/guardian/guardian.proto b/proto/irishub/guardian/guardian.proto index c6db871be..5c286e3b3 100644 --- a/proto/irishub/guardian/guardian.proto +++ b/proto/irishub/guardian/guardian.proto @@ -3,7 +3,7 @@ package irishub.guardian; import "gogoproto/gogo.proto"; -option go_package = "github.com/irisnet/irishub/modules/guardian/types"; +option go_package = "github.com/irisnet/irishub/v2/modules/guardian/types"; // Super defines the super standard message Super { diff --git a/proto/irishub/guardian/query.proto b/proto/irishub/guardian/query.proto index be1da4af0..464e9efb2 100644 --- a/proto/irishub/guardian/query.proto +++ b/proto/irishub/guardian/query.proto @@ -6,7 +6,7 @@ import "irishub/guardian/guardian.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -option go_package = "github.com/irisnet/irishub/modules/guardian/types"; +option go_package = "github.com/irisnet/irishub/v2/modules/guardian/types"; // Query creates service with guardian as RPC service Query { diff --git a/proto/irishub/guardian/tx.proto b/proto/irishub/guardian/tx.proto index 6c086d1cf..7f8c0892b 100644 --- a/proto/irishub/guardian/tx.proto +++ b/proto/irishub/guardian/tx.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package irishub.guardian; -option go_package = "github.com/irisnet/irishub/modules/guardian/types"; +option go_package = "github.com/irisnet/irishub/v2/modules/guardian/types"; // Msg defines the guardian Msg service service Msg { diff --git a/proto/irishub/mint/genesis.proto b/proto/irishub/mint/genesis.proto index 2064a6147..74271bc30 100644 --- a/proto/irishub/mint/genesis.proto +++ b/proto/irishub/mint/genesis.proto @@ -4,7 +4,7 @@ package irishub.mint; import "irishub/mint/mint.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/irisnet/irishub/modules/mint/types"; +option go_package = "github.com/irisnet/irishub/v2/modules/mint/types"; // GenesisState defines the mint module's genesis state message GenesisState { diff --git a/proto/irishub/mint/mint.proto b/proto/irishub/mint/mint.proto index bfd03d3a9..19ab82fc5 100644 --- a/proto/irishub/mint/mint.proto +++ b/proto/irishub/mint/mint.proto @@ -4,7 +4,7 @@ package irishub.mint; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/irisnet/irishub/modules/mint/types"; +option go_package = "github.com/irisnet/irishub/v2/modules/mint/types"; // Minter represents the minting state message Minter { diff --git a/proto/irishub/mint/query.proto b/proto/irishub/mint/query.proto index 0192961b7..a3daa2da7 100644 --- a/proto/irishub/mint/query.proto +++ b/proto/irishub/mint/query.proto @@ -6,7 +6,7 @@ import "irishub/mint/mint.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/irisnet/irishub/modules/mint/types"; +option go_package = "github.com/irisnet/irishub/v2/modules/mint/types"; // Query creates service with guardian as rpc service Query { diff --git a/proto/irishub/mint/tx.proto b/proto/irishub/mint/tx.proto index e026dcfe1..1095f0cfd 100644 --- a/proto/irishub/mint/tx.proto +++ b/proto/irishub/mint/tx.proto @@ -7,7 +7,7 @@ import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/irisnet/irishub/modules/mint/types"; +option go_package = "github.com/irisnet/irishub/v2/modules/mint/types"; option (gogoproto.goproto_getters_all) = false; // Msg defines the coinswap Msg service diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 67c2897b8..df853ec79 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -19,5 +19,5 @@ done cd .. # move proto files to the right places -cp -r github.com/irisnet/irishub/* ./ +cp -r github.com/irisnet/irishub/v2/* ./ rm -rf github.com diff --git a/simapp/app.go b/simapp/app.go index 145675f2f..b7a337d19 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -70,14 +70,14 @@ import ( tokentypes "github.com/irisnet/irismod/modules/token/types" tokenv1 "github.com/irisnet/irismod/modules/token/types/v1" - "github.com/irisnet/irishub/address" - "github.com/irisnet/irishub/lite" - "github.com/irisnet/irishub/modules/guardian" - guardiankeeper "github.com/irisnet/irishub/modules/guardian/keeper" - guardiantypes "github.com/irisnet/irishub/modules/guardian/types" - "github.com/irisnet/irishub/modules/mint" - mintkeeper "github.com/irisnet/irishub/modules/mint/keeper" - minttypes "github.com/irisnet/irishub/modules/mint/types" + "github.com/irisnet/irishub/v2/address" + "github.com/irisnet/irishub/v2/lite" + "github.com/irisnet/irishub/v2/modules/guardian" + guardiankeeper "github.com/irisnet/irishub/v2/modules/guardian/keeper" + guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types" + "github.com/irisnet/irishub/v2/modules/mint" + mintkeeper "github.com/irisnet/irishub/v2/modules/mint/keeper" + minttypes "github.com/irisnet/irishub/v2/modules/mint/types" tibcmttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer" tibcnfttransfer "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer" diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index df94ca2ba..f6e648500 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -45,7 +45,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - minttypes "github.com/irisnet/irishub/modules/mint/types" + minttypes "github.com/irisnet/irishub/v2/modules/mint/types" ) func setup(withGenesis bool, invCheckPeriod uint) (*SimApp, GenesisState) { diff --git a/sims.mk b/sims.mk index 2e6f6f5c8..c141b1f85 100644 --- a/sims.mk +++ b/sims.mk @@ -4,7 +4,7 @@ ### Simulations BINDIR ?= $(GOPATH)/bin -SIMAPP = github.com/irisnet/irishub/app +SIMAPP = github.com/irisnet/irishub/v2/app test-sim-nondeterminism: @echo "Running non-determinism test..." diff --git a/types/runtime.go b/types/runtime.go index a133f7925..9365df13b 100644 --- a/types/runtime.go +++ b/types/runtime.go @@ -11,7 +11,7 @@ import ( etherminttypes "github.com/evmos/ethermint/types" - "github.com/irisnet/irishub/address" + "github.com/irisnet/irishub/v2/address" tokentypes "github.com/irisnet/irismod/modules/token/types" tokenv1 "github.com/irisnet/irismod/modules/token/types/v1" ) From 465f0ef870566f7c0612442bfdf48460fce803ad Mon Sep 17 00:00:00 2001 From: yuandu Date: Wed, 11 Oct 2023 14:02:09 +0800 Subject: [PATCH 07/15] chore: rm comments --- app/upgrades/v210/upgrades.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/upgrades/v210/upgrades.go b/app/upgrades/v210/upgrades.go index dca36c71b..4bd30e603 100644 --- a/app/upgrades/v210/upgrades.go +++ b/app/upgrades/v210/upgrades.go @@ -30,17 +30,6 @@ func upgradeHandlerConstructor( app upgrades.AppKeepers, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // this migration is optional - // add proposal ids with proposers which are active (deposit or voting period) - // proposals := make(map[uint64]string) - // proposals[1] = "cosmos1luyncewxk4lm24k6gqy8y5dxkj0klr4tu0lmnj" - // v4.AddProposerAddressToProposal( - // ctx, - // sdk.NewKVStoreKey(v4.ModuleName), - // app.AppCodec, - // proposals, - // ) - // Enable 09-localhost type in allowed clients according to // https://github.com/cosmos/ibc-go/blob/v7.3.0/docs/migrations/v7-to-v7_1.md params := app.IBCKeeper.ClientKeeper.GetParams(ctx) From 58f13c601a1c5efabecea1e166a0f6a5640090fa Mon Sep 17 00:00:00 2001 From: yuandu Date: Thu, 12 Oct 2023 10:18:32 +0800 Subject: [PATCH 08/15] chore: group reject msgs ante handler --- ante/handler_options.go | 1 - ante/reject_msgs.go | 15 +++++++++++++-- ante/vesting.go | 31 ------------------------------- 3 files changed, 13 insertions(+), 34 deletions(-) delete mode 100644 ante/vesting.go diff --git a/ante/handler_options.go b/ante/handler_options.go index fdd1ba244..1b02f7481 100644 --- a/ante/handler_options.go +++ b/ante/handler_options.go @@ -64,7 +64,6 @@ func newEthAnteHandler(options HandlerOptions) sdk.AnteHandler { func newCosmosAnteHandler(options HandlerOptions) sdk.AnteHandler { return sdk.ChainAnteDecorators( RejectMessagesDecorator{}, - NewRejectVestingDecorator(), ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first ante.NewExtensionOptionsDecorator(options.ExtensionOptionChecker), ante.NewValidateBasicDecorator(), diff --git a/ante/reject_msgs.go b/ante/reject_msgs.go index f2728895c..3b5b448f6 100644 --- a/ante/reject_msgs.go +++ b/ante/reject_msgs.go @@ -4,22 +4,33 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" + vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" evmtypes "github.com/evmos/ethermint/x/evm/types" ) // RejectMessagesDecorator prevents invalid msg types from being executed type RejectMessagesDecorator struct{} -// AnteHandle rejects messages that requires ethereum-specific authentication. +// AnteHandle rejects the following messages: +// 1. Messages that requires ethereum-specific authentication. // For example `MsgEthereumTx` requires fee to be deducted in the antehandler in // order to perform the refund. +// 2. Messages that creates vesting accounts. func (rmd RejectMessagesDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { for _, msg := range tx.GetMsgs() { - if _, ok := msg.(*evmtypes.MsgEthereumTx); ok { + switch msg.(type) { + case *evmtypes.MsgEthereumTx: return ctx, errorsmod.Wrapf( errortypes.ErrInvalidType, "MsgEthereumTx needs to be contained within a tx with 'ExtensionOptionsEthereumTx' option", ) + + case *vestingtypes.MsgCreateVestingAccount, + *vestingtypes.MsgCreatePermanentLockedAccount, + *vestingtypes.MsgCreatePeriodicVestingAccount: + return ctx, errortypes.Wrap( + errortypes.ErrInvalidType, + "currently doesn't support creating vesting account") } } return next(ctx, tx, simulate) diff --git a/ante/vesting.go b/ante/vesting.go deleted file mode 100644 index 87861df30..000000000 --- a/ante/vesting.go +++ /dev/null @@ -1,31 +0,0 @@ -package ante - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" -) - -// RejectVestingDecorator is responsible for rejecting the vesting msg -type RejectVestingDecorator struct{} - -// NewRejectVestingDecorator returns an instance of ValidateVestingDecorator -func NewRejectVestingDecorator() RejectVestingDecorator { - return RejectVestingDecorator{} -} - -// AnteHandle checks the transaction -func (vvd RejectVestingDecorator) AnteHandle(ctx sdk.Context, - tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { - for _, msg := range tx.GetMsgs() { - switch msg.(type) { - case *vestingtypes.MsgCreateVestingAccount, - *vestingtypes.MsgCreatePermanentLockedAccount, - *vestingtypes.MsgCreatePeriodicVestingAccount: - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, - "currently doesn't support creating vesting account") - } - } - return next(ctx, tx, simulate) -} From 065b1ded184938af27654a296ecef05f4ce51502 Mon Sep 17 00:00:00 2001 From: yuandu Date: Thu, 12 Oct 2023 10:21:08 +0800 Subject: [PATCH 09/15] chore: rm legacy upgrade plans --- app/upgrade.go | 8 - app/upgrades/v110/htlc/htlc.pb.go | 647 --------------------------- app/upgrades/v110/htlc/keys.go | 42 -- app/upgrades/v110/htlc/migrate.go | 137 ------ app/upgrades/v110/service/migrate.go | 42 -- app/upgrades/v110/upgrades.go | 34 -- app/upgrades/v120/tibc/client.go | 8 - app/upgrades/v120/tibc/client.json | 125 ------ app/upgrades/v120/upgrades.go | 123 ----- app/upgrades/v130/tibc/client.go | 8 - app/upgrades/v130/tibc/client.json | 69 --- app/upgrades/v130/upgrades.go | 36 -- app/upgrades/v140/msgs.go | 46 -- app/upgrades/v140/upgrades.go | 62 --- 14 files changed, 1387 deletions(-) delete mode 100644 app/upgrades/v110/htlc/htlc.pb.go delete mode 100644 app/upgrades/v110/htlc/keys.go delete mode 100644 app/upgrades/v110/htlc/migrate.go delete mode 100644 app/upgrades/v110/service/migrate.go delete mode 100644 app/upgrades/v110/upgrades.go delete mode 100644 app/upgrades/v120/tibc/client.go delete mode 100644 app/upgrades/v120/tibc/client.json delete mode 100644 app/upgrades/v120/upgrades.go delete mode 100644 app/upgrades/v130/tibc/client.go delete mode 100644 app/upgrades/v130/tibc/client.json delete mode 100644 app/upgrades/v130/upgrades.go delete mode 100644 app/upgrades/v140/msgs.go delete mode 100644 app/upgrades/v140/upgrades.go diff --git a/app/upgrade.go b/app/upgrade.go index d050e5bf0..3a1e52832 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -6,20 +6,12 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" "github.com/irisnet/irishub/v2/app/upgrades" - v110 "github.com/irisnet/irishub/v2/app/upgrades/v110" - v120 "github.com/irisnet/irishub/v2/app/upgrades/v120" - v130 "github.com/irisnet/irishub/v2/app/upgrades/v130" - v140 "github.com/irisnet/irishub/v2/app/upgrades/v140" v200 "github.com/irisnet/irishub/v2/app/upgrades/v200" v210 "github.com/irisnet/irishub/v2/app/upgrades/v210" ) var ( router = upgrades.NewUpgradeRouter(). - Register(v110.Upgrade). - Register(v120.Upgrade). - Register(v130.Upgrade). - Register(v140.Upgrade). Register(v200.Upgrade). Register(v210.Upgrade) ) diff --git a/app/upgrades/v110/htlc/htlc.pb.go b/app/upgrades/v110/htlc/htlc.pb.go deleted file mode 100644 index a5df15ee3..000000000 --- a/app/upgrades/v110/htlc/htlc.pb.go +++ /dev/null @@ -1,647 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: htlc/htlc.proto - -package htlc - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// HTLCStatus defines the state of an OldHTLC -type HTLCStatus int32 - -const ( - // HTLC_STATE_OPEN defines an open state. - Open HTLCStatus = 0 - // HTLC_STATE_COMPLETED defines a completed state. - Completed HTLCStatus = 1 - // HTLC_STATE_EXPIRED defines an expired state. - Expired HTLCStatus = 2 - // HTLC_STATE_REFUNDED defines a refunded state. - Refunded HTLCStatus = 3 -) - -var HTLCStatus_name = map[int32]string{ - 0: "HTLC_STATE_OPEN", - 1: "HTLC_STATE_COMPLETED", - 2: "HTLC_STATE_EXPIRED", - 3: "HTLC_STATE_REFUNDED", -} - -var HTLCStatus_value = map[string]int32{ - "HTLC_STATE_OPEN": 0, - "HTLC_STATE_COMPLETED": 1, - "HTLC_STATE_EXPIRED": 2, - "HTLC_STATE_REFUNDED": 3, -} - -func (x HTLCStatus) String() string { - return proto.EnumName(HTLCStatus_name, int32(x)) -} - -// OldHTLC defines the struct of an OldHTLC -type OldHTLC struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` - ReceiverOnOtherChain string `protobuf:"bytes,3,opt,name=receiver_on_other_chain,json=receiverOnOtherChain,proto3" json:"receiver_on_other_chain,omitempty" yaml:"receiver_on_other_chain"` - Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` - Secret string `protobuf:"bytes,5,opt,name=secret,proto3" json:"secret,omitempty"` - Timestamp uint64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - ExpirationHeight uint64 `protobuf:"varint,7,opt,name=expiration_height,json=expirationHeight,proto3" json:"expiration_height,omitempty" yaml:"expiration_height"` - State HTLCStatus `protobuf:"varint,8,opt,name=state,proto3,enum=irismod.htlc.HTLCStatus" json:"state,omitempty"` -} - -func (m *OldHTLC) Reset() { *m = OldHTLC{} } -func (m *OldHTLC) String() string { return proto.CompactTextString(m) } -func (*OldHTLC) ProtoMessage() {} - -func (m *OldHTLC) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OldHTLC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HTLC.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *OldHTLC) XXX_Merge(src proto.Message) { - xxx_messageInfo_HTLC.Merge(m, src) -} -func (m *OldHTLC) XXX_Size() int { - return m.Size() -} -func (m *OldHTLC) XXX_DiscardUnknown() { - xxx_messageInfo_HTLC.DiscardUnknown(m) -} - -var xxx_messageInfo_HTLC proto.InternalMessageInfo - -func init() { - proto.RegisterEnum("irismod.htlc.HTLCStatus", HTLCStatus_name, HTLCStatus_value) - proto.RegisterType((*OldHTLC)(nil), "irismod.htlc.OldHTLC") -} - -func (this *OldHTLC) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OldHTLC) - if !ok { - that2, ok := that.(OldHTLC) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Sender != that1.Sender { - return false - } - if this.To != that1.To { - return false - } - if this.ReceiverOnOtherChain != that1.ReceiverOnOtherChain { - return false - } - if len(this.Amount) != len(that1.Amount) { - return false - } - for i := range this.Amount { - if !this.Amount[i].Equal(&that1.Amount[i]) { - return false - } - } - if this.Secret != that1.Secret { - return false - } - if this.Timestamp != that1.Timestamp { - return false - } - if this.ExpirationHeight != that1.ExpirationHeight { - return false - } - if this.State != that1.State { - return false - } - return true -} -func (m *OldHTLC) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OldHTLC) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OldHTLC) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.State != 0 { - i = encodeVarintHtlc(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x40 - } - if m.ExpirationHeight != 0 { - i = encodeVarintHtlc(dAtA, i, uint64(m.ExpirationHeight)) - i-- - dAtA[i] = 0x38 - } - if m.Timestamp != 0 { - i = encodeVarintHtlc(dAtA, i, uint64(m.Timestamp)) - i-- - dAtA[i] = 0x30 - } - if len(m.Secret) > 0 { - i -= len(m.Secret) - copy(dAtA[i:], m.Secret) - i = encodeVarintHtlc(dAtA, i, uint64(len(m.Secret))) - i-- - dAtA[i] = 0x2a - } - if len(m.Amount) > 0 { - for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHtlc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.ReceiverOnOtherChain) > 0 { - i -= len(m.ReceiverOnOtherChain) - copy(dAtA[i:], m.ReceiverOnOtherChain) - i = encodeVarintHtlc(dAtA, i, uint64(len(m.ReceiverOnOtherChain))) - i-- - dAtA[i] = 0x1a - } - if len(m.To) > 0 { - i -= len(m.To) - copy(dAtA[i:], m.To) - i = encodeVarintHtlc(dAtA, i, uint64(len(m.To))) - i-- - dAtA[i] = 0x12 - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintHtlc(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintHtlc(dAtA []byte, offset int, v uint64) int { - offset -= sovHtlc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *OldHTLC) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovHtlc(uint64(l)) - } - l = len(m.To) - if l > 0 { - n += 1 + l + sovHtlc(uint64(l)) - } - l = len(m.ReceiverOnOtherChain) - if l > 0 { - n += 1 + l + sovHtlc(uint64(l)) - } - if len(m.Amount) > 0 { - for _, e := range m.Amount { - l = e.Size() - n += 1 + l + sovHtlc(uint64(l)) - } - } - l = len(m.Secret) - if l > 0 { - n += 1 + l + sovHtlc(uint64(l)) - } - if m.Timestamp != 0 { - n += 1 + sovHtlc(uint64(m.Timestamp)) - } - if m.ExpirationHeight != 0 { - n += 1 + sovHtlc(uint64(m.ExpirationHeight)) - } - if m.State != 0 { - n += 1 + sovHtlc(uint64(m.State)) - } - return n -} - -func sovHtlc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozHtlc(x uint64) (n int) { - return sovHtlc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *OldHTLC) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OldHTLC: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OldHTLC: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHtlc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHtlc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHtlc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHtlc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.To = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReceiverOnOtherChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHtlc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHtlc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReceiverOnOtherChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHtlc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHtlc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Amount = append(m.Amount, types.Coin{}) - if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHtlc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHtlc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secret = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - m.Timestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Timestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpirationHeight", wireType) - } - m.ExpirationHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpirationHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHtlc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= HTLCStatus(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHtlc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHtlc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipHtlc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHtlc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHtlc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHtlc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthHtlc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupHtlc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthHtlc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthHtlc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHtlc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupHtlc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/app/upgrades/v110/htlc/keys.go b/app/upgrades/v110/htlc/keys.go deleted file mode 100644 index 265310d77..000000000 --- a/app/upgrades/v110/htlc/keys.go +++ /dev/null @@ -1,42 +0,0 @@ -package htlc - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -const ( - // ModuleName is the name of the HTLC module - ModuleName = "htlc" - - // StoreKey is the string store representation - StoreKey string = ModuleName - - // QuerierRoute is the querier route for the HTLC module - QuerierRoute string = ModuleName - - // RouterKey is the msg router key for the HTLC module - RouterKey string = ModuleName -) - -var ( - // Keys for store prefixes - HTLCKey = []byte{0x01} // prefix for HTLC - HTLCExpiredQueueKey = []byte{0x02} // prefix for the HTLC expiration queue -) - -// GetHTLCKey returns the key for the HTLC with the specified hash lock -// VALUE: htlc/HTLC -func GetHTLCKey(hashLock []byte) []byte { - return append(HTLCKey, hashLock...) -} - -// GetHTLCExpiredQueueKey returns the key for the HTLC expiration queue by the specified height and hash lock -// VALUE: []byte{} -func GetHTLCExpiredQueueKey(expirationHeight uint64, hashLock []byte) []byte { - return append(append(HTLCExpiredQueueKey, sdk.Uint64ToBigEndian(expirationHeight)...), hashLock...) -} - -// GetHTLCExpiredQueueSubspace returns the key prefix for the HTLC expiration queue by the given height -func GetHTLCExpiredQueueSubspace(expirationHeight uint64) []byte { - return append(HTLCExpiredQueueKey, sdk.Uint64ToBigEndian(expirationHeight)...) -} diff --git a/app/upgrades/v110/htlc/migrate.go b/app/upgrades/v110/htlc/migrate.go deleted file mode 100644 index 676ef4979..000000000 --- a/app/upgrades/v110/htlc/migrate.go +++ /dev/null @@ -1,137 +0,0 @@ -package htlc - -import ( - "time" - - tmbytes "github.com/cometbft/cometbft/libs/bytes" - - "github.com/cosmos/cosmos-sdk/codec" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - - htlckeeper "github.com/irisnet/irismod/modules/htlc/keeper" - htlctypes "github.com/irisnet/irismod/modules/htlc/types" -) - -func Migrate( - ctx sdk.Context, - cdc codec.Codec, - k htlckeeper.Keeper, - bk bankkeeper.Keeper, - key *storetypes.KVStoreKey, -) error { - if err := k.EnsureModuleAccountPermissions(ctx); err != nil { - return err - } - - store := ctx.KVStore(key) - - // Delete expired queue - store.Delete(HTLCExpiredQueueKey) - - iterator := sdk.KVStorePrefixIterator(store, HTLCKey) - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - hashLock := tmbytes.HexBytes(iterator.Key()[1:]) - - var htlc OldHTLC - cdc.MustUnmarshal(iterator.Value(), &htlc) - - sender, err := sdk.AccAddressFromBech32(htlc.Sender) - if err != nil { - return err - } - receiver, err := sdk.AccAddressFromBech32(htlc.To) - if err != nil { - return err - } - id := htlctypes.GetID(sender, receiver, htlc.Amount, hashLock) - expirationHeight := htlc.ExpirationHeight - closedBlock := uint64(0) - - var state htlctypes.HTLCState - switch htlc.State { - case Open: - state = htlctypes.Open - // Add to expired queue - k.AddHTLCToExpiredQueue(ctx, expirationHeight, id) - case Completed: - state = htlctypes.Completed - case Expired: - // Refund expired htlc - state = htlctypes.Refunded - if err := bk.SendCoinsFromModuleToAccount(ctx, htlctypes.ModuleName, sender, htlc.Amount); err != nil { - return err - } - closedBlock = uint64(ctx.BlockHeight()) - case Refunded: - state = htlctypes.Refunded - } - - // Delete origin htlc - store.Delete(GetHTLCKey(hashLock)) - - newHTLC := htlctypes.HTLC{ - Id: id.String(), - Sender: htlc.Sender, - To: htlc.To, - ReceiverOnOtherChain: htlc.ReceiverOnOtherChain, - SenderOnOtherChain: "", - Amount: htlc.Amount, - HashLock: hashLock.String(), - Secret: htlc.Secret, - Timestamp: htlc.Timestamp, - ExpirationHeight: expirationHeight, - State: state, - ClosedBlock: closedBlock, - Transfer: false, - Direction: htlctypes.None, - } - // Set new htlc - k.SetHTLC(ctx, newHTLC, id) - } - - // Set default params - return k.SetParams(ctx, PresetHTLTParams()) -} - -func PresetHTLTParams() htlctypes.Params { - return htlctypes.Params{ - AssetParams: []htlctypes.AssetParam{ - { - Denom: "htltbcbnb", - SupplyLimit: htlctypes.SupplyLimit{ - Limit: sdk.NewInt(100000000000000), - TimeLimited: false, - TimeBasedLimit: sdk.ZeroInt(), - TimePeriod: time.Duration(0), - }, - Active: true, - DeputyAddress: "iaa1junhkdhuamtdz3ah6d5mfp6w9sxmlwera7mruz", - FixedFee: sdk.NewInt(1000), - MinSwapAmount: sdk.NewInt(1001), - MaxSwapAmount: sdk.NewInt(1000000000000), - MinBlockLock: 50, - MaxBlockLock: 34560, - }, - { - Denom: "htltbcbusd", - SupplyLimit: htlctypes.SupplyLimit{ - Limit: sdk.NewInt(2000000000000000), - TimeLimited: false, - TimeBasedLimit: sdk.ZeroInt(), - TimePeriod: time.Duration(0), - }, - Active: true, - DeputyAddress: "iaa1z2sdef0ypat9lq7wsxrt7ue3uzdnzcsd34wsl4", - FixedFee: sdk.NewInt(20000), - MinSwapAmount: sdk.NewInt(20001), - MaxSwapAmount: sdk.NewInt(15000000000000), - MinBlockLock: 50, - MaxBlockLock: 34560, - }, - }, - } -} diff --git a/app/upgrades/v110/service/migrate.go b/app/upgrades/v110/service/migrate.go deleted file mode 100644 index 492967572..000000000 --- a/app/upgrades/v110/service/migrate.go +++ /dev/null @@ -1,42 +0,0 @@ -package service - -import ( - "github.com/cometbft/cometbft/crypto" - - sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - - servicekeeper "github.com/irisnet/irismod/modules/service/keeper" - servicetypes "github.com/irisnet/irismod/modules/service/types" -) - -const ( - // TaxAccName is the root string for the service tax account address - TaxAccName = "service_tax_account" -) - -func Migrate(ctx sdk.Context, k servicekeeper.Keeper, bk bankkeeper.Keeper) error { - oldAcc := sdk.AccAddress(crypto.AddressHash([]byte(TaxAccName))) - params := servicetypes.NewParams( - k.MaxRequestTimeout(ctx), - k.MinDepositMultiple(ctx), - k.MinDeposit(ctx), - k.ServiceFeeTax(ctx), - k.SlashFraction(ctx), - k.ComplaintRetrospect(ctx), - k.ArbitrationTimeLimit(ctx), - k.TxSizeLimit(ctx), - k.BaseDenom(ctx), - false, - ) - - if err := k.SetParams(ctx, params); err != nil { - return err - } - return bk.SendCoinsFromAccountToModule( - ctx, - oldAcc, - servicetypes.FeeCollectorName, - bk.GetAllBalances(ctx, oldAcc), - ) -} diff --git a/app/upgrades/v110/upgrades.go b/app/upgrades/v110/upgrades.go deleted file mode 100644 index 77a1ff7e9..000000000 --- a/app/upgrades/v110/upgrades.go +++ /dev/null @@ -1,34 +0,0 @@ -package v110 - -import ( - store "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - "github.com/irisnet/irishub/v2/app/upgrades" - "github.com/irisnet/irishub/v2/app/upgrades/v110/htlc" - "github.com/irisnet/irishub/v2/app/upgrades/v110/service" - htlctypes "github.com/irisnet/irismod/modules/htlc/types" -) - -var Upgrade = upgrades.Upgrade{ - UpgradeName: "v1.1", - UpgradeHandlerConstructor: upgradeHandlerConstructor, - StoreUpgrades: &store.StoreUpgrades{}, -} - -func upgradeHandlerConstructor(m *module.Manager, c module.Configurator, app upgrades.AppKeepers) types.UpgradeHandler { - return func(ctx sdk.Context, plan types.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // migrate htlc - if err := htlc.Migrate(ctx, app.AppCodec, app.HTLCKeeper, app.BankKeeper, app.GetKey(htlctypes.StoreKey)); err != nil { - panic(err) - } - // migrate service - if err := service.Migrate(ctx, app.ServiceKeeper, app.BankKeeper); err != nil { - panic(err) - } - - return fromVM, nil - } -} diff --git a/app/upgrades/v120/tibc/client.go b/app/upgrades/v120/tibc/client.go deleted file mode 100644 index fc95691c8..000000000 --- a/app/upgrades/v120/tibc/client.go +++ /dev/null @@ -1,8 +0,0 @@ -package tibc - -import ( - _ "embed" -) - -//go:embed client.json -var ClientData []byte diff --git a/app/upgrades/v120/tibc/client.json b/app/upgrades/v120/tibc/client.json deleted file mode 100644 index 733b920b2..000000000 --- a/app/upgrades/v120/tibc/client.json +++ /dev/null @@ -1,125 +0,0 @@ -[ - { - "chain_name": "bsnhub-mainnet", - "consensus_state": { - "@type": "/tibc.lightclients.tendermint.v1.ConsensusState", - "timestamp": "2021-11-03T11:09:19.838000955Z", - "root": { - "hash": "YXBwX2hhc2g=" - }, - "next_validators_hash": "9DA3EB65E16CC577BFDFDB69E039D074E4FF593DC1E4053151B902F8D94FF5F2" - }, - "client_state": { - "@type": "/tibc.lightclients.tendermint.v1.ClientState", - "chain_id": "BSN-net", - "trust_level": { - "numerator": "1", - "denominator": "3" - }, - "trusting_period": "8640000s", - "unbonding_period": "8640000s", - "max_clock_drift": "10s", - "latest_height": { - "revision_number": "0", - "revision_height": "4945409" - }, - "proof_specs": [ - { - "leaf_spec": { - "hash": "SHA256", - "prehash_key": "NO_HASH", - "prehash_value": "SHA256", - "length": "VAR_PROTO", - "prefix": "AA==" - }, - "inner_spec": { - "child_order": [ - 0, - 1 - ], - "child_size": 33, - "min_prefix_length": 4, - "max_prefix_length": 12, - "empty_child": null, - "hash": "SHA256" - }, - "max_depth": 0, - "min_depth": 0 - }, - { - "leaf_spec": { - "hash": "SHA256", - "prehash_key": "NO_HASH", - "prehash_value": "SHA256", - "length": "VAR_PROTO", - "prefix": "AA==" - }, - "inner_spec": { - "child_order": [ - 0, - 1 - ], - "child_size": 32, - "min_prefix_length": 1, - "max_prefix_length": 1, - "empty_child": null, - "hash": "SHA256" - }, - "max_depth": 0, - "min_depth": 0 - } - ], - "MerklePrefix": { - "key_prefix": "dGliYw==" - }, - "timeDelay": "0" - }, - "relayers": [ - "iaa1vcghfru68sxgpxcd0yfeqt50h8wunf0w574plw" - ] - }, - { - "chain_name": "eth-mainnet", - "consensus_state": { - "@type": "/tibc.lightclients.eth.v1.ConsensusState", - "timestamp": "1635938396", - "number": { - "revision_number": "0", - "revision_height": "13543580" - }, - "root": "DMSfdPZ995A7UVNVo0ppGInY5BTPtdBL7u71AG5LGqU=" - }, - "client_state": { - "@type": "/tibc.lightclients.eth.v1.ClientState", - "header": { - "parent_hash": "OG3Zhdj4dQfq1tUXMCuJJyk7QHgN2Qc58aRPdhSJF4g=", - "uncle_hash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", - "coinbase": "gpvYJLAWMmpAHQg7M9CSKTMzqDA=", - "root": "DMSfdPZ995A7UVNVo0ppGInY5BTPtdBL7u71AG5LGqU=", - "tx_hash": "gMEAlQBXfq+ZnU1jJCDTxpopY5pNr3HnRCNzJ9HDn14=", - "receipt_hash": "Bb065SFKYFj9vYEq4khZkmPzGBrKhQymDAAIvQclM3w=", - "bloom": "3O0c/1X/3tr3/u//h7H/N1ojN2n+HqMt87X9Gv/r9/3b2//zkP+/19v7X4T+G/m/f//qO3+naeU/cr7/p/3/9B/z1yd8/af57z+enZv2Z++P7/svS+dw+yd+///+/Xu3f4TP0d+nv9a/f35/59vf2vMPm23vbq9+7u3+X3bs9SnZ7/P87Pf/v39L2furP/333fH7Re/51Nr5p/r///oe86felR7w+emn/nVb39kxnVn+73af/+PTffH71x/3r91dTZ22vt32LE97V/m6uc8dTz/qGl8/a7087v/N9t3bfd799Dx7jL0/fbrltuqJ5zeFneu6/+v7Z85La/um8x6/tQ==", - "difficulty": "10395717367917827", - "height": { - "revision_number": "0", - "revision_height": "13543580" - }, - "gas_limit": "30000000", - "gas_used": "29124537", - "time": "1635938396", - "extra": "5LiD5b2p56We5LuZ6bG8GwMh", - "mix_digest": "Q6yN8uV4+TvlYHBqxA3LQ8oXEpQlyFLZi4ag14itxLQ=", - "nonce": "1646353019550373542", - "baseFee": "94385040994" - }, - "chain_id": "1", - "contract_address": "LOsf8dSJPLoIQJpwnFpaTPkie6k=", - "trusting_period": "8640000", - "timeDelay": "0", - "blockDelay": "7" - }, - "relayers": [ - "iaa17yh4zxe8t3cmqj2exh6g2ncr8kqvh997yuyu8l" - ] - } -] \ No newline at end of file diff --git a/app/upgrades/v120/upgrades.go b/app/upgrades/v120/upgrades.go deleted file mode 100644 index 1bd944b3c..000000000 --- a/app/upgrades/v120/upgrades.go +++ /dev/null @@ -1,123 +0,0 @@ -package v120 - -import ( - sdkmath "cosmossdk.io/math" - store "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/capability" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - "github.com/cosmos/cosmos-sdk/x/crisis" - crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" - distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/cosmos-sdk/x/evidence" - evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - "github.com/cosmos/cosmos-sdk/x/feegrant" - feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/cosmos-sdk/x/params" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - - coinswaptypes "github.com/irisnet/irismod/modules/coinswap/types" - farmtypes "github.com/irisnet/irismod/modules/farm/types" - "github.com/irisnet/irismod/modules/htlc" - htlctypes "github.com/irisnet/irismod/modules/htlc/types" - nftmodule "github.com/irisnet/irismod/modules/nft/module" - nfttypes "github.com/irisnet/irismod/modules/nft/types" - "github.com/irisnet/irismod/modules/oracle" - oracletypes "github.com/irisnet/irismod/modules/oracle/types" - "github.com/irisnet/irismod/modules/random" - randomtypes "github.com/irisnet/irismod/modules/random/types" - "github.com/irisnet/irismod/modules/record" - recordtypes "github.com/irisnet/irismod/modules/record/types" - "github.com/irisnet/irismod/modules/service" - servicetypes "github.com/irisnet/irismod/modules/service/types" - "github.com/irisnet/irismod/modules/token" - tokentypes "github.com/irisnet/irismod/modules/token/types" - - tibcnfttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/nft_transfer/types" - tibcclienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types" - tibchost "github.com/bianjieai/tibc-go/modules/tibc/core/24-host" - - "github.com/irisnet/irishub/v2/app/upgrades" - "github.com/irisnet/irishub/v2/app/upgrades/v120/tibc" - "github.com/irisnet/irishub/v2/modules/guardian" - guardiantypes "github.com/irisnet/irishub/v2/modules/guardian/types" - "github.com/irisnet/irishub/v2/modules/mint" - minttypes "github.com/irisnet/irishub/v2/modules/mint/types" - "github.com/irisnet/irishub/v2/types" -) - -var Upgrade = upgrades.Upgrade{ - UpgradeName: "v1.2", - UpgradeHandlerConstructor: upgradeHandlerConstructor, - StoreUpgrades: &store.StoreUpgrades{ - Added: []string{ - farmtypes.StoreKey, - feegrant.StoreKey, - tibchost.StoreKey, - tibcnfttypes.StoreKey, - }, - }, -} - -func upgradeHandlerConstructor( - m *module.Manager, - c module.Configurator, - app upgrades.AppKeepers, -) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // init farm params - amount := sdkmath.NewIntWithDecimal(1000, int(types.NativeToken.Scale)) - farmtypes.SetDefaultGenesisState(farmtypes.GenesisState{ - Params: farmtypes.Params{ - PoolCreationFee: sdk.NewCoin(types.NativeToken.MinUnit, amount), - MaxRewardCategories: 2, - }}, - ) - tibcclienttypes.SetDefaultGenesisState(tibcclienttypes.GenesisState{ - NativeChainName: "irishub-mainnet", - }) - - if err := upgrades.CreateClient(ctx, - app.AppCodec, - tibc.ClientData, - app.TIBCkeeper.ClientKeeper, - ); err != nil { - return nil, err - } - fromVM[authtypes.ModuleName] = 1 - fromVM[banktypes.ModuleName] = 1 - fromVM[stakingtypes.ModuleName] = 1 - fromVM[govtypes.ModuleName] = 1 - fromVM[distrtypes.ModuleName] = 1 - fromVM[slashingtypes.ModuleName] = 1 - fromVM[coinswaptypes.ModuleName] = 1 - fromVM[ibcexported.ModuleName] = 1 - fromVM[capabilitytypes.ModuleName] = capability.AppModule{}.ConsensusVersion() - fromVM[genutiltypes.ModuleName] = genutil.AppModule{}.ConsensusVersion() - fromVM[minttypes.ModuleName] = mint.AppModule{}.ConsensusVersion() - fromVM[paramstypes.ModuleName] = params.AppModule{}.ConsensusVersion() - fromVM[crisistypes.ModuleName] = crisis.AppModule{}.ConsensusVersion() - fromVM[upgradetypes.ModuleName] = crisis.AppModule{}.ConsensusVersion() - fromVM[evidencetypes.ModuleName] = evidence.AppModule{}.ConsensusVersion() - fromVM[feegrant.ModuleName] = feegrantmodule.AppModule{}.ConsensusVersion() - fromVM[guardiantypes.ModuleName] = guardian.AppModule{}.ConsensusVersion() - fromVM[tokentypes.ModuleName] = token.AppModule{}.ConsensusVersion() - fromVM[recordtypes.ModuleName] = record.AppModule{}.ConsensusVersion() - fromVM[nfttypes.ModuleName] = nftmodule.AppModule{}.ConsensusVersion() - fromVM[htlctypes.ModuleName] = htlc.AppModule{}.ConsensusVersion() - fromVM[servicetypes.ModuleName] = service.AppModule{}.ConsensusVersion() - fromVM[oracletypes.ModuleName] = oracle.AppModule{}.ConsensusVersion() - fromVM[randomtypes.ModuleName] = random.AppModule{}.ConsensusVersion() - return app.ModuleManager.RunMigrations(ctx, c, fromVM) - } -} diff --git a/app/upgrades/v130/tibc/client.go b/app/upgrades/v130/tibc/client.go deleted file mode 100644 index fc95691c8..000000000 --- a/app/upgrades/v130/tibc/client.go +++ /dev/null @@ -1,8 +0,0 @@ -package tibc - -import ( - _ "embed" -) - -//go:embed client.json -var ClientData []byte diff --git a/app/upgrades/v130/tibc/client.json b/app/upgrades/v130/tibc/client.json deleted file mode 100644 index c53daa562..000000000 --- a/app/upgrades/v130/tibc/client.json +++ /dev/null @@ -1,69 +0,0 @@ -[ - { - "chain_name": "bsc-mainnet", - "consensus_state": { - "@type": "/tibc.lightclients.bsc.v1.ConsensusState", - "timestamp": "1647611347", - "number": { - "revision_number": "0", - "revision_height": "16168200" - }, - "root": "abWdstvDFDWcCzMbZoTBxpy8JQ00Y4m8vwXIJ5UJfpA=" - }, - "client_state": { - "@type": "/tibc.lightclients.bsc.v1.ClientState", - "header": { - "parent_hash": "gK4N93vKrdBItCFYHG39MkpYQ9MbmCGD1WkRYqGZSM0=", - "uncle_hash": "HcxN6N7HXXqrhbVntszUGtMSRRuUinQT8KFC/UDUk0c=", - "coinbase": "cPZXFk5bdWibZLf9H6J18zTyjhg=", - "root": "abWdstvDFDWcCzMbZoTBxpy8JQ00Y4m8vwXIJ5UJfpA=", - "tx_hash": "xjlDWj3Ix+27DA3y1rzuiAED2vu/WbsFfddHXJ4aX4U=", - "receipt_hash": "/WBV/Qcj6Hvv6+150nb/HlVd9KHQ55cRabyGfoTmiZw=", - "bloom": "e2vb3ud+f/9qac/35S0+f/7n7D/387/z9/a0/avvL/Tf7x3dt3S+93+j/P/lb73kX9r73ffOfr///96N6//e3Xv3/T/9/PX///z22F1b/7//3Zu+/cf/lnvnLy+L+Pv7/8t97l9fndtf5+z7//nPc/z8v/+//P7ev1+3d8+v//W2fXb7/f//+r3//83fm3+9/77+/99v/f/p7tn//3v1/3/9f9/9+7Pdvb/+fzv+n/l9v7/U16N97O/me82/3/9f99v////Hnst9+Z9/3Qf73r9/P9/d3/z//f+/29/p6+///39T//3b7s/v+p7v//u+cpzHX099/v/37rdu7e/fqw==", - "difficulty": "2", - "height": { - "revision_number": "0", - "revision_height": "16168200" - }, - "gas_limit": "80000000", - "gas_used": "20949743", - "time": "1647611347", - "extra": "2IMBAQeEZ2V0aIhnbzEuMTMuNIVsaW51eAAAAMMWe98kZRdsRhr7MW68dzxh+u6FplFdqileJklc729p36aZEdnY5PO7rbibKal8bv+4pBHavGre76qE9QZ8i74tTEB7vklDjthZ/pZbFA3PGqtxqT80m7r+wVUYGbi+Hv6i/EbKdJqhaFsd7YATeF1mI8wY0hQyC2u2R1lw9lcWTlt1aJtkt/0fonXzNPKOGHK2HGAUNC2RRHDsesKXW+NFeWwreuL1ueOGzRtQpFUGltlXy0kA8DqLbI/ZPW9M6kK7s0XbxvDf21vsc5+Mza/MOfPH1uv2N8kVFnPLw2uIpvebYDWfFB35Cgx0USWxMcqv/RKqz2qBGffhFiO1pD2mOOkfZpoTD6wOFaA47t/Gi6PDXHP+1b5KB6+1voB93bB0Y5zZ+mG0dnbAZPxQ1izOL9dUTgssyUaS1KcE3r73vLYTKOLTpznv/NOpk4fQFeJg7vrHLr6h6a4yYaR1onuxAo8UC8KnyEMxiv3qCm48URu9EPRRns433CSIfhG1Xe4iY3nbg8/8aBSVcwwR/d55ukwM7wJ04xgQyd8C+Y+v3g+EH05moc3eJQAhHG2KFCGP08YBM7LybgwbiESjUtuQZz3bCi7/lEqOP2l/BGvLl89+LdDYPXITOImJINIWbksUfftitOOuAA==", - "mix_digest": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", - "nonce": "AAAAAAAAAAA=" - }, - "chain_id": "56", - "epoch": "200", - "block_inteval": "3", - "validators": [ - "JGUXbEYa+zFuvHc8YfruhaZRXao=", - "KV4mSVzvb2nfppkR2djk87utuJs=", - "Kal8bv+4pBHavGre76qE9QZ8i74=", - "LUxAe75JQ47YWf6WWxQNzxqrcak=", - "PzSbuv7BVRgZuL4e/qL8Rsp0mqE=", - "aFsd7YATeF1mI8wY0hQyC2u2R1k=", - "cPZXFk5bdWibZLf9H6J18zTyjhg=", - "crYcYBQ0LZFEcOx6wpdb40V5bCs=", - "euL1ueOGzRtQpFUGltlXy0kA8Do=", - "i2yP2T1vTOpCu7NF28bw39tb7HM=", - "n4zNr8w588fW6/Y3yRUWc8vDa4g=", - "pvebYDWfFB35Cgx0USWxMcqv/RI=", - "qs9qgRn34RYjtaQ9pjjpH2aaEw8=", - "rA4VoDju38aLo8Ncc/7VvkoHr7U=", - "voB93bB0Y5zZ+mG0dnbAZPxQ1iw=", - "zi/XVE4LLMlGktSnBN6+97y2Eyg=", - "4tOnOe/806mTh9AV4mDu+scuvqE=", - "6a4yYaR1onuxAo8UC8KnyEMxiv0=", - "6gpuPFEbvRD0UZ7ON9wkiH4RtV0=", - "7iJjeduDz/xoFJVzDBH93nm6TAw=", - "7wJ04xgQyd8C+Y+v3g+EH05moc0=" - ], - "recent_signers": [], - "contract_address": "HDR5yh3zyWLTFeeVyvB7kN/aKTY=", - "trusting_period": "8640000" - }, - "relayers": [ - "iaa1f4wqy64z33mhu5lwxqwcsmxy4kqpsntvfzdv9s" - ] - } -] \ No newline at end of file diff --git a/app/upgrades/v130/upgrades.go b/app/upgrades/v130/upgrades.go deleted file mode 100644 index f1bd2d059..000000000 --- a/app/upgrades/v130/upgrades.go +++ /dev/null @@ -1,36 +0,0 @@ -package v130 - -import ( - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - tibcmttypes "github.com/bianjieai/tibc-go/modules/tibc/apps/mt_transfer/types" - - mttypes "github.com/irisnet/irismod/modules/mt/types" - - "github.com/irisnet/irishub/v2/app/upgrades" - "github.com/irisnet/irishub/v2/app/upgrades/v130/tibc" -) - -var Upgrade = upgrades.Upgrade{ - UpgradeName: "v1.3", - UpgradeHandlerConstructor: upgradeHandlerConstructor, - StoreUpgrades: &storetypes.StoreUpgrades{ - Added: []string{tibcmttypes.StoreKey, mttypes.StoreKey}, - }, -} - -func upgradeHandlerConstructor(m *module.Manager, c module.Configurator, app upgrades.AppKeepers) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - if err := upgrades.CreateClient(ctx, - app.AppCodec, - tibc.ClientData, - app.TIBCkeeper.ClientKeeper, - ); err != nil { - return nil, err - } - return app.ModuleManager.RunMigrations(ctx, c, fromVM) - } -} diff --git a/app/upgrades/v140/msgs.go b/app/upgrades/v140/msgs.go deleted file mode 100644 index b525e47cf..000000000 --- a/app/upgrades/v140/msgs.go +++ /dev/null @@ -1,46 +0,0 @@ -package v140 - -var ( - msgTypes = []string{ - "/cosmos.authz.v1beta1.MsgExec", - "/cosmos.authz.v1beta1.MsgGrant", - "/cosmos.authz.v1beta1.MsgRevoke", - "/cosmos.bank.v1beta1.MsgSend", - "/cosmos.bank.v1beta1.MsgMultiSend", - "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", - "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", - "/cosmos.distribution.v1beta1.MsgFundCommunityPool", - "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", - "/cosmos.feegrant.v1beta1.MsgGrantAllowance", - "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", - "/cosmos.gov.v1beta1.MsgVoteWeighted", - "/cosmos.gov.v1beta1.MsgSubmitProposal", - "/cosmos.gov.v1beta1.MsgDeposit", - "/cosmos.gov.v1beta1.MsgVote", - "/cosmos.gov.v1.MsgVoteWeighted", - "/cosmos.gov.v1.MsgSubmitProposal", - "/cosmos.gov.v1.MsgDeposit", - "/cosmos.gov.v1.MsgVote", - "/cosmos.staking.v1beta1.MsgEditValidator", - "/cosmos.staking.v1beta1.MsgDelegate", - "/cosmos.staking.v1beta1.MsgUndelegate", - "/cosmos.staking.v1beta1.MsgBeginRedelegate", - "/cosmos.staking.v1beta1.MsgCreateValidator", - "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", - "/ibc.applications.transfer.v1.MsgTransfer", - - "/irismod.nft.MsgIssueDenom", - "/irismod.nft.MsgTransferDenom", - "/irismod.nft.MsgMintNFT", - "/irismod.nft.MsgEditNFT", - "/irismod.nft.MsgTransferNFT", - "/irismod.nft.MsgBurnNFT", - - "/irismod.mt.MsgIssueDenom", - "/irismod.mt.MsgTransferDenom", - "/irismod.mt.MsgMintMT", - "/irismod.mt.MsgEditMT", - "/irismod.mt.MsgTransferMT", - "/irismod.mt.MsgBurnMT", - } -) diff --git a/app/upgrades/v140/upgrades.go b/app/upgrades/v140/upgrades.go deleted file mode 100644 index b5859ef15..000000000 --- a/app/upgrades/v140/upgrades.go +++ /dev/null @@ -1,62 +0,0 @@ -package v140 - -import ( - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" - icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" - - "github.com/irisnet/irishub/v2/app/upgrades" -) - -var Upgrade = upgrades.Upgrade{ - UpgradeName: "v1.4", - UpgradeHandlerConstructor: upgradeHandlerConstructor, - StoreUpgrades: &storetypes.StoreUpgrades{ - Added: []string{authzkeeper.StoreKey}, - }, -} - -func upgradeHandlerConstructor( - m *module.Manager, - c module.Configurator, - app upgrades.AppKeepers, -) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { - // version upgrade: - // nft : 1 -> 2 - // auth: 2 -> 3 - // bank: 2 -> 3 - // coinswap 3 -> 4 - // feegrant 1 -> 2 - // gov 2 -> 3 - // staking 2 -> 3 - // upgrade 2 -> 3 - - // added module: - // authz - - // ibc application: - // 27-interchain-accounts - icaModule := app.ModuleManager.Modules[icatypes.ModuleName].(ica.AppModule) - fromVM[icatypes.ModuleName] = icaModule.ConsensusVersion() - // create ICS27 Controller submodule params - controllerParams := icacontrollertypes.Params{} - // create ICS27 Host submodule params - hostParams := icahosttypes.Params{ - HostEnabled: true, - AllowMessages: msgTypes, - } - - ctx.Logger().Info("start to init interchainaccount module...") - // initialize ICS27 module - icaModule.InitModule(ctx, controllerParams, hostParams) - ctx.Logger().Info("start to run module migrations...") - return app.ModuleManager.RunMigrations(ctx, c, fromVM) - } -} From 7ea991e674e0a4da7082b0c4093aecab356d9720 Mon Sep 17 00:00:00 2001 From: Yksirod <103229163+taramakage@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:33:50 +0800 Subject: [PATCH 10/15] revert: auth account query (#2869) --- app/app.go | 25 +++++++- rpc/auth.go | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 rpc/auth.go diff --git a/app/app.go b/app/app.go index 7323b53b4..95eff4900 100644 --- a/app/app.go +++ b/app/app.go @@ -129,6 +129,7 @@ import ( "github.com/irisnet/irishub/v2/modules/internft" mintkeeper "github.com/irisnet/irishub/v2/modules/mint/keeper" minttypes "github.com/irisnet/irishub/v2/modules/mint/types" + "github.com/irisnet/irishub/v2/rpc" iristypes "github.com/irisnet/irishub/v2/types" ) @@ -689,7 +690,8 @@ func NewIrisApp( ) app.mm.RegisterInvariants(app.CrisisKeeper) // app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) - app.mm.RegisterServices(app.configurator) + // app.mm.RegisterServices(app.configurator) + app.RegisterServices() // create the simulation manager and define the order of the modules for deterministic simulations // @@ -883,6 +885,27 @@ func (app *IrisApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICo } } +// RegisterServices implements the Application.RegisterTxService method. +func (app *IrisApp) RegisterServices() { + for _, mod := range app.mm.Modules { + m, ok := mod.(module.AppModule) + if !ok { + panic("unable to cast mod into AppModule") + } + + if m.Name() == authtypes.ModuleName { + rpc.RegisterAuthServices(app.configurator, + app.GetKey(authtypes.StoreKey), + app.AccountKeeper, + app.GetSubspace(authtypes.ModuleName)) + } else { + if mod, ok := mod.(module.HasServices); ok { + mod.RegisterServices(app.configurator) + } + } + } +} + // RegisterTxService implements the Application.RegisterTxService method. func (app *IrisApp) RegisterTxService(clientCtx client.Context) { authtx.RegisterTxService( diff --git a/rpc/auth.go b/rpc/auth.go new file mode 100644 index 000000000..a52aabef0 --- /dev/null +++ b/rpc/auth.go @@ -0,0 +1,170 @@ +package rpc + +import ( + "context" + "fmt" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/store/prefix" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/types/query" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + "github.com/cosmos/cosmos-sdk/x/auth/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + + ethermint "github.com/evmos/ethermint/types" +) + +var _ authtypes.QueryServer = authQueryServer{} + +type authQueryServer struct { + key storetypes.StoreKey + k authkeeper.AccountKeeper +} + +func RegisterAuthServices(cfg module.Configurator, + key storetypes.StoreKey, + k authkeeper.AccountKeeper, + ls paramstypes.Subspace) { + types.RegisterMsgServer(cfg.MsgServer(), authkeeper.NewMsgServerImpl(k)) + types.RegisterQueryServer(cfg.QueryServer(), authQueryServer{key, k}) + + m := authkeeper.NewMigrator(k, cfg.QueryServer(), ls) + if err := cfg.RegisterMigration(types.ModuleName, 3, m.Migrate3to4); err != nil { + panic(fmt.Sprintf("failed to migrate x/%s from version 3 to 4: %v", types.ModuleName, err)) + } +} + +// Since: cosmos-sdk 0.43 +// Accounts returns all the existing accounts +func (a authQueryServer) Accounts(c context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c) + store := ctx.KVStore(a.key) + accountsStore := prefix.NewStore(store, types.AddressStoreKeyPrefix) + + var accounts []*codectypes.Any + pageRes, err := query.Paginate(accountsStore, req.Pagination, func(key, value []byte) error { + account := a.decodeAccount(value) + any, err := codectypes.NewAnyWithValue(account) + if err != nil { + return err + } + + accounts = append(accounts, any) + return nil + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "paginate: %v", err) + } + + return &types.QueryAccountsResponse{Accounts: accounts, Pagination: pageRes}, err +} + +// Account returns account details based on address. +func (a authQueryServer) Account(c context.Context, req *types.QueryAccountRequest) (*types.QueryAccountResponse, error) { + if req == nil { + return nil, status.Errorf(codes.InvalidArgument, "empty request") + } + + if req.Address == "" { + return nil, status.Error(codes.InvalidArgument, "Address cannot be empty") + } + + ctx := sdk.UnwrapSDKContext(c) + addr, err := sdk.AccAddressFromBech32(req.Address) + if err != nil { + return nil, err + } + + account := a.k.GetAccount(ctx, addr) + if account == nil { + return nil, status.Errorf(codes.NotFound, "account %s not found", req.Address) + } + + ethAcc, ok := account.(*ethermint.EthAccount) + if ok { + account = ethAcc.BaseAccount + } + + any, err := codectypes.NewAnyWithValue(account) + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } + + return &types.QueryAccountResponse{Account: any}, nil +} + +// AccountAddressByID returns account address based on account number. +// +// Since: cosmos-sdk 0.46.2 +func (a authQueryServer) AccountAddressByID(c context.Context, req *types.QueryAccountAddressByIDRequest) (*types.QueryAccountAddressByIDResponse, error) { + return a.k.AccountAddressByID(c, req) +} + +// Params queries all parameters. +func (a authQueryServer) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + return a.k.Params(ctx, req) +} + +// ModuleAccounts returns all the existing module accounts. +// +// Since: cosmos-sdk 0.46 +func (a authQueryServer) ModuleAccounts(ctx context.Context, req *types.QueryModuleAccountsRequest) (*types.QueryModuleAccountsResponse, error) { + return a.k.ModuleAccounts(ctx, req) +} + +// ModuleAccountByName returns the module account info by module name +func (a authQueryServer) ModuleAccountByName(ctx context.Context, req *types.QueryModuleAccountByNameRequest) (*types.QueryModuleAccountByNameResponse, error) { + return a.k.ModuleAccountByName(ctx, req) +} + +// Bech32Prefix queries bech32Prefix +// +// Since: cosmos-sdk 0.46 +func (a authQueryServer) Bech32Prefix(ctx context.Context, req *types.Bech32PrefixRequest) (*types.Bech32PrefixResponse, error) { + return a.k.Bech32Prefix(ctx, req) +} + +// AddressBytesToString converts Account Address bytes to string +// +// Since: cosmos-sdk 0.46 +func (a authQueryServer) AddressBytesToString(ctx context.Context, req *types.AddressBytesToStringRequest) (*types.AddressBytesToStringResponse, error) { + return a.k.AddressBytesToString(ctx, req) +} + +// AddressStringToBytes converts Address string to bytes +// +// Since: cosmos-sdk 0.46 +func (a authQueryServer) AddressStringToBytes(ctx context.Context, req *types.AddressStringToBytesRequest) (*types.AddressStringToBytesResponse, error) { + return a.k.AddressStringToBytes(ctx, req) +} + +// AccountInfo queries account info which is common to all account types. +// +// Since: cosmos-sdk 0.47 +func (a authQueryServer) AccountInfo(ctx context.Context, req *types.QueryAccountInfoRequest) (*types.QueryAccountInfoResponse, error) { + return a.k.AccountInfo(ctx, req) +} + +func (a authQueryServer) decodeAccount(bz []byte) types.AccountI { + acc, err := a.k.UnmarshalAccount(bz) + if err != nil { + panic(err) + } + + ethAcc, ok := acc.(*ethermint.EthAccount) + if ok { + return ethAcc.BaseAccount + } + return acc +} From b0d27257c5b5efc601c42cf7d8e13d24c7779a7c Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Tue, 17 Oct 2023 09:56:09 +0800 Subject: [PATCH 11/15] add nft-transfer test script --- Makefile | 24 +++- network/hermes/README.md | 44 ++++++ network/hermes/config.toml | 132 ++++++++++++++++++ network/hermes/create-conn.sh | 11 ++ network/hermes/restore-keys.sh | 14 ++ network/hermes/start.sh | 8 ++ network/hermes/variables.sh | 4 + network/init.sh | 106 ++++++++++++++ network/nft-transfer.md | 94 +++++++++++++ .../interchain-nft-config/chains/test-1.json | 17 +++ .../interchain-nft-config/chains/test-2.json | 18 +++ .../paths/test1-nft-test2.json | 25 ++++ network/relayer/interchain-nft-config/rly.sh | 33 +++++ network/start.sh | 19 +++ 14 files changed, 548 insertions(+), 1 deletion(-) create mode 100644 network/hermes/README.md create mode 100644 network/hermes/config.toml create mode 100755 network/hermes/create-conn.sh create mode 100755 network/hermes/restore-keys.sh create mode 100755 network/hermes/start.sh create mode 100755 network/hermes/variables.sh create mode 100755 network/init.sh create mode 100644 network/nft-transfer.md create mode 100644 network/relayer/interchain-nft-config/chains/test-1.json create mode 100644 network/relayer/interchain-nft-config/chains/test-2.json create mode 100644 network/relayer/interchain-nft-config/paths/test1-nft-test2.json create mode 100755 network/relayer/interchain-nft-config/rly.sh create mode 100755 network/start.sh diff --git a/Makefile b/Makefile index f9cd5343f..d88819786 100644 --- a/Makefile +++ b/Makefile @@ -229,4 +229,26 @@ testnet-stop: testnet-clean: docker-compose down - sudo rm -rf build/* \ No newline at end of file + sudo rm -rf build/* + + +######################################## +### Test ibc nft-transfer +init-golang-rly: kill-dev install + @echo "Initializing both blockchains..." + ./network/init.sh + ./network/start.sh + @echo "Initializing relayer..." + ./network/relayer/interchain-nft-config/rly.sh + +start: + @echo "Starting up test network" + ./network/start.sh + +start-rly: + ./network/hermes/start.sh + +kill-dev: + @echo "Killing nftd and removing previous data" + -@rm -rf ./data + -@killall nftd 2>/dev/null \ No newline at end of file diff --git a/network/hermes/README.md b/network/hermes/README.md new file mode 100644 index 000000000..36beb723f --- /dev/null +++ b/network/hermes/README.md @@ -0,0 +1,44 @@ +# Hermes Relayer + +[Hermes](https://hermes.informal.systems/) is a Rust implementation of a relayer for the [Inter-Blockchain Communication (IBC)](https://ibcprotocol.org/) protocol. + +> The Inter-Blockchain Communication protocol is an end-to-end, connection-oriented, stateful protocol for reliable, ordered, and authenticated communication between modules on separate distributed ledgers. + +## Getting started + +- Install [Rust](https://www.rust-lang.org/tools/install) +- Install [Hermes](https://hermes.informal.systems/installation.html) + +The following directory contains a basic executable script which handles creation of clients, connections and channels in order to facilitate packet relaying between distributed ledgers using the IBC protocol. +This serves as a basis for demonstration of interchain accounts e2e functionality validation. + +## Usage + +- Before attempting to create clients, connections and channels, the private keys for existing chains must be restored. Please note - currently the relayer does NOT support a keyring store to securely store the private key file. The key file will be stored on the local file system in the user `$HOME` folder under `$HOME/.hermes` +``` +hermes -c config.toml keys restore $CHAIN_ID -m $MNEMONIC +hermes -c config.toml keys restore $CHAIN_ID -m $MNEMONIC +``` + +- Execute the script +``` +./hermes.sh +``` + +- Useful commands +``` +# Query client state +hermes query client state $CHAIN_ID 07-tendermint-0 + +# Update client state by sending an update-client transaction +hermes tx raw update-client $CHAIN_ID 07-tendermint-0 + +# Query a connection end +hermes query connection end $CHAIN_ID connection-0 + +# Query channel ends +hermes query channel end $CHAIN_ID transfer channel-0 +hermes query channel end $CHAIN_ID ibcaccount channel-1 +``` + +Please refer to the [Hermes documentation](https://hermes.informal.systems/) for more information regarding various commands. diff --git a/network/hermes/config.toml b/network/hermes/config.toml new file mode 100644 index 000000000..f7db55e0d --- /dev/null +++ b/network/hermes/config.toml @@ -0,0 +1,132 @@ +# The global section has parameters that apply globally to the relayer operation. +[global] + +# Specify the verbosity for the relayer logging output. Default: 'info' +# Valid options are 'error', 'warn', 'info', 'debug', 'trace'. +log_level = 'trace' + + +# Specify the mode to be used by the relayer. [Required] +[mode] + +# Specify the client mode. +[mode.clients] + +# Whether or not to enable the client workers. [Required] +enabled = true + +# Whether or not to enable periodic refresh of clients. [Default: true] +# Note: Even if this is disabled, clients will be refreshed automatically if +# there is activity on a connection or channel they are involved with. +refresh = true + +# Whether or not to enable misbehaviour detection for clients. [Default: false] +misbehaviour = true + +# Specify the connections mode. +[mode.connections] + +# Whether or not to enable the connection workers for handshake completion. [Required] +enabled = true + +# Specify the channels mode. +[mode.channels] + +# Whether or not to enable the channel workers for handshake completion. [Required] +enabled = true + +# Specify the packets mode. +[mode.packets] + +# Whether or not to enable the packet workers. [Required] +enabled = true + +# Parametrize the periodic packet clearing feature. +# Interval (in number of blocks) at which pending packets +# should be eagerly cleared. A value of '0' will disable +# periodic packet clearing. [Default: 100] +clear_interval = 100 + +# Whether or not to clear packets on start. [Default: false] +clear_on_start = true + +# Toggle the transaction confirmation mechanism. +# The tx confirmation mechanism periodically queries the `/tx_search` RPC +# endpoint to check that previously-submitted transactions +# (to any chain in this config file) have delivered successfully. +# Experimental feature. Affects telemetry if set to false. +# [Default: true] +tx_confirmation = true + +# The REST section defines parameters for Hermes' built-in RESTful API. +# https://hermes.informal.systems/rest.html +[rest] + +# Whether or not to enable the REST service. Default: false +enabled = true + +# Specify the IPv4/6 host over which the built-in HTTP server will serve the RESTful +# API requests. Default: 127.0.0.1 +host = '127.0.0.1' + +# Specify the port over which the built-in HTTP server will serve the restful API +# requests. Default: 3000 +port = 3000 + + +# The telemetry section defines parameters for Hermes' built-in telemetry capabilities. +# https://hermes.informal.systems/telemetry.html +[telemetry] + +# Whether or not to enable the telemetry service. Default: false +enabled = false + +# Specify the IPv4/6 host over which the built-in HTTP server will serve the metrics +# gathered by the telemetry service. Default: 127.0.0.1 +host = '127.0.0.1' + +# Specify the port over which the built-in HTTP server will serve the metrics gathered +# by the telemetry service. Default: 3001 +port = 3001 + +[[chains]] +id = 'test-1' +rpc_addr = 'http://127.0.0.1:16657' +grpc_addr = 'http://127.0.0.1:8090' +websocket_addr = 'ws://127.0.0.1:16657/websocket' +rpc_timeout = '10s' +account_prefix = 'cosmos' +key_name = 'testkey' +store_prefix = 'ibc' +default_gas = 100000 +max_gas = 3000000 +gas_price = { price = 0.001, denom = 'stake' } +gas_adjustment = 0.1 +max_msg_num = 30 +max_tx_size = 2097152 +clock_drift = '5s' +max_block_time = '10s' +trusting_period = '14days' +trust_threshold = { numerator = '1', denominator = '3' } +address_type = { derivation = 'cosmos' } + +[[chains]] +id = 'test-2' +rpc_addr = 'http://127.0.0.1:26657' +grpc_addr = 'http://127.0.0.1:9090' +websocket_addr = 'ws://127.0.0.1:26657/websocket' +rpc_timeout = '10s' +account_prefix = 'cosmos' +key_name = 'testkey' +store_prefix = 'ibc' +default_gas = 100000 +max_gas = 3000000 +gas_price = { price = 0.001, denom = 'stake' } +gas_adjustment = 0.1 +max_msg_num = 30 +max_tx_size = 2097152 +clock_drift = '5s' +max_block_time = '10s' +trusting_period = '14days' +trust_threshold = { numerator = '1', denominator = '3' } +address_type = { derivation = 'cosmos' } diff --git a/network/hermes/create-conn.sh b/network/hermes/create-conn.sh new file mode 100755 index 000000000..dfabf81df --- /dev/null +++ b/network/hermes/create-conn.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e + +# Load shell variables +. ./network/hermes/variables.sh + +### Configure the clients and connection +echo "Initiating connection handshake..." +$HERMES_BINARY -c $CONFIG_DIR create connection test-1 test-2 + +sleep 2 diff --git a/network/hermes/restore-keys.sh b/network/hermes/restore-keys.sh new file mode 100755 index 000000000..4950581b2 --- /dev/null +++ b/network/hermes/restore-keys.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +# Load shell variables +. ./network/hermes/variables.sh + +### Sleep is needed otherwise the relayer crashes when trying to init +sleep 1s +### Restore Keys +$HERMES_BINARY -c ./network/hermes/config.toml keys restore test-1 -m "alley afraid soup fall idea toss can goose become valve initial strong forward bright dish figure check leopard decide warfare hub unusual join cart" +sleep 5s + +$HERMES_BINARY -c ./network/hermes/config.toml keys restore test-2 -m "record gift you once hip style during joke field prize dust unique length more pencil transfer quit train device arrive energy sort steak upset" +sleep 5s diff --git a/network/hermes/start.sh b/network/hermes/start.sh new file mode 100755 index 000000000..d89142811 --- /dev/null +++ b/network/hermes/start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Load shell variables +. ./network/hermes/variables.sh + +# Start the hermes relayer in multi-paths mode +echo "Starting hermes relayer..." +$HERMES_BINARY -c $CONFIG_DIR start diff --git a/network/hermes/variables.sh b/network/hermes/variables.sh new file mode 100755 index 000000000..eabfd170e --- /dev/null +++ b/network/hermes/variables.sh @@ -0,0 +1,4 @@ + #!/bin/bash +HERMES_BINARY=hermes +HERMES_DIRECTORY=./network/hermes/ +CONFIG_DIR=./network/hermes/config.toml diff --git a/network/init.sh b/network/init.sh new file mode 100755 index 000000000..32dd6ff6f --- /dev/null +++ b/network/init.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +BINARY=iris +CHAIN_DIR=./data +CHAIN_BOND_DENOM=uiris +CHAINID_1=test-1 +CHAINID_2=test-2 +VAL_MNEMONIC_1="clock post desk civil pottery foster expand merit dash seminar song memory figure uniform spice circle try happy obvious trash crime hybrid hood cushion" +VAL_MNEMONIC_2="angry twist harsh drastic left brass behave host shove marriage fall update business leg direct reward object ugly security warm tuna model broccoli choice" +DEMO_MNEMONIC_1="banner spread envelope side kite person disagree path silver will brother under couch edit food venture squirrel civil budget number acquire point work mass" +DEMO_MNEMONIC_2="veteran try aware erosion drink dance decade comic dawn museum release episode original list ability owner size tuition surface ceiling depth seminar capable only" +RLY_MNEMONIC_1="alley afraid soup fall idea toss can goose become valve initial strong forward bright dish figure check leopard decide warfare hub unusual join cart" +RLY_MNEMONIC_2="record gift you once hip style during joke field prize dust unique length more pencil transfer quit train device arrive energy sort steak upset" +P2PPORT_1=16656 +P2PPORT_2=26656 +RPCPORT_1=16657 +RPCPORT_2=26657 +RPCAPPPORT_1=16658 +RPCAPPPORT_2=26658 + +RESTPORT_1=1316 +RESTPORT_2=1317 +ROSETTA_1=8080 +ROSETTA_2=8081 +EVN_JSON_RPC_1=8545 +EVN_JSON_RPC_2=18545 +EVN_JSON_RPC_WS_1=8546 +EVN_JSON_RPC_WS_2=18546 + +# Stop if it is already running +if pgrep -x "$BINARY" >/dev/null; then + echo "Terminating $BINARY..." + killall $BINARY +fi + +echo "Removing previous data..." +rm -rf $CHAIN_DIR/$CHAINID_1 &> /dev/null +rm -rf $CHAIN_DIR/$CHAINID_2 &> /dev/null + +# Add directories for both chains, exit if an error occurs +if ! mkdir -p $CHAIN_DIR/$CHAINID_1 2>/dev/null; then + echo "Failed to create chain folder. Aborting..." + exit 1 +fi + +if ! mkdir -p $CHAIN_DIR/$CHAINID_2 2>/dev/null; then + echo "Failed to create chain folder. Aborting..." + exit 1 +fi + +echo "Initializing $CHAINID_1..." +echo "Initializing $CHAINID_2..." +$BINARY init test --home $CHAIN_DIR/$CHAINID_1 --chain-id=$CHAINID_1 --default-denom=$CHAIN_BOND_DENOM +$BINARY init test --home $CHAIN_DIR/$CHAINID_2 --chain-id=$CHAINID_2 --default-denom=$CHAIN_BOND_DENOM + +echo "Adding genesis accounts..." +echo $VAL_MNEMONIC_1 | $BINARY keys add val1 --home $CHAIN_DIR/$CHAINID_1 --recover --keyring-backend=test +echo $VAL_MNEMONIC_2 | $BINARY keys add val2 --home $CHAIN_DIR/$CHAINID_2 --recover --keyring-backend=test +echo $DEMO_MNEMONIC_1 | $BINARY keys add demowallet1 --home $CHAIN_DIR/$CHAINID_1 --recover --keyring-backend=test +echo $DEMO_MNEMONIC_2 | $BINARY keys add demowallet2 --home $CHAIN_DIR/$CHAINID_2 --recover --keyring-backend=test +echo $RLY_MNEMONIC_1 | $BINARY keys add rly1 --home $CHAIN_DIR/$CHAINID_1 --recover --keyring-backend=test +echo $RLY_MNEMONIC_2 | $BINARY keys add rly2 --home $CHAIN_DIR/$CHAINID_2 --recover --keyring-backend=test + +$BINARY genesis add-genesis-account $($BINARY --home $CHAIN_DIR/$CHAINID_1 keys show val1 --keyring-backend test -a) 100000000000$CHAIN_BOND_DENOM --home $CHAIN_DIR/$CHAINID_1 +$BINARY genesis add-genesis-account $($BINARY --home $CHAIN_DIR/$CHAINID_2 keys show val2 --keyring-backend test -a) 100000000000$CHAIN_BOND_DENOM --home $CHAIN_DIR/$CHAINID_2 +$BINARY genesis add-genesis-account $($BINARY --home $CHAIN_DIR/$CHAINID_1 keys show demowallet1 --keyring-backend test -a) 100000000000$CHAIN_BOND_DENOM --home $CHAIN_DIR/$CHAINID_1 +$BINARY genesis add-genesis-account $($BINARY --home $CHAIN_DIR/$CHAINID_2 keys show demowallet2 --keyring-backend test -a) 100000000000$CHAIN_BOND_DENOM --home $CHAIN_DIR/$CHAINID_2 +$BINARY genesis add-genesis-account $($BINARY --home $CHAIN_DIR/$CHAINID_1 keys show rly1 --keyring-backend test -a) 100000000000$CHAIN_BOND_DENOM --home $CHAIN_DIR/$CHAINID_1 +$BINARY genesis add-genesis-account $($BINARY --home $CHAIN_DIR/$CHAINID_2 keys show rly2 --keyring-backend test -a) 100000000000$CHAIN_BOND_DENOM --home $CHAIN_DIR/$CHAINID_2 + +echo "Creating and collecting gentx..." +$BINARY genesis gentx val1 7000000000$CHAIN_BOND_DENOM --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --keyring-backend test +$BINARY genesis gentx val2 7000000000$CHAIN_BOND_DENOM --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --keyring-backend test +$BINARY genesis collect-gentxs --home $CHAIN_DIR/$CHAINID_1 +$BINARY genesis collect-gentxs --home $CHAIN_DIR/$CHAINID_2 + +echo "Changing defaults and ports in app.toml and config.toml files..." +sed -i -e 's#"tcp://0.0.0.0:26656"#"tcp://0.0.0.0:'"$P2PPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's#"tcp://127.0.0.1:26657"#"tcp://127.0.0.1:'"$RPCPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's#"tcp://127.0.0.1:26658"#"tcp://127.0.0.1:'"$RPCAPPPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/timeout-commit = "5s"/timeout_commit = "1s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/timeout-propose = "3s"/timeout_propose = "1s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/mode = "full"/mode = "validator"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/enable = false/enable = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's/swagger = false/swagger = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's#"tcp://localhost:1317"#"tcp://localhost:'"$RESTPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's#"127.0.0.1:8545"#"127.0.0.1:'"$EVN_JSON_RPC_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's#"127.0.0.1:8546"#"127.0.0.1:'"$EVN_JSON_RPC_WS_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml +#sed -i -e 's#":8080"#":'"$ROSETTA_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e "$(cat -n $CHAIN_DIR/$CHAINID_1/config/app.toml | grep '\[rosetta\]' -A3 | grep "enable =" | awk '{print $1}')s/enable = true/enable = false/" $CHAIN_DIR/$CHAINID_1/config/app.toml + +sed -i -e 's#"tcp://0.0.0.0:26656"#"tcp://0.0.0.0:'"$P2PPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's#"tcp://127.0.0.1:26657"#"tcp://127.0.0.1:'"$RPCPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's#"tcp://127.0.0.1:26658"#"tcp://127.0.0.1:'"$RPCAPPPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's/timeout-commit = "5s"/timeout_commit = "1s"/g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's/timeout_propose = "3s"/timeout_propose = "1s"/g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's/mode = "full"/mode = "validator"/g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's/enable = false/enable = true/g' $CHAIN_DIR/$CHAINID_2/config/app.toml +sed -i -e 's/swagger = false/swagger = true/g' $CHAIN_DIR/$CHAINID_2/config/app.toml +sed -i -e 's#"tcp://localhost:1317"#"tcp://localhost:'"$RESTPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml +sed -i -e 's#"127.0.0.1:8545"#"127.0.0.1:'"$EVN_JSON_RPC_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml +sed -i -e 's#"127.0.0.1:8546"#"127.0.0.1:'"$EVN_JSON_RPC_WS_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml +#sed -i -e 's#":8080"#":'"$ROSETTA_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml +sed -i -e "$(cat -n $CHAIN_DIR/$CHAINID_2/config/app.toml | grep '\[rosetta\]' -A3 | grep "enable =" | awk '{print $1}')s/enable = true/enable = false/" $CHAIN_DIR/$CHAINID_2/config/app.toml \ No newline at end of file diff --git a/network/nft-transfer.md b/network/nft-transfer.md new file mode 100644 index 000000000..aa618c02c --- /dev/null +++ b/network/nft-transfer.md @@ -0,0 +1,94 @@ +# nft-transfer test + +## Overview + +The following repository contains a basic example of an Interchain NFT module and serves as a developer guide for teams that wish to use Interchain NFT functionality. + +The Interchain NFT module is now maintained within the `nft-transfer` repository +[here](https://github.com/bianjieai/nft-transfer). + +### Developer Documentation + +## Setup + +1. Clone this repository and build the application binary + +```bash +git clone https://github.com/irisnet/irishub.git +cd irishub + +make install +``` + +2. Compile and install an IBC relayer. + +```bash +git clone https://github.com/cosmos/relayer.git +cd relayer +git checkout v2.4.2 +make install +``` + +3. Bootstrap two chains and create an IBC connection and start the relayer + +```bash +make init-golang-rly +``` + +## Demo + +**NOTE:** For the purposes of this demo the setup scripts have been provided with a set of hardcoded mnemonics that generate deterministic wallet addresses used below. + +```bash +# Store the following account addresses within the current shell env +export DEMOWALLET_1=$(nftd keys show demowallet1 -a --keyring-backend test --home ./data/test-1) && echo $DEMOWALLET_1; +export DEMOWALLET_2=$(nftd keys show demowallet2 -a --keyring-backend test --home ./data/test-2) && echo $DEMOWALLET_2; +``` + +### Issue an nft class on the `test-1` chain + +Issue an nft class using the `iris tx nft issue` cmd. +Here the message signer is used as the account owner. + +```bash +# Issue an nft class +iris tx nft issue cat --name xiaopi --symbol pipi --description "my cat" --uri "hhahahh" --from demowallet1 --chain-id test-1 --keyring-dir ./data/test-1 --fees=1iris --keyring-backend=test --node tcp://127.0.0.1:16657 --mint-restricted=false --update-restricted=false + +# Query the class +iris query nft denom cat --node tcp://127.0.0.1:16657 +``` + +### Mint a nft on the `test-1` chain + +```bash +# Mint a nft +iris tx nft mint cat xiaopi --uri="http://wwww.baidu.com" --from demowallet1 --chain-id test-1 --keyring-dir ./data/test-1 --fees=1iris --keyring-backend=test --node tcp://127.0.0.1:16657 + +# query the nft +iris query nft token cat xiaopi --node tcp://127.0.0.1:16657 +``` + +### Transfer a nft from chain `test-1` to chain `test-2` + +```bash +# Execute the nft tranfer command +iris tx nft-transfer transfer nft-transfer channel-0 iaa10h9stc5v6ntgeygf5xf945njqq5h32r5y7qdwl cat xiaopi --from demowallet1 --chain-id test-1 --keyring-dir ./data/test-1 --fees=1iris --keyring-backend=test --node tcp://127.0.0.1:16657 --packet-timeout-height 2-10000 + +# Query the newly generated class-id through class-trace +iris query nft-transfer class-hash nft-transfer/channel-0/cat --node tcp://127.0.0.1:26657 + +# Query nft information on test-2 +iris query nft nft ibc/943B966B2B8A53C50A198EDAB7C9A41FCEAF24400A94167846679769D8BF8311 xiaopi --node tcp://127.0.0.1:26657 +``` + +When the nft is transferred out, the nft on the original chain will be locked to the [escrow account](https://github.com/bianjieai/ibc-go/blob/develop/modules/apps/nft-transfer/types/keys.go#L45). You can use the following command to determine whether the transferred nft is escrow + +```bash +iris query nft owner cat xiaopi --node tcp://127.0.0.1:16657 +``` + +### Transfer a nft back from chain `test-2` to chain `test-1` + +```bash +iris tx nft transfer nft-transfer channel-0 iaa10h9stc5v6ntgeygf5xf945njqq5h32r5y7qdwl ibc/943B966B2B8A53C50A198EDAB7C9A41FCEAF24400A94167846679769D8BF8311 xiaopi --from demowallet2 --chain-id test-2 --keyring-dir ./data/test-2 --fees=1stake --keyring-backend=test --node tcp://127.0.0.1:26657 --packet-timeout-height 1-10000 +``` diff --git a/network/relayer/interchain-nft-config/chains/test-1.json b/network/relayer/interchain-nft-config/chains/test-1.json new file mode 100644 index 000000000..eecd123cd --- /dev/null +++ b/network/relayer/interchain-nft-config/chains/test-1.json @@ -0,0 +1,17 @@ +{ + "type": "cosmos", + "value": { + "key": "test-1", + "chain-id": "test-1", + "rpc-addr": "http://127.0.0.1:16657", + "account-prefix": "iaa", + "keyring-backend": "test", + "gas-adjustment": 1.5, + "gas-prices": "0.025uiris", + "debug": true, + "timeout": "10s", + "output-format": "json", + "sign-mode": "direct", + "extra-codecs": ["ethermint"] + } +} diff --git a/network/relayer/interchain-nft-config/chains/test-2.json b/network/relayer/interchain-nft-config/chains/test-2.json new file mode 100644 index 000000000..cedd671f8 --- /dev/null +++ b/network/relayer/interchain-nft-config/chains/test-2.json @@ -0,0 +1,18 @@ +{ + "type": "cosmos", + "value": { + "key": "test-2", + "chain-id": "test-2", + "rpc-addr": "http://127.0.0.1:26657", + "account-prefix": "iaa", + "keyring-backend": "test", + "gas-adjustment": 1.5, + "gas-prices": "0.025uiris", + "debug": true, + "timeout": "10s", + "output-format": "json", + "sign-mode": "direct", + "extra-codecs": ["ethermint"] + } +} + diff --git a/network/relayer/interchain-nft-config/paths/test1-nft-test2.json b/network/relayer/interchain-nft-config/paths/test1-nft-test2.json new file mode 100644 index 000000000..ee452e3cb --- /dev/null +++ b/network/relayer/interchain-nft-config/paths/test1-nft-test2.json @@ -0,0 +1,25 @@ +{ + "src": { + "chain-id": "test-1", + "client-id": "", + "connection-id": "", + "channel-id": "", + "port-id": "nft-transfer", + "order": "unordered", + "version": "ics721-1" + }, + "dst": { + "chain-id": "test-2", + "client-id": "", + "connection-id": "", + "channel-id": "", + "port-id": "nft-transfer", + "order": "unordered", + "version": "ics721-1" + }, + "strategy": { + "type": "naive" + } +} + + diff --git a/network/relayer/interchain-nft-config/rly.sh b/network/relayer/interchain-nft-config/rly.sh new file mode 100755 index 000000000..e03284006 --- /dev/null +++ b/network/relayer/interchain-nft-config/rly.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Configure predefined mnemonic pharses +BINARY=rly +CHAIN_DIR=./data +RELAYER_DIR=./relayer +MNEMONIC_1="alley afraid soup fall idea toss can goose become valve initial strong forward bright dish figure check leopard decide warfare hub unusual join cart" +MNEMONIC_2="record gift you once hip style during joke field prize dust unique length more pencil transfer quit train device arrive energy sort steak upset" + +# Ensure rly is installed +if ! [ -x "$(command -v $BINARY)" ]; then + echo "$BINARY is required to run this script..." + echo "You can download at https://github.com/cosmos/relayer" + exit 1 +fi + +echo "Initializing $BINARY..." +$BINARY config init --home $CHAIN_DIR/$RELAYER_DIR + +echo "Adding configurations for both chains..." +$BINARY chains add -f $PWD/network/relayer/interchain-nft-config/chains/test-1.json test-1 --home $CHAIN_DIR/$RELAYER_DIR +$BINARY chains add -f $PWD/network/relayer/interchain-nft-config/chains/test-2.json test-2 --home $CHAIN_DIR/$RELAYER_DIR +$BINARY paths add test-1 test-2 test1-nft-test2 -f $PWD/network/relayer/interchain-nft-config/paths/test1-nft-test2.json --home $CHAIN_DIR/$RELAYER_DIR + +echo "Restoring accounts..." +$BINARY keys restore test-1 test-1 "$MNEMONIC_1" --home $CHAIN_DIR/$RELAYER_DIR +$BINARY keys restore test-2 test-2 "$MNEMONIC_2" --home $CHAIN_DIR/$RELAYER_DIR + +echo "Linking both chains and starting to listen relayer" +$BINARY transact link test1-nft-test2 --src-port nft-transfer --dst-port nft-transfer --order unordered --version ics721-1 --max-retries 20 -d --home $CHAIN_DIR/$RELAYER_DIR + +echo "Starting to listen relayer..." +$BINARY start test1-nft-test2 --home $CHAIN_DIR/$RELAYER_DIR \ No newline at end of file diff --git a/network/start.sh b/network/start.sh new file mode 100755 index 000000000..10dd02bfa --- /dev/null +++ b/network/start.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +BINARY=iris +CHAIN_DIR=./data +CHAINID_1=test-1 +CHAINID_2=test-2 +GRPCPORT_1=8090 +GRPCPORT_2=9090 +GRPCWEB_1=8091 +GRPCWEB_2=9091 + + +echo "Starting $CHAINID_1 in $CHAIN_DIR..." +echo "Creating log file at $CHAIN_DIR/$CHAINID_1.log" +$BINARY start --log_format json --home $CHAIN_DIR/$CHAINID_1 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_1" --grpc-web.address="0.0.0.0:$GRPCWEB_1" > $CHAIN_DIR/$CHAINID_1.log 2>&1 & + +echo "Starting $CHAINID_2 in $CHAIN_DIR..." +echo "Creating log file at $CHAIN_DIR/$CHAINID_2.log" +$BINARY start --log_format json --home $CHAIN_DIR/$CHAINID_2 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_2" --grpc-web.address="0.0.0.0:$GRPCWEB_2" > $CHAIN_DIR/$CHAINID_2.log 2>&1 & From 52ae93f50df83a458251c13f1d5ad8303d21b87b Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Mon, 23 Oct 2023 09:48:36 +0800 Subject: [PATCH 12/15] update dependency packages --- go.mod | 4 ++-- go.sum | 8 ++++---- network/nft-transfer.md | 32 ++++++++++++++++---------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 085615ee5..676a92eb2 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/irisnet/irishub/v2 go 1.19 require ( - github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20230911023600-fa7bd3f3cb1e + github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231023013626-e1cc238c3b00 github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 @@ -12,7 +12,7 @@ require ( github.com/cosmos/iavl v0.20.0 // indirect github.com/cosmos/ibc-go/v7 v7.3.0 github.com/evmos/ethermint v0.22.0 - github.com/irisnet/irismod v1.7.4-0.20231010070045-9304e04cfc25 + github.com/irisnet/irismod v1.7.4-0.20231020012541-015d2c01fd9e ) require ( diff --git a/go.sum b/go.sum index 753552726..e15af2e29 100644 --- a/go.sum +++ b/go.sum @@ -293,8 +293,8 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2 github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bianjieai/ethermint v0.6.1-0.20230914085944-3cc455cce3d4 h1:M3LU8I+hB9vqsK4oRFq0GxD+6Pzs48eWejvYuebtweQ= github.com/bianjieai/ethermint v0.6.1-0.20230914085944-3cc455cce3d4/go.mod h1:JEhGmVj5rZX5bTfOqh3nltE2N6+qMI4HVNV2vW6PpOQ= -github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20230911023600-fa7bd3f3cb1e h1:6XiMxCG7DpIOBjqw2rGtZgMIOgS/0KsbU6m84BQ0mfo= -github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20230911023600-fa7bd3f3cb1e/go.mod h1:u2PNH4v8CD4AWU4Rf7yt8/qqQtrrwwHiw03qQSKERhg= +github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231023013626-e1cc238c3b00 h1:cRzXLdDq5yGtkS3+k2T4snSaTEw/IxKPEpUQqNjku30= +github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231023013626-e1cc238c3b00/go.mod h1:u2PNH4v8CD4AWU4Rf7yt8/qqQtrrwwHiw03qQSKERhg= github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825 h1:+/6FK0V7uXouVYigb1EvPGuDN1ZDPfBnvzOUbTRe4rg= github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825/go.mod h1:OBT3OZWqF8eTyQNGOvHycGg+pkhWWm5RwELT/NRZM9k= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= @@ -816,8 +816,8 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/irisnet/irismod v1.7.4-0.20231010070045-9304e04cfc25 h1:Q9d9JpHkMNlKgqJSKM8iCsOClUw+K2L0iejCjyQRNd8= -github.com/irisnet/irismod v1.7.4-0.20231010070045-9304e04cfc25/go.mod h1:6APlocacyWrjIK8YwrKK/jn3u5pJktppITU938rfc10= +github.com/irisnet/irismod v1.7.4-0.20231020012541-015d2c01fd9e h1:R3XQ5HehAoJy1XczDDIEh4FIEB14NR5WE+LYEn1Qegg= +github.com/irisnet/irismod v1.7.4-0.20231020012541-015d2c01fd9e/go.mod h1:6APlocacyWrjIK8YwrKK/jn3u5pJktppITU938rfc10= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= diff --git a/network/nft-transfer.md b/network/nft-transfer.md index aa618c02c..c748a64f6 100644 --- a/network/nft-transfer.md +++ b/network/nft-transfer.md @@ -13,27 +13,27 @@ The Interchain NFT module is now maintained within the `nft-transfer` repository 1. Clone this repository and build the application binary -```bash -git clone https://github.com/irisnet/irishub.git -cd irishub + ```bash + git clone https://github.com/irisnet/irishub.git + cd irishub -make install -``` + make install + ``` 2. Compile and install an IBC relayer. -```bash -git clone https://github.com/cosmos/relayer.git -cd relayer -git checkout v2.4.2 -make install -``` + ```bash + git clone https://github.com/cosmos/relayer.git + cd relayer + git checkout v2.4.2 + make install + ``` 3. Bootstrap two chains and create an IBC connection and start the relayer -```bash -make init-golang-rly -``` + ```bash + make init-golang-rly + ``` ## Demo @@ -41,8 +41,8 @@ make init-golang-rly ```bash # Store the following account addresses within the current shell env -export DEMOWALLET_1=$(nftd keys show demowallet1 -a --keyring-backend test --home ./data/test-1) && echo $DEMOWALLET_1; -export DEMOWALLET_2=$(nftd keys show demowallet2 -a --keyring-backend test --home ./data/test-2) && echo $DEMOWALLET_2; +export DEMOWALLET_1=$(iris keys show demowallet1 -a --keyring-backend test --home ./data/test-1) && echo $DEMOWALLET_1; +export DEMOWALLET_2=$(iris keys show demowallet2 -a --keyring-backend test --home ./data/test-2) && echo $DEMOWALLET_2; ``` ### Issue an nft class on the `test-1` chain From ece4ea051f1bc4806f1e43bab3056b88d89a3e56 Mon Sep 17 00:00:00 2001 From: Dreamer <745124335@qq.com> Date: Tue, 7 Nov 2023 15:09:22 +0800 Subject: [PATCH 13/15] Update dependencies in go.mod --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 676a92eb2..066bccd0c 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/irisnet/irishub/v2 go 1.19 require ( - github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231023013626-e1cc238c3b00 + github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231027024800-d841419984f1 github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 diff --git a/go.sum b/go.sum index e15af2e29..71d0149ec 100644 --- a/go.sum +++ b/go.sum @@ -293,8 +293,8 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2 github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bianjieai/ethermint v0.6.1-0.20230914085944-3cc455cce3d4 h1:M3LU8I+hB9vqsK4oRFq0GxD+6Pzs48eWejvYuebtweQ= github.com/bianjieai/ethermint v0.6.1-0.20230914085944-3cc455cce3d4/go.mod h1:JEhGmVj5rZX5bTfOqh3nltE2N6+qMI4HVNV2vW6PpOQ= -github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231023013626-e1cc238c3b00 h1:cRzXLdDq5yGtkS3+k2T4snSaTEw/IxKPEpUQqNjku30= -github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231023013626-e1cc238c3b00/go.mod h1:u2PNH4v8CD4AWU4Rf7yt8/qqQtrrwwHiw03qQSKERhg= +github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231027024800-d841419984f1 h1:o/h+Px+W3aQ+VDq6gGWiGLq2/84YeGr6B8SFbDKLnlU= +github.com/bianjieai/nft-transfer v1.1.2-ibc-v6.1.0.0.20231027024800-d841419984f1/go.mod h1:u2PNH4v8CD4AWU4Rf7yt8/qqQtrrwwHiw03qQSKERhg= github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825 h1:+/6FK0V7uXouVYigb1EvPGuDN1ZDPfBnvzOUbTRe4rg= github.com/bianjieai/tibc-go v0.4.4-0.20230824091732-bbd58021f825/go.mod h1:OBT3OZWqF8eTyQNGOvHycGg+pkhWWm5RwELT/NRZM9k= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= From a137dd02b669d07566e52bdab5fb16af3b869d6b Mon Sep 17 00:00:00 2001 From: dreamer Date: Tue, 14 Nov 2023 15:57:42 +0800 Subject: [PATCH 14/15] fix dependabot comment --- go.mod | 12 ++++++------ go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 066bccd0c..14356ec58 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/tidwall/gjson v1.14.4 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect - google.golang.org/grpc v1.56.2 + google.golang.org/grpc v1.56.3 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 sigs.k8s.io/yaml v1.3.0 // indirect @@ -45,7 +45,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa github.com/spf13/viper v1.16.0 - golang.org/x/crypto v0.11.0 + golang.org/x/crypto v0.14.0 google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 ) @@ -203,12 +203,12 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 71d0149ec..eade93d27 100644 --- a/go.sum +++ b/go.sum @@ -1291,8 +1291,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= 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= @@ -1403,8 +1403,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1557,14 +1557,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1576,8 +1576,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1883,8 +1883,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= +google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= From 515a3fe964673042df31424f1c4226eddbbe2fbf Mon Sep 17 00:00:00 2001 From: dreamer <745124335@qq.com> Date: Tue, 14 Nov 2023 17:05:23 +0800 Subject: [PATCH 15/15] bump up irismod --- go.mod | 3 ++- go.sum | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 14356ec58..02e711c0b 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/cosmos/iavl v0.20.0 // indirect github.com/cosmos/ibc-go/v7 v7.3.0 github.com/evmos/ethermint v0.22.0 - github.com/irisnet/irismod v1.7.4-0.20231020012541-015d2c01fd9e + github.com/irisnet/irismod v1.7.4-0.20231114083321-2699028b980f ) require ( @@ -61,6 +61,7 @@ require ( github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/s2a-go v0.1.4 // indirect diff --git a/go.sum b/go.sum index eade93d27..2b5d3d588 100644 --- a/go.sum +++ b/go.sum @@ -556,8 +556,8 @@ github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTM github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -572,7 +572,8 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -816,8 +817,8 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/irisnet/irismod v1.7.4-0.20231020012541-015d2c01fd9e h1:R3XQ5HehAoJy1XczDDIEh4FIEB14NR5WE+LYEn1Qegg= -github.com/irisnet/irismod v1.7.4-0.20231020012541-015d2c01fd9e/go.mod h1:6APlocacyWrjIK8YwrKK/jn3u5pJktppITU938rfc10= +github.com/irisnet/irismod v1.7.4-0.20231114083321-2699028b980f h1:gf9hFQyOG2YgB5xZ5IxFUm55b6SO4N3oZU6ghm32bbk= +github.com/irisnet/irismod v1.7.4-0.20231114083321-2699028b980f/go.mod h1:6jFeBhmpFntw17DMgGLgAVcw+PfV0vV68CBnO5O2Erw= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=