From d479851de0c83b435178b5a9913e945bde65e1bc Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 9 Aug 2023 17:26:45 +0700 Subject: [PATCH 01/44] update to 0.47 - chain be able to start --- Makefile | 8 +- app/ante.go | 13 +- app/app.go | 225 +++++++++---- app/export.go | 2 +- app/genesis.go | 19 +- app/keepers/keepers.go | 32 +- app/types.go | 2 +- app/upgrades/types.go | 6 +- app/upgrades/v2_4/constants.go | 2 +- app/upgrades/v2_4/upgrades.go | 10 +- app/upgrades/v2_6/constants.go | 2 +- app/upgrades/v2_6/upgrades.go | 2 +- benchmark/app_test.go | 6 +- benchmark/helper_test.go | 12 +- client/grpc/node/query.pb.go | 6 +- client/grpc/node/query.pb.gw.go | 14 +- client/grpc/node/service.go | 2 +- .../oracle/proof/block_header_merkle_parts.go | 6 +- .../proof/block_header_merkle_parts_test.go | 6 +- client/grpc/oracle/proof/iavl_proof_test.go | 2 +- client/grpc/oracle/proof/multi_store.go | 2 +- client/grpc/oracle/proof/multi_store_test.go | 2 +- client/grpc/oracle/proof/proof.go | 2 +- client/grpc/oracle/proof/proof.pb.go | 308 ++++++++--------- client/grpc/oracle/proof/proof.pb.gw.go | 19 +- client/grpc/oracle/proof/proof_test.go | 2 +- client/grpc/oracle/proof/service.go | 2 +- client/grpc/oracle/proof/signature.go | 10 +- client/grpc/oracle/proof/signature_test.go | 6 +- client/grpc/oracle/proof/util.go | 4 +- cmd/bandd/cmd/gends.go | 2 +- cmd/bandd/cmd/genos.go | 2 +- cmd/bandd/cmd/init.go | 17 +- cmd/bandd/cmd/root.go | 39 ++- cmd/bandevmbot/main.go | 6 +- go.mod | 139 ++++---- go.sum | 314 ++++++++++-------- proto/bandchain/v1/oracle/proof.proto | 42 +-- proto/buf.gen.doc.yml | 5 + proto/buf.gen.gogo.yml | 8 + proto/buf.lock | 23 ++ proto/buf.md | 19 ++ proto/buf.yaml | 21 ++ scripts/generate_genesis.sh | 8 +- scripts/open_proposal.sh | 18 + scripts/protocgen.sh | 42 +-- scripts/vote_proposal.sh | 14 + testing/chain.go | 48 +-- testing/config.go | 10 +- testing/coordinator.go | 2 +- testing/endpoint.go | 49 ++- testing/events.go | 74 +++-- testing/path.go | 2 +- testing/testapp/setup.go | 32 +- testing/value.go | 8 +- .../proto/google/api/annotations.proto | 8 +- third_party/proto/tendermint/abci/types.proto | 111 +++---- .../proto/tendermint/crypto/keys.proto | 2 +- .../proto/tendermint/crypto/proof.proto | 2 +- .../proto/tendermint/libs/bits/types.proto | 2 +- third_party/proto/tendermint/p2p/types.proto | 2 +- .../proto/tendermint/types/block.proto | 2 +- .../proto/tendermint/types/evidence.proto | 18 +- .../proto/tendermint/types/params.proto | 5 +- .../proto/tendermint/types/types.proto | 50 ++- .../proto/tendermint/types/validator.proto | 2 +- .../proto/tendermint/version/types.proto | 2 +- x/bank/keeper/keeper.go | 2 +- x/bank/module.go | 20 +- x/globalfee/feechecker/feechecker.go | 29 +- x/globalfee/feechecker/feechecker_test.go | 3 +- x/globalfee/genesis_test.go | 17 +- x/globalfee/module.go | 21 +- x/globalfee/types/genesis.pb.go | 4 +- x/globalfee/types/query.pb.go | 6 +- x/globalfee/types/query.pb.gw.go | 9 +- x/oracle/abci.go | 2 +- x/oracle/abci_test.go | 16 +- x/oracle/app_test.go | 32 +- x/oracle/handler_test.go | 92 ++--- x/oracle/ibc_module.go | 8 +- x/oracle/ibc_test.go | 7 +- x/oracle/keeper/grpc_query.go | 2 +- x/oracle/keeper/keeper.go | 4 +- x/oracle/keeper/owasm_test.go | 4 +- x/oracle/keeper/relay.go | 2 +- x/oracle/keeper/result.go | 52 +-- x/oracle/keeper/snapshotter.go | 49 ++- .../keeper/snapshotter_integration_test.go | 2 +- x/oracle/keeper/validator_status.go | 2 +- x/oracle/keeper/validator_status_test.go | 2 +- x/oracle/module.go | 29 +- x/oracle/types/exec_env_test.go | 2 +- x/oracle/types/expected_keepers.go | 16 +- x/oracle/types/genesis.pb.go | 4 +- x/oracle/types/msgs_test.go | 2 +- x/oracle/types/oracle.pb.go | 12 +- x/oracle/types/query.pb.go | 8 +- x/oracle/types/query.pb.gw.go | 74 ++++- x/oracle/types/tx.pb.go | 6 +- yoda/context.go | 2 +- yoda/execute.go | 2 +- yoda/handler.go | 4 +- yoda/logger.go | 2 +- yoda/run.go | 6 +- 105 files changed, 1380 insertions(+), 1060 deletions(-) create mode 100644 proto/buf.gen.doc.yml create mode 100644 proto/buf.gen.gogo.yml create mode 100644 proto/buf.lock create mode 100644 proto/buf.md create mode 100644 proto/buf.yaml create mode 100755 scripts/open_proposal.sh create mode 100755 scripts/vote_proposal.sh diff --git a/Makefile b/Makefile index 6beb915e3..7485ee940 100644 --- a/Makefile +++ b/Makefile @@ -71,11 +71,15 @@ test: PROTO_BUILDER_IMAGE=tendermintdev/sdk-proto-gen@sha256:372dce7be2f465123e26459973ca798fc489ff2c75aeecd814c0ca8ced24faca PROTO_FORMATTER_IMAGE=tendermintdev/docker-build-proto@sha256:aabcfe2fc19c31c0f198d4cd26393f5e5ca9502d7ea3feafbfe972448fee7cae +protoVer=0.11.6 +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: @echo "Generating Protobuf files" - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(PROTO_BUILDER_IMAGE) sh ./scripts/protocgen.sh + @$(protoImage) sh ./scripts/protocgen.sh proto-format: @echo "Formatting Protobuf files" @@ -122,7 +126,7 @@ proto-update-deps: ## Importing of tendermint protobuf definitions currently requires the ## use of `sed` in order to build properly with cosmos-sdk's proto file layout ## (which is the standard Buf.build FILE_LAYOUT) -## Issue link: https://github.com/tendermint/tendermint/issues/5021 +## Issue link: https://github.com/cometbft/cometbft/issues/5021 @mkdir -p $(TM_ABCI_TYPES) @curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto diff --git a/app/ante.go b/app/ante.go index a9e2aca54..a1a8a5dcd 100644 --- a/app/ante.go +++ b/app/ante.go @@ -5,11 +5,12 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - 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" "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC @@ -19,7 +20,8 @@ type HandlerOptions struct { OracleKeeper *oraclekeeper.Keeper IBCKeeper *ibckeeper.Keeper GlobalFeeSubspace paramtypes.Subspace - StakingSubspace paramtypes.Subspace + StakingSubspace paramtypes.Subspace // 0.47 TODO: delete this line + StakingKeeper *stakingkeeper.Keeper } func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { @@ -48,14 +50,11 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { if options.GlobalFeeSubspace.Name() == "" { return nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, "globalfee param store is required for AnteHandler") } - if options.StakingSubspace.Name() == "" { - return nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, "staking param store is required for AnteHandler") - } feeChecker := feechecker.NewFeeChecker( options.OracleKeeper, options.GlobalFeeSubspace, - options.StakingSubspace, + options.StakingKeeper, ) options.TxFeeChecker = feeChecker.CheckTxFeeWithMinGasPrices } diff --git a/app/app.go b/app/app.go index 55adcdc1e..57e7a6acb 100644 --- a/app/app.go +++ b/app/app.go @@ -7,6 +7,11 @@ import ( "os" "path/filepath" + 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/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" @@ -22,6 +27,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/auth/vesting" @@ -35,11 +41,13 @@ 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" + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + consensusparamtypes "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" @@ -77,29 +85,24 @@ import ( 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" - ica "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts" - icahost "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host" - icahostkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper" - 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" - "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" + ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" + icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host" + icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" + 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/cosmos/ibc-go/v7/modules/apps/transfer" + ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v7/modules/core" + ibcclient "github.com/cosmos/ibc-go/v7/modules/core/02-client" + ibcclientclient "github.com/cosmos/ibc-go/v7/modules/core/02-client/client" + ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" "github.com/gorilla/mux" "github.com/rakyll/statik/fs" "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" owasm "github.com/bandprotocol/go-owasm/api" @@ -133,7 +136,7 @@ var ( // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, - genutil.AppModuleBasic{}, + genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, @@ -142,7 +145,6 @@ var ( gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, - distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, @@ -160,6 +162,7 @@ var ( transfer.AppModuleBasic{}, groupmodule.AppModuleBasic{}, vesting.AppModuleBasic{}, + consensus.AppModuleBasic{}, ica.AppModuleBasic{}, oracle.AppModuleBasic{}, globalfee.AppModule{}, @@ -245,12 +248,26 @@ func NewBandApp( 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, - feegrant.StoreKey, authzkeeper.StoreKey, icahosttypes.StoreKey, - group.StoreKey, oracletypes.StoreKey, + authtypes.StoreKey, + banktypes.StoreKey, + stakingtypes.StoreKey, + crisistypes.StoreKey, + minttypes.StoreKey, + distrtypes.StoreKey, + slashingtypes.StoreKey, + govtypes.StoreKey, + paramstypes.StoreKey, + consensusparamtypes.StoreKey, + ibcexported.StoreKey, + upgradetypes.StoreKey, + evidencetypes.StoreKey, + ibctransfertypes.StoreKey, + capabilitytypes.StoreKey, + feegrant.StoreKey, + authzkeeper.StoreKey, + icahosttypes.StoreKey, + group.StoreKey, + oracletypes.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) @@ -278,9 +295,13 @@ func NewBandApp( ) // set the BaseApp's parameter store - bApp.SetParamStore( - app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable()), + app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( + appCodec, + keys[consensusparamtypes.StoreKey], + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + bApp.SetParamStore(&app.ConsensusParamsKeeper) // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper( @@ -288,7 +309,7 @@ func NewBandApp( keys[capabilitytypes.StoreKey], memKeys[capabilitytypes.MemStoreKey], ) - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) + scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) scopedOracleKeeper := app.CapabilityKeeper.ScopeToModule(oracletypes.ModuleName) scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) @@ -298,10 +319,11 @@ func NewBandApp( app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, keys[authtypes.StoreKey], - app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, Bech32MainPrefix, + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // wrappedBankerKeeper overrides burn token behavior to instead transfer to community pool. app.BankKeeper = bandbankkeeper.NewWrappedBankKeeperBurnToCommunityPool( @@ -309,33 +331,59 @@ func NewBandApp( appCodec, keys[banktypes.StoreKey], app.AccountKeeper, - app.GetSubspace(banktypes.ModuleName), - app.ModuleAccountAddrs(), + // 0.47 TODO: add blocked address + make(map[string]bool), + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ), app.AccountKeeper, ) - stakingKeeper := stakingkeeper.NewKeeper( + app.StakingKeeper = stakingkeeper.NewKeeper( appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.GetSubspace(stakingtypes.ModuleName), + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.MintKeeper = mintkeeper.NewKeeper( - appCodec, keys[minttypes.StoreKey], app.GetSubspace(minttypes.ModuleName), &stakingKeeper, - app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, + appCodec, + keys[minttypes.StoreKey], + app.StakingKeeper, + app.AccountKeeper, + app.BankKeeper, + authtypes.FeeCollectorName, + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.DistrKeeper = distrkeeper.NewKeeper( - appCodec, keys[distrtypes.StoreKey], app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, authtypes.FeeCollectorName, + appCodec, + keys[distrtypes.StoreKey], + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + authtypes.FeeCollectorName, + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // DistrKeeper must be set afterward due to the circular reference between banker-staking-distr. app.BankKeeper.SetDistrKeeper(&app.DistrKeeper) app.SlashingKeeper = slashingkeeper.NewKeeper( - appCodec, keys[slashingtypes.StoreKey], &stakingKeeper, app.GetSubspace(slashingtypes.ModuleName), + appCodec, + legacyAmino, + keys[slashingtypes.StoreKey], + app.StakingKeeper, + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, + appCodec, + keys[crisistypes.StoreKey], + invCheckPeriod, + app.BankKeeper, + authtypes.FeeCollectorName, + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.FeegrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) @@ -345,18 +393,19 @@ func NewBandApp( appCodec, homePath, app.BaseApp, + // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - app.StakingKeeper = *stakingKeeper.SetHooks( + app.StakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), ) // create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( appCodec, - keys[ibchost.StoreKey], - app.GetSubspace(ibchost.ModuleName), + keys[ibcexported.StoreKey], + app.GetSubspace(ibcexported.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, @@ -387,14 +436,19 @@ func NewBandApp( 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)) govConfig := govtypes.DefaultConfig() app.GovKeeper = govkeeper.NewKeeper( - appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, govRouter, app.MsgServiceRouter(), + appCodec, + keys[govtypes.StoreKey], + app.AccountKeeper, + app.BankKeeper, + app.StakingKeeper, + app.MsgServiceRouter(), govConfig, + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.TransferKeeper = ibctransferkeeper.NewKeeper( @@ -427,7 +481,7 @@ func NewBandApp( authtypes.FeeCollectorName, app.AccountKeeper, app.BankKeeper, - &stakingKeeper, + app.StakingKeeper, app.DistrKeeper, app.AuthzKeeper, app.IBCKeeper.ChannelKeeper, @@ -449,7 +503,7 @@ func NewBandApp( // create evidence keeper with router evidenceKeeper := evidencekeeper.NewKeeper( - appCodec, keys[evidencetypes.StoreKey], &app.StakingKeeper, app.SlashingKeeper, + 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 @@ -463,11 +517,17 @@ func NewBandApp( // must be passed by reference here. app.mm = module.NewManager( genutil.NewAppModule(app.AccountKeeper, app.StakingKeeper, app.BaseApp.DeliverTx, encodingConfig.TxConfig), - auth.NewAppModule(appCodec, app.AccountKeeper, nil), + auth.NewAppModule( + appCodec, + app.AccountKeeper, + authsims.RandomGenesisAccounts, + app.GetSubspace(authtypes.ModuleName), + ), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bandbank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), + bandbank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), + // 0.47 TODO: check capability.NewAppModule sealKeeper argument + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), + crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), feegrantmodule.NewAppModule( appCodec, app.AccountKeeper, @@ -475,17 +535,44 @@ func NewBandApp( app.FeegrantKeeper, app.interfaceRegistry, ), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil), - 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), + gov.NewAppModule( + appCodec, + app.GovKeeper, + app.AccountKeeper, + app.BankKeeper, + app.GetSubspace(govtypes.ModuleName), + ), + mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)), + 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), ibc.NewAppModule(app.IBCKeeper), params.NewAppModule(app.ParamsKeeper), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), + consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper), transferModule, icaModule, oracleModule, @@ -510,7 +597,7 @@ func NewBandApp( govtypes.ModuleName, crisistypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, icatypes.ModuleName, genutiltypes.ModuleName, authz.ModuleName, @@ -518,6 +605,7 @@ func NewBandApp( group.ModuleName, paramstypes.ModuleName, vestingtypes.ModuleName, + consensusparamtypes.ModuleName, globalfee.ModuleName, ) app.mm.SetOrderEndBlockers( @@ -526,7 +614,7 @@ func NewBandApp( stakingtypes.ModuleName, oracletypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, icatypes.ModuleName, capabilitytypes.ModuleName, authtypes.ModuleName, @@ -542,10 +630,12 @@ func NewBandApp( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, + consensusparamtypes.ModuleName, globalfee.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are // properly initialized with tokens from genesis accounts. + // NOTE: The genutils module must also occur after auth so that it can access the params from auth. // NOTE: Capability module must occur first so that it can initialize any capabilities // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. @@ -561,7 +651,7 @@ func NewBandApp( crisistypes.ModuleName, genutiltypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, icatypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName, @@ -570,12 +660,12 @@ func NewBandApp( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, + consensusparamtypes.ModuleName, oracletypes.ModuleName, globalfee.ModuleName, ) - app.mm.RegisterInvariants(&app.CrisisKeeper) - app.mm.RegisterRoutes(app.Router(), app.QueryRouter(), encodingConfig.Amino) + app.mm.RegisterInvariants(app.CrisisKeeper) app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) app.mm.RegisterServices(app.configurator) @@ -600,7 +690,8 @@ func NewBandApp( OracleKeeper: &app.OracleKeeper, IBCKeeper: app.IBCKeeper, GlobalFeeSubspace: app.GetSubspace(globalfee.ModuleName), - StakingSubspace: app.GetSubspace(stakingtypes.ModuleName), + StakingSubspace: app.GetSubspace(stakingtypes.ModuleName), // 0.47 TODO: delete this line + StakingKeeper: app.StakingKeeper, }, ) if err != nil { @@ -813,7 +904,7 @@ func initParamsKeeper( paramsKeeper.Subspace(slashingtypes.ModuleName) paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) + paramsKeeper.Subspace(ibcexported.ModuleName) paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(icahosttypes.SubModuleName) paramsKeeper.Subspace(oracletypes.ModuleName) diff --git a/app/export.go b/app/export.go index ed05270a1..4a12caf07 100644 --- a/app/export.go +++ b/app/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" diff --git a/app/genesis.go b/app/genesis.go index ff81f469e..dc684a196 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -29,12 +29,13 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/cosmos-sdk/x/upgrade" 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" - ibctransfer "github.com/cosmos/ibc-go/v5/modules/apps/transfer" - ibctransafertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" - ibc "github.com/cosmos/ibc-go/v5/modules/core" - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" + icagenesistypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/genesis/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" + ibctransfer "github.com/cosmos/ibc-go/v7/modules/apps/transfer" + ibctransafertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + ibc "github.com/cosmos/ibc-go/v7/modules/core" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" "github.com/bandprotocol/chain/v2/app/upgrades/v2_6" "github.com/bandprotocol/chain/v2/x/globalfee" @@ -59,7 +60,7 @@ func NewDefaultGenesisState() GenesisState { govGenesis := govv1.DefaultGenesisState() crisisGenesis := crisistypes.DefaultGenesisState() slashingGenesis := slashingtypes.DefaultGenesisState() - icaGenesis := icatypes.DefaultGenesis() + icaGenesis := icagenesistypes.DefaultGenesis() globalfeeGenesis := globalfeetypes.DefaultGenesisState() // Override the genesis parameters. authGenesis.Params.TxSizeCostPerByte = 5 @@ -69,7 +70,7 @@ func NewDefaultGenesisState() GenesisState { distrGenesis.Params.BonusProposerReward = sdk.NewDecWithPrec(12, 2) // 12% mintGenesis.Params.BlocksPerYear = 10519200 // target 3-second block time mintGenesis.Params.MintDenom = denom - govGenesis.DepositParams.MinDeposit = sdk.NewCoins( + govGenesis.Params.MinDeposit = sdk.NewCoins( sdk.NewCoin(denom, sdk.TokensFromConsensusPower(1000, sdk.DefaultPowerReduction)), ) crisisGenesis.ConstantFee = sdk.NewCoin(denom, sdk.TokensFromConsensusPower(10000, sdk.DefaultPowerReduction)) @@ -99,7 +100,7 @@ func NewDefaultGenesisState() GenesisState { govtypes.ModuleName: cdc.MustMarshalJSON(govGenesis), crisistypes.ModuleName: cdc.MustMarshalJSON(crisisGenesis), slashingtypes.ModuleName: cdc.MustMarshalJSON(slashingGenesis), - ibchost.ModuleName: ibc.AppModuleBasic{}.DefaultGenesis(cdc), + ibcexported.ModuleName: ibc.AppModuleBasic{}.DefaultGenesis(cdc), upgradetypes.ModuleName: upgrade.AppModuleBasic{}.DefaultGenesis(cdc), evidencetypes.ModuleName: evidence.AppModuleBasic{}.DefaultGenesis(cdc), authz.ModuleName: authzmodule.AppModuleBasic{}.DefaultGenesis(cdc), diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 3e00c9fef..cb8cca6e0 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -4,6 +4,7 @@ import ( authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" crisiskeeper "github.com/cosmos/cosmos-sdk/x/crisis/keeper" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper" @@ -15,9 +16,9 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" - icahostkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/keeper" - ibctransferkeeper "github.com/cosmos/ibc-go/v5/modules/apps/transfer/keeper" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" + icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper" + ibctransferkeeper "github.com/cosmos/ibc-go/v7/modules/apps/transfer/keeper" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" bandbankkeeper "github.com/bandprotocol/chain/v2/x/bank/keeper" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" @@ -28,23 +29,24 @@ type AppKeepers struct { AccountKeeper authkeeper.AccountKeeper BankKeeper bandbankkeeper.WrappedBankKeeper CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper + StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper + GovKeeper *govkeeper.Keeper + CrisisKeeper *crisiskeeper.Keeper + UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - IBCKeeper *ibckeeper.Keeper - ICAHostKeeper icahostkeeper.Keeper - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - FeegrantKeeper feegrantkeeper.Keeper - AuthzKeeper authzkeeper.Keeper - GroupKeeper groupkeeper.Keeper - OracleKeeper oraclekeeper.Keeper + IBCKeeper *ibckeeper.Keeper + ICAHostKeeper icahostkeeper.Keeper + EvidenceKeeper evidencekeeper.Keeper + TransferKeeper ibctransferkeeper.Keeper + FeegrantKeeper feegrantkeeper.Keeper + AuthzKeeper authzkeeper.Keeper + GroupKeeper groupkeeper.Keeper + OracleKeeper oraclekeeper.Keeper + ConsensusParamsKeeper consensusparamkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper diff --git a/app/types.go b/app/types.go index c61de1b76..45e58f71d 100644 --- a/app/types.go +++ b/app/types.go @@ -1,7 +1,7 @@ package band import ( - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server/types" diff --git a/app/upgrades/types.go b/app/upgrades/types.go index b1d96d75b..db32db7a7 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -2,12 +2,12 @@ package upgrades import ( "github.com/bandprotocol/chain/v2/app/keepers" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - abci "github.com/tendermint/tendermint/abci/types" ) // Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal @@ -28,7 +28,7 @@ type Upgrade struct { // BaseAppParamManager defines an interrace that BaseApp is expected to fullfil // that allows upgrade handlers to modify BaseApp parameters. type AppManager interface { - GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams - StoreConsensusParams(ctx sdk.Context, cp *abci.ConsensusParams) + GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams + StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams) GetSubspace(moduleName string) paramstypes.Subspace } diff --git a/app/upgrades/v2_4/constants.go b/app/upgrades/v2_4/constants.go index 4a1928792..620294e58 100644 --- a/app/upgrades/v2_4/constants.go +++ b/app/upgrades/v2_4/constants.go @@ -3,7 +3,7 @@ package v2_4 import ( "github.com/bandprotocol/chain/v2/app/upgrades" storetypes "github.com/cosmos/cosmos-sdk/store/types" - icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" ) const UpgradeName = "v2_4" diff --git a/app/upgrades/v2_4/upgrades.go b/app/upgrades/v2_4/upgrades.go index a3dfede1d..f5ee338cb 100644 --- a/app/upgrades/v2_4/upgrades.go +++ b/app/upgrades/v2_4/upgrades.go @@ -12,11 +12,11 @@ import ( govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" 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" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/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" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" diff --git a/app/upgrades/v2_6/constants.go b/app/upgrades/v2_6/constants.go index 1c1846b98..47b07a59a 100644 --- a/app/upgrades/v2_6/constants.go +++ b/app/upgrades/v2_6/constants.go @@ -14,7 +14,7 @@ import ( govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/group" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibctransfertypes "github.com/cosmos/ibc-go/v5/modules/apps/transfer/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ) const UpgradeName = "v2_6" diff --git a/app/upgrades/v2_6/upgrades.go b/app/upgrades/v2_6/upgrades.go index 0aff455e8..8ebc9e848 100644 --- a/app/upgrades/v2_6/upgrades.go +++ b/app/upgrades/v2_6/upgrades.go @@ -6,7 +6,7 @@ import ( "github.com/bandprotocol/chain/v2/x/globalfee" globalfeetypes "github.com/bandprotocol/chain/v2/x/globalfee/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - icahosttypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/host/types" + icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" diff --git a/benchmark/app_test.go b/benchmark/app_test.go index da563bf98..312e2f7dc 100644 --- a/benchmark/app_test.go +++ b/benchmark/app_test.go @@ -3,12 +3,12 @@ package benchmark import ( "testing" + 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/client" sdk "github.com/cosmos/cosmos-sdk/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" testapp "github.com/bandprotocol/chain/v2/testing/testapp" "github.com/bandprotocol/chain/v2/x/oracle/keeper" diff --git a/benchmark/helper_test.go b/benchmark/helper_test.go index 2a17aa740..8b74a042b 100644 --- a/benchmark/helper_test.go +++ b/benchmark/helper_test.go @@ -12,13 +12,13 @@ import ( "github.com/bandprotocol/chain/v2/testing/testapp" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" owasm "github.com/bandprotocol/go-owasm/api" + types "github.com/cometbft/cometbft/abci/types" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/require" - types "github.com/tendermint/tendermint/abci/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmtypes "github.com/tendermint/tendermint/types" ) type Account struct { @@ -214,9 +214,9 @@ func InitOwasmTestEnv( return owasmVM, compiledCode, req } -func GetConsensusParams(maxGas int64) *types.ConsensusParams { - return &types.ConsensusParams{ - Block: &types.BlockParams{ +func GetConsensusParams(maxGas int64) *tmproto.ConsensusParams { + return &tmproto.ConsensusParams{ + Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: maxGas, }, diff --git a/client/grpc/node/query.pb.go b/client/grpc/node/query.pb.go index 0a95264ef..7ba8f3c49 100644 --- a/client/grpc/node/query.pb.go +++ b/client/grpc/node/query.pb.go @@ -6,9 +6,9 @@ package node import ( context "context" fmt "fmt" - _ "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" diff --git a/client/grpc/node/query.pb.gw.go b/client/grpc/node/query.pb.gw.go index 027811cde..98fb0315b 100644 --- a/client/grpc/node/query.pb.gw.go +++ b/client/grpc/node/query.pb.gw.go @@ -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_Service_ChainID_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryChainIDRequest @@ -70,12 +72,14 @@ func local_request_Service_EVMValidators_0(ctx context.Context, marshaler runtim // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". // UnaryRPC :call ServiceServer 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 RegisterServiceHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { mux.Handle("GET", pattern_Service_ChainID_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 RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_ChainID_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) @@ -96,6 +101,8 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_EVMValidators_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 { @@ -103,6 +110,7 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_EVMValidators_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) @@ -198,9 +206,9 @@ func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } var ( - pattern_Service_ChainID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"bandchain", "v1", "chain_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Service_ChainID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"bandchain", "v1", "chain_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Service_EVMValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"bandchain", "v1", "evm-validators"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Service_EVMValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"bandchain", "v1", "evm-validators"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/client/grpc/node/service.go b/client/grpc/node/service.go index d182c4854..411234d55 100644 --- a/client/grpc/node/service.go +++ b/client/grpc/node/service.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/cometbft/cometbft/crypto/secp256k1" "github.com/ethereum/go-ethereum/crypto" gogogrpc "github.com/gogo/protobuf/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/client/grpc/oracle/proof/block_header_merkle_parts.go b/client/grpc/oracle/proof/block_header_merkle_parts.go index 0e2fa1d4e..6f58d2196 100644 --- a/client/grpc/oracle/proof/block_header_merkle_parts.go +++ b/client/grpc/oracle/proof/block_header_merkle_parts.go @@ -1,9 +1,9 @@ package proof import ( + "github.com/cometbft/cometbft/crypto/merkle" + "github.com/cometbft/cometbft/types" "github.com/ethereum/go-ethereum/common" - "github.com/tendermint/tendermint/crypto/merkle" - "github.com/tendermint/tendermint/types" ) // BlockHeaderMerklePartsEthereum is an Ethereum version of BlockHeaderMerkleParts for solidity ABI-encoding. @@ -33,7 +33,7 @@ func (bp *BlockHeaderMerkleParts) encodeToEthFormat() BlockHeaderMerklePartsEthe // GetBlockHeaderMerkleParts converts Tendermint block header struct into BlockHeaderMerkleParts for gas-optimized proof verification. func GetBlockHeaderMerkleParts(block *types.Header) BlockHeaderMerkleParts { - // based on https://github.com/tendermint/tendermint/blob/master/types/block.go#L448 + // based on https://github.com/cometbft/cometbft/blob/master/types/block.go#L448 hbz, err := block.Version.Marshal() if err != nil { panic(err) diff --git a/client/grpc/oracle/proof/block_header_merkle_parts_test.go b/client/grpc/oracle/proof/block_header_merkle_parts_test.go index 2badb651b..8f9226ab8 100644 --- a/client/grpc/oracle/proof/block_header_merkle_parts_test.go +++ b/client/grpc/oracle/proof/block_header_merkle_parts_test.go @@ -3,10 +3,10 @@ package proof import ( "testing" + tmbytes "github.com/cometbft/cometbft/libs/bytes" + tmversion "github.com/cometbft/cometbft/proto/tendermint/version" + "github.com/cometbft/cometbft/types" "github.com/stretchr/testify/require" - tmbytes "github.com/tendermint/tendermint/libs/bytes" - tmversion "github.com/tendermint/tendermint/proto/tendermint/version" - "github.com/tendermint/tendermint/types" ) /* diff --git a/client/grpc/oracle/proof/iavl_proof_test.go b/client/grpc/oracle/proof/iavl_proof_test.go index 9082238b5..d40f9e4c8 100644 --- a/client/grpc/oracle/proof/iavl_proof_test.go +++ b/client/grpc/oracle/proof/iavl_proof_test.go @@ -3,10 +3,10 @@ package proof import ( "testing" + "github.com/cometbft/cometbft/crypto/tmhash" ics23 "github.com/confio/ics23/go" storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto/tmhash" ) /* diff --git a/client/grpc/oracle/proof/multi_store.go b/client/grpc/oracle/proof/multi_store.go index d5e3f6e00..e55f86458 100644 --- a/client/grpc/oracle/proof/multi_store.go +++ b/client/grpc/oracle/proof/multi_store.go @@ -1,9 +1,9 @@ package proof import ( + tmbytes "github.com/cometbft/cometbft/libs/bytes" ics23 "github.com/confio/ics23/go" "github.com/ethereum/go-ethereum/common" - tmbytes "github.com/tendermint/tendermint/libs/bytes" ) // MultiStoreProofEthereum is an Ethereum version of MultiStoreProof for solidity ABI-encoding. diff --git a/client/grpc/oracle/proof/multi_store_test.go b/client/grpc/oracle/proof/multi_store_test.go index 08e53ad07..6f6467f9c 100644 --- a/client/grpc/oracle/proof/multi_store_test.go +++ b/client/grpc/oracle/proof/multi_store_test.go @@ -3,10 +3,10 @@ package proof import ( "testing" + "github.com/cometbft/cometbft/crypto/tmhash" ics23 "github.com/confio/ics23/go" storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto/tmhash" ) /* diff --git a/client/grpc/oracle/proof/proof.go b/client/grpc/oracle/proof/proof.go index 4f0403135..4d2d33f27 100644 --- a/client/grpc/oracle/proof/proof.go +++ b/client/grpc/oracle/proof/proof.go @@ -6,11 +6,11 @@ import ( "fmt" "math/big" + rpcclient "github.com/cometbft/cometbft/rpc/client" ics23 "github.com/confio/ics23/go" "github.com/cosmos/cosmos-sdk/client" storetypes "github.com/cosmos/cosmos-sdk/store/types" "github.com/ethereum/go-ethereum/accounts/abi" - rpcclient "github.com/tendermint/tendermint/rpc/client" ) var ( diff --git a/client/grpc/oracle/proof/proof.pb.go b/client/grpc/oracle/proof/proof.pb.go index ab58cd641..869f2a590 100644 --- a/client/grpc/oracle/proof/proof.pb.go +++ b/client/grpc/oracle/proof/proof.pb.go @@ -7,10 +7,10 @@ import ( context "context" fmt "fmt" types "github.com/bandprotocol/chain/v2/x/oracle/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" + github_com_cometbft_cometbft_libs_bytes "github.com/cometbft/cometbft/libs/bytes" + _ "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" @@ -332,8 +332,8 @@ func (m *QueryRequestCountProofResponse) GetResult() CountProofResponse { // SingleProofResponse is the data structure for response of single proof type SingleProofResponse struct { - Proof SingleProof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof"` - EvmProofBytes github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=evm_proof_bytes,json=evmProofBytes,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"evm_proof_bytes,omitempty"` + Proof SingleProof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof"` + EvmProofBytes github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=evm_proof_bytes,json=evmProofBytes,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"evm_proof_bytes,omitempty"` } func (m *SingleProofResponse) Reset() { *m = SingleProofResponse{} } @@ -376,7 +376,7 @@ func (m *SingleProofResponse) GetProof() SingleProof { return SingleProof{} } -func (m *SingleProofResponse) GetEvmProofBytes() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *SingleProofResponse) GetEvmProofBytes() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.EvmProofBytes } @@ -385,8 +385,8 @@ func (m *SingleProofResponse) GetEvmProofBytes() github_com_tendermint_tendermin // MultiProofResponse is the data structure for response of multi proof type MultiProofResponse struct { - Proof MultiProof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof"` - EvmProofBytes github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=evm_proof_bytes,json=evmProofBytes,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"evm_proof_bytes,omitempty"` + Proof MultiProof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof"` + EvmProofBytes github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=evm_proof_bytes,json=evmProofBytes,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"evm_proof_bytes,omitempty"` } func (m *MultiProofResponse) Reset() { *m = MultiProofResponse{} } @@ -429,7 +429,7 @@ func (m *MultiProofResponse) GetProof() MultiProof { return MultiProof{} } -func (m *MultiProofResponse) GetEvmProofBytes() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *MultiProofResponse) GetEvmProofBytes() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.EvmProofBytes } @@ -438,8 +438,8 @@ func (m *MultiProofResponse) GetEvmProofBytes() github_com_tendermint_tendermint // CountProofResponse is the data structure for response of count proof type CountProofResponse struct { - Proof CountProof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof"` - EvmProofBytes github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=evm_proof_bytes,json=evmProofBytes,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"evm_proof_bytes,omitempty"` + Proof CountProof `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof"` + EvmProofBytes github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=evm_proof_bytes,json=evmProofBytes,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"evm_proof_bytes,omitempty"` } func (m *CountProofResponse) Reset() { *m = CountProofResponse{} } @@ -482,7 +482,7 @@ func (m *CountProofResponse) GetProof() CountProof { return CountProof{} } -func (m *CountProofResponse) GetEvmProofBytes() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *CountProofResponse) GetEvmProofBytes() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.EvmProofBytes } @@ -735,11 +735,11 @@ func (m *OracleDataProof) GetMerklePaths() []IAVLMerklePath { // IAVLMerklePath represents a Merkle step to a leaf data node in an iAVL tree. type IAVLMerklePath struct { - IsDataOnRight bool `protobuf:"varint,1,opt,name=is_data_on_right,json=isDataOnRight,proto3" json:"is_data_on_right,omitempty"` - SubtreeHeight uint32 `protobuf:"varint,2,opt,name=subtree_height,json=subtreeHeight,proto3" json:"subtree_height,omitempty"` - SubtreeSize uint64 `protobuf:"varint,3,opt,name=subtree_size,json=subtreeSize,proto3" json:"subtree_size,omitempty"` - SubtreeVersion uint64 `protobuf:"varint,4,opt,name=subtree_version,json=subtreeVersion,proto3" json:"subtree_version,omitempty"` - SiblingHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,5,opt,name=sibling_hash,json=siblingHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"sibling_hash,omitempty"` + IsDataOnRight bool `protobuf:"varint,1,opt,name=is_data_on_right,json=isDataOnRight,proto3" json:"is_data_on_right,omitempty"` + SubtreeHeight uint32 `protobuf:"varint,2,opt,name=subtree_height,json=subtreeHeight,proto3" json:"subtree_height,omitempty"` + SubtreeSize uint64 `protobuf:"varint,3,opt,name=subtree_size,json=subtreeSize,proto3" json:"subtree_size,omitempty"` + SubtreeVersion uint64 `protobuf:"varint,4,opt,name=subtree_version,json=subtreeVersion,proto3" json:"subtree_version,omitempty"` + SiblingHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,5,opt,name=sibling_hash,json=siblingHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"sibling_hash,omitempty"` } func (m *IAVLMerklePath) Reset() { *m = IAVLMerklePath{} } @@ -803,7 +803,7 @@ func (m *IAVLMerklePath) GetSubtreeVersion() uint64 { return 0 } -func (m *IAVLMerklePath) GetSiblingHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *IAVLMerklePath) GetSiblingHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.SiblingHash } @@ -902,12 +902,12 @@ func (m *BlockRelayProof) GetSignatures() []TMSignature { // root hash, since we only want to validate the correctness of [D] In fact, only // [C], [N7], [N10], [N12], and [N16] are needed in order to compute [AppHash]. type MultiStoreProof struct { - OracleIAVLStateHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=oracle_iavl_state_hash,json=oracleIavlStateHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"oracle_iavl_state_hash,omitempty"` - MintStoreMerkleHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=mint_store_merkle_hash,json=mintStoreMerkleHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"mint_store_merkle_hash,omitempty"` - ParamsToSlashingStoresMerkleHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,3,opt,name=params_to_slashing_stores_merkle_hash,json=paramsToSlashingStoresMerkleHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"params_to_slashing_stores_merkle_hash,omitempty"` - GovToIcahostStoresMerkleHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,4,opt,name=gov_to_icahost_stores_merkle_hash,json=govToIcahostStoresMerkleHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"gov_to_icahost_stores_merkle_hash,omitempty"` - AuthToFeegrantStoresMerkleHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,5,opt,name=auth_to_feegrant_stores_merkle_hash,json=authToFeegrantStoresMerkleHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"auth_to_feegrant_stores_merkle_hash,omitempty"` - StakingToUpgradeStoresMerkleHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,6,opt,name=staking_to_upgrade_stores_merkle_hash,json=stakingToUpgradeStoresMerkleHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"staking_to_upgrade_stores_merkle_hash,omitempty"` + OracleIAVLStateHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=oracle_iavl_state_hash,json=oracleIavlStateHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"oracle_iavl_state_hash,omitempty"` + MintStoreMerkleHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=mint_store_merkle_hash,json=mintStoreMerkleHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"mint_store_merkle_hash,omitempty"` + ParamsToSlashingStoresMerkleHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,3,opt,name=params_to_slashing_stores_merkle_hash,json=paramsToSlashingStoresMerkleHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"params_to_slashing_stores_merkle_hash,omitempty"` + GovToIcahostStoresMerkleHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,4,opt,name=gov_to_icahost_stores_merkle_hash,json=govToIcahostStoresMerkleHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"gov_to_icahost_stores_merkle_hash,omitempty"` + AuthToFeegrantStoresMerkleHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,5,opt,name=auth_to_feegrant_stores_merkle_hash,json=authToFeegrantStoresMerkleHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"auth_to_feegrant_stores_merkle_hash,omitempty"` + StakingToUpgradeStoresMerkleHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,6,opt,name=staking_to_upgrade_stores_merkle_hash,json=stakingToUpgradeStoresMerkleHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"staking_to_upgrade_stores_merkle_hash,omitempty"` } func (m *MultiStoreProof) Reset() { *m = MultiStoreProof{} } @@ -943,42 +943,42 @@ func (m *MultiStoreProof) XXX_DiscardUnknown() { var xxx_messageInfo_MultiStoreProof proto.InternalMessageInfo -func (m *MultiStoreProof) GetOracleIAVLStateHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *MultiStoreProof) GetOracleIAVLStateHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.OracleIAVLStateHash } return nil } -func (m *MultiStoreProof) GetMintStoreMerkleHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *MultiStoreProof) GetMintStoreMerkleHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.MintStoreMerkleHash } return nil } -func (m *MultiStoreProof) GetParamsToSlashingStoresMerkleHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *MultiStoreProof) GetParamsToSlashingStoresMerkleHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.ParamsToSlashingStoresMerkleHash } return nil } -func (m *MultiStoreProof) GetGovToIcahostStoresMerkleHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *MultiStoreProof) GetGovToIcahostStoresMerkleHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.GovToIcahostStoresMerkleHash } return nil } -func (m *MultiStoreProof) GetAuthToFeegrantStoresMerkleHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *MultiStoreProof) GetAuthToFeegrantStoresMerkleHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.AuthToFeegrantStoresMerkleHash } return nil } -func (m *MultiStoreProof) GetStakingToUpgradeStoresMerkleHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *MultiStoreProof) GetStakingToUpgradeStoresMerkleHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.StakingToUpgradeStoresMerkleHash } @@ -1012,14 +1012,14 @@ func (m *MultiStoreProof) GetStakingToUpgradeStoresMerkleHash() github_com_tende // root hash, since we only want to validate the correctness of [2], [3], and [A]. In fact, only // [1A], [2B], [1E], [B], and [2D] are needed in order to compute [BlockHeader]. type BlockHeaderMerkleParts struct { - VersionAndChainIdHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=version_and_chain_id_hash,json=versionAndChainIdHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"version_and_chain_id_hash,omitempty"` - Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` - TimeSecond uint64 `protobuf:"varint,3,opt,name=time_second,json=timeSecond,proto3" json:"time_second,omitempty"` - TimeNanoSecond uint32 `protobuf:"varint,4,opt,name=time_nano_second,json=timeNanoSecond,proto3" json:"time_nano_second,omitempty"` - LastBlockIdAndOther github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,5,opt,name=last_block_id_and_other,json=lastBlockIdAndOther,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"last_block_id_and_other,omitempty"` - NextValidatorHashAndConsensusHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,6,opt,name=next_validator_hash_and_consensus_hash,json=nextValidatorHashAndConsensusHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"next_validator_hash_and_consensus_hash,omitempty"` - LastResultsHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,7,opt,name=last_results_hash,json=lastResultsHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"last_results_hash,omitempty"` - EvidenceAndProposerHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,8,opt,name=evidence_and_proposer_hash,json=evidenceAndProposerHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"evidence_and_proposer_hash,omitempty"` + VersionAndChainIdHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=version_and_chain_id_hash,json=versionAndChainIdHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"version_and_chain_id_hash,omitempty"` + Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` + TimeSecond uint64 `protobuf:"varint,3,opt,name=time_second,json=timeSecond,proto3" json:"time_second,omitempty"` + TimeNanoSecond uint32 `protobuf:"varint,4,opt,name=time_nano_second,json=timeNanoSecond,proto3" json:"time_nano_second,omitempty"` + LastBlockIdAndOther github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,5,opt,name=last_block_id_and_other,json=lastBlockIdAndOther,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"last_block_id_and_other,omitempty"` + NextValidatorHashAndConsensusHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,6,opt,name=next_validator_hash_and_consensus_hash,json=nextValidatorHashAndConsensusHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"next_validator_hash_and_consensus_hash,omitempty"` + LastResultsHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,7,opt,name=last_results_hash,json=lastResultsHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"last_results_hash,omitempty"` + EvidenceAndProposerHash github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,8,opt,name=evidence_and_proposer_hash,json=evidenceAndProposerHash,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"evidence_and_proposer_hash,omitempty"` } func (m *BlockHeaderMerkleParts) Reset() { *m = BlockHeaderMerkleParts{} } @@ -1055,7 +1055,7 @@ func (m *BlockHeaderMerkleParts) XXX_DiscardUnknown() { var xxx_messageInfo_BlockHeaderMerkleParts proto.InternalMessageInfo -func (m *BlockHeaderMerkleParts) GetVersionAndChainIdHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *BlockHeaderMerkleParts) GetVersionAndChainIdHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.VersionAndChainIdHash } @@ -1083,28 +1083,28 @@ func (m *BlockHeaderMerkleParts) GetTimeNanoSecond() uint32 { return 0 } -func (m *BlockHeaderMerkleParts) GetLastBlockIdAndOther() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *BlockHeaderMerkleParts) GetLastBlockIdAndOther() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.LastBlockIdAndOther } return nil } -func (m *BlockHeaderMerkleParts) GetNextValidatorHashAndConsensusHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *BlockHeaderMerkleParts) GetNextValidatorHashAndConsensusHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.NextValidatorHashAndConsensusHash } return nil } -func (m *BlockHeaderMerkleParts) GetLastResultsHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *BlockHeaderMerkleParts) GetLastResultsHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.LastResultsHash } return nil } -func (m *BlockHeaderMerkleParts) GetEvidenceAndProposerHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *BlockHeaderMerkleParts) GetEvidenceAndProposerHash() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.EvidenceAndProposerHash } @@ -1113,8 +1113,8 @@ func (m *BlockHeaderMerkleParts) GetEvidenceAndProposerHash() github_com_tenderm // CommonEncodedVotePart represents the common part of encoded vote type CommonEncodedVotePart struct { - SignedDataPrefix github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=signed_data_prefix,json=signedDataPrefix,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"signed_data_prefix,omitempty"` - SignedDataSuffix github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=signed_data_suffix,json=signedDataSuffix,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"signed_data_suffix,omitempty"` + SignedDataPrefix github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=signed_data_prefix,json=signedDataPrefix,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"signed_data_prefix,omitempty"` + SignedDataSuffix github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=signed_data_suffix,json=signedDataSuffix,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"signed_data_suffix,omitempty"` } func (m *CommonEncodedVotePart) Reset() { *m = CommonEncodedVotePart{} } @@ -1150,14 +1150,14 @@ func (m *CommonEncodedVotePart) XXX_DiscardUnknown() { var xxx_messageInfo_CommonEncodedVotePart proto.InternalMessageInfo -func (m *CommonEncodedVotePart) GetSignedDataPrefix() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *CommonEncodedVotePart) GetSignedDataPrefix() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.SignedDataPrefix } return nil } -func (m *CommonEncodedVotePart) GetSignedDataSuffix() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *CommonEncodedVotePart) GetSignedDataSuffix() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.SignedDataSuffix } @@ -1170,10 +1170,10 @@ func (m *CommonEncodedVotePart) GetSignedDataSuffix() github_com_tendermint_tend // and appended to the block hash. The prepended part (prefix) and the appended part (suffix) are // different for each signer (including signature size, machine clock, validator index, etc). type TMSignature struct { - R github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=r,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"r,omitempty"` - S github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=s,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"s,omitempty"` - V uint32 `protobuf:"varint,3,opt,name=v,proto3" json:"v,omitempty"` - EncodedTimestamp github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,4,opt,name=encoded_timestamp,json=encodedTimestamp,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"encoded_timestamp,omitempty"` + R github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=r,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"r,omitempty"` + S github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,2,opt,name=s,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"s,omitempty"` + V uint32 `protobuf:"varint,3,opt,name=v,proto3" json:"v,omitempty"` + EncodedTimestamp github_com_cometbft_cometbft_libs_bytes.HexBytes `protobuf:"bytes,4,opt,name=encoded_timestamp,json=encodedTimestamp,proto3,casttype=github.com/cometbft/cometbft/libs/bytes.HexBytes" json:"encoded_timestamp,omitempty"` } func (m *TMSignature) Reset() { *m = TMSignature{} } @@ -1209,14 +1209,14 @@ func (m *TMSignature) XXX_DiscardUnknown() { var xxx_messageInfo_TMSignature proto.InternalMessageInfo -func (m *TMSignature) GetR() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *TMSignature) GetR() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.R } return nil } -func (m *TMSignature) GetS() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *TMSignature) GetS() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.S } @@ -1230,7 +1230,7 @@ func (m *TMSignature) GetV() uint32 { return 0 } -func (m *TMSignature) GetEncodedTimestamp() github_com_tendermint_tendermint_libs_bytes.HexBytes { +func (m *TMSignature) GetEncodedTimestamp() github_com_cometbft_cometbft_libs_bytes.HexBytes { if m != nil { return m.EncodedTimestamp } @@ -1324,105 +1324,105 @@ func init() { func init() { proto.RegisterFile("bandchain/v1/oracle/proof.proto", fileDescriptor_ae72765f9c902173) } var fileDescriptor_ae72765f9c902173 = []byte{ - // 1562 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6e, 0x1b, 0x47, - 0x12, 0xd6, 0x88, 0x94, 0xec, 0x2d, 0x4a, 0x96, 0xd4, 0xb2, 0x25, 0x5a, 0xb0, 0x49, 0x89, 0xfe, - 0x91, 0xbc, 0x5e, 0x90, 0x90, 0xbc, 0x87, 0x35, 0x76, 0x2f, 0x92, 0xd7, 0x82, 0xb4, 0xb0, 0x2d, - 0x2f, 0xa9, 0xd5, 0x61, 0x73, 0x98, 0x34, 0x67, 0x5a, 0xe4, 0xc0, 0xc3, 0x6e, 0x66, 0xba, 0x39, - 0x90, 0x1d, 0x04, 0x41, 0x82, 0xe4, 0xe0, 0xe4, 0x92, 0x38, 0x6f, 0x91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e, 0xd3, 0xf2, 0x81, 0x05, 0x4b, 0x35, - 0x16, 0x4a, 0x21, 0x9e, 0x83, 0xeb, 0x8c, 0x8b, 0x24, 0x1d, 0xe9, 0x21, 0x75, 0x9c, 0xab, 0xb1, - 0x70, 0x97, 0x6d, 0x6b, 0x82, 0x3e, 0x0d, 0x1f, 0x5b, 0x70, 0x01, 0xb7, 0x44, 0x5d, 0x8a, 0xd8, - 0x27, 0xa4, 0x16, 0x60, 0x9a, 0xa8, 0x62, 0xd8, 0xde, 0x90, 0x93, 0x24, 0xbb, 0x6c, 0xd3, 0x50, - 0xf4, 0xe9, 0x90, 0x79, 0xe1, 0x02, 0xdf, 0x93, 0xc9, 0x10, 0xcc, 0x6e, 0x35, 0x6b, 0x01, 0x76, - 0x49, 0x92, 0x92, 0xf1, 0x61, 0xf3, 0x62, 0x68, 0x76, 0xd9, 0xff, 0x34, 0x49, 0xaf, 0x96, 0xc2, - 0x77, 0x63, 0x30, 0x97, 0xdc, 0x19, 0x50, 0x00, 0x67, 0x4d, 0x4f, 0xb5, 0x31, 0x75, 0x6d, 0xb5, - 0x0a, 0x6d, 0xcf, 0x8d, 0x2f, 0x9b, 0x97, 0x57, 0x76, 0xc6, 0x40, 0xaf, 0x53, 0xf7, 0x86, 0x04, - 0xde, 0x76, 0xd5, 0xd4, 0x74, 0xdf, 0xda, 0xd2, 0xed, 0xfb, 0x42, 0x1e, 0x32, 0xc2, 0x6b, 0x10, - 0x9b, 0x13, 0x87, 0x51, 0xd7, 0xec, 0x04, 0x20, 0x87, 0x2a, 0x6a, 0x04, 0xad, 0xc0, 0xb4, 0x32, - 0xa0, 0x98, 0xb2, 0xc8, 0x2a, 0xad, 0x36, 0x95, 0x53, 0x72, 0xfc, 0x0e, 0xa6, 0xcc, 0x58, 0x52, - 0x98, 0xf7, 0x31, 0x17, 0xb6, 0xee, 0xa2, 0x9e, 0xab, 0x82, 0x63, 0xa2, 0x4e, 0x82, 0xa1, 0x13, - 0x3f, 0x2b, 0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f, 0x50, - 0x51, 0xaa, 0x05, 0x4d, 0xa7, 0x2b, 0x4f, 0xd5, 0x71, 0x65, 0x7b, 0xed, 0xf7, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x5b, 0xcf, 0xde, 0xaf, 0x79, 0x15, 0x00, 0x00, + // 1558 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6e, 0x1b, 0x47, + 0x16, 0x55, 0x8b, 0x94, 0xec, 0xb9, 0x94, 0x2c, 0xa9, 0x64, 0x4b, 0xb4, 0x60, 0x93, 0x12, 0xfd, + 0x90, 0x3c, 0x1e, 0x90, 0x23, 0x79, 0x36, 0xc6, 0xcc, 0x46, 0xf2, 0xd8, 0x90, 0x66, 0xfc, 0x1a, + 0x52, 0xa3, 0x00, 0x41, 0x80, 0x4e, 0xb1, 0xbb, 0x44, 0x76, 0xdc, 0xac, 0xa2, 0xbb, 0x8a, 0x0d, + 0xd9, 0x81, 0x91, 0x07, 0xe0, 0x04, 0xc9, 0x2a, 0x71, 0xfe, 0x22, 0x1b, 0x23, 0x9b, 0x7c, 0x83, + 0x97, 0x06, 0xb2, 0x48, 0x80, 0x00, 0x8e, 0x21, 0x67, 0x95, 0x4f, 0xc8, 0x2a, 0xa8, 0x47, 0x93, + 0x4d, 0xb2, 0x19, 0xc9, 0xa6, 0xed, 0x15, 0xbb, 0x8b, 0xb7, 0xce, 0x39, 0xf7, 0x51, 0xb7, 0xab, + 0x0a, 0xf2, 0x55, 0x4c, 0x5d, 0xa7, 0x8e, 0x3d, 0x5a, 0x0a, 0x57, 0x4b, 0x2c, 0xc0, 0x8e, 0x4f, + 0x4a, 0xcd, 0x80, 0xb1, 0xdd, 0x62, 0x33, 0x60, 0x82, 0xa1, 0xd9, 0xb6, 0x41, 0x31, 0x5c, 0x2d, + 0x6a, 0x83, 0x85, 0x53, 0x35, 0xc6, 0x6a, 0x3e,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, 0x46, 0x4d, 0xde, 0x96, 0x60, 0x22, 0x32, + 0xe3, 0xde, 0x7d, 0xa2, 0x42, 0x9c, 0x2e, 0x67, 0xcc, 0x58, 0xc5, 0xbb, 0x4f, 0xd0, 0x32, 0x4c, + 0x45, 0x26, 0x91, 0xd7, 0x69, 0x65, 0x15, 0x11, 0xec, 0x18, 0xe7, 0xdf, 0x81, 0x09, 0xee, 0x55, + 0x7d, 0x8f, 0xd6, 0xec, 0x3a, 0xe6, 0xf5, 0xec, 0xd8, 0x10, 0x0d, 0x26, 0x63, 0x90, 0x36, 0x31, + 0xaf, 0x17, 0xbe, 0x4c, 0xc1, 0x54, 0x4f, 0x7e, 0x65, 0x81, 0xe8, 0x15, 0xc5, 0x05, 0x0b, 0x88, + 0x1d, 0xef, 0x8c, 0x67, 0x07, 0xf7, 0xf2, 0x8a, 0x34, 0xee, 0x2a, 0x90, 0x46, 0xf7, 0x30, 0xf2, + 0xe1, 0x64, 0x54, 0xeb, 0xd8, 0x25, 0x81, 0xdd, 0x4e, 0x67, 0x20, 0xb8, 0x29, 0xeb, 0x8b, 0x83, + 0x0b, 0x70, 0x53, 0x4d, 0x8a, 0xf2, 0x15, 0x08, 0x6e, 0x68, 0xe6, 0xaa, 0x89, 0xff, 0x22, 0x0f, + 0xb2, 0x0e, 0x6b, 0x34, 0x18, 0xb5, 0x09, 0x75, 0x98, 0x4b, 0x5c, 0x3b, 0x64, 0x42, 0xb3, 0x99, + 0x6a, 0xff, 0xeb, 0x80, 0x36, 0x2f, 0x27, 0x5d, 0xd5, 0x73, 0x76, 0x98, 0x50, 0x70, 0x86, 0xeb, + 0x84, 0x93, 0xf4, 0x27, 0xba, 0x06, 0xc0, 0xbd, 0x1a, 0xc5, 0xa2, 0x15, 0x10, 0x9e, 0x4d, 0xab, + 0xc2, 0x4c, 0xfe, 0x50, 0x6f, 0xdf, 0xa8, 0x44, 0x86, 0xd1, 0xca, 0xec, 0xcc, 0x2c, 0x3c, 0x1a, + 0x87, 0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, 0x7f, 0x4d, 0xd0, 0xab, 0xa3, 0xf0, 0xfd, 0x18, 0xcc, + 0x25, 0x37, 0x00, 0x44, 0xe1, 0xa4, 0x69, 0x9b, 0x36, 0xa6, 0xae, 0xad, 0x16, 0x9b, 0xed, 0xb9, + 0xf1, 0xd5, 0xf1, 0x6a, 0xaa, 0x4e, 0x18, 0xd8, 0x75, 0xea, 0x5e, 0x91, 0xa0, 0x5b, 0xae, 0x0a, + 0x49, 0xf7, 0x41, 0x2c, 0xdd, 0x3e, 0x02, 0xe4, 0x21, 0x23, 0xbc, 0x06, 0xb1, 0x39, 0x71, 0x18, + 0x75, 0x4d, 0xa3, 0x07, 0x39, 0x54, 0x51, 0x23, 0x68, 0x05, 0xa6, 0x95, 0x01, 0xc5, 0x94, 0x45, + 0x56, 0x69, 0xf5, 0xcd, 0x38, 0x26, 0xc7, 0x6f, 0x62, 0xca, 0x8c, 0xe5, 0x07, 0x30, 0xef, 0x63, + 0x2e, 0x6c, 0xdd, 0x28, 0x3d, 0x57, 0x39, 0xc6, 0x44, 0x9d, 0x04, 0x43, 0x25, 0x7b, 0x56, 0x82, + 0xaa, 0x28, 0x6e, 0xb9, 0xeb, 0xd4, 0xbd, 0x25, 0x01, 0xd1, 0xe7, 0x16, 0x9c, 0xa7, 0x64, 0x4f, + 0xd8, 0x21, 0xf6, 0x3d, 0x17, 0x0b, 0x16, 0xa8, 0xc8, 0xe9, 0x58, 0xca, 0x7d, 0x31, 0xe5, 0x2d, + 0x3e, 0x7c, 0x8a, 0x97, 0x24, 0xc7, 0x4e, 0x44, 0x21, 0x03, 0x29, 0xc3, 0x1a, 0xe1, 0xab, 0xc0, + 0xbe, 0x0f, 0x33, 0xca, 0x6b, 0xbd, 0x09, 0x30, 0x9c, 0x47, 0x86, 0xe0, 0x9c, 0x92, 0x70, 0x7a, + 0x83, 0xa1, 0x19, 0xee, 0xc2, 0x02, 0x09, 0x3d, 0x97, 0x50, 0x87, 0x28, 0xff, 0x9a, 0x01, 0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xf7, 0x71, 0xef, 0xe2, 0x60, 0xa2, 0xbe, 0x2b, 0xa6, 0x85, 0xbf, 0x1d, + 0xce, 0xd8, 0x48, 0x5b, 0x51, 0xd2, 0x0a, 0x68, 0x31, 0x51, 0x5a, 0xec, 0xd4, 0x88, 0x1e, 0x5b, + 0x30, 0xd3, 0x77, 0xf5, 0x83, 0xd6, 0x06, 0xb3, 0x0d, 0xba, 0x48, 0x5a, 0xb8, 0xf4, 0x52, 0x73, + 0x8c, 0xd0, 0x55, 0x25, 0xf4, 0x22, 0xba, 0x90, 0x28, 0xd4, 0x04, 0x8f, 0xdb, 0xb1, 0x63, 0xe0, + 0x46, 0xe5, 0xc9, 0x7e, 0xce, 0x7a, 0xba, 0x9f, 0xb3, 0x9e, 0xef, 0xe7, 0xac, 0xaf, 0x5e, 0xe4, + 0x46, 0x9e, 0xbe, 0xc8, 0x8d, 0xfc, 0xf4, 0x22, 0x37, 0xf2, 0xee, 0xe5, 0x58, 0x41, 0x4b, 0x38, + 0x75, 0xf1, 0xe8, 0x30, 0xbf, 0x64, 0x70, 0xd7, 0x4a, 0x8e, 0xef, 0x11, 0x2a, 0x4a, 0xb5, 0xa0, + 0xe9, 0x74, 0xe5, 0xa9, 0x3a, 0xae, 0x6c, 0x2f, 0xfd, 0x11, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xab, + 0x58, 0x02, 0x28, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/client/grpc/oracle/proof/proof.pb.gw.go b/client/grpc/oracle/proof/proof.pb.gw.go index d5e4f0ac1..226603125 100644 --- a/client/grpc/oracle/proof/proof.pb.gw.go +++ b/client/grpc/oracle/proof/proof.pb.gw.go @@ -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_Service_Proof_0 = &utilities.DoubleArray{Encoding: map[string]int{"request_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} @@ -160,12 +162,14 @@ func local_request_Service_RequestCountProof_0(ctx context.Context, marshaler ru // RegisterServiceHandlerServer registers the http handlers for service Service to "mux". // UnaryRPC :call ServiceServer 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 RegisterServiceHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { mux.Handle("GET", pattern_Service_Proof_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 { @@ -173,6 +177,7 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_Proof_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) @@ -186,6 +191,8 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_MultiProof_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 { @@ -193,6 +200,7 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_MultiProof_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) @@ -206,6 +214,8 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se mux.Handle("GET", pattern_Service_RequestCountProof_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 { @@ -213,6 +223,7 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se return } resp, md, err := local_request_Service_RequestCountProof_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) @@ -328,11 +339,11 @@ func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } var ( - pattern_Service_Proof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"bandchain", "v1", "oracle", "proof", "request_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Service_Proof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"bandchain", "v1", "oracle", "proof", "request_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Service_MultiProof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bandchain", "v1", "oracle", "multi_proof"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Service_MultiProof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bandchain", "v1", "oracle", "multi_proof"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Service_RequestCountProof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bandchain", "v1", "oracle", "requests_count_proof"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Service_RequestCountProof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"bandchain", "v1", "oracle", "requests_count_proof"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/client/grpc/oracle/proof/proof_test.go b/client/grpc/oracle/proof/proof_test.go index 9fe880274..e90c7e4df 100644 --- a/client/grpc/oracle/proof/proof_test.go +++ b/client/grpc/oracle/proof/proof_test.go @@ -5,8 +5,8 @@ import ( "testing" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" + "github.com/cometbft/cometbft/crypto/tmhash" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto/tmhash" ) func hexToBytes(hexstr string) []byte { diff --git a/client/grpc/oracle/proof/service.go b/client/grpc/oracle/proof/service.go index 0d582782a..be358d363 100644 --- a/client/grpc/oracle/proof/service.go +++ b/client/grpc/oracle/proof/service.go @@ -8,11 +8,11 @@ import ( "github.com/bandprotocol/chain/v2/x/oracle/types" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" + rpcclient "github.com/cometbft/cometbft/rpc/client" "github.com/cosmos/cosmos-sdk/client" "github.com/ethereum/go-ethereum/accounts/abi" gogogrpc "github.com/gogo/protobuf/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" - rpcclient "github.com/tendermint/tendermint/rpc/client" ) // RegisterProofService registers the node gRPC service on the provided gRPC router. diff --git a/client/grpc/oracle/proof/signature.go b/client/grpc/oracle/proof/signature.go index a0c72b89e..32d925283 100644 --- a/client/grpc/oracle/proof/signature.go +++ b/client/grpc/oracle/proof/signature.go @@ -4,13 +4,13 @@ import ( "fmt" "sort" + "github.com/cometbft/cometbft/crypto/secp256k1" + "github.com/cometbft/cometbft/crypto/tmhash" + "github.com/cometbft/cometbft/libs/protoio" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cometbft/cometbft/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/tendermint/tendermint/crypto/tmhash" - "github.com/tendermint/tendermint/libs/protoio" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/types" ) // TMSignatureEthereum is an Ethereum version of TMSignature for solidity ABI-encoding. diff --git a/client/grpc/oracle/proof/signature_test.go b/client/grpc/oracle/proof/signature_test.go index c30108266..60785fd55 100644 --- a/client/grpc/oracle/proof/signature_test.go +++ b/client/grpc/oracle/proof/signature_test.go @@ -4,12 +4,12 @@ import ( "encoding/hex" "testing" + "github.com/cometbft/cometbft/crypto/tmhash" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cometbft/cometbft/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto/tmhash" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/tendermint/tendermint/types" ) func TestGetPrefix(t *testing.T) { diff --git a/client/grpc/oracle/proof/util.go b/client/grpc/oracle/proof/util.go index 165f170bd..1e54da8e5 100644 --- a/client/grpc/oracle/proof/util.go +++ b/client/grpc/oracle/proof/util.go @@ -7,11 +7,11 @@ import ( "reflect" "time" + tmbytes "github.com/cometbft/cometbft/libs/bytes" gogotypes "github.com/gogo/protobuf/types" - tmbytes "github.com/tendermint/tendermint/libs/bytes" ) -// Copied from https://github.com/tendermint/tendermint/blob/master/types/encoding_helper.go +// Copied from https://github.com/cometbft/cometbft/blob/master/types/encoding_helper.go func cdcEncode(item interface{}) []byte { if item != nil && !isTypedNil(item) && !isEmpty(item) { switch item := item.(type) { diff --git a/cmd/bandd/cmd/gends.go b/cmd/bandd/cmd/gends.go index 120ba4a5e..05254b836 100644 --- a/cmd/bandd/cmd/gends.go +++ b/cmd/bandd/cmd/gends.go @@ -6,13 +6,13 @@ import ( "io/ioutil" "path/filepath" + "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/cobra" - "github.com/tendermint/tendermint/libs/cli" "github.com/bandprotocol/chain/v2/pkg/filecache" diff --git a/cmd/bandd/cmd/genos.go b/cmd/bandd/cmd/genos.go index 312d87269..ca8a4b480 100644 --- a/cmd/bandd/cmd/genos.go +++ b/cmd/bandd/cmd/genos.go @@ -6,13 +6,13 @@ import ( "io/ioutil" "path/filepath" + "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/cobra" - "github.com/tendermint/tendermint/libs/cli" "github.com/bandprotocol/chain/v2/pkg/filecache" "github.com/bandprotocol/go-owasm/api" diff --git a/cmd/bandd/cmd/init.go b/cmd/bandd/cmd/init.go index 2e90fe35a..047f2fc74 100644 --- a/cmd/bandd/cmd/init.go +++ b/cmd/bandd/cmd/init.go @@ -9,6 +9,13 @@ import ( "path/filepath" "time" + cfg "github.com/cometbft/cometbft/config" + "github.com/cometbft/cometbft/crypto/secp256k1" + "github.com/cometbft/cometbft/libs/cli" + tmos "github.com/cometbft/cometbft/libs/os" + tmrand "github.com/cometbft/cometbft/libs/rand" + "github.com/cometbft/cometbft/privval" + "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/input" @@ -17,13 +24,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" "github.com/cosmos/go-bip39" "github.com/spf13/cobra" - cfg "github.com/tendermint/tendermint/config" - "github.com/tendermint/tendermint/crypto/secp256k1" - "github.com/tendermint/tendermint/libs/cli" - tmos "github.com/tendermint/tendermint/libs/os" - tmrand "github.com/tendermint/tendermint/libs/rand" - "github.com/tendermint/tendermint/privval" - "github.com/tendermint/tendermint/types" ) const ( @@ -176,7 +176,8 @@ func InitCmd(customAppState map[string]json.RawMessage, defaultNodeHome string) genDoc.ConsensusParams.Block.MaxBytes = 3000000 // 3M bytes genDoc.ConsensusParams.Block.MaxGas = 50000000 // 50M gas - genDoc.ConsensusParams.Block.TimeIotaMs = 1000 // 1 second + // 0.47 TODO: it is removed https://github.com/cometbft/cometbft/blob/1e0cf136d395db94728883355a136e4e34e693db/CHANGELOG.md?plain=1#L144 + // genDoc.ConsensusParams.Block.TimeIotaMs = 1000 // 1 second genDoc.ConsensusParams.Validator.PubKeyTypes = []string{types.ABCIPubKeyTypeSecp256k1} if err = genutil.ExportGenesisFile(genDoc, genFile); err != nil { return err diff --git a/cmd/bandd/cmd/root.go b/cmd/bandd/cmd/root.go index 9328dc105..a9aef9fd4 100644 --- a/cmd/bandd/cmd/root.go +++ b/cmd/bandd/cmd/root.go @@ -5,6 +5,10 @@ import ( "io" "os" + 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/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" @@ -17,15 +21,10 @@ import ( authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" "github.com/cosmos/cosmos-sdk/x/auth/types" vestingcli "github.com/cosmos/cosmos-sdk/x/auth/vesting/client/cli" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "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" band "github.com/bandprotocol/chain/v2/app" "github.com/bandprotocol/chain/v2/app/params" @@ -46,7 +45,6 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). WithHomeDir(band.DefaultNodeHome). WithViper("BAND") @@ -84,17 +82,12 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { rootCmd.AddCommand( InitCmd(band.NewDefaultGenesisState(), band.DefaultNodeHome), - genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, band.DefaultNodeHome), - genutilcli.GenTxCmd( - band.ModuleBasics, - encodingConfig.TxConfig, - banktypes.GenesisBalancesIterator{}, - band.DefaultNodeHome, + // 0.47 TODO: check validity of this function + genesisCommand( + encodingConfig, + AddGenesisDataSourceCmd(band.DefaultNodeHome), + AddGenesisOracleScriptCmd(band.DefaultNodeHome), ), - genutilcli.ValidateGenesisCmd(band.ModuleBasics), - AddGenesisAccountCmd(band.DefaultNodeHome), - AddGenesisDataSourceCmd(band.DefaultNodeHome), - AddGenesisOracleScriptCmd(band.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), // testnetCmd(band.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), @@ -114,11 +107,22 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { keys.Commands(band.DefaultNodeHome), ) } + func addModuleInitFlags(startCmd *cobra.Command) { crisis.AddModuleInitFlags(startCmd) startCmd.Flags().Uint32(flagWithOwasmCacheSize, 100, "[Experimental] Number of oracle scripts to cache") } +// genesisCommand builds genesis-related `bandd 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, band.ModuleBasics, band.DefaultNodeHome) + + for _, subCmd := range cmds { + cmd.AddCommand(subCmd) + } + return cmd +} + func queryCommand() *cobra.Command { cmd := &cobra.Command{ Use: "query", @@ -203,9 +207,10 @@ func (ac appCreator) newApp( return bandApp } +// 0.47 TODO: check if we need to update this function func (ac appCreator) appExport( logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, - appOpts servertypes.AppOptions) (servertypes.ExportedApp, error) { + appOpts servertypes.AppOptions, modulesToExport []string) (servertypes.ExportedApp, error) { homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { return servertypes.ExportedApp{}, errors.New("application home not set") diff --git a/cmd/bandevmbot/main.go b/cmd/bandevmbot/main.go index 81c3d2d21..ea8ea674c 100644 --- a/cmd/bandevmbot/main.go +++ b/cmd/bandevmbot/main.go @@ -16,9 +16,9 @@ package main // crypto "github.com/ethereum/go-ethereum/crypto" // "github.com/ethereum/go-ethereum/ethclient" // "github.com/spf13/cobra" -// "github.com/tendermint/tendermint/crypto/secp256k1" -// "github.com/tendermint/tendermint/libs/log" -// rpchttp "github.com/tendermint/tendermint/rpc/client/http" +// "github.com/cometbft/cometbft/crypto/secp256k1" +// "github.com/cometbft/cometbft/libs/log" +// rpchttp "github.com/cometbft/cometbft/rpc/client/http" // ) // var ( diff --git a/go.mod b/go.mod index 6303ca125..1b6fb2a8f 100644 --- a/go.mod +++ b/go.mod @@ -4,13 +4,17 @@ go 1.19 require ( github.com/bandprotocol/go-owasm v0.2.3 + github.com/cometbft/cometbft v0.37.1 + github.com/cometbft/cometbft-db v0.7.0 github.com/confio/ics23/go v0.9.0 - github.com/cosmos/cosmos-sdk v0.46.12 + github.com/cosmos/cosmos-proto v1.0.0-beta.2 + github.com/cosmos/cosmos-sdk v0.47.2 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/ibc-go/v5 v5.2.1 + github.com/cosmos/gogoproto v1.4.8 + github.com/cosmos/ibc-go/v7 v7.0.1 github.com/ethereum/go-ethereum v1.10.22 github.com/gogo/protobuf v1.3.3 - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -23,75 +27,76 @@ require ( github.com/regen-network/cosmos-proto v0.3.1 github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.6.1 - github.com/spf13/viper v1.14.0 - github.com/stretchr/testify v1.8.1 - github.com/tendermint/tendermint v0.34.28 - github.com/tendermint/tm-db v0.6.7 - google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f - google.golang.org/grpc v1.52.0 - google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 + github.com/spf13/viper v1.15.0 + github.com/stretchr/testify v1.8.2 + google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 + google.golang.org/grpc v1.54.0 + google.golang.org/protobuf v1.30.0 gopkg.in/yaml.v2 v2.4.0 ) -require github.com/go-playground/validator/v10 v10.4.1 // indirect - require ( - cloud.google.com/go v0.107.0 // indirect - cloud.google.com/go/compute v1.15.1 // indirect + cloud.google.com/go v0.110.0 // indirect + cloud.google.com/go/compute v1.18.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.8.0 // indirect - cloud.google.com/go/storage v1.27.0 // indirect + cloud.google.com/go/iam v0.12.0 // indirect + cloud.google.com/go/storage v1.29.0 // indirect + 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/errors v1.0.0-beta.7 // indirect - cosmossdk.io/math v1.0.0-beta.3 // indirect - filippo.io/edwards25519 v1.0.0-rc.1 // indirect + cosmossdk.io/math v1.0.0 // indirect + cosmossdk.io/tools/rosetta v0.2.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 v1.0.0 // indirect - github.com/Workiva/go-datastructures v1.0.53 // indirect + github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.122 // 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.0 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // 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.2.0 // indirect - github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // 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/cometbft/cometbft-db v0.7.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-proto v1.0.0-alpha8 // indirect - github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.5 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v0.20.0 // indirect + github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab // indirect github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect - github.com/creachadair/taskgroup v0.3.2 // indirect + github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect + github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.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/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // 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-playground/universal-translator v0.18.0 // 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/gogo/googleapis v1.4.1 // indirect + github.com/golang/glog v1.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.0.0 // 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/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.7.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect @@ -100,76 +105,76 @@ 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.7.0 // 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/huandu/skiplist v1.2.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // 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/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.16.3 // indirect + github.com/leodido/go-urn v1.2.1 // 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/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mtibben/percent v0.2.1 // 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.6 // indirect + github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.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.40.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect - github.com/rs/cors v1.8.2 // indirect - github.com/rs/zerolog v1.27.0 // indirect + github.com/rs/cors v1.8.3 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/afero v1.9.3 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/subosito/gotenv v1.4.2 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.5.0 // indirect - github.com/ulikunitz/xz v0.5.10 // indirect + github.com/tidwall/btree v1.6.0 // indirect + github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.6 // indirect + go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.5.0 // indirect - golang.org/x/exp v0.0.0-20220916125017-b168a2c6b86b // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.4.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/crypto v0.7.0 // indirect + golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect + golang.org/x/net v0.9.0 // indirect + golang.org/x/oauth2 v0.5.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.7.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.103.0 // indirect + google.golang.org/api v0.110.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect + pgregory.net/rapid v0.5.5 // 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 - // use informal system fork of tendermint - github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.28 google.golang.org/grpc => google.golang.org/grpc v1.53.0 ) diff --git a/go.sum b/go.sum index ac75553f7..3b8c864e0 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,9 @@ cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+ 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.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww= cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +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/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= @@ -119,8 +120,9 @@ cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1 h1:7UGq3QknM33pw5xATlpzeoomNxsacIVvTqTTvbfajmE= cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -208,8 +210,9 @@ cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0 h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk= cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= +cloud.google.com/go/iam v0.12.0 h1:DRtTY29b75ciH6Ov1PHb4/iat2CLCvrOm40Q0a6DFpE= +cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= @@ -350,8 +353,9 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= 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/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= @@ -393,13 +397,22 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= 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.3 h1:TbZxSopz2LqjJ7aXYfn7nJSb8vNaBklW6BLpcei1qwM= -cosmossdk.io/math v1.0.0-beta.3/go.mod h1:3LYasri3Zna4XpbrTNdKsWmD5fHHkaNAod/mNT9XdE4= +cosmossdk.io/math v1.0.0 h1:ro9w7eKx23om2tZz/VM2Pf+z2WAbGX1yDQQOJ6iGeJw= +cosmossdk.io/math v1.0.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +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= @@ -412,8 +425,8 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= +github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= @@ -428,13 +441,12 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU 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= @@ -455,8 +467,9 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.44.122 h1:p6mw01WBaNpbdP2xrisz5tIkcNwzj/HysobNoaAHjgo= 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= @@ -475,8 +488,9 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= 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/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= @@ -518,16 +532,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/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= @@ -541,13 +557,14 @@ github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/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.34.28 h1:gwryf55P1SWMUP4nOXpRVI2D0yPoYEzN+IBqmRBOsDc= -github.com/cometbft/cometbft v0.34.28/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= +github.com/cometbft/cometbft v0.37.1 h1:KLxkQTK2hICXYq21U2hn1W5hOVYUdQgDQ1uB+90xPIg= +github.com/cometbft/cometbft v0.37.1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -561,32 +578,40 @@ 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/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-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= -github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= -github.com/cosmos/cosmos-sdk v0.46.12 h1:M3LAKjCDqseJUkSIAJD/PUGeMsRq1Jf0GX+MocHVjrM= -github.com/cosmos/cosmos-sdk v0.46.12/go.mod h1:bG4AkW9bqc8ycrryyKGQEl3YV9BY2wr6HggGq8kvcgM= +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.2 h1:9rSriCoiJD+4F+tEDobyM8V7HF5BtY5Ef4VYNig96s0= +github.com/cosmos/cosmos-sdk v0.47.2/go.mod h1:zYzgI8w8hhotXTSoGbbSOAKfpJTx4wOy4XgbaKhtRtc= 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/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.1 h1:i8Kl9KZfPJVYuihjbGPnjTQWecXQfRLz+QrjJGhzY9o= -github.com/cosmos/ibc-go/v5 v5.2.1/go.mod h1:eH18ghfqGGT9gDCTMDLWg1zPLXplSnPxXRNWPx98xhU= +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.8 h1:BrHKc6WFZt8+jRV71vKSQE+JrfF+JAnzrKo2VP7wIZ4= +github.com/cosmos/gogoproto v1.4.8/go.mod h1:hnb0DIEWTv+wdNzNcqus5xCQXq5+CXauq1FJuurRfVY= +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.0.1 h1:NIBNRWjlOoFvFQu1ZlgwkaSeHO5avf4C1YQiWegt8jw= +github.com/cosmos/ibc-go/v7 v7.0.1/go.mod h1:vEaapV6nuLPQlS+g8IKmxMo6auPi0i7HMv1PhViht/E= +github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= +github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= 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/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/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= @@ -610,8 +635,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= @@ -627,8 +652,9 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/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= @@ -660,6 +686,7 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= 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/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -669,7 +696,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.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= +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= @@ -681,48 +708,51 @@ 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-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= 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/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/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/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= 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.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/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= @@ -755,8 +785,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw 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.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 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= @@ -787,14 +818,14 @@ github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASu github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= 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= @@ -809,6 +840,7 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -823,8 +855,9 @@ 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.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 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= 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.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -857,7 +890,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= @@ -878,8 +910,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.7.0 h1:bzrYP+qu/gMrL1au7/aDvkoOVGUJpeKBgbqRHACAFDY= -github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +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= @@ -908,11 +940,15 @@ 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/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= 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/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= @@ -922,8 +958,9 @@ 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= @@ -956,7 +993,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.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= @@ -975,8 +1011,9 @@ github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/compress v1.10.3/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= @@ -986,7 +1023,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= @@ -997,13 +1034,14 @@ github.com/kyokomi/emoji v2.2.4+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2px 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/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/levigross/grequests v0.0.0-20190908174114-253788527a1a h1:DGFy/362j92vQRE3ThU1yqg9TuJS8YJOSbQuB7BP9cA= github.com/levigross/grequests v0.0.0-20190908174114-253788527a1a/go.mod h1:jVntzcUU+2BtVohZBQmSHWUmh8B55LCNfPhcNCIvvIg= 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= @@ -1012,8 +1050,8 @@ github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= 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= @@ -1024,17 +1062,14 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 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.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= 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= @@ -1042,8 +1077,8 @@ 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/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= @@ -1094,6 +1129,7 @@ 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/oasisprotocol/oasis-core/go v0.2202.7 h1:BAaqQMc474ctQeith+vkckPXi7Lpgag+9QI0QpUK60g= github.com/oasisprotocol/oasis-core/go v0.2202.7/go.mod h1:hKUgtuPPq371HokUQL5ashT5MZLZxK/VkWNKRLb9m+w= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -1105,12 +1141,17 @@ 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/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 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= 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.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= 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= @@ -1132,19 +1173,17 @@ 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.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= 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-20221215004737-a150e88a970d h1:htwtWgtQo8YS6JFWWi2DNgY0RwSGJ1ruMoxY6CUUclk= +github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/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= @@ -1164,8 +1203,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= @@ -1184,20 +1221,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.40.0 h1:Afz7EVRqGg2Mqqf4JuF9vdvp1pi220m55Pi9T2JnO4Q= +github.com/prometheus/common v0.40.0/go.mod h1:L65ZJPSmfn/UBWLQIHV7dBrKFidB/wPlF1y5TlSt9OE= 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/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= @@ -1206,6 +1239,7 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X 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/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= 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/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= @@ -1214,13 +1248,9 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.27.0 h1:1T7qCieN22GVc8S4Q2yuexzBb1EqjbgjSH9RohbMjKs= -github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= +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/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1250,8 +1280,9 @@ github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2 github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -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.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= +github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= 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= @@ -1267,8 +1298,8 @@ 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.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= +github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= 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= @@ -1286,32 +1317,31 @@ 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.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= 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/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= 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/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/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= 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= @@ -1320,8 +1350,9 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM 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.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= 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/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= @@ -1346,8 +1377,8 @@ github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp 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= @@ -1395,8 +1426,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.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.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= 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= @@ -1411,8 +1442,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-20220916125017-b168a2c6b86b h1:SCE/18RnFsLrjydh/R/s5EVvHoZprqEQUuoxK8q2Pc4= -golang.org/x/exp v0.0.0-20220916125017-b168a2c6b86b/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= 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= @@ -1440,8 +1471,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1491,8 +1522,8 @@ 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-20210525063256-abc453219eb5/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= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1512,8 +1543,8 @@ golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= 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= @@ -1540,8 +1571,9 @@ golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/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.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= 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= @@ -1610,11 +1642,11 @@ 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= @@ -1630,7 +1662,6 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/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= @@ -1641,15 +1672,15 @@ golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBc 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-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= @@ -1662,19 +1693,20 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.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.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= 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= @@ -1687,8 +1719,8 @@ 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.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.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= @@ -1745,10 +1777,10 @@ 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= @@ -1760,7 +1792,7 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= 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= @@ -1827,8 +1859,9 @@ google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.110.0 h1:l+rh0KYUooe9JGbGVx71tbFo4SMbMTXK3I3ia2QSEeU= +google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1913,6 +1946,7 @@ google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2 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-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= @@ -1956,8 +1990,9 @@ google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZV google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 h1:EfLuoKW5WfkgVdDy7dTK8qSbH37AX5mj/MFh+bGPz14= +google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1976,8 +2011,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.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.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= @@ -2013,7 +2048,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-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2024,7 +2061,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/proto/bandchain/v1/oracle/proof.proto b/proto/bandchain/v1/oracle/proof.proto index 3b5e32c73..5b666e2da 100644 --- a/proto/bandchain/v1/oracle/proof.proto +++ b/proto/bandchain/v1/oracle/proof.proto @@ -65,19 +65,19 @@ message QueryRequestCountProofResponse { // SingleProofResponse is the data structure for response of single proof message SingleProofResponse { SingleProof proof = 1 [(gogoproto.nullable) = false]; - bytes evm_proof_bytes = 2 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes evm_proof_bytes = 2 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; } // MultiProofResponse is the data structure for response of multi proof message MultiProofResponse { MultiProof proof = 1 [(gogoproto.nullable) = false]; - bytes evm_proof_bytes = 2 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes evm_proof_bytes = 2 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; } // CountProofResponse is the data structure for response of count proof message CountProofResponse { CountProof proof = 1 [(gogoproto.nullable) = false]; - bytes evm_proof_bytes = 2 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes evm_proof_bytes = 2 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; } // SingleProof contains block height, oracle data proof and block relay proof @@ -103,7 +103,7 @@ message CountProof { // OracleDataProof contains result, version and merkle paths message OracleDataProof { - oracle.v1.Result result = 1 [(gogoproto.nullable) = false]; + .oracle.v1.Result result = 1 [(gogoproto.nullable) = false]; uint64 version = 2; repeated IAVLMerklePath merkle_paths = 3 [(gogoproto.nullable) = false]; } @@ -114,7 +114,7 @@ message IAVLMerklePath { uint32 subtree_height = 2; uint64 subtree_size = 3; uint64 subtree_version = 4; - bytes sibling_hash = 5 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes sibling_hash = 5 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; } // BlockRelayProof contains multi store proof, block header merkle parts, common encoded part and signatures @@ -150,17 +150,17 @@ message BlockRelayProof { message MultiStoreProof { bytes oracle_iavl_state_hash = 1 [ (gogoproto.customname) = "OracleIAVLStateHash", - (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes" + (gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes" ]; - bytes mint_store_merkle_hash = 2 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes mint_store_merkle_hash = 2 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; bytes params_to_slashing_stores_merkle_hash = 3 - [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; bytes gov_to_icahost_stores_merkle_hash = 4 - [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; bytes auth_to_feegrant_stores_merkle_hash = 5 - [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; bytes staking_to_upgrade_stores_merkle_hash = 6 - [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; } // BlockHeaderMerkleParts stores a group of hashes using for computing Tendermint's block @@ -190,21 +190,21 @@ message MultiStoreProof { // root hash, since we only want to validate the correctness of [2], [3], and [A]. In fact, only // [1A], [2B], [1E], [B], and [2D] are needed in order to compute [BlockHeader]. message BlockHeaderMerkleParts { - bytes version_and_chain_id_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes version_and_chain_id_hash = 1 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; uint64 height = 2; uint64 time_second = 3; uint32 time_nano_second = 4; - bytes last_block_id_and_other = 5 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes last_block_id_and_other = 5 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; bytes next_validator_hash_and_consensus_hash = 6 - [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; - bytes last_results_hash = 7 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; - bytes evidence_and_proposer_hash = 8 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + bytes last_results_hash = 7 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + bytes evidence_and_proposer_hash = 8 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; } // CommonEncodedVotePart represents the common part of encoded vote message CommonEncodedVotePart { - bytes signed_data_prefix = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; - bytes signed_data_suffix = 2 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes signed_data_prefix = 1 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + bytes signed_data_suffix = 2 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; } // TMSignature contains all details of validator signature for performing signer recovery for ECDSA @@ -213,10 +213,10 @@ message CommonEncodedVotePart { // and appended to the block hash. The prepended part (prefix) and the appended part (suffix) are // different for each signer (including signature size, machine clock, validator index, etc). message TMSignature { - bytes r = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; - bytes s = 2 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes r = 1 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + bytes s = 2 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; uint32 v = 3; - bytes encoded_timestamp = 4 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; + bytes encoded_timestamp = 4 [(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; } // RequestsCountProof contains count, version and merkle paths diff --git a/proto/buf.gen.doc.yml b/proto/buf.gen.doc.yml new file mode 100644 index 000000000..6a18570df --- /dev/null +++ b/proto/buf.gen.doc.yml @@ -0,0 +1,5 @@ +version: v1 +plugins: + - name: doc + out: ../docs/proto + opt: ../docs/proto/protodoc-markdown.tmpl,proto-docs.md diff --git a/proto/buf.gen.gogo.yml b/proto/buf.gen.gogo.yml new file mode 100644 index 000000000..9c8ba0a4b --- /dev/null +++ b/proto/buf.gen.gogo.yml @@ -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 diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 000000000..8224dea6f --- /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 + digest: shake256:c74d91a3ac7ae07d579e90eee33abf9b29664047ac8816500cf22c081fec0d72d62c89ce0bebafc1f6fec7aa5315be72606717740ca95007248425102c365377 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 954f7b05f38440fc8250134b15adec47 + digest: shake256:2ab4404fd04a7d1d52df0e2d0f2d477a3d83ffd88d876957bf3fedfd702c8e52833d65b3ce1d89a3c5adf2aab512616b0e4f51d8463f07eda9a8a3317ee3ac54 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 5e5b9fdd01804356895f8f79a6f1ddc1 + digest: shake256:0b85da49e2e5f9ebc4806eae058e2f56096ff3b1c59d1fb7c190413dd15f45dd456f0b69ced9059341c80795d2b6c943de15b120a9e0308b499e43e4b5fc2952 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 75b4300737fb4efca0831636be94e517 + digest: shake256:d865f55b8ceb838c90c28b09894ab43d07f42551108c23760004a6a4e28fe24d3a1f7380a3c9278edb329a338a9cc5db8ad9f394de548e70d534e98504972d67 diff --git a/proto/buf.md b/proto/buf.md new file mode 100644 index 000000000..807dd35c6 --- /dev/null +++ b/proto/buf.md @@ -0,0 +1,19 @@ +# Protobufs + +This is the public protocol buffers API for [Wasmd](https://github.com/CosmWasm/wasmd). + +## Download + +The `buf` CLI comes with an export command. Use `buf export -h` for details + +#### Examples: + +Download cosmwasm protos for a commit: +```bash +buf export buf.build/cosmwasm/wasmd:${commit} --output ./tmp +``` + +Download all project protos: +```bash +buf export . --output ./tmp +``` \ No newline at end of file diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 000000000..1c04b141d --- /dev/null +++ b/proto/buf.yaml @@ -0,0 +1,21 @@ +version: v1 +name: buf.build/bandprotocol/chain +deps: + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/cosmos-sdk:v0.47.0 + - buf.build/cosmos/gogo-proto +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 + - PACKAGE_DIRECTORY_MATCH diff --git a/scripts/generate_genesis.sh b/scripts/generate_genesis.sh index 7204513d8..88ec52003 100755 --- a/scripts/generate_genesis.sh +++ b/scripts/generate_genesis.sh @@ -11,17 +11,17 @@ echo "smile stem oven genius cave resource better lunar nasty moon company ridge # add accounts to genesis -bandd add-genesis-account validator 10000000000000uband --keyring-backend test -bandd add-genesis-account requester 10000000000000uband --keyring-backend test +bandd genesis add-genesis-account validator 10000000000000uband --keyring-backend test +bandd genesis add-genesis-account requester 10000000000000uband --keyring-backend test # register initial validators -bandd gentx validator 100000000uband \ +bandd genesis gentx validator 100000000uband \ --chain-id bandchain \ --keyring-backend test # collect genesis transactions -bandd collect-gentxs +bandd genesis collect-gentxs sed -i -e \ "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025uband\"/" \ diff --git a/scripts/open_proposal.sh b/scripts/open_proposal.sh new file mode 100755 index 000000000..48bf006a0 --- /dev/null +++ b/scripts/open_proposal.sh @@ -0,0 +1,18 @@ +export WALLET_NAME=validator +export CHAIN_ID="bandchain" +export DAEMON_NAME=bandd +export DAEMON_HOME=$HOME/.band + +bandd config broadcast-mode block +bandd config chain-id $CHAIN_ID + +export UPGRADE_NAME=v2_6 +export UPGRADE_HEIGHT=40 + +bandd tx gov submit-proposal software-upgrade $UPGRADE_NAME \ + --title upgrade \ + --description upgrade \ + --upgrade-height $UPGRADE_HEIGHT \ + --from $WALLET_NAME \ + -y --keyring-backend test --gas-prices 0.0025uband + diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index c1195e6d1..253c1d038 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -2,41 +2,23 @@ set -eo pipefail -protoc_gen_gocosmos() { - if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then - echo -e "\tPlease run this command from somewhere inside the cosmos-sdk folder." - return 1 - fi - - go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos@latest 2>/dev/null +protoc_install_proto_gen_doc() { + echo "Installing protobuf protoc-gen-doc plugin" + (go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest 2> /dev/null) } -protoc_gen_gocosmos - -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 . -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort -r | uniq) for dir in $proto_dirs; do - buf protoc \ - -I "proto" \ - -I "third_party/proto" \ - --gocosmos_out=plugins=interfacetype+grpc,\ -Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ - --grpc-gateway_out=logtostderr=true:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - + for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do + if grep "option go_package" $file &> /dev/null ; then + buf generate --template buf.gen.gogo.yml $file + fi + done done -# command to generate docs using protoc-gen-doc -# buf protoc \ -# -I "proto" \ -# -I "third_party/proto" \ -# --doc_out=./docs/core \ -# --doc_opt=./docs/protodoc-markdown.tmpl,proto-docs.md \ -# $(find "$(pwd)/proto" -maxdepth 5 -name '*.proto') -# go mod tidy - -# # generate codec/testdata proto code -# buf protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\ -# Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/*.proto +cd .. # move proto files to the right places cp -r github.com/bandprotocol/chain/v2/* ./ diff --git a/scripts/vote_proposal.sh b/scripts/vote_proposal.sh new file mode 100755 index 000000000..d0721db42 --- /dev/null +++ b/scripts/vote_proposal.sh @@ -0,0 +1,14 @@ +export PROPOSAL_ID=1 +export WALLET_NAME=validator +export CHAIN_ID="bandchain" + +bandd config broadcast-mode block +bandd config chain-id $CHAIN_ID + +bandd tx gov deposit $PROPOSAL_ID 1000000000uband \ + --from $WALLET_NAME \ + -y --keyring-backend test --gas-prices 0.0025uband + +bandd tx gov vote $PROPOSAL_ID yes \ + --from $WALLET_NAME \ + -y --keyring-backend test --gas-prices 0.0025uband diff --git a/testing/chain.go b/testing/chain.go index 84af8972f..a7bdd0d27 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -1,3 +1,4 @@ +// 0.47 TODO: consider copy an entire file package ibctesting import ( @@ -6,6 +7,12 @@ import ( "testing" "time" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto/tmhash" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmprotoversion "github.com/cometbft/cometbft/proto/tendermint/version" + tmtypes "github.com/cometbft/cometbft/types" + tmversion "github.com/cometbft/cometbft/version" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -16,21 +23,16 @@ 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" - "github.com/cosmos/cosmos-sdk/x/staking/teststaking" + stakingtestutil "github.com/cosmos/cosmos-sdk/x/staking/testutil" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v5/modules/core/24-host" - "github.com/cosmos/ibc-go/v5/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint/types" - "github.com/cosmos/ibc-go/v5/testing/mock" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" + ibchost "github.com/cosmos/ibc-go/v7/modules/core/24-host" + "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v7/testing/mock" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto/tmhash" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmprotoversion "github.com/tendermint/tendermint/proto/tendermint/version" - tmtypes "github.com/tendermint/tendermint/types" - tmversion "github.com/tendermint/tendermint/version" bandapp "github.com/bandprotocol/chain/v2/app" "github.com/bandprotocol/chain/v2/testing/testapp" @@ -110,7 +112,7 @@ func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain { valSet := tmtypes.NewValidatorSet(validators) - app := testapp.SetupWithGenesisValSet(t, valSet, genesisAccount, balances...) + app := testapp.SetupWithGenesisValSet(t, valSet, genesisAccount, chainID, balances...) ctx := app.NewContext(false, tmproto.Header{Height: app.LastBlockHeight()}) vals := app.StakingKeeper.GetAllValidators(ctx) for _, v := range vals { @@ -164,7 +166,7 @@ func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { // for the query and the height at which the proof will succeed on a tendermint verifier. func (chain *TestChain) QueryProofAtHeight(key []byte, height int64) ([]byte, clienttypes.Height) { res := chain.App.Query(abci.RequestQuery{ - Path: fmt.Sprintf("store/%s/key", host.StoreKey), + Path: fmt.Sprintf("store/%s/key", ibcexported.StoreKey), Height: height - 1, Data: key, Prove: true, @@ -214,7 +216,7 @@ func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clien clientState := chain.GetClientState(clientID) consensusHeight := clientState.GetLatestHeight().(clienttypes.Height) - consensusKey := host.FullConsensusStateKey(clientID, consensusHeight) + consensusKey := ibchost.FullConsensusStateKey(clientID, consensusHeight) proofConsensus, _ := chain.QueryProof(consensusKey) return proofConsensus, consensusHeight @@ -346,7 +348,7 @@ func (chain *TestChain) GetValsAtHeight(height int64) (*tmtypes.ValidatorSet, bo valSet := stakingtypes.Validators(histInfo.Valset) - tmValidators, err := teststaking.ToTmValidators(valSet, sdk.DefaultPowerReduction) + tmValidators, err := stakingtestutil.ToTmValidators(valSet, sdk.DefaultPowerReduction) if err != nil { panic(err) } @@ -551,14 +553,14 @@ func CreateSortedSignerArray(altPrivVal, suitePrivVal tmtypes.PrivValidator, // Other applications must bind to the port in InitGenesis or modify this code. func (chain *TestChain) CreatePortCapability(scopedKeeper capabilitykeeper.ScopedKeeper, portID string) { // check if the portId is already binded, if not bind it - _, ok := chain.App.GetScopedIBCKeeper().GetCapability(chain.GetContext(), host.PortPath(portID)) + _, ok := chain.App.GetScopedIBCKeeper().GetCapability(chain.GetContext(), ibchost.PortPath(portID)) if !ok { // create capability using the IBC capability keeper - cap, err := chain.App.GetScopedIBCKeeper().NewCapability(chain.GetContext(), host.PortPath(portID)) + cap, err := chain.App.GetScopedIBCKeeper().NewCapability(chain.GetContext(), ibchost.PortPath(portID)) require.NoError(chain.t, err) // claim capability using the scopedKeeper - err = scopedKeeper.ClaimCapability(chain.GetContext(), cap, host.PortPath(portID)) + err = scopedKeeper.ClaimCapability(chain.GetContext(), cap, ibchost.PortPath(portID)) require.NoError(chain.t, err) } @@ -570,7 +572,7 @@ func (chain *TestChain) CreatePortCapability(scopedKeeper capabilitykeeper.Scope // GetPortCapability returns the port capability for the given portID. The capability must // exist, otherwise testing will fail. func (chain *TestChain) GetPortCapability(portID string) *capabilitytypes.Capability { - cap, ok := chain.App.GetScopedIBCKeeper().GetCapability(chain.GetContext(), host.PortPath(portID)) + cap, ok := chain.App.GetScopedIBCKeeper().GetCapability(chain.GetContext(), ibchost.PortPath(portID)) require.True(chain.t, ok) return cap @@ -580,7 +582,7 @@ func (chain *TestChain) GetPortCapability(portID string) *capabilitytypes.Capabi // if it does not already exist. This function will fail testing on any resulting error. The // scoped keeper passed in will claim the new capability. func (chain *TestChain) CreateChannelCapability(scopedKeeper capabilitykeeper.ScopedKeeper, portID, channelID string) { - capName := host.ChannelCapabilityPath(portID, channelID) + capName := ibchost.ChannelCapabilityPath(portID, channelID) // check if the portId is already binded, if not bind it _, ok := chain.App.GetScopedIBCKeeper().GetCapability(chain.GetContext(), capName) if !ok { @@ -599,7 +601,7 @@ func (chain *TestChain) CreateChannelCapability(scopedKeeper capabilitykeeper.Sc // The capability must exist, otherwise testing will fail. func (chain *TestChain) GetChannelCapability(portID, channelID string) *capabilitytypes.Capability { cap, ok := chain.App.GetScopedIBCKeeper(). - GetCapability(chain.GetContext(), host.ChannelCapabilityPath(portID, channelID)) + GetCapability(chain.GetContext(), ibchost.ChannelCapabilityPath(portID, channelID)) require.True(chain.t, ok) return cap diff --git a/testing/config.go b/testing/config.go index d97c5b979..b5bbed8f1 100644 --- a/testing/config.go +++ b/testing/config.go @@ -3,11 +3,11 @@ package ibctesting import ( "time" - connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" - "github.com/cosmos/ibc-go/v5/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint/types" - "github.com/cosmos/ibc-go/v5/testing/mock" + connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v7/testing/mock" ) type ClientConfig interface { diff --git a/testing/coordinator.go b/testing/coordinator.go index 95ab4dd79..29d2b5ba2 100644 --- a/testing/coordinator.go +++ b/testing/coordinator.go @@ -6,8 +6,8 @@ import ( "testing" "time" + abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" ) const ChainIDPrefix = "testchain" diff --git a/testing/endpoint.go b/testing/endpoint.go index 64e7762c8..701a9aea2 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -4,13 +4,13 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" - commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" - host "github.com/cosmos/ibc-go/v5/modules/core/24-host" - "github.com/cosmos/ibc-go/v5/modules/core/exported" - ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" + "github.com/cosmos/ibc-go/v7/modules/core/exported" + ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" "github.com/stretchr/testify/require" ) @@ -99,8 +99,6 @@ func (endpoint *Endpoint) CreateClient() (err error) { height, commitmenttypes.GetSDKSpecs(), UpgradePath, - tmConfig.AllowUpdateAfterExpiry, - tmConfig.AllowUpdateAfterMisbehaviour, ) consensusState = endpoint.Counterparty.Chain.LastHeader.ConsensusState() case exported.Solomachine: @@ -138,8 +136,9 @@ func (endpoint *Endpoint) UpdateClient() (err error) { // ensure counterparty has committed state endpoint.Chain.Coordinator.CommitBlock(endpoint.Counterparty.Chain) + // 0.47 TODO: check ibc var ( - header exported.Header + header *ibctmtypes.Header ) switch endpoint.ClientConfig.GetClientType() { @@ -379,19 +378,39 @@ func (endpoint *Endpoint) ChanCloseInit() error { // SendPacket sends a packet through the channel keeper using the associated endpoint // The counterparty client is updated so proofs can be sent to the counterparty chain. -func (endpoint *Endpoint) SendPacket(packet exported.PacketI) error { - channelCap := endpoint.Chain.GetChannelCapability(packet.GetSourcePort(), packet.GetSourceChannel()) +// The packet sequence generated for the packet to be sent is returned. An error +// is returned if one occurs. +// 0.47 TODO: consider copy an entire file +func (endpoint *Endpoint) SendPacket( + timeoutHeight clienttypes.Height, + timeoutTimestamp uint64, + data []byte, +) (uint64, error) { + channelCap := endpoint.Chain.GetChannelCapability(endpoint.ChannelConfig.PortID, endpoint.ChannelID) // no need to send message, acting as a module - err := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.SendPacket(endpoint.Chain.GetContext(), channelCap, packet) + sequence, err := endpoint.Chain.App.GetIBCKeeper().ChannelKeeper.SendPacket( + endpoint.Chain.GetContext(), + channelCap, + endpoint.ChannelConfig.PortID, + endpoint.ChannelID, + timeoutHeight, + timeoutTimestamp, + data, + ) if err != nil { - return err + return 0, err } // commit changes since no message was sent endpoint.Chain.Coordinator.CommitBlock(endpoint.Chain) - return endpoint.Counterparty.UpdateClient() + err = endpoint.Counterparty.UpdateClient() + if err != nil { + return 0, err + } + + return sequence, nil } // RecvPacket receives a packet on the associated endpoint. diff --git a/testing/events.go b/testing/events.go index aaa4fd795..523a920bc 100644 --- a/testing/events.go +++ b/testing/events.go @@ -1,3 +1,4 @@ +// 0.47 TODO: consider copy an entire file package ibctesting import ( @@ -5,20 +6,23 @@ import ( "strconv" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/suite" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ) +type EventsMap map[string]map[string]string + // ParseClientIDFromEvents parses events emitted from a MsgCreateClient and returns the // client identifier. func ParseClientIDFromEvents(events sdk.Events) (string, error) { for _, ev := range events { if ev.Type == clienttypes.EventTypeCreateClient { for _, attr := range ev.Attributes { - if string(attr.Key) == clienttypes.AttributeKeyClientID { - return string(attr.Value), nil + if attr.Key == clienttypes.AttributeKeyClientID { + return attr.Value, nil } } } @@ -33,8 +37,8 @@ func ParseConnectionIDFromEvents(events sdk.Events) (string, error) { if ev.Type == connectiontypes.EventTypeConnectionOpenInit || ev.Type == connectiontypes.EventTypeConnectionOpenTry { for _, attr := range ev.Attributes { - if string(attr.Key) == connectiontypes.AttributeKeyConnectionID { - return string(attr.Value), nil + if attr.Key == connectiontypes.AttributeKeyConnectionID { + return attr.Value, nil } } } @@ -48,8 +52,8 @@ func ParseChannelIDFromEvents(events sdk.Events) (string, error) { for _, ev := range events { if ev.Type == channeltypes.EventTypeChannelOpenInit || ev.Type == channeltypes.EventTypeChannelOpenTry { for _, attr := range ev.Attributes { - if string(attr.Key) == channeltypes.AttributeKeyChannelID { - return string(attr.Value), nil + if attr.Key == channeltypes.AttributeKeyChannelID { + return attr.Value, nil } } } @@ -64,12 +68,12 @@ func ParsePacketFromEvents(events sdk.Events) (channeltypes.Packet, error) { if ev.Type == channeltypes.EventTypeSendPacket { packet := channeltypes.Packet{} for _, attr := range ev.Attributes { - switch string(attr.Key) { + switch attr.Key { case channeltypes.AttributeKeyData: //nolint:staticcheck // DEPRECATED - packet.Data = attr.Value + packet.Data = []byte(attr.Value) case channeltypes.AttributeKeySequence: - seq, err := strconv.ParseUint(string(attr.Value), 10, 64) + seq, err := strconv.ParseUint(attr.Value, 10, 64) if err != nil { return channeltypes.Packet{}, err } @@ -77,19 +81,19 @@ func ParsePacketFromEvents(events sdk.Events) (channeltypes.Packet, error) { packet.Sequence = seq case channeltypes.AttributeKeySrcPort: - packet.SourcePort = string(attr.Value) + packet.SourcePort = attr.Value case channeltypes.AttributeKeySrcChannel: - packet.SourceChannel = string(attr.Value) + packet.SourceChannel = attr.Value case channeltypes.AttributeKeyDstPort: - packet.DestinationPort = string(attr.Value) + packet.DestinationPort = attr.Value case channeltypes.AttributeKeyDstChannel: - packet.DestinationChannel = string(attr.Value) + packet.DestinationChannel = attr.Value case channeltypes.AttributeKeyTimeoutHeight: - height, err := clienttypes.ParseHeight(string(attr.Value)) + height, err := clienttypes.ParseHeight(attr.Value) if err != nil { return channeltypes.Packet{}, err } @@ -97,7 +101,7 @@ func ParsePacketFromEvents(events sdk.Events) (channeltypes.Packet, error) { packet.TimeoutHeight = height case channeltypes.AttributeKeyTimeoutTimestamp: - timestamp, err := strconv.ParseUint(string(attr.Value), 10, 64) + timestamp, err := strconv.ParseUint(attr.Value, 10, 64) if err != nil { return channeltypes.Packet{}, err } @@ -121,11 +125,41 @@ func ParseAckFromEvents(events sdk.Events) ([]byte, error) { for _, ev := range events { if ev.Type == channeltypes.EventTypeWriteAck { for _, attr := range ev.Attributes { - if string(attr.Key) == channeltypes.AttributeKeyAck { //nolint:staticcheck // DEPRECATED - return attr.Value, nil + if attr.Key == channeltypes.AttributeKeyAck { //nolint:staticcheck // DEPRECATED + return []byte(attr.Value), nil } } } } return nil, fmt.Errorf("acknowledgement event attribute not found") } + +// AssertEvents asserts that expected events are present in the actual events. +// Expected map needs to be a subset of actual events to pass. +func AssertEvents( + suite *suite.Suite, + expected EventsMap, + actual sdk.Events, +) { + hasEvents := make(map[string]bool) + for eventType := range expected { + hasEvents[eventType] = false + } + + for _, event := range actual { + expEvent, eventFound := expected[event.Type] + if eventFound { + hasEvents[event.Type] = true + suite.Require().Len(event.Attributes, len(expEvent)) + for _, attr := range event.Attributes { + expValue, found := expEvent[attr.Key] + suite.Require().True(found) + suite.Require().Equal(expValue, attr.Value) + } + } + } + + for eventName, hasEvent := range hasEvents { + suite.Require().True(hasEvent, "event: %s was not found in events", eventName) + } +} diff --git a/testing/path.go b/testing/path.go index 91e795f94..8b39b0fbb 100644 --- a/testing/path.go +++ b/testing/path.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ) // Path contains two endpoints representing two chains connected over IBC diff --git a/testing/testapp/setup.go b/testing/testapp/setup.go index de0874e6d..7c4f9a4fb 100644 --- a/testing/testapp/setup.go +++ b/testing/testapp/setup.go @@ -29,13 +29,13 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" + ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" "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" "github.com/bandprotocol/chain/v2/pkg/filecache" owasm "github.com/bandprotocol/go-owasm/api" @@ -89,8 +89,8 @@ const ( ) // DefaultConsensusParams defines the default Tendermint consensus params used in TestingApp. -var DefaultConsensusParams = &abci.ConsensusParams{ - Block: &abci.BlockParams{ +var DefaultConsensusParams = &tmproto.ConsensusParams{ + Block: &tmproto.BlockParams{ MaxBytes: 200000, MaxGas: -1, }, @@ -115,7 +115,7 @@ func (app *TestingApp) GetBaseApp() *baseapp.BaseApp { } // GetStakingKeeper implements the TestingApp interface. -func (app *TestingApp) GetStakingKeeper() stakingkeeper.Keeper { +func (app *TestingApp) GetStakingKeeper() *stakingkeeper.Keeper { return app.StakingKeeper } @@ -249,6 +249,7 @@ func NewTestApp(chainID string, logger log.Logger) *TestingApp { EmptyAppOptions{}, 100, baseapp.SetSnapshot(snapshotStore, snapshotOptions), + baseapp.SetChainID(chainID), ), } genesis := bandapp.NewDefaultGenesisState() @@ -357,6 +358,7 @@ func NewTestApp(chainID string, logger log.Logger) *TestingApp { balances, totalSupply, []banktypes.Metadata{}, + []banktypes.SendEnabled{}, ) genesis[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) @@ -369,6 +371,7 @@ func NewTestApp(chainID string, logger log.Logger) *TestingApp { if err != nil { panic(err) } + // Initialize the sim blockchain. We are ready for testing! app.InitChain(abci.RequestInitChain{ ChainId: chainID, @@ -391,7 +394,7 @@ func CreateTestInput(autoActivate bool) (*TestingApp, sdk.Context, keeper.Keeper return app, ctx, app.OracleKeeper } -func setup(withGenesis bool, invCheckPeriod uint) (*TestingApp, bandapp.GenesisState, string) { +func setup(withGenesis bool, invCheckPeriod uint, chainID string) (*TestingApp, bandapp.GenesisState, string) { dir, err := os.MkdirTemp("", "bandibc") if err != nil { panic(err) @@ -427,6 +430,7 @@ func setup(withGenesis bool, invCheckPeriod uint) (*TestingApp, bandapp.GenesisS EmptyAppOptions{}, 0, baseapp.SetSnapshot(snapshotStore, snapshotOptions), + baseapp.SetChainID(chainID), ), } if withGenesis { @@ -437,7 +441,7 @@ func setup(withGenesis bool, invCheckPeriod uint) (*TestingApp, bandapp.GenesisS // SetupWithEmptyStore setup a TestingApp instance with empty DB func SetupWithEmptyStore() *TestingApp { - app, _, _ := setup(false, 0) + app, _, _ := setup(false, 0, "BANDCHAIN") return app } @@ -449,9 +453,10 @@ func SetupWithGenesisValSet( t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, + chainID string, balances ...banktypes.Balance, ) *TestingApp { - app, genesisState, dir := setup(true, 5) + app, genesisState, dir := setup(true, 5, chainID) // set genesis accounts authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis) @@ -510,6 +515,7 @@ func SetupWithGenesisValSet( balances, totalSupply, []banktypes.Metadata{}, + []banktypes.SendEnabled{}, ) genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis) @@ -525,6 +531,7 @@ func SetupWithGenesisValSet( // init chain will set the validator set and initialize the genesis accounts app.InitChain( abci.RequestInitChain{ + ChainId: chainID, Validators: []abci.ValidatorUpdate{}, ConsensusParams: DefaultConsensusParams, AppStateBytes: stateBytes, @@ -534,6 +541,7 @@ func SetupWithGenesisValSet( // commit genesis changes app.Commit() app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{ + ChainID: chainID, Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, ValidatorsHash: valSet.Hash(), diff --git a/testing/value.go b/testing/value.go index 560879f47..e9eba50ef 100644 --- a/testing/value.go +++ b/testing/value.go @@ -8,10 +8,10 @@ import ( "time" sdk "github.com/cosmos/cosmos-sdk/types" - connectiontypes "github.com/cosmos/ibc-go/v5/modules/core/03-connection/types" - commitmenttypes "github.com/cosmos/ibc-go/v5/modules/core/23-commitment/types" - ibctmtypes "github.com/cosmos/ibc-go/v5/modules/light-clients/07-tendermint/types" - "github.com/cosmos/ibc-go/v5/testing/mock" + connectiontypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + commitmenttypes "github.com/cosmos/ibc-go/v7/modules/core/23-commitment/types" + ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + "github.com/cosmos/ibc-go/v7/testing/mock" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/third_party/proto/google/api/annotations.proto b/third_party/proto/google/api/annotations.proto index 85c361b47..7b67d5840 100644 --- a/third_party/proto/google/api/annotations.proto +++ b/third_party/proto/google/api/annotations.proto @@ -19,11 +19,11 @@ 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 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"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; extend google.protobuf.MethodOptions { // See `HttpRule`. diff --git a/third_party/proto/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto index 2cbcabb29..e6b604e4b 100644 --- a/third_party/proto/tendermint/abci/types.proto +++ b/third_party/proto/tendermint/abci/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.abci; -option go_package = "github.com/tendermint/tendermint/abci/types"; +option go_package = "github.com/cometbft/cometbft/abci/types"; // For more information on gogo.proto, see: // https://github.com/gogo/protobuf/blob/master/extensions.md @@ -58,13 +58,12 @@ message RequestSetOption { } 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; - int64 initial_height = 6; + 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; + int64 initial_height = 6; } message RequestQuery { @@ -102,13 +101,12 @@ message RequestEndBlock { message RequestCommit {} // lists available snapshots -message RequestListSnapshots { -} +message RequestListSnapshots {} // offers a snapshot to the application message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height } // loads a snapshot chunk @@ -187,8 +185,8 @@ message ResponseInitChain { message ResponseQuery { uint32 code = 1; // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 index = 5; bytes key = 6; bytes value = 7; @@ -198,40 +196,35 @@ message ResponseQuery { } message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + 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 + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; + 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 + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; + 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"]; + 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 { @@ -248,12 +241,12 @@ message ResponseOfferSnapshot { Result result = 1; enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Snapshot accepted, apply chunks + ABORT = 2; // Abort all snapshot restoration + REJECT = 3; // Reject this specific snapshot, try others + REJECT_FORMAT = 4; // Reject all snapshots of this format, try others + REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others } } @@ -263,16 +256,16 @@ message ResponseLoadSnapshotChunk { message ResponseApplySnapshotChunk { Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban + repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply + repeated string reject_senders = 3; // Chunk senders to reject and ban enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Chunk successfully accepted + ABORT = 2; // Abort all snapshot restoration + RETRY = 3; // Retry chunk (combine with refetch and reject) + RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) + REJECT_SNAPSHOT = 5; // Reject this snapshot, try others } } @@ -306,17 +299,14 @@ message LastCommitInfo { // Later, transactions may be queried using these events. message Event { string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; + repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; } // EventAttribute is a single key-value pair, associated with an event. message EventAttribute { bytes key = 1; bytes value = 2; - bool index = 3; // nondeterministic + bool index = 3; // nondeterministic } // TxResult contains results of executing the transaction. @@ -334,9 +324,9 @@ message TxResult { // Validator message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) + bytes address = 1; // The first 20 bytes of SHA256(public key) // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power + int64 power = 3; // The voting power } // ValidatorUpdate @@ -364,13 +354,10 @@ message Evidence { // The height when the offense occurred int64 height = 3; // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // Total voting power of the validator set in case the ABCI application does // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 + // https://github.com/cometbft/cometbft/issues/4581 int64 total_voting_power = 5; } @@ -378,11 +365,11 @@ message Evidence { // State Sync Types message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata + uint64 height = 1; // The height at which the snapshot was taken + uint32 format = 2; // The application-specific snapshot format + uint32 chunks = 3; // Number of chunks in the snapshot + bytes hash = 4; // Arbitrary snapshot hash, equal only if identical + bytes metadata = 5; // Arbitrary application metadata } //---------------------------------------- diff --git a/third_party/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto index 16fd7adf3..a5d3ce85d 100644 --- a/third_party/proto/tendermint/crypto/keys.proto +++ b/third_party/proto/tendermint/crypto/keys.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.crypto; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/tendermint/crypto/proof.proto b/third_party/proto/tendermint/crypto/proof.proto index 975df7685..ae72195e8 100644 --- a/third_party/proto/tendermint/crypto/proof.proto +++ b/third_party/proto/tendermint/crypto/proof.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.crypto; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/tendermint/libs/bits/types.proto b/third_party/proto/tendermint/libs/bits/types.proto index 3111d113a..e6afc5e8e 100644 --- a/third_party/proto/tendermint/libs/bits/types.proto +++ b/third_party/proto/tendermint/libs/bits/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.libs.bits; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/libs/bits"; message BitArray { int64 bits = 1; diff --git a/third_party/proto/tendermint/p2p/types.proto b/third_party/proto/tendermint/p2p/types.proto index 0d42ea400..157d8ba1c 100644 --- a/third_party/proto/tendermint/p2p/types.proto +++ b/third_party/proto/tendermint/p2p/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.p2p; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/p2p"; import "gogoproto/gogo.proto"; diff --git a/third_party/proto/tendermint/types/block.proto b/third_party/proto/tendermint/types/block.proto index 84e9bb15d..d531c06a0 100644 --- a/third_party/proto/tendermint/types/block.proto +++ b/third_party/proto/tendermint/types/block.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.types; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; import "gogoproto/gogo.proto"; import "tendermint/types/types.proto"; diff --git a/third_party/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto index 3b234571b..06f30ec2f 100644 --- a/third_party/proto/tendermint/types/evidence.proto +++ b/third_party/proto/tendermint/types/evidence.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.types; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; @@ -17,19 +17,19 @@ message Evidence { // 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]; + 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; + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; + int64 total_voting_power = 4; google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } diff --git a/third_party/proto/tendermint/types/params.proto b/third_party/proto/tendermint/types/params.proto index 0de7d846f..354aee309 100644 --- a/third_party/proto/tendermint/types/params.proto +++ b/third_party/proto/tendermint/types/params.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.types; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; @@ -45,8 +45,7 @@ message EvidenceParams { // 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]; + 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. diff --git a/third_party/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto index 7f7ea74ca..94f19e441 100644 --- a/third_party/proto/tendermint/types/types.proto +++ b/third_party/proto/tendermint/types/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.types; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; @@ -66,19 +66,19 @@ message Header { 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 + 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 + 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 + 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 @@ -95,30 +95,27 @@ 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; + 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]; + 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; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; } message Proposal { @@ -127,9 +124,8 @@ message Proposal { 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; + google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; } message SignedHeader { diff --git a/third_party/proto/tendermint/types/validator.proto b/third_party/proto/tendermint/types/validator.proto index 49860b96d..3e170262c 100644 --- a/third_party/proto/tendermint/types/validator.proto +++ b/third_party/proto/tendermint/types/validator.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.types; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; import "gogoproto/gogo.proto"; import "tendermint/crypto/keys.proto"; diff --git a/third_party/proto/tendermint/version/types.proto b/third_party/proto/tendermint/version/types.proto index 6061868bd..3b6ef4547 100644 --- a/third_party/proto/tendermint/version/types.proto +++ b/third_party/proto/tendermint/version/types.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package tendermint.version; -option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; +option go_package = "github.com/cometbft/cometbft/proto/tendermint/version"; import "gogoproto/gogo.proto"; diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index ccffa1893..286923d9d 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/tendermint/tendermint/libs/log" + "github.com/cometbft/cometbft/libs/log" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/x/bank/module.go b/x/bank/module.go index 12db9a5c0..c31395629 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/bank" + "github.com/cosmos/cosmos-sdk/x/bank/exported" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" ) @@ -28,14 +29,23 @@ type AppModule struct { keeper bankkeeper.Keeper accountKeeper types.AccountKeeper + + // legacySubspace is used solely for migration of x/params managed parameters + legacySubspace exported.Subspace } // NewAppModule creates a new AppModule object -func NewAppModule(cdc codec.Codec, keeper bankkeeper.Keeper, accountKeeper types.AccountKeeper) AppModule { +func NewAppModule( + cdc codec.Codec, + keeper bankkeeper.Keeper, + accountKeeper types.AccountKeeper, + ss exported.Subspace, +) AppModule { return AppModule{ - AppModule: bank.NewAppModule(cdc, keeper, accountKeeper), - keeper: keeper, - accountKeeper: accountKeeper, + AppModule: bank.NewAppModule(cdc, keeper, accountKeeper, ss), + keeper: keeper, + accountKeeper: accountKeeper, + legacySubspace: ss, } } @@ -44,7 +54,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), bankkeeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) - m := bankkeeper.NewMigrator(am.keeper.(keeper.WrappedBankKeeper).Keeper.(bankkeeper.BaseKeeper)) + m := bankkeeper.NewMigrator(am.keeper.(keeper.WrappedBankKeeper).Keeper.(bankkeeper.BaseKeeper), am.legacySubspace) if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { panic(fmt.Sprintf("failed to migrate x/bank from version 1 to 2: %v", err)) } diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index 6d1fb257c..ed02d474e 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -8,36 +8,33 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/bandprotocol/chain/v2/x/globalfee" "github.com/bandprotocol/chain/v2/x/globalfee/types" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) type FeeChecker struct { - OracleKeeper *oraclekeeper.Keeper - GlobalMinFee globalfee.ParamSource - StakingSubspace paramtypes.Subspace + OracleKeeper *oraclekeeper.Keeper + GlobalMinFee globalfee.ParamSource + StakingKeeper *stakingkeeper.Keeper } func NewFeeChecker( oracleKeeper *oraclekeeper.Keeper, - globalfeeSubspace, stakingSubspace paramtypes.Subspace, + globalfeeSubspace paramtypes.Subspace, + stakingKeeper *stakingkeeper.Keeper, ) FeeChecker { if !globalfeeSubspace.HasKeyTable() { panic("global fee paramspace was not set up via module") } - if !stakingSubspace.HasKeyTable() { - panic("staking paramspace was not set up via module") - } - return FeeChecker{ - OracleKeeper: oracleKeeper, - GlobalMinFee: globalfeeSubspace, - StakingSubspace: stakingSubspace, + OracleKeeper: oracleKeeper, + GlobalMinFee: globalfeeSubspace, + StakingKeeper: stakingKeeper, } } @@ -141,10 +138,6 @@ func (fc FeeChecker) DefaultZeroGlobalFee(ctx sdk.Context) ([]sdk.DecCoin, error } func (fc FeeChecker) GetBondDenom(ctx sdk.Context) string { - var bondDenom string - if fc.StakingSubspace.Has(ctx, stakingtypes.KeyBondDenom) { - fc.StakingSubspace.Get(ctx, stakingtypes.KeyBondDenom, &bondDenom) - } - - return bondDenom + // 0.47 TODO: test bond denom is not nil + return fc.StakingKeeper.BondDenom(ctx) } diff --git a/x/globalfee/feechecker/feechecker_test.go b/x/globalfee/feechecker/feechecker_test.go index b3149a4ac..9700e06ef 100644 --- a/x/globalfee/feechecker/feechecker_test.go +++ b/x/globalfee/feechecker/feechecker_test.go @@ -12,7 +12,6 @@ import ( "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" "github.com/bandprotocol/chain/v2/x/oracle/types" "github.com/cosmos/cosmos-sdk/x/authz" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) var ( @@ -84,7 +83,7 @@ func (suite *FeeCheckerTestSuite) SetupTest() { suite.FeeChecker = feechecker.NewFeeChecker( &oracleKeeper, app.GetSubspace(globalfee.ModuleName), - app.GetSubspace(stakingtypes.ModuleName), + app.StakingKeeper, ) } diff --git a/x/globalfee/genesis_test.go b/x/globalfee/genesis_test.go index b24ff7927..267657930 100644 --- a/x/globalfee/genesis_test.go +++ b/x/globalfee/genesis_test.go @@ -4,30 +4,29 @@ import ( "testing" "time" - "github.com/cosmos/cosmos-sdk/simapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" + dbm "github.com/cometbft/cometbft-db" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - dbm "github.com/tendermint/tm-db" "github.com/bandprotocol/chain/v2/x/globalfee/types" ) func TestDefaultGenesis(t *testing.T) { - encCfg := simapp.MakeTestEncodingConfig() + encCfg := moduletestutil.MakeTestEncodingConfig() gotJSON := AppModuleBasic{}.DefaultGenesis(encCfg.Codec) assert.JSONEq(t, `{"params":{"minimum_gas_prices":[]}}`, string(gotJSON)) } func TestValidateGenesis(t *testing.T) { - encCfg := simapp.MakeTestEncodingConfig() + encCfg := moduletestutil.MakeTestEncodingConfig() specs := map[string]struct { src string expErr bool @@ -110,10 +109,10 @@ func TestInitExportGenesis(t *testing.T) { } } -func setupTestStore(t *testing.T) (sdk.Context, simappparams.EncodingConfig, paramstypes.Subspace) { +func setupTestStore(t *testing.T) (sdk.Context, moduletestutil.TestEncodingConfig, paramstypes.Subspace) { db := dbm.NewMemDB() ms := store.NewCommitMultiStore(db) - encCfg := simapp.MakeTestEncodingConfig() + encCfg := moduletestutil.MakeTestEncodingConfig() keyParams := sdk.NewKVStoreKey(paramstypes.StoreKey) tkeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) diff --git a/x/globalfee/module.go b/x/globalfee/module.go index 3fe1fe5bf..df1199fce 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -13,7 +14,6 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" "github.com/bandprotocol/chain/v2/x/globalfee/client/cli" "github.com/bandprotocol/chain/v2/x/globalfee/types" @@ -106,17 +106,18 @@ func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) jso func (a AppModule) RegisterInvariants(registry sdk.InvariantRegistry) { } -func (a AppModule) Route() sdk.Route { - return sdk.Route{} -} +// 0.47 TODO: delete these functions +// func (a AppModule) Route() sdk.Route { +// return sdk.Route{} +// } -func (a AppModule) QuerierRoute() string { - return types.QuerierRoute -} +// func (a AppModule) QuerierRoute() string { +// return types.QuerierRoute +// } -func (a AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier { - return nil -} +// func (a AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier { +// return nil +// } func (a AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), NewGrpcQuerier(a.paramSpace)) diff --git a/x/globalfee/types/genesis.pb.go b/x/globalfee/types/genesis.pb.go index 0d612b252..31740a587 100644 --- a/x/globalfee/types/genesis.pb.go +++ b/x/globalfee/types/genesis.pb.go @@ -7,8 +7,8 @@ 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" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/globalfee/types/query.pb.go b/x/globalfee/types/query.pb.go index fe8335ece..9a20b0632 100644 --- a/x/globalfee/types/query.pb.go +++ b/x/globalfee/types/query.pb.go @@ -8,9 +8,9 @@ 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" - 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" diff --git a/x/globalfee/types/query.pb.gw.go b/x/globalfee/types/query.pb.gw.go index ff133b59f..e39226a46 100644 --- a/x/globalfee/types/query.pb.gw.go +++ b/x/globalfee/types/query.pb.gw.go @@ -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_MinimumGasPrices_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryMinimumGasPricesRequest @@ -52,12 +54,14 @@ func local_request_Query_MinimumGasPrices_0(ctx context.Context, marshaler runti // 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_MinimumGasPrices_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_MinimumGasPrices_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_MinimumGasPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"globalfee", "v1beta1", "minimum_gas_prices"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_MinimumGasPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"globalfee", "v1beta1", "minimum_gas_prices"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/oracle/abci.go b/x/oracle/abci.go index 4c06498af..2b796bd46 100644 --- a/x/oracle/abci.go +++ b/x/oracle/abci.go @@ -1,8 +1,8 @@ package oracle import ( + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" "github.com/bandprotocol/chain/v2/x/oracle/keeper" "github.com/bandprotocol/chain/v2/x/oracle/types" diff --git a/x/oracle/abci_test.go b/x/oracle/abci_test.go index cd2289582..37c6dfa7a 100644 --- a/x/oracle/abci_test.go +++ b/x/oracle/abci_test.go @@ -4,12 +4,12 @@ import ( "encoding/hex" "testing" + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" "github.com/bandprotocol/chain/v2/testing/testapp" ) @@ -94,7 +94,7 @@ func TestAllocateTokensCalledOnBeginBlock(t *testing.T) { // If there are no validators active, Calling begin block should be no-op. app.BeginBlocker(ctx, abci.RequestBeginBlock{ Hash: fromHex("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), - LastCommitInfo: abci.LastCommitInfo{Votes: votes}, + LastCommitInfo: abci.CommitInfo{Votes: votes}, }) require.Equal( t, @@ -105,7 +105,7 @@ func TestAllocateTokensCalledOnBeginBlock(t *testing.T) { k.Activate(ctx, testapp.Validators[1].ValAddress) app.BeginBlocker(ctx, abci.RequestBeginBlock{ Hash: fromHex("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), - LastCommitInfo: abci.LastCommitInfo{Votes: votes}, + LastCommitInfo: abci.CommitInfo{Votes: votes}, }) require.Equal( t, @@ -135,7 +135,7 @@ func TestAllocateTokensCalledOnBeginBlock(t *testing.T) { k.Activate(ctx, testapp.Validators[0].ValAddress) app.BeginBlocker(ctx, abci.RequestBeginBlock{ Hash: fromHex("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), - LastCommitInfo: abci.LastCommitInfo{Votes: votes}, + LastCommitInfo: abci.CommitInfo{Votes: votes}, }) require.Equal( t, @@ -169,7 +169,7 @@ func TestAllocateTokensCalledOnBeginBlock(t *testing.T) { k.MissReport(ctx, testapp.Validators[1].ValAddress, testapp.ParseTime(100)) app.BeginBlocker(ctx, abci.RequestBeginBlock{ Hash: fromHex("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), - LastCommitInfo: abci.LastCommitInfo{Votes: votes}, + LastCommitInfo: abci.CommitInfo{Votes: votes}, }) require.Equal( t, @@ -255,7 +255,7 @@ func TestAllocateTokensWithDistrAllocateTokens(t *testing.T) { k.Activate(ctx, testapp.Validators[0].ValAddress) app.BeginBlocker(ctx, abci.RequestBeginBlock{ Hash: fromHex("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), - LastCommitInfo: abci.LastCommitInfo{Votes: votes}, + LastCommitInfo: abci.CommitInfo{Votes: votes}, }) require.Equal(t, sdk.Coins{}, app.BankKeeper.GetAllBalances(ctx, feeCollector.GetAddress())) require.Equal( @@ -270,12 +270,12 @@ func TestAllocateTokensWithDistrAllocateTokens(t *testing.T) { ) require.Equal( t, - sdk.DecCoins{{Denom: "uband", Amount: sdk.NewDecWithPrec(43015, 3)}}, + sdk.DecCoins{{Denom: "uband", Amount: sdk.NewDecWithPrec(44590, 3)}}, app.DistrKeeper.GetValidatorOutstandingRewards(ctx, testapp.Validators[0].ValAddress).Rewards, ) require.Equal( t, - sdk.DecCoins{{Denom: "uband", Amount: sdk.NewDecWithPrec(5985, 3)}}, + sdk.DecCoins{{Denom: "uband", Amount: sdk.NewDecWithPrec(4410, 3)}}, app.DistrKeeper.GetValidatorOutstandingRewards(ctx, testapp.Validators[1].ValAddress).Rewards, ) } diff --git a/x/oracle/app_test.go b/x/oracle/app_test.go index cc90efd80..25d364eee 100644 --- a/x/oracle/app_test.go +++ b/x/oracle/app_test.go @@ -5,19 +5,15 @@ import ( "testing" "time" + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" "github.com/bandprotocol/chain/v2/testing/testapp" "github.com/bandprotocol/chain/v2/x/oracle" "github.com/bandprotocol/chain/v2/x/oracle/types" ) -func parseEventAttribute(attr interface{}) []byte { - return []byte(fmt.Sprint(attr)) -} - func TestSuccessRequestOracleData(t *testing.T) { app, ctx, k := testapp.CreateTestInput(true) @@ -110,10 +106,10 @@ func TestSuccessRequestOracleData(t *testing.T) { types.RESOLVE_STATUS_SUCCESS, []byte("beeb"), ) expectEvents = []abci.Event{{Type: types.EventTypeResolve, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: parseEventAttribute(resPacket.RequestID)}, - {Key: []byte(types.AttributeKeyResolveStatus), Value: parseEventAttribute(uint32(resPacket.ResolveStatus))}, - {Key: []byte(types.AttributeKeyResult), Value: []byte("62656562")}, - {Key: []byte(types.AttributeKeyGasUsed), Value: []byte("2485000000")}, + {Key: types.AttributeKeyID, Value: fmt.Sprint(resPacket.RequestID)}, + {Key: types.AttributeKeyResolveStatus, Value: fmt.Sprint(uint32(resPacket.ResolveStatus))}, + {Key: types.AttributeKeyResult, Value: "62656562"}, + {Key: types.AttributeKeyGasUsed, Value: "2485000000"}, }}} require.Equal(t, expectEvents, result.GetEvents()) @@ -183,34 +179,34 @@ func TestExpiredRequestOracleData(t *testing.T) { expectEvents := []abci.Event{{ Type: types.EventTypeResolve, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: parseEventAttribute(resPacket.RequestID)}, + {Key: types.AttributeKeyID, Value: fmt.Sprint(resPacket.RequestID)}, { - Key: []byte(types.AttributeKeyResolveStatus), - Value: parseEventAttribute(uint32(resPacket.ResolveStatus)), + Key: types.AttributeKeyResolveStatus, + Value: fmt.Sprint(uint32(resPacket.ResolveStatus)), }, }, }, { Type: types.EventTypeDeactivate, Attributes: []abci.EventAttribute{ { - Key: []byte(types.AttributeKeyValidator), - Value: parseEventAttribute(testapp.Validators[2].ValAddress.String()), + Key: types.AttributeKeyValidator, + Value: fmt.Sprint(testapp.Validators[2].ValAddress.String()), }, }, }, { Type: types.EventTypeDeactivate, Attributes: []abci.EventAttribute{ { - Key: []byte(types.AttributeKeyValidator), - Value: parseEventAttribute(testapp.Validators[0].ValAddress.String()), + Key: types.AttributeKeyValidator, + Value: fmt.Sprint(testapp.Validators[0].ValAddress.String()), }, }, }, { Type: types.EventTypeDeactivate, Attributes: []abci.EventAttribute{ { - Key: []byte(types.AttributeKeyValidator), - Value: parseEventAttribute(testapp.Validators[1].ValAddress.String()), + Key: types.AttributeKeyValidator, + Value: fmt.Sprint(testapp.Validators[1].ValAddress.String()), }, }, }} diff --git a/x/oracle/handler_test.go b/x/oracle/handler_test.go index f024fe3a3..84e99e222 100644 --- a/x/oracle/handler_test.go +++ b/x/oracle/handler_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" "github.com/bandprotocol/go-owasm/api" @@ -53,7 +53,7 @@ func TestCreateDataSourceSuccess(t *testing.T) { event := abci.Event{ Type: types.EventTypeCreateDataSource, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: []byte(fmt.Sprintf("%d", dsCount+1))}, + {Key: types.AttributeKeyID, Value: fmt.Sprintf("%d", dsCount+1)}, }, } require.Equal(t, abci.Event(event), res.Events[0]) @@ -120,7 +120,7 @@ func TestEditDataSourceSuccess(t *testing.T) { ) event := abci.Event{ Type: types.EventTypeEditDataSource, - Attributes: []abci.EventAttribute{{Key: []byte(types.AttributeKeyID), Value: []byte("1")}}, + Attributes: []abci.EventAttribute{{Key: types.AttributeKeyID, Value: "1"}}, } require.Equal(t, abci.Event(event), res.Events[0]) } @@ -208,7 +208,7 @@ func TestCreateOracleScriptSuccess(t *testing.T) { event := abci.Event{ Type: types.EventTypeCreateOracleScript, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: []byte(fmt.Sprintf("%d", osCount+1))}, + {Key: types.AttributeKeyID, Value: fmt.Sprintf("%d", osCount+1)}, }, } require.Equal(t, abci.Event(event), res.Events[0]) @@ -247,7 +247,7 @@ func TestCreateGzippedOracleScriptSuccess(t *testing.T) { event := abci.Event{ Type: types.EventTypeCreateOracleScript, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: []byte(fmt.Sprintf("%d", osCount+1))}, + {Key: types.AttributeKeyID, Value: fmt.Sprintf("%d", osCount+1)}, }, } require.Equal(t, abci.Event(event), res.Events[0]) @@ -327,7 +327,7 @@ func TestEditOracleScriptSuccess(t *testing.T) { event := abci.Event{ Type: types.EventTypeEditOracleScript, - Attributes: []abci.EventAttribute{{Key: []byte(types.AttributeKeyID), Value: []byte("1")}}, + Attributes: []abci.EventAttribute{{Key: types.AttributeKeyID, Value: "1"}}, } require.Equal(t, abci.Event(event), res.Events[0]) } @@ -436,8 +436,8 @@ func TestRequestDataSuccess(t *testing.T) { event := abci.Event{ Type: authtypes.EventTypeCoinSpent, Attributes: []abci.EventAttribute{ - {Key: []byte(authtypes.AttributeKeySpender), Value: []byte(testapp.FeePayer.Address.String())}, - {Key: []byte(sdk.AttributeKeyAmount), Value: []byte("2000000uband")}, + {Key: authtypes.AttributeKeySpender, Value: testapp.FeePayer.Address.String()}, + {Key: sdk.AttributeKeyAmount, Value: "2000000uband"}, }, } require.Equal(t, abci.Event(event), res.Events[0]) @@ -446,8 +446,8 @@ func TestRequestDataSuccess(t *testing.T) { event = abci.Event{ Type: authtypes.EventTypeCoinReceived, Attributes: []abci.EventAttribute{ - {Key: []byte(authtypes.AttributeKeyReceiver), Value: []byte(testapp.Treasury.Address.String())}, - {Key: []byte(sdk.AttributeKeyAmount), Value: []byte("2000000uband")}, + {Key: authtypes.AttributeKeyReceiver, Value: testapp.Treasury.Address.String()}, + {Key: sdk.AttributeKeyAmount, Value: "2000000uband"}, }, } require.Equal(t, abci.Event(event), res.Events[1]) @@ -456,9 +456,9 @@ func TestRequestDataSuccess(t *testing.T) { event = abci.Event{ Type: authtypes.EventTypeTransfer, Attributes: []abci.EventAttribute{ - {Key: []byte(authtypes.AttributeKeyRecipient), Value: []byte(testapp.Treasury.Address.String())}, - {Key: []byte(authtypes.AttributeKeySender), Value: []byte(testapp.FeePayer.Address.String())}, - {Key: []byte(sdk.AttributeKeyAmount), Value: []byte("2000000uband")}, + {Key: authtypes.AttributeKeyRecipient, Value: testapp.Treasury.Address.String()}, + {Key: authtypes.AttributeKeySender, Value: testapp.FeePayer.Address.String()}, + {Key: sdk.AttributeKeyAmount, Value: "2000000uband"}, }, } require.Equal(t, abci.Event(event), res.Events[2]) @@ -467,7 +467,7 @@ func TestRequestDataSuccess(t *testing.T) { event = abci.Event{ Type: sdk.EventTypeMessage, Attributes: []abci.EventAttribute{ - {Key: []byte(authtypes.AttributeKeySender), Value: []byte(testapp.FeePayer.Address.String())}, + {Key: authtypes.AttributeKeySender, Value: testapp.FeePayer.Address.String()}, }, } require.Equal(t, abci.Event(event), res.Events[3]) @@ -477,49 +477,49 @@ func TestRequestDataSuccess(t *testing.T) { event = abci.Event{ Type: types.EventTypeRequest, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: []byte("1")}, - {Key: []byte(types.AttributeKeyClientID), Value: []byte("CID")}, - {Key: []byte(types.AttributeKeyOracleScriptID), Value: []byte("1")}, - {Key: []byte(types.AttributeKeyCalldata), Value: []byte("62656562")}, // "beeb" in hex - {Key: []byte(types.AttributeKeyAskCount), Value: []byte("2")}, - {Key: []byte(types.AttributeKeyMinCount), Value: []byte("2")}, - {Key: []byte(types.AttributeKeyGasUsed), Value: []byte("5294700000")}, - {Key: []byte(types.AttributeKeyTotalFees), Value: []byte("6000000uband")}, - {Key: []byte(types.AttributeKeyValidator), Value: []byte(testapp.Validators[2].ValAddress.String())}, - {Key: []byte(types.AttributeKeyValidator), Value: []byte(testapp.Validators[0].ValAddress.String())}, + {Key: types.AttributeKeyID, Value: "1"}, + {Key: types.AttributeKeyClientID, Value: "CID"}, + {Key: types.AttributeKeyOracleScriptID, Value: "1"}, + {Key: types.AttributeKeyCalldata, Value: "62656562"}, // "beeb" in hex + {Key: types.AttributeKeyAskCount, Value: "2"}, + {Key: types.AttributeKeyMinCount, Value: "2"}, + {Key: types.AttributeKeyGasUsed, Value: "5294700000"}, + {Key: types.AttributeKeyTotalFees, Value: "6000000uband"}, + {Key: types.AttributeKeyValidator, Value: testapp.Validators[2].ValAddress.String()}, + {Key: types.AttributeKeyValidator, Value: testapp.Validators[0].ValAddress.String()}, }, } require.Equal(t, abci.Event(event), res.Events[12]) event = abci.Event{ Type: types.EventTypeRawRequest, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyDataSourceID), Value: []byte("1")}, - {Key: []byte(types.AttributeKeyDataSourceHash), Value: []byte(testapp.DataSources[1].Filename)}, - {Key: []byte(types.AttributeKeyExternalID), Value: []byte("1")}, - {Key: []byte(types.AttributeKeyCalldata), Value: []byte("beeb")}, - {Key: []byte(types.AttributeKeyFee), Value: []byte("1000000uband")}, + {Key: types.AttributeKeyDataSourceID, Value: "1"}, + {Key: types.AttributeKeyDataSourceHash, Value: testapp.DataSources[1].Filename}, + {Key: types.AttributeKeyExternalID, Value: "1"}, + {Key: types.AttributeKeyCalldata, Value: "beeb"}, + {Key: types.AttributeKeyFee, Value: "1000000uband"}, }, } require.Equal(t, abci.Event(event), res.Events[13]) event = abci.Event{ Type: types.EventTypeRawRequest, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyDataSourceID), Value: []byte("2")}, - {Key: []byte(types.AttributeKeyDataSourceHash), Value: []byte(testapp.DataSources[2].Filename)}, - {Key: []byte(types.AttributeKeyExternalID), Value: []byte("2")}, - {Key: []byte(types.AttributeKeyCalldata), Value: []byte("beeb")}, - {Key: []byte(types.AttributeKeyFee), Value: []byte("1000000uband")}, + {Key: types.AttributeKeyDataSourceID, Value: "2"}, + {Key: types.AttributeKeyDataSourceHash, Value: testapp.DataSources[2].Filename}, + {Key: types.AttributeKeyExternalID, Value: "2"}, + {Key: types.AttributeKeyCalldata, Value: "beeb"}, + {Key: types.AttributeKeyFee, Value: "1000000uband"}, }, } require.Equal(t, abci.Event(event), res.Events[14]) event = abci.Event{ Type: types.EventTypeRawRequest, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyDataSourceID), Value: []byte("3")}, - {Key: []byte(types.AttributeKeyDataSourceHash), Value: []byte(testapp.DataSources[3].Filename)}, - {Key: []byte(types.AttributeKeyExternalID), Value: []byte("3")}, - {Key: []byte(types.AttributeKeyCalldata), Value: []byte("beeb")}, - {Key: []byte(types.AttributeKeyFee), Value: []byte("1000000uband")}, + {Key: types.AttributeKeyDataSourceID, Value: "3"}, + {Key: types.AttributeKeyDataSourceHash, Value: testapp.DataSources[3].Filename}, + {Key: types.AttributeKeyExternalID, Value: "3"}, + {Key: types.AttributeKeyCalldata, Value: "beeb"}, + {Key: types.AttributeKeyFee, Value: "1000000uband"}, }, } require.Equal(t, abci.Event(event), res.Events[15]) @@ -657,8 +657,8 @@ func TestReportSuccess(t *testing.T) { event := abci.Event{ Type: types.EventTypeReport, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: []byte("42")}, - {Key: []byte(types.AttributeKeyValidator), Value: []byte(testapp.Validators[0].ValAddress.String())}, + {Key: types.AttributeKeyID, Value: "42"}, + {Key: types.AttributeKeyValidator, Value: testapp.Validators[0].ValAddress.String()}, }, } require.Equal(t, abci.Event(event), res.Events[0]) @@ -669,8 +669,8 @@ func TestReportSuccess(t *testing.T) { event = abci.Event{ Type: types.EventTypeReport, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: []byte("42")}, - {Key: []byte(types.AttributeKeyValidator), Value: []byte(testapp.Validators[1].ValAddress.String())}, + {Key: types.AttributeKeyID, Value: "42"}, + {Key: types.AttributeKeyValidator, Value: testapp.Validators[1].ValAddress.String()}, }, } require.Equal(t, abci.Event(event), res.Events[0]) @@ -682,8 +682,8 @@ func TestReportSuccess(t *testing.T) { event = abci.Event{ Type: types.EventTypeReport, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyID), Value: []byte("42")}, - {Key: []byte(types.AttributeKeyValidator), Value: []byte(testapp.Validators[2].ValAddress.String())}, + {Key: types.AttributeKeyID, Value: "42"}, + {Key: types.AttributeKeyValidator, Value: testapp.Validators[2].ValAddress.String()}, }, } require.Equal(t, abci.Event(event), res.Events[0]) @@ -798,7 +798,7 @@ func TestActivateSuccess(t *testing.T) { event := abci.Event{ Type: types.EventTypeActivate, Attributes: []abci.EventAttribute{ - {Key: []byte(types.AttributeKeyValidator), Value: []byte(testapp.Validators[0].ValAddress.String())}, + {Key: types.AttributeKeyValidator, Value: testapp.Validators[0].ValAddress.String()}, }, } require.Equal(t, abci.Event(event), res.Events[0]) diff --git a/x/oracle/ibc_module.go b/x/oracle/ibc_module.go index 993418aaf..6576e98e2 100644 --- a/x/oracle/ibc_module.go +++ b/x/oracle/ibc_module.go @@ -12,10 +12,10 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v5/modules/core/24-host" - ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" + ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ) // IBCModule implements the ICS26 interface for oracle given the oracle keeper. diff --git a/x/oracle/ibc_test.go b/x/oracle/ibc_test.go index 4397ade3d..5f888b2d6 100644 --- a/x/oracle/ibc_test.go +++ b/x/oracle/ibc_test.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/stretchr/testify/suite" "github.com/bandprotocol/chain/v2/pkg/obi" @@ -41,6 +41,7 @@ func (suite *OracleTestSuite) SetupTest() { suite.coordinator.Setup(suite.path) } +// 0.47 TODO: check if this function is working, maybe return sequence number instead func (suite *OracleTestSuite) sendOracleRequestPacket( path *ibctesting.Path, seq uint64, @@ -57,7 +58,7 @@ func (suite *OracleTestSuite) sendOracleRequestPacket( timeoutHeight, 0, ) - err := path.EndpointA.SendPacket(packet) + _, err := path.EndpointA.SendPacket(timeoutHeight, 0, oracleRequestPacket.GetBytes()) suite.Require().NoError(err) return packet } diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go index 268415a36..b1c706a50 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -5,10 +5,10 @@ import ( "encoding/hex" "fmt" + "github.com/cometbft/cometbft/crypto/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/authz" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/tendermint/tendermint/crypto/secp256k1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 36fb376db..7d22fc29b 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "fmt" "time" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,8 +13,7 @@ import ( capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - host "github.com/cosmos/ibc-go/v5/modules/core/24-host" - "github.com/tendermint/tendermint/libs/log" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" owasm "github.com/bandprotocol/go-owasm/api" diff --git a/x/oracle/keeper/owasm_test.go b/x/oracle/keeper/owasm_test.go index c0f7d63d1..841aeef18 100644 --- a/x/oracle/keeper/owasm_test.go +++ b/x/oracle/keeper/owasm_test.go @@ -335,7 +335,7 @@ func TestPrepareRequestNotEnoughFund(t *testing.T) { testapp.Alice.Address, ) _, err := k.PrepareRequest(ctx, m, testapp.Alice.Address, nil) - require.EqualError(t, err, "0uband is smaller than 1000000uband: insufficient funds") + require.EqualError(t, err, "spendable balance is smaller than 1000000uband: insufficient funds") } func TestPrepareRequestInvalidCalldataSize(t *testing.T) { @@ -1059,7 +1059,7 @@ func TestCollectFeeWithEnoughFeeButInsufficientBalance(t *testing.T) { require.Nil(t, coins) // MAX is 100m but have only 1m in account // First ds collect 1m so there no balance enough for next ds but it doesn't touch limit - require.EqualError(t, err, "0uband is smaller than 2000000uband: insufficient funds") + require.EqualError(t, err, "spendable balance is smaller than 2000000uband: insufficient funds") } func TestCollectFeeWithWithManyUnitSuccess(t *testing.T) { diff --git a/x/oracle/keeper/relay.go b/x/oracle/keeper/relay.go index 6740a10d3..837e68264 100644 --- a/x/oracle/keeper/relay.go +++ b/x/oracle/keeper/relay.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/x/oracle/keeper/result.go b/x/oracle/keeper/result.go index d238ed77a..791ac4904 100644 --- a/x/oracle/keeper/result.go +++ b/x/oracle/keeper/result.go @@ -7,9 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" - host "github.com/cosmos/ibc-go/v5/modules/core/24-host" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" "github.com/bandprotocol/chain/v2/x/oracle/types" ) @@ -82,6 +81,7 @@ func (k Keeper) ResolveExpired(ctx sdk.Context, id types.RequestID) { } // SaveResult saves the result packets for the request with the given resolve status and result. +// 0.47 TODO: check validity of this function func (k Keeper) SaveResult( ctx sdk.Context, id types.RequestID, status types.ResolveStatus, result []byte, ) { @@ -104,36 +104,7 @@ func (k Keeper) SaveResult( if r.IBCChannel != nil { sourceChannel := r.IBCChannel.ChannelId sourcePort := r.IBCChannel.PortId - sourceChannelEnd, found := k.channelKeeper.GetChannel(ctx, sourcePort, sourceChannel) - if !found { - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSendPacketFail, - sdk.NewAttribute( - types.AttributeKeyReason, - fmt.Sprintf("Cannot find channel on port ID (%s) channel ID (%s)", sourcePort, sourceChannel), - ), - )) - return - } - destinationPort := sourceChannelEnd.Counterparty.PortId - destinationChannel := sourceChannelEnd.Counterparty.ChannelId - sequence, found := k.channelKeeper.GetNextSequenceSend( - ctx, sourcePort, sourceChannel, - ) - if !found { - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeSendPacketFail, - sdk.NewAttribute( - types.AttributeKeyReason, - fmt.Sprintf( - "Cannot get sequence number on source port: %s, source channel: %s", - sourcePort, - sourceChannel, - ), - ), - )) - return - } + channelCap, ok := k.scopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(sourcePort, sourceChannel)) if !ok { ctx.EventManager().EmitEvent(sdk.NewEvent( @@ -147,18 +118,17 @@ func (k Keeper) SaveResult( r.ClientID, id, reportCount, int64(r.RequestTime), ctx.BlockTime().Unix(), status, result, ) - packet := channeltypes.NewPacket( - packetData.GetBytes(), - sequence, + // 0.47 TODO: check validity of send packet + // 0.47 TODO: check if we want sequence number + if _, err := k.channelKeeper.SendPacket( + ctx, + channelCap, sourcePort, sourceChannel, - destinationPort, - destinationChannel, clienttypes.NewHeight(0, 0), uint64(ctx.BlockTime().UnixNano()+packetExpireTime), - ) - - if err := k.channelKeeper.SendPacket(ctx, channelCap, packet); err != nil { + packetData.GetBytes(), + ); err != nil { ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeSendPacketFail, sdk.NewAttribute(types.AttributeKeyReason, fmt.Sprintf("Unable to send packet: %s", err)), diff --git a/x/oracle/keeper/snapshotter.go b/x/oracle/keeper/snapshotter.go index 32eb90b46..33d8fea4a 100644 --- a/x/oracle/keeper/snapshotter.go +++ b/x/oracle/keeper/snapshotter.go @@ -4,12 +4,11 @@ import ( "errors" "io" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" snapshot "github.com/cosmos/cosmos-sdk/snapshots/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - protoio "github.com/gogo/protobuf/io" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" "github.com/bandprotocol/chain/v2/pkg/filecache" "github.com/bandprotocol/chain/v2/pkg/gzip" @@ -45,7 +44,7 @@ func (os *OracleSnapshotter) SupportedFormats() []uint32 { return []uint32{SnapshotFormat} } -func (os *OracleSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) error { +func (os *OracleSnapshotter) SnapshotExtension(height uint64, payloadWriter snapshot.ExtensionPayloadWriter) error { cacheMS, err := os.cms.CacheMultiStoreWithVersion(int64(height)) if err != nil { return err @@ -57,7 +56,7 @@ func (os *OracleSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) // write all oracle scripts to snapshot oracleScripts := os.keeper.GetAllOracleScripts(ctx) for _, oracleScript := range oracleScripts { - if err := writeFileToSnapshot(protoWriter, oracleScript.Filename, os.keeper, seenBefore); err != nil { + if err := writeFileToSnapshot(payloadWriter, oracleScript.Filename, os.keeper, seenBefore); err != nil { return err } } @@ -65,7 +64,7 @@ func (os *OracleSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) // write all data sources to snapshot dataSources := os.keeper.GetAllDataSources(ctx) for _, dataSource := range dataSources { - if err := writeFileToSnapshot(protoWriter, dataSource.Filename, os.keeper, seenBefore); err != nil { + if err := writeFileToSnapshot(payloadWriter, dataSource.Filename, os.keeper, seenBefore); err != nil { return err } } @@ -81,21 +80,23 @@ func (os *OracleSnapshotter) PruneSnapshotHeight(height int64) { func (os *OracleSnapshotter) SetSnapshotInterval(snapshotInterval uint64) { } -func (os *OracleSnapshotter) Restore( - height uint64, format uint32, protoReader protoio.Reader, -) (snapshot.SnapshotItem, error) { +// 0.47 TODO: check validity of this function +func (os *OracleSnapshotter) RestoreExtension( + height uint64, format uint32, payloadReader snapshot.ExtensionPayloadReader, +) error { if format == SnapshotFormat { - return os.processAllItems(height, protoReader, restoreV1, finalizeV1) + return os.processAllItems(height, payloadReader, restoreV1, finalizeV1) } - return snapshot.SnapshotItem{}, snapshot.ErrUnknownFormat + return snapshot.ErrUnknownFormat } +// 0.47 TODO: check validity of this function func (os *OracleSnapshotter) processAllItems( height uint64, - protoReader protoio.Reader, + payloadReader snapshot.ExtensionPayloadReader, restore func(sdk.Context, *Keeper, []byte, map[string]bool) error, finalize func(sdk.Context, *Keeper, map[string]bool) error, -) (snapshot.SnapshotItem, error) { +) error { ctx := sdk.NewContext(os.cms, tmproto.Header{Height: int64(height)}, false, log.NewNopLogger()) // get all filename that we need to find and construct a map to store found status @@ -109,32 +110,24 @@ func (os *OracleSnapshotter) processAllItems( foundCode[dataSource.Filename] = false } - // keep the last snapshot item that is not for our module and return it for snapshot manager to handle. - var item snapshot.SnapshotItem for { - item = snapshot.SnapshotItem{} - err := protoReader.ReadMsg(&item) + payload, err := payloadReader() if err == io.EOF { break } else if err != nil { - return snapshot.SnapshotItem{}, sdkerrors.Wrap(err, "invalid protobuf message") - } - - payload := item.GetExtensionPayload() - if payload == nil { - break + return sdkerrors.Wrap(err, "invalid protobuf message") } - if err := restore(ctx, os.keeper, payload.Payload, foundCode); err != nil { - return snapshot.SnapshotItem{}, sdkerrors.Wrap(err, "processing snapshot item") + if err := restore(ctx, os.keeper, payload, foundCode); err != nil { + return sdkerrors.Wrap(err, "processing snapshot item") } } - return item, finalize(ctx, os.keeper, foundCode) + return finalize(ctx, os.keeper, foundCode) } func writeFileToSnapshot( - protoWriter protoio.Writer, + payloadWriter snapshot.ExtensionPayloadWriter, filename string, k *Keeper, seenBefore map[string]bool, @@ -158,7 +151,7 @@ func writeFileToSnapshot( } // write it to snapshot - if err = snapshot.WriteExtensionItem(protoWriter, compressBytes); err != nil { + if err = payloadWriter(compressBytes); err != nil { return err } diff --git a/x/oracle/keeper/snapshotter_integration_test.go b/x/oracle/keeper/snapshotter_integration_test.go index 595fee806..16019930c 100644 --- a/x/oracle/keeper/snapshotter_integration_test.go +++ b/x/oracle/keeper/snapshotter_integration_test.go @@ -5,10 +5,10 @@ import ( "github.com/bandprotocol/chain/v2/testing/testapp" "github.com/bandprotocol/chain/v2/x/oracle/keeper" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) func TestSnapshotter(t *testing.T) { diff --git a/x/oracle/keeper/validator_status.go b/x/oracle/keeper/validator_status.go index 58b09448e..cc766418e 100644 --- a/x/oracle/keeper/validator_status.go +++ b/x/oracle/keeper/validator_status.go @@ -3,10 +3,10 @@ package keeper import ( "time" + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" distr "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - abci "github.com/tendermint/tendermint/abci/types" "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/x/oracle/keeper/validator_status_test.go b/x/oracle/keeper/validator_status_test.go index e681f2f83..94dbac3f9 100644 --- a/x/oracle/keeper/validator_status_test.go +++ b/x/oracle/keeper/validator_status_test.go @@ -4,12 +4,12 @@ import ( "testing" "time" + abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" "github.com/stretchr/testify/require" - abci "github.com/tendermint/tendermint/abci/types" "github.com/bandprotocol/chain/v2/testing/testapp" "github.com/bandprotocol/chain/v2/x/oracle/keeper" diff --git a/x/oracle/module.go b/x/oracle/module.go index 41ad6057a..38ccc4c8d 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -8,13 +8,13 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - porttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" - abci "github.com/tendermint/tendermint/abci/types" + porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/bandprotocol/chain/v2/x/oracle/client/cli" "github.com/bandprotocol/chain/v2/x/oracle/keeper" @@ -93,20 +93,21 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { // TODO } -// Deprecated: Route returns the message routing key for the bank module. -func (am AppModule) Route() sdk.Route { - return sdk.Route{} -} +// 0.47 TODO: delete these functions +// // Deprecated: Route returns the message routing key for the bank module. +// func (am AppModule) Route() sdk.Route { +// return sdk.Route{} +// } -// QuerierRoute returns the oracle module's querier route name. -func (AppModule) QuerierRoute() string { - return types.QuerierRoute -} +// // QuerierRoute returns the oracle module's querier route name. +// func (AppModule) QuerierRoute() string { +// return types.QuerierRoute +// } -// LegacyQuerierHandler implements the AppModule interface -func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { - return nil -} +// // LegacyQuerierHandler implements the AppModule interface +// func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { +// return nil +// } // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { diff --git a/x/oracle/types/exec_env_test.go b/x/oracle/types/exec_env_test.go index 9da46175d..c8b8d12cb 100644 --- a/x/oracle/types/exec_env_test.go +++ b/x/oracle/types/exec_env_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" + "github.com/cometbft/cometbft/crypto/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/bandprotocol/go-owasm/api" ) diff --git a/x/oracle/types/expected_keepers.go b/x/oracle/types/expected_keepers.go index f84bcf89a..b3e5a10fc 100644 --- a/x/oracle/types/expected_keepers.go +++ b/x/oracle/types/expected_keepers.go @@ -10,8 +10,8 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" + ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ) // AccountKeeper defines the expected account keeper. @@ -47,9 +47,17 @@ type DistrKeeper interface { // ChannelKeeper defines the expected IBC channel keeper type ChannelKeeper interface { - GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) + GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel ibcchanneltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) - SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error + SendPacket( + ctx sdk.Context, + chanCap *capabilitytypes.Capability, + sourcePort string, + sourceChannel string, + timeoutHeight ibcclienttypes.Height, + timeoutTimestamp uint64, + data []byte, + ) (sequence uint64, err error) } // PortKeeper defines the expected IBC port keeper diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index f850c1bc7..a49a3e6de 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -5,8 +5,8 @@ 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" diff --git a/x/oracle/types/msgs_test.go b/x/oracle/types/msgs_test.go index a71dc5f06..4634feb7f 100644 --- a/x/oracle/types/msgs_test.go +++ b/x/oracle/types/msgs_test.go @@ -4,9 +4,9 @@ import ( "strings" "testing" + "github.com/cometbft/cometbft/crypto/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/crypto/secp256k1" ) var ( diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index c1b083d3e..6b127661d 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -9,9 +9,9 @@ import ( _ "github.com/cosmos/cosmos-sdk/codec/types" 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" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "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" @@ -2894,7 +2894,7 @@ func (m *ValidatorStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Since, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Since):]) + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Since, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Since):]) if err2 != nil { return 0, err2 } @@ -3536,7 +3536,7 @@ func (m *ValidatorStatus) Size() (n int) { if m.IsActive { n += 2 } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Since) + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Since) n += 1 + l + sovOracle(uint64(l)) return n } @@ -5773,7 +5773,7 @@ func (m *ValidatorStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Since, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Since, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index c91081c84..73b9fb972 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -6,12 +6,12 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-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" diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index 110f4e2ab..731401a60 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -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_Counts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCountsRequest @@ -650,12 +652,14 @@ func local_request_Query_RequestVerification_0(ctx context.Context, marshaler ru // 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_Counts_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 { @@ -663,6 +667,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Counts_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) @@ -676,6 +681,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Data_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 { @@ -683,6 +690,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Data_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) @@ -696,6 +704,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_DataSource_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 { @@ -703,6 +713,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_DataSource_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) @@ -716,6 +727,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_OracleScript_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 { @@ -723,6 +736,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_OracleScript_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) @@ -736,6 +750,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Request_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 { @@ -743,6 +759,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Request_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) @@ -756,6 +773,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_PendingRequests_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 { @@ -763,6 +782,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_PendingRequests_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) @@ -776,6 +796,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Validator_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 { @@ -783,6 +805,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Validator_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) @@ -796,6 +819,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_IsReporter_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 { @@ -803,6 +828,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_IsReporter_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) @@ -816,6 +842,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Reporters_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 { @@ -823,6 +851,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Reporters_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) @@ -836,6 +865,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ActiveValidators_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 { @@ -843,6 +874,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ActiveValidators_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) @@ -856,6 +888,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv 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 { @@ -863,6 +897,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) @@ -876,6 +911,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_RequestSearch_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 { @@ -883,6 +920,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_RequestSearch_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) @@ -896,6 +934,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_RequestPrice_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 { @@ -903,6 +943,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_RequestPrice_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) @@ -916,6 +957,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_RequestVerification_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 { @@ -923,6 +966,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_RequestVerification_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) @@ -1258,33 +1302,33 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Counts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "counts"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Counts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "counts"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Data_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "data", "data_hash"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Data_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "data", "data_hash"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DataSource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "data_sources", "data_source_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_DataSource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "data_sources", "data_source_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_OracleScript_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "oracle_scripts", "oracle_script_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_OracleScript_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "oracle_scripts", "oracle_script_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Request_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "requests", "request_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Request_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "requests", "request_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_PendingRequests_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "pending_requests", "validator_address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_PendingRequests_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "pending_requests", "validator_address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Validator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "validators", "validator_address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Validator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "validators", "validator_address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_IsReporter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"oracle", "v1", "reporter", "validator_address", "reporter_address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_IsReporter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"oracle", "v1", "reporter", "validator_address", "reporter_address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Reporters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "reporters", "validator_address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Reporters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"oracle", "v1", "reporters", "validator_address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ActiveValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "active_validators"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ActiveValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "active_validators"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RequestSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "request_search"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_RequestSearch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "request_search"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RequestPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "request_prices"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_RequestPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "request_prices"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RequestVerification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "verify_request"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_RequestVerification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"oracle", "v1", "verify_request"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 1e7aa43f2..7367068f2 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -10,9 +10,9 @@ import ( _ "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" - _ "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" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/yoda/context.go b/yoda/context.go index f0df6dcde..ed5d5c182 100644 --- a/yoda/context.go +++ b/yoda/context.go @@ -5,9 +5,9 @@ import ( "sync/atomic" "time" + rpcclient "github.com/cometbft/cometbft/rpc/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" - rpcclient "github.com/tendermint/tendermint/rpc/client" "github.com/bandprotocol/chain/v2/pkg/filecache" "github.com/bandprotocol/chain/v2/x/oracle/types" diff --git a/yoda/execute.go b/yoda/execute.go index 4e07da500..031e294be 100644 --- a/yoda/execute.go +++ b/yoda/execute.go @@ -6,6 +6,7 @@ import ( "strings" "time" + ctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" "github.com/cosmos/cosmos-sdk/crypto/keyring" @@ -15,7 +16,6 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/authz" - ctypes "github.com/tendermint/tendermint/rpc/core/types" band "github.com/bandprotocol/chain/v2/app" "github.com/bandprotocol/chain/v2/x/oracle/types" diff --git a/yoda/handler.go b/yoda/handler.go index 137eea50d..4e968ca8d 100644 --- a/yoda/handler.go +++ b/yoda/handler.go @@ -4,10 +4,10 @@ import ( "encoding/hex" "strconv" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/crypto/tmhash" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/tendermint/tendermint/abci/types" - "github.com/tendermint/tendermint/crypto/tmhash" "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/yoda/logger.go b/yoda/logger.go index 5743ee995..fa7d4a3d6 100644 --- a/yoda/logger.go +++ b/yoda/logger.go @@ -3,8 +3,8 @@ package yoda import ( "os" + "github.com/cometbft/cometbft/libs/log" "github.com/kyokomi/emoji" - "github.com/tendermint/tendermint/libs/log" ) type Logger struct { diff --git a/yoda/run.go b/yoda/run.go index 40b5e445d..d465cb7d6 100644 --- a/yoda/run.go +++ b/yoda/run.go @@ -7,13 +7,13 @@ import ( "sync" "time" + "github.com/cometbft/cometbft/libs/log" + httpclient "github.com/cometbft/cometbft/rpc/client/http" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/tendermint/tendermint/libs/log" - httpclient "github.com/tendermint/tendermint/rpc/client/http" - tmtypes "github.com/tendermint/tendermint/types" "github.com/bandprotocol/chain/v2/pkg/filecache" From 3bcd2379a26a7e42a4511c51cf11a62462f01f9f Mon Sep 17 00:00:00 2001 From: colmazia Date: Fri, 11 Aug 2023 11:06:36 +0700 Subject: [PATCH 02/44] add simulation, remove encodingConfig, add new gRPC services --- app/app.go | 37 ++++++++++++++++++++-- app/export.go | 4 +-- cmd/bandd/cmd/root.go | 19 +++--------- go.mod | 22 +++++++------ go.sum | 67 ++++++++++++++++------------------------ testing/testapp/setup.go | 4 --- 6 files changed, 79 insertions(+), 74 deletions(-) diff --git a/app/app.go b/app/app.go index 57e7a6acb..19ad5da88 100644 --- a/app/app.go +++ b/app/app.go @@ -7,6 +7,9 @@ import ( "os" "path/filepath" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" + dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" @@ -17,6 +20,8 @@ import ( "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" + runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -107,7 +112,6 @@ import ( owasm "github.com/bandprotocol/go-owasm/api" "github.com/bandprotocol/chain/v2/app/keepers" - bandappparams "github.com/bandprotocol/chain/v2/app/params" "github.com/bandprotocol/chain/v2/app/upgrades" "github.com/bandprotocol/chain/v2/app/upgrades/v2_6" nodeservice "github.com/bandprotocol/chain/v2/client/grpc/node" @@ -183,7 +187,7 @@ var ( ) var ( - _ App = (*BandApp)(nil) + _ runtime.AppI = (*BandApp)(nil) _ servertypes.Application = (*BandApp)(nil) ) @@ -206,6 +210,9 @@ type BandApp struct { // Module manager. mm *module.Manager + // simulation manager + sm *module.SimulationManager + // the configurator configurator module.Configurator } @@ -235,9 +242,11 @@ func SetBech32AddressPrefixesAndBip44CoinTypeAndSeal(config *sdk.Config) { // NewBandApp returns a reference to an initialized BandApp. func NewBandApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, - homePath string, invCheckPeriod uint, encodingConfig bandappparams.EncodingConfig, appOpts servertypes.AppOptions, + homePath string, invCheckPeriod uint, appOpts servertypes.AppOptions, owasmCacheSize uint32, baseAppOptions ...func(*baseapp.BaseApp), ) *BandApp { + encodingConfig := MakeEncodingConfig() + appCodec := encodingConfig.Marshaler legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry @@ -669,6 +678,23 @@ func NewBandApp( app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter()) app.mm.RegisterServices(app.configurator) + autocliv1.RegisterQueryServer( + app.GRPCQueryRouter(), + runtimeservices.NewAutoCLIQueryService(app.mm.Modules), + ) + + reflectionSvc, err := runtimeservices.NewReflectionService() + if err != nil { + panic(err) + } + reflectionv1.RegisterReflectionServiceServer(app.GRPCQueryRouter(), reflectionSvc) + + // create the simulation manager and define the order of the modules for deterministic simulations + overrideModules := map[string]module.AppModuleSimulation{} + app.sm = module.NewSimulationManagerFromAppModules(app.mm.Modules, overrideModules) + + app.sm.RegisterStoreDecoders() + // Initialize stores. app.MountKVStores(keys) app.MountTransientStores(tkeys) @@ -827,6 +853,11 @@ func (app *BandApp) GetSubspace(moduleName string) paramstypes.Subspace { return subspace } +// SimulationManager implements the SimulationApp interface +func (app *BandApp) SimulationManager() *module.SimulationManager { + return app.sm +} + // RegisterAPIRoutes registers all application module routes with the provided // API server. func (app *BandApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig) { diff --git a/app/export.go b/app/export.go index 4a12caf07..f66fb8898 100644 --- a/app/export.go +++ b/app/export.go @@ -15,7 +15,7 @@ import ( // ExportAppStateAndValidators export the state of band for a genesis file func (app *BandApp) 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()}) @@ -28,7 +28,7 @@ func (app *BandApp) 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 diff --git a/cmd/bandd/cmd/root.go b/cmd/bandd/cmd/root.go index a9aef9fd4..091ad36e2 100644 --- a/cmd/bandd/cmd/root.go +++ b/cmd/bandd/cmd/root.go @@ -94,10 +94,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { config.Cmd(), ) - ac := appCreator{ - encCfg: encodingConfig, - } - server.AddCommands(rootCmd, band.DefaultNodeHome, ac.newApp, ac.appExport, addModuleInitFlags) + server.AddCommands(rootCmd, band.DefaultNodeHome, newApp, appExport, addModuleInitFlags) // add keybase, auxiliary RPC, query, and tx child commands rootCmd.AddCommand( @@ -176,12 +173,8 @@ func txCommand() *cobra.Command { return cmd } -type appCreator struct { - encCfg params.EncodingConfig -} - // newApp is an AppCreator -func (ac appCreator) newApp( +func newApp( logger log.Logger, db dbm.DB, traceStore io.Writer, @@ -198,7 +191,6 @@ func (ac appCreator) newApp( logger, db, traceStore, true, skipUpgradeHeights, cast.ToString(appOpts.Get(flags.FlagHome)), cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - ac.encCfg, appOpts, cast.ToUint32(appOpts.Get(flagWithOwasmCacheSize)), baseappOptions..., @@ -207,8 +199,8 @@ func (ac appCreator) newApp( return bandApp } -// 0.47 TODO: check if we need to update this function -func (ac appCreator) appExport( +// 0.47 TODO: check if function is working +func appExport( logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, appOpts servertypes.AppOptions, modulesToExport []string) (servertypes.ExportedApp, error) { homePath, ok := appOpts.Get(flags.FlagHome).(string) @@ -229,7 +221,6 @@ func (ac appCreator) appExport( map[int64]bool{}, homePath, cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), - ac.encCfg, appOpts, cast.ToUint32(appOpts.Get(flagWithOwasmCacheSize)), ) @@ -240,5 +231,5 @@ func (ac appCreator) appExport( } } - return bandApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) + return bandApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } diff --git a/go.mod b/go.mod index 1b6fb2a8f..378eab83b 100644 --- a/go.mod +++ b/go.mod @@ -24,11 +24,10 @@ require ( github.com/peterbourgon/diskv v2.0.1+incompatible github.com/prometheus/client_golang v1.14.0 github.com/rakyll/statik v0.1.7 - github.com/regen-network/cosmos-proto v0.3.1 - github.com/spf13/cast v1.5.0 + github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.15.0 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.4 google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 google.golang.org/grpc v1.54.0 google.golang.org/protobuf v1.30.0 @@ -66,7 +65,7 @@ require ( github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v0.20.0 // indirect - github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect @@ -124,7 +123,7 @@ require ( github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-isatty v0.0.19 // 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 @@ -152,23 +151,25 @@ require ( github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect + github.com/ugorji/go/codec v1.2.7 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/crypto v0.12.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/net v0.9.0 // indirect + golang.org/x/net v0.10.0 // indirect golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/sys v0.7.0 // indirect - golang.org/x/term v0.7.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.110.0 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.0 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v0.5.5 // indirect sigs.k8s.io/yaml v1.3.0 // indirect @@ -176,5 +177,6 @@ require ( replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 google.golang.org/grpc => google.golang.org/grpc v1.53.0 ) diff --git a/go.sum b/go.sum index 3b8c864e0..7d69a3a30 100644 --- a/go.sum +++ b/go.sum @@ -597,8 +597,8 @@ 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.0.1 h1:NIBNRWjlOoFvFQu1ZlgwkaSeHO5avf4C1YQiWegt8jw= github.com/cosmos/ibc-go/v7 v7.0.1/go.mod h1:vEaapV6nuLPQlS+g8IKmxMo6auPi0i7HMv1PhViht/E= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= -github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= +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= @@ -683,10 +683,9 @@ github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/ 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/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -731,7 +730,6 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq 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/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= 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= @@ -840,7 +838,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/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -1068,8 +1065,8 @@ 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.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-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= @@ -1129,7 +1126,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/oasisprotocol/oasis-core/go v0.2202.7 h1:BAaqQMc474ctQeith+vkckPXi7Lpgag+9QI0QpUK60g= github.com/oasisprotocol/oasis-core/go v0.2202.7/go.mod h1:hKUgtuPPq371HokUQL5ashT5MZLZxK/VkWNKRLb9m+w= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -1141,16 +1137,11 @@ 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/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.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= 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= @@ -1237,8 +1228,6 @@ 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/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= 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= @@ -1284,8 +1273,8 @@ github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcD github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= 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= @@ -1317,16 +1306,14 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +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 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/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= @@ -1345,11 +1332,12 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1 github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -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 v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= 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/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= 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= @@ -1426,8 +1414,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= 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= @@ -1522,7 +1510,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= @@ -1543,8 +1530,8 @@ golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +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= @@ -1646,7 +1633,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= @@ -1691,22 +1677,22 @@ golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBc 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.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.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.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.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= 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= @@ -1719,8 +1705,8 @@ 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.6.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.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.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= @@ -1780,7 +1766,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= @@ -2048,9 +2033,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= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= 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= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/testing/testapp/setup.go b/testing/testapp/setup.go index 7c4f9a4fb..2d3a42743 100644 --- a/testing/testapp/setup.go +++ b/testing/testapp/setup.go @@ -219,7 +219,6 @@ func NewTestApp(chainID string, logger log.Logger) *TestingApp { } // db := dbm.NewMemDB() db, _ := dbm.NewGoLevelDB("db", dir) - encCdc := bandapp.MakeEncodingConfig() snapshotDir := filepath.Join(dir, "data", "snapshots") snapshotDB, err := dbm.NewDB("metadata", dbm.GoLevelDBBackend, snapshotDir) @@ -245,7 +244,6 @@ func NewTestApp(chainID string, logger log.Logger) *TestingApp { map[int64]bool{}, dir, 0, - encCdc, EmptyAppOptions{}, 100, baseapp.SetSnapshot(snapshotStore, snapshotOptions), @@ -400,7 +398,6 @@ func setup(withGenesis bool, invCheckPeriod uint, chainID string) (*TestingApp, panic(err) } db := dbm.NewMemDB() - encCdc := bandapp.MakeEncodingConfig() snapshotDir := filepath.Join(dir, "data", "snapshots") snapshotDB, err := dbm.NewDB("metadata", dbm.GoLevelDBBackend, snapshotDir) @@ -426,7 +423,6 @@ func setup(withGenesis bool, invCheckPeriod uint, chainID string) (*TestingApp, map[int64]bool{}, dir, 0, - encCdc, EmptyAppOptions{}, 0, baseapp.SetSnapshot(snapshotStore, snapshotOptions), From 91a0fe602ce9ffb85c807f4c5618b9d72c2c49db Mon Sep 17 00:00:00 2001 From: colmazia Date: Fri, 11 Aug 2023 13:22:46 +0700 Subject: [PATCH 03/44] move homePath & invCheckPeriod to appOptions --- app/app.go | 20 ++++++++++++++------ cmd/bandd/cmd/root.go | 4 ---- testing/testapp/setup.go | 19 +++++++++++++------ 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/app/app.go b/app/app.go index 19ad5da88..f2816f3c5 100644 --- a/app/app.go +++ b/app/app.go @@ -17,11 +17,13 @@ import ( tmos "github.com/cometbft/cometbft/libs/os" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services" + "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" @@ -200,8 +202,6 @@ type BandApp struct { appCodec codec.Codec interfaceRegistry types.InterfaceRegistry - invCheckPeriod uint - // keys to access the substores. keys map[string]*storetypes.KVStoreKey tkeys map[string]*storetypes.TransientStoreKey @@ -241,9 +241,14 @@ func SetBech32AddressPrefixesAndBip44CoinTypeAndSeal(config *sdk.Config) { // NewBandApp returns a reference to an initialized BandApp. func NewBandApp( - logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, - homePath string, invCheckPeriod uint, appOpts servertypes.AppOptions, - owasmCacheSize uint32, baseAppOptions ...func(*baseapp.BaseApp), + logger log.Logger, + db dbm.DB, + traceStore io.Writer, + loadLatest bool, + skipUpgradeHeights map[int64]bool, + appOpts servertypes.AppOptions, + owasmCacheSize uint32, + baseAppOptions ...func(*baseapp.BaseApp), ) *BandApp { encodingConfig := MakeEncodingConfig() @@ -286,7 +291,6 @@ func NewBandApp( legacyAmino: legacyAmino, appCodec: appCodec, interfaceRegistry: interfaceRegistry, - invCheckPeriod: invCheckPeriod, keys: keys, tkeys: tkeys, memKeys: memKeys, @@ -385,6 +389,8 @@ func NewBandApp( // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + + invCheckPeriod := cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)) app.CrisisKeeper = crisiskeeper.NewKeeper( appCodec, keys[crisistypes.StoreKey], @@ -396,6 +402,8 @@ func NewBandApp( ) app.FeegrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) + + homePath := cast.ToString(appOpts.Get(flags.FlagHome)) app.UpgradeKeeper = upgradekeeper.NewKeeper( skipUpgradeHeights, keys[upgradetypes.StoreKey], diff --git a/cmd/bandd/cmd/root.go b/cmd/bandd/cmd/root.go index 091ad36e2..df41f3572 100644 --- a/cmd/bandd/cmd/root.go +++ b/cmd/bandd/cmd/root.go @@ -189,8 +189,6 @@ func newApp( bandApp := band.NewBandApp( logger, db, traceStore, true, skipUpgradeHeights, - cast.ToString(appOpts.Get(flags.FlagHome)), - cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), appOpts, cast.ToUint32(appOpts.Get(flagWithOwasmCacheSize)), baseappOptions..., @@ -219,8 +217,6 @@ func appExport( traceStore, loadLatest, map[int64]bool{}, - homePath, - cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), appOpts, cast.ToUint32(appOpts.Get(flagWithOwasmCacheSize)), ) diff --git a/testing/testapp/setup.go b/testing/testapp/setup.go index 2d3a42743..9811dd0db 100644 --- a/testing/testapp/setup.go +++ b/testing/testapp/setup.go @@ -12,12 +12,15 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/snapshots" snapshottypes "github.com/cosmos/cosmos-sdk/snapshots/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/types/tx/signing" @@ -220,6 +223,10 @@ func NewTestApp(chainID string, logger log.Logger) *TestingApp { // db := dbm.NewMemDB() db, _ := dbm.NewGoLevelDB("db", dir) + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = dir + appOptions[server.FlagInvCheckPeriod] = 0 + snapshotDir := filepath.Join(dir, "data", "snapshots") snapshotDB, err := dbm.NewDB("metadata", dbm.GoLevelDBBackend, snapshotDir) if err != nil { @@ -242,9 +249,7 @@ func NewTestApp(chainID string, logger log.Logger) *TestingApp { nil, true, map[int64]bool{}, - dir, - 0, - EmptyAppOptions{}, + appOptions, 100, baseapp.SetSnapshot(snapshotStore, snapshotOptions), baseapp.SetChainID(chainID), @@ -399,6 +404,10 @@ func setup(withGenesis bool, invCheckPeriod uint, chainID string) (*TestingApp, } db := dbm.NewMemDB() + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = dir + appOptions[server.FlagInvCheckPeriod] = 0 + snapshotDir := filepath.Join(dir, "data", "snapshots") snapshotDB, err := dbm.NewDB("metadata", dbm.GoLevelDBBackend, snapshotDir) if err != nil { @@ -421,9 +430,7 @@ func setup(withGenesis bool, invCheckPeriod uint, chainID string) (*TestingApp, nil, true, map[int64]bool{}, - dir, - 0, - EmptyAppOptions{}, + appOptions, 0, baseapp.SetSnapshot(snapshotStore, snapshotOptions), baseapp.SetChainID(chainID), From 39e72e82f5acb7a4f15a3401ec934413ec7d4417 Mon Sep 17 00:00:00 2001 From: colmazia Date: Fri, 11 Aug 2023 13:47:14 +0700 Subject: [PATCH 04/44] clear old proto dependency, add modulesToExport to App interface --- app/types.go | 2 +- client/grpc/node/service.go | 2 +- client/grpc/oracle/proof/service.go | 2 +- client/grpc/oracle/proof/util.go | 2 +- go.mod | 5 ++--- go.sum | 13 ++++++++++--- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/types.go b/app/types.go index 45e58f71d..f7455551e 100644 --- a/app/types.go +++ b/app/types.go @@ -32,7 +32,7 @@ type App interface { // Exports the state of the application for a genesis file. ExportAppStateAndValidators( - forZeroHeight bool, jailAllowedAddrs []string, + forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (types.ExportedApp, error) // All the registered module account addreses. diff --git a/client/grpc/node/service.go b/client/grpc/node/service.go index 411234d55..9eda1b68b 100644 --- a/client/grpc/node/service.go +++ b/client/grpc/node/service.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/cometbft/cometbft/crypto/secp256k1" + gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/ethereum/go-ethereum/crypto" - gogogrpc "github.com/gogo/protobuf/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/cosmos/cosmos-sdk/client" diff --git a/client/grpc/oracle/proof/service.go b/client/grpc/oracle/proof/service.go index be358d363..c37b56684 100644 --- a/client/grpc/oracle/proof/service.go +++ b/client/grpc/oracle/proof/service.go @@ -10,8 +10,8 @@ import ( oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" rpcclient "github.com/cometbft/cometbft/rpc/client" "github.com/cosmos/cosmos-sdk/client" + gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/ethereum/go-ethereum/accounts/abi" - gogogrpc "github.com/gogo/protobuf/grpc" "github.com/grpc-ecosystem/grpc-gateway/runtime" ) diff --git a/client/grpc/oracle/proof/util.go b/client/grpc/oracle/proof/util.go index 1e54da8e5..1a3766719 100644 --- a/client/grpc/oracle/proof/util.go +++ b/client/grpc/oracle/proof/util.go @@ -8,7 +8,7 @@ import ( "time" tmbytes "github.com/cometbft/cometbft/libs/bytes" - gogotypes "github.com/gogo/protobuf/types" + gogotypes "github.com/cosmos/gogoproto/types" ) // Copied from https://github.com/cometbft/cometbft/blob/master/types/encoding_helper.go diff --git a/go.mod b/go.mod index 378eab83b..cc4b4b6e5 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/bandprotocol/chain/v2 go 1.19 require ( + cosmossdk.io/api v0.3.1 github.com/bandprotocol/go-owasm v0.2.3 github.com/cometbft/cometbft v0.37.1 github.com/cometbft/cometbft-db v0.7.0 @@ -13,7 +14,6 @@ require ( github.com/cosmos/gogoproto v1.4.8 github.com/cosmos/ibc-go/v7 v7.0.1 github.com/ethereum/go-ethereum v1.10.22 - github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.3 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/gorilla/mux v1.8.0 @@ -40,7 +40,6 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v0.12.0 // indirect cloud.google.com/go/storage v1.29.0 // indirect - 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/errors v1.0.0-beta.7 // indirect @@ -86,6 +85,7 @@ require ( github.com/go-playground/universal-translator v0.18.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect @@ -176,7 +176,6 @@ require ( ) replace ( - github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 google.golang.org/grpc => google.golang.org/grpc v1.53.0 ) diff --git a/go.sum b/go.sum index 7d69a3a30..69928f900 100644 --- a/go.sum +++ b/go.sum @@ -744,6 +744,12 @@ github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU 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/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= @@ -1001,6 +1007,8 @@ 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= @@ -1229,8 +1237,6 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn 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/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -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/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -1715,8 +1721,10 @@ golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +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-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-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1879,7 +1887,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= From 3dad461c2b3d984b39f5a01688aeef076ecab733 Mon Sep 17 00:00:00 2001 From: colmazia Date: Fri, 11 Aug 2023 16:03:57 +0700 Subject: [PATCH 05/44] import ibc tendermint --- app/app.go | 2 + third_party/proto/confio/proofs.proto | 145 +++++++++++++------------- 2 files changed, 74 insertions(+), 73 deletions(-) diff --git a/app/app.go b/app/app.go index f2816f3c5..7876ebcef 100644 --- a/app/app.go +++ b/app/app.go @@ -107,6 +107,7 @@ import ( porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" "github.com/gorilla/mux" "github.com/rakyll/statik/fs" "github.com/spf13/cast" @@ -163,6 +164,7 @@ var ( feegrantmodule.AppModuleBasic{}, authzmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, + ibctm.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, diff --git a/third_party/proto/confio/proofs.proto b/third_party/proto/confio/proofs.proto index 9dd39e614..2552d2ac1 100644 --- a/third_party/proto/confio/proofs.proto +++ b/third_party/proto/confio/proofs.proto @@ -1,15 +1,16 @@ +// 0.47 TODO: get rid of third party proto syntax = "proto3"; package ics23; 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)) + // 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)) } /** @@ -19,24 +20,24 @@ 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; + // 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; } /** @@ -61,10 +62,10 @@ in the ProofSpec is valuable to prevent this mutability. And why all trees shoul length-prefix the data before hashing it. */ message ExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - repeated InnerOp path = 4; + bytes key = 1; + bytes value = 2; + LeafOp leaf = 3; + repeated InnerOp path = 4; } /* @@ -73,21 +74,21 @@ 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; + 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; - } + oneof proof { + ExistenceProof exist = 1; + NonExistenceProof nonexist = 2; + BatchProof batch = 3; + CompressedBatchProof compressed = 4; + } } /** @@ -107,13 +108,13 @@ 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; + 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; } /** @@ -134,12 +135,11 @@ some value to differentiate from leaf nodes, should be included in prefix and su 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; + 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. @@ -154,8 +154,8 @@ 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; + // 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; @@ -174,17 +174,17 @@ This enables: 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; + // 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; } /* @@ -197,37 +197,36 @@ message BatchProof { // Use BatchEntry not CommitmentProof, to avoid recursion message BatchEntry { oneof proof { - ExistenceProof exist = 1; + ExistenceProof exist = 1; NonExistenceProof nonexist = 2; } } - /****** all items here are compressed forms *******/ message CompressedBatchProof { - repeated CompressedBatchEntry entries = 1; - repeated InnerOp lookup_inners = 2; + repeated CompressedBatchEntry entries = 1; + repeated InnerOp lookup_inners = 2; } // Use BatchEntry not CommitmentProof, to avoid recursion message CompressedBatchEntry { oneof proof { - CompressedExistenceProof exist = 1; + CompressedExistenceProof exist = 1; CompressedNonExistenceProof nonexist = 2; } } message CompressedExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; + bytes key = 1; + bytes value = 2; + LeafOp leaf = 3; // these are indexes into the lookup_inners table in CompressedBatchProof - repeated int32 path = 4; + repeated int32 path = 4; } message CompressedNonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - CompressedExistenceProof left = 2; + bytes key = 1; // TODO: remove this as unnecessary??? we prove a range + CompressedExistenceProof left = 2; CompressedExistenceProof right = 3; } From 41ab8bce50470b4db3a0fed8a0f442154e75b13f Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Sat, 12 Aug 2023 03:34:01 +0700 Subject: [PATCH 06/44] fix error --- app/app.go | 3 +++ app/export.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index 7876ebcef..680a8abbd 100644 --- a/app/app.go +++ b/app/app.go @@ -470,6 +470,9 @@ func NewBandApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + // Set legacy router for backwards compatibility with gov v1beta1 + app.GovKeeper.SetLegacyRouter(govRouter) + app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName), app.IBCKeeper.ChannelKeeper, app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, diff --git a/app/export.go b/app/export.go index f66fb8898..5652ecbdd 100644 --- a/app/export.go +++ b/app/export.go @@ -160,7 +160,7 @@ func (app *BandApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [ counter := int16(0) for ; iter.Valid(); iter.Next() { - addr := sdk.ValAddress(iter.Key()[1:]) + addr := sdk.ValAddress(stakingtypes.AddressFromValidatorsKey(iter.Key())) validator, found := app.StakingKeeper.GetValidator(ctx, addr) if !found { panic("expected validator, not found") From 8912759b74e943a1fa63e1468bacb5303b479a58 Mon Sep 17 00:00:00 2001 From: colmazia Date: Tue, 15 Aug 2023 15:31:54 +0700 Subject: [PATCH 07/44] implement in-module params for x/oracle --- app/app.go | 17 +- app/keepers/keepers.go | 2 +- proto/oracle/v1/genesis.proto | 2 +- proto/oracle/v1/tx.proto | 30 ++ x/oracle/exported/exported.go | 18 + x/oracle/handler.go | 3 + x/oracle/ibc_module.go | 2 +- x/oracle/keeper/grpc_query.go | 2 +- x/oracle/keeper/keeper.go | 18 +- x/oracle/keeper/migrator.go | 28 ++ x/oracle/keeper/msg_server.go | 24 +- x/oracle/keeper/owasm.go | 22 +- x/oracle/keeper/params.go | 106 +----- x/oracle/keeper/params_test.go | 22 -- x/oracle/keeper/request.go | 2 +- x/oracle/keeper/validator_status.go | 4 +- x/oracle/migrations/v2/migrate.go | 35 ++ x/oracle/module.go | 20 +- x/oracle/types/codec.go | 2 + x/oracle/types/genesis.pb.go | 2 +- x/oracle/types/keys.go | 2 + x/oracle/types/msgs.go | 32 ++ x/oracle/types/params.go | 110 ++---- x/oracle/types/params_legacy.go | 80 +++++ x/oracle/types/tx.pb.go | 536 ++++++++++++++++++++++++---- 25 files changed, 840 insertions(+), 281 deletions(-) create mode 100644 x/oracle/exported/exported.go create mode 100644 x/oracle/keeper/migrator.go create mode 100644 x/oracle/migrations/v2/migrate.go create mode 100644 x/oracle/types/params_legacy.go diff --git a/app/app.go b/app/app.go index 680a8abbd..2ca57d416 100644 --- a/app/app.go +++ b/app/app.go @@ -458,7 +458,7 @@ func NewBandApp( AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) govConfig := govtypes.DefaultConfig() - app.GovKeeper = govkeeper.NewKeeper( + govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], app.AccountKeeper, @@ -471,7 +471,13 @@ func NewBandApp( ) // Set legacy router for backwards compatibility with gov v1beta1 - app.GovKeeper.SetLegacyRouter(govRouter) + govKeeper.SetLegacyRouter(govRouter) + + app.GovKeeper = *govKeeper.SetHooks( + govtypes.NewMultiGovHooks( + // register the governance hooks + ), + ) app.TransferKeeper = ibctransferkeeper.NewKeeper( appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName), @@ -498,7 +504,6 @@ func NewBandApp( app.OracleKeeper = oraclekeeper.NewKeeper( appCodec, keys[oracletypes.StoreKey], - app.GetSubspace(oracletypes.ModuleName), filepath.Join(homePath, "files"), authtypes.FeeCollectorName, app.AccountKeeper, @@ -510,8 +515,10 @@ func NewBandApp( &app.IBCKeeper.PortKeeper, scopedOracleKeeper, owasmVM, + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - oracleModule := oracle.NewAppModule(app.OracleKeeper) + oracleModule := oracle.NewAppModule(app.OracleKeeper, app.GetSubspace(oracletypes.ModuleName)) oracleIBCModule := oracle.NewIBCModule(app.OracleKeeper) // Create static IBC router, add transfer route, then set and seal it @@ -559,7 +566,7 @@ func NewBandApp( ), gov.NewAppModule( appCodec, - app.GovKeeper, + &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName), diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index cb8cca6e0..2bc74b49e 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -33,7 +33,7 @@ type AppKeepers struct { SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper - GovKeeper *govkeeper.Keeper + GovKeeper govkeeper.Keeper CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper diff --git a/proto/oracle/v1/genesis.proto b/proto/oracle/v1/genesis.proto index 3755d420d..3521a6870 100644 --- a/proto/oracle/v1/genesis.proto +++ b/proto/oracle/v1/genesis.proto @@ -8,7 +8,7 @@ import "oracle/v1/oracle.proto"; // GenesisState defines the oracle module's genesis state. message GenesisState { - // Params defines all the paramaters of the module. + // Params defines all the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; // DataSources are data sources to be installed during genesis phase. repeated DataSource data_sources = 2 [(gogoproto.nullable) = false]; diff --git a/proto/oracle/v1/tx.proto b/proto/oracle/v1/tx.proto index 3801a1c3f..4d525e9b0 100644 --- a/proto/oracle/v1/tx.proto +++ b/proto/oracle/v1/tx.proto @@ -9,6 +9,9 @@ import "google/protobuf/any.proto"; import "oracle/v1/oracle.proto"; import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; + // Msg defines the oracle Msg service. service Msg { // RequestData defines a method for submitting a new request. @@ -31,6 +34,12 @@ service Msg { // Activate defines a method for applying to be an oracle validator. rpc Activate(MsgActivate) returns (MsgActivateResponse); + + // UpdateParams defines a governance operation for updating the x/oracle module + // parameters. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); } // MsgRequestData is a message for sending a data oracle request. @@ -198,3 +207,24 @@ message MsgActivate { // MsgActivateResponse is response data for MsgActivate message message MsgActivateResponse {} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/oracle 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 {} diff --git a/x/oracle/exported/exported.go b/x/oracle/exported/exported.go new file mode 100644 index 000000000..000114e61 --- /dev/null +++ b/x/oracle/exported/exported.go @@ -0,0 +1,18 @@ +package exported + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +type ( + ParamSet = paramtypes.ParamSet + + // Subspace defines an interface that implements the legacy x/params Subspace + // type. + // + // NOTE: This is used solely for migration of x/params managed parameters. + Subspace interface { + GetParamSet(ctx sdk.Context, ps ParamSet) + } +) diff --git a/x/oracle/handler.go b/x/oracle/handler.go index 9934e62aa..284430014 100644 --- a/x/oracle/handler.go +++ b/x/oracle/handler.go @@ -35,6 +35,9 @@ func NewHandler(k keeper.Keeper) sdk.Handler { case *types.MsgActivate: res, err := msgServer.Activate(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) + case *types.MsgUpdateParams: + res, err := msgServer.UpdateParams(sdk.WrapSDKContext(ctx), msg) + return sdk.WrapServiceResult(ctx, res, err) default: return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) } diff --git a/x/oracle/ibc_module.go b/x/oracle/ibc_module.go index 6576e98e2..03a8c3ea9 100644 --- a/x/oracle/ibc_module.go +++ b/x/oracle/ibc_module.go @@ -195,7 +195,7 @@ func (im IBCModule) OnRecvPacket( relayer sdk.AccAddress, ) ibcexported.Acknowledgement { var data types.OracleRequestPacketData - if !im.keeper.IBCRequestEnabled(ctx) { + if !im.keeper.GetParams(ctx).IBCRequestEnabled { return channeltypes.NewErrorAcknowledgement(types.ErrIBCRequestDisabled) } else if err := types.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { return channeltypes.NewErrorAcknowledgement(errors.New("cannot unmarshal oracle request packet data")) diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go index b1c706a50..6eb8a6ef2 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -446,7 +446,7 @@ func (k Querier) RequestVerification( } // The request should not be expired - if request.RequestHeight+int64(k.ExpirationBlockCount(ctx)) < ctx.BlockHeader().Height { + if request.RequestHeight+int64(k.GetParams(ctx).ExpirationBlockCount) < ctx.BlockHeader().Height { return nil, status.Error( codes.DeadlineExceeded, fmt.Sprintf("Request with ID %d is already expired", req.RequestId), diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 7d22fc29b..1684a4b4b 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -12,7 +12,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" owasm "github.com/bandprotocol/go-owasm/api" @@ -30,7 +29,6 @@ type Keeper struct { cdc codec.BinaryCodec fileCache filecache.Cache feeCollectorName string - paramstore paramtypes.Subspace owasmVM *owasm.Vm authKeeper types.AccountKeeper @@ -41,13 +39,16 @@ type Keeper struct { channelKeeper types.ChannelKeeper portKeeper types.PortKeeper scopedKeeper capabilitykeeper.ScopedKeeper + + // the address capable of executing a MsgUpdateParams message. Typically, this + // should be the x/gov module account. + authority string } // NewKeeper creates a new oracle Keeper instance. func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, - ps paramtypes.Subspace, fileDir string, feeCollectorName string, authKeeper types.AccountKeeper, @@ -59,16 +60,13 @@ func NewKeeper( portKeeper types.PortKeeper, scopeKeeper capabilitykeeper.ScopedKeeper, owasmVM *owasm.Vm, + authority string, ) Keeper { - if !ps.HasKeyTable() { - ps = ps.WithKeyTable(types.ParamKeyTable()) - } return Keeper{ storeKey: key, cdc: cdc, fileCache: filecache.New(fileDir), feeCollectorName: feeCollectorName, - paramstore: ps, owasmVM: owasmVM, authKeeper: authKeeper, bankKeeper: bankKeeper, @@ -78,9 +76,15 @@ func NewKeeper( channelKeeper: channelKeeper, portKeeper: portKeeper, scopedKeeper: scopeKeeper, + authority: authority, } } +// GetAuthority returns the x/oracle module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} + // Logger returns a module-specific logger. func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) diff --git a/x/oracle/keeper/migrator.go b/x/oracle/keeper/migrator.go new file mode 100644 index 000000000..66176e6b4 --- /dev/null +++ b/x/oracle/keeper/migrator.go @@ -0,0 +1,28 @@ +package keeper + +import ( + "github.com/bandprotocol/chain/v2/x/oracle/exported" + v2 "github.com/bandprotocol/chain/v2/x/oracle/migrations/v2" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// Migrator is a struct for handling in-place state migrations. +type Migrator struct { + keeper Keeper + legacySubspace exported.Subspace +} + +func NewMigrator(k Keeper, ss exported.Subspace) Migrator { + return Migrator{ + keeper: k, + legacySubspace: ss, + } +} + +// Migrate1to2 migrates the x/oracle module state from the consensus version 1 to +// version 2. Specifically, it takes the parameters that are currently stored +// and managed by the x/params modules and stores them directly into the x/oracle +// module state. +func (m Migrator) Migrate1to2(ctx sdk.Context) error { + return v2.Migrate(ctx, ctx.KVStore(m.keeper.storeKey), m.legacySubspace, m.keeper.cdc) +} diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index 93436d0e2..ed0594cde 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -6,6 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/bandprotocol/chain/v2/pkg/gzip" "github.com/bandprotocol/chain/v2/x/oracle/types" @@ -44,7 +45,7 @@ func (k msgServer) RequestData( func (k msgServer) ReportData(goCtx context.Context, msg *types.MsgReportData) (*types.MsgReportDataResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - maxReportDataSize := int(k.MaxReportDataSize(ctx)) + maxReportDataSize := int(k.GetParams(ctx).MaxReportDataSize) for _, r := range msg.RawReports { if len(r.Data) > maxReportDataSize { return nil, types.WrapMaxError(types.ErrTooLargeRawReportData, len(r.Data), maxReportDataSize) @@ -289,3 +290,24 @@ func (k msgServer) Activate(goCtx context.Context, msg *types.MsgActivate) (*typ )) return &types.MsgActivateResponse{}, nil } + +func (ms msgServer) UpdateParams( + goCtx context.Context, + req *types.MsgUpdateParams, +) (*types.MsgUpdateParamsResponse, error) { + if ms.authority != req.Authority { + return nil, sdkerrors.Wrapf( + govtypes.ErrInvalidSigner, + "invalid authority; expected %s, got %s", + ms.authority, + req.Authority, + ) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + if err := ms.SetParams(ctx, req.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/oracle/keeper/owasm.go b/x/oracle/keeper/owasm.go index 0ae4ba2d5..cbf621898 100644 --- a/x/oracle/keeper/owasm.go +++ b/x/oracle/keeper/owasm.go @@ -22,10 +22,10 @@ func ConvertToOwasmGas(cosmos uint64) uint64 { // GetSpanSize return maximum value between MaxReportDataSize and MaxCallDataSize func (k Keeper) GetSpanSize(ctx sdk.Context) uint64 { - if k.MaxReportDataSize(ctx) > k.MaxCalldataSize(ctx) { - return k.MaxReportDataSize(ctx) + if k.GetParams(ctx).MaxReportDataSize > k.GetParams(ctx).MaxCalldataSize { + return k.GetParams(ctx).MaxReportDataSize } - return k.MaxCalldataSize(ctx) + return k.GetParams(ctx).MaxCalldataSize } // GetRandomValidators returns a pseudorandom subset of active validators. Each validator has @@ -49,7 +49,7 @@ func (k Keeper) GetRandomValidators(ctx sdk.Context, size int, id uint64) ([]sdk if err != nil { return nil, sdkerrors.Wrapf(types.ErrBadDrbgInitialization, err.Error()) } - tryCount := int(k.SamplingTryCount(ctx)) + tryCount := int(k.GetParams(ctx).SamplingTryCount) chosenValIndexes := bandrng.ChooseSomeMaxWeight(rng, valPowers, size, tryCount) validators := make([]sdk.ValAddress, size) for i, idx := range chosenValIndexes { @@ -72,12 +72,12 @@ func (k Keeper) PrepareRequest( } askCount := r.GetAskCount() - if askCount > k.MaxAskCount(ctx) { - return 0, types.WrapMaxError(types.ErrInvalidAskCount, int(askCount), int(k.MaxAskCount(ctx))) + if askCount > k.GetParams(ctx).MaxAskCount { + return 0, types.WrapMaxError(types.ErrInvalidAskCount, int(askCount), int(k.GetParams(ctx).MaxAskCount)) } // Consume gas for data requests. - ctx.GasMeter().ConsumeGas(askCount*k.PerValidatorRequestGas(ctx), "PER_VALIDATOR_REQUEST_FEE") + ctx.GasMeter().ConsumeGas(askCount*k.GetParams(ctx).PerValidatorRequestGas, "PER_VALIDATOR_REQUEST_FEE") // Get a random validator set to perform this request. validators, err := k.GetRandomValidators(ctx, int(askCount), k.GetRequestCount(ctx)+1) @@ -94,8 +94,8 @@ func (k Keeper) PrepareRequest( // Create an execution environment and call Owasm prepare function. env := types.NewPrepareEnv( req, - int64(k.MaxCalldataSize(ctx)), - int64(k.MaxRawRequestCount(ctx)), + int64(k.GetParams(ctx).MaxCalldataSize), + int64(k.GetParams(ctx).MaxRawRequestCount), int64(k.GetSpanSize(ctx)), ) script, err := k.GetOracleScript(ctx, req.OracleScriptID) @@ -104,7 +104,7 @@ func (k Keeper) PrepareRequest( } // Consume fee and execute owasm code - ctx.GasMeter().ConsumeGas(k.BaseOwasmGas(ctx), "BASE_OWASM_FEE") + ctx.GasMeter().ConsumeGas(k.GetParams(ctx).BaseOwasmGas, "BASE_OWASM_FEE") ctx.GasMeter().ConsumeGas(r.GetPrepareGas(), "OWASM_PREPARE_FEE") code := k.GetFile(script.Filename) output, err := k.owasmVM.Prepare(code, ConvertToOwasmGas(r.GetPrepareGas()), env) @@ -143,7 +143,7 @@ func (k Keeper) PrepareRequest( ctx.EventManager().EmitEvent(event) // Subtract execute fee - ctx.GasMeter().ConsumeGas(k.BaseOwasmGas(ctx), "BASE_OWASM_FEE") + ctx.GasMeter().ConsumeGas(k.GetParams(ctx).BaseOwasmGas, "BASE_OWASM_FEE") ctx.GasMeter().ConsumeGas(r.GetExecuteGas(), "OWASM_EXECUTE_FEE") // Emit an event for each of the raw data requests. diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go index edd81e4c5..0a2308086 100644 --- a/x/oracle/keeper/params.go +++ b/x/oracle/keeper/params.go @@ -6,97 +6,27 @@ import ( "github.com/bandprotocol/chain/v2/x/oracle/types" ) -// SetParams sets oracle parameters -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { - k.paramstore.SetParamSet(ctx, ¶ms) -} - -// GetParams returns all current parameters as a types.Params instance. -func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { - return types.NewParams( - k.MaxRawRequestCount(ctx), - k.MaxAskCount(ctx), - k.MaxCalldataSize(ctx), - k.MaxReportDataSize(ctx), - k.ExpirationBlockCount(ctx), - k.BaseOwasmGas(ctx), - k.PerValidatorRequestGas(ctx), - k.SamplingTryCount(ctx), - k.OracleRewardPercentage(ctx), - k.InactivePenaltyDuration(ctx), - k.IBCRequestEnabled(ctx), - ) -} - -// MaxRawRequestCount - Maximum number of raw request allowed -func (k Keeper) MaxRawRequestCount(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyMaxRawRequestCount, &res) - return -} +// SetParams sets the x/oracle module parameters. +func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error { + if err := p.Validate(); err != nil { + return err + } -// MaxAskCount - Maximum number of validators allowed to fulfill the request -func (k Keeper) MaxAskCount(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyMaxAskCount, &res) - return -} - -// MaxCalldataSize - Maximum size limit of calldata (bytes) in a request -func (k Keeper) MaxCalldataSize(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyMaxCalldataSize, &res) - return -} - -// MaxReportDataSize - Maximum size limit of report data (bytes) in a report -func (k Keeper) MaxReportDataSize(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyMaxReportDataSize, &res) - return -} + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&p) + store.Set(types.ParamsKeyPrefix, bz) -// ExpirationBlockCount - number of blocks allowed to fulfill oracle requests -// If current block height is ahead of the block height of an oracle request -// for more than this param value, then the request is considered expired -func (k Keeper) ExpirationBlockCount(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyExpirationBlockCount, &res) - return + return nil } -// BaseOwasmGas - amount of gas consumed by owasm required as a baseline -func (k Keeper) BaseOwasmGas(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyBaseOwasmGas, &res) - return -} - -// PerValidatorRequestGas - amount of gas consumed when preparing request -// It is the amount per validator where total gas depends on ask count -func (k Keeper) PerValidatorRequestGas(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyPerValidatorRequestGas, &res) - return -} - -// SamplingTryCount - number of tries when sampling validator set -func (k Keeper) SamplingTryCount(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeySamplingTryCount, &res) - return -} - -// OracleRewardPercentage - reward ratio used when allocating reward -// for active validators -func (k Keeper) OracleRewardPercentage(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyOracleRewardPercentage, &res) - return -} - -// InactivePenaltyDuration - time duration that need to wait when -// the validator marked as inactive oracle provider, before -// re-activate as oracle provider -func (k Keeper) InactivePenaltyDuration(ctx sdk.Context) (res uint64) { - k.paramstore.Get(ctx, types.KeyInactivePenaltyDuration, &res) - return -} +// GetParams returns the current x/oracle module parameters. +func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.ParamsKeyPrefix) + if bz == nil { + return p + } -// IBCRequestEnabled - a flag indicating whether sending oracle request via -// IBC is allowed or not -func (k Keeper) IBCRequestEnabled(ctx sdk.Context) (res bool) { - k.paramstore.Get(ctx, types.KeyIBCRequestEnabled, &res) - return + k.cdc.MustUnmarshal(bz, &p) + return p } diff --git a/x/oracle/keeper/params_test.go b/x/oracle/keeper/params_test.go index 5940e2c09..98a296c48 100644 --- a/x/oracle/keeper/params_test.go +++ b/x/oracle/keeper/params_test.go @@ -26,17 +26,6 @@ func TestGetSetParams(t *testing.T) { } k.SetParams(ctx, expectedParams) require.Equal(t, expectedParams, k.GetParams(ctx)) - require.Equal(t, expectedParams.MaxRawRequestCount, k.MaxRawRequestCount(ctx)) - require.Equal(t, expectedParams.MaxCalldataSize, k.MaxCalldataSize(ctx)) - require.Equal(t, expectedParams.MaxReportDataSize, k.MaxReportDataSize(ctx)) - require.Equal(t, expectedParams.MaxAskCount, k.MaxAskCount(ctx)) - require.Equal(t, expectedParams.ExpirationBlockCount, k.ExpirationBlockCount(ctx)) - require.Equal(t, expectedParams.BaseOwasmGas, k.BaseOwasmGas(ctx)) - require.Equal(t, expectedParams.PerValidatorRequestGas, k.PerValidatorRequestGas(ctx)) - require.Equal(t, expectedParams.SamplingTryCount, k.SamplingTryCount(ctx)) - require.Equal(t, expectedParams.OracleRewardPercentage, k.OracleRewardPercentage(ctx)) - require.Equal(t, expectedParams.InactivePenaltyDuration, k.InactivePenaltyDuration(ctx)) - require.Equal(t, expectedParams.IBCRequestEnabled, k.IBCRequestEnabled(ctx)) expectedParams = types.Params{ MaxRawRequestCount: 2, MaxAskCount: 20, @@ -52,15 +41,4 @@ func TestGetSetParams(t *testing.T) { } k.SetParams(ctx, expectedParams) require.Equal(t, expectedParams, k.GetParams(ctx)) - require.Equal(t, expectedParams.MaxRawRequestCount, k.MaxRawRequestCount(ctx)) - require.Equal(t, expectedParams.MaxCalldataSize, k.MaxCalldataSize(ctx)) - require.Equal(t, expectedParams.MaxReportDataSize, k.MaxReportDataSize(ctx)) - require.Equal(t, expectedParams.MaxAskCount, k.MaxAskCount(ctx)) - require.Equal(t, expectedParams.ExpirationBlockCount, k.ExpirationBlockCount(ctx)) - require.Equal(t, expectedParams.BaseOwasmGas, k.BaseOwasmGas(ctx)) - require.Equal(t, expectedParams.PerValidatorRequestGas, k.PerValidatorRequestGas(ctx)) - require.Equal(t, expectedParams.SamplingTryCount, k.SamplingTryCount(ctx)) - require.Equal(t, expectedParams.OracleRewardPercentage, k.OracleRewardPercentage(ctx)) - require.Equal(t, expectedParams.InactivePenaltyDuration, k.InactivePenaltyDuration(ctx)) - require.Equal(t, expectedParams.IBCRequestEnabled, k.IBCRequestEnabled(ctx)) } diff --git a/x/oracle/keeper/request.go b/x/oracle/keeper/request.go index 2229d63d0..5a7c823d5 100644 --- a/x/oracle/keeper/request.go +++ b/x/oracle/keeper/request.go @@ -55,7 +55,7 @@ func (k Keeper) AddRequest(ctx sdk.Context, req types.Request) types.RequestID { func (k Keeper) ProcessExpiredRequests(ctx sdk.Context) { currentReqID := k.GetRequestLastExpired(ctx) + 1 lastReqID := types.RequestID(k.GetRequestCount(ctx)) - expirationBlockCount := int64(k.ExpirationBlockCount(ctx)) + expirationBlockCount := int64(k.GetParams(ctx).ExpirationBlockCount) // Loop through all data requests in chronological order. If a request reaches its // expiration height, we will deactivate validators that didn't report data on the // request. We also resolve requests to status EXPIRED if they are not yet resolved. diff --git a/x/oracle/keeper/validator_status.go b/x/oracle/keeper/validator_status.go index cc766418e..15357a099 100644 --- a/x/oracle/keeper/validator_status.go +++ b/x/oracle/keeper/validator_status.go @@ -36,7 +36,7 @@ func (k Keeper) AllocateTokens(ctx sdk.Context, previousVotes []abci.VoteInfo) { feeCollector := k.authKeeper.GetModuleAccount(ctx, k.feeCollectorName) totalFee := sdk.NewDecCoinsFromCoins(k.bankKeeper.GetAllBalances(ctx, feeCollector.GetAddress())...) // Compute the fee allocated for oracle module to distribute to active validators. - oracleRewardRatio := sdk.NewDecWithPrec(int64(k.OracleRewardPercentage(ctx)), 2) + oracleRewardRatio := sdk.NewDecWithPrec(int64(k.GetParams(ctx).OracleRewardPercentage), 2) oracleRewardInt, _ := totalFee.MulDecTruncate(oracleRewardRatio).TruncateDecimal() // Transfer the oracle reward portion from fee collector to distr module. err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, k.feeCollectorName, distr.ModuleName, oracleRewardInt) @@ -84,7 +84,7 @@ func (k Keeper) Activate(ctx sdk.Context, val sdk.ValAddress) error { if status.IsActive { return types.ErrValidatorAlreadyActive } - penaltyDuration := time.Duration(k.InactivePenaltyDuration(ctx)) + penaltyDuration := time.Duration(k.GetParams(ctx).InactivePenaltyDuration) if !status.Since.IsZero() && status.Since.Add(penaltyDuration).After(ctx.BlockHeader().Time) { return types.ErrTooSoonToActivate } diff --git a/x/oracle/migrations/v2/migrate.go b/x/oracle/migrations/v2/migrate.go new file mode 100644 index 000000000..d567f6d90 --- /dev/null +++ b/x/oracle/migrations/v2/migrate.go @@ -0,0 +1,35 @@ +package v2 + +import ( + "github.com/bandprotocol/chain/v2/x/oracle/exported" + "github.com/bandprotocol/chain/v2/x/oracle/types" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + ModuleName = "oracle" +) + +// Migrate migrates the x/oracle module state from the consensus version 1 to +// version 2. Specifically, it takes the parameters that are currently stored +// and managed by the x/params modules and stores them directly into the x/oracle +// module state. +func Migrate( + ctx sdk.Context, + store sdk.KVStore, + legacySubspace exported.Subspace, + cdc codec.BinaryCodec, +) error { + var currParams types.Params + legacySubspace.GetParamSet(ctx, &currParams) + + if err := currParams.Validate(); err != nil { + return err + } + + bz := cdc.MustMarshal(&currParams) + store.Set(types.ParamsKeyPrefix, bz) + + return nil +} diff --git a/x/oracle/module.go b/x/oracle/module.go index 38ccc4c8d..2a1051fde 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -17,10 +17,14 @@ import ( porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/bandprotocol/chain/v2/x/oracle/client/cli" + "github.com/bandprotocol/chain/v2/x/oracle/exported" "github.com/bandprotocol/chain/v2/x/oracle/keeper" "github.com/bandprotocol/chain/v2/x/oracle/types" ) +// ConsensusVersion defines the current x/oracle module consensus version. +const ConsensusVersion = 2 + var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} @@ -79,12 +83,16 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { type AppModule struct { AppModuleBasic keeper keeper.Keeper + + // legacySubspace is used solely for migration of x/params managed parameters + legacySubspace exported.Subspace } // NewAppModule creates a new AppModule object. -func NewAppModule(k keeper.Keeper) AppModule { +func NewAppModule(k keeper.Keeper, ss exported.Subspace) AppModule { return AppModule{ - keeper: k, + keeper: k, + legacySubspace: ss, } } @@ -113,6 +121,12 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.Querier{Keeper: am.keeper}) + + m := keeper.NewMigrator(am.keeper, am.legacySubspace) + + if err := cfg.RegisterMigration(types.ModuleName, 1, m.Migrate1to2); err != nil { + panic(fmt.Sprintf("failed to migrate x/%s from version 1 to 2: %v", types.ModuleName, err)) + } } // InitGenesis performs genesis initialization for the oracle module. @@ -130,7 +144,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 1 } +func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion } // BeginBlock processes ABCI begin block message for this oracle module (SDK AppModule interface). func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { diff --git a/x/oracle/types/codec.go b/x/oracle/types/codec.go index c17455a67..53fce89fb 100644 --- a/x/oracle/types/codec.go +++ b/x/oracle/types/codec.go @@ -18,6 +18,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgCreateOracleScript{}, "oracle/CreateOracleScript", nil) cdc.RegisterConcrete(&MsgEditOracleScript{}, "oracle/EditOracleScript", nil) cdc.RegisterConcrete(&MsgActivate{}, "oracle/Activate", nil) + cdc.RegisterConcrete(&MsgUpdateParams{}, "oracle/UpdateParams", nil) } // RegisterInterfaces register the oracle module interfaces to protobuf Any. @@ -30,6 +31,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgCreateOracleScript{}, &MsgEditOracleScript{}, &MsgActivate{}, + &MsgUpdateParams{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index a49a3e6de..a2526f008 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -25,7 +25,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the oracle module's genesis state. type GenesisState struct { - // Params defines all the paramaters of the module. + // Params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // DataSources are data sources to be installed during genesis phase. DataSources []DataSource `protobuf:"bytes,2,rep,name=data_sources,json=dataSources,proto3" json:"data_sources"` diff --git a/x/oracle/types/keys.go b/x/oracle/types/keys.go index 8b5cbcbd7..ddab5c6be 100644 --- a/x/oracle/types/keys.go +++ b/x/oracle/types/keys.go @@ -52,6 +52,8 @@ var ( OracleScriptStoreKeyPrefix = []byte{0x04} // ValidatorStatusKeyPrefix is the prefix for validator status store. ValidatorStatusKeyPrefix = []byte{0x05} + // ParamsKeyPrefix is the prefix for the parameters of the module. + ParamsKeyPrefix = []byte{0x06} // ResultStoreKeyPrefix is the prefix for request result store. ResultStoreKeyPrefix = []byte{0xff} diff --git a/x/oracle/types/msgs.go b/x/oracle/types/msgs.go index 887b1ab60..2b91d435c 100644 --- a/x/oracle/types/msgs.go +++ b/x/oracle/types/msgs.go @@ -18,6 +18,7 @@ const ( TypeMsgActivate = "activate" TypeMsgAddReporter = "add_reporter" TypeMsgRemoveReporter = "remove_reporter" + TypeMsgUpdateParams = "update_params" ) var ( @@ -28,6 +29,7 @@ var ( _ sdk.Msg = &MsgCreateOracleScript{} _ sdk.Msg = &MsgEditOracleScript{} _ sdk.Msg = &MsgActivate{} + _ sdk.Msg = &MsgUpdateParams{} ) // NewMsgRequestData creates a new MsgRequestData instance. @@ -491,3 +493,33 @@ func (msg MsgActivate) GetSigners() []sdk.AccAddress { func (msg MsgActivate) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.Wrap(err, "invalid authority address") + } + + if err := m.Params.Validate(); err != nil { + return err + } + + return nil +} + +// Route returns the route of MsgUpdateParams - "oracle" (sdk.Msg interface). +func (msg MsgUpdateParams) Route() string { return RouterKey } + +// Type returns the message type of MsgUpdateParams (sdk.Msg interface). +func (msg MsgUpdateParams) Type() string { return TypeMsgUpdateParams } diff --git a/x/oracle/types/params.go b/x/oracle/types/params.go index 778142eeb..5cab50928 100644 --- a/x/oracle/types/params.go +++ b/x/oracle/types/params.go @@ -5,8 +5,6 @@ import ( "time" "gopkg.in/yaml.v2" - - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) // nolint @@ -26,30 +24,6 @@ const ( DefaultIBCRequestEnabled = true ) -// nolint -var ( - // Each value below is the key to store the respective oracle module parameter. See comments - // in types.proto for explanation for each parameter. - KeyMaxRawRequestCount = []byte("MaxRawRequestCount") - KeyMaxAskCount = []byte("MaxAskCount") - KeyMaxCalldataSize = []byte("MaxCalldataSize") - KeyMaxReportDataSize = []byte("MaxReportDataSize") - KeyExpirationBlockCount = []byte("ExpirationBlockCount") - KeyBaseOwasmGas = []byte("BaseOwasmGas") - KeyPerValidatorRequestGas = []byte("PerValidatorRequestGas") - KeySamplingTryCount = []byte("SamplingTryCount") - KeyOracleRewardPercentage = []byte("OracleRewardPercentage") - KeyInactivePenaltyDuration = []byte("InactivePenaltyDuration") - KeyIBCRequestEnabled = []byte("IBCRequestEnabled") -) - -var _ paramtypes.ParamSet = (*Params)(nil) - -// ParamKeyTable for oracle module -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - // NewParams creates a new parameter configuration for the oracle module func NewParams( maxRawRequestCount, maxAskCount, maxCalldataSize, maxReportDataSize, expirationBlockCount, baseRequestGas, perValidatorRequestGas, @@ -71,51 +45,6 @@ func NewParams( } } -// ParamSetPairs implements the paramtypes.ParamSet interface for Params. -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair( - KeyMaxRawRequestCount, - &p.MaxRawRequestCount, - validateUint64("max data source count", true), - ), - paramtypes.NewParamSetPair(KeyMaxAskCount, &p.MaxAskCount, validateUint64("max ask count", true)), - paramtypes.NewParamSetPair(KeyMaxCalldataSize, &p.MaxCalldataSize, validateUint64("max calldata size", true)), - paramtypes.NewParamSetPair( - KeyMaxReportDataSize, - &p.MaxReportDataSize, - validateUint64("max report data size", true), - ), - paramtypes.NewParamSetPair( - KeyExpirationBlockCount, - &p.ExpirationBlockCount, - validateUint64("expiration block count", true), - ), - paramtypes.NewParamSetPair(KeyBaseOwasmGas, &p.BaseOwasmGas, validateUint64("base request gas", false)), - paramtypes.NewParamSetPair( - KeyPerValidatorRequestGas, - &p.PerValidatorRequestGas, - validateUint64("per validator request gas", false), - ), - paramtypes.NewParamSetPair( - KeySamplingTryCount, - &p.SamplingTryCount, - validateUint64("sampling try count", true), - ), - paramtypes.NewParamSetPair( - KeyOracleRewardPercentage, - &p.OracleRewardPercentage, - validateUint64("oracle reward percentage", false), - ), - paramtypes.NewParamSetPair( - KeyInactivePenaltyDuration, - &p.InactivePenaltyDuration, - validateUint64("inactive penalty duration", false), - ), - paramtypes.NewParamSetPair(KeyIBCRequestEnabled, &p.IBCRequestEnabled, validateBool()), - } -} - // DefaultParams defines the default parameters. func DefaultParams() Params { return NewParams( @@ -133,6 +62,45 @@ func DefaultParams() Params { ) } +// Validate does the sanity check on the params. +func (p Params) Validate() error { + if err := validateUint64("max data source count", true)(p.MaxRawRequestCount); err != nil { + return err + } + if err := validateUint64("max ask count", true)(p.MaxAskCount); err != nil { + return err + } + if err := validateUint64("max calldata size", true)(p.MaxCalldataSize); err != nil { + return err + } + if err := validateUint64("max report data size", true)(p.MaxReportDataSize); err != nil { + return err + } + if err := validateUint64("expiration block count", true)(p.ExpirationBlockCount); err != nil { + return err + } + if err := validateUint64("base request gas", false)(p.BaseOwasmGas); err != nil { + return err + } + if err := validateUint64("per validator request gas", false)(p.PerValidatorRequestGas); err != nil { + return err + } + if err := validateUint64("sampling try count", true)(p.SamplingTryCount); err != nil { + return err + } + if err := validateUint64("oracle reward percentage", false)(p.OracleRewardPercentage); err != nil { + return err + } + if err := validateUint64("inactive penalty duration", false)(p.InactivePenaltyDuration); err != nil { + return err + } + if err := validateBool()(p.IBCRequestEnabled); err != nil { + return err + } + + return nil +} + // String returns a human readable string representation of the parameters. func (p Params) String() string { out, _ := yaml.Marshal(p) diff --git a/x/oracle/types/params_legacy.go b/x/oracle/types/params_legacy.go new file mode 100644 index 000000000..3ff56a3c1 --- /dev/null +++ b/x/oracle/types/params_legacy.go @@ -0,0 +1,80 @@ +/* +NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov +controlled execution of MsgUpdateParams messages. These types remains solely +for migration purposes and will be removed in a future release. +*/ +package types + +import ( + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +// nolint +// Parameter store keys +var ( + // Each value below is the key to store the respective oracle module parameter. See comments + // in types.proto for explanation for each parameter. + KeyMaxRawRequestCount = []byte("MaxRawRequestCount") + KeyMaxAskCount = []byte("MaxAskCount") + KeyMaxCalldataSize = []byte("MaxCalldataSize") + KeyMaxReportDataSize = []byte("MaxReportDataSize") + KeyExpirationBlockCount = []byte("ExpirationBlockCount") + KeyBaseOwasmGas = []byte("BaseOwasmGas") + KeyPerValidatorRequestGas = []byte("PerValidatorRequestGas") + KeySamplingTryCount = []byte("SamplingTryCount") + KeyOracleRewardPercentage = []byte("OracleRewardPercentage") + KeyInactivePenaltyDuration = []byte("InactivePenaltyDuration") + KeyIBCRequestEnabled = []byte("IBCRequestEnabled") +) + +var _ paramtypes.ParamSet = (*Params)(nil) + +// ParamKeyTable for oracle module +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// ParamSetPairs implements the paramtypes.ParamSet interface for Params. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair( + KeyMaxRawRequestCount, + &p.MaxRawRequestCount, + validateUint64("max data source count", true), + ), + paramtypes.NewParamSetPair(KeyMaxAskCount, &p.MaxAskCount, validateUint64("max ask count", true)), + paramtypes.NewParamSetPair(KeyMaxCalldataSize, &p.MaxCalldataSize, validateUint64("max calldata size", true)), + paramtypes.NewParamSetPair( + KeyMaxReportDataSize, + &p.MaxReportDataSize, + validateUint64("max report data size", true), + ), + paramtypes.NewParamSetPair( + KeyExpirationBlockCount, + &p.ExpirationBlockCount, + validateUint64("expiration block count", true), + ), + paramtypes.NewParamSetPair(KeyBaseOwasmGas, &p.BaseOwasmGas, validateUint64("base request gas", false)), + paramtypes.NewParamSetPair( + KeyPerValidatorRequestGas, + &p.PerValidatorRequestGas, + validateUint64("per validator request gas", false), + ), + paramtypes.NewParamSetPair( + KeySamplingTryCount, + &p.SamplingTryCount, + validateUint64("sampling try count", true), + ), + paramtypes.NewParamSetPair( + KeyOracleRewardPercentage, + &p.OracleRewardPercentage, + validateUint64("oracle reward percentage", false), + ), + paramtypes.NewParamSetPair( + KeyInactivePenaltyDuration, + &p.InactivePenaltyDuration, + validateUint64("inactive penalty duration", false), + ), + paramtypes.NewParamSetPair(KeyIBCRequestEnabled, &p.IBCRequestEnabled, validateBool()), + } +} diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 7367068f2..e34415300 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -7,9 +7,11 @@ import ( bytes "bytes" context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -959,6 +961,105 @@ func (m *MsgActivateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgActivateResponse proto.InternalMessageInfo +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/oracle 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_31571edce0094a5d, []int{14} +} +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 + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// 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_31571edce0094a5d, []int{15} +} +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((*MsgRequestData)(nil), "oracle.v1.MsgRequestData") proto.RegisterType((*MsgRequestDataResponse)(nil), "oracle.v1.MsgRequestDataResponse") @@ -974,76 +1075,85 @@ func init() { proto.RegisterType((*MsgEditOracleScriptResponse)(nil), "oracle.v1.MsgEditOracleScriptResponse") proto.RegisterType((*MsgActivate)(nil), "oracle.v1.MsgActivate") proto.RegisterType((*MsgActivateResponse)(nil), "oracle.v1.MsgActivateResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "oracle.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "oracle.v1.MsgUpdateParamsResponse") } func init() { proto.RegisterFile("oracle/v1/tx.proto", fileDescriptor_31571edce0094a5d) } var fileDescriptor_31571edce0094a5d = []byte{ - // 1009 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0x2d, 0x59, 0x16, 0x47, 0xb2, 0x9b, 0xb0, 0x8e, 0x4b, 0xd3, 0x09, 0xa9, 0x1a, 0x41, - 0xa0, 0x1e, 0x2a, 0xd6, 0xee, 0x29, 0xed, 0xa9, 0xb2, 0xfb, 0x63, 0x34, 0x6a, 0x81, 0x4d, 0x7b, - 0x09, 0x50, 0xa8, 0x2b, 0x72, 0x4d, 0x13, 0xa6, 0xb8, 0x2a, 0x77, 0x25, 0xdb, 0x6f, 0xd1, 0x73, - 0x4f, 0x3d, 0x37, 0xf7, 0x3e, 0x43, 0x8e, 0x3e, 0xf6, 0xa4, 0x06, 0xf2, 0x25, 0xcf, 0xd0, 0x53, - 0xc1, 0x5d, 0x8a, 0x22, 0x25, 0xca, 0x46, 0x8c, 0x20, 0x27, 0x71, 0xe6, 0x9b, 0x99, 0x9d, 0xfd, - 0xbe, 0xd9, 0x5d, 0x81, 0x46, 0x23, 0xec, 0x04, 0xc4, 0x1e, 0xed, 0xdb, 0xfc, 0xa2, 0x35, 0x88, - 0x28, 0xa7, 0x9a, 0x2a, 0x7d, 0xad, 0xd1, 0xbe, 0xb1, 0xe5, 0x51, 0x8f, 0x0a, 0xaf, 0x1d, 0x7f, - 0xc9, 0x00, 0xc3, 0xf2, 0x28, 0xf5, 0x02, 0x62, 0x0b, 0xab, 0x37, 0x3c, 0xb1, 0xb9, 0xdf, 0x27, - 0x8c, 0xe3, 0xfe, 0x20, 0x09, 0xd8, 0x99, 0x0f, 0xc0, 0xe1, 0x65, 0x02, 0x6d, 0xcf, 0x16, 0x4c, - 0x96, 0x91, 0x7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0xbf, 0x56, 0xd3, 0xf3, 0xf9, 0xe9, 0xb0, 0xd7, - 0x72, 0x68, 0xdf, 0x4e, 0x48, 0x94, 0x3f, 0x9f, 0x32, 0xf7, 0xcc, 0xe6, 0x97, 0x03, 0xc2, 0x44, - 0x02, 0x43, 0xd5, 0x13, 0x42, 0x9e, 0xc5, 0xc5, 0x35, 0x0b, 0x6a, 0x83, 0x88, 0x0c, 0x70, 0x44, - 0xba, 0x1e, 0x66, 0xfa, 0xba, 0xe8, 0x19, 0x12, 0xd7, 0xb7, 0x98, 0xc5, 0x01, 0xe4, 0x82, 0x38, - 0x43, 0x2e, 0x03, 0xaa, 0x32, 0x20, 0x71, 0xc5, 0x01, 0xdb, 0x50, 0x61, 0x24, 0x74, 0x49, 0xa4, - 0xab, 0xf1, 0x9e, 0x50, 0x62, 0x7d, 0x51, 0x7e, 0xf3, 0xa7, 0xa5, 0xec, 0xe9, 0xb0, 0x9d, 0x17, - 0x0b, 0x11, 0x36, 0xa0, 0x21, 0x23, 0x7b, 0x2f, 0x15, 0xd8, 0x10, 0xd0, 0x80, 0x46, 0x52, 0xc6, - 0xa7, 0x00, 0x91, 0x0c, 0x9c, 0x09, 0x68, 0x4c, 0xc6, 0x96, 0x9a, 0xa4, 0x0b, 0xed, 0x66, 0x06, - 0x52, 0x93, 0xe8, 0x63, 0x57, 0xfb, 0x12, 0x6a, 0x11, 0x3e, 0xef, 0x46, 0xa2, 0x18, 0xd3, 0x57, - 0x05, 0x65, 0x5b, 0xad, 0x74, 0x7e, 0x5b, 0x08, 0x9f, 0xcb, 0x95, 0xda, 0xe5, 0x98, 0x2d, 0x04, - 0xd1, 0xd4, 0xc1, 0xb4, 0x87, 0xa0, 0x8e, 0x70, 0xe0, 0xbb, 0x98, 0xd3, 0x48, 0x48, 0xaa, 0xa2, - 0x99, 0x23, 0xd9, 0xc7, 0x47, 0xf0, 0x20, 0xd7, 0x6c, 0xba, 0x8d, 0x3f, 0x56, 0xe1, 0xc3, 0x0e, -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, 0x34, 0xad, - 0xfa, 0x2b, 0x68, 0x05, 0x47, 0xbf, 0x51, 0xd4, 0x53, 0x36, 0xc2, 0x68, 0xde, 0x16, 0x91, 0xe5, - 0x64, 0xe1, 0x40, 0x99, 0x8b, 0xbd, 0xe5, 0xaa, 0x3f, 0xb9, 0x19, 0x4f, 0x6b, 0xb7, 0xa1, 0x9a, - 0x4e, 0xd5, 0x76, 0x3e, 0x67, 0xea, 0x37, 0xcc, 0x62, 0xff, 0xb4, 0x46, 0xfb, 0xf8, 0xd5, 0xc4, - 0x54, 0xae, 0x26, 0xa6, 0xf2, 0x7a, 0x62, 0x2a, 0xbf, 0x5f, 0x9b, 0x2b, 0x57, 0xd7, 0xe6, 0xca, - 0x3f, 0xd7, 0xe6, 0xca, 0x0b, 0x3b, 0x73, 0x6d, 0xf7, 0x70, 0xe8, 0x8a, 0xff, 0x9e, 0x0e, 0x0d, - 0x6c, 0xe7, 0x14, 0xfb, 0xa1, 0x3d, 0x3a, 0xb0, 0x2f, 0x92, 0xbf, 0xad, 0xf2, 0x0e, 0xef, 0x55, - 0x44, 0xc4, 0xe7, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x42, 0x7a, 0xc6, 0x48, 0x0b, 0x00, - 0x00, + // 1132 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbd, 0x6f, 0xdb, 0x46, + 0x14, 0x37, 0x2d, 0x59, 0x16, 0x4f, 0xb2, 0x12, 0xb3, 0x8e, 0x4d, 0xd3, 0x89, 0xa8, 0x1a, 0x41, + 0xa0, 0x16, 0x88, 0x58, 0xbb, 0x40, 0x81, 0xa4, 0x53, 0x64, 0xf7, 0xc3, 0x68, 0x94, 0x16, 0x74, + 0xb3, 0x04, 0x28, 0xd4, 0x13, 0x79, 0xa6, 0x09, 0x93, 0x3c, 0xf5, 0xee, 0xe4, 0x8f, 0xb5, 0x63, + 0xa7, 0xce, 0x9d, 0x32, 0x37, 0x4b, 0x87, 0xa2, 0x7f, 0x43, 0xc6, 0xa0, 0x53, 0x27, 0x35, 0x90, + 0x87, 0xe6, 0x6f, 0xe8, 0x54, 0xf0, 0xee, 0xc4, 0x0f, 0x59, 0xb2, 0x11, 0x23, 0xe8, 0x24, 0xbd, + 0xf7, 0x7b, 0xef, 0xdd, 0xbb, 0xdf, 0xef, 0xdd, 0x1d, 0x81, 0x86, 0x09, 0x74, 0x02, 0x64, 0x1d, + 0x6f, 0x59, 0xec, 0xb4, 0xd5, 0x27, 0x98, 0x61, 0x4d, 0x15, 0xbe, 0xd6, 0xf1, 0x96, 0xb1, 0xe2, + 0x61, 0x0f, 0x73, 0xaf, 0x15, 0xff, 0x13, 0x01, 0x86, 0xe9, 0x61, 0xec, 0x05, 0xc8, 0xe2, 0x56, + 0x6f, 0x70, 0x60, 0x31, 0x3f, 0x44, 0x94, 0xc1, 0xb0, 0x2f, 0x03, 0xd6, 0x27, 0x03, 0x60, 0x74, + 0x26, 0xa1, 0xd5, 0x74, 0x41, 0xb9, 0x8c, 0xf0, 0xd7, 0x1d, 0x4c, 0x43, 0x4c, 0xad, 0x1e, 0xa4, + 0x31, 0xd8, 0x43, 0x0c, 0x6e, 0x59, 0x0e, 0xf6, 0xa3, 0x71, 0x49, 0x81, 0x77, 0x45, 0x33, 0xc2, + 0x90, 0xd0, 0x9a, 0x4c, 0x0d, 0xa9, 0x17, 0x97, 0x0d, 0xa9, 0x27, 0x80, 0xcd, 0x17, 0x05, 0x50, + 0xeb, 0x50, 0xcf, 0x46, 0x3f, 0x0c, 0x10, 0x65, 0xbb, 0x90, 0x41, 0xed, 0x09, 0xb8, 0x29, 0x96, + 0xed, 0x52, 0x87, 0xf8, 0x7d, 0xd6, 0xf5, 0x5d, 0x5d, 0x69, 0x28, 0xcd, 0x62, 0xfb, 0xee, 0x68, + 0x68, 0xd6, 0xbe, 0xe6, 0xd8, 0x3e, 0x87, 0xf6,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xb3, 0x26, 0x71, 0xe3, 0xde, 0xe5, 0x78, 0x52, 0xfb, 0x5b, 0x50, 0x9b, 0xb8, 0xcc, + 0x6f, 0xe7, 0x33, 0xf3, 0xa8, 0x71, 0xf7, 0x32, 0x34, 0xa9, 0xfa, 0x3d, 0xd0, 0xa6, 0x5c, 0x51, + 0x8d, 0x69, 0x3d, 0x65, 0x23, 0x8c, 0xe6, 0x55, 0x11, 0x59, 0x4e, 0x2e, 0x1c, 0xfc, 0xfa, 0xc5, + 0xde, 0x72, 0xd5, 0xef, 0x5d, 0x8e, 0x27, 0xb5, 0xdb, 0xa0, 0x9c, 0x4c, 0xff, 0x6a, 0x3e, 0x67, + 0xec, 0x37, 0xea, 0xd3, 0xfd, 0x49, 0x8d, 0x27, 0xa0, 0x9a, 0x1b, 0x7b, 0x23, 0x1f, 0x9f, 0xc5, + 0x8c, 0xcd, 0xd9, 0xd8, 0xb8, 0x5e, 0x7b, 0xef, 0xe5, 0xa8, 0xae, 0xbc, 0x1a, 0xd5, 0x95, 0xd7, + 0xa3, 0xba, 0xf2, 0xf3, 0x79, 0x7d, 0xee, 0xd5, 0x79, 0x7d, 0xee, 0xaf, 0xf3, 0xfa, 0xdc, 0x33, + 0x2b, 0xf3, 0x5c, 0xf5, 0x60, 0xe4, 0xf2, 0x6f, 0x6e, 0x07, 0x07, 0x96, 0x73, 0x08, 0xfd, 0xc8, + 0x3a, 0xde, 0xb6, 0x4e, 0xe5, 0x27, 0xbe, 0x78, 0xbb, 0x7a, 0x25, 0x1e, 0xf1, 0xf1, 0x7f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x0f, 0xdb, 0x0e, 0x61, 0x74, 0x0c, 0x00, 0x00, } func (this *MsgRequestData) Equal(that interface{}) bool { @@ -1369,6 +1479,11 @@ type MsgClient interface { EditOracleScript(ctx context.Context, in *MsgEditOracleScript, opts ...grpc.CallOption) (*MsgEditOracleScriptResponse, error) // Activate defines a method for applying to be an oracle validator. Activate(ctx context.Context, in *MsgActivate, opts ...grpc.CallOption) (*MsgActivateResponse, error) + // UpdateParams defines a governance operation for updating the x/oracle module + // parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -1442,6 +1557,15 @@ func (c *msgClient) Activate(ctx context.Context, in *MsgActivate, opts ...grpc. return out, nil } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/oracle.v1.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 { // RequestData defines a method for submitting a new request. @@ -1458,6 +1582,11 @@ type MsgServer interface { EditOracleScript(context.Context, *MsgEditOracleScript) (*MsgEditOracleScriptResponse, error) // Activate defines a method for applying to be an oracle validator. Activate(context.Context, *MsgActivate) (*MsgActivateResponse, error) + // UpdateParams defines a governance operation for updating the x/oracle module + // parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1485,6 +1614,9 @@ func (*UnimplementedMsgServer) EditOracleScript(ctx context.Context, req *MsgEdi func (*UnimplementedMsgServer) Activate(ctx context.Context, req *MsgActivate) (*MsgActivateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented") } +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) @@ -1616,6 +1748,24 @@ func _Msg_Activate_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +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: "/oracle.v1.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: "oracle.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -1648,6 +1798,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "Activate", Handler: _Msg_Activate_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "oracle/v1/tx.proto", @@ -2288,6 +2442,69 @@ func (m *MsgActivateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +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 @@ -2597,6 +2814,30 @@ func (m *MsgActivateResponse) Size() (n int) { return n } +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 } @@ -4593,6 +4834,171 @@ func (m *MsgActivateResponse) Unmarshal(dAtA []byte) error { } return nil } +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 From 98268a6b2ff28ae4f62282810ec6d5c02e4efd08 Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 16 Aug 2023 13:42:09 +0700 Subject: [PATCH 08/44] add test & emit event for param change --- x/oracle/handler_test.go | 92 +++++++++++++++++++++++++ x/oracle/keeper/msg_server.go | 13 ++-- x/oracle/keeper/params_test.go | 34 +++++++++ x/oracle/migrations/v2/migrator_test.go | 45 ++++++++++++ x/oracle/types/events.go | 2 + x/oracle/types/msgs.go | 8 +++ x/oracle/types/params.go | 2 +- 7 files changed, 191 insertions(+), 5 deletions(-) create mode 100644 x/oracle/migrations/v2/migrator_test.go diff --git a/x/oracle/handler_test.go b/x/oracle/handler_test.go index 84e99e222..8009d5a8d 100644 --- a/x/oracle/handler_test.go +++ b/x/oracle/handler_test.go @@ -823,3 +823,95 @@ func TestActivateFail(t *testing.T) { _, err = oracle.NewHandler(k)(ctx, msg) require.NoError(t, err) } + +func TestUpdateParamsSuccess(t *testing.T) { + _, ctx, k := testapp.CreateTestInput(true) + expectedParams := types.Params{ + MaxRawRequestCount: 1, + MaxAskCount: 10, + MaxCalldataSize: 256, + MaxReportDataSize: 512, + ExpirationBlockCount: 30, + BaseOwasmGas: 50000, + PerValidatorRequestGas: 3000, + SamplingTryCount: 3, + OracleRewardPercentage: 50, + InactivePenaltyDuration: 1000, + IBCRequestEnabled: true, + } + msg := types.NewMsgUpdateParams(k.GetAuthority(), expectedParams) + res, err := oracle.NewHandler(k)(ctx, msg) + require.NoError(t, err) + require.Equal(t, expectedParams, k.GetParams(ctx)) + event := abci.Event{ + Type: types.EventTypeUpdateParams, + Attributes: []abci.EventAttribute{ + {Key: types.AttributeKeyParams, Value: expectedParams.String()}, + }, + } + require.Equal(t, abci.Event(event), res.Events[0]) + + expectedParams = types.Params{ + MaxRawRequestCount: 2, + MaxAskCount: 20, + MaxCalldataSize: 512, + MaxReportDataSize: 256, + ExpirationBlockCount: 40, + BaseOwasmGas: 0, + PerValidatorRequestGas: 0, + SamplingTryCount: 5, + OracleRewardPercentage: 0, + InactivePenaltyDuration: 0, + IBCRequestEnabled: false, + } + msg = types.NewMsgUpdateParams(k.GetAuthority(), expectedParams) + res, err = oracle.NewHandler(k)(ctx, msg) + require.NoError(t, err) + require.Equal(t, expectedParams, k.GetParams(ctx)) + event = abci.Event{ + Type: types.EventTypeUpdateParams, + Attributes: []abci.EventAttribute{ + {Key: types.AttributeKeyParams, Value: expectedParams.String()}, + }, + } + require.Equal(t, abci.Event(event), res.Events[0]) +} + +func TestUpdateParamsFail(t *testing.T) { + _, ctx, k := testapp.CreateTestInput(true) + expectedParams := types.Params{ + MaxRawRequestCount: 1, + MaxAskCount: 10, + MaxCalldataSize: 256, + MaxReportDataSize: 512, + ExpirationBlockCount: 30, + BaseOwasmGas: 50000, + PerValidatorRequestGas: 3000, + SamplingTryCount: 3, + OracleRewardPercentage: 50, + InactivePenaltyDuration: 1000, + IBCRequestEnabled: true, + } + msg := types.NewMsgUpdateParams("foo", expectedParams) + res, err := oracle.NewHandler(k)(ctx, msg) + require.ErrorContains(t, err, "invalid authority") + require.Nil(t, res) + + expectedParams = types.Params{ + MaxRawRequestCount: 0, + MaxAskCount: 10, + MaxCalldataSize: 256, + MaxReportDataSize: 512, + ExpirationBlockCount: 30, + BaseOwasmGas: 50000, + PerValidatorRequestGas: 3000, + SamplingTryCount: 3, + OracleRewardPercentage: 50, + InactivePenaltyDuration: 1000, + IBCRequestEnabled: true, + } + msg = types.NewMsgUpdateParams(k.GetAuthority(), expectedParams) + res, err = oracle.NewHandler(k)(ctx, msg) + require.ErrorContains(t, err, "max raw request count must be positive") + require.Nil(t, res) +} diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index ed0594cde..12f36b688 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -293,21 +293,26 @@ func (k msgServer) Activate(goCtx context.Context, msg *types.MsgActivate) (*typ func (ms msgServer) UpdateParams( goCtx context.Context, - req *types.MsgUpdateParams, + msg *types.MsgUpdateParams, ) (*types.MsgUpdateParamsResponse, error) { - if ms.authority != req.Authority { + if ms.authority != msg.Authority { return nil, sdkerrors.Wrapf( govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, - req.Authority, + msg.Authority, ) } ctx := sdk.UnwrapSDKContext(goCtx) - if err := ms.SetParams(ctx, req.Params); err != nil { + if err := ms.SetParams(ctx, msg.Params); err != nil { return nil, err } + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeUpdateParams, + sdk.NewAttribute(types.AttributeKeyParams, msg.Params.String()), + )) + return &types.MsgUpdateParamsResponse{}, nil } diff --git a/x/oracle/keeper/params_test.go b/x/oracle/keeper/params_test.go index 98a296c48..9b94a8473 100644 --- a/x/oracle/keeper/params_test.go +++ b/x/oracle/keeper/params_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "fmt" "testing" "github.com/stretchr/testify/require" @@ -26,6 +27,7 @@ func TestGetSetParams(t *testing.T) { } k.SetParams(ctx, expectedParams) require.Equal(t, expectedParams, k.GetParams(ctx)) + expectedParams = types.Params{ MaxRawRequestCount: 2, MaxAskCount: 20, @@ -41,4 +43,36 @@ func TestGetSetParams(t *testing.T) { } k.SetParams(ctx, expectedParams) require.Equal(t, expectedParams, k.GetParams(ctx)) + + expectedParams = types.Params{ + MaxRawRequestCount: 2, + MaxAskCount: 20, + MaxCalldataSize: 512, + MaxReportDataSize: 256, + ExpirationBlockCount: 40, + BaseOwasmGas: 0, + PerValidatorRequestGas: 0, + SamplingTryCount: 5, + OracleRewardPercentage: 0, + InactivePenaltyDuration: 0, + IBCRequestEnabled: false, + } + k.SetParams(ctx, expectedParams) + require.Equal(t, expectedParams, k.GetParams(ctx)) + + expectedParams = types.Params{ + MaxRawRequestCount: 0, + MaxAskCount: 20, + MaxCalldataSize: 512, + MaxReportDataSize: 256, + ExpirationBlockCount: 40, + BaseOwasmGas: 150000, + PerValidatorRequestGas: 30000, + SamplingTryCount: 5, + OracleRewardPercentage: 80, + InactivePenaltyDuration: 10000, + IBCRequestEnabled: false, + } + err := k.SetParams(ctx, expectedParams) + require.EqualError(t, fmt.Errorf("max raw request count must be positive: 0"), err.Error()) } diff --git a/x/oracle/migrations/v2/migrator_test.go b/x/oracle/migrations/v2/migrator_test.go new file mode 100644 index 000000000..d029ff35d --- /dev/null +++ b/x/oracle/migrations/v2/migrator_test.go @@ -0,0 +1,45 @@ +package v2_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/x/oracle" + "github.com/bandprotocol/chain/v2/x/oracle/exported" + v2 "github.com/bandprotocol/chain/v2/x/oracle/migrations/v2" + "github.com/bandprotocol/chain/v2/x/oracle/types" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" +) + +type mockSubspace struct { + ps types.Params +} + +func newMockSubspace(ps types.Params) mockSubspace { + return mockSubspace{ps: ps} +} + +func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps exported.ParamSet) { + *ps.(*types.Params) = ms.ps +} + +func TestMigrate(t *testing.T) { + encCfg := moduletestutil.MakeTestEncodingConfig(oracle.AppModuleBasic{}) + cdc := encCfg.Codec + + storeKey := sdk.NewKVStoreKey(v2.ModuleName) + tKey := sdk.NewTransientStoreKey("transient_test") + ctx := testutil.DefaultContext(storeKey, tKey) + store := ctx.KVStore(storeKey) + + legacySubspace := newMockSubspace(types.DefaultParams()) + require.NoError(t, v2.Migrate(ctx, store, legacySubspace, cdc)) + + var res types.Params + bz := store.Get(types.ParamsKeyPrefix) + require.NoError(t, cdc.Unmarshal(bz, &res)) + require.Equal(t, legacySubspace.ps, res) +} diff --git a/x/oracle/types/events.go b/x/oracle/types/events.go index 65e03c2ca..65119ee66 100644 --- a/x/oracle/types/events.go +++ b/x/oracle/types/events.go @@ -15,6 +15,7 @@ const ( EventTypeRemoveReporter = "remove_reporter" EventTypeResolve = "resolve" EventTypeSendPacketFail = "send_packet_fail" + EventTypeUpdateParams = "update_params" AttributeKeyID = "id" AttributeKeyDataSourceID = "data_source_id" @@ -33,4 +34,5 @@ const ( AttributeKeyFee = "fee" AttributeKeyResult = "result" AttributeKeyReason = "reason" + AttributeKeyParams = "params" ) diff --git a/x/oracle/types/msgs.go b/x/oracle/types/msgs.go index 2b91d435c..f4205a59d 100644 --- a/x/oracle/types/msgs.go +++ b/x/oracle/types/msgs.go @@ -494,6 +494,14 @@ func (msg MsgActivate) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) } +// NewMsgActivate creates a new MsgActivate instance +func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { + return &MsgUpdateParams{ + Authority: authority, + Params: params, + } +} + // GetSignBytes implements the LegacyMsg interface. func (m MsgUpdateParams) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) diff --git a/x/oracle/types/params.go b/x/oracle/types/params.go index 5cab50928..4a478dde5 100644 --- a/x/oracle/types/params.go +++ b/x/oracle/types/params.go @@ -64,7 +64,7 @@ func DefaultParams() Params { // Validate does the sanity check on the params. func (p Params) Validate() error { - if err := validateUint64("max data source count", true)(p.MaxRawRequestCount); err != nil { + if err := validateUint64("max raw request count", true)(p.MaxRawRequestCount); err != nil { return err } if err := validateUint64("max ask count", true)(p.MaxAskCount); err != nil { From e09414f071f7bbc33301a9dfae4636ac0f640b10 Mon Sep 17 00:00:00 2001 From: Ongart Pisansathienwong <54426055+colmazia@users.noreply.github.com> Date: Wed, 16 Aug 2023 14:47:32 +0700 Subject: [PATCH 09/44] Delete open_proposal.sh --- scripts/open_proposal.sh | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100755 scripts/open_proposal.sh diff --git a/scripts/open_proposal.sh b/scripts/open_proposal.sh deleted file mode 100755 index 48bf006a0..000000000 --- a/scripts/open_proposal.sh +++ /dev/null @@ -1,18 +0,0 @@ -export WALLET_NAME=validator -export CHAIN_ID="bandchain" -export DAEMON_NAME=bandd -export DAEMON_HOME=$HOME/.band - -bandd config broadcast-mode block -bandd config chain-id $CHAIN_ID - -export UPGRADE_NAME=v2_6 -export UPGRADE_HEIGHT=40 - -bandd tx gov submit-proposal software-upgrade $UPGRADE_NAME \ - --title upgrade \ - --description upgrade \ - --upgrade-height $UPGRADE_HEIGHT \ - --from $WALLET_NAME \ - -y --keyring-backend test --gas-prices 0.0025uband - From 86b34b93f194183f8329ec064ef11e87498dd275 Mon Sep 17 00:00:00 2001 From: Ongart Pisansathienwong <54426055+colmazia@users.noreply.github.com> Date: Wed, 16 Aug 2023 14:47:56 +0700 Subject: [PATCH 10/44] Delete vote_proposal.sh --- scripts/vote_proposal.sh | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100755 scripts/vote_proposal.sh diff --git a/scripts/vote_proposal.sh b/scripts/vote_proposal.sh deleted file mode 100755 index d0721db42..000000000 --- a/scripts/vote_proposal.sh +++ /dev/null @@ -1,14 +0,0 @@ -export PROPOSAL_ID=1 -export WALLET_NAME=validator -export CHAIN_ID="bandchain" - -bandd config broadcast-mode block -bandd config chain-id $CHAIN_ID - -bandd tx gov deposit $PROPOSAL_ID 1000000000uband \ - --from $WALLET_NAME \ - -y --keyring-backend test --gas-prices 0.0025uband - -bandd tx gov vote $PROPOSAL_ID yes \ - --from $WALLET_NAME \ - -y --keyring-backend test --gas-prices 0.0025uband From 028f2de1154c5d76153d2618bf2c38633a2f2b4a Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 16 Aug 2023 15:59:20 +0700 Subject: [PATCH 11/44] add prune and snapshots cmd --- app/ante.go | 1 - app/app.go | 18 +- build.md | 4 +- cmd/bandd/cmd/init.go | 2 - cmd/bandd/cmd/root.go | 7 +- cmd/bandevmbot/abi.go | 532 ----------------------------------------- cmd/bandevmbot/main.go | 191 --------------- go.mod | 66 ++--- go.sum | 144 ++++++----- proto/buf.md | 14 +- 10 files changed, 134 insertions(+), 845 deletions(-) delete mode 100644 cmd/bandevmbot/abi.go delete mode 100644 cmd/bandevmbot/main.go diff --git a/app/ante.go b/app/ante.go index a1a8a5dcd..74ceab68e 100644 --- a/app/ante.go +++ b/app/ante.go @@ -20,7 +20,6 @@ type HandlerOptions struct { OracleKeeper *oraclekeeper.Keeper IBCKeeper *ibckeeper.Keeper GlobalFeeSubspace paramtypes.Subspace - StakingSubspace paramtypes.Subspace // 0.47 TODO: delete this line StakingKeeper *stakingkeeper.Keeper } diff --git a/app/app.go b/app/app.go index 2ca57d416..9bc08d76a 100644 --- a/app/app.go +++ b/app/app.go @@ -346,8 +346,7 @@ func NewBandApp( appCodec, keys[banktypes.StoreKey], app.AccountKeeper, - // 0.47 TODO: add blocked address - make(map[string]bool), + BlockedAddresses(), // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ), @@ -554,7 +553,6 @@ func NewBandApp( ), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), bandbank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), - // 0.47 TODO: check capability.NewAppModule sealKeeper argument capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), feegrantmodule.NewAppModule( @@ -736,7 +734,6 @@ func NewBandApp( OracleKeeper: &app.OracleKeeper, IBCKeeper: app.IBCKeeper, GlobalFeeSubspace: app.GetSubspace(globalfee.ModuleName), - StakingSubspace: app.GetSubspace(stakingtypes.ModuleName), // 0.47 TODO: delete this line StakingKeeper: app.StakingKeeper, }, ) @@ -939,6 +936,19 @@ func GetMaccPerms() map[string][]string { return modAccPerms } +// BlockedAddresses returns all the app's blocked account addresses. +func BlockedAddresses() map[string]bool { + modAccAddrs := make(map[string]bool) + for acc := range GetMaccPerms() { + modAccAddrs[authtypes.NewModuleAddress(acc).String()] = true + } + + // allow the following addresses to receive funds + delete(modAccAddrs, authtypes.NewModuleAddress(govtypes.ModuleName).String()) + + return modAccAddrs +} + // initParamsKeeper init params keeper and its subspaces func initParamsKeeper( appCodec codec.BinaryCodec, diff --git a/build.md b/build.md index 33b751eef..a48afa7d2 100644 --- a/build.md +++ b/build.md @@ -44,8 +44,8 @@ cp ./docker-config/single-validator/node_key.json ~/.band/config/node_key.json Once done, you can optionally add data sources or oracle scripts to the genesis file using `bandd`. ```bash -bandd add-data-source ... -bandd add-oracle-script ... +bandd genesis add-data-source ... +bandd genesis add-oracle-script ... ``` You can now start the chain with `bandd`. diff --git a/cmd/bandd/cmd/init.go b/cmd/bandd/cmd/init.go index 047f2fc74..a04408627 100644 --- a/cmd/bandd/cmd/init.go +++ b/cmd/bandd/cmd/init.go @@ -176,8 +176,6 @@ func InitCmd(customAppState map[string]json.RawMessage, defaultNodeHome string) genDoc.ConsensusParams.Block.MaxBytes = 3000000 // 3M bytes genDoc.ConsensusParams.Block.MaxGas = 50000000 // 50M gas - // 0.47 TODO: it is removed https://github.com/cometbft/cometbft/blob/1e0cf136d395db94728883355a136e4e34e693db/CHANGELOG.md?plain=1#L144 - // genDoc.ConsensusParams.Block.TimeIotaMs = 1000 // 1 second genDoc.ConsensusParams.Validator.PubKeyTypes = []string{types.ABCIPubKeyTypeSecp256k1} if err = genutil.ExportGenesisFile(genDoc, genFile); err != nil { return err diff --git a/cmd/bandd/cmd/root.go b/cmd/bandd/cmd/root.go index df41f3572..6430aceb0 100644 --- a/cmd/bandd/cmd/root.go +++ b/cmd/bandd/cmd/root.go @@ -14,7 +14,9 @@ import ( "github.com/cosmos/cosmos-sdk/client/debug" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/keys" + "github.com/cosmos/cosmos-sdk/client/pruning" "github.com/cosmos/cosmos-sdk/client/rpc" + "github.com/cosmos/cosmos-sdk/client/snapshot" "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -82,7 +84,6 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { rootCmd.AddCommand( InitCmd(band.NewDefaultGenesisState(), band.DefaultNodeHome), - // 0.47 TODO: check validity of this function genesisCommand( encodingConfig, AddGenesisDataSourceCmd(band.DefaultNodeHome), @@ -92,6 +93,9 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { // testnetCmd(band.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), config.Cmd(), + pruning.Cmd(newApp, band.DefaultNodeHome), + // support oracle file folder + snapshot.Cmd(newApp), ) server.AddCommands(rootCmd, band.DefaultNodeHome, newApp, appExport, addModuleInitFlags) @@ -197,7 +201,6 @@ func newApp( return bandApp } -// 0.47 TODO: check if function is working func appExport( logger log.Logger, db dbm.DB, traceStore io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, appOpts servertypes.AppOptions, modulesToExport []string) (servertypes.ExportedApp, error) { diff --git a/cmd/bandevmbot/abi.go b/cmd/bandevmbot/abi.go deleted file mode 100644 index df6b9df07..000000000 --- a/cmd/bandevmbot/abi.go +++ /dev/null @@ -1,532 +0,0 @@ -package main - -var rawABI = []byte(` -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "power", - "type": "uint256" - } - ], - "internalType": "struct Bridge.ValidatorWithPower[]", - "name": "_validators", - "type": "tuple[]" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "relayAndVerify", - "outputs": [ - { - "components": [ - { - "internalType": "uint64", - "name": "oracleScriptId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "requestTime", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "aggregationTime", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "requestedValidatorsCount", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minCount", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "reportedValidatorsCount", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct IBridge.VerifyOracleDataResult", - "name": "result", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "uint256", - "name": "_blockHeight", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_oracleIAVLStateHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_otherStoresMerkleHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_supplyStoresMerkleHash", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "versionAndChainIdHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "timeHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "txCountAndLastBlockInfoHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "consensusDataHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "lastResultsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "evidenceAndProposerHash", - "type": "bytes32" - } - ], - "internalType": "struct BlockHeaderMerkleParts.Data", - "name": "_merkleParts", - "type": "tuple" - }, - { - "internalType": "bytes", - "name": "_signedDataPrefix", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "signedDataSuffix", - "type": "bytes" - } - ], - "internalType": "struct TMSignature.Data[]", - "name": "_signatures", - "type": "tuple[]" - } - ], - "name": "relayOracleState", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "uint256", - "name": "power", - "type": "uint256" - } - ], - "internalType": "struct Bridge.ValidatorWithPower[]", - "name": "_validators", - "type": "tuple[]" - } - ], - "name": "updateValidatorPowers", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "bytes", - "name": "_encodedData", - "type": "bytes" - } - ], - "name": "decodeResult", - "outputs": [ - { - "components": [ - { - "internalType": "uint64", - "name": "oracleScriptId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "requestTime", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "aggregationTime", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "requestedValidatorsCount", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minCount", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "reportedValidatorsCount", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct IBridge.VerifyOracleDataResult", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "oracleStates", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalValidatorPower", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "validatorPowers", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "internalType": "uint256", - "name": "_blockHeight", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - }, - { - "internalType": "uint64", - "name": "_requestId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "_oracleScriptId", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "_params", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_version", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "bool", - "name": "isDataOnRight", - "type": "bool" - }, - { - "internalType": "uint8", - "name": "subtreeHeight", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "subtreeSize", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "subtreeVersion", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "siblingHash", - "type": "bytes32" - } - ], - "internalType": "struct IAVLMerklePath.Data[]", - "name": "_merklePaths", - "type": "tuple[]" - } - ], - "name": "verifyOracleData", - "outputs": [ - { - "components": [ - { - "internalType": "uint64", - "name": "oracleScriptId", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "requestTime", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "aggregationTime", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "requestedValidatorsCount", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minCount", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "reportedValidatorsCount", - "type": "uint64" - }, - { - "internalType": "bytes", - "name": "params", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct IBridge.VerifyOracleDataResult", - "name": "", - "type": "tuple" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - } -] -`) diff --git a/cmd/bandevmbot/main.go b/cmd/bandevmbot/main.go deleted file mode 100644 index ea8ea674c..000000000 --- a/cmd/bandevmbot/main.go +++ /dev/null @@ -1,191 +0,0 @@ -package main - -// import ( -// "bytes" -// "context" -// "fmt" -// "math/big" -// "os" -// "strconv" -// "strings" -// "time" - -// "github.com/ethereum/go-ethereum/accounts/abi" -// "github.com/ethereum/go-ethereum/common" -// ethtypes "github.com/ethereum/go-ethereum/core/types" -// crypto "github.com/ethereum/go-ethereum/crypto" -// "github.com/ethereum/go-ethereum/ethclient" -// "github.com/spf13/cobra" -// "github.com/cometbft/cometbft/crypto/secp256k1" -// "github.com/cometbft/cometbft/libs/log" -// rpchttp "github.com/cometbft/cometbft/rpc/client/http" -// ) - -// var ( -// logger log.Logger -// ) - -// type ValidatorWithPower struct { -// Addr common.Address -// Power *big.Int -// } - -// func getValidators(nodeURI string) []ValidatorWithPower { -// node, err := rpchttp.New(nodeURI, "/websocket") -// if err != nil { -// panic(err) -// } -// validators, err := node.Validators(nil, 0, 0) -// if err != nil { -// panic(err) -// } - -// vals := make([]ValidatorWithPower, len(validators.Validators)) - -// for idx, validator := range validators.Validators { -// pubKeyBytes, ok := validator.PubKey.(secp256k1.PubKeySecp256k1) -// if !ok { -// panic("fail to cast pubkey") -// } - -// pubkey, err := crypto.DecompressPubkey(pubKeyBytes[:]) -// if err != nil { -// panic(err) -// } -// vals[idx] = ValidatorWithPower{ -// Addr: crypto.PubkeyToAddress(*pubkey), -// Power: big.NewInt(validator.VotingPower), -// } - -// } -// return vals -// } - -// func updateValidators(rpcURI string, address string, node string, privateKey string, gasPrice uint64) { -// vals := getValidators(node) -// backgroundCtx := context.Background() -// contractAddress := common.HexToAddress(address) -// priv, err := crypto.HexToECDSA(privateKey) -// botAddress := crypto.PubkeyToAddress(priv.PublicKey) -// if err != nil { -// panic(err) -// } -// evmClient, err := ethclient.Dial(rpcURI) -// if err != nil { -// panic(err) -// } -// abiJson, err := abi.JSON(bytes.NewReader(rawABI)) -// if err != nil { -// panic(err) -// } -// data, err := abiJson.Pack("updateValidatorPowers", vals) -// if err != nil { -// panic(err) -// } -// chainID, err := evmClient.ChainID(backgroundCtx) -// if err != nil { -// panic(err) -// } - -// nonce, err := evmClient.NonceAt(backgroundCtx, botAddress, nil) -// if err != nil { -// panic(err) -// } -// tx := ethtypes.NewTransaction( -// nonce, -// contractAddress, -// big.NewInt(0), -// gasPrice, -// big.NewInt(2000000000), -// data, -// ) - -// signer := ethtypes.NewEIP155Signer(chainID) -// signTx, err := ethtypes.SignTx(tx, signer, priv) -// if err != nil { -// panic(err) -// } -// err = evmClient.SendTransaction(context.Background(), signTx) -// if err != nil { -// panic(err) -// } - -// } - -// const ( -// flagRPCUri = "rpc-uri" -// flagContractAddress = "contract-address" -// flagNodeUri = "node-uri" -// flagPrivKey = "priv-key" -// flagGasPrice = "gas-price" -// flagPollInterval = "poll-interval" -// ) - -func main() { - - // cmd := &cobra.Command{ - // Use: "(--rpc-uri [rpc-uri]) (--contract-address [contract-address]) (--node-uri [node-uri]) (--priv-key [priv-key]) (--gas-price [gas-price]) (--poll-interval [poll-interval])", - // Short: "Periodically update validator set to the destination EVM blockchain", - // Args: cobra.ExactArgs(0), - // Long: strings.TrimSpace( - // fmt.Sprintf(`Periodically update validator set to the destination EVM blockchain - // Example: - // $ --rpc-uri https://kovan.infura.io/v3/d3301689638b40dabad8395bf00d3945 --contract-address 0x0d8152D22a05A3Cf2cE1c5bEfCc2F8658f75a59d --node-uri http://d3n-debug.bandprotocol.com:26657 --priv-key AA0C65C16D4B8511C58122966F94192F6963D0EB7896435430BCDFF56E9F13B9 --gas-price 1000000 --poll-interval 24 - // `), - // ), - // RunE: func(cmd *cobra.Command, args []string) error { - - // rpcURI, err := cmd.Flags().GetString(flagRPCUri) - // if err != nil { - // return err - // } - // contractAddress, err := cmd.Flags().GetString(flagContractAddress) - // if err != nil { - // return err - // } - // nodeURI, err := cmd.Flags().GetString(flagNodeUri) - // if err != nil { - // return err - // } - // privateKey, err := cmd.Flags().GetString(flagPrivKey) - // if err != nil { - // return err - // } - // rawGasPrice, err := cmd.Flags().GetString(flagGasPrice) - // if err != nil { - // return err - // } - // gasPrice, err := strconv.ParseInt(rawGasPrice, 10, 64) - // if err != nil { - // return err - // } - // rawInterval, err := cmd.Flags().GetString(flagPollInterval) - // if err != nil { - // return err - // } - // interval, err := strconv.ParseInt(rawInterval, 10, 64) - // if err != nil { - // return err - // } - - // for { - // updateValidators(rpcURI, contractAddress, nodeURI, privateKey, uint64(gasPrice)) - // fmt.Println("finish round") - // time.Sleep(time.Duration(interval) * time.Hour) - // } - // }, - // } - // cmd.Flags().String(flagRPCUri, "", "RPC URI") - // cmd.Flags().String(flagContractAddress, "", "Address of contract") - // cmd.Flags().String(flagNodeUri, "", "Node URI") - // cmd.Flags().String(flagPrivKey, "", "Private key") - // cmd.Flags().String(flagGasPrice, "", "Gas Price") - // cmd.Flags().String(flagPollInterval, "", "Interval of update validatos (Hours)") - - // err := cmd.Execute() - // if err != nil { - // logger.Error(fmt.Sprintf("Failed executing: %s, exiting...", err)) - // os.Exit(1) - - // } -} diff --git a/go.mod b/go.mod index cc4b4b6e5..9476178b7 100644 --- a/go.mod +++ b/go.mod @@ -5,14 +5,14 @@ go 1.19 require ( cosmossdk.io/api v0.3.1 github.com/bandprotocol/go-owasm v0.2.3 - github.com/cometbft/cometbft v0.37.1 - github.com/cometbft/cometbft-db v0.7.0 + github.com/cometbft/cometbft v0.37.2 + github.com/cometbft/cometbft-db v0.8.0 github.com/confio/ics23/go v0.9.0 github.com/cosmos/cosmos-proto v1.0.0-beta.2 - github.com/cosmos/cosmos-sdk v0.47.2 + github.com/cosmos/cosmos-sdk v0.47.4 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/gogoproto v1.4.8 - github.com/cosmos/ibc-go/v7 v7.0.1 + github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/ibc-go/v7 v7.2.0 github.com/ethereum/go-ethereum v1.10.22 github.com/golang/protobuf v1.5.3 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 @@ -25,25 +25,26 @@ require ( github.com/prometheus/client_golang v1.14.0 github.com/rakyll/statik v0.1.7 github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.6.1 - github.com/spf13/viper v1.15.0 + github.com/spf13/cobra v1.7.0 + github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 - google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 - google.golang.org/grpc v1.54.0 - google.golang.org/protobuf v1.30.0 + google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 + google.golang.org/grpc v1.56.2 + google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go v0.110.4 // indirect + cloud.google.com/go/compute v1.20.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.12.0 // indirect - cloud.google.com/go/storage v1.29.0 // indirect + cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/errors v1.0.0-beta.7 // indirect - cosmossdk.io/math v1.0.0 // indirect + cosmossdk.io/errors v1.0.0 // indirect + cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect + cosmossdk.io/math v1.0.1 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -82,7 +83,7 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect + github.com/go-playground/locales v0.14.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -94,9 +95,10 @@ require ( github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/google/s2a-go v0.1.4 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.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 @@ -116,13 +118,13 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.16.3 // indirect - github.com/leodido/go-urn v1.2.1 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/linxGnu/grocksdb v1.7.16 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect @@ -130,46 +132,44 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect - github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.40.0 // indirect + github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.3 // indirect + github.com/rs/zerolog v1.29.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/spf13/afero v1.9.3 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect - github.com/ugorji/go/codec v1.2.7 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.12.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.5.0 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/net v0.12.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sys v0.11.0 // indirect golang.org/x/term v0.11.0 // indirect golang.org/x/text v0.12.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.110.0 // indirect + google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.5.0 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v0.5.5 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index 69928f900..f3873a301 100644 --- a/go.sum +++ b/go.sum @@ -36,8 +36,8 @@ cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34h cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= -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/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= @@ -121,8 +121,8 @@ cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= -cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +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.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -211,8 +211,8 @@ cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3Q cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iam v0.12.0 h1:DRtTY29b75ciH6Ov1PHb4/iat2CLCvrOm40Q0a6DFpE= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= +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/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= @@ -230,7 +230,6 @@ cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaML cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= @@ -354,8 +353,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/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= @@ -403,10 +402,12 @@ 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 h1:ro9w7eKx23om2tZz/VM2Pf+z2WAbGX1yDQQOJ6iGeJw= -cosmossdk.io/math v1.0.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +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/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= @@ -517,6 +518,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= @@ -563,10 +565,10 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE 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.1 h1:KLxkQTK2hICXYq21U2hn1W5hOVYUdQgDQ1uB+90xPIg= -github.com/cometbft/cometbft v0.37.1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= -github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= -github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= +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= @@ -578,25 +580,26 @@ 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.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.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.2 h1:9rSriCoiJD+4F+tEDobyM8V7HF5BtY5Ef4VYNig96s0= -github.com/cosmos/cosmos-sdk v0.47.2/go.mod h1:zYzgI8w8hhotXTSoGbbSOAKfpJTx4wOy4XgbaKhtRtc= +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= 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.8 h1:BrHKc6WFZt8+jRV71vKSQE+JrfF+JAnzrKo2VP7wIZ4= -github.com/cosmos/gogoproto v1.4.8/go.mod h1:hnb0DIEWTv+wdNzNcqus5xCQXq5+CXauq1FJuurRfVY= +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.0.1 h1:NIBNRWjlOoFvFQu1ZlgwkaSeHO5avf4C1YQiWegt8jw= -github.com/cosmos/ibc-go/v7 v7.0.1/go.mod h1:vEaapV6nuLPQlS+g8IKmxMo6auPi0i7HMv1PhViht/E= +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= @@ -670,9 +673,6 @@ github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0+ github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/ethereum/go-ethereum v1.10.22 h1:HbEgsDo1YTGIf4KB/NNpn+XH+PiNJXUZ9ksRxiqWyMc= github.com/ethereum/go-ethereum v1.10.22/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/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -694,8 +694,8 @@ github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -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= @@ -723,9 +723,8 @@ github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb 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/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +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/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= @@ -736,9 +735,9 @@ 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/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= @@ -848,6 +847,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -870,8 +871,9 @@ 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.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +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= @@ -961,7 +963,6 @@ 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/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= @@ -980,7 +981,7 @@ github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+ 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/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= @@ -997,7 +998,6 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/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= @@ -1041,7 +1041,6 @@ github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= 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/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/levigross/grequests v0.0.0-20190908174114-253788527a1a h1:DGFy/362j92vQRE3ThU1yqg9TuJS8YJOSbQuB7BP9cA= github.com/levigross/grequests v0.0.0-20190908174114-253788527a1a/go.mod h1:jVntzcUU+2BtVohZBQmSHWUmh8B55LCNfPhcNCIvvIg= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1051,6 +1050,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 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-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= @@ -1067,12 +1068,16 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 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/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1112,7 +1117,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= @@ -1172,16 +1176,16 @@ 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/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +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/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= 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/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d h1:htwtWgtQo8YS6JFWWi2DNgY0RwSGJ1ruMoxY6CUUclk= -github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +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/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= @@ -1220,8 +1224,8 @@ 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.40.0 h1:Afz7EVRqGg2Mqqf4JuF9vdvp1pi220m55Pi9T2JnO4Q= -github.com/prometheus/common v0.40.0/go.mod h1:L65ZJPSmfn/UBWLQIHV7dBrKFidB/wPlF1y5TlSt9OE= +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= @@ -1246,6 +1250,9 @@ github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZV 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.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= +github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1276,15 +1283,15 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/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.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= @@ -1293,8 +1300,8 @@ 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.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= +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/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= @@ -1314,14 +1321,13 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= 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= @@ -1339,11 +1345,9 @@ github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqri 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= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= 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= @@ -1420,6 +1424,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-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.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1436,8 +1442,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-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +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= @@ -1521,6 +1527,7 @@ golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/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.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -1536,8 +1543,8 @@ golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -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= @@ -1565,8 +1572,8 @@ golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri 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.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +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= @@ -1582,6 +1589,7 @@ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJ 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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1664,6 +1672,7 @@ golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBc 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= @@ -1683,6 +1692,7 @@ golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBc 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.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1853,8 +1863,8 @@ google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91 google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -google.golang.org/api v0.110.0 h1:l+rh0KYUooe9JGbGVx71tbFo4SMbMTXK3I3ia2QSEeU= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= +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.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1983,8 +1993,12 @@ google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZV google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 h1:EfLuoKW5WfkgVdDy7dTK8qSbH37AX5mj/MFh+bGPz14= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= +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.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -2003,8 +2017,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= @@ -2040,9 +2054,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.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= 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= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/proto/buf.md b/proto/buf.md index 807dd35c6..36241e273 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -1,19 +1,7 @@ # Protobufs -This is the public protocol buffers API for [Wasmd](https://github.com/CosmWasm/wasmd). +This is the public protocol buffers API for [bandd](https://github.com/bandprotocol/chain). ## Download The `buf` CLI comes with an export command. Use `buf export -h` for details - -#### Examples: - -Download cosmwasm protos for a commit: -```bash -buf export buf.build/cosmwasm/wasmd:${commit} --output ./tmp -``` - -Download all project protos: -```bash -buf export . --output ./tmp -``` \ No newline at end of file From acf83d5f6758bee48477de00b099a29c764829ea Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 16 Aug 2023 16:00:38 +0700 Subject: [PATCH 12/44] delete commented functions --- x/globalfee/module.go | 13 ------------- x/oracle/module.go | 16 ---------------- 2 files changed, 29 deletions(-) diff --git a/x/globalfee/module.go b/x/globalfee/module.go index df1199fce..cdc20bdd6 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -106,19 +106,6 @@ func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) jso func (a AppModule) RegisterInvariants(registry sdk.InvariantRegistry) { } -// 0.47 TODO: delete these functions -// func (a AppModule) Route() sdk.Route { -// return sdk.Route{} -// } - -// func (a AppModule) QuerierRoute() string { -// return types.QuerierRoute -// } - -// func (a AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier { -// return nil -// } - func (a AppModule) RegisterServices(cfg module.Configurator) { types.RegisterQueryServer(cfg.QueryServer(), NewGrpcQuerier(a.paramSpace)) } diff --git a/x/oracle/module.go b/x/oracle/module.go index 2a1051fde..48c5986ef 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -101,22 +101,6 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { // TODO } -// 0.47 TODO: delete these functions -// // Deprecated: Route returns the message routing key for the bank module. -// func (am AppModule) Route() sdk.Route { -// return sdk.Route{} -// } - -// // QuerierRoute returns the oracle module's querier route name. -// func (AppModule) QuerierRoute() string { -// return types.QuerierRoute -// } - -// // LegacyQuerierHandler implements the AppModule interface -// func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { -// return nil -// } - // RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) From 1deeed2422d09f0e4b24ce611b6245ebe51eabd1 Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 16 Aug 2023 17:10:15 +0700 Subject: [PATCH 13/44] clear todo --- testing/chain.go | 2 +- testing/endpoint.go | 2 -- testing/events.go | 1 - x/globalfee/feechecker/feechecker.go | 1 - x/oracle/ibc_test.go | 2 +- x/oracle/keeper/result.go | 3 --- x/oracle/keeper/snapshotter.go | 2 -- 7 files changed, 2 insertions(+), 11 deletions(-) diff --git a/testing/chain.go b/testing/chain.go index a7bdd0d27..78cdd9d00 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -1,4 +1,4 @@ -// 0.47 TODO: consider copy an entire file +// 0.47 TODO: consider importing directly from ibc instead of forking package ibctesting import ( diff --git a/testing/endpoint.go b/testing/endpoint.go index 701a9aea2..bfec5d45e 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -136,7 +136,6 @@ func (endpoint *Endpoint) UpdateClient() (err error) { // ensure counterparty has committed state endpoint.Chain.Coordinator.CommitBlock(endpoint.Counterparty.Chain) - // 0.47 TODO: check ibc var ( header *ibctmtypes.Header ) @@ -380,7 +379,6 @@ func (endpoint *Endpoint) ChanCloseInit() error { // The counterparty client is updated so proofs can be sent to the counterparty chain. // The packet sequence generated for the packet to be sent is returned. An error // is returned if one occurs. -// 0.47 TODO: consider copy an entire file func (endpoint *Endpoint) SendPacket( timeoutHeight clienttypes.Height, timeoutTimestamp uint64, diff --git a/testing/events.go b/testing/events.go index 523a920bc..ac1fdd719 100644 --- a/testing/events.go +++ b/testing/events.go @@ -1,4 +1,3 @@ -// 0.47 TODO: consider copy an entire file package ibctesting import ( diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index ed02d474e..73b1ca437 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -138,6 +138,5 @@ func (fc FeeChecker) DefaultZeroGlobalFee(ctx sdk.Context) ([]sdk.DecCoin, error } func (fc FeeChecker) GetBondDenom(ctx sdk.Context) string { - // 0.47 TODO: test bond denom is not nil return fc.StakingKeeper.BondDenom(ctx) } diff --git a/x/oracle/ibc_test.go b/x/oracle/ibc_test.go index 5f888b2d6..d31f212f2 100644 --- a/x/oracle/ibc_test.go +++ b/x/oracle/ibc_test.go @@ -1,3 +1,4 @@ +// 0.47 TODO: write this test file by importing testing directly from ibc package oracle_test import ( @@ -41,7 +42,6 @@ func (suite *OracleTestSuite) SetupTest() { suite.coordinator.Setup(suite.path) } -// 0.47 TODO: check if this function is working, maybe return sequence number instead func (suite *OracleTestSuite) sendOracleRequestPacket( path *ibctesting.Path, seq uint64, diff --git a/x/oracle/keeper/result.go b/x/oracle/keeper/result.go index 791ac4904..3abb50070 100644 --- a/x/oracle/keeper/result.go +++ b/x/oracle/keeper/result.go @@ -81,7 +81,6 @@ func (k Keeper) ResolveExpired(ctx sdk.Context, id types.RequestID) { } // SaveResult saves the result packets for the request with the given resolve status and result. -// 0.47 TODO: check validity of this function func (k Keeper) SaveResult( ctx sdk.Context, id types.RequestID, status types.ResolveStatus, result []byte, ) { @@ -118,8 +117,6 @@ func (k Keeper) SaveResult( r.ClientID, id, reportCount, int64(r.RequestTime), ctx.BlockTime().Unix(), status, result, ) - // 0.47 TODO: check validity of send packet - // 0.47 TODO: check if we want sequence number if _, err := k.channelKeeper.SendPacket( ctx, channelCap, diff --git a/x/oracle/keeper/snapshotter.go b/x/oracle/keeper/snapshotter.go index 33d8fea4a..6ab7b902b 100644 --- a/x/oracle/keeper/snapshotter.go +++ b/x/oracle/keeper/snapshotter.go @@ -80,7 +80,6 @@ func (os *OracleSnapshotter) PruneSnapshotHeight(height int64) { func (os *OracleSnapshotter) SetSnapshotInterval(snapshotInterval uint64) { } -// 0.47 TODO: check validity of this function func (os *OracleSnapshotter) RestoreExtension( height uint64, format uint32, payloadReader snapshot.ExtensionPayloadReader, ) error { @@ -90,7 +89,6 @@ func (os *OracleSnapshotter) RestoreExtension( return snapshot.ErrUnknownFormat } -// 0.47 TODO: check validity of this function func (os *OracleSnapshotter) processAllItems( height uint64, payloadReader snapshot.ExtensionPayloadReader, From 7e612b76d6e6f118f120455d61bdb8248e0ec245 Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 16 Aug 2023 17:57:06 +0700 Subject: [PATCH 14/44] migrate from third party proto & add msg signer --- proto/oracle/v1/tx.proto | 49 ++- third_party/proto/confio/proofs.proto | 232 ----------- .../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 ------- third_party/proto/tendermint/abci/types.proto | 394 ------------------ .../proto/tendermint/crypto/keys.proto | 17 - .../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 | 79 ---- .../proto/tendermint/types/types.proto | 153 ------- .../proto/tendermint/types/validator.proto | 25 -- .../proto/tendermint/version/types.proto | 24 -- x/oracle/types/tx.pb.go | 151 +++---- 21 files changed, 115 insertions(+), 1935 deletions(-) delete mode 100644 third_party/proto/confio/proofs.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.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/proto/oracle/v1/tx.proto b/proto/oracle/v1/tx.proto index 4d525e9b0..ae45d5340 100644 --- a/proto/oracle/v1/tx.proto +++ b/proto/oracle/v1/tx.proto @@ -11,6 +11,7 @@ import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; +import "amino/amino.proto"; // Msg defines the oracle Msg service. service Msg { @@ -44,6 +45,9 @@ service Msg { // MsgRequestData is a message for sending a data oracle request. message MsgRequestData { + option (cosmos.msg.v1.signer) = "sender"; + option (amino.name) = "oracle/Request"; + option (gogoproto.equal) = true; // OracleScriptID is the identifier of the oracle script to be called. uint64 oracle_script_id = 1 [(gogoproto.customname) = "OracleScriptID", (gogoproto.casttype) = "OracleScriptID"]; @@ -65,7 +69,7 @@ message MsgRequestData { // ExecuteGas is amount of gas to reserve for executing uint64 execute_gas = 8; // Sender is an account address of message sender. - string sender = 9; + string sender = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgRequestDataResponse is response data for MsgRequestData message @@ -73,6 +77,9 @@ message MsgRequestDataResponse {} // MsgReportData is a message for reporting to a data request by a validator. message MsgReportData { + option (cosmos.msg.v1.signer) = "validator"; + option (amino.name) = "oracle/Report"; + option (gogoproto.equal) = true; // RequestID is the identifier of the request to be reported to. uint64 request_id = 1 [(gogoproto.customname) = "RequestID", (gogoproto.casttype) = "RequestID"]; @@ -80,7 +87,7 @@ message MsgReportData { // identified by external ID repeated RawReport raw_reports = 2 [(gogoproto.nullable) = false]; // Validator is the address of the validator that owns this report. - string validator = 3; + string validator = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgReportDataResponse is response data for MsgReportData message @@ -88,6 +95,9 @@ message MsgReportDataResponse {} // MsgCreateDataSource is a message for creating a new data source. message MsgCreateDataSource { + option (cosmos.msg.v1.signer) = "sender"; + option (amino.name) = "oracle/CreateDataSource"; + option (gogoproto.equal) = true; // Name is the name of this data source used for display (optional). string name = 1; @@ -102,12 +112,12 @@ message MsgCreateDataSource { repeated cosmos.base.v1beta1.Coin fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // Treasury is the account address who receive data source fee from requester. - string treasury = 5; + string treasury = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Owner is the account address who is allowed to make further changes to the // data source. - string owner = 6; + string owner = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Sender is the signer of this message. - string sender = 7; + string sender = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgCreateDataSourceResponse is response data for MsgCreateDataSource message @@ -115,6 +125,9 @@ message MsgCreateDataSourceResponse {} // MsgEditDataSource is a message for editing an existing data source. message MsgEditDataSource { + option (cosmos.msg.v1.signer) = "sender"; + option (amino.name) = "oracle/EditDataSource"; + option (gogoproto.equal) = true; // DataSourceID is the unique identifier of the data source to be edited. uint64 data_source_id = 1 [(gogoproto.customname) = "DataSourceID", (gogoproto.casttype) = "DataSourceID"]; @@ -131,13 +144,13 @@ message MsgEditDataSource { repeated cosmos.base.v1beta1.Coin fee = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; // Treasury is the address who receive data source fee from requester. - string treasury = 6; + string treasury = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Owner is the address who is allowed to make further changes to the data // source. - string owner = 7; + string owner = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Sender is the signer of this message. Must be the current data source's // owner. - string sender = 8; + string sender = 8 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgEditDataSourceResponse is response data for MsgEditDataSource message @@ -145,6 +158,9 @@ message MsgEditDataSourceResponse {} // MsgCreateOracleScript is a message for creating an oracle script. message MsgCreateOracleScript { + option (cosmos.msg.v1.signer) = "sender"; + option (amino.name) = "oracle/CreateOracleScript"; + option (gogoproto.equal) = true; // Name is the name of this oracle script used for display (optional). string name = 1; @@ -159,9 +175,9 @@ message MsgCreateOracleScript { bytes code = 5; // Owner is the address who is allowed to make further changes to the oracle // script. - string owner = 6; + string owner = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Sender is the signer of this message. - string sender = 7; + string sender = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgCreateOracleScriptResponse is response data for MsgCreateOracleScript @@ -170,6 +186,9 @@ message MsgCreateOracleScriptResponse {} // MsgEditOracleScript is a message for editing an existing oracle script. message MsgEditOracleScript { + option (cosmos.msg.v1.signer) = "sender"; + option (amino.name) = "oracle/EditOracleScript"; + option (gogoproto.equal) = true; // OracleScriptID is the unique identifier of the oracle script to be edited. uint64 oracle_script_id = 1 [(gogoproto.customname) = "OracleScriptID", (gogoproto.casttype) = "OracleScriptID"]; @@ -186,10 +205,10 @@ message MsgEditOracleScript { bytes code = 6; // Owner is an account address who is allowed to make further changes to the // oracle script. - string owner = 7; + string owner = 7 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Sender is an account address who sign this message. Must be the current // oracle script's owner. - string sender = 8; + string sender = 8 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgEditOracleScriptResponse is response data for MsgEditOracleScript message @@ -199,10 +218,13 @@ message MsgEditOracleScriptResponse {} // oracle provider. However, the activation can be revoked once the validator // is unable to provide data to fulfill requests message MsgActivate { + option (cosmos.msg.v1.signer) = "validator"; + option (amino.name) = "oracle/Activate"; + option (gogoproto.equal) = true; // Validator is the validator address who sign this message and request to be // activated. - string validator = 1; + string validator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgActivateResponse is response data for MsgActivate message @@ -213,6 +235,7 @@ message MsgActivateResponse {} // Since: cosmos-sdk 0.47 message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "oracle/UpdateParams"; // authority is the address of the governance account. string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/third_party/proto/confio/proofs.proto b/third_party/proto/confio/proofs.proto deleted file mode 100644 index 2552d2ac1..000000000 --- a/third_party/proto/confio/proofs.proto +++ /dev/null @@ -1,232 +0,0 @@ -// 0.47 TODO: get rid of third party proto -syntax = "proto3"; - -package ics23; - -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/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 7b67d5840..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 96c82b99c..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; -} 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.proto b/third_party/proto/tendermint/abci/types.proto deleted file mode 100644 index e6b604e4b..000000000 --- a/third_party/proto/tendermint/abci/types.proto +++ /dev/null @@ -1,394 +0,0 @@ -syntax = "proto3"; -package tendermint.abci; - -option go_package = "github.com/cometbft/cometbft/abci/types"; - -// For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md -import "tendermint/crypto/proof.proto"; -import "tendermint/types/types.proto"; -import "tendermint/crypto/keys.proto"; -import "tendermint/types/params.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.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 - -//---------------------------------------- -// Request types - -message Request { - oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestSetOption set_option = 4; - RequestInitChain init_chain = 5; - RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - RequestCheckTx check_tx = 8; - RequestDeliverTx deliver_tx = 9; - RequestEndBlock end_block = 10; - RequestCommit commit = 11; - RequestListSnapshots list_snapshots = 12; - RequestOfferSnapshot offer_snapshot = 13; - RequestLoadSnapshotChunk load_snapshot_chunk = 14; - RequestApplySnapshotChunk apply_snapshot_chunk = 15; - } -} - -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; - int64 initial_height = 6; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -message RequestBeginBlock { - bytes hash = 1; - tendermint.types.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 [(gogoproto.enumvalue_customname) = "New"]; - RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; -} - -message RequestCheckTx { - bytes tx = 1; - CheckTxType type = 2; -} - -message RequestDeliverTx { - bytes tx = 1; -} - -message RequestEndBlock { - int64 height = 1; -} - -message RequestCommit {} - -// lists available snapshots -message RequestListSnapshots {} - -// offers a snapshot to the application -message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height -} - -// loads a snapshot chunk -message RequestLoadSnapshotChunk { - uint64 height = 1; - uint32 format = 2; - uint32 chunk = 3; -} - -// Applies a snapshot chunk -message RequestApplySnapshotChunk { - uint32 index = 1; - bytes chunk = 2; - string sender = 3; -} - -//---------------------------------------- -// 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; - ResponseListSnapshots list_snapshots = 13; - ResponseOfferSnapshot offer_snapshot = 14; - ResponseLoadSnapshotChunk load_snapshot_chunk = 15; - ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - } -} - -// 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]; - bytes app_hash = 3; -} - -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.ProofOps proof_ops = 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 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - 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 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - 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; - int64 retain_height = 3; -} - -message ResponseListSnapshots { - repeated Snapshot snapshots = 1; -} - -message ResponseOfferSnapshot { - Result result = 1; - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others - } -} - -message ResponseLoadSnapshotChunk { - bytes chunk = 1; -} - -message ResponseApplySnapshotChunk { - Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others - } -} - -//---------------------------------------- -// Misc. - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -message ConsensusParams { - BlockParams block = 1; - tendermint.types.EvidenceParams evidence = 2; - tendermint.types.ValidatorParams validator = 3; - tendermint.types.VersionParams version = 4; -} - -// 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 LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -// Event allows application developers to attach additional information to -// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -// Later, transactions may be queried using these events. -message Event { - string type = 1; - repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; -} - -// EventAttribute is a single key-value pair, associated with an event. -message EventAttribute { - bytes key = 1; - bytes value = 2; - bool index = 3; // nondeterministic -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; -} - -//---------------------------------------- -// Blockchain Types - -// Validator -message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power -} - -// ValidatorUpdate -message ValidatorUpdate { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; -} - -// VoteInfo -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; -} - -enum EvidenceType { - UNKNOWN = 0; - DUPLICATE_VOTE = 1; - LIGHT_CLIENT_ATTACK = 2; -} - -message Evidence { - EvidenceType type = 1; - // The offending validator - Validator validator = 2 [(gogoproto.nullable) = false]; - // The height when the offense occurred - int64 height = 3; - // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/cometbft/cometbft/issues/4581 - int64 total_voting_power = 5; -} - -//---------------------------------------- -// State Sync Types - -message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata -} - -//---------------------------------------- -// 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); - rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); - rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); -} diff --git a/third_party/proto/tendermint/crypto/keys.proto b/third_party/proto/tendermint/crypto/keys.proto deleted file mode 100644 index a5d3ce85d..000000000 --- a/third_party/proto/tendermint/crypto/keys.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/cometbft/cometbft/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; - bytes secp256k1 = 2; - } -} diff --git a/third_party/proto/tendermint/crypto/proof.proto b/third_party/proto/tendermint/crypto/proof.proto deleted file mode 100644 index ae72195e8..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/cometbft/cometbft/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 e6afc5e8e..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/cometbft/cometbft/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 157d8ba1c..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/cometbft/cometbft/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 d531c06a0..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/cometbft/cometbft/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 06f30ec2f..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/cometbft/cometbft/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 354aee309..000000000 --- a/third_party/proto/tendermint/types/params.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/cometbft/cometbft/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 94f19e441..000000000 --- a/third_party/proto/tendermint/types/types.proto +++ /dev/null @@ -1,153 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/cometbft/cometbft/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 3e170262c..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/cometbft/cometbft/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 3b6ef4547..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/cometbft/cometbft/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/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index e34415300..dd159ff87 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -12,6 +12,7 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -1082,78 +1083,84 @@ func init() { func init() { proto.RegisterFile("oracle/v1/tx.proto", fileDescriptor_31571edce0094a5d) } var fileDescriptor_31571edce0094a5d = []byte{ - // 1132 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xbd, 0x6f, 0xdb, 0x46, - 0x14, 0x37, 0x2d, 0x59, 0x16, 0x4f, 0xb2, 0x12, 0xb3, 0x8e, 0x4d, 0xd3, 0x89, 0xa8, 0x1a, 0x41, - 0xa0, 0x16, 0x88, 0x58, 0xbb, 0x40, 0x81, 0xa4, 0x53, 0x64, 0xf7, 0xc3, 0x68, 0x94, 0x16, 0x74, - 0xb3, 0x04, 0x28, 0xd4, 0x13, 0x79, 0xa6, 0x09, 0x93, 0x3c, 0xf5, 0xee, 0xe4, 0x8f, 0xb5, 0x63, - 0xa7, 0xce, 0x9d, 0x32, 0x37, 0x4b, 0x87, 0xa2, 0x7f, 0x43, 0xc6, 0xa0, 0x53, 0x27, 0x35, 0x90, - 0x87, 0xe6, 0x6f, 0xe8, 0x54, 0xf0, 0xee, 0xc4, 0x0f, 0x59, 0xb2, 0x11, 0x23, 0xe8, 0x24, 0xbd, - 0xf7, 0x7b, 0xef, 0xdd, 0xbb, 0xdf, 0xef, 0xdd, 0x1d, 0x81, 0x86, 0x09, 0x74, 0x02, 0x64, 0x1d, - 0x6f, 0x59, 0xec, 0xb4, 0xd5, 0x27, 0x98, 0x61, 0x4d, 0x15, 0xbe, 0xd6, 0xf1, 0x96, 0xb1, 0xe2, - 0x61, 0x0f, 0x73, 0xaf, 0x15, 0xff, 0x13, 0x01, 0x86, 0xe9, 0x61, 0xec, 0x05, 0xc8, 0xe2, 0x56, - 0x6f, 0x70, 0x60, 0x31, 0x3f, 0x44, 0x94, 0xc1, 0xb0, 0x2f, 0x03, 0xd6, 0x27, 0x03, 0x60, 0x74, - 0x26, 0xa1, 0xd5, 0x74, 0x41, 0xb9, 0x8c, 0xf0, 0xd7, 0x1d, 0x4c, 0x43, 0x4c, 0xad, 0x1e, 0xa4, - 0x31, 0xd8, 0x43, 0x0c, 0x6e, 0x59, 0x0e, 0xf6, 0xa3, 0x71, 0x49, 0x81, 0x77, 0x45, 0x33, 0xc2, - 0x90, 0xd0, 0x9a, 0x4c, 0x0d, 0xa9, 0x17, 0x97, 0x0d, 0xa9, 0x27, 0x80, 0xcd, 0x17, 0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0xf1, 0x7f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x0f, 0xdb, 0x0e, 0x61, 0x74, 0x0c, 0x00, 0x00, + // 1232 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0xdb, 0x46, + 0x13, 0xb6, 0x2c, 0x59, 0x11, 0x57, 0xb2, 0x13, 0x33, 0xfe, 0xa0, 0xe8, 0x37, 0x92, 0x5e, 0xc1, + 0x30, 0x94, 0x14, 0x16, 0x63, 0xb7, 0x28, 0x10, 0xf7, 0x14, 0xd9, 0xfd, 0x30, 0x1a, 0xa5, 0x05, + 0xdd, 0x5c, 0x02, 0x14, 0xea, 0x8a, 0x5c, 0xd3, 0x84, 0x49, 0xae, 0xba, 0xbb, 0xf2, 0xc7, 0xb5, + 0xc7, 0x5e, 0xda, 0xfe, 0x83, 0xa0, 0xc7, 0x9e, 0x72, 0xe8, 0x5f, 0x28, 0x90, 0x63, 0xd0, 0x5e, + 0x7a, 0x52, 0x0b, 0x19, 0x45, 0xfa, 0x1b, 0x7a, 0x2a, 0xb8, 0xbb, 0xa2, 0x48, 0x59, 0xf2, 0x47, + 0x90, 0xe6, 0x62, 0x73, 0xe6, 0x79, 0x76, 0x38, 0x9c, 0x67, 0x66, 0x77, 0x05, 0x54, 0x4c, 0xa0, + 0xe5, 0x21, 0xe3, 0x68, 0xc3, 0x60, 0x27, 0xf5, 0x0e, 0xc1, 0x0c, 0xab, 0x8a, 0xf0, 0xd5, 0x8f, + 0x36, 0xf4, 0x05, 0x07, 0x3b, 0x98, 0x7b, 0x8d, 0xf0, 0x49, 0x10, 0xf4, 0xb2, 0x83, 0xb1, 0xe3, + 0x21, 0x83, 0x5b, 0xed, 0xee, 0xbe, 0xc1, 0x5c, 0x1f, 0x51, 0x06, 0xfd, 0x8e, 0x24, 0x14, 0x47, + 0x09, 0x30, 0x38, 0x95, 0xd0, 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 0xe2, 0xfa, 0xda, 0xc5, 0x78, 0x14, 0xfb, 0x0b, 0x30, + 0x37, 0x72, 0x96, 0xfe, 0x2f, 0xb9, 0x32, 0x89, 0xea, 0xab, 0x17, 0xa1, 0x51, 0xd4, 0xaf, 0x80, + 0x3a, 0x66, 0xbb, 0xae, 0x8c, 0xcb, 0x29, 0xce, 0xd0, 0x6b, 0x97, 0x31, 0xe2, 0x35, 0x39, 0xb7, + 0x4f, 0x95, 0xce, 0xe7, 0x96, 0x88, 0xbe, 0x76, 0x31, 0x1e, 0xc5, 0x6e, 0x80, 0x5c, 0x34, 0x51, + 0x4b, 0xc9, 0x35, 0x03, 0xbf, 0x5e, 0x1a, 0xef, 0x8f, 0x62, 0x3c, 0x06, 0x85, 0xc4, 0x38, 0xe8, + 0x49, 0x7e, 0x1c, 0xd3, 0xab, 0x93, 0xb1, 0x41, 0xbc, 0xc6, 0xee, 0x8b, 0x7e, 0x29, 0xf5, 0xb2, + 0x5f, 0x4a, 0xfd, 0xd9, 0x2f, 0xa5, 0xbe, 0x3f, 0x2b, 0x4d, 0xbd, 0x3c, 0x2b, 0x4d, 0xfd, 0x7e, + 0x56, 0x9a, 0x7a, 0x6a, 0xc4, 0x6e, 0x0b, 0x6d, 0x18, 0xd8, 0xfc, 0x97, 0x9d, 0x85, 0x3d, 0xc3, + 0x3a, 0x80, 0x6e, 0x60, 0x1c, 0x6d, 0x1a, 0x27, 0xf2, 0xb7, 0xa5, 0xb8, 0x3a, 0xb4, 0xb3, 0x9c, + 0xf1, 0xee, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe5, 0xec, 0xad, 0xf1, 0xed, 0x0e, 0x00, 0x00, } func (this *MsgRequestData) Equal(that interface{}) bool { From 163feb08a647075097e64abbf893eeb9c30ff55c Mon Sep 17 00:00:00 2001 From: colmazia Date: Fri, 25 Aug 2023 16:50:11 +0700 Subject: [PATCH 15/44] update proto part in makefile & delete unused import in proto files --- Makefile | 65 ++++------- app/app.go | 11 -- cmd/bandd/cmd/root.go | 1 - proto/oracle/v1/oracle.proto | 1 - proto/oracle/v1/query.proto | 3 - proto/oracle/v1/tx.proto | 3 - x/oracle/types/oracle.pb.go | 202 +++++++++++++++++------------------ x/oracle/types/query.pb.go | 189 ++++++++++++++++---------------- x/oracle/types/tx.pb.go | 151 +++++++++++++------------- 9 files changed, 285 insertions(+), 341 deletions(-) diff --git a/Makefile b/Makefile index 7485ee940..04171c655 100644 --- a/Makefile +++ b/Makefile @@ -68,10 +68,7 @@ test: ### Protobuf ### ############################################################################### -PROTO_BUILDER_IMAGE=tendermintdev/sdk-proto-gen@sha256:372dce7be2f465123e26459973ca798fc489ff2c75aeecd814c0ca8ced24faca -PROTO_FORMATTER_IMAGE=tendermintdev/docker-build-proto@sha256:aabcfe2fc19c31c0f198d4cd26393f5e5ca9502d7ea3feafbfe972448fee7cae - -protoVer=0.11.6 +protoVer=0.13.0 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) @@ -81,52 +78,32 @@ proto-gen: @echo "Generating Protobuf files" @$(protoImage) sh ./scripts/protocgen.sh -proto-format: - @echo "Formatting Protobuf files" - $(DOCKER) run --rm -v $(CURDIR):/workspace \ - --workdir /workspace $(PROTO_FORMATTER_IMAGE) \ - find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \; - -# This generates the SDK's custom wrapper for google.protobuf.Any. It should only be run manually when needed -proto-gen-any: - $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh - proto-swagger-gen: - @./scripts/protoc-swagger-gen.sh + @echo "Generating Protobuf Swagger" + @$(protoImage) sh ./scripts/protoc-swagger-gen.sh + $(MAKE) update-swagger-docs + +proto-format: + @$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; proto-lint: - @$(DOCKER_BUF) check lint --error-format=json + @$(protoImage) buf lint --error-format=json proto-check-breaking: - @$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master + @$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main -TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint -GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos -COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master -CONFIO_URL = https://raw.githubusercontent.com/confio/ics23/v0.6.3 +CMT_URL = https://raw.githubusercontent.com/cometbft/cometbft/v0.37.0/proto/tendermint -TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto -TM_ABCI_TYPES = third_party/proto/tendermint/abci -TM_TYPES = third_party/proto/tendermint/types -TM_VERSION = third_party/proto/tendermint/version -TM_LIBS = third_party/proto/tendermint/libs/bits -TM_P2P = third_party/proto/tendermint/p2p - -GOGO_PROTO_TYPES = third_party/proto/gogoproto -COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto -CONFIO_TYPES = third_party/proto/confio +TM_CRYPTO_TYPES = proto/tendermint/crypto +TM_ABCI_TYPES = proto/tendermint/abci +TM_TYPES = proto/tendermint/types +TM_VERSION = proto/tendermint/version +TM_LIBS = proto/tendermint/libs/bits +TM_P2P = proto/tendermint/p2p proto-update-deps: - @mkdir -p $(GOGO_PROTO_TYPES) - @curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto - - @mkdir -p $(COSMOS_PROTO_TYPES) - @curl -sSL $(COSMOS_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto + @echo "Updating Protobuf dependencies" -## Importing of tendermint protobuf definitions currently requires the -## use of `sed` in order to build properly with cosmos-sdk's proto file layout -## (which is the standard Buf.build FILE_LAYOUT) -## Issue link: https://github.com/cometbft/cometbft/issues/5021 @mkdir -p $(TM_ABCI_TYPES) @curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto @@ -150,10 +127,6 @@ proto-update-deps: @mkdir -p $(TM_P2P) @curl -sSL $(TM_URL)/p2p/types.proto > $(TM_P2P)/types.proto - @mkdir -p $(CONFIO_TYPES) - @curl -sSL $(CONFIO_URL)/proofs.proto > $(CONFIO_TYPES)/proofs.proto -## insert go package option into proofs.proto file -## Issue link: https://github.com/confio/ics23/issues/32 - @sed -i '4ioption go_package = "github.com/confio/ics23/go";' $(CONFIO_TYPES)/proofs.proto + $(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update -.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps +.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps diff --git a/app/app.go b/app/app.go index 9bc08d76a..1f4657fcf 100644 --- a/app/app.go +++ b/app/app.go @@ -313,7 +313,6 @@ func NewBandApp( app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( appCodec, keys[consensusparamtypes.StoreKey], - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) bApp.SetParamStore(&app.ConsensusParamsKeeper) @@ -337,7 +336,6 @@ func NewBandApp( authtypes.ProtoBaseAccount, maccPerms, Bech32MainPrefix, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // wrappedBankerKeeper overrides burn token behavior to instead transfer to community pool. @@ -347,7 +345,6 @@ func NewBandApp( keys[banktypes.StoreKey], app.AccountKeeper, BlockedAddresses(), - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ), app.AccountKeeper, @@ -357,7 +354,6 @@ func NewBandApp( keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.MintKeeper = mintkeeper.NewKeeper( @@ -367,7 +363,6 @@ func NewBandApp( app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.DistrKeeper = distrkeeper.NewKeeper( @@ -377,7 +372,6 @@ func NewBandApp( app.BankKeeper, app.StakingKeeper, authtypes.FeeCollectorName, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) // DistrKeeper must be set afterward due to the circular reference between banker-staking-distr. @@ -387,7 +381,6 @@ func NewBandApp( legacyAmino, keys[slashingtypes.StoreKey], app.StakingKeeper, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) @@ -398,7 +391,6 @@ func NewBandApp( invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) @@ -411,7 +403,6 @@ func NewBandApp( appCodec, homePath, app.BaseApp, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) @@ -465,7 +456,6 @@ func NewBandApp( app.StakingKeeper, app.MsgServiceRouter(), govConfig, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) @@ -514,7 +504,6 @@ func NewBandApp( &app.IBCKeeper.PortKeeper, scopedOracleKeeper, owasmVM, - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) oracleModule := oracle.NewAppModule(app.OracleKeeper, app.GetSubspace(oracletypes.ModuleName)) diff --git a/cmd/bandd/cmd/root.go b/cmd/bandd/cmd/root.go index 6430aceb0..b4f091e7f 100644 --- a/cmd/bandd/cmd/root.go +++ b/cmd/bandd/cmd/root.go @@ -94,7 +94,6 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { debug.Cmd(), config.Cmd(), pruning.Cmd(newApp, band.DefaultNodeHome), - // support oracle file folder snapshot.Cmd(newApp), ) diff --git a/proto/oracle/v1/oracle.proto b/proto/oracle/v1/oracle.proto index 399ff99cb..19c768034 100644 --- a/proto/oracle/v1/oracle.proto +++ b/proto/oracle/v1/oracle.proto @@ -5,7 +5,6 @@ option go_package = "github.com/bandprotocol/chain/v2/x/oracle/types"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; import "cosmos/base/v1beta1/coin.proto"; // DataSource is the data structure for storing data sources in the storage. diff --git a/proto/oracle/v1/query.proto b/proto/oracle/v1/query.proto index 6d2c0a947..1a291430b 100644 --- a/proto/oracle/v1/query.proto +++ b/proto/oracle/v1/query.proto @@ -4,11 +4,8 @@ package oracle.v1; option go_package = "github.com/bandprotocol/chain/v2/x/oracle/types"; import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; import "google/api/annotations.proto"; import "oracle/v1/oracle.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; // Query defines the gRPC querier service. service Query { diff --git a/proto/oracle/v1/tx.proto b/proto/oracle/v1/tx.proto index ae45d5340..82c1b64b7 100644 --- a/proto/oracle/v1/tx.proto +++ b/proto/oracle/v1/tx.proto @@ -4,11 +4,8 @@ package oracle.v1; option go_package = "github.com/bandprotocol/chain/v2/x/oracle/types"; import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; import "oracle/v1/oracle.proto"; import "cosmos/base/v1beta1/coin.proto"; - import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "amino/amino.proto"; diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 6b127661d..782e1609d 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -6,7 +6,6 @@ package types import ( bytes "bytes" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -1561,7 +1560,7 @@ func init() { func init() { proto.RegisterFile("oracle/v1/oracle.proto", fileDescriptor_652b57db11528d07) } var fileDescriptor_652b57db11528d07 = []byte{ - // 1747 bytes of a gzipped FileDescriptorProto + // 1740 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x6f, 0x23, 0x59, 0x11, 0x4f, 0xdb, 0x4e, 0x62, 0x97, 0x9d, 0xaf, 0x37, 0x99, 0x8c, 0xc7, 0xbb, 0xd8, 0x21, 0x5a, 0xd0, 0x30, 0x02, 0x9b, 0x04, 0x84, 0x98, 0x59, 0x3e, 0x14, 0x3b, 0x9e, 0xc5, 0x28, 0x9a, 0xb1, @@ -1572,106 +1571,105 @@ var fileDescriptor_652b57db11528d07 = []byte{ 0x5f, 0xd5, 0xab, 0x0e, 0xec, 0x84, 0x9c, 0x38, 0x1e, 0x6d, 0x5c, 0xee, 0x37, 0xf4, 0xaf, 0x7a, 0xc4, 0xc3, 0x38, 0x44, 0x05, 0x23, 0x5d, 0xee, 0x57, 0xb6, 0x07, 0xe1, 0x20, 0x54, 0x68, 0x43, 0xfe, 0xd2, 0x06, 0x95, 0xda, 0x20, 0x0c, 0x07, 0x1e, 0x6d, 0x28, 0xa9, 0x3f, 0x3c, 0x6b, 0xc4, - 0xcc, 0xa7, 0x22, 0x26, 0x7e, 0x64, 0x0c, 0xee, 0x2f, 0x1a, 0x90, 0xe0, 0xda, 0xa8, 0xaa, 0x4e, - 0x28, 0xfc, 0x50, 0x34, 0xfa, 0x44, 0xc8, 0x37, 0xf7, 0x69, 0x4c, 0xf6, 0x1b, 0x4e, 0xc8, 0x02, - 0xad, 0xdf, 0xfb, 0xab, 0x05, 0x70, 0x44, 0x62, 0xd2, 0x0b, 0x87, 0xdc, 0xa1, 0x68, 0x1b, 0x96, - 0xc3, 0xab, 0x80, 0xf2, 0xb2, 0xb5, 0x6b, 0x3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0x61, 0xd4, 0x33, 0xe6, 0x64, 0x5c, 0x72, 0x53, 0xc9, 0x95, 0xa9, 0x70, + 0x88, 0xe7, 0x49, 0x4c, 0x65, 0xaa, 0x84, 0xa7, 0xb2, 0x89, 0xfb, 0x67, 0x16, 0x14, 0x54, 0xdc, + 0x51, 0xc8, 0xdf, 0x38, 0xec, 0xb7, 0xa0, 0x40, 0x47, 0x2c, 0x56, 0x39, 0x54, 0x11, 0xaf, 0xe1, + 0xbc, 0x04, 0x64, 0xaa, 0x64, 0x31, 0x67, 0xe2, 0xc8, 0xcd, 0xc4, 0xf0, 0x97, 0x2c, 0xac, 0x26, + 0x89, 0x7b, 0x0a, 0x9b, 0xba, 0xeb, 0x6c, 0x5d, 0xd0, 0x34, 0x8c, 0x77, 0x26, 0xe3, 0xda, 0xfa, + 0x2c, 0x69, 0x54, 0x28, 0x0b, 0x08, 0x5e, 0x0f, 0x67, 0xe5, 0xf9, 0x0c, 0x64, 0xe6, 0x33, 0x80, + 0xf6, 0x61, 0x9b, 0xeb, 0xd7, 0x52, 0xd7, 0xbe, 0x24, 0x1e, 0x73, 0x49, 0x1c, 0x72, 0x51, 0xce, + 0xee, 0x66, 0x1f, 0x14, 0xf0, 0x9d, 0xa9, 0xee, 0xf9, 0x54, 0x25, 0x4f, 0xe8, 0xb3, 0xc0, 0x76, + 0xc2, 0x61, 0x10, 0x2b, 0x72, 0xe5, 0x70, 0xde, 0x67, 0x41, 0x4b, 0xca, 0xe8, 0x4b, 0xb0, 0x6e, + 0x7c, 0xec, 0x73, 0xca, 0x06, 0xe7, 0xb1, 0x22, 0x59, 0x16, 0xaf, 0x19, 0xf4, 0x07, 0x0a, 0x44, + 0x5f, 0x84, 0x52, 0x62, 0x26, 0xe7, 0x85, 0x22, 0x5a, 0x16, 0x17, 0x0d, 0x76, 0xc2, 0x7c, 0x8a, + 0xbe, 0x02, 0x05, 0xc7, 0x63, 0x34, 0x50, 0xc7, 0x5f, 0x55, 0x44, 0x2c, 0x4d,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 0x00, 0x00, 0xff, 0xff, 0xc7, 0xb2, 0x70, 0xfb, 0xde, 0x11, 0x00, 0x00, } func (this *DataSource) Equal(that interface{}) bool { diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 73b9fb972..ebb1d59ab 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -6,9 +6,6 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/codec/types" - _ "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -1546,100 +1543,98 @@ func init() { func init() { proto.RegisterFile("oracle/v1/query.proto", fileDescriptor_34238c8dfdfcd7ec) } var fileDescriptor_34238c8dfdfcd7ec = []byte{ - // 1487 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x4f, 0x1c, 0xc7, - 0x13, 0x66, 0x00, 0x2f, 0xbb, 0xc5, 0x82, 0xa1, 0xf1, 0x03, 0x06, 0x58, 0xf0, 0x98, 0xdf, 0xcf, - 0xeb, 0x87, 0x76, 0x02, 0xb1, 0x12, 0xc5, 0xb1, 0x22, 0x99, 0xa0, 0x28, 0x1b, 0x45, 0xb2, 0xbd, - 0x48, 0xce, 0xeb, 0xb0, 0xea, 0x9d, 0x19, 0x2f, 0x23, 0x2f, 0x33, 0xeb, 0xe9, 0x59, 0x04, 0x72, - 0x50, 0x24, 0x47, 0x39, 0xe5, 0x90, 0x44, 0x91, 0xe2, 0x83, 0x6f, 0xb9, 0xe6, 0x1f, 0xf1, 0xd1, - 0x52, 0x2e, 0x39, 0x44, 0x56, 0x84, 0xf3, 0x87, 0x44, 0xd3, 0x5d, 0x3d, 0xd3, 0xf3, 0x58, 0x70, - 0x38, 0xe5, 0x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64, 0x39, 0x7b, 0x01, 0x52, 0x22, 0x51, 0xaf, 0x0d, 0x73, 0x8b, 0x66, 0x18, 0x0b, 0x4f, 0x7f, - 0xff, 0xfb, 0xe7, 0xd1, 0x39, 0x32, 0x6b, 0x26, 0xb2, 0xd5, 0x12, 0x91, 0x1f, 0xc2, 0xf8, 0x16, - 0xbf, 0xcb, 0xd9, 0x10, 0x8a, 0xae, 0xd3, 0x97, 0x8a, 0x9d, 0x18, 0xfd, 0x32, 0x8f, 0xbe, 0x4c, - 0x16, 0x95, 0xe8, 0x51, 0xb1, 0xe6, 0x93, 0x58, 0x0c, 0x1e, 0x92, 0xef, 0x34, 0x80, 0x44, 0x5c, - 0x91, 0x4b, 0x45, 0x11, 0x53, 0x62, 0x4f, 0x37, 0x8e, 0x83, 0x60, 0xea, 0xb7, 0x78, 0xea, 0x6b, - 0xa4, 0x9e, 0x49, 0x8d, 0xdd, 0x67, 0x48, 0x21, 0xde, 0x8b, 0x43, 0xf2, 0x83, 0x06, 0x55, 0x55, - 0x47, 0x91, 0xcb, 0xd9, 0x34, 0x05, 0x1a, 0x4f, 0x5f, 0x3b, 0x1e, 0x84, 0x6c, 0x6e, 0x72, 0x36, - 0x0d, 0x72, 0xc3, 0xcc, 0xfe, 0x75, 0x80, 0x63, 0x96, 0x99, 0x4f, 0xb2, 0x63, 0xf7, 0x90, 0x84, - 0x30, 0x21, 0xef, 0x73, 0x6d, 0xe8, 0x9c, 0x13, 0x34, 0x4e, 0x9a, 0x83, 0x46, 0x9d, 0x33, 0x30, - 0xc8, 0xaa, 0xc2, 0x00, 0xcf, 0x2e, 0x33, 0x9f, 0x24, 0xe7, 0xfa, 0x90, 0x3c, 0xd7, 0xe0, 0x6c, - 0x46, 0x05, 0x91, 0xff, 0x67, 0xc3, 0x17, 0x4b, 0x2e, 0xfd, 0xca, 0x89, 0x38, 0xa4, 0xf3, 0x2e, - 0xa7, 0xb3, 0x4e, 0x4c, 0x85, 0x4e, 0x5f, 0x60, 0xdb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78, 0xd0, 0x1b, 0x64, 0xe7, 0xc2, 0x84, 0x91, 0x9f, 0x34, 0x98, 0x2b, 0x78, 0x73, 0xc9, 0xb5, - 0x21, 0x09, 0x0a, 0x24, 0x8b, 0x7e, 0xfd, 0x8d, 0xb0, 0xc7, 0x70, 0xda, 0x8b, 0x80, 0x07, 0x72, - 0x7c, 0x6c, 0x36, 0x5f, 0x1c, 0xd5, 0xb4, 0x97, 0x47, 0x35, 0xed, 0xaf, 0xa3, 0x9a, 0xf6, 0xe3, - 0xeb, 0xda, 0xc8, 0xcb, 0xd7, 0xb5, 0x91, 0x3f, 0x5e, 0xd7, 0x46, 0xbe, 0x34, 0xbb, 0x6e, 0xb8, - 0x33, 0xe8, 0x34, 0x2c, 0x7f, 0xd7, 0xec, 0x50, 0xcf, 0xe6, 0xff, 0x65, 0xb1, 0xfc, 0x9e, 0xc9, - 0x75, 0x80, 0xb9, 0xb7, 0x61, 0xee, 0xcb, 0xb0, 0xe1, 0x41, 0xdf, 0x61, 0x9d, 0x12, 0x47, 0xbc, - 0xfd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x02, 0x86, 0x9f, 0x8a, 0x4d, 0x12, 0x00, 0x00, + // 1448 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6f, 0xdb, 0xc6, + 0x13, 0x36, 0x6d, 0x47, 0x96, 0xc6, 0xb2, 0x63, 0xaf, 0xf3, 0xb0, 0x69, 0x5b, 0x76, 0x18, 0xff, + 0x7e, 0x51, 0x1e, 0x10, 0x6b, 0x37, 0x68, 0xd1, 0x34, 0x28, 0x10, 0xd7, 0x28, 0xaa, 0xa2, 0x40, + 0x12, 0x19, 0x48, 0x5f, 0x07, 0x61, 0x4d, 0x32, 0x32, 0x11, 0x99, 0x54, 0xb8, 0x94, 0x61, 0x23, + 0x35, 0x0a, 0xa4, 0xe8, 0xa9, 0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d0, 0x1b, 0x44, 0xe7, 0xc2, 0x84, + 0x91, 0x9f, 0x34, 0x98, 0x2b, 0x78, 0x73, 0xc9, 0xb5, 0x01, 0x01, 0x0a, 0x24, 0x8b, 0x7e, 0xfd, + 0x8d, 0xb0, 0x43, 0x38, 0xed, 0x47, 0xc0, 0x43, 0x39, 0x3e, 0x36, 0x9b, 0x2f, 0x8e, 0x6b, 0xda, + 0xcb, 0xe3, 0x9a, 0xf6, 0xd7, 0x71, 0x4d, 0xfb, 0xf1, 0x75, 0x6d, 0xe4, 0xe5, 0xeb, 0xda, 0xc8, + 0x1f, 0xaf, 0x6b, 0x23, 0x5f, 0x9a, 0x1d, 0x37, 0xdc, 0xed, 0xef, 0x34, 0x2c, 0x7f, 0xcf, 0xdc, + 0xa1, 0x9e, 0xcd, 0xff, 0x65, 0xb1, 0xfc, 0xae, 0xc9, 0x75, 0x80, 0xb9, 0xbf, 0x61, 0x1e, 0x48, + 0xb7, 0xe1, 0x61, 0xcf, 0x61, 0x3b, 0x25, 0x8e, 0x78, 0xfb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xf0, 0x4e, 0x38, 0xd4, 0xf7, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index dd159ff87..7fead1f72 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -8,7 +8,6 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -19,7 +18,6 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" @@ -1083,84 +1081,83 @@ func init() { func init() { proto.RegisterFile("oracle/v1/tx.proto", fileDescriptor_31571edce0094a5d) } var fileDescriptor_31571edce0094a5d = []byte{ - // 1232 bytes of a gzipped FileDescriptorProto + // 1206 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0xdb, 0x46, - 0x13, 0xb6, 0x2c, 0x59, 0x11, 0x57, 0xb2, 0x13, 0x33, 0xfe, 0xa0, 0xe8, 0x37, 0x92, 0x5e, 0xc1, - 0x30, 0x94, 0x14, 0x16, 0x63, 0xb7, 0x28, 0x10, 0xf7, 0x14, 0xd9, 0xfd, 0x30, 0x1a, 0xa5, 0x05, - 0xdd, 0x5c, 0x02, 0x14, 0xea, 0x8a, 0x5c, 0xd3, 0x84, 0x49, 0xae, 0xba, 0xbb, 0xf2, 0xc7, 0xb5, + 0x13, 0xb6, 0x2c, 0x59, 0x11, 0x47, 0xb2, 0x13, 0x33, 0x89, 0x4d, 0x31, 0x6f, 0x24, 0xbd, 0x42, + 0x60, 0x28, 0x29, 0x2c, 0xc6, 0x6e, 0x51, 0x20, 0xee, 0x29, 0xb2, 0xfb, 0x61, 0x34, 0x4a, 0x0b, + 0xba, 0xb9, 0x04, 0x28, 0xd4, 0x15, 0xb9, 0xa6, 0x09, 0x8b, 0x5c, 0x75, 0x97, 0xf2, 0xc7, 0xb5, 0xc7, 0x5e, 0xda, 0xfe, 0x83, 0xa0, 0xc7, 0x9e, 0x72, 0xe8, 0x5f, 0x28, 0x90, 0x63, 0xd0, 0x5e, 0x7a, 0x52, 0x0b, 0x19, 0x45, 0xfa, 0x1b, 0x7a, 0x2a, 0xb8, 0xbb, 0xa2, 0x48, 0x59, 0xf2, 0x47, - 0x90, 0xe6, 0x62, 0x73, 0xe6, 0x79, 0x76, 0x38, 0x9c, 0x67, 0x66, 0x77, 0x05, 0x54, 0x4c, 0xa0, - 0xe5, 0x21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1, 0x6d, 0x53, 0xcc, 0xd8, 0x4e, 0x40, 0x5d, 0xdf, 0x31, 0x65, + 0xdc, 0x46, 0xf5, 0xef, 0x67, 0xe5, 0xd4, 0x37, 0xaf, 0x9e, 0xdf, 0x93, 0x8e, 0x6f, 0x5f, 0x3d, + 0xbf, 0x27, 0x25, 0x30, 0xa4, 0xac, 0x55, 0x0d, 0x96, 0x92, 0x22, 0x9b, 0x98, 0x75, 0x89, 0xcf, + 0x70, 0xf5, 0xaf, 0x14, 0xcc, 0x73, 0xa8, 0x4b, 0xa8, 0x90, 0xff, 0x01, 0x00, 0x15, 0x81, 0x23, + 0xe1, 0xf5, 0x41, 0xbf, 0xac, 0xc8, 0xe5, 0x5c, 0xf3, 0x91, 0x61, 0x2a, 0x32, 0x7a, 0xdb, 0x56, + 0x3f, 0x80, 0x3c, 0x45, 0x87, 0x2d, 0xca, 0x93, 0x31, 0x6d, 0x96, 0x53, 0x7d, 0xa3, 0x1e, 0x8d, + 0x40, 0xdd, 0x44, 0x87, 0xe2, 0x4d, 0x8d, 0x4c, 0xc8, 0xb2, 0x09, 0x74, 0xe8, 0x60, 0xea, 0xfb, + 0xa0, 0x1c, 0xa0, 0x8e, 0x6b, 0xa3, 0x80, 0x50, 0xde, 0x0a, 0x67, 0x7d, 0xfc, 0x28, 0x74, 0xe3, + 0xce, 0xf0, 0xfb, 0x47, 0xbe, 0x90, 0x82, 0xf9, 0x88, 0x82, 0x30, 0x7d, 0x75, 0x19, 0x6e, 0x26, + 0x3e, 0x33, 0x22, 0xe0, 0xbb, 0x34, 0x5c, 0x6f, 0x32, 0x67, 0x93, 0x62, 0x14, 0xe0, 0x10, 0xd9, + 0x21, 0x3d, 0x6a, 0x61, 0x55, 0x85, 0x8c, 0x8f, 0x3c, 0xcc, 0x09, 0x50, 0x4c, 0xfe, 0xac, 0x56, + 0x20, 0x6f, 0x63, 0x31, 0x14, 0x2e, 0xf1, 0x79, 0x33, 0x2b, 0x66, 0xdc, 0xa5, 0x96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xc8, 0xb7, + 0xf9, 0x2f, 0x3b, 0x8b, 0x74, 0x0c, 0x6b, 0x0f, 0xb9, 0xbe, 0x71, 0xb0, 0x6e, 0x1c, 0xc9, 0xdf, + 0x96, 0xe2, 0xea, 0xd0, 0xce, 0xf2, 0x88, 0x77, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x55, 0x57, + 0xf7, 0x3f, 0xb1, 0x0e, 0x00, 0x00, } func (this *MsgRequestData) Equal(that interface{}) bool { From f97173aab7f6cb24a91fbaaca96aa5f5b6e9282f Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 30 Aug 2023 15:33:15 +0700 Subject: [PATCH 16/44] delete unused proto cmd --- Makefile | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/Makefile b/Makefile index 04171c655..30a0fe36b 100644 --- a/Makefile +++ b/Makefile @@ -92,41 +92,4 @@ proto-lint: proto-check-breaking: @$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main -CMT_URL = https://raw.githubusercontent.com/cometbft/cometbft/v0.37.0/proto/tendermint - -TM_CRYPTO_TYPES = proto/tendermint/crypto -TM_ABCI_TYPES = proto/tendermint/abci -TM_TYPES = proto/tendermint/types -TM_VERSION = proto/tendermint/version -TM_LIBS = proto/tendermint/libs/bits -TM_P2P = proto/tendermint/p2p - -proto-update-deps: - @echo "Updating Protobuf dependencies" - - @mkdir -p $(TM_ABCI_TYPES) - @curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto - - @mkdir -p $(TM_VERSION) - @curl -sSL $(TM_URL)/version/types.proto > $(TM_VERSION)/types.proto - - @mkdir -p $(TM_TYPES) - @curl -sSL $(TM_URL)/types/types.proto > $(TM_TYPES)/types.proto - @curl -sSL $(TM_URL)/types/evidence.proto > $(TM_TYPES)/evidence.proto - @curl -sSL $(TM_URL)/types/params.proto > $(TM_TYPES)/params.proto - @curl -sSL $(TM_URL)/types/validator.proto > $(TM_TYPES)/validator.proto - @curl -sSL $(TM_URL)/types/block.proto > $(TM_TYPES)/block.proto - - @mkdir -p $(TM_CRYPTO_TYPES) - @curl -sSL $(TM_URL)/crypto/proof.proto > $(TM_CRYPTO_TYPES)/proof.proto - @curl -sSL $(TM_URL)/crypto/keys.proto > $(TM_CRYPTO_TYPES)/keys.proto - - @mkdir -p $(TM_LIBS) - @curl -sSL $(TM_URL)/libs/bits/types.proto > $(TM_LIBS)/types.proto - - @mkdir -p $(TM_P2P) - @curl -sSL $(TM_URL)/p2p/types.proto > $(TM_P2P)/types.proto - - $(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update - -.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps +.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking From 0c782eb21c352446db779a47112027090e4eca4f Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 6 Sep 2023 17:25:07 +0700 Subject: [PATCH 17/44] set tx encoder in baseapp --- app/app.go | 1 + 1 file changed, 1 insertion(+) diff --git a/app/app.go b/app/app.go index 1f4657fcf..d058937ee 100644 --- a/app/app.go +++ b/app/app.go @@ -262,6 +262,7 @@ func NewBandApp( bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) bApp.SetInterfaceRegistry(interfaceRegistry) + bApp.SetTxEncoder(encodingConfig.TxConfig.TxEncoder()) keys := sdk.NewKVStoreKeys( authtypes.StoreKey, From 675f4ea0d7a01469b1c2011a90344b2a8faa905c Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 15:00:51 +0700 Subject: [PATCH 18/44] update --- app/ante.go | 7 +- app/app.go | 13 +- app/keepers/keepers.go | 2 + app/upgrades/v2_6/upgrades.go | 16 +- proto/globalfee/v1beta1/query.proto | 25 +- x/globalfee/client/cli/query.go | 14 +- x/globalfee/exported/exported.go | 18 + x/globalfee/feechecker/feechecker.go | 26 +- x/globalfee/feechecker/feechecker_test.go | 549 ++++++++++---------- x/globalfee/genesis_test.go | 239 +++++---- x/globalfee/grpc_query.go | 40 -- x/globalfee/grpc_query_test.go | 59 --- x/globalfee/keeper/grpc_query.go | 26 + x/globalfee/keeper/grpc_query_test.go | 59 +++ x/globalfee/keeper/keeper.go | 52 ++ x/globalfee/keeper/msg_server.go | 44 ++ x/globalfee/module.go | 26 +- x/globalfee/types/codec.go | 30 ++ x/globalfee/types/keys.go | 7 + x/globalfee/types/msgs.go | 32 ++ x/globalfee/types/params.go | 21 +- x/globalfee/types/query.pb.go | 214 ++++---- x/globalfee/types/query.pb.gw.go | 28 +- x/globalfee/types/tx.pb.go | 604 ++++++++++++++++++++++ 24 files changed, 1449 insertions(+), 702 deletions(-) create mode 100644 x/globalfee/exported/exported.go delete mode 100644 x/globalfee/grpc_query.go delete mode 100644 x/globalfee/grpc_query_test.go create mode 100644 x/globalfee/keeper/grpc_query.go create mode 100644 x/globalfee/keeper/grpc_query_test.go create mode 100644 x/globalfee/keeper/keeper.go create mode 100644 x/globalfee/keeper/msg_server.go create mode 100644 x/globalfee/types/codec.go create mode 100644 x/globalfee/types/msgs.go create mode 100644 x/globalfee/types/tx.pb.go diff --git a/app/ante.go b/app/ante.go index 74ceab68e..773d3b5a4 100644 --- a/app/ante.go +++ b/app/ante.go @@ -9,6 +9,7 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" + globalfeekeeper "github.com/bandprotocol/chain/v2/x/globalfee/keeper" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) @@ -21,6 +22,7 @@ type HandlerOptions struct { IBCKeeper *ibckeeper.Keeper GlobalFeeSubspace paramtypes.Subspace StakingKeeper *stakingkeeper.Keeper + GlobalfeeKeeper *globalfeekeeper.Keeper } func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { @@ -39,6 +41,9 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { if options.IBCKeeper == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "IBC keeper is required for AnteHandler") } + if options.GlobalfeeKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "Globalfee keeper is required for AnteHandler") + } sigGasConsumer := options.SigGasConsumer if sigGasConsumer == nil { @@ -52,7 +57,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { feeChecker := feechecker.NewFeeChecker( options.OracleKeeper, - options.GlobalFeeSubspace, + options.GlobalfeeKeeper, options.StakingKeeper, ) options.TxFeeChecker = feeChecker.CheckTxFeeWithMinGasPrices diff --git a/app/app.go b/app/app.go index d058937ee..c51025524 100644 --- a/app/app.go +++ b/app/app.go @@ -122,6 +122,8 @@ import ( bandbank "github.com/bandprotocol/chain/v2/x/bank" bandbankkeeper "github.com/bandprotocol/chain/v2/x/bank/keeper" "github.com/bandprotocol/chain/v2/x/globalfee" + globalfeekeeper "github.com/bandprotocol/chain/v2/x/globalfee/keeper" + globalfeetypes "github.com/bandprotocol/chain/v2/x/globalfee/types" "github.com/bandprotocol/chain/v2/x/oracle" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" @@ -285,6 +287,7 @@ func NewBandApp( icahosttypes.StoreKey, group.StoreKey, oracletypes.StoreKey, + globalfeetypes.StoreKey, ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey) @@ -526,6 +529,13 @@ func NewBandApp( // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper + app.GlobalfeeKeeper = globalfeekeeper.NewKeeper( + appCodec, + keys[globalfeetypes.StoreKey], + // 0.47 TODO: change to tech council address + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment // we prefer to be more strict in what arguments the modules expect. @@ -593,7 +603,7 @@ func NewBandApp( transferModule, icaModule, oracleModule, - globalfee.NewAppModule(app.GetSubspace(globalfee.ModuleName)), + globalfee.NewAppModule(app.GlobalfeeKeeper), ) // NOTE: Oracle module must occur before distr as it takes some fee to distribute to active oracle validators. // NOTE: During begin block slashing happens after distr.BeginBlocker so that there is nothing left @@ -725,6 +735,7 @@ func NewBandApp( IBCKeeper: app.IBCKeeper, GlobalFeeSubspace: app.GetSubspace(globalfee.ModuleName), StakingKeeper: app.StakingKeeper, + GlobalfeeKeeper: &app.GlobalfeeKeeper, }, ) if err != nil { diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 2bc74b49e..5f48bf8c4 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -1,6 +1,7 @@ package keepers import ( + globalfeekeeper "github.com/bandprotocol/chain/v2/x/globalfee/keeper" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" @@ -47,6 +48,7 @@ type AppKeepers struct { GroupKeeper groupkeeper.Keeper OracleKeeper oraclekeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper + GlobalfeeKeeper globalfeekeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper diff --git a/app/upgrades/v2_6/upgrades.go b/app/upgrades/v2_6/upgrades.go index 8ebc9e848..cf23212af 100644 --- a/app/upgrades/v2_6/upgrades.go +++ b/app/upgrades/v2_6/upgrades.go @@ -3,7 +3,6 @@ package v2_6 import ( "github.com/bandprotocol/chain/v2/app/keepers" "github.com/bandprotocol/chain/v2/app/upgrades" - "github.com/bandprotocol/chain/v2/x/globalfee" globalfeetypes "github.com/bandprotocol/chain/v2/x/globalfee/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" @@ -26,16 +25,15 @@ func CreateUpgradeHandler( } keepers.ICAHostKeeper.SetParams(ctx, hostParams) - minGasPriceGenesisState := &globalfeetypes.GenesisState{ - Params: globalfeetypes.Params{ - MinimumGasPrices: sdk.DecCoins{sdk.NewDecCoinFromDec("uband", sdk.NewDecWithPrec(25, 4))}, - }, + vm, err := mm.RunMigrations(ctx, configurator, fromVM) + if err != nil { + return nil, err } - am.GetSubspace(globalfee.ModuleName).SetParamSet(ctx, &minGasPriceGenesisState.Params) - // set version of globalfee so that it won't run initgenesis again - fromVM["globalfee"] = 1 + keepers.GlobalfeeKeeper.SetParams(ctx, globalfeetypes.Params{ + MinimumGasPrices: sdk.DecCoins{sdk.NewDecCoinFromDec("uband", sdk.NewDecWithPrec(25, 4))}, + }) - return mm.RunMigrations(ctx, configurator, fromVM) + return vm, nil } } diff --git a/proto/globalfee/v1beta1/query.proto b/proto/globalfee/v1beta1/query.proto index 3bb3bb603..bedf4df25 100644 --- a/proto/globalfee/v1beta1/query.proto +++ b/proto/globalfee/v1beta1/query.proto @@ -3,28 +3,23 @@ package globalfee.v1beta1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; +import "globalfee/v1beta1/genesis.proto"; option go_package = "github.com/bandprotocol/chain/v2/x/globalfee/types"; // Query defines the gRPC querier service. service Query { - rpc MinimumGasPrices(QueryMinimumGasPricesRequest) returns (QueryMinimumGasPricesResponse) { - option (google.api.http).get = "/globalfee/v1beta1/minimum_gas_prices"; + // Params queries parameters of globalfee module + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/globalfee/v1beta1/params"; } } -// QueryMinimumGasPricesRequest is the request type for the -// Query/MinimumGasPrices RPC method. -message QueryMinimumGasPricesRequest {} +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} -// QueryMinimumGasPricesResponse is the response type for the -// Query/MinimumGasPrices RPC method. -message QueryMinimumGasPricesResponse { - repeated cosmos.base.v1beta1.DecCoin minimum_gas_prices = 1 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "minimum_gas_prices,omitempty", - (gogoproto.moretags) = "yaml:\"minimum_gas_prices\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // pagination defines an optional pagination for the request. + Params params = 1 [(gogoproto.nullable) = false]; } diff --git a/x/globalfee/client/cli/query.go b/x/globalfee/client/cli/query.go index e4a4c999f..63d57ceef 100644 --- a/x/globalfee/client/cli/query.go +++ b/x/globalfee/client/cli/query.go @@ -11,22 +11,22 @@ import ( func GetQueryCmd() *cobra.Command { queryCmd := &cobra.Command{ Use: types.ModuleName, - Short: "Querying commands for the global fee module", + Short: "Querying commands for the globalfee module", DisableFlagParsing: true, SuggestionsMinimumDistance: 2, RunE: client.ValidateCmd, } queryCmd.AddCommand( - GetCmdShowMinimumGasPrices(), + GetQueryCmdParams(), ) return queryCmd } -func GetCmdShowMinimumGasPrices() *cobra.Command { +func GetQueryCmdParams() *cobra.Command { cmd := &cobra.Command{ - Use: "minimum-gas-prices", - Short: "Show minimum gas prices", - Long: "Show all minimum gas prices", + Use: "params", + Short: "Show params", + Long: "Show parameter of globalfee module", Aliases: []string{"min"}, Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) error { @@ -36,7 +36,7 @@ func GetCmdShowMinimumGasPrices() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.MinimumGasPrices(cmd.Context(), &types.QueryMinimumGasPricesRequest{}) + res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) if err != nil { return err } diff --git a/x/globalfee/exported/exported.go b/x/globalfee/exported/exported.go new file mode 100644 index 000000000..000114e61 --- /dev/null +++ b/x/globalfee/exported/exported.go @@ -0,0 +1,18 @@ +package exported + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +type ( + ParamSet = paramtypes.ParamSet + + // Subspace defines an interface that implements the legacy x/params Subspace + // type. + // + // NOTE: This is used solely for migration of x/params managed parameters. + Subspace interface { + GetParamSet(ctx sdk.Context, ps ParamSet) + } +) diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index 73b1ca437..9e96b730d 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -7,34 +7,28 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/bandprotocol/chain/v2/x/globalfee" - "github.com/bandprotocol/chain/v2/x/globalfee/types" + "github.com/bandprotocol/chain/v2/x/globalfee/keeper" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) type FeeChecker struct { - OracleKeeper *oraclekeeper.Keeper - GlobalMinFee globalfee.ParamSource - StakingKeeper *stakingkeeper.Keeper + OracleKeeper *oraclekeeper.Keeper + GlobalfeeKeeper *keeper.Keeper + StakingKeeper *stakingkeeper.Keeper } func NewFeeChecker( oracleKeeper *oraclekeeper.Keeper, - globalfeeSubspace paramtypes.Subspace, + globalfeeKeeper *keeper.Keeper, stakingKeeper *stakingkeeper.Keeper, ) FeeChecker { - if !globalfeeSubspace.HasKeyTable() { - panic("global fee paramspace was not set up via module") - } - return FeeChecker{ - OracleKeeper: oracleKeeper, - GlobalMinFee: globalfeeSubspace, - StakingKeeper: stakingKeeper, + OracleKeeper: oracleKeeper, + GlobalfeeKeeper: globalfeeKeeper, + StakingKeeper: stakingKeeper, } } @@ -117,9 +111,7 @@ func (fc FeeChecker) GetGlobalMinGasPrices(ctx sdk.Context) (sdk.DecCoins, error err error ) - if fc.GlobalMinFee.Has(ctx, types.ParamStoreKeyMinGasPrices) { - fc.GlobalMinFee.Get(ctx, types.ParamStoreKeyMinGasPrices, &globalMinGasPrices) - } + globalMinGasPrices = fc.GlobalfeeKeeper.GetParams(ctx).MinimumGasPrices // global fee is empty set, set global fee to 0uband (bondDenom) if len(globalMinGasPrices) == 0 { globalMinGasPrices, err = fc.DefaultZeroGlobalFee(ctx) diff --git a/x/globalfee/feechecker/feechecker_test.go b/x/globalfee/feechecker/feechecker_test.go index 9700e06ef..fbdab3c27 100644 --- a/x/globalfee/feechecker/feechecker_test.go +++ b/x/globalfee/feechecker/feechecker_test.go @@ -1,277 +1,276 @@ package feechecker_test -import ( - "math" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/suite" - - "github.com/bandprotocol/chain/v2/testing/testapp" - "github.com/bandprotocol/chain/v2/x/globalfee" - "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" - "github.com/bandprotocol/chain/v2/x/oracle/types" - "github.com/cosmos/cosmos-sdk/x/authz" -) - -var ( - BasicCalldata = []byte("BASIC_CALLDATA") - BasicClientID = "BASIC_CLIENT_ID" -) - -type StubTx struct { - sdk.Tx - sdk.FeeTx - Msgs []sdk.Msg - GasPrices sdk.DecCoins -} - -func (st *StubTx) GetMsgs() []sdk.Msg { - return st.Msgs -} - -func (st *StubTx) ValidateBasic() error { - return nil -} - -func (st *StubTx) GetGas() uint64 { - return 1000000 -} - -func (st *StubTx) GetFee() sdk.Coins { - fees := make(sdk.Coins, len(st.GasPrices)) - - // Determine the fees by multiplying each gas prices - glDec := sdk.NewDec(int64(st.GetGas())) - for i, gp := range st.GasPrices { - fee := gp.Amount.Mul(glDec) - fees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) - } - - return fees -} - -type FeeCheckerTestSuite struct { - suite.Suite - FeeChecker feechecker.FeeChecker - ctx sdk.Context - requestId types.RequestID -} - -func (suite *FeeCheckerTestSuite) SetupTest() { - app, ctx, oracleKeeper := testapp.CreateTestInput(true) - suite.ctx = ctx.WithBlockHeight(999). - WithIsCheckTx(true). - WithMinGasPrices(sdk.DecCoins{{Denom: "uband", Amount: sdk.NewDecWithPrec(1, 4)}}) - - oracleKeeper.GrantReporter(suite.ctx, testapp.Validators[0].ValAddress, testapp.Alice.Address) - - req := types.NewRequest( - 1, - BasicCalldata, - []sdk.ValAddress{testapp.Validators[0].ValAddress}, - 1, - 1, - testapp.ParseTime(0), - "", - nil, - nil, - 0, - ) - suite.requestId = oracleKeeper.AddRequest(suite.ctx, req) - - suite.FeeChecker = feechecker.NewFeeChecker( - &oracleKeeper, - app.GetSubspace(globalfee.ModuleName), - app.StakingKeeper, - ) -} - -func (suite *FeeCheckerTestSuite) TestValidRawReport() { - msgs := []sdk.Msg{types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress)} - stubTx := &StubTx{Msgs: msgs} - - // test - check report tx - isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) - suite.Require().True(isReportTx) - - // test - check tx fee with min gas prices - fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) - suite.Require().NoError(err) - suite.Require().Equal(sdk.Coins{}, fee) - suite.Require().Equal(int64(math.MaxInt64), priority) -} - -func (suite *FeeCheckerTestSuite) TestNotValidRawReport() { - msgs := []sdk.Msg{types.NewMsgReportData(1, []types.RawReport{}, testapp.Alice.ValAddress)} - stubTx := &StubTx{Msgs: msgs} - - // test - check report tx - isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) - suite.Require().False(isReportTx) - - // test - check tx fee with min gas prices - _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) - suite.Require().Error(err) -} - -func (suite *FeeCheckerTestSuite) TestValidReport() { - reportMsgs := []sdk.Msg{ - types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress), - } - authzMsg := authz.NewMsgExec(testapp.Alice.Address, reportMsgs) - stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}} - - // test - check report tx - isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) - suite.Require().True(isReportTx) - - // test - check tx fee with min gas prices - fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) - suite.Require().NoError(err) - suite.Require().Equal(sdk.Coins{}, fee) - suite.Require().Equal(int64(math.MaxInt64), priority) -} - -func (suite *FeeCheckerTestSuite) TestNoAuthzReport() { - reportMsgs := []sdk.Msg{ - types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress), - } - authzMsg := authz.NewMsgExec(testapp.Bob.Address, reportMsgs) - stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1)))} - - // test - check report tx - isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) - suite.Require().False(isReportTx) - - // test - check tx fee with min gas prices - _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) - suite.Require().NoError(err) -} - -func (suite *FeeCheckerTestSuite) TestNotValidReport() { - reportMsgs := []sdk.Msg{ - types.NewMsgReportData(suite.requestId+1, []types.RawReport{}, testapp.Validators[0].ValAddress), - } - authzMsg := authz.NewMsgExec(testapp.Alice.Address, reportMsgs) - stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}} - - // test - check report tx - isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) - suite.Require().False(isReportTx) - - // test - check tx fee with min gas prices - _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) - suite.Require().Error(err) -} - -func (suite *FeeCheckerTestSuite) TestNotReportMsg() { - requestMsg := types.NewMsgRequestData( - 1, - BasicCalldata, - 1, - 1, - BasicClientID, - testapp.Coins100000000uband, - testapp.TestDefaultPrepareGas, - testapp.TestDefaultExecuteGas, - testapp.FeePayer.Address, - ) - stubTx := &StubTx{ - Msgs: []sdk.Msg{requestMsg}, - GasPrices: sdk.NewDecCoins( - sdk.NewDecCoinFromDec("uaaaa", sdk.NewDecWithPrec(100, 3)), - sdk.NewDecCoinFromDec("uaaab", sdk.NewDecWithPrec(1, 3)), - sdk.NewDecCoinFromDec("uaaac", sdk.NewDecWithPrec(0, 3)), - sdk.NewDecCoinFromDec("uband", sdk.NewDecWithPrec(3, 3)), - sdk.NewDecCoinFromDec("uccca", sdk.NewDecWithPrec(0, 3)), - sdk.NewDecCoinFromDec("ucccb", sdk.NewDecWithPrec(1, 3)), - sdk.NewDecCoinFromDec("ucccc", sdk.NewDecWithPrec(100, 3)), - ), - } - - // test - check report tx - isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) - suite.Require().False(isReportTx) - - // test - check tx fee with min gas prices - fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) - suite.Require().NoError(err) - suite.Require().Equal(stubTx.GetFee(), fee) - suite.Require().Equal(int64(30), priority) -} - -func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameAuthzMsgs() { - reportMsg := types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress) - requestMsg := types.NewMsgRequestData( - 1, - BasicCalldata, - 1, - 1, - BasicClientID, - testapp.Coins100000000uband, - testapp.TestDefaultPrepareGas, - testapp.TestDefaultExecuteGas, - testapp.FeePayer.Address, - ) - msgs := []sdk.Msg{reportMsg, requestMsg} - authzMsg := authz.NewMsgExec(testapp.Alice.Address, msgs) - stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1)))} - - // test - check report tx - isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) - suite.Require().False(isReportTx) - - // test - check tx fee with min gas prices - fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) - suite.Require().NoError(err) - suite.Require().Equal(stubTx.GetFee(), fee) - suite.Require().Equal(int64(10000), priority) -} - -func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameTx() { - reportMsg := types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress) - requestMsg := types.NewMsgRequestData( - 1, - BasicCalldata, - 1, - 1, - BasicClientID, - testapp.Coins100000000uband, - testapp.TestDefaultPrepareGas, - testapp.TestDefaultExecuteGas, - testapp.FeePayer.Address, - ) - stubTx := &StubTx{ - Msgs: []sdk.Msg{reportMsg, requestMsg}, - GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1))), - } - - // test - check report tx - isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) - suite.Require().False(isReportTx) - - // test - check tx fee with min gas prices - fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) - suite.Require().NoError(err) - suite.Require().Equal(stubTx.GetFee(), fee) - suite.Require().Equal(int64(10000), priority) -} - -func (suite *FeeCheckerTestSuite) TestGetBondDenom() { - denom := suite.FeeChecker.GetBondDenom(suite.ctx) - suite.Require().Equal("uband", denom) -} - -func (suite *FeeCheckerTestSuite) TestDefaultZeroGlobalFee() { - coins, err := suite.FeeChecker.DefaultZeroGlobalFee(suite.ctx) - - suite.Require().Equal(1, len(coins)) - suite.Require().Equal("uband", coins[0].Denom) - suite.Require().Equal(sdk.NewDec(0), coins[0].Amount) - suite.Require().NoError(err) -} - -func TestFeeCheckerTestSuite(t *testing.T) { - suite.Run(t, new(FeeCheckerTestSuite)) -} +// import ( +// "math" +// "testing" + +// sdk "github.com/cosmos/cosmos-sdk/types" +// "github.com/stretchr/testify/suite" + +// "github.com/bandprotocol/chain/v2/testing/testapp" +// "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" +// "github.com/bandprotocol/chain/v2/x/oracle/types" +// "github.com/cosmos/cosmos-sdk/x/authz" +// ) + +// var ( +// BasicCalldata = []byte("BASIC_CALLDATA") +// BasicClientID = "BASIC_CLIENT_ID" +// ) + +// type StubTx struct { +// sdk.Tx +// sdk.FeeTx +// Msgs []sdk.Msg +// GasPrices sdk.DecCoins +// } + +// func (st *StubTx) GetMsgs() []sdk.Msg { +// return st.Msgs +// } + +// func (st *StubTx) ValidateBasic() error { +// return nil +// } + +// func (st *StubTx) GetGas() uint64 { +// return 1000000 +// } + +// func (st *StubTx) GetFee() sdk.Coins { +// fees := make(sdk.Coins, len(st.GasPrices)) + +// // Determine the fees by multiplying each gas prices +// glDec := sdk.NewDec(int64(st.GetGas())) +// for i, gp := range st.GasPrices { +// fee := gp.Amount.Mul(glDec) +// fees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) +// } + +// return fees +// } + +// type FeeCheckerTestSuite struct { +// suite.Suite +// FeeChecker feechecker.FeeChecker +// ctx sdk.Context +// requestId types.RequestID +// } + +// func (suite *FeeCheckerTestSuite) SetupTest() { +// app, ctx, oracleKeeper := testapp.CreateTestInput(true) +// suite.ctx = ctx.WithBlockHeight(999). +// WithIsCheckTx(true). +// WithMinGasPrices(sdk.DecCoins{{Denom: "uband", Amount: sdk.NewDecWithPrec(1, 4)}}) + +// oracleKeeper.GrantReporter(suite.ctx, testapp.Validators[0].ValAddress, testapp.Alice.Address) + +// req := types.NewRequest( +// 1, +// BasicCalldata, +// []sdk.ValAddress{testapp.Validators[0].ValAddress}, +// 1, +// 1, +// testapp.ParseTime(0), +// "", +// nil, +// nil, +// 0, +// ) +// suite.requestId = oracleKeeper.AddRequest(suite.ctx, req) + +// suite.FeeChecker = feechecker.NewFeeChecker( +// &oracleKeeper, +// &app.GlobalfeeKeeper, +// app.StakingKeeper, +// ) +// } + +// func (suite *FeeCheckerTestSuite) TestValidRawReport() { +// msgs := []sdk.Msg{types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress)} +// stubTx := &StubTx{Msgs: msgs} + +// // test - check report tx +// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) +// suite.Require().True(isReportTx) + +// // test - check tx fee with min gas prices +// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) +// suite.Require().NoError(err) +// suite.Require().Equal(sdk.Coins{}, fee) +// suite.Require().Equal(int64(math.MaxInt64), priority) +// } + +// func (suite *FeeCheckerTestSuite) TestNotValidRawReport() { +// msgs := []sdk.Msg{types.NewMsgReportData(1, []types.RawReport{}, testapp.Alice.ValAddress)} +// stubTx := &StubTx{Msgs: msgs} + +// // test - check report tx +// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) +// suite.Require().False(isReportTx) + +// // test - check tx fee with min gas prices +// _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) +// suite.Require().Error(err) +// } + +// func (suite *FeeCheckerTestSuite) TestValidReport() { +// reportMsgs := []sdk.Msg{ +// types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress), +// } +// authzMsg := authz.NewMsgExec(testapp.Alice.Address, reportMsgs) +// stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}} + +// // test - check report tx +// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) +// suite.Require().True(isReportTx) + +// // test - check tx fee with min gas prices +// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) +// suite.Require().NoError(err) +// suite.Require().Equal(sdk.Coins{}, fee) +// suite.Require().Equal(int64(math.MaxInt64), priority) +// } + +// func (suite *FeeCheckerTestSuite) TestNoAuthzReport() { +// reportMsgs := []sdk.Msg{ +// types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress), +// } +// authzMsg := authz.NewMsgExec(testapp.Bob.Address, reportMsgs) +// stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1)))} + +// // test - check report tx +// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) +// suite.Require().False(isReportTx) + +// // test - check tx fee with min gas prices +// _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) +// suite.Require().NoError(err) +// } + +// func (suite *FeeCheckerTestSuite) TestNotValidReport() { +// reportMsgs := []sdk.Msg{ +// types.NewMsgReportData(suite.requestId+1, []types.RawReport{}, testapp.Validators[0].ValAddress), +// } +// authzMsg := authz.NewMsgExec(testapp.Alice.Address, reportMsgs) +// stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}} + +// // test - check report tx +// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) +// suite.Require().False(isReportTx) + +// // test - check tx fee with min gas prices +// _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) +// suite.Require().Error(err) +// } + +// func (suite *FeeCheckerTestSuite) TestNotReportMsg() { +// requestMsg := types.NewMsgRequestData( +// 1, +// BasicCalldata, +// 1, +// 1, +// BasicClientID, +// testapp.Coins100000000uband, +// testapp.TestDefaultPrepareGas, +// testapp.TestDefaultExecuteGas, +// testapp.FeePayer.Address, +// ) +// stubTx := &StubTx{ +// Msgs: []sdk.Msg{requestMsg}, +// GasPrices: sdk.NewDecCoins( +// sdk.NewDecCoinFromDec("uaaaa", sdk.NewDecWithPrec(100, 3)), +// sdk.NewDecCoinFromDec("uaaab", sdk.NewDecWithPrec(1, 3)), +// sdk.NewDecCoinFromDec("uaaac", sdk.NewDecWithPrec(0, 3)), +// sdk.NewDecCoinFromDec("uband", sdk.NewDecWithPrec(3, 3)), +// sdk.NewDecCoinFromDec("uccca", sdk.NewDecWithPrec(0, 3)), +// sdk.NewDecCoinFromDec("ucccb", sdk.NewDecWithPrec(1, 3)), +// sdk.NewDecCoinFromDec("ucccc", sdk.NewDecWithPrec(100, 3)), +// ), +// } + +// // test - check report tx +// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) +// suite.Require().False(isReportTx) + +// // test - check tx fee with min gas prices +// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) +// suite.Require().NoError(err) +// suite.Require().Equal(stubTx.GetFee(), fee) +// suite.Require().Equal(int64(30), priority) +// } + +// func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameAuthzMsgs() { +// reportMsg := types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress) +// requestMsg := types.NewMsgRequestData( +// 1, +// BasicCalldata, +// 1, +// 1, +// BasicClientID, +// testapp.Coins100000000uband, +// testapp.TestDefaultPrepareGas, +// testapp.TestDefaultExecuteGas, +// testapp.FeePayer.Address, +// ) +// msgs := []sdk.Msg{reportMsg, requestMsg} +// authzMsg := authz.NewMsgExec(testapp.Alice.Address, msgs) +// stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1)))} + +// // test - check report tx +// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) +// suite.Require().False(isReportTx) + +// // test - check tx fee with min gas prices +// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) +// suite.Require().NoError(err) +// suite.Require().Equal(stubTx.GetFee(), fee) +// suite.Require().Equal(int64(10000), priority) +// } + +// func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameTx() { +// reportMsg := types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress) +// requestMsg := types.NewMsgRequestData( +// 1, +// BasicCalldata, +// 1, +// 1, +// BasicClientID, +// testapp.Coins100000000uband, +// testapp.TestDefaultPrepareGas, +// testapp.TestDefaultExecuteGas, +// testapp.FeePayer.Address, +// ) +// stubTx := &StubTx{ +// Msgs: []sdk.Msg{reportMsg, requestMsg}, +// GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1))), +// } + +// // test - check report tx +// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) +// suite.Require().False(isReportTx) + +// // test - check tx fee with min gas prices +// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) +// suite.Require().NoError(err) +// suite.Require().Equal(stubTx.GetFee(), fee) +// suite.Require().Equal(int64(10000), priority) +// } + +// func (suite *FeeCheckerTestSuite) TestGetBondDenom() { +// denom := suite.FeeChecker.GetBondDenom(suite.ctx) +// suite.Require().Equal("uband", denom) +// } + +// func (suite *FeeCheckerTestSuite) TestDefaultZeroGlobalFee() { +// coins, err := suite.FeeChecker.DefaultZeroGlobalFee(suite.ctx) + +// suite.Require().Equal(1, len(coins)) +// suite.Require().Equal("uband", coins[0].Denom) +// suite.Require().Equal(sdk.NewDec(0), coins[0].Amount) +// suite.Require().NoError(err) +// } + +// func TestFeeCheckerTestSuite(t *testing.T) { +// suite.Run(t, new(FeeCheckerTestSuite)) +// } diff --git a/x/globalfee/genesis_test.go b/x/globalfee/genesis_test.go index 267657930..eab9fafd9 100644 --- a/x/globalfee/genesis_test.go +++ b/x/globalfee/genesis_test.go @@ -1,131 +1,130 @@ package globalfee -import ( - "testing" - "time" +// import ( +// "testing" +// "time" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" +// dbm "github.com/cometbft/cometbft-db" +// "github.com/cometbft/cometbft/libs/log" +// tmproto "github.com/cometbft/cometbft/proto/tendermint/types" +// "github.com/cosmos/cosmos-sdk/store" +// storetypes "github.com/cosmos/cosmos-sdk/store/types" +// sdk "github.com/cosmos/cosmos-sdk/types" +// moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" +// paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" +// "github.com/stretchr/testify/assert" +// "github.com/stretchr/testify/require" - "github.com/bandprotocol/chain/v2/x/globalfee/types" -) +// "github.com/bandprotocol/chain/v2/x/globalfee/keeper" +// "github.com/bandprotocol/chain/v2/x/globalfee/types" +// ) -func TestDefaultGenesis(t *testing.T) { - encCfg := moduletestutil.MakeTestEncodingConfig() - gotJSON := AppModuleBasic{}.DefaultGenesis(encCfg.Codec) - assert.JSONEq(t, `{"params":{"minimum_gas_prices":[]}}`, string(gotJSON)) -} +// // func TestDefaultGenesis(t *testing.T) { +// // encCfg := moduletestutil.MakeTestEncodingConfig() +// // gotJSON := AppModuleBasic{}.DefaultGenesis(encCfg.Codec) +// // assert.JSONEq(t, `{"params":{"minimum_gas_prices":[]}}`, string(gotJSON)) +// // } -func TestValidateGenesis(t *testing.T) { - encCfg := moduletestutil.MakeTestEncodingConfig() - specs := map[string]struct { - src string - expErr bool - }{ - "all good": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, - }, - "empty minimum": { - src: `{"params":{"minimum_gas_prices":[]}}`, - }, - "minimum not set": { - src: `{"params":{}}`, - }, - "zero amount not allowed": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"0"}]}}`, - expErr: true, - }, - "duplicate denoms not allowed": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"},{"denom":"ALX", "amount":"2"}]}}`, - expErr: true, - }, - "negative amounts not allowed": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"-1"}]}}`, - expErr: true, - }, - "denom must be sorted": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ZLX", "amount":"1"},{"denom":"ALX", "amount":"2"}]}}`, - expErr: true, - }, - "sorted denoms is allowed": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"},{"denom":"ZLX", "amount":"2"}]}}`, - expErr: false, - }, - } - for name, spec := range specs { - t.Run(name, func(t *testing.T) { - gotErr := AppModuleBasic{}.ValidateGenesis(encCfg.Codec, nil, []byte(spec.src)) - if spec.expErr { - require.Error(t, gotErr) - return - } - require.NoError(t, gotErr) - }) - } -} +// // func TestValidateGenesis(t *testing.T) { +// // encCfg := moduletestutil.MakeTestEncodingConfig() +// // specs := map[string]struct { +// // src string +// // expErr bool +// // }{ +// // "all good": { +// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, +// // }, +// // "empty minimum": { +// // src: `{"params":{"minimum_gas_prices":[]}}`, +// // }, +// // "minimum not set": { +// // src: `{"params":{}}`, +// // }, +// // "zero amount not allowed": { +// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"0"}]}}`, +// // expErr: true, +// // }, +// // "duplicate denoms not allowed": { +// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"},{"denom":"ALX", "amount":"2"}]}}`, +// // expErr: true, +// // }, +// // "negative amounts not allowed": { +// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"-1"}]}}`, +// // expErr: true, +// // }, +// // "denom must be sorted": { +// // src: `{"params":{"minimum_gas_prices":[{"denom":"ZLX", "amount":"1"},{"denom":"ALX", "amount":"2"}]}}`, +// // expErr: true, +// // }, +// // "sorted denoms is allowed": { +// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"},{"denom":"ZLX", "amount":"2"}]}}`, +// // expErr: false, +// // }, +// // } +// // for name, spec := range specs { +// // t.Run(name, func(t *testing.T) { +// // gotErr := AppModuleBasic{}.ValidateGenesis(encCfg.Codec, nil, []byte(spec.src)) +// // if spec.expErr { +// // require.Error(t, gotErr) +// // return +// // } +// // require.NoError(t, gotErr) +// // }) +// // } +// // } -func TestInitExportGenesis(t *testing.T) { - specs := map[string]struct { - src string - exp types.GenesisState - }{ - "single fee": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, - exp: types.GenesisState{ - Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)))}, - }, - }, - "multiple fee options": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}, {"denom":"BLX", "amount":"0.001"}]}}`, - exp: types.GenesisState{ - Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)), - sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)))}, - }, - }, - "no fee set": { - src: `{"params":{}}`, - exp: types.GenesisState{Params: types.Params{MinimumGasPrices: sdk.DecCoins{}}}, - }, - } - for name, spec := range specs { - t.Run(name, func(t *testing.T) { - ctx, encCfg, subspace := setupTestStore(t) - m := NewAppModule(subspace) - m.InitGenesis(ctx, encCfg.Codec, []byte(spec.src)) - gotJSON := m.ExportGenesis(ctx, encCfg.Codec) - var got types.GenesisState - require.NoError(t, encCfg.Codec.UnmarshalJSON(gotJSON, &got)) - assert.Equal(t, spec.exp, got, string(gotJSON)) - }) - } -} +// // func TestInitExportGenesis(t *testing.T) { +// // specs := map[string]struct { +// // src string +// // exp types.GenesisState +// // }{ +// // "single fee": { +// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, +// // exp: types.GenesisState{ +// // Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)))}, +// // }, +// // }, +// // "multiple fee options": { +// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}, {"denom":"BLX", "amount":"0.001"}]}}`, +// // exp: types.GenesisState{ +// // Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)), +// // sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)))}, +// // }, +// // }, +// // "no fee set": { +// // src: `{"params":{}}`, +// // exp: types.GenesisState{Params: types.Params{MinimumGasPrices: sdk.DecCoins{}}}, +// // }, +// // } +// // for name, spec := range specs { +// // t.Run(name, func(t *testing.T) { +// // ctx, encCfg, keeper := setupTestStore(t) +// // m := NewAppModule(keeper) +// // m.InitGenesis(ctx, encCfg.Codec, []byte(spec.src)) +// // gotJSON := m.ExportGenesis(ctx, encCfg.Codec) +// // var got types.GenesisState +// // require.NoError(t, encCfg.Codec.UnmarshalJSON(gotJSON, &got)) +// // assert.Equal(t, spec.exp, got, string(gotJSON)) +// // }) +// // } +// // } -func setupTestStore(t *testing.T) (sdk.Context, moduletestutil.TestEncodingConfig, paramstypes.Subspace) { - db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db) - encCfg := moduletestutil.MakeTestEncodingConfig() - keyParams := sdk.NewKVStoreKey(paramstypes.StoreKey) - tkeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) - ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) - ms.MountStoreWithDB(tkeyParams, storetypes.StoreTypeTransient, db) - require.NoError(t, ms.LoadLatestVersion()) +// // func setupTestStore(t *testing.T) (sdk.Context, moduletestutil.TestEncodingConfig, paramstypes.Subspace) { +// // db := dbm.NewMemDB() +// // ms := store.NewCommitMultiStore(db) +// // encCfg := moduletestutil.MakeTestEncodingConfig() +// // keyParams := sdk.NewKVStoreKey(paramstypes.StoreKey) +// // tkeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) +// // ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) +// // ms.MountStoreWithDB(tkeyParams, storetypes.StoreTypeTransient, db) +// // require.NoError(t, ms.LoadLatestVersion()) - paramsKeeper := paramskeeper.NewKeeper(encCfg.Codec, encCfg.Amino, keyParams, tkeyParams) +// // globalfeeKeeper := keeper.NewKeeper(encCfg.Codec, encCfg.Amino, keyParams, tkeyParams) - ctx := sdk.NewContext(ms, tmproto.Header{ - Height: 1234567, - Time: time.Date(2020, time.April, 22, 12, 0, 0, 0, time.UTC), - }, false, log.NewNopLogger()) +// // ctx := sdk.NewContext(ms, tmproto.Header{ +// // Height: 1234567, +// // Time: time.Date(2020, time.April, 22, 12, 0, 0, 0, time.UTC), +// // }, false, log.NewNopLogger()) - subspace := paramsKeeper.Subspace(ModuleName).WithKeyTable(types.ParamKeyTable()) - return ctx, encCfg, subspace -} +// // return ctx, encCfg, keeper +// // } diff --git a/x/globalfee/grpc_query.go b/x/globalfee/grpc_query.go deleted file mode 100644 index be4bea317..000000000 --- a/x/globalfee/grpc_query.go +++ /dev/null @@ -1,40 +0,0 @@ -package globalfee - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/bandprotocol/chain/v2/x/globalfee/types" -) - -var _ types.QueryServer = &Querier{} - -// ParamSource is a read only subset of paramtypes.Subspace -type ParamSource interface { - Get(ctx sdk.Context, key []byte, ptr interface{}) - Has(ctx sdk.Context, key []byte) bool -} - -type Querier struct { - paramSource ParamSource -} - -func NewGrpcQuerier(paramSource ParamSource) Querier { - return Querier{paramSource: paramSource} -} - -// MinimumGasPrices return minimum gas prices -func (q Querier) MinimumGasPrices( - stdCtx context.Context, - _ *types.QueryMinimumGasPricesRequest, -) (*types.QueryMinimumGasPricesResponse, error) { - var minGasPrices sdk.DecCoins - ctx := sdk.UnwrapSDKContext(stdCtx) - if q.paramSource.Has(ctx, types.ParamStoreKeyMinGasPrices) { - q.paramSource.Get(ctx, types.ParamStoreKeyMinGasPrices, &minGasPrices) - } - return &types.QueryMinimumGasPricesResponse{ - MinimumGasPrices: minGasPrices, - }, nil -} diff --git a/x/globalfee/grpc_query_test.go b/x/globalfee/grpc_query_test.go deleted file mode 100644 index fdd196bbb..000000000 --- a/x/globalfee/grpc_query_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package globalfee - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/bandprotocol/chain/v2/x/globalfee/types" -) - -func TestQueryMinimumGasPrices(t *testing.T) { - specs := map[string]struct { - setupStore func(ctx sdk.Context, s paramtypes.Subspace) - expMin sdk.DecCoins - }{ - "one coin": { - setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { - s.SetParamSet(ctx, &types.Params{ - MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt())), - }) - }, - expMin: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt())), - }, - "multiple coins": { - setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { - s.SetParamSet(ctx, &types.Params{ - MinimumGasPrices: sdk.NewDecCoins( - sdk.NewDecCoin("ALX", sdk.OneInt()), - sdk.NewDecCoin("BLX", sdk.NewInt(2)), - ), - }) - }, - expMin: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt()), sdk.NewDecCoin("BLX", sdk.NewInt(2))), - }, - "no min gas price set": { - setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { - s.SetParamSet(ctx, &types.Params{}) - }, - }, - "no param set": { - setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { - }, - }, - } - for name, spec := range specs { - t.Run(name, func(t *testing.T) { - ctx, _, subspace := setupTestStore(t) - spec.setupStore(ctx, subspace) - q := NewGrpcQuerier(subspace) - gotResp, gotErr := q.MinimumGasPrices(sdk.WrapSDKContext(ctx), nil) - require.NoError(t, gotErr) - require.NotNil(t, gotResp) - assert.Equal(t, spec.expMin, gotResp.MinimumGasPrices) - }) - } -} diff --git a/x/globalfee/keeper/grpc_query.go b/x/globalfee/keeper/grpc_query.go new file mode 100644 index 000000000..7d55656c0 --- /dev/null +++ b/x/globalfee/keeper/grpc_query.go @@ -0,0 +1,26 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/globalfee/types" +) + +var _ types.QueryServer = &Querier{} + +type Querier struct { + Keeper +} + +// Params return parameters of globalfee module +func (q Querier) Params( + stdCtx context.Context, + _ *types.QueryParamsRequest, +) (*types.QueryParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(stdCtx) + return &types.QueryParamsResponse{ + Params: q.GetParams(ctx), + }, nil +} diff --git a/x/globalfee/keeper/grpc_query_test.go b/x/globalfee/keeper/grpc_query_test.go new file mode 100644 index 000000000..db240dc1b --- /dev/null +++ b/x/globalfee/keeper/grpc_query_test.go @@ -0,0 +1,59 @@ +package keeper + +// import ( +// "testing" + +// sdk "github.com/cosmos/cosmos-sdk/types" +// paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +// "github.com/stretchr/testify/assert" +// "github.com/stretchr/testify/require" + +// "github.com/bandprotocol/chain/v2/x/globalfee/types" +// ) + +// func TestQueryMinimumGasPrices(t *testing.T) { +// specs := map[string]struct { +// setupStore func(ctx sdk.Context, s paramtypes.Subspace) +// expMin sdk.DecCoins +// }{ +// "one coin": { +// setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { +// s.SetParamSet(ctx, &types.Params{ +// MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt())), +// }) +// }, +// expMin: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt())), +// }, +// "multiple coins": { +// setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { +// s.SetParamSet(ctx, &types.Params{ +// MinimumGasPrices: sdk.NewDecCoins( +// sdk.NewDecCoin("ALX", sdk.OneInt()), +// sdk.NewDecCoin("BLX", sdk.NewInt(2)), +// ), +// }) +// }, +// expMin: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt()), sdk.NewDecCoin("BLX", sdk.NewInt(2))), +// }, +// "no min gas price set": { +// setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { +// s.SetParamSet(ctx, &types.Params{}) +// }, +// }, +// "no param set": { +// setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { +// }, +// }, +// } +// for name, spec := range specs { +// t.Run(name, func(t *testing.T) { +// ctx, _, subspace := setupTestStore(t) +// spec.setupStore(ctx, subspace) +// q := NewGrpcQuerier(subspace) +// gotResp, gotErr := q.MinimumGasPrices(sdk.WrapSDKContext(ctx), nil) +// require.NoError(t, gotErr) +// require.NotNil(t, gotResp) +// assert.Equal(t, spec.expMin, gotResp.MinimumGasPrices) +// }) +// } +// } diff --git a/x/globalfee/keeper/keeper.go b/x/globalfee/keeper/keeper.go new file mode 100644 index 000000000..e5dac72fb --- /dev/null +++ b/x/globalfee/keeper/keeper.go @@ -0,0 +1,52 @@ +package keeper + +import ( + "github.com/bandprotocol/chain/v2/x/globalfee/types" + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type Keeper struct { + storeKey storetypes.StoreKey + cdc codec.BinaryCodec + + authority string +} + +func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, authority string) Keeper { + return Keeper{ + storeKey: storeKey, + cdc: cdc, + authority: authority, + } +} + +func (k *Keeper) GetAuthority() string { + return k.authority +} + +// SetParams sets the x/globalfee module parameters. +func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error { + if err := p.Validate(); err != nil { + return err + } + + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&p) + store.Set(types.ParamsKeyPrefix, bz) + + return nil +} + +// GetParams returns the current x/globalfee module parameters. +func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.ParamsKeyPrefix) + if bz == nil { + return p + } + + k.cdc.MustUnmarshal(bz, &p) + return p +} diff --git a/x/globalfee/keeper/msg_server.go b/x/globalfee/keeper/msg_server.go new file mode 100644 index 000000000..8d530ac67 --- /dev/null +++ b/x/globalfee/keeper/msg_server.go @@ -0,0 +1,44 @@ +package keeper + +import ( + "context" + + "github.com/bandprotocol/chain/v2/x/globalfee/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" +) + +type msgServer struct { + Keeper +} + +var _ types.MsgServer = msgServer{} + +// NewMsgServerImpl returns an implementation of the MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{Keeper: keeper} +} + +// UpdateParams updates the params. +func (ms msgServer) UpdateParams( + goCtx context.Context, + req *types.MsgUpdateParams, +) (*types.MsgUpdateParamsResponse, error) { + if ms.authority != req.Authority { + return nil, sdkerrors.Wrapf( + govtypes.ErrInvalidSigner, + "invalid authority; expected %s, got %s", + ms.authority, + req.Authority, + ) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + if err := ms.SetParams(ctx, req.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/globalfee/module.go b/x/globalfee/module.go index cdc20bdd6..503b1447d 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -11,14 +11,17 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/module" - paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" "github.com/bandprotocol/chain/v2/x/globalfee/client/cli" + "github.com/bandprotocol/chain/v2/x/globalfee/keeper" "github.com/bandprotocol/chain/v2/x/globalfee/types" ) +// ConsensusVersion defines the current x/globalfee module consensus version. +const ConsensusVersion = 2 + var ( _ module.AppModuleBasic = AppModuleBasic{} _ module.AppModuleGenesis = AppModule{} @@ -55,6 +58,7 @@ func (a AppModuleBasic) ValidateGenesis( } func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { + types.RegisterInterfaces(registry) } func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { @@ -70,20 +74,17 @@ func (a AppModuleBasic) GetQueryCmd() *cobra.Command { } func (a AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(amino) } type AppModule struct { AppModuleBasic - paramSpace paramstypes.Subspace + keeper keeper.Keeper } // NewAppModule constructor -func NewAppModule(paramSpace paramstypes.Subspace) *AppModule { - if !paramSpace.HasKeyTable() { - paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) - } - - return &AppModule{paramSpace: paramSpace} +func NewAppModule(keeper keeper.Keeper) *AppModule { + return &AppModule{keeper: keeper} } func (a AppModule) InitGenesis( @@ -93,13 +94,13 @@ func (a AppModule) InitGenesis( ) []abci.ValidatorUpdate { var genesisState types.GenesisState marshaler.MustUnmarshalJSON(message, &genesisState) - a.paramSpace.SetParamSet(ctx, &genesisState.Params) + a.keeper.SetParams(ctx, genesisState.Params) return nil } func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) json.RawMessage { var genState types.GenesisState - a.paramSpace.GetParamSet(ctx, &genState.Params) + genState.Params = a.keeper.GetParams(ctx) return marshaler.MustMarshalJSON(&genState) } @@ -107,7 +108,8 @@ func (a AppModule) RegisterInvariants(registry sdk.InvariantRegistry) { } func (a AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterQueryServer(cfg.QueryServer(), NewGrpcQuerier(a.paramSpace)) + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(a.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), keeper.Querier{Keeper: a.keeper}) } func (a AppModule) BeginBlock(context sdk.Context, block abci.RequestBeginBlock) { @@ -122,5 +124,5 @@ func (a AppModule) EndBlock(context sdk.Context, block abci.RequestEndBlock) []a // introduced by the module. To avoid wrong/empty versions, the initial version // should be set to 1. func (a AppModule) ConsensusVersion() uint64 { - return 1 + return ConsensusVersion } diff --git a/x/globalfee/types/codec.go b/x/globalfee/types/codec.go new file mode 100644 index 000000000..d4ed7385d --- /dev/null +++ b/x/globalfee/types/codec.go @@ -0,0 +1,30 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + ModuleCdc = codec.NewAminoCodec(amino) +) + +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(Params{}, "globalfee/Params", nil) + legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "globalfee/MsgUpdateParams") +} + +// RegisterInterfaces registers the interfaces types with the interface registry. +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgUpdateParams{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/globalfee/types/keys.go b/x/globalfee/types/keys.go index 71b43267d..f79244713 100644 --- a/x/globalfee/types/keys.go +++ b/x/globalfee/types/keys.go @@ -5,4 +5,11 @@ const ( ModuleName = "globalfee" QuerierRoute = ModuleName + + // StoreKey to be used when creating the KVStore. + StoreKey = ModuleName +) + +var ( + ParamsKeyPrefix = []byte{0x01} ) diff --git a/x/globalfee/types/msgs.go b/x/globalfee/types/msgs.go new file mode 100644 index 000000000..a08186ef3 --- /dev/null +++ b/x/globalfee/types/msgs.go @@ -0,0 +1,32 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgUpdateParams{} + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (m *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.Wrap(err, "invalid authority address") + } + + if err := m.Params.Validate(); err != nil { + return err + } + + return nil +} diff --git a/x/globalfee/types/params.go b/x/globalfee/types/params.go index d2b5f985f..d864c4a83 100644 --- a/x/globalfee/types/params.go +++ b/x/globalfee/types/params.go @@ -3,35 +3,18 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -// ParamStoreKeyMinGasPrices store key -var ParamStoreKeyMinGasPrices = []byte("MinimumGasPricesParam") - // DefaultParams returns default parameters func DefaultParams() Params { return Params{MinimumGasPrices: sdk.DecCoins{}} } -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - // ValidateBasic performs basic validation. func (p Params) ValidateBasic() error { return validateMinimumGasPrices(p.MinimumGasPrices) } -// ParamSetPairs returns the parameter set pairs. -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair( - ParamStoreKeyMinGasPrices, &p.MinimumGasPrices, validateMinimumGasPrices, - ), - } -} - // this requires the fee non-negative func validateMinimumGasPrices(i interface{}) error { v, ok := i.(sdk.DecCoins) @@ -41,3 +24,7 @@ func validateMinimumGasPrices(i interface{}) error { return v.Validate() } + +func (p Params) Validate() error { + return validateMinimumGasPrices(p.MinimumGasPrices) +} diff --git a/x/globalfee/types/query.pb.go b/x/globalfee/types/query.pb.go index 9a20b0632..e85fbe20a 100644 --- a/x/globalfee/types/query.pb.go +++ b/x/globalfee/types/query.pb.go @@ -6,8 +6,6 @@ package types import ( context "context" fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -31,23 +29,22 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryMinimumGasPricesRequest is the request type for the -// Query/MinimumGasPrices RPC method. -type QueryMinimumGasPricesRequest struct { +// QueryParamsRequest is request type for the Query/Params RPC method. +type QueryParamsRequest struct { } -func (m *QueryMinimumGasPricesRequest) Reset() { *m = QueryMinimumGasPricesRequest{} } -func (m *QueryMinimumGasPricesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryMinimumGasPricesRequest) ProtoMessage() {} -func (*QueryMinimumGasPricesRequest) Descriptor() ([]byte, []int) { +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_6d5fd101df5712fa, []int{0} } -func (m *QueryMinimumGasPricesRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryMinimumGasPricesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryMinimumGasPricesRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -57,36 +54,36 @@ func (m *QueryMinimumGasPricesRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryMinimumGasPricesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryMinimumGasPricesRequest.Merge(m, src) +func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) } -func (m *QueryMinimumGasPricesRequest) XXX_Size() int { +func (m *QueryParamsRequest) XXX_Size() int { return m.Size() } -func (m *QueryMinimumGasPricesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryMinimumGasPricesRequest.DiscardUnknown(m) +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryMinimumGasPricesRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo -// QueryMinimumGasPricesResponse is the response type for the -// Query/MinimumGasPrices RPC method. -type QueryMinimumGasPricesResponse struct { - MinimumGasPrices github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=minimum_gas_prices,json=minimumGasPrices,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"minimum_gas_prices,omitempty" yaml:"minimum_gas_prices"` +// QueryParamsResponse is response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // pagination defines an optional pagination for the request. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } -func (m *QueryMinimumGasPricesResponse) Reset() { *m = QueryMinimumGasPricesResponse{} } -func (m *QueryMinimumGasPricesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryMinimumGasPricesResponse) ProtoMessage() {} -func (*QueryMinimumGasPricesResponse) Descriptor() ([]byte, []int) { +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_6d5fd101df5712fa, []int{1} } -func (m *QueryMinimumGasPricesResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryMinimumGasPricesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryMinimumGasPricesResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -96,59 +93,53 @@ func (m *QueryMinimumGasPricesResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryMinimumGasPricesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryMinimumGasPricesResponse.Merge(m, src) +func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) } -func (m *QueryMinimumGasPricesResponse) XXX_Size() int { +func (m *QueryParamsResponse) XXX_Size() int { return m.Size() } -func (m *QueryMinimumGasPricesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryMinimumGasPricesResponse.DiscardUnknown(m) +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryMinimumGasPricesResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo -func (m *QueryMinimumGasPricesResponse) GetMinimumGasPrices() github_com_cosmos_cosmos_sdk_types.DecCoins { +func (m *QueryParamsResponse) GetParams() Params { if m != nil { - return m.MinimumGasPrices + return m.Params } - return nil + return Params{} } func init() { - proto.RegisterType((*QueryMinimumGasPricesRequest)(nil), "globalfee.v1beta1.QueryMinimumGasPricesRequest") - proto.RegisterType((*QueryMinimumGasPricesResponse)(nil), "globalfee.v1beta1.QueryMinimumGasPricesResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "globalfee.v1beta1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "globalfee.v1beta1.QueryParamsResponse") } func init() { proto.RegisterFile("globalfee/v1beta1/query.proto", fileDescriptor_6d5fd101df5712fa) } var fileDescriptor_6d5fd101df5712fa = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xb1, 0x6a, 0xdb, 0x40, - 0x18, 0xc7, 0x75, 0x2d, 0xed, 0xa0, 0x2e, 0xae, 0xe8, 0xd0, 0x1a, 0xf9, 0x54, 0x04, 0xa5, 0x85, - 0xd6, 0x77, 0xb5, 0xba, 0x75, 0x74, 0x0b, 0x5d, 0x5a, 0x68, 0x3d, 0x76, 0x31, 0x27, 0xf9, 0x22, - 0x1f, 0xd1, 0xdd, 0x27, 0xfb, 0x4e, 0x26, 0x5a, 0xf3, 0x04, 0x81, 0xbc, 0x42, 0xa6, 0x0c, 0x79, - 0x82, 0x3c, 0x80, 0x47, 0x43, 0x96, 0x4c, 0x4a, 0xb0, 0x33, 0x65, 0xcc, 0x13, 0x04, 0x4b, 0x76, - 0x62, 0x2c, 0x12, 0x32, 0xdd, 0xc1, 0xef, 0xff, 0xf1, 0xe7, 0xff, 0xff, 0x3e, 0xbb, 0x15, 0x27, - 0x10, 0xb2, 0x64, 0x87, 0x73, 0x3a, 0xe9, 0x84, 0xdc, 0xb0, 0x0e, 0x1d, 0x65, 0x7c, 0x9c, 0x93, - 0x74, 0x0c, 0x06, 0x9c, 0xd7, 0x77, 0x98, 0xac, 0x70, 0xf3, 0x4d, 0x0c, 0x31, 0x94, 0x94, 0x2e, - 0x7f, 0x95, 0xb0, 0xe9, 0xc6, 0x00, 0x71, 0xc2, 0x29, 0x4b, 0x05, 0x65, 0x4a, 0x81, 0x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, 0xfb, 0x7b, 0x3a, 0xc7, 0x68, 0x36, 0xc7, 0xe8, 0x72, 0x8e, 0xd1, 0xc1, 0x02, - 0x5b, 0xb3, 0x05, 0xb6, 0xce, 0x17, 0xd8, 0xfa, 0x1f, 0x6c, 0x34, 0x11, 0x32, 0x35, 0x28, 0x37, - 0x1c, 0x41, 0x42, 0xa3, 0x21, 0x13, 0x8a, 0x4e, 0x02, 0xba, 0xb7, 0x61, 0x51, 0x36, 0x13, 0xbe, - 0x2c, 0x45, 0xdf, 0x6e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x76, 0x1d, 0x08, 0xbe, 0x8e, 0x02, 0x00, - 0x00, + // 290 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0xcf, 0xc9, 0x4f, + 0x4a, 0xcc, 0x49, 0x4b, 0x4d, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0x2c, + 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x84, 0x4b, 0xeb, 0x41, 0xa5, + 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xb2, 0xfa, 0x20, 0x16, 0x44, 0xa1, 0x94, 0x4c, 0x7a, + 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x7e, 0x62, 0x41, 0xa6, 0x7e, 0x62, 0x5e, 0x5e, 0x7e, 0x49, 0x62, + 0x49, 0x66, 0x7e, 0x5e, 0x31, 0x54, 0x56, 0x1e, 0xd3, 0x96, 0xf4, 0xd4, 0xbc, 0xd4, 0xe2, 0x4c, + 0xa8, 0x02, 0x25, 0x11, 0x2e, 0xa1, 0x40, 0x90, 0xb5, 0x01, 0x89, 0x45, 0x89, 0xb9, 0xc5, 0x41, + 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x4a, 0x7e, 0x5c, 0xc2, 0x28, 0xa2, 0xc5, 0x05, 0xf9, 0x79, + 0xc5, 0xa9, 0x42, 0xe6, 0x5c, 0x6c, 0x05, 0x60, 0x11, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, + 0x49, 0x3d, 0x0c, 0x57, 0xea, 0x41, 0xb4, 0x38, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x55, + 0x6e, 0xd4, 0xcc, 0xc8, 0xc5, 0x0a, 0x36, 0x50, 0xa8, 0x8a, 0x8b, 0x0d, 0xa2, 0x42, 0x48, 0x15, + 0x8b, 0x66, 0x4c, 0xa7, 0x48, 0xa9, 0x11, 0x52, 0x06, 0x71, 0x9b, 0x92, 0x62, 0xd3, 0xe5, 0x27, + 0x93, 0x99, 0xa4, 0x85, 0x24, 0xf5, 0x31, 0xbd, 0x0c, 0x71, 0x85, 0x93, 0xcf, 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, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, + 0xe7, 0xe7, 0xea, 0x27, 0x25, 0xe6, 0xa5, 0x80, 0xc3, 0x26, 0x39, 0x3f, 0x47, 0x3f, 0x39, 0x23, + 0x31, 0x33, 0x4f, 0xbf, 0xcc, 0x48, 0xbf, 0x02, 0xc9, 0xd8, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, + 0x36, 0xb0, 0x22, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc8, 0xea, 0x91, 0xf7, 0xc9, 0x01, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -163,7 +154,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - MinimumGasPrices(ctx context.Context, in *QueryMinimumGasPricesRequest, opts ...grpc.CallOption) (*QueryMinimumGasPricesResponse, error) + // Params queries parameters of globalfee module + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } type queryClient struct { @@ -174,9 +166,9 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) MinimumGasPrices(ctx context.Context, in *QueryMinimumGasPricesRequest, opts ...grpc.CallOption) (*QueryMinimumGasPricesResponse, error) { - out := new(QueryMinimumGasPricesResponse) - err := c.cc.Invoke(ctx, "/globalfee.v1beta1.Query/MinimumGasPrices", in, out, opts...) +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/globalfee.v1beta1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -185,35 +177,36 @@ func (c *queryClient) MinimumGasPrices(ctx context.Context, in *QueryMinimumGasP // QueryServer is the server API for Query service. type QueryServer interface { - MinimumGasPrices(context.Context, *QueryMinimumGasPricesRequest) (*QueryMinimumGasPricesResponse, error) + // Params queries parameters of globalfee module + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) MinimumGasPrices(ctx context.Context, req *QueryMinimumGasPricesRequest) (*QueryMinimumGasPricesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MinimumGasPrices not implemented") +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } -func _Query_MinimumGasPrices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryMinimumGasPricesRequest) +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).MinimumGasPrices(ctx, in) + return srv.(QueryServer).Params(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/globalfee.v1beta1.Query/MinimumGasPrices", + FullMethod: "/globalfee.v1beta1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).MinimumGasPrices(ctx, req.(*QueryMinimumGasPricesRequest)) + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) } return interceptor(ctx, in, info, handler) } @@ -223,15 +216,15 @@ var _Query_serviceDesc = grpc.ServiceDesc{ HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "MinimumGasPrices", - Handler: _Query_MinimumGasPrices_Handler, + MethodName: "Params", + Handler: _Query_Params_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "globalfee/v1beta1/query.proto", } -func (m *QueryMinimumGasPricesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -241,12 +234,12 @@ func (m *QueryMinimumGasPricesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryMinimumGasPricesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryMinimumGasPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -254,7 +247,7 @@ func (m *QueryMinimumGasPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } -func (m *QueryMinimumGasPricesResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -264,30 +257,26 @@ func (m *QueryMinimumGasPricesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryMinimumGasPricesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryMinimumGasPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.MinimumGasPrices) > 0 { - for iNdEx := len(m.MinimumGasPrices) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.MinimumGasPrices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -302,7 +291,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryMinimumGasPricesRequest) Size() (n int) { +func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 } @@ -311,18 +300,14 @@ func (m *QueryMinimumGasPricesRequest) Size() (n int) { return n } -func (m *QueryMinimumGasPricesResponse) Size() (n int) { +func (m *QueryParamsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.MinimumGasPrices) > 0 { - for _, e := range m.MinimumGasPrices { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -332,7 +317,7 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryMinimumGasPricesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -355,10 +340,10 @@ func (m *QueryMinimumGasPricesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryMinimumGasPricesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryMinimumGasPricesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -382,7 +367,7 @@ func (m *QueryMinimumGasPricesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryMinimumGasPricesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -405,15 +390,15 @@ func (m *QueryMinimumGasPricesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryMinimumGasPricesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryMinimumGasPricesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumGasPrices", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -440,8 +425,7 @@ func (m *QueryMinimumGasPricesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MinimumGasPrices = append(m.MinimumGasPrices, types.DecCoin{}) - if err := m.MinimumGasPrices[len(m.MinimumGasPrices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/globalfee/types/query.pb.gw.go b/x/globalfee/types/query.pb.gw.go index e39226a46..2bddbd2b8 100644 --- a/x/globalfee/types/query.pb.gw.go +++ b/x/globalfee/types/query.pb.gw.go @@ -33,20 +33,20 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join -func request_Query_MinimumGasPrices_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryMinimumGasPricesRequest +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 var metadata runtime.ServerMetadata - msg, err := client.MinimumGasPrices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_MinimumGasPrices_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryMinimumGasPricesRequest +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest var metadata runtime.ServerMetadata - msg, err := server.MinimumGasPrices(ctx, &protoReq) + msg, err := server.Params(ctx, &protoReq) return msg, metadata, err } @@ -57,7 +57,7 @@ func local_request_Query_MinimumGasPrices_0(ctx context.Context, marshaler runti // 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_MinimumGasPrices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + 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 @@ -68,7 +68,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_MinimumGasPrices_0(rctx, inboundMarshaler, server, req, pathParams) + 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 { @@ -76,7 +76,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_MinimumGasPrices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -121,7 +121,7 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_MinimumGasPrices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + 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() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -130,14 +130,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_MinimumGasPrices_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_MinimumGasPrices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -145,9 +145,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_MinimumGasPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"globalfee", "v1beta1", "minimum_gas_prices"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"globalfee", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( - forward_Query_MinimumGasPrices_0 = runtime.ForwardResponseMessage + forward_Query_Params_0 = runtime.ForwardResponseMessage ) diff --git a/x/globalfee/types/tx.pb.go b/x/globalfee/types/tx.pb.go new file mode 100644 index 000000000..20dbfbb77 --- /dev/null +++ b/x/globalfee/types/tx.pb.go @@ -0,0 +1,604 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: globalfee/v1beta1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "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 of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/globalfee 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_453c6a09831c9f6b, []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 + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// 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_453c6a09831c9f6b, []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), "globalfee.v1beta1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "globalfee.v1beta1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("globalfee/v1beta1/tx.proto", fileDescriptor_453c6a09831c9f6b) } + +var fileDescriptor_453c6a09831c9f6b = []byte{ + // 328 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xcf, 0xc9, 0x4f, + 0x4a, 0xcc, 0x49, 0x4b, 0x4d, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, + 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x84, 0xcb, 0xe9, 0x41, 0xe5, 0xa4, 0xc4, 0x93, + 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xf5, 0x73, 0x8b, 0xd3, 0xf5, 0xcb, 0x0c, 0x41, 0x14, 0x44, 0xad, + 0x94, 0x3c, 0xa6, 0x39, 0xe9, 0xa9, 0x79, 0xa9, 0xc5, 0x99, 0xc5, 0x50, 0x05, 0x22, 0xe9, 0xf9, + 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x15, 0x95, 0x84, 0x98, 0x17, 0x0f, 0x91, 0x80, 0x70, + 0x20, 0x52, 0x4a, 0x93, 0x18, 0xb9, 0xf8, 0x7d, 0x8b, 0xd3, 0x43, 0x0b, 0x52, 0x12, 0x4b, 0x52, + 0x03, 0x12, 0x8b, 0x12, 0x73, 0x8b, 0x85, 0xcc, 0xb8, 0x38, 0x13, 0x4b, 0x4b, 0x32, 0xf2, 0x8b, + 0x32, 0x4b, 0x2a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0x24, 0x2e, 0x6d, 0xd1, 0x15, 0x81, + 0x6a, 0x74, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x0e, 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0x0f, 0x42, + 0x28, 0x15, 0x32, 0xe7, 0x62, 0x2b, 0x00, 0x9b, 0x20, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, + 0xa9, 0x87, 0xe1, 0x35, 0x3d, 0x88, 0x15, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0x95, + 0x5b, 0xf1, 0x35, 0x3d, 0xdf, 0xa0, 0x85, 0x30, 0x48, 0x49, 0x92, 0x4b, 0x1c, 0xcd, 0x4d, 0x41, + 0xa9, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x46, 0xa9, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0x71, + 0x5c, 0x3c, 0x28, 0x4e, 0x56, 0xc2, 0x62, 0x15, 0x9a, 0x11, 0x52, 0x5a, 0x84, 0xd5, 0xc0, 0xac, + 0x71, 0xf2, 0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, + 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa3, 0xf4, 0xcc, + 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xa4, 0xc4, 0xbc, 0x14, 0x70, 0x30, 0x26, + 0xe7, 0xe7, 0xe8, 0x27, 0x67, 0x24, 0x66, 0xe6, 0xe9, 0x97, 0x19, 0xe9, 0x57, 0xe8, 0x23, 0x62, + 0xa9, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xac, 0xc8, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, + 0x1b, 0x18, 0xb3, 0x37, 0x07, 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/globalfee module + // parameters. + // + // 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, "/globalfee.v1beta1.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/globalfee module + // parameters. + // + // 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: "/globalfee.v1beta1.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: "globalfee.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "globalfee/v1beta1/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") +) From 1ab3785b408157d1b311eeed4d39a5c0fd567ed8 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 15:05:24 +0700 Subject: [PATCH 19/44] fix test --- x/globalfee/genesis_test.go | 241 ++++++++++++++++++------------------ 1 file changed, 122 insertions(+), 119 deletions(-) diff --git a/x/globalfee/genesis_test.go b/x/globalfee/genesis_test.go index eab9fafd9..559126332 100644 --- a/x/globalfee/genesis_test.go +++ b/x/globalfee/genesis_test.go @@ -1,130 +1,133 @@ package globalfee -// import ( -// "testing" -// "time" +import ( + "testing" + "time" -// dbm "github.com/cometbft/cometbft-db" -// "github.com/cometbft/cometbft/libs/log" -// tmproto "github.com/cometbft/cometbft/proto/tendermint/types" -// "github.com/cosmos/cosmos-sdk/store" -// storetypes "github.com/cosmos/cosmos-sdk/store/types" -// sdk "github.com/cosmos/cosmos-sdk/types" -// moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" -// paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" -// "github.com/stretchr/testify/assert" -// "github.com/stretchr/testify/require" + dbm "github.com/cometbft/cometbft-db" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/store" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" -// "github.com/bandprotocol/chain/v2/x/globalfee/keeper" -// "github.com/bandprotocol/chain/v2/x/globalfee/types" -// ) + "github.com/bandprotocol/chain/v2/x/globalfee/keeper" + "github.com/bandprotocol/chain/v2/x/globalfee/types" +) -// // func TestDefaultGenesis(t *testing.T) { -// // encCfg := moduletestutil.MakeTestEncodingConfig() -// // gotJSON := AppModuleBasic{}.DefaultGenesis(encCfg.Codec) -// // assert.JSONEq(t, `{"params":{"minimum_gas_prices":[]}}`, string(gotJSON)) -// // } +func TestDefaultGenesis(t *testing.T) { + encCfg := moduletestutil.MakeTestEncodingConfig() + gotJSON := AppModuleBasic{}.DefaultGenesis(encCfg.Codec) + assert.JSONEq(t, `{"params":{"minimum_gas_prices":[]}}`, string(gotJSON)) +} -// // func TestValidateGenesis(t *testing.T) { -// // encCfg := moduletestutil.MakeTestEncodingConfig() -// // specs := map[string]struct { -// // src string -// // expErr bool -// // }{ -// // "all good": { -// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, -// // }, -// // "empty minimum": { -// // src: `{"params":{"minimum_gas_prices":[]}}`, -// // }, -// // "minimum not set": { -// // src: `{"params":{}}`, -// // }, -// // "zero amount not allowed": { -// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"0"}]}}`, -// // expErr: true, -// // }, -// // "duplicate denoms not allowed": { -// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"},{"denom":"ALX", "amount":"2"}]}}`, -// // expErr: true, -// // }, -// // "negative amounts not allowed": { -// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"-1"}]}}`, -// // expErr: true, -// // }, -// // "denom must be sorted": { -// // src: `{"params":{"minimum_gas_prices":[{"denom":"ZLX", "amount":"1"},{"denom":"ALX", "amount":"2"}]}}`, -// // expErr: true, -// // }, -// // "sorted denoms is allowed": { -// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"},{"denom":"ZLX", "amount":"2"}]}}`, -// // expErr: false, -// // }, -// // } -// // for name, spec := range specs { -// // t.Run(name, func(t *testing.T) { -// // gotErr := AppModuleBasic{}.ValidateGenesis(encCfg.Codec, nil, []byte(spec.src)) -// // if spec.expErr { -// // require.Error(t, gotErr) -// // return -// // } -// // require.NoError(t, gotErr) -// // }) -// // } -// // } +func TestValidateGenesis(t *testing.T) { + encCfg := moduletestutil.MakeTestEncodingConfig() + specs := map[string]struct { + src string + expErr bool + }{ + "all good": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, + }, + "empty minimum": { + src: `{"params":{"minimum_gas_prices":[]}}`, + }, + "minimum not set": { + src: `{"params":{}}`, + }, + "zero amount not allowed": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"0"}]}}`, + expErr: true, + }, + "duplicate denoms not allowed": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"},{"denom":"ALX", "amount":"2"}]}}`, + expErr: true, + }, + "negative amounts not allowed": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"-1"}]}}`, + expErr: true, + }, + "denom must be sorted": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ZLX", "amount":"1"},{"denom":"ALX", "amount":"2"}]}}`, + expErr: true, + }, + "sorted denoms is allowed": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"},{"denom":"ZLX", "amount":"2"}]}}`, + expErr: false, + }, + } + for name, spec := range specs { + t.Run(name, func(t *testing.T) { + gotErr := AppModuleBasic{}.ValidateGenesis(encCfg.Codec, nil, []byte(spec.src)) + if spec.expErr { + require.Error(t, gotErr) + return + } + require.NoError(t, gotErr) + }) + } +} -// // func TestInitExportGenesis(t *testing.T) { -// // specs := map[string]struct { -// // src string -// // exp types.GenesisState -// // }{ -// // "single fee": { -// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, -// // exp: types.GenesisState{ -// // Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)))}, -// // }, -// // }, -// // "multiple fee options": { -// // src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}, {"denom":"BLX", "amount":"0.001"}]}}`, -// // exp: types.GenesisState{ -// // Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)), -// // sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)))}, -// // }, -// // }, -// // "no fee set": { -// // src: `{"params":{}}`, -// // exp: types.GenesisState{Params: types.Params{MinimumGasPrices: sdk.DecCoins{}}}, -// // }, -// // } -// // for name, spec := range specs { -// // t.Run(name, func(t *testing.T) { -// // ctx, encCfg, keeper := setupTestStore(t) -// // m := NewAppModule(keeper) -// // m.InitGenesis(ctx, encCfg.Codec, []byte(spec.src)) -// // gotJSON := m.ExportGenesis(ctx, encCfg.Codec) -// // var got types.GenesisState -// // require.NoError(t, encCfg.Codec.UnmarshalJSON(gotJSON, &got)) -// // assert.Equal(t, spec.exp, got, string(gotJSON)) -// // }) -// // } -// // } +func TestInitExportGenesis(t *testing.T) { + specs := map[string]struct { + src string + exp types.GenesisState + }{ + "single fee": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, + exp: types.GenesisState{ + Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)))}, + }, + }, + "multiple fee options": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}, {"denom":"BLX", "amount":"0.001"}]}}`, + exp: types.GenesisState{ + Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)), + sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)))}, + }, + }, + "no fee set": { + src: `{"params":{}}`, + exp: types.GenesisState{Params: types.Params{MinimumGasPrices: sdk.DecCoins{}}}, + }, + } + for name, spec := range specs { + t.Run(name, func(t *testing.T) { + ctx, encCfg, keeper := setupTestStore(t) + m := NewAppModule(keeper) + m.InitGenesis(ctx, encCfg.Codec, []byte(spec.src)) + gotJSON := m.ExportGenesis(ctx, encCfg.Codec) + var got types.GenesisState + require.NoError(t, encCfg.Codec.UnmarshalJSON(gotJSON, &got)) + assert.Equal(t, spec.exp, got, string(gotJSON)) + }) + } +} -// // func setupTestStore(t *testing.T) (sdk.Context, moduletestutil.TestEncodingConfig, paramstypes.Subspace) { -// // db := dbm.NewMemDB() -// // ms := store.NewCommitMultiStore(db) -// // encCfg := moduletestutil.MakeTestEncodingConfig() -// // keyParams := sdk.NewKVStoreKey(paramstypes.StoreKey) -// // tkeyParams := sdk.NewTransientStoreKey(paramstypes.TStoreKey) -// // ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) -// // ms.MountStoreWithDB(tkeyParams, storetypes.StoreTypeTransient, db) -// // require.NoError(t, ms.LoadLatestVersion()) +func setupTestStore(t *testing.T) (sdk.Context, moduletestutil.TestEncodingConfig, keeper.Keeper) { + db := dbm.NewMemDB() + ms := store.NewCommitMultiStore(db) + encCfg := moduletestutil.MakeTestEncodingConfig() + storeKey := sdk.NewKVStoreKey(types.StoreKey) + ms.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) + require.NoError(t, ms.LoadLatestVersion()) -// // globalfeeKeeper := keeper.NewKeeper(encCfg.Codec, encCfg.Amino, keyParams, tkeyParams) + globalfeeKeeper := keeper.NewKeeper( + encCfg.Codec, + storeKey, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) -// // ctx := sdk.NewContext(ms, tmproto.Header{ -// // Height: 1234567, -// // Time: time.Date(2020, time.April, 22, 12, 0, 0, 0, time.UTC), -// // }, false, log.NewNopLogger()) + ctx := sdk.NewContext(ms, tmproto.Header{ + Height: 1234567, + Time: time.Date(2020, time.April, 22, 12, 0, 0, 0, time.UTC), + }, false, log.NewNopLogger()) -// // return ctx, encCfg, keeper -// // } + return ctx, encCfg, globalfeeKeeper +} From 871ec94075b50d2b5014a17d4431144b8c6bc4e5 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 16:03:47 +0700 Subject: [PATCH 20/44] fix test --- x/globalfee/feechecker/feechecker_test.go | 548 +++++++++++----------- x/globalfee/genesis_test.go | 70 --- x/globalfee/keeper/genesis.go | 20 + x/globalfee/keeper/genesis_test.go | 81 ++++ x/globalfee/keeper/grpc_query.go | 6 +- x/globalfee/keeper/grpc_query_test.go | 124 ++--- x/globalfee/module.go | 37 +- x/globalfee/types/params.go | 7 + 8 files changed, 473 insertions(+), 420 deletions(-) create mode 100644 x/globalfee/keeper/genesis.go create mode 100644 x/globalfee/keeper/genesis_test.go diff --git a/x/globalfee/feechecker/feechecker_test.go b/x/globalfee/feechecker/feechecker_test.go index fbdab3c27..b0085bbca 100644 --- a/x/globalfee/feechecker/feechecker_test.go +++ b/x/globalfee/feechecker/feechecker_test.go @@ -1,276 +1,276 @@ package feechecker_test -// import ( -// "math" -// "testing" - -// sdk "github.com/cosmos/cosmos-sdk/types" -// "github.com/stretchr/testify/suite" - -// "github.com/bandprotocol/chain/v2/testing/testapp" -// "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" -// "github.com/bandprotocol/chain/v2/x/oracle/types" -// "github.com/cosmos/cosmos-sdk/x/authz" -// ) - -// var ( -// BasicCalldata = []byte("BASIC_CALLDATA") -// BasicClientID = "BASIC_CLIENT_ID" -// ) - -// type StubTx struct { -// sdk.Tx -// sdk.FeeTx -// Msgs []sdk.Msg -// GasPrices sdk.DecCoins -// } - -// func (st *StubTx) GetMsgs() []sdk.Msg { -// return st.Msgs -// } - -// func (st *StubTx) ValidateBasic() error { -// return nil -// } - -// func (st *StubTx) GetGas() uint64 { -// return 1000000 -// } - -// func (st *StubTx) GetFee() sdk.Coins { -// fees := make(sdk.Coins, len(st.GasPrices)) - -// // Determine the fees by multiplying each gas prices -// glDec := sdk.NewDec(int64(st.GetGas())) -// for i, gp := range st.GasPrices { -// fee := gp.Amount.Mul(glDec) -// fees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) -// } - -// return fees -// } - -// type FeeCheckerTestSuite struct { -// suite.Suite -// FeeChecker feechecker.FeeChecker -// ctx sdk.Context -// requestId types.RequestID -// } - -// func (suite *FeeCheckerTestSuite) SetupTest() { -// app, ctx, oracleKeeper := testapp.CreateTestInput(true) -// suite.ctx = ctx.WithBlockHeight(999). -// WithIsCheckTx(true). -// WithMinGasPrices(sdk.DecCoins{{Denom: "uband", Amount: sdk.NewDecWithPrec(1, 4)}}) - -// oracleKeeper.GrantReporter(suite.ctx, testapp.Validators[0].ValAddress, testapp.Alice.Address) - -// req := types.NewRequest( -// 1, -// BasicCalldata, -// []sdk.ValAddress{testapp.Validators[0].ValAddress}, -// 1, -// 1, -// testapp.ParseTime(0), -// "", -// nil, -// nil, -// 0, -// ) -// suite.requestId = oracleKeeper.AddRequest(suite.ctx, req) - -// suite.FeeChecker = feechecker.NewFeeChecker( -// &oracleKeeper, -// &app.GlobalfeeKeeper, -// app.StakingKeeper, -// ) -// } - -// func (suite *FeeCheckerTestSuite) TestValidRawReport() { -// msgs := []sdk.Msg{types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress)} -// stubTx := &StubTx{Msgs: msgs} - -// // test - check report tx -// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) -// suite.Require().True(isReportTx) - -// // test - check tx fee with min gas prices -// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) -// suite.Require().NoError(err) -// suite.Require().Equal(sdk.Coins{}, fee) -// suite.Require().Equal(int64(math.MaxInt64), priority) -// } - -// func (suite *FeeCheckerTestSuite) TestNotValidRawReport() { -// msgs := []sdk.Msg{types.NewMsgReportData(1, []types.RawReport{}, testapp.Alice.ValAddress)} -// stubTx := &StubTx{Msgs: msgs} - -// // test - check report tx -// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) -// suite.Require().False(isReportTx) - -// // test - check tx fee with min gas prices -// _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) -// suite.Require().Error(err) -// } - -// func (suite *FeeCheckerTestSuite) TestValidReport() { -// reportMsgs := []sdk.Msg{ -// types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress), -// } -// authzMsg := authz.NewMsgExec(testapp.Alice.Address, reportMsgs) -// stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}} - -// // test - check report tx -// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) -// suite.Require().True(isReportTx) - -// // test - check tx fee with min gas prices -// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) -// suite.Require().NoError(err) -// suite.Require().Equal(sdk.Coins{}, fee) -// suite.Require().Equal(int64(math.MaxInt64), priority) -// } - -// func (suite *FeeCheckerTestSuite) TestNoAuthzReport() { -// reportMsgs := []sdk.Msg{ -// types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress), -// } -// authzMsg := authz.NewMsgExec(testapp.Bob.Address, reportMsgs) -// stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1)))} - -// // test - check report tx -// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) -// suite.Require().False(isReportTx) - -// // test - check tx fee with min gas prices -// _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) -// suite.Require().NoError(err) -// } - -// func (suite *FeeCheckerTestSuite) TestNotValidReport() { -// reportMsgs := []sdk.Msg{ -// types.NewMsgReportData(suite.requestId+1, []types.RawReport{}, testapp.Validators[0].ValAddress), -// } -// authzMsg := authz.NewMsgExec(testapp.Alice.Address, reportMsgs) -// stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}} - -// // test - check report tx -// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) -// suite.Require().False(isReportTx) - -// // test - check tx fee with min gas prices -// _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) -// suite.Require().Error(err) -// } - -// func (suite *FeeCheckerTestSuite) TestNotReportMsg() { -// requestMsg := types.NewMsgRequestData( -// 1, -// BasicCalldata, -// 1, -// 1, -// BasicClientID, -// testapp.Coins100000000uband, -// testapp.TestDefaultPrepareGas, -// testapp.TestDefaultExecuteGas, -// testapp.FeePayer.Address, -// ) -// stubTx := &StubTx{ -// Msgs: []sdk.Msg{requestMsg}, -// GasPrices: sdk.NewDecCoins( -// sdk.NewDecCoinFromDec("uaaaa", sdk.NewDecWithPrec(100, 3)), -// sdk.NewDecCoinFromDec("uaaab", sdk.NewDecWithPrec(1, 3)), -// sdk.NewDecCoinFromDec("uaaac", sdk.NewDecWithPrec(0, 3)), -// sdk.NewDecCoinFromDec("uband", sdk.NewDecWithPrec(3, 3)), -// sdk.NewDecCoinFromDec("uccca", sdk.NewDecWithPrec(0, 3)), -// sdk.NewDecCoinFromDec("ucccb", sdk.NewDecWithPrec(1, 3)), -// sdk.NewDecCoinFromDec("ucccc", sdk.NewDecWithPrec(100, 3)), -// ), -// } - -// // test - check report tx -// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) -// suite.Require().False(isReportTx) - -// // test - check tx fee with min gas prices -// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) -// suite.Require().NoError(err) -// suite.Require().Equal(stubTx.GetFee(), fee) -// suite.Require().Equal(int64(30), priority) -// } - -// func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameAuthzMsgs() { -// reportMsg := types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress) -// requestMsg := types.NewMsgRequestData( -// 1, -// BasicCalldata, -// 1, -// 1, -// BasicClientID, -// testapp.Coins100000000uband, -// testapp.TestDefaultPrepareGas, -// testapp.TestDefaultExecuteGas, -// testapp.FeePayer.Address, -// ) -// msgs := []sdk.Msg{reportMsg, requestMsg} -// authzMsg := authz.NewMsgExec(testapp.Alice.Address, msgs) -// stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1)))} - -// // test - check report tx -// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) -// suite.Require().False(isReportTx) - -// // test - check tx fee with min gas prices -// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) -// suite.Require().NoError(err) -// suite.Require().Equal(stubTx.GetFee(), fee) -// suite.Require().Equal(int64(10000), priority) -// } - -// func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameTx() { -// reportMsg := types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress) -// requestMsg := types.NewMsgRequestData( -// 1, -// BasicCalldata, -// 1, -// 1, -// BasicClientID, -// testapp.Coins100000000uband, -// testapp.TestDefaultPrepareGas, -// testapp.TestDefaultExecuteGas, -// testapp.FeePayer.Address, -// ) -// stubTx := &StubTx{ -// Msgs: []sdk.Msg{reportMsg, requestMsg}, -// GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1))), -// } - -// // test - check report tx -// isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) -// suite.Require().False(isReportTx) - -// // test - check tx fee with min gas prices -// fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) -// suite.Require().NoError(err) -// suite.Require().Equal(stubTx.GetFee(), fee) -// suite.Require().Equal(int64(10000), priority) -// } - -// func (suite *FeeCheckerTestSuite) TestGetBondDenom() { -// denom := suite.FeeChecker.GetBondDenom(suite.ctx) -// suite.Require().Equal("uband", denom) -// } - -// func (suite *FeeCheckerTestSuite) TestDefaultZeroGlobalFee() { -// coins, err := suite.FeeChecker.DefaultZeroGlobalFee(suite.ctx) - -// suite.Require().Equal(1, len(coins)) -// suite.Require().Equal("uband", coins[0].Denom) -// suite.Require().Equal(sdk.NewDec(0), coins[0].Amount) -// suite.Require().NoError(err) -// } - -// func TestFeeCheckerTestSuite(t *testing.T) { -// suite.Run(t, new(FeeCheckerTestSuite)) -// } +import ( + "math" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/suite" + + "github.com/bandprotocol/chain/v2/testing/testapp" + "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" + "github.com/bandprotocol/chain/v2/x/oracle/types" + "github.com/cosmos/cosmos-sdk/x/authz" +) + +var ( + BasicCalldata = []byte("BASIC_CALLDATA") + BasicClientID = "BASIC_CLIENT_ID" +) + +type StubTx struct { + sdk.Tx + sdk.FeeTx + Msgs []sdk.Msg + GasPrices sdk.DecCoins +} + +func (st *StubTx) GetMsgs() []sdk.Msg { + return st.Msgs +} + +func (st *StubTx) ValidateBasic() error { + return nil +} + +func (st *StubTx) GetGas() uint64 { + return 1000000 +} + +func (st *StubTx) GetFee() sdk.Coins { + fees := make(sdk.Coins, len(st.GasPrices)) + + // Determine the fees by multiplying each gas prices + glDec := sdk.NewDec(int64(st.GetGas())) + for i, gp := range st.GasPrices { + fee := gp.Amount.Mul(glDec) + fees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) + } + + return fees +} + +type FeeCheckerTestSuite struct { + suite.Suite + FeeChecker feechecker.FeeChecker + ctx sdk.Context + requestId types.RequestID +} + +func (suite *FeeCheckerTestSuite) SetupTest() { + app, ctx, oracleKeeper := testapp.CreateTestInput(true) + suite.ctx = ctx.WithBlockHeight(999). + WithIsCheckTx(true). + WithMinGasPrices(sdk.DecCoins{{Denom: "uband", Amount: sdk.NewDecWithPrec(1, 4)}}) + + oracleKeeper.GrantReporter(suite.ctx, testapp.Validators[0].ValAddress, testapp.Alice.Address) + + req := types.NewRequest( + 1, + BasicCalldata, + []sdk.ValAddress{testapp.Validators[0].ValAddress}, + 1, + 1, + testapp.ParseTime(0), + "", + nil, + nil, + 0, + ) + suite.requestId = oracleKeeper.AddRequest(suite.ctx, req) + + suite.FeeChecker = feechecker.NewFeeChecker( + &oracleKeeper, + &app.GlobalfeeKeeper, + app.StakingKeeper, + ) +} + +func (suite *FeeCheckerTestSuite) TestValidRawReport() { + msgs := []sdk.Msg{types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress)} + stubTx := &StubTx{Msgs: msgs} + + // test - check report tx + isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) + suite.Require().True(isReportTx) + + // test - check tx fee with min gas prices + fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) + suite.Require().NoError(err) + suite.Require().Equal(sdk.Coins{}, fee) + suite.Require().Equal(int64(math.MaxInt64), priority) +} + +func (suite *FeeCheckerTestSuite) TestNotValidRawReport() { + msgs := []sdk.Msg{types.NewMsgReportData(1, []types.RawReport{}, testapp.Alice.ValAddress)} + stubTx := &StubTx{Msgs: msgs} + + // test - check report tx + isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) + suite.Require().False(isReportTx) + + // test - check tx fee with min gas prices + _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) + suite.Require().Error(err) +} + +func (suite *FeeCheckerTestSuite) TestValidReport() { + reportMsgs := []sdk.Msg{ + types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress), + } + authzMsg := authz.NewMsgExec(testapp.Alice.Address, reportMsgs) + stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}} + + // test - check report tx + isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) + suite.Require().True(isReportTx) + + // test - check tx fee with min gas prices + fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) + suite.Require().NoError(err) + suite.Require().Equal(sdk.Coins{}, fee) + suite.Require().Equal(int64(math.MaxInt64), priority) +} + +func (suite *FeeCheckerTestSuite) TestNoAuthzReport() { + reportMsgs := []sdk.Msg{ + types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress), + } + authzMsg := authz.NewMsgExec(testapp.Bob.Address, reportMsgs) + stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1)))} + + // test - check report tx + isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) + suite.Require().False(isReportTx) + + // test - check tx fee with min gas prices + _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) + suite.Require().NoError(err) +} + +func (suite *FeeCheckerTestSuite) TestNotValidReport() { + reportMsgs := []sdk.Msg{ + types.NewMsgReportData(suite.requestId+1, []types.RawReport{}, testapp.Validators[0].ValAddress), + } + authzMsg := authz.NewMsgExec(testapp.Alice.Address, reportMsgs) + stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}} + + // test - check report tx + isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) + suite.Require().False(isReportTx) + + // test - check tx fee with min gas prices + _, _, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) + suite.Require().Error(err) +} + +func (suite *FeeCheckerTestSuite) TestNotReportMsg() { + requestMsg := types.NewMsgRequestData( + 1, + BasicCalldata, + 1, + 1, + BasicClientID, + testapp.Coins100000000uband, + testapp.TestDefaultPrepareGas, + testapp.TestDefaultExecuteGas, + testapp.FeePayer.Address, + ) + stubTx := &StubTx{ + Msgs: []sdk.Msg{requestMsg}, + GasPrices: sdk.NewDecCoins( + sdk.NewDecCoinFromDec("uaaaa", sdk.NewDecWithPrec(100, 3)), + sdk.NewDecCoinFromDec("uaaab", sdk.NewDecWithPrec(1, 3)), + sdk.NewDecCoinFromDec("uaaac", sdk.NewDecWithPrec(0, 3)), + sdk.NewDecCoinFromDec("uband", sdk.NewDecWithPrec(3, 3)), + sdk.NewDecCoinFromDec("uccca", sdk.NewDecWithPrec(0, 3)), + sdk.NewDecCoinFromDec("ucccb", sdk.NewDecWithPrec(1, 3)), + sdk.NewDecCoinFromDec("ucccc", sdk.NewDecWithPrec(100, 3)), + ), + } + + // test - check report tx + isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) + suite.Require().False(isReportTx) + + // test - check tx fee with min gas prices + fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) + suite.Require().NoError(err) + suite.Require().Equal(stubTx.GetFee(), fee) + suite.Require().Equal(int64(30), priority) +} + +func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameAuthzMsgs() { + reportMsg := types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress) + requestMsg := types.NewMsgRequestData( + 1, + BasicCalldata, + 1, + 1, + BasicClientID, + testapp.Coins100000000uband, + testapp.TestDefaultPrepareGas, + testapp.TestDefaultExecuteGas, + testapp.FeePayer.Address, + ) + msgs := []sdk.Msg{reportMsg, requestMsg} + authzMsg := authz.NewMsgExec(testapp.Alice.Address, msgs) + stubTx := &StubTx{Msgs: []sdk.Msg{&authzMsg}, GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1)))} + + // test - check report tx + isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) + suite.Require().False(isReportTx) + + // test - check tx fee with min gas prices + fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) + suite.Require().NoError(err) + suite.Require().Equal(stubTx.GetFee(), fee) + suite.Require().Equal(int64(10000), priority) +} + +func (suite *FeeCheckerTestSuite) TestReportMsgAndOthersTypeMsgInTheSameTx() { + reportMsg := types.NewMsgReportData(suite.requestId, []types.RawReport{}, testapp.Validators[0].ValAddress) + requestMsg := types.NewMsgRequestData( + 1, + BasicCalldata, + 1, + 1, + BasicClientID, + testapp.Coins100000000uband, + testapp.TestDefaultPrepareGas, + testapp.TestDefaultExecuteGas, + testapp.FeePayer.Address, + ) + stubTx := &StubTx{ + Msgs: []sdk.Msg{reportMsg, requestMsg}, + GasPrices: sdk.NewDecCoins(sdk.NewDecCoin("uband", sdk.NewInt(1))), + } + + // test - check report tx + isReportTx := suite.FeeChecker.CheckReportTx(suite.ctx, stubTx) + suite.Require().False(isReportTx) + + // test - check tx fee with min gas prices + fee, priority, err := suite.FeeChecker.CheckTxFeeWithMinGasPrices(suite.ctx, stubTx) + suite.Require().NoError(err) + suite.Require().Equal(stubTx.GetFee(), fee) + suite.Require().Equal(int64(10000), priority) +} + +func (suite *FeeCheckerTestSuite) TestGetBondDenom() { + denom := suite.FeeChecker.GetBondDenom(suite.ctx) + suite.Require().Equal("uband", denom) +} + +func (suite *FeeCheckerTestSuite) TestDefaultZeroGlobalFee() { + coins, err := suite.FeeChecker.DefaultZeroGlobalFee(suite.ctx) + + suite.Require().Equal(1, len(coins)) + suite.Require().Equal("uband", coins[0].Denom) + suite.Require().Equal(sdk.NewDec(0), coins[0].Amount) + suite.Require().NoError(err) +} + +func TestFeeCheckerTestSuite(t *testing.T) { + suite.Run(t, new(FeeCheckerTestSuite)) +} diff --git a/x/globalfee/genesis_test.go b/x/globalfee/genesis_test.go index 559126332..78dd07b41 100644 --- a/x/globalfee/genesis_test.go +++ b/x/globalfee/genesis_test.go @@ -2,22 +2,10 @@ package globalfee import ( "testing" - "time" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/cosmos/cosmos-sdk/store" - storetypes "github.com/cosmos/cosmos-sdk/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/bandprotocol/chain/v2/x/globalfee/keeper" - "github.com/bandprotocol/chain/v2/x/globalfee/types" ) func TestDefaultGenesis(t *testing.T) { @@ -73,61 +61,3 @@ func TestValidateGenesis(t *testing.T) { }) } } - -func TestInitExportGenesis(t *testing.T) { - specs := map[string]struct { - src string - exp types.GenesisState - }{ - "single fee": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, - exp: types.GenesisState{ - Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)))}, - }, - }, - "multiple fee options": { - src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}, {"denom":"BLX", "amount":"0.001"}]}}`, - exp: types.GenesisState{ - Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)), - sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)))}, - }, - }, - "no fee set": { - src: `{"params":{}}`, - exp: types.GenesisState{Params: types.Params{MinimumGasPrices: sdk.DecCoins{}}}, - }, - } - for name, spec := range specs { - t.Run(name, func(t *testing.T) { - ctx, encCfg, keeper := setupTestStore(t) - m := NewAppModule(keeper) - m.InitGenesis(ctx, encCfg.Codec, []byte(spec.src)) - gotJSON := m.ExportGenesis(ctx, encCfg.Codec) - var got types.GenesisState - require.NoError(t, encCfg.Codec.UnmarshalJSON(gotJSON, &got)) - assert.Equal(t, spec.exp, got, string(gotJSON)) - }) - } -} - -func setupTestStore(t *testing.T) (sdk.Context, moduletestutil.TestEncodingConfig, keeper.Keeper) { - db := dbm.NewMemDB() - ms := store.NewCommitMultiStore(db) - encCfg := moduletestutil.MakeTestEncodingConfig() - storeKey := sdk.NewKVStoreKey(types.StoreKey) - ms.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) - require.NoError(t, ms.LoadLatestVersion()) - - globalfeeKeeper := keeper.NewKeeper( - encCfg.Codec, - storeKey, - authtypes.NewModuleAddress(govtypes.ModuleName).String(), - ) - - ctx := sdk.NewContext(ms, tmproto.Header{ - Height: 1234567, - Time: time.Date(2020, time.April, 22, 12, 0, 0, 0, time.UTC), - }, false, log.NewNopLogger()) - - return ctx, encCfg, globalfeeKeeper -} diff --git a/x/globalfee/keeper/genesis.go b/x/globalfee/keeper/genesis.go new file mode 100644 index 000000000..330402d92 --- /dev/null +++ b/x/globalfee/keeper/genesis.go @@ -0,0 +1,20 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/globalfee/types" +) + +// InitGenesis new globalfee genesis +func (keeper Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) { + if err := keeper.SetParams(ctx, data.Params); err != nil { + panic(err) + } +} + +// ExportGenesis returns a GenesisState for a given context. +func (keeper Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + params := keeper.GetParams(ctx) + return types.NewGenesisState(params) +} diff --git a/x/globalfee/keeper/genesis_test.go b/x/globalfee/keeper/genesis_test.go new file mode 100644 index 000000000..c24285b1d --- /dev/null +++ b/x/globalfee/keeper/genesis_test.go @@ -0,0 +1,81 @@ +package keeper_test + +import ( + "testing" + + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/stretchr/testify/suite" + + "github.com/bandprotocol/chain/v2/x/globalfee" + "github.com/bandprotocol/chain/v2/x/globalfee/keeper" + "github.com/bandprotocol/chain/v2/x/globalfee/types" +) + +type GenesisTestSuite struct { + suite.Suite + + sdkCtx sdk.Context + keeper keeper.Keeper + cdc codec.BinaryCodec + key *storetypes.KVStoreKey +} + +func TestGenesisTestSuite(t *testing.T) { + suite.Run(t, new(GenesisTestSuite)) +} + +func (s *GenesisTestSuite) SetupTest() { + key := sdk.NewKVStoreKey(types.StoreKey) + testCtx := testutil.DefaultContextWithDB(s.T(), key, sdk.NewTransientStoreKey("transient_test")) + encCfg := moduletestutil.MakeTestEncodingConfig(globalfee.AppModuleBasic{}) + + // gomock initializations + s.cdc = codec.NewProtoCodec(encCfg.InterfaceRegistry) + s.sdkCtx = testCtx.Ctx + s.key = key + + s.keeper = keeper.NewKeeper(s.cdc, key, authtypes.NewModuleAddress(govtypes.ModuleName).String()) +} + +func (s *GenesisTestSuite) TestImportExportGenesis() { + specs := map[string]struct { + src string + exp types.GenesisState + }{ + "single fee": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}]}}`, + exp: types.GenesisState{ + Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)))}, + }, + }, + "multiple fee options": { + src: `{"params":{"minimum_gas_prices":[{"denom":"ALX", "amount":"1"}, {"denom":"BLX", "amount":"0.001"}]}}`, + exp: types.GenesisState{ + Params: types.Params{MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.NewInt(1)), + sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)))}, + }, + }, + "no fee set": { + src: `{"params":{}}`, + exp: types.GenesisState{Params: types.Params{MinimumGasPrices: nil}}, + }, + } + for name, spec := range specs { + s.Run(name, func() { + genesisState := &spec.exp + s.keeper.InitGenesis(s.sdkCtx, genesisState) + + params := s.keeper.GetParams(s.sdkCtx) + s.Require().Equal(genesisState.Params, params) + + genesisState2 := s.keeper.ExportGenesis(s.sdkCtx) + s.Require().Equal(genesisState, genesisState2) + }) + } +} diff --git a/x/globalfee/keeper/grpc_query.go b/x/globalfee/keeper/grpc_query.go index 7d55656c0..e3306ee21 100644 --- a/x/globalfee/keeper/grpc_query.go +++ b/x/globalfee/keeper/grpc_query.go @@ -15,11 +15,9 @@ type Querier struct { } // Params return parameters of globalfee module -func (q Querier) Params( - stdCtx context.Context, - _ *types.QueryParamsRequest, -) (*types.QueryParamsResponse, error) { +func (q Querier) Params(stdCtx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { ctx := sdk.UnwrapSDKContext(stdCtx) + return &types.QueryParamsResponse{ Params: q.GetParams(ctx), }, nil diff --git a/x/globalfee/keeper/grpc_query_test.go b/x/globalfee/keeper/grpc_query_test.go index db240dc1b..39aa29be7 100644 --- a/x/globalfee/keeper/grpc_query_test.go +++ b/x/globalfee/keeper/grpc_query_test.go @@ -1,59 +1,73 @@ -package keeper +package keeper_test -// import ( -// "testing" +import ( + "testing" -// sdk "github.com/cosmos/cosmos-sdk/types" -// paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" -// "github.com/stretchr/testify/assert" -// "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" -// "github.com/bandprotocol/chain/v2/x/globalfee/types" -// ) + "github.com/bandprotocol/chain/v2/x/globalfee/keeper" + "github.com/bandprotocol/chain/v2/x/globalfee/types" +) -// func TestQueryMinimumGasPrices(t *testing.T) { -// specs := map[string]struct { -// setupStore func(ctx sdk.Context, s paramtypes.Subspace) -// expMin sdk.DecCoins -// }{ -// "one coin": { -// setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { -// s.SetParamSet(ctx, &types.Params{ -// MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt())), -// }) -// }, -// expMin: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt())), -// }, -// "multiple coins": { -// setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { -// s.SetParamSet(ctx, &types.Params{ -// MinimumGasPrices: sdk.NewDecCoins( -// sdk.NewDecCoin("ALX", sdk.OneInt()), -// sdk.NewDecCoin("BLX", sdk.NewInt(2)), -// ), -// }) -// }, -// expMin: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt()), sdk.NewDecCoin("BLX", sdk.NewInt(2))), -// }, -// "no min gas price set": { -// setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { -// s.SetParamSet(ctx, &types.Params{}) -// }, -// }, -// "no param set": { -// setupStore: func(ctx sdk.Context, s paramtypes.Subspace) { -// }, -// }, -// } -// for name, spec := range specs { -// t.Run(name, func(t *testing.T) { -// ctx, _, subspace := setupTestStore(t) -// spec.setupStore(ctx, subspace) -// q := NewGrpcQuerier(subspace) -// gotResp, gotErr := q.MinimumGasPrices(sdk.WrapSDKContext(ctx), nil) -// require.NoError(t, gotErr) -// require.NotNil(t, gotResp) -// assert.Equal(t, spec.expMin, gotResp.MinimumGasPrices) -// }) -// } -// } +func TestQueryParams(t *testing.T) { + specs := map[string]struct { + setupStore func(ctx sdk.Context, k keeper.Keeper) + expMin sdk.DecCoins + }{ + "one coin": { + setupStore: func(ctx sdk.Context, k keeper.Keeper) { + k.SetParams(ctx, types.Params{ + MinimumGasPrices: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt())), + }) + }, + expMin: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt())), + }, + "multiple coins": { + setupStore: func(ctx sdk.Context, k keeper.Keeper) { + k.SetParams(ctx, types.Params{ + MinimumGasPrices: sdk.NewDecCoins( + sdk.NewDecCoin("ALX", sdk.OneInt()), + sdk.NewDecCoin("BLX", sdk.NewInt(2)), + ), + }) + }, + expMin: sdk.NewDecCoins(sdk.NewDecCoin("ALX", sdk.OneInt()), sdk.NewDecCoin("BLX", sdk.NewInt(2))), + }, + "no min gas price set": { + setupStore: func(ctx sdk.Context, k keeper.Keeper) { + k.SetParams(ctx, types.Params{}) + }, + }, + "no param set": { + setupStore: func(ctx sdk.Context, k keeper.Keeper) { + }, + }, + } + for name, spec := range specs { + t.Run(name, func(t *testing.T) { + encCfg := moduletestutil.MakeTestEncodingConfig() + key := sdk.NewKVStoreKey(types.StoreKey) + ctx := testutil.DefaultContextWithDB(t, key, sdk.NewTransientStoreKey("transient_test")).Ctx + + k := keeper.NewKeeper( + encCfg.Codec, + key, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + q := keeper.Querier{Keeper: k} + spec.setupStore(ctx, k) + gotResp, gotErr := q.Params(sdk.WrapSDKContext(ctx), nil) + + require.NoError(t, gotErr) + require.NotNil(t, gotResp) + assert.Equal(t, spec.expMin, gotResp.Params.MinimumGasPrices) + }) + } +} diff --git a/x/globalfee/module.go b/x/globalfee/module.go index 503b1447d..0a130f8b7 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -20,7 +20,7 @@ import ( ) // ConsensusVersion defines the current x/globalfee module consensus version. -const ConsensusVersion = 2 +const ConsensusVersion = 1 var ( _ module.AppModuleBasic = AppModuleBasic{} @@ -35,10 +35,18 @@ func (a AppModuleBasic) Name() string { return types.ModuleName } +// RegisterLegacyAminoCodec registers the mint module's types on the given LegacyAmino codec. +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +// RegisterInterfaces registers the module's interface types +func (b AppModuleBasic) RegisterInterfaces(r codectypes.InterfaceRegistry) { + types.RegisterInterfaces(r) +} + func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(&types.GenesisState{ - Params: types.DefaultParams(), - }) + return cdc.MustMarshalJSON(types.DefaultGenesisState()) } func (a AppModuleBasic) ValidateGenesis( @@ -51,14 +59,12 @@ func (a AppModuleBasic) ValidateGenesis( if err != nil { return err } + if err := data.Params.ValidateBasic(); err != nil { return sdkerrors.Wrap(err, "params") } - return nil -} -func (a AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) { - types.RegisterInterfaces(registry) + return nil } func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { @@ -73,12 +79,9 @@ func (a AppModuleBasic) GetQueryCmd() *cobra.Command { return cli.GetQueryCmd() } -func (a AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino) { - types.RegisterLegacyAminoCodec(amino) -} - type AppModule struct { AppModuleBasic + keeper keeper.Keeper } @@ -94,14 +97,14 @@ func (a AppModule) InitGenesis( ) []abci.ValidatorUpdate { var genesisState types.GenesisState marshaler.MustUnmarshalJSON(message, &genesisState) - a.keeper.SetParams(ctx, genesisState.Params) - return nil + + a.keeper.InitGenesis(ctx, &genesisState) + return []abci.ValidatorUpdate{} } func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) json.RawMessage { - var genState types.GenesisState - genState.Params = a.keeper.GetParams(ctx) - return marshaler.MustMarshalJSON(&genState) + genState := a.keeper.ExportGenesis(ctx) + return marshaler.MustMarshalJSON(genState) } func (a AppModule) RegisterInvariants(registry sdk.InvariantRegistry) { diff --git a/x/globalfee/types/params.go b/x/globalfee/types/params.go index d864c4a83..403e3c2df 100644 --- a/x/globalfee/types/params.go +++ b/x/globalfee/types/params.go @@ -5,6 +5,13 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) +// NewParams returns Params instance with the given values. +func NewParams(minimumGasPrices sdk.DecCoins) Params { + return Params{ + MinimumGasPrices: minimumGasPrices, + } +} + // DefaultParams returns default parameters func DefaultParams() Params { return Params{MinimumGasPrices: sdk.DecCoins{}} From bb277c3436476a1977258af075233b75a96dade0 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 16:34:26 +0700 Subject: [PATCH 21/44] adjust import --- app/ante.go | 2 +- app/app.go | 16 ++--- app/genesis.go | 3 +- app/upgrades/v2_6/constants.go | 9 +-- proto/globalfee/v1beta1/tx.proto | 39 ++++++++++ x/globalfee/alias.go | 9 --- x/globalfee/feechecker/feechecker.go | 7 +- x/globalfee/feechecker/feechecker_test.go | 2 +- x/globalfee/feechecker/utils_test.go | 3 +- x/globalfee/keeper/keeper.go | 9 ++- x/globalfee/keeper/keeper_test.go | 87 +++++++++++++++++++++++ x/globalfee/keeper/msg_server.go | 7 +- x/globalfee/keeper/msg_server_test.go | 48 +++++++++++++ x/globalfee/module.go | 4 +- x/globalfee/types/genesis.go | 4 +- x/globalfee/types/msgs.go | 4 +- x/globalfee/types/params.go | 3 +- 17 files changed, 215 insertions(+), 41 deletions(-) create mode 100644 proto/globalfee/v1beta1/tx.proto delete mode 100644 x/globalfee/alias.go create mode 100644 x/globalfee/keeper/keeper_test.go create mode 100644 x/globalfee/keeper/msg_server_test.go diff --git a/app/ante.go b/app/ante.go index 773d3b5a4..3a082285d 100644 --- a/app/ante.go +++ b/app/ante.go @@ -5,13 +5,13 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" globalfeekeeper "github.com/bandprotocol/chain/v2/x/globalfee/keeper" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) // HandlerOptions extend the SDK's AnteHandler options by requiring the IBC diff --git a/app/app.go b/app/app.go index c51025524..cbadafadf 100644 --- a/app/app.go +++ b/app/app.go @@ -9,7 +9,7 @@ import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" - + owasm "github.com/bandprotocol/go-owasm/api" dbm "github.com/cometbft/cometbft-db" abci "github.com/cometbft/cometbft/abci/types" tmjson "github.com/cometbft/cometbft/libs/json" @@ -18,6 +18,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + cosmosnodeservice "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" @@ -112,8 +113,6 @@ import ( "github.com/rakyll/statik/fs" "github.com/spf13/cast" - owasm "github.com/bandprotocol/go-owasm/api" - "github.com/bandprotocol/chain/v2/app/keepers" "github.com/bandprotocol/chain/v2/app/upgrades" "github.com/bandprotocol/chain/v2/app/upgrades/v2_6" @@ -127,7 +126,6 @@ import ( "github.com/bandprotocol/chain/v2/x/oracle" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" - cosmosnodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" ) const ( @@ -633,7 +631,7 @@ func NewBandApp( paramstypes.ModuleName, vestingtypes.ModuleName, consensusparamtypes.ModuleName, - globalfee.ModuleName, + globalfeetypes.ModuleName, ) app.mm.SetOrderEndBlockers( crisistypes.ModuleName, @@ -658,7 +656,7 @@ func NewBandApp( upgradetypes.ModuleName, vestingtypes.ModuleName, consensusparamtypes.ModuleName, - globalfee.ModuleName, + globalfeetypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are // properly initialized with tokens from genesis accounts. @@ -689,7 +687,7 @@ func NewBandApp( vestingtypes.ModuleName, consensusparamtypes.ModuleName, oracletypes.ModuleName, - globalfee.ModuleName, + globalfeetypes.ModuleName, ) app.mm.RegisterInvariants(app.CrisisKeeper) @@ -733,7 +731,7 @@ func NewBandApp( }, OracleKeeper: &app.OracleKeeper, IBCKeeper: app.IBCKeeper, - GlobalFeeSubspace: app.GetSubspace(globalfee.ModuleName), + GlobalFeeSubspace: app.GetSubspace(globalfeetypes.ModuleName), StakingKeeper: app.StakingKeeper, GlobalfeeKeeper: &app.GlobalfeeKeeper, }, @@ -970,7 +968,7 @@ func initParamsKeeper( paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(icahosttypes.SubModuleName) paramsKeeper.Subspace(oracletypes.ModuleName) - paramsKeeper.Subspace(globalfee.ModuleName) + paramsKeeper.Subspace(globalfeetypes.ModuleName) return paramsKeeper } diff --git a/app/genesis.go b/app/genesis.go index dc684a196..df0d11b55 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -38,7 +38,6 @@ import ( ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" "github.com/bandprotocol/chain/v2/app/upgrades/v2_6" - "github.com/bandprotocol/chain/v2/x/globalfee" globalfeetypes "github.com/bandprotocol/chain/v2/x/globalfee/types" "github.com/bandprotocol/chain/v2/x/oracle" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" @@ -109,6 +108,6 @@ func NewDefaultGenesisState() GenesisState { ibctransafertypes.ModuleName: ibctransfer.AppModuleBasic{}.DefaultGenesis(cdc), icatypes.ModuleName: cdc.MustMarshalJSON(icaGenesis), oracletypes.ModuleName: oracle.AppModuleBasic{}.DefaultGenesis(cdc), - globalfee.ModuleName: cdc.MustMarshalJSON(globalfeeGenesis), + globalfeetypes.ModuleName: cdc.MustMarshalJSON(globalfeeGenesis), } } diff --git a/app/upgrades/v2_6/constants.go b/app/upgrades/v2_6/constants.go index 47b07a59a..fac25fab8 100644 --- a/app/upgrades/v2_6/constants.go +++ b/app/upgrades/v2_6/constants.go @@ -1,9 +1,6 @@ package v2_6 import ( - "github.com/bandprotocol/chain/v2/app/upgrades" - "github.com/bandprotocol/chain/v2/x/globalfee" - oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" @@ -15,6 +12,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/group" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + + "github.com/bandprotocol/chain/v2/app/upgrades" + globalfeetypes "github.com/bandprotocol/chain/v2/x/globalfee/types" + oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" ) const UpgradeName = "v2_6" @@ -23,7 +24,7 @@ var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: CreateUpgradeHandler, StoreUpgrades: storetypes.StoreUpgrades{ - Added: []string{group.StoreKey, globalfee.ModuleName}, + Added: []string{group.StoreKey, globalfeetypes.StoreKey}, }, } diff --git a/proto/globalfee/v1beta1/tx.proto b/proto/globalfee/v1beta1/tx.proto new file mode 100644 index 000000000..23013eee4 --- /dev/null +++ b/proto/globalfee/v1beta1/tx.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package globalfee.v1beta1; + +option go_package = "github.com/bandprotocol/chain/v2/x/globalfee/types"; + +import "cosmos/msg/v1/msg.proto"; +import "globalfee/v1beta1/genesis.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +// Msg defines the x/globalfee Msg service. +service Msg { + // UpdateParams defines a governance operation for updating the x/globalfee module + // parameters. + // + // 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 of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/globalfee 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 {} diff --git a/x/globalfee/alias.go b/x/globalfee/alias.go deleted file mode 100644 index da80f9309..000000000 --- a/x/globalfee/alias.go +++ /dev/null @@ -1,9 +0,0 @@ -package globalfee - -import ( - "github.com/bandprotocol/chain/v2/x/globalfee/types" -) - -const ( - ModuleName = types.ModuleName -) diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index 9e96b730d..46a638f04 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -4,14 +4,15 @@ import ( "errors" "math" + cmerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/bandprotocol/chain/v2/x/globalfee/keeper" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ) type FeeChecker struct { @@ -38,7 +39,7 @@ func (fc FeeChecker) CheckTxFeeWithMinGasPrices( ) (sdk.Coins, int64, error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { - return nil, 0, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + return nil, 0, cmerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") } feeCoins := feeTx.GetFee() @@ -74,7 +75,7 @@ func (fc FeeChecker) CheckTxFeeWithMinGasPrices( } if !allFees.IsZero() && !feeCoins.IsAnyGTE(allFees) { - return nil, 0, sdkerrors.Wrapf( + return nil, 0, cmerrors.Wrapf( sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, diff --git a/x/globalfee/feechecker/feechecker_test.go b/x/globalfee/feechecker/feechecker_test.go index b0085bbca..b525670b1 100644 --- a/x/globalfee/feechecker/feechecker_test.go +++ b/x/globalfee/feechecker/feechecker_test.go @@ -5,12 +5,12 @@ import ( "testing" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/authz" "github.com/stretchr/testify/suite" "github.com/bandprotocol/chain/v2/testing/testapp" "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" "github.com/bandprotocol/chain/v2/x/oracle/types" - "github.com/cosmos/cosmos-sdk/x/authz" ) var ( diff --git a/x/globalfee/feechecker/utils_test.go b/x/globalfee/feechecker/utils_test.go index 62cb40f91..c7b5ef8a8 100644 --- a/x/globalfee/feechecker/utils_test.go +++ b/x/globalfee/feechecker/utils_test.go @@ -3,9 +3,10 @@ package feechecker_test import ( "testing" - "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" + + "github.com/bandprotocol/chain/v2/x/globalfee/feechecker" ) type utilsTestSuite struct { diff --git a/x/globalfee/keeper/keeper.go b/x/globalfee/keeper/keeper.go index e5dac72fb..f6163c535 100644 --- a/x/globalfee/keeper/keeper.go +++ b/x/globalfee/keeper/keeper.go @@ -1,10 +1,12 @@ package keeper import ( - "github.com/bandprotocol/chain/v2/x/globalfee/types" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/globalfee/types" ) type Keeper struct { @@ -50,3 +52,8 @@ func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) { k.cdc.MustUnmarshal(bz, &p) return p } + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", "x/"+types.ModuleName) +} diff --git a/x/globalfee/keeper/keeper_test.go b/x/globalfee/keeper/keeper_test.go new file mode 100644 index 000000000..91a0e2402 --- /dev/null +++ b/x/globalfee/keeper/keeper_test.go @@ -0,0 +1,87 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/bandprotocol/chain/v2/x/globalfee" + "github.com/bandprotocol/chain/v2/x/globalfee/keeper" + "github.com/bandprotocol/chain/v2/x/globalfee/types" +) + +type IntegrationTestSuite struct { + suite.Suite + + globalfeeKeeper keeper.Keeper + ctx sdk.Context + msgServer types.MsgServer +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} + +func (s *IntegrationTestSuite) SetupTest() { + encCfg := moduletestutil.MakeTestEncodingConfig(globalfee.AppModuleBasic{}) + key := sdk.NewKVStoreKey(types.StoreKey) + testCtx := testutil.DefaultContextWithDB(s.T(), key, sdk.NewTransientStoreKey("transient_test")) + s.ctx = testCtx.Ctx + + s.globalfeeKeeper = keeper.NewKeeper( + encCfg.Codec, + key, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + s.Require().Equal(testCtx.Ctx.Logger().With("module", "x/"+types.ModuleName), + s.globalfeeKeeper.Logger(testCtx.Ctx)) + + err := s.globalfeeKeeper.SetParams(s.ctx, types.DefaultParams()) + s.Require().NoError(err) + + s.msgServer = keeper.NewMsgServerImpl(s.globalfeeKeeper) +} + +func (s *IntegrationTestSuite) TestParams() { + testCases := []struct { + name string + input types.Params + expectErr bool + }{ + { + name: "set full valid params", + input: types.Params{ + MinimumGasPrices: sdk.NewDecCoins( + sdk.NewDecCoin("ALX", sdk.NewInt(1)), + sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)), + ), + }, + expectErr: false, + }, + } + + for _, tc := range testCases { + tc := tc + + s.Run(tc.name, func() { + expected := s.globalfeeKeeper.GetParams(s.ctx) + err := s.globalfeeKeeper.SetParams(s.ctx, tc.input) + if tc.expectErr { + s.Require().Error(err) + } else { + expected = tc.input + s.Require().NoError(err) + } + + p := s.globalfeeKeeper.GetParams(s.ctx) + s.Require().Equal(expected, p) + }) + } +} diff --git a/x/globalfee/keeper/msg_server.go b/x/globalfee/keeper/msg_server.go index 8d530ac67..71d54ca18 100644 --- a/x/globalfee/keeper/msg_server.go +++ b/x/globalfee/keeper/msg_server.go @@ -3,10 +3,11 @@ package keeper import ( "context" - "github.com/bandprotocol/chain/v2/x/globalfee/types" + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/bandprotocol/chain/v2/x/globalfee/types" ) type msgServer struct { @@ -27,7 +28,7 @@ func (ms msgServer) UpdateParams( req *types.MsgUpdateParams, ) (*types.MsgUpdateParamsResponse, error) { if ms.authority != req.Authority { - return nil, sdkerrors.Wrapf( + return nil, errors.Wrapf( govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, diff --git a/x/globalfee/keeper/msg_server_test.go b/x/globalfee/keeper/msg_server_test.go new file mode 100644 index 000000000..85e5066a6 --- /dev/null +++ b/x/globalfee/keeper/msg_server_test.go @@ -0,0 +1,48 @@ +package keeper_test + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/globalfee/types" +) + +func (s *IntegrationTestSuite) TestUpdateParams() { + testCases := []struct { + name string + request *types.MsgUpdateParams + expectErr bool + }{ + { + name: "set invalid authority", + request: &types.MsgUpdateParams{ + Authority: "foo", + }, + expectErr: true, + }, + { + name: "set full valid params", + request: &types.MsgUpdateParams{ + Authority: s.globalfeeKeeper.GetAuthority(), + Params: types.Params{ + MinimumGasPrices: sdk.NewDecCoins( + sdk.NewDecCoin("ALX", sdk.NewInt(1)), + sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)), + ), + }, + }, + expectErr: false, + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + _, err := s.msgServer.UpdateParams(s.ctx, tc.request) + if tc.expectErr { + s.Require().Error(err) + } else { + s.Require().NoError(err) + } + }) + } +} diff --git a/x/globalfee/module.go b/x/globalfee/module.go index 0a130f8b7..17322a660 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -4,12 +4,12 @@ import ( "context" "encoding/json" + "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/module" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -61,7 +61,7 @@ func (a AppModuleBasic) ValidateGenesis( } if err := data.Params.ValidateBasic(); err != nil { - return sdkerrors.Wrap(err, "params") + return errors.Wrap(err, "params") } return nil diff --git a/x/globalfee/types/genesis.go b/x/globalfee/types/genesis.go index a87d8d989..ef2f44576 100644 --- a/x/globalfee/types/genesis.go +++ b/x/globalfee/types/genesis.go @@ -3,8 +3,8 @@ package types import ( "encoding/json" + "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/codec" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // NewGenesisState - Create a new genesis state @@ -33,7 +33,7 @@ func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMe func ValidateGenesis(data GenesisState) error { if err := data.Params.ValidateBasic(); err != nil { - return sdkerrors.Wrap(err, "globalfee params") + return errors.Wrap(err, "globalfee params") } return nil diff --git a/x/globalfee/types/msgs.go b/x/globalfee/types/msgs.go index a08186ef3..27ecb6f9c 100644 --- a/x/globalfee/types/msgs.go +++ b/x/globalfee/types/msgs.go @@ -1,8 +1,8 @@ package types import ( + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var _ sdk.Msg = &MsgUpdateParams{} @@ -21,7 +21,7 @@ func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress { // ValidateBasic does a sanity check 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 errors.Wrap(err, "invalid authority address") } if err := m.Params.Validate(); err != nil { diff --git a/x/globalfee/types/params.go b/x/globalfee/types/params.go index 403e3c2df..3971e79b5 100644 --- a/x/globalfee/types/params.go +++ b/x/globalfee/types/params.go @@ -1,6 +1,7 @@ package types import ( + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -26,7 +27,7 @@ func (p Params) ValidateBasic() error { func validateMinimumGasPrices(i interface{}) error { v, ok := i.(sdk.DecCoins) if !ok { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "type: %T, expected sdk.DecCoins", i) + return errors.Wrapf(sdkerrors.ErrInvalidType, "type: %T, expected sdk.DecCoins", i) } return v.Validate() From 3f6520ee848247bd2fd9d93c7df56c364ce458d1 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 16:36:01 +0700 Subject: [PATCH 22/44] remove todo --- app/app.go | 1 - 1 file changed, 1 deletion(-) diff --git a/app/app.go b/app/app.go index cbadafadf..ccc254e57 100644 --- a/app/app.go +++ b/app/app.go @@ -530,7 +530,6 @@ func NewBandApp( app.GlobalfeeKeeper = globalfeekeeper.NewKeeper( appCodec, keys[globalfeetypes.StoreKey], - // 0.47 TODO: change to tech council address authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) From e52004bbb98eb3c39dfc236acef04b6ecca7df5b Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 16:41:14 +0700 Subject: [PATCH 23/44] remove unused --- app/ante.go | 14 ++++---------- app/app.go | 9 ++++----- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/app/ante.go b/app/ante.go index 3a082285d..833458883 100644 --- a/app/ante.go +++ b/app/ante.go @@ -4,7 +4,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" @@ -18,11 +17,10 @@ import ( // channel keeper. type HandlerOptions struct { ante.HandlerOptions - OracleKeeper *oraclekeeper.Keeper - IBCKeeper *ibckeeper.Keeper - GlobalFeeSubspace paramtypes.Subspace - StakingKeeper *stakingkeeper.Keeper - GlobalfeeKeeper *globalfeekeeper.Keeper + OracleKeeper *oraclekeeper.Keeper + IBCKeeper *ibckeeper.Keeper + StakingKeeper *stakingkeeper.Keeper + GlobalfeeKeeper *globalfeekeeper.Keeper } func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { @@ -51,10 +49,6 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { } if options.TxFeeChecker == nil { - if options.GlobalFeeSubspace.Name() == "" { - return nil, sdkerrors.Wrap(sdkerrors.ErrNotFound, "globalfee param store is required for AnteHandler") - } - feeChecker := feechecker.NewFeeChecker( options.OracleKeeper, options.GlobalfeeKeeper, diff --git a/app/app.go b/app/app.go index ccc254e57..d103593cb 100644 --- a/app/app.go +++ b/app/app.go @@ -728,11 +728,10 @@ func NewBandApp( FeegrantKeeper: app.FeegrantKeeper, SigGasConsumer: ante.DefaultSigVerificationGasConsumer, }, - OracleKeeper: &app.OracleKeeper, - IBCKeeper: app.IBCKeeper, - GlobalFeeSubspace: app.GetSubspace(globalfeetypes.ModuleName), - StakingKeeper: app.StakingKeeper, - GlobalfeeKeeper: &app.GlobalfeeKeeper, + OracleKeeper: &app.OracleKeeper, + IBCKeeper: app.IBCKeeper, + StakingKeeper: app.StakingKeeper, + GlobalfeeKeeper: &app.GlobalfeeKeeper, }, ) if err != nil { From a1961c474d3641a444abcb0dd23952d0215b8575 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 16:43:01 +0700 Subject: [PATCH 24/44] check error --- app/upgrades/v2_6/upgrades.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/upgrades/v2_6/upgrades.go b/app/upgrades/v2_6/upgrades.go index cf23212af..829195e1e 100644 --- a/app/upgrades/v2_6/upgrades.go +++ b/app/upgrades/v2_6/upgrades.go @@ -30,9 +30,12 @@ func CreateUpgradeHandler( return nil, err } - keepers.GlobalfeeKeeper.SetParams(ctx, globalfeetypes.Params{ + err = keepers.GlobalfeeKeeper.SetParams(ctx, globalfeetypes.Params{ MinimumGasPrices: sdk.DecCoins{sdk.NewDecCoinFromDec("uband", sdk.NewDecWithPrec(25, 4))}, }) + if err != nil { + return nil, err + } return vm, nil } From 4950cf23125ea111d50903eb6de568faa1cb7a6d Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 16:49:48 +0700 Subject: [PATCH 25/44] remove subspace --- app/app.go | 1 - 1 file changed, 1 deletion(-) diff --git a/app/app.go b/app/app.go index d103593cb..f88253c91 100644 --- a/app/app.go +++ b/app/app.go @@ -966,7 +966,6 @@ func initParamsKeeper( paramsKeeper.Subspace(ibctransfertypes.ModuleName) paramsKeeper.Subspace(icahosttypes.SubModuleName) paramsKeeper.Subspace(oracletypes.ModuleName) - paramsKeeper.Subspace(globalfeetypes.ModuleName) return paramsKeeper } From cbe9e471d7f2329f1e572e4529316c255a0d4853 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 16:51:31 +0700 Subject: [PATCH 26/44] adjust module --- x/globalfee/module.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/globalfee/module.go b/x/globalfee/module.go index 17322a660..50cedbfde 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -87,7 +87,10 @@ type AppModule struct { // NewAppModule constructor func NewAppModule(keeper keeper.Keeper) *AppModule { - return &AppModule{keeper: keeper} + return &AppModule{ + AppModuleBasic: AppModuleBasic{}, + keeper: keeper, + } } func (a AppModule) InitGenesis( From afb5c2dc1057178b8b8fd199e223972272183e12 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 16:54:42 +0700 Subject: [PATCH 27/44] remove exported --- x/globalfee/exported/exported.go | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 x/globalfee/exported/exported.go diff --git a/x/globalfee/exported/exported.go b/x/globalfee/exported/exported.go deleted file mode 100644 index 000114e61..000000000 --- a/x/globalfee/exported/exported.go +++ /dev/null @@ -1,18 +0,0 @@ -package exported - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" -) - -type ( - ParamSet = paramtypes.ParamSet - - // Subspace defines an interface that implements the legacy x/params Subspace - // type. - // - // NOTE: This is used solely for migration of x/params managed parameters. - Subspace interface { - GetParamSet(ctx sdk.Context, ps ParamSet) - } -) From e024dbe648f5259fc7a9b54312d1a8a013483c7f Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 17:00:11 +0700 Subject: [PATCH 28/44] remove unused --- x/globalfee/module.go | 2 +- x/globalfee/types/genesis.go | 2 +- x/globalfee/types/params.go | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/x/globalfee/module.go b/x/globalfee/module.go index 50cedbfde..020701537 100644 --- a/x/globalfee/module.go +++ b/x/globalfee/module.go @@ -60,7 +60,7 @@ func (a AppModuleBasic) ValidateGenesis( return err } - if err := data.Params.ValidateBasic(); err != nil { + if err := data.Params.Validate(); err != nil { return errors.Wrap(err, "params") } diff --git a/x/globalfee/types/genesis.go b/x/globalfee/types/genesis.go index ef2f44576..5c749ab79 100644 --- a/x/globalfee/types/genesis.go +++ b/x/globalfee/types/genesis.go @@ -32,7 +32,7 @@ func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMe } func ValidateGenesis(data GenesisState) error { - if err := data.Params.ValidateBasic(); err != nil { + if err := data.Params.Validate(); err != nil { return errors.Wrap(err, "globalfee params") } diff --git a/x/globalfee/types/params.go b/x/globalfee/types/params.go index 3971e79b5..c983c714a 100644 --- a/x/globalfee/types/params.go +++ b/x/globalfee/types/params.go @@ -18,11 +18,6 @@ func DefaultParams() Params { return Params{MinimumGasPrices: sdk.DecCoins{}} } -// ValidateBasic performs basic validation. -func (p Params) ValidateBasic() error { - return validateMinimumGasPrices(p.MinimumGasPrices) -} - // this requires the fee non-negative func validateMinimumGasPrices(i interface{}) error { v, ok := i.(sdk.DecCoins) From 9a8b37449208bcdd592e9d2bead73356ebac2c8b Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 18:01:02 +0700 Subject: [PATCH 29/44] fix error --- x/globalfee/feechecker/feechecker.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index 46a638f04..26b8205be 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -65,12 +65,14 @@ func (fc FeeChecker) CheckTxFeeWithMinGasPrices( // Calculate all fees from all gas prices gas := feeTx.GetGas() - allFees := make(sdk.Coins, len(allGasPrices)) - if !minGasPrices.IsZero() { + var allFees sdk.Coins + if !allGasPrices.IsZero() { glDec := sdk.NewDec(int64(gas)) - for i, gp := range minGasPrices { - fee := gp.Amount.Mul(glDec) - allFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) + for _, gp := range allGasPrices { + if !gp.IsZero() { + fee := gp.Amount.Mul(glDec) + allFees = append(allFees, sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt())) + } } } From dd2aa74520637e1b6260105ade521cc6f29e1c7d Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Wed, 13 Sep 2023 18:11:48 +0700 Subject: [PATCH 30/44] fix --- x/globalfee/feechecker/feechecker.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/x/globalfee/feechecker/feechecker.go b/x/globalfee/feechecker/feechecker.go index 26b8205be..18d7b7bed 100644 --- a/x/globalfee/feechecker/feechecker.go +++ b/x/globalfee/feechecker/feechecker.go @@ -1,10 +1,9 @@ package feechecker import ( - "errors" "math" - cmerrors "cosmossdk.io/errors" + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/authz" @@ -39,7 +38,7 @@ func (fc FeeChecker) CheckTxFeeWithMinGasPrices( ) (sdk.Coins, int64, error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { - return nil, 0, cmerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + return nil, 0, errors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") } feeCoins := feeTx.GetFee() @@ -77,7 +76,7 @@ func (fc FeeChecker) CheckTxFeeWithMinGasPrices( } if !allFees.IsZero() && !feeCoins.IsAnyGTE(allFees) { - return nil, 0, cmerrors.Wrapf( + return nil, 0, errors.Wrapf( sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, @@ -126,7 +125,7 @@ func (fc FeeChecker) GetGlobalMinGasPrices(ctx sdk.Context) (sdk.DecCoins, error func (fc FeeChecker) DefaultZeroGlobalFee(ctx sdk.Context) ([]sdk.DecCoin, error) { bondDenom := fc.GetBondDenom(ctx) if bondDenom == "" { - return nil, errors.New("empty staking bond denomination") + return nil, errors.Wrap(sdkerrors.ErrNotFound, "empty staking bond denomination") } return []sdk.DecCoin{sdk.NewDecCoinFromDec(bondDenom, sdk.NewDec(0))}, nil From 5ca48c305c5096a46554097c0bf99367e307a218 Mon Sep 17 00:00:00 2001 From: colmazia Date: Thu, 14 Sep 2023 14:33:55 +0700 Subject: [PATCH 31/44] fix from comments --- client/grpc/oracle/proof/block_header_merkle_parts.go | 2 +- x/oracle/keeper/msg_server.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/grpc/oracle/proof/block_header_merkle_parts.go b/client/grpc/oracle/proof/block_header_merkle_parts.go index 6f58d2196..63ff7da57 100644 --- a/client/grpc/oracle/proof/block_header_merkle_parts.go +++ b/client/grpc/oracle/proof/block_header_merkle_parts.go @@ -33,7 +33,7 @@ func (bp *BlockHeaderMerkleParts) encodeToEthFormat() BlockHeaderMerklePartsEthe // GetBlockHeaderMerkleParts converts Tendermint block header struct into BlockHeaderMerkleParts for gas-optimized proof verification. func GetBlockHeaderMerkleParts(block *types.Header) BlockHeaderMerkleParts { - // based on https://github.com/cometbft/cometbft/blob/master/types/block.go#L448 + // based on https://github.com/tendermint/tendermint/blob/master/types/block.go#L448 hbz, err := block.Version.Marshal() if err != nil { panic(err) diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index 12f36b688..6f950e0c6 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -291,21 +291,21 @@ func (k msgServer) Activate(goCtx context.Context, msg *types.MsgActivate) (*typ return &types.MsgActivateResponse{}, nil } -func (ms msgServer) UpdateParams( +func (k msgServer) UpdateParams( goCtx context.Context, msg *types.MsgUpdateParams, ) (*types.MsgUpdateParamsResponse, error) { - if ms.authority != msg.Authority { + if k.authority != msg.Authority { return nil, sdkerrors.Wrapf( govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", - ms.authority, + k.authority, msg.Authority, ) } ctx := sdk.UnwrapSDKContext(goCtx) - if err := ms.SetParams(ctx, msg.Params); err != nil { + if err := k.SetParams(ctx, msg.Params); err != nil { return nil, err } From 4888b237c4fa9cb55f7a780c06f323a8262a9986 Mon Sep 17 00:00:00 2001 From: colmazia Date: Thu, 14 Sep 2023 14:41:38 +0700 Subject: [PATCH 32/44] update changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37479bd6c..29a108ee0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## Unreleased -- (bump) Use cosmos-sdk package v0.46.12 / ibc-go v5.2.1 +- (bump) Use cosmos-sdk package v0.47.4 / ibc-go v7.2.0 +- (bump) replace github.com/tendermint/tendermint by github.com/cometbft/cometbft +- (bump) migrated from gogo/protobuf to cosmos/gogoproto - (chain) Remove disablefeeless flag - (chain) Remove old oracle ante - (chain) Remove legacy migrate cmd @@ -12,6 +14,8 @@ - (chain) Set MinimumGasPrice to 0.0025uband - (chain) Update proof to support newly added module - (chain) Migrate REST Endpoint to GRPC +- (chain) update oracle params to support cosmos-sdk 0.47 +- (chain) Add consensus module to handle managing Tendermint consensus parameters ## [v2.5.2](https://github.com/bandprotocol/chain/releases/tag/v2.5.2) From 6eda33c4ecf0dd18c0b602da345a9b432966ddac Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 14 Sep 2023 17:06:28 +0700 Subject: [PATCH 33/44] bump cosmos version --- CHANGELOG.md | 4 ++-- go.mod | 22 ++++++++++++------- go.sum | 60 +++++++++++++++++++++++++++++----------------------- 3 files changed, 50 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b2f2c730..08300d2f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ ## Unreleased -- (bump) Use cosmos-sdk package v0.47.4 / ibc-go v7.2.0 -- (bump) replace github.com/tendermint/tendermint by github.com/cometbft/cometbft +- (bump) Use cosmos-sdk package v0.47.5 / ibc-go v7.2.1 +- (bump) replace github.com/tendermint/tendermint by github.com/cometbft/cometbft v0.37.2 - (bump) migrated from gogo/protobuf to cosmos/gogoproto - (chain) Remove disablefeeless flag - (chain) Remove old oracle ante diff --git a/go.mod b/go.mod index d94044850..e06a569e2 100644 --- a/go.mod +++ b/go.mod @@ -10,10 +10,10 @@ require ( github.com/cometbft/cometbft-db v0.8.0 github.com/confio/ics23/go v0.9.0 github.com/cosmos/cosmos-proto v1.0.0-beta.2 - github.com/cosmos/cosmos-sdk v0.47.4 + github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.10 - github.com/cosmos/ibc-go/v7 v7.2.0 + github.com/cosmos/ibc-go/v7 v7.2.1 github.com/ethereum/go-ethereum v1.10.22 github.com/golang/protobuf v1.5.3 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 @@ -42,9 +42,9 @@ require ( cloud.google.com/go/iam v1.1.0 // indirect cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/log v1.1.1-0.20230704160919-88f2c830b0ca // indirect - cosmossdk.io/math v1.0.1 // indirect + cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/log v1.2.1 // indirect + cosmossdk.io/math v1.1.2 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -61,6 +61,9 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect + github.com/cockroachdb/errors v1.10.0 // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/redact v1.1.5 // indirect github.com/coinbase/rosetta-sdk-go v0.7.9 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect @@ -80,10 +83,10 @@ require ( github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/getsentry/sentry-go v0.23.0 // 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.6.0 // indirect - github.com/go-playground/locales v0.14.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -119,6 +122,8 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.16.3 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.7.16 // indirect @@ -141,8 +146,9 @@ require ( github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.29.1 // indirect + github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -157,7 +163,7 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.12.0 // indirect - golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect golang.org/x/net v0.12.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sys v0.11.0 // indirect diff --git a/go.sum b/go.sum index 692606fa0..f4b621d49 100644 --- a/go.sum +++ b/go.sum @@ -400,14 +400,14 @@ 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/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= +cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= -cosmossdk.io/log v1.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/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= +cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= +cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= +cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -447,7 +447,6 @@ 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= @@ -559,8 +558,13 @@ github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/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/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= +github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= @@ -586,8 +590,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.4 h1:FVUpEprm58nMmBX4xkRdMDaIG5Nr4yy92HZAfGAw9bg= -github.com/cosmos/cosmos-sdk v0.47.4/go.mod h1:R5n+uM7vguVPFap4pgkdvQCT1nVo/OtPwrlAU40rvok= +github.com/cosmos/cosmos-sdk v0.47.5 h1:n1+WjP/VM/gAEOx3TqU2/Ny734rj/MX1kpUnn7zVJP8= +github.com/cosmos/cosmos-sdk v0.47.5/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= 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= @@ -598,8 +602,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.2.1 h1:42Z9NjL6wsTSk1t/o8qmrQtXyQG3EHUC4JFMZeh+jO4= +github.com/cosmos/ibc-go/v7 v7.2.1/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= @@ -613,8 +617,6 @@ github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJF 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= @@ -691,14 +693,17 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= +github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= +github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +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= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -720,11 +725,10 @@ 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 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/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= @@ -735,11 +739,11 @@ 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/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= 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= @@ -1029,6 +1033,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB 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.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 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= @@ -1189,6 +1194,8 @@ github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7c github.com/philhofer/fwd v1.0.0/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/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1240,19 +1247,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/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/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.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/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.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= -github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= +github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1443,8 +1451,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-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= -golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/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= @@ -1473,7 +1481,7 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= From c062dd9ca08c9b1dac43dcabc08f480b88d3832e Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 21 Sep 2023 14:14:31 +0700 Subject: [PATCH 34/44] add condition for ante --- app/ante.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/ante.go b/app/ante.go index 833458883..a95ef6783 100644 --- a/app/ante.go +++ b/app/ante.go @@ -39,6 +39,9 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { if options.IBCKeeper == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "IBC keeper is required for AnteHandler") } + if options.StakingKeeper == nil { + return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "Staking keeper is required for AnteHandler") + } if options.GlobalfeeKeeper == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "Globalfee keeper is required for AnteHandler") } From 17a143553d30c6f37247974119dd0e573d20ae43 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 21 Sep 2023 14:21:39 +0700 Subject: [PATCH 35/44] reorder import --- app/upgrades/v2_6/upgrades.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/upgrades/v2_6/upgrades.go b/app/upgrades/v2_6/upgrades.go index 829195e1e..ab4c90aaa 100644 --- a/app/upgrades/v2_6/upgrades.go +++ b/app/upgrades/v2_6/upgrades.go @@ -1,14 +1,14 @@ package v2_6 import ( - "github.com/bandprotocol/chain/v2/app/keepers" - "github.com/bandprotocol/chain/v2/app/upgrades" - globalfeetypes "github.com/bandprotocol/chain/v2/x/globalfee/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" + "github.com/bandprotocol/chain/v2/app/keepers" + "github.com/bandprotocol/chain/v2/app/upgrades" + globalfeetypes "github.com/bandprotocol/chain/v2/x/globalfee/types" ) func CreateUpgradeHandler( From 5f0b42201a58af27b1d8d4d4c5a470e6a4491e18 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 21 Sep 2023 14:23:25 +0700 Subject: [PATCH 36/44] fix alias --- x/globalfee/client/cli/query.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/x/globalfee/client/cli/query.go b/x/globalfee/client/cli/query.go index 63d57ceef..bc73f4e3d 100644 --- a/x/globalfee/client/cli/query.go +++ b/x/globalfee/client/cli/query.go @@ -24,11 +24,10 @@ func GetQueryCmd() *cobra.Command { func GetQueryCmdParams() *cobra.Command { cmd := &cobra.Command{ - Use: "params", - Short: "Show params", - Long: "Show parameter of globalfee module", - Aliases: []string{"min"}, - Args: cobra.ExactArgs(0), + Use: "params", + Short: "Show params", + Long: "Show parameter of globalfee module", + Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { From c5d214b7535289ca972bcf44cf185d1214e3cf3f Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Thu, 21 Sep 2023 14:49:01 +0700 Subject: [PATCH 37/44] adjust import order --- app/keepers/keepers.go | 2 +- app/upgrades/types.go | 3 ++- app/upgrades/v2_4/constants.go | 3 ++- app/upgrades/v2_4/upgrades.go | 10 +++++----- app/upgrades/v2_5/constants.go | 3 ++- app/upgrades/v2_5/upgrades.go | 8 ++++---- benchmark/bench_test.go | 5 +++-- benchmark/helper_test.go | 7 ++++--- client/grpc/oracle/proof/proof_test.go | 3 ++- client/grpc/oracle/proof/service.go | 5 +++-- client/grpc/oracle/proof/util.go | 2 +- cmd/bandd/cmd/gends.go | 1 - cmd/bandd/cmd/genos.go | 3 +-- testing/testapp/setup.go | 16 +++++++--------- x/bank/module.go | 3 ++- x/oracle/handler_test.go | 3 +-- x/oracle/ibc_module.go | 7 +++---- x/oracle/ibc_test.go | 1 - x/oracle/keeper/keeper.go | 3 +-- x/oracle/keeper/migrator.go | 3 ++- x/oracle/keeper/owasm.go | 1 - x/oracle/keeper/owasm_test.go | 1 - x/oracle/keeper/snapshotter_integration_test.go | 5 +++-- x/oracle/migrations/v2/migrate.go | 5 +++-- x/oracle/migrations/v2/migrator_test.go | 6 +++--- yoda/run.go | 1 - 26 files changed, 55 insertions(+), 55 deletions(-) diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 5f48bf8c4..c4b74b829 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -1,7 +1,6 @@ package keepers import ( - globalfeekeeper "github.com/bandprotocol/chain/v2/x/globalfee/keeper" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" @@ -22,6 +21,7 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" bandbankkeeper "github.com/bandprotocol/chain/v2/x/bank/keeper" + globalfeekeeper "github.com/bandprotocol/chain/v2/x/globalfee/keeper" oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" ) diff --git a/app/upgrades/types.go b/app/upgrades/types.go index db32db7a7..034731f23 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -1,13 +1,14 @@ package upgrades import ( - "github.com/bandprotocol/chain/v2/app/keepers" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" store "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/bandprotocol/chain/v2/app/keepers" ) // Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal diff --git a/app/upgrades/v2_4/constants.go b/app/upgrades/v2_4/constants.go index 620294e58..e811ccb6a 100644 --- a/app/upgrades/v2_4/constants.go +++ b/app/upgrades/v2_4/constants.go @@ -1,9 +1,10 @@ package v2_4 import ( - "github.com/bandprotocol/chain/v2/app/upgrades" storetypes "github.com/cosmos/cosmos-sdk/store/types" icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + + "github.com/bandprotocol/chain/v2/app/upgrades" ) const UpgradeName = "v2_4" diff --git a/app/upgrades/v2_4/upgrades.go b/app/upgrades/v2_4/upgrades.go index f5ee338cb..be937898e 100644 --- a/app/upgrades/v2_4/upgrades.go +++ b/app/upgrades/v2_4/upgrades.go @@ -1,9 +1,8 @@ package v2_4 import ( - "github.com/bandprotocol/chain/v2/app/keepers" - "github.com/bandprotocol/chain/v2/app/upgrades" - oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -18,8 +17,9 @@ import ( icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" + "github.com/bandprotocol/chain/v2/app/keepers" + "github.com/bandprotocol/chain/v2/app/upgrades" + oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" ) func CreateUpgradeHandler( diff --git a/app/upgrades/v2_5/constants.go b/app/upgrades/v2_5/constants.go index 3d298c4bb..76038188e 100644 --- a/app/upgrades/v2_5/constants.go +++ b/app/upgrades/v2_5/constants.go @@ -1,8 +1,9 @@ package v2_5 import ( - "github.com/bandprotocol/chain/v2/app/upgrades" storetypes "github.com/cosmos/cosmos-sdk/store/types" + + "github.com/bandprotocol/chain/v2/app/upgrades" ) const UpgradeName = "v2_5" diff --git a/app/upgrades/v2_5/upgrades.go b/app/upgrades/v2_5/upgrades.go index 0878755cf..fb85bc65c 100644 --- a/app/upgrades/v2_5/upgrades.go +++ b/app/upgrades/v2_5/upgrades.go @@ -1,12 +1,12 @@ package v2_5 import ( - "github.com/bandprotocol/chain/v2/app/keepers" - "github.com/bandprotocol/chain/v2/app/upgrades" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/bandprotocol/chain/v2/app/keepers" + "github.com/bandprotocol/chain/v2/app/upgrades" ) func CreateUpgradeHandler( diff --git a/benchmark/bench_test.go b/benchmark/bench_test.go index 882a0aa94..6dbb2e8ce 100644 --- a/benchmark/bench_test.go +++ b/benchmark/bench_test.go @@ -6,10 +6,11 @@ import ( "testing" "time" - oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" - oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" + + oraclekeeper "github.com/bandprotocol/chain/v2/x/oracle/keeper" + oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" ) var PrepareCases = map[string]struct { diff --git a/benchmark/helper_test.go b/benchmark/helper_test.go index 8b74a042b..7a8eadd3d 100644 --- a/benchmark/helper_test.go +++ b/benchmark/helper_test.go @@ -8,9 +8,6 @@ import ( "testing" "time" - "github.com/bandprotocol/chain/v2/pkg/obi" - "github.com/bandprotocol/chain/v2/testing/testapp" - oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" owasm "github.com/bandprotocol/go-owasm/api" types "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -19,6 +16,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/pkg/obi" + "github.com/bandprotocol/chain/v2/testing/testapp" + oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" ) type Account struct { diff --git a/client/grpc/oracle/proof/proof_test.go b/client/grpc/oracle/proof/proof_test.go index e90c7e4df..e325c77c5 100644 --- a/client/grpc/oracle/proof/proof_test.go +++ b/client/grpc/oracle/proof/proof_test.go @@ -4,9 +4,10 @@ import ( "encoding/hex" "testing" - oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" "github.com/cometbft/cometbft/crypto/tmhash" "github.com/stretchr/testify/require" + + oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" ) func hexToBytes(hexstr string) []byte { diff --git a/client/grpc/oracle/proof/service.go b/client/grpc/oracle/proof/service.go index c37b56684..758ae8fa6 100644 --- a/client/grpc/oracle/proof/service.go +++ b/client/grpc/oracle/proof/service.go @@ -6,13 +6,14 @@ import ( "encoding/json" "fmt" - "github.com/bandprotocol/chain/v2/x/oracle/types" - oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" rpcclient "github.com/cometbft/cometbft/rpc/client" "github.com/cosmos/cosmos-sdk/client" gogogrpc "github.com/cosmos/gogoproto/grpc" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/grpc-ecosystem/grpc-gateway/runtime" + + "github.com/bandprotocol/chain/v2/x/oracle/types" + oracletypes "github.com/bandprotocol/chain/v2/x/oracle/types" ) // RegisterProofService registers the node gRPC service on the provided gRPC router. diff --git a/client/grpc/oracle/proof/util.go b/client/grpc/oracle/proof/util.go index 1a3766719..842ce86fb 100644 --- a/client/grpc/oracle/proof/util.go +++ b/client/grpc/oracle/proof/util.go @@ -11,7 +11,7 @@ import ( gogotypes "github.com/cosmos/gogoproto/types" ) -// Copied from https://github.com/cometbft/cometbft/blob/master/types/encoding_helper.go +// Copied from https://github.com/cometbft/cometbft/blob/v0.37.2/types/encoding_helper.go func cdcEncode(item interface{}) []byte { if item != nil && !isTypedNil(item) && !isEmpty(item) { switch item := item.(type) { diff --git a/cmd/bandd/cmd/gends.go b/cmd/bandd/cmd/gends.go index 05254b836..90f1092e6 100644 --- a/cmd/bandd/cmd/gends.go +++ b/cmd/bandd/cmd/gends.go @@ -15,7 +15,6 @@ import ( "github.com/spf13/cobra" "github.com/bandprotocol/chain/v2/pkg/filecache" - "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/cmd/bandd/cmd/genos.go b/cmd/bandd/cmd/genos.go index ca8a4b480..3c8bb9063 100644 --- a/cmd/bandd/cmd/genos.go +++ b/cmd/bandd/cmd/genos.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "path/filepath" + "github.com/bandprotocol/go-owasm/api" "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/server" @@ -15,8 +16,6 @@ import ( "github.com/spf13/cobra" "github.com/bandprotocol/chain/v2/pkg/filecache" - "github.com/bandprotocol/go-owasm/api" - "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/testing/testapp/setup.go b/testing/testapp/setup.go index 9811dd0db..2573333a3 100644 --- a/testing/testapp/setup.go +++ b/testing/testapp/setup.go @@ -10,6 +10,12 @@ import ( "testing" "time" + owasm "github.com/bandprotocol/go-owasm/api" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -31,19 +37,11 @@ import ( 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" - - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - tmtypes "github.com/cometbft/cometbft/types" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" "github.com/stretchr/testify/require" - "github.com/bandprotocol/chain/v2/pkg/filecache" - owasm "github.com/bandprotocol/go-owasm/api" - bandapp "github.com/bandprotocol/chain/v2/app" + "github.com/bandprotocol/chain/v2/pkg/filecache" "github.com/bandprotocol/chain/v2/x/oracle/keeper" "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/x/bank/module.go b/x/bank/module.go index c31395629..acba565ce 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -3,13 +3,14 @@ package bank import ( "fmt" - "github.com/bandprotocol/chain/v2/x/bank/keeper" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/bank" "github.com/cosmos/cosmos-sdk/x/bank/exported" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/cosmos/cosmos-sdk/x/bank/types" + + "github.com/bandprotocol/chain/v2/x/bank/keeper" ) var ( diff --git a/x/oracle/handler_test.go b/x/oracle/handler_test.go index 8009d5a8d..c2af4f582 100644 --- a/x/oracle/handler_test.go +++ b/x/oracle/handler_test.go @@ -10,13 +10,12 @@ import ( "testing" "time" + "github.com/bandprotocol/go-owasm/api" abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/require" - "github.com/bandprotocol/go-owasm/api" - "github.com/bandprotocol/chain/v2/testing/testapp" "github.com/bandprotocol/chain/v2/x/oracle" "github.com/bandprotocol/chain/v2/x/oracle/types" diff --git a/x/oracle/ibc_module.go b/x/oracle/ibc_module.go index 03a8c3ea9..a5a0f5fba 100644 --- a/x/oracle/ibc_module.go +++ b/x/oracle/ibc_module.go @@ -5,17 +5,16 @@ import ( "math" "strings" - "github.com/bandprotocol/chain/v2/x/oracle/keeper" - "github.com/bandprotocol/chain/v2/x/oracle/types" - sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + + "github.com/bandprotocol/chain/v2/x/oracle/keeper" + "github.com/bandprotocol/chain/v2/x/oracle/types" ) // IBCModule implements the ICS26 interface for oracle given the oracle keeper. diff --git a/x/oracle/ibc_test.go b/x/oracle/ibc_test.go index d31f212f2..90c0b8a59 100644 --- a/x/oracle/ibc_test.go +++ b/x/oracle/ibc_test.go @@ -12,7 +12,6 @@ import ( "github.com/stretchr/testify/suite" "github.com/bandprotocol/chain/v2/pkg/obi" - ibctesting "github.com/bandprotocol/chain/v2/testing" "github.com/bandprotocol/chain/v2/testing/testapp" "github.com/bandprotocol/chain/v2/x/oracle/types" diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 1684a4b4b..de7486e08 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -5,6 +5,7 @@ import ( "fmt" "time" + owasm "github.com/bandprotocol/go-owasm/api" "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -14,8 +15,6 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" host "github.com/cosmos/ibc-go/v7/modules/core/24-host" - owasm "github.com/bandprotocol/go-owasm/api" - "github.com/bandprotocol/chain/v2/pkg/filecache" "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/x/oracle/keeper/migrator.go b/x/oracle/keeper/migrator.go index 66176e6b4..d04022e1a 100644 --- a/x/oracle/keeper/migrator.go +++ b/x/oracle/keeper/migrator.go @@ -1,9 +1,10 @@ package keeper import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/bandprotocol/chain/v2/x/oracle/exported" v2 "github.com/bandprotocol/chain/v2/x/oracle/migrations/v2" - sdk "github.com/cosmos/cosmos-sdk/types" ) // Migrator is a struct for handling in-place state migrations. diff --git a/x/oracle/keeper/owasm.go b/x/oracle/keeper/owasm.go index cbf621898..0cd595011 100644 --- a/x/oracle/keeper/owasm.go +++ b/x/oracle/keeper/owasm.go @@ -9,7 +9,6 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/bandprotocol/chain/v2/pkg/bandrng" - "github.com/bandprotocol/chain/v2/x/oracle/types" ) diff --git a/x/oracle/keeper/owasm_test.go b/x/oracle/keeper/owasm_test.go index 841aeef18..94c43d877 100644 --- a/x/oracle/keeper/owasm_test.go +++ b/x/oracle/keeper/owasm_test.go @@ -13,7 +13,6 @@ import ( "github.com/stretchr/testify/require" "github.com/bandprotocol/chain/v2/pkg/obi" - "github.com/bandprotocol/chain/v2/testing/testapp" "github.com/bandprotocol/chain/v2/x/oracle/keeper" "github.com/bandprotocol/chain/v2/x/oracle/types" diff --git a/x/oracle/keeper/snapshotter_integration_test.go b/x/oracle/keeper/snapshotter_integration_test.go index 16019930c..a7d55d6ed 100644 --- a/x/oracle/keeper/snapshotter_integration_test.go +++ b/x/oracle/keeper/snapshotter_integration_test.go @@ -3,12 +3,13 @@ package keeper_test import ( "testing" - "github.com/bandprotocol/chain/v2/testing/testapp" - "github.com/bandprotocol/chain/v2/x/oracle/keeper" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/bandprotocol/chain/v2/testing/testapp" + "github.com/bandprotocol/chain/v2/x/oracle/keeper" ) func TestSnapshotter(t *testing.T) { diff --git a/x/oracle/migrations/v2/migrate.go b/x/oracle/migrations/v2/migrate.go index d567f6d90..c6a788c64 100644 --- a/x/oracle/migrations/v2/migrate.go +++ b/x/oracle/migrations/v2/migrate.go @@ -1,10 +1,11 @@ package v2 import ( - "github.com/bandprotocol/chain/v2/x/oracle/exported" - "github.com/bandprotocol/chain/v2/x/oracle/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/bandprotocol/chain/v2/x/oracle/exported" + "github.com/bandprotocol/chain/v2/x/oracle/types" ) const ( diff --git a/x/oracle/migrations/v2/migrator_test.go b/x/oracle/migrations/v2/migrator_test.go index d029ff35d..288a06510 100644 --- a/x/oracle/migrations/v2/migrator_test.go +++ b/x/oracle/migrations/v2/migrator_test.go @@ -3,15 +3,15 @@ package v2_test import ( "testing" + "github.com/cosmos/cosmos-sdk/testutil" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/stretchr/testify/require" "github.com/bandprotocol/chain/v2/x/oracle" "github.com/bandprotocol/chain/v2/x/oracle/exported" v2 "github.com/bandprotocol/chain/v2/x/oracle/migrations/v2" "github.com/bandprotocol/chain/v2/x/oracle/types" - "github.com/cosmos/cosmos-sdk/testutil" - sdk "github.com/cosmos/cosmos-sdk/types" - moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" ) type mockSubspace struct { diff --git a/yoda/run.go b/yoda/run.go index 20bdcd348..cdf8f5133 100644 --- a/yoda/run.go +++ b/yoda/run.go @@ -15,7 +15,6 @@ import ( "github.com/spf13/viper" "github.com/bandprotocol/chain/v2/pkg/filecache" - "github.com/bandprotocol/chain/v2/x/oracle/types" "github.com/bandprotocol/chain/v2/yoda/executor" ) From 275bc41154c1b3ba184633aa89ddaa8091c6cecd Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Mon, 25 Sep 2023 11:15:22 +0700 Subject: [PATCH 38/44] add more test cases for globalfee --- x/globalfee/keeper/keeper_test.go | 73 ++++++++++++++++++++-- x/globalfee/keeper/msg_server_test.go | 88 +++++++++++++++++++++++++-- 2 files changed, 150 insertions(+), 11 deletions(-) diff --git a/x/globalfee/keeper/keeper_test.go b/x/globalfee/keeper/keeper_test.go index 91a0e2402..dd6f3b437 100644 --- a/x/globalfee/keeper/keeper_test.go +++ b/x/globalfee/keeper/keeper_test.go @@ -53,7 +53,7 @@ func (s *IntegrationTestSuite) TestParams() { testCases := []struct { name string input types.Params - expectErr bool + expectErr string }{ { name: "set full valid params", @@ -63,18 +63,79 @@ func (s *IntegrationTestSuite) TestParams() { sdk.NewDecCoinFromDec("BLX", sdk.NewDecWithPrec(1, 3)), ), }, - expectErr: false, + expectErr: "", + }, + { + name: "set empty coin", + input: types.Params{ + MinimumGasPrices: sdk.DecCoins(nil), + }, + expectErr: "", + }, + { + name: "set invalid denom", + input: types.Params{ + MinimumGasPrices: []sdk.DecCoin{ + { + Denom: "1AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(1)), + }, + }, + }, + expectErr: "invalid denom", + }, + { + name: "set negative value", + input: types.Params{ + MinimumGasPrices: []sdk.DecCoin{ + { + Denom: "AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(-1)), + }, + }, + }, + expectErr: "is not positive", + }, + { + name: "set duplicated denom", + input: types.Params{ + MinimumGasPrices: []sdk.DecCoin{ + { + Denom: "AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(1)), + }, + { + Denom: "AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(2)), + }, + }, + }, + expectErr: "duplicate denomination", + }, + { + name: "set unsorted denom", + input: types.Params{ + MinimumGasPrices: []sdk.DecCoin{ + { + Denom: "BBBB", + Amount: sdk.NewDecFromInt(sdk.NewInt(1)), + }, + { + Denom: "AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(2)), + }, + }, + }, + expectErr: "is not sorted", }, } for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { expected := s.globalfeeKeeper.GetParams(s.ctx) err := s.globalfeeKeeper.SetParams(s.ctx, tc.input) - if tc.expectErr { - s.Require().Error(err) + if tc.expectErr != "" { + s.Require().ErrorContains(err, tc.expectErr) } else { expected = tc.input s.Require().NoError(err) diff --git a/x/globalfee/keeper/msg_server_test.go b/x/globalfee/keeper/msg_server_test.go index 85e5066a6..4042b88e2 100644 --- a/x/globalfee/keeper/msg_server_test.go +++ b/x/globalfee/keeper/msg_server_test.go @@ -10,14 +10,14 @@ func (s *IntegrationTestSuite) TestUpdateParams() { testCases := []struct { name string request *types.MsgUpdateParams - expectErr bool + expectErr string }{ { name: "set invalid authority", request: &types.MsgUpdateParams{ Authority: "foo", }, - expectErr: true, + expectErr: "invalid authority", }, { name: "set full valid params", @@ -30,7 +30,85 @@ func (s *IntegrationTestSuite) TestUpdateParams() { ), }, }, - expectErr: false, + expectErr: "", + }, + { + name: "set empty coin", + request: &types.MsgUpdateParams{ + Authority: s.globalfeeKeeper.GetAuthority(), + Params: types.Params{ + MinimumGasPrices: sdk.DecCoins(nil), + }, + }, + expectErr: "", + }, + { + name: "set invalid denom", + request: &types.MsgUpdateParams{ + Authority: s.globalfeeKeeper.GetAuthority(), + Params: types.Params{ + MinimumGasPrices: []sdk.DecCoin{ + { + Denom: "1AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(1)), + }, + }, + }, + }, + expectErr: "invalid denom", + }, + { + name: "set negative value", + request: &types.MsgUpdateParams{ + Authority: s.globalfeeKeeper.GetAuthority(), + Params: types.Params{ + MinimumGasPrices: []sdk.DecCoin{ + { + Denom: "AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(-1)), + }, + }, + }, + }, + expectErr: "is not positive", + }, + { + name: "set duplicated denom", + request: &types.MsgUpdateParams{ + Authority: s.globalfeeKeeper.GetAuthority(), + Params: types.Params{ + MinimumGasPrices: []sdk.DecCoin{ + { + Denom: "AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(1)), + }, + { + Denom: "AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(2)), + }, + }, + }, + }, + expectErr: "duplicate denomination", + }, + { + name: "set unsorted denom", + request: &types.MsgUpdateParams{ + Authority: s.globalfeeKeeper.GetAuthority(), + Params: types.Params{ + MinimumGasPrices: []sdk.DecCoin{ + { + Denom: "BBBB", + Amount: sdk.NewDecFromInt(sdk.NewInt(1)), + }, + { + Denom: "AAAA", + Amount: sdk.NewDecFromInt(sdk.NewInt(2)), + }, + }, + }, + }, + expectErr: "is not sorted", }, } @@ -38,8 +116,8 @@ func (s *IntegrationTestSuite) TestUpdateParams() { tc := tc s.Run(tc.name, func() { _, err := s.msgServer.UpdateParams(s.ctx, tc.request) - if tc.expectErr { - s.Require().Error(err) + if tc.expectErr != "" { + s.Require().ErrorContains(err, tc.expectErr) } else { s.Require().NoError(err) } From a8df141953e146ecd12fd0a67912b678cbd09514 Mon Sep 17 00:00:00 2001 From: Kitipong Sirirueangsakul Date: Tue, 3 Oct 2023 13:14:44 +0700 Subject: [PATCH 39/44] add route, type for update params in globalfee --- x/globalfee/types/keys.go | 4 ++++ x/globalfee/types/msgs.go | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/x/globalfee/types/keys.go b/x/globalfee/types/keys.go index f79244713..012e31211 100644 --- a/x/globalfee/types/keys.go +++ b/x/globalfee/types/keys.go @@ -4,10 +4,14 @@ const ( // ModuleName is the name of the this module ModuleName = "globalfee" + // QuerierRoute is the querier route for the globalfee module QuerierRoute = ModuleName // StoreKey to be used when creating the KVStore. StoreKey = ModuleName + + // RouterKey is the msg router key for the globalfee module + RouterKey = ModuleName ) var ( diff --git a/x/globalfee/types/msgs.go b/x/globalfee/types/msgs.go index 27ecb6f9c..d9e5fa964 100644 --- a/x/globalfee/types/msgs.go +++ b/x/globalfee/types/msgs.go @@ -5,8 +5,18 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +const ( + TypeMsgUpdateParams = "update_params" +) + var _ sdk.Msg = &MsgUpdateParams{} +// Route returns the route of MsgUpdateParams - "oracle" (sdk.Msg interface). +func (m MsgUpdateParams) Route() string { return RouterKey } + +// Type returns the message type of MsgUpdateParams (sdk.Msg interface). +func (m MsgUpdateParams) Type() string { return TypeMsgUpdateParams } + // GetSignBytes implements the LegacyMsg interface. func (m MsgUpdateParams) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) From 0904069def5aa390b8de4f33e8057b9051a8b3bf Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 4 Oct 2023 14:17:23 +0700 Subject: [PATCH 40/44] add consensus in upgrade --- app/upgrades/v2_6/constants.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/upgrades/v2_6/constants.go b/app/upgrades/v2_6/constants.go index fac25fab8..08421a651 100644 --- a/app/upgrades/v2_6/constants.go +++ b/app/upgrades/v2_6/constants.go @@ -6,6 +6,7 @@ import ( vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/feegrant" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -24,7 +25,7 @@ var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: CreateUpgradeHandler, StoreUpgrades: storetypes.StoreUpgrades{ - Added: []string{group.StoreKey, globalfeetypes.StoreKey}, + Added: []string{group.StoreKey, globalfeetypes.StoreKey, consensusparamtypes.StoreKey}, }, } From a45e6cb3c3168bacff49a5c0c8edda6a0692591c Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 4 Oct 2023 14:30:37 +0700 Subject: [PATCH 41/44] add crisis store in upgrade --- app/upgrades/v2_6/constants.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/upgrades/v2_6/constants.go b/app/upgrades/v2_6/constants.go index 08421a651..9a5da3d81 100644 --- a/app/upgrades/v2_6/constants.go +++ b/app/upgrades/v2_6/constants.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/cosmos/cosmos-sdk/x/feegrant" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -25,7 +26,7 @@ var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: CreateUpgradeHandler, StoreUpgrades: storetypes.StoreUpgrades{ - Added: []string{group.StoreKey, globalfeetypes.StoreKey, consensusparamtypes.StoreKey}, + Added: []string{group.StoreKey, globalfeetypes.StoreKey, consensusparamtypes.StoreKey, crisistypes.StoreKey}, }, } From 8fc14e9b9e5bec4d0b4013b2bc1ef5527af6537e Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 4 Oct 2023 14:51:16 +0700 Subject: [PATCH 42/44] add bank migration 3 to 4 --- x/bank/module.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x/bank/module.go b/x/bank/module.go index acba565ce..3807326ef 100644 --- a/x/bank/module.go +++ b/x/bank/module.go @@ -63,4 +63,8 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err := cfg.RegisterMigration(types.ModuleName, 2, m.Migrate2to3); err != nil { panic(fmt.Sprintf("failed to migrate x/bank from version 2 to 3: %v", err)) } + + if err := cfg.RegisterMigration(types.ModuleName, 3, m.Migrate3to4); err != nil { + panic(fmt.Sprintf("failed to migrate x/bank from version 3 to 4: %v", err)) + } } From ceae46d20f2742d22d1a7f133bd3e68f10b8109e Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 4 Oct 2023 16:25:31 +0700 Subject: [PATCH 43/44] add param subspace --- app/upgrades/v2_6/upgrades.go | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/app/upgrades/v2_6/upgrades.go b/app/upgrades/v2_6/upgrades.go index ab4c90aaa..61cd319c8 100644 --- a/app/upgrades/v2_6/upgrades.go +++ b/app/upgrades/v2_6/upgrades.go @@ -1,10 +1,22 @@ package v2_6 import ( + oracletypes "github.com/bandprotocol/chain/v2/x/oracle/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" + crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types" + ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/bandprotocol/chain/v2/app/keepers" "github.com/bandprotocol/chain/v2/app/upgrades" @@ -18,6 +30,44 @@ func CreateUpgradeHandler( keepers *keepers.AppKeepers, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + // Set param key table for params module migration + for _, subspace := range keepers.ParamsKeeper.GetSubspaces() { + subspace := subspace + + var keyTable paramstypes.KeyTable + switch subspace.Name() { + case authtypes.ModuleName: + keyTable = authtypes.ParamKeyTable() //nolint:staticcheck + case banktypes.ModuleName: + keyTable = banktypes.ParamKeyTable() //nolint:staticcheck + case stakingtypes.ModuleName: + keyTable = stakingtypes.ParamKeyTable() //nolint:staticcheck + case minttypes.ModuleName: + keyTable = minttypes.ParamKeyTable() //nolint:staticcheck + case distrtypes.ModuleName: + keyTable = distrtypes.ParamKeyTable() //nolint:staticcheck + case slashingtypes.ModuleName: + keyTable = slashingtypes.ParamKeyTable() //nolint:staticcheck + case govtypes.ModuleName: + keyTable = govv1.ParamKeyTable() //nolint:staticcheck + case crisistypes.ModuleName: + keyTable = crisistypes.ParamKeyTable() //nolint:staticcheck + // ibc types + case ibctransfertypes.ModuleName: + keyTable = ibctransfertypes.ParamKeyTable() //nolint:staticcheck + case icahosttypes.SubModuleName: + keyTable = icahosttypes.ParamKeyTable() //nolint:staticcheck + case oracletypes.ModuleName: + keyTable = oracletypes.ParamKeyTable() //nolint:staticcheck + default: + continue + } + + if !subspace.HasKeyTable() { + subspace.WithKeyTable(keyTable) + } + } + hostParams := icahosttypes.Params{ HostEnabled: true, // specifying the whole list instead of adding and removing. Less fragile. From f503e9758c39ef4b2dfb38d07dc165d1ec90f77b Mon Sep 17 00:00:00 2001 From: colmazia Date: Wed, 4 Oct 2023 17:22:43 +0700 Subject: [PATCH 44/44] fix from comments --- x/oracle/keeper/owasm.go | 22 ++++++++++++---------- x/oracle/types/expected_keepers.go | 3 --- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/x/oracle/keeper/owasm.go b/x/oracle/keeper/owasm.go index 0cd595011..a853c1c2b 100644 --- a/x/oracle/keeper/owasm.go +++ b/x/oracle/keeper/owasm.go @@ -21,10 +21,11 @@ func ConvertToOwasmGas(cosmos uint64) uint64 { // GetSpanSize return maximum value between MaxReportDataSize and MaxCallDataSize func (k Keeper) GetSpanSize(ctx sdk.Context) uint64 { - if k.GetParams(ctx).MaxReportDataSize > k.GetParams(ctx).MaxCalldataSize { - return k.GetParams(ctx).MaxReportDataSize + params := k.GetParams(ctx) + if params.MaxReportDataSize > params.MaxCalldataSize { + return params.MaxReportDataSize } - return k.GetParams(ctx).MaxCalldataSize + return params.MaxCalldataSize } // GetRandomValidators returns a pseudorandom subset of active validators. Each validator has @@ -71,12 +72,13 @@ func (k Keeper) PrepareRequest( } askCount := r.GetAskCount() - if askCount > k.GetParams(ctx).MaxAskCount { - return 0, types.WrapMaxError(types.ErrInvalidAskCount, int(askCount), int(k.GetParams(ctx).MaxAskCount)) + params := k.GetParams(ctx) + if askCount > params.MaxAskCount { + return 0, types.WrapMaxError(types.ErrInvalidAskCount, int(askCount), int(params.MaxAskCount)) } // Consume gas for data requests. - ctx.GasMeter().ConsumeGas(askCount*k.GetParams(ctx).PerValidatorRequestGas, "PER_VALIDATOR_REQUEST_FEE") + ctx.GasMeter().ConsumeGas(askCount*params.PerValidatorRequestGas, "PER_VALIDATOR_REQUEST_FEE") // Get a random validator set to perform this request. validators, err := k.GetRandomValidators(ctx, int(askCount), k.GetRequestCount(ctx)+1) @@ -93,8 +95,8 @@ func (k Keeper) PrepareRequest( // Create an execution environment and call Owasm prepare function. env := types.NewPrepareEnv( req, - int64(k.GetParams(ctx).MaxCalldataSize), - int64(k.GetParams(ctx).MaxRawRequestCount), + int64(params.MaxCalldataSize), + int64(params.MaxRawRequestCount), int64(k.GetSpanSize(ctx)), ) script, err := k.GetOracleScript(ctx, req.OracleScriptID) @@ -103,7 +105,7 @@ func (k Keeper) PrepareRequest( } // Consume fee and execute owasm code - ctx.GasMeter().ConsumeGas(k.GetParams(ctx).BaseOwasmGas, "BASE_OWASM_FEE") + ctx.GasMeter().ConsumeGas(params.BaseOwasmGas, "BASE_OWASM_FEE") ctx.GasMeter().ConsumeGas(r.GetPrepareGas(), "OWASM_PREPARE_FEE") code := k.GetFile(script.Filename) output, err := k.owasmVM.Prepare(code, ConvertToOwasmGas(r.GetPrepareGas()), env) @@ -142,7 +144,7 @@ func (k Keeper) PrepareRequest( ctx.EventManager().EmitEvent(event) // Subtract execute fee - ctx.GasMeter().ConsumeGas(k.GetParams(ctx).BaseOwasmGas, "BASE_OWASM_FEE") + ctx.GasMeter().ConsumeGas(params.BaseOwasmGas, "BASE_OWASM_FEE") ctx.GasMeter().ConsumeGas(r.GetExecuteGas(), "OWASM_EXECUTE_FEE") // Emit an event for each of the raw data requests. diff --git a/x/oracle/types/expected_keepers.go b/x/oracle/types/expected_keepers.go index b3e5a10fc..a78335cf9 100644 --- a/x/oracle/types/expected_keepers.go +++ b/x/oracle/types/expected_keepers.go @@ -11,7 +11,6 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" - ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ) // AccountKeeper defines the expected account keeper. @@ -47,8 +46,6 @@ type DistrKeeper interface { // ChannelKeeper defines the expected IBC channel keeper type ChannelKeeper interface { - GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel ibcchanneltypes.Channel, found bool) - GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) SendPacket( ctx sdk.Context, chanCap *capabilitytypes.Capability,