diff --git a/Makefile b/Makefile index b850b2d6..fd793228 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ endif PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') LEDGER_ENABLED ?= true SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') -TM_VERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::') # grab everything after the space in "github.com/tendermint/tendermint v0.34.7" +TM_VERSION := $(shell go list -m github.com/cometbft/cometbft | sed 's:.* ::') # grab everything after the space in "github.com/cometbft/cometbft v0.37.2" DOCKER := $(shell which docker) BUILDDIR ?= $(CURDIR)/build @@ -68,7 +68,7 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=fairyring \ -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \ - -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TM_VERSION) + -X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TM_VERSION) ifeq (cleveldb,$(findstring cleveldb,$(FR_BUILD_OPTIONS))) ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb @@ -170,6 +170,16 @@ sync-docs: ### Integration Tests ### ############################################################################### +clear-pipes: + @echo "Clearing named pipes..."; \ + rm /tmp/testfairyringsubmit_tx*; \ + rm /tmp/testfairyringnormaltx*; + +test-block-tx-limit: init-test-block-limit-framework \ + test-tx-limit + -@rm -rf ./data + -@killall fairyringd 2>/dev/null + integration-test-all: init-test-framework \ init-relayer \ test-keyshare-module \ @@ -177,6 +187,10 @@ integration-test-all: init-test-framework \ -@rm -rf ./data -@killall fairyringd 2>/dev/null +test-tx-limit: + @echo "Testing Block tx limit..." + ./scripts/tests/blockTxLimit.sh + test-keyshare-module: @echo "Testing KeyShare module..." ./scripts/tests/keyshare.sh @@ -190,6 +204,11 @@ init-relayer: ./scripts/tests/relayer.sh @sleep 2 +init-test-block-limit-framework: clean-testing-data install + @echo "Initializing fairyring..." + ./scripts/tests/start_test_block_tx_limit.sh + @sleep 3 + init-test-framework: clean-testing-data install @echo "Initializing fairyring..." ./scripts/tests/start.sh diff --git a/app/ante.go b/app/ante.go new file mode 100644 index 00000000..6a0963bf --- /dev/null +++ b/app/ante.go @@ -0,0 +1,61 @@ +package app + +import ( + "fairyring/blockbuster" + pepante "fairyring/x/pep/ante" + pepkeeper "fairyring/x/pep/keeper" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/auth/ante" +) + +type FairyringHandlerOptions struct { + BaseOptions ante.HandlerOptions + Mempool blockbuster.Mempool + KeyShareLane pepante.KeyShareLane + TxDecoder sdk.TxDecoder + TxEncoder sdk.TxEncoder + PepKeeper pepkeeper.Keeper +} + +// NewFairyringAnteHandler wraps all of the default Cosmos SDK AnteDecorators with the Fairyring AnteHandler. +func NewFairyringAnteHandler(options FairyringHandlerOptions) sdk.AnteHandler { + if options.BaseOptions.AccountKeeper == nil { + panic("account keeper is required for ante builder") + } + + if options.BaseOptions.BankKeeper == nil { + panic("bank keeper is required for ante builder") + } + + if options.BaseOptions.SignModeHandler == nil { + panic("sign mode handler is required for ante builder") + } + + if options.BaseOptions.FeegrantKeeper == nil { + panic("fee grant keeper is required for ante builder") + } + + anteDecorators := []sdk.AnteDecorator{ + ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first + ante.NewExtensionOptionsDecorator(options.BaseOptions.ExtensionOptionChecker), + ante.NewValidateBasicDecorator(), + ante.NewTxTimeoutHeightDecorator(), + ante.NewValidateMemoDecorator(options.BaseOptions.AccountKeeper), + ante.NewConsumeGasForTxSizeDecorator(options.BaseOptions.AccountKeeper), + ante.NewDeductFeeDecorator( + options.BaseOptions.AccountKeeper, + options.BaseOptions.BankKeeper, + options.BaseOptions.FeegrantKeeper, + options.BaseOptions.TxFeeChecker, + ), + ante.NewSetPubKeyDecorator(options.BaseOptions.AccountKeeper), // SetPubKeyDecorator must be called before all signature verification decorators + ante.NewValidateSigCountDecorator(options.BaseOptions.AccountKeeper), + ante.NewSigGasConsumeDecorator(options.BaseOptions.AccountKeeper, options.BaseOptions.SigGasConsumer), + ante.NewSigVerificationDecorator(options.BaseOptions.AccountKeeper, options.BaseOptions.SignModeHandler), + ante.NewIncrementSequenceDecorator(options.BaseOptions.AccountKeeper), + pepante.NewPepDecorator(options.PepKeeper, options.TxEncoder, options.KeyShareLane, options.Mempool), + } + + return sdk.ChainAnteDecorators(anteDecorators...) +} diff --git a/app/app.go b/app/app.go index 6f551088..7e621eed 100644 --- a/app/app.go +++ b/app/app.go @@ -1,21 +1,34 @@ package app import ( - "fmt" + "encoding/json" "io" - "net/http" "os" "path/filepath" + "fairyring/blockbuster/abci" + "fairyring/blockbuster/lanes/base" + + "fairyring/blockbuster" + "fairyring/blockbuster/lanes/keyshare" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" + dbm "github.com/cometbft/cometbft-db" + cometabci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmos "github.com/cometbft/cometbft/libs/os" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" + nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/cosmos/cosmos-sdk/runtime" + 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" - "github.com/cosmos/cosmos-sdk/simapp" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" @@ -37,11 +50,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" @@ -79,30 +94,25 @@ 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" - icacontrollerkeeper "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types" - 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" - ibcporttypes "github.com/cosmos/ibc-go/v5/modules/core/05-port/types" - ibchost "github.com/cosmos/ibc-go/v5/modules/core/24-host" - ibckeeper "github.com/cosmos/ibc-go/v5/modules/core/keeper" - "github.com/ignite/cli/ignite/pkg/openapiconsole" + ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts" + icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" + 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" + ibcporttypes "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/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" keysharemodule "fairyring/x/keyshare" keysharemodulekeeper "fairyring/x/keyshare/keeper" @@ -120,6 +130,7 @@ import ( const ( AccountAddressPrefix = "fairy" Name = "fairyring" + ChainID = "fairytest-1" ) // this line is used by starport scaffolding # stargate/wasm/app/enabledProposals @@ -130,7 +141,6 @@ func getGovProposalHandlers() []govclient.ProposalHandler { govProposalHandlers = append(govProposalHandlers, paramsclient.ProposalHandler, - distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, @@ -151,7 +161,7 @@ var ( ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, authzmodule.AppModuleBasic{}, - genutil.AppModuleBasic{}, + genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, @@ -164,11 +174,13 @@ var ( feegrantmodule.AppModuleBasic{}, groupmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, + ibctm.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, ica.AppModuleBasic{}, vesting.AppModuleBasic{}, + consensus.AppModuleBasic{}, keysharemodule.AppModuleBasic{}, pepmodule.AppModuleBasic{}, // this line is used by starport scaffolding # stargate/app/moduleBasic @@ -184,13 +196,14 @@ var ( stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, govtypes.ModuleName: {authtypes.Burner}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + pepmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking}, // this line is used by starport scaffolding # stargate/app/maccPerms } ) var ( + _ runtime.AppI = (*App)(nil) _ servertypes.Application = (*App)(nil) - _ simapp.App = (*App)(nil) ) func init() { @@ -211,6 +224,7 @@ type App struct { cdc *codec.LegacyAmino appCodec codec.Codec interfaceRegistry types.InterfaceRegistry + txConfig client.TxConfig invCheckPeriod uint @@ -220,24 +234,25 @@ type App struct { memKeys map[string]*storetypes.MemoryStoreKey // keepers - AccountKeeper authkeeper.AccountKeeper - AuthzKeeper authzkeeper.Keeper - BankKeeper bankkeeper.Keeper - CapabilityKeeper *capabilitykeeper.Keeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - MintKeeper mintkeeper.Keeper - DistrKeeper distrkeeper.Keeper - GovKeeper govkeeper.Keeper - CrisisKeeper crisiskeeper.Keeper - UpgradeKeeper upgradekeeper.Keeper - ParamsKeeper paramskeeper.Keeper - IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly - EvidenceKeeper evidencekeeper.Keeper - TransferKeeper ibctransferkeeper.Keeper - ICAHostKeeper icahostkeeper.Keeper - FeeGrantKeeper feegrantkeeper.Keeper - GroupKeeper groupkeeper.Keeper + AccountKeeper authkeeper.AccountKeeper + AuthzKeeper authzkeeper.Keeper + BankKeeper bankkeeper.Keeper + CapabilityKeeper *capabilitykeeper.Keeper + StakingKeeper *stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + MintKeeper mintkeeper.Keeper + DistrKeeper distrkeeper.Keeper + GovKeeper govkeeper.Keeper + CrisisKeeper *crisiskeeper.Keeper + UpgradeKeeper *upgradekeeper.Keeper + ParamsKeeper paramskeeper.Keeper + IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly + EvidenceKeeper evidencekeeper.Keeper + TransferKeeper ibctransferkeeper.Keeper + ICAHostKeeper icahostkeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper + GroupKeeper groupkeeper.Keeper + ConsensusParamsKeeper consensusparamkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper @@ -255,6 +270,9 @@ type App struct { // sm is the simulation manager sm *module.SimulationManager configurator module.Configurator + + // Custom checkTx handler + checkTxHandler abci.CheckTx } // New returns a reference to an initialized blockchain app @@ -287,10 +305,10 @@ func New( keys := sdk.NewKVStoreKeys( authtypes.StoreKey, authz.ModuleName, banktypes.StoreKey, stakingtypes.StoreKey, - minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, govtypes.StoreKey, - paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey, evidencetypes.StoreKey, - ibctransfertypes.StoreKey, icahosttypes.StoreKey, capabilitytypes.StoreKey, group.StoreKey, - icacontrollertypes.StoreKey, + crisistypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey, + govtypes.StoreKey, paramstypes.StoreKey, ibcexported.StoreKey, upgradetypes.StoreKey, + feegrant.StoreKey, evidencetypes.StoreKey, ibctransfertypes.StoreKey, icahosttypes.StoreKey, + capabilitytypes.StoreKey, group.StoreKey, icacontrollertypes.StoreKey, consensusparamtypes.StoreKey, keysharemoduletypes.StoreKey, pepmoduletypes.StoreKey, // this line is used by starport scaffolding # stargate/app/storeKey @@ -303,6 +321,7 @@ func New( cdc: cdc, appCodec: appCodec, interfaceRegistry: interfaceRegistry, + txConfig: encodingConfig.TxConfig, invCheckPeriod: invCheckPeriod, keys: keys, tkeys: tkeys, @@ -317,7 +336,12 @@ func New( ) // set the BaseApp's parameter store - bApp.SetParamStore(app.ParamsKeeper.Subspace(baseapp.Paramspace).WithKeyTable(paramstypes.ConsensusParamsKeyTable())) + app.ConsensusParamsKeeper = consensusparamkeeper.NewKeeper( + appCodec, + keys[upgradetypes.StoreKey], + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + bApp.SetParamStore(&app.ConsensusParamsKeeper) // add capability keeper and ScopeToModule for ibc module app.CapabilityKeeper = capabilitykeeper.NewKeeper( @@ -327,11 +351,10 @@ func New( ) // grant capabilities for the ibc and ibc-transfer modules - scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) + scopedIBCKeeper := app.CapabilityKeeper.ScopeToModule(ibcexported.ModuleName) scopedICAControllerKeeper := app.CapabilityKeeper.ScopeToModule(icacontrollertypes.SubModuleName) scopedTransferKeeper := app.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) scopedICAHostKeeper := app.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) - scopedPepKeeper := app.CapabilityKeeper.ScopeToModule(pepmoduletypes.ModuleName) // this line is used by starport scaffolding # stargate/app/scopedKeeper @@ -339,10 +362,10 @@ func New( app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, keys[authtypes.StoreKey], - app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, sdk.Bech32PrefixAccAddr, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.AuthzKeeper = authzkeeper.NewKeeper( @@ -356,50 +379,59 @@ func New( appCodec, keys[banktypes.StoreKey], app.AccountKeeper, - app.GetSubspace(banktypes.ModuleName), app.BlockedModuleAccountAddrs(), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - stakingKeeper := stakingkeeper.NewKeeper( + app.StakingKeeper = stakingkeeper.NewKeeper( appCodec, keys[stakingtypes.StoreKey], app.AccountKeeper, app.BankKeeper, - app.GetSubspace(stakingtypes.ModuleName), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + app.FeeGrantKeeper = feegrantkeeper.NewKeeper( + appCodec, + keys[feegrant.StoreKey], + app.AccountKeeper, ) app.MintKeeper = mintkeeper.NewKeeper( appCodec, keys[minttypes.StoreKey], - app.GetSubspace(minttypes.ModuleName), - &stakingKeeper, + app.StakingKeeper, app.AccountKeeper, app.BankKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.DistrKeeper = distrkeeper.NewKeeper( appCodec, keys[distrtypes.StoreKey], - app.GetSubspace(distrtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, + app.StakingKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.SlashingKeeper = slashingkeeper.NewKeeper( appCodec, + cdc, keys[slashingtypes.StoreKey], - &stakingKeeper, - app.GetSubspace(slashingtypes.ModuleName), + app.StakingKeeper, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) app.CrisisKeeper = crisiskeeper.NewKeeper( - app.GetSubspace(crisistypes.ModuleName), + appCodec, + keys[crisistypes.StoreKey], invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) groupConfig := group.DefaultConfig() @@ -415,12 +447,6 @@ func New( groupConfig, ) - app.FeeGrantKeeper = feegrantkeeper.NewKeeper( - appCodec, - keys[feegrant.StoreKey], - app.AccountKeeper, - ) - app.UpgradeKeeper = upgradekeeper.NewKeeper( skipUpgradeHeights, keys[upgradetypes.StoreKey], @@ -430,18 +456,12 @@ func New( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - // register the staking hooks - // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks - app.StakingKeeper = *stakingKeeper.SetHooks( - stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()), - ) - // ... other modules keepers // Create IBC Keeper app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibchost.StoreKey], - app.GetSubspace(ibchost.ModuleName), + appCodec, keys[ibcexported.StoreKey], + app.GetSubspace(ibcexported.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, @@ -486,32 +506,39 @@ func New( evidenceKeeper := evidencekeeper.NewKeeper( appCodec, keys[evidencetypes.StoreKey], - &app.StakingKeeper, + app.StakingKeeper, app.SlashingKeeper, ) // If evidence needs to be handled for the app, set routes in router here and seal app.EvidenceKeeper = *evidenceKeeper - govRouter := govv1beta1.NewRouter() - govRouter. - AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). - AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)). - AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). - AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) govConfig := govtypes.DefaultConfig() - app.GovKeeper = govkeeper.NewKeeper( + govKeeper := govkeeper.NewKeeper( appCodec, keys[govtypes.StoreKey], - app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper, - &stakingKeeper, - govRouter, + app.StakingKeeper, app.MsgServiceRouter(), govConfig, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + govRouter := govv1beta1.NewRouter() + govRouter. + AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). + AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). + AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)). + AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)) + govKeeper.SetLegacyRouter(govRouter) + + app.GovKeeper = *govKeeper.SetHooks( + govtypes.NewMultiGovHooks( + // register the governance hooks + ), + ) + + scopedPepKeeper := app.CapabilityKeeper.ScopeToModule(pepmoduletypes.ModuleName) app.PepKeeper = *pepmodulekeeper.NewKeeper( appCodec, keys[pepmoduletypes.StoreKey], @@ -520,15 +547,17 @@ func New( app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, scopedPepKeeper, + app.IBCKeeper.ConnectionKeeper, + app.BankKeeper, ) pepModule := pepmodule.NewAppModule( appCodec, - app.PepKeeper, app.AccountKeeper, app.BankKeeper, app.MsgServiceRouter(), encodingConfig.TxConfig, + app.SimCheck, ) pepIBCModule := pepmodule.NewIBCModule(app.PepKeeper) @@ -539,10 +568,102 @@ func New( keys[keysharemoduletypes.MemStoreKey], app.GetSubspace(keysharemoduletypes.ModuleName), app.PepKeeper, - stakingKeeper, + app.StakingKeeper, ) keyshareModule := keysharemodule.NewAppModule(appCodec, app.KeyshareKeeper, app.AccountKeeper, app.BankKeeper, app.PepKeeper) + // ---------------------------------------------------------------------------- // + // ------------------------- Begin Custom Code -------------------------------- // + // ---------------------------------------------------------------------------- // + + // Set fairyring's mempool into the app. + config := blockbuster.BaseLaneConfig{ + Logger: app.Logger(), + TxEncoder: app.txConfig.TxEncoder(), + TxDecoder: app.txConfig.TxDecoder(), + MaxBlockSpace: sdk.ZeroDec(), + } + + // Create the lanes. + // + // NOTE: The lanes are ordered by priority. The first lane is the highest priority + // lane and the last lane is the lowest priority lane. + + // Keyshare lane allows for CreateAggrgatedKeyShare transactions to be processed before others. + keyshareLane := keyshare.NewKeyShareLane( + config, + 0, + keyshare.NewDefaultKeyshareFactory(app.txConfig.TxDecoder()), + ) + + // Default lane accepts all other transactions. + defaultConfig := blockbuster.BaseLaneConfig{ + Logger: app.Logger(), + TxEncoder: app.txConfig.TxEncoder(), + TxDecoder: app.txConfig.TxDecoder(), + MaxBlockSpace: sdk.ZeroDec(), + IgnoreList: []blockbuster.Lane{ + keyshareLane, + }, + } + defaultLane := base.NewDefaultLane(defaultConfig) + + lanes := []blockbuster.Lane{ + keyshareLane, + defaultLane, + } + + mempool := blockbuster.NewMempool(lanes...) + app.BaseApp.SetMempool(mempool) + + // Create a global ante handler that will be called on each transaction when + // proposals are being built and verified. + handlerOptions := ante.HandlerOptions{ + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + FeegrantKeeper: app.FeeGrantKeeper, + SigGasConsumer: ante.DefaultSigVerificationGasConsumer, + SignModeHandler: app.txConfig.SignModeHandler(), + } + options := FairyringHandlerOptions{ + BaseOptions: handlerOptions, + PepKeeper: app.PepKeeper, + TxDecoder: app.txConfig.TxDecoder(), + TxEncoder: app.txConfig.TxEncoder(), + KeyShareLane: keyshareLane, + Mempool: mempool, + } + anteHandler := NewFairyringAnteHandler(options) + + // Set the lane config on the lanes. + for _, lane := range lanes { + lane.SetAnteHandler(anteHandler) + } + + // Set the proposal handlers on the BaseApp along with the custom antehandler. + proposalHandlers := abci.NewProposalHandler( + app.Logger(), + app.txConfig.TxDecoder(), + mempool, + ) + app.BaseApp.SetPrepareProposal(proposalHandlers.PrepareProposalHandler()) + app.BaseApp.SetProcessProposal(proposalHandlers.ProcessProposalHandler()) + app.BaseApp.SetAnteHandler(anteHandler) + + // Set the custom CheckTx handler on BaseApp. + checkTxHandler := abci.NewCheckTxHandler( + app.BaseApp, + app.txConfig.TxDecoder(), + keyshareLane, + anteHandler, + ChainID, + ) + app.SetCheckTx(checkTxHandler.CheckTx()) + + // ---------------------------------------------------------------------------- // + // ------------------------- End Custom Code ---------------------------------- // + // ---------------------------------------------------------------------------- // + // this line is used by starport scaffolding # stargate/app/keeperDefinition // Sealing prevents other modules from creating scoped sub-keepers @@ -557,6 +678,16 @@ func New( // this line is used by starport scaffolding # ibc/app/router app.IBCKeeper.SetRouter(ibcRouter) + // register hooks after all modules have been initialized + + app.StakingKeeper.SetHooks( + stakingtypes.NewMultiStakingHooks( + // insert staking hooks receivers here + app.DistrKeeper.Hooks(), + app.SlashingKeeper.Hooks(), + ), + ) + /**** Module Options ****/ // NOTE: we may consider parsing `appOpts` inside module constructors. For the moment @@ -571,21 +702,21 @@ func New( 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)), authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), + bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), + capability.NewAppModule(appCodec, *app.CapabilityKeeper, false), feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, minttypes.DefaultInflationCalculationFn), - 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), + consensus.NewAppModule(appCodec, app.ConsensusParamsKeeper), ibc.NewAppModule(app.IBCKeeper), params.NewAppModule(app.ParamsKeeper), transferModule, @@ -593,6 +724,8 @@ func New( keyshareModule, pepModule, // this line is used by starport scaffolding # stargate/app/appModule + + crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them ) // During begin block slashing happens after distr.BeginBlocker so that @@ -613,7 +746,7 @@ func New( govtypes.ModuleName, crisistypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, icatypes.ModuleName, genutiltypes.ModuleName, authz.ModuleName, @@ -621,6 +754,7 @@ func New( group.ModuleName, paramstypes.ModuleName, vestingtypes.ModuleName, + consensusparamtypes.ModuleName, keysharemoduletypes.ModuleName, // Necessary to run before begin blocker of pep module pepmoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/beginBlockers @@ -631,7 +765,7 @@ func New( govtypes.ModuleName, stakingtypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, icatypes.ModuleName, capabilitytypes.ModuleName, authtypes.ModuleName, @@ -647,6 +781,7 @@ func New( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, + consensusparamtypes.ModuleName, keysharemoduletypes.ModuleName, pepmoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/endBlockers @@ -657,7 +792,7 @@ func New( // NOTE: Capability module must occur first so that it can initialize any capabilities // so that other modules that want to create or claim capabilities afterwards in InitChain // can do so safely. - app.mm.SetOrderInitGenesis( + genesisModuleOrder := []string{ capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, @@ -669,7 +804,7 @@ func New( crisistypes.ModuleName, genutiltypes.ModuleName, ibctransfertypes.ModuleName, - ibchost.ModuleName, + ibcexported.ModuleName, icatypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName, @@ -678,41 +813,34 @@ func New( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, + consensusparamtypes.ModuleName, keysharemoduletypes.ModuleName, pepmoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/initGenesis - ) + } + app.mm.SetOrderInitGenesis(genesisModuleOrder...) + app.mm.SetOrderExportGenesis(genesisModuleOrder...) // Uncomment if you want to set a custom migration order here. // app.mm.SetOrderMigrations(custom order) - 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) + 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 - app.sm = module.NewSimulationManager( - auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts), - authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), - capability.NewAppModule(appCodec, *app.CapabilityKeeper), - feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), - gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), - mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, minttypes.DefaultInflationCalculationFn), - staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper), - distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), - params.NewAppModule(app.ParamsKeeper), - groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), - evidence.NewAppModule(app.EvidenceKeeper), - ibc.NewAppModule(app.IBCKeeper), - transferModule, - keyshareModule, - pepModule, - // this line is used by starport scaffolding # stargate/app/appModule - ) + overrideModules := map[string]module.AppModuleSimulation{ + authtypes.ModuleName: auth.NewAppModule(app.appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), + } + app.sm = module.NewSimulationManagerFromAppModules(app.mm.Modules, overrideModules) app.sm.RegisterStoreDecoders() // initialize stores @@ -720,24 +848,6 @@ func New( app.MountTransientStores(tkeys) app.MountMemoryStores(memKeys) - // initialize BaseApp - app.SetInitChainer(app.InitChainer) - app.SetBeginBlocker(app.BeginBlocker) - - anteHandler, err := ante.NewAnteHandler( - ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), - FeegrantKeeper: app.FeeGrantKeeper, - SigGasConsumer: ante.DefaultSigVerificationGasConsumer, - }, - ) - if err != nil { - panic(fmt.Errorf("failed to create AnteHandler: %s", err)) - } - - app.SetAnteHandler(anteHandler) app.SetInitChainer(app.InitChainer) app.SetBeginBlocker(app.BeginBlocker) app.SetEndBlocker(app.EndBlocker) @@ -760,25 +870,30 @@ func New( func (app *App) Name() string { return app.BaseApp.Name() } // BeginBlocker application updates every begin block -func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { +func (app *App) BeginBlocker(ctx sdk.Context, req cometabci.RequestBeginBlock) cometabci.ResponseBeginBlock { return app.mm.BeginBlock(ctx, req) } // EndBlocker application updates every end block -func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock { +func (app *App) EndBlocker(ctx sdk.Context, req cometabci.RequestEndBlock) cometabci.ResponseEndBlock { return app.mm.EndBlock(ctx, req) } // InitChainer application update at chain initialization -func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain { +func (app *App) InitChainer(ctx sdk.Context, req cometabci.RequestInitChain) cometabci.ResponseInitChain { var genesisState GenesisState - if err := tmjson.Unmarshal(req.AppStateBytes, &genesisState); err != nil { + if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil { panic(err) } app.UpgradeKeeper.SetModuleVersionMap(ctx, app.mm.GetVersionMap()) return app.mm.InitGenesis(ctx, app.appCodec, genesisState) } +// Configurator get app configurator +func (app *App) Configurator() module.Configurator { + return app.configurator +} + // LoadHeight loads a particular height func (app *App) LoadHeight(height int64) error { return app.LoadVersion(height) @@ -861,13 +976,14 @@ func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) + // Register node gRPC service for grpc-gateway. + nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register grpc-gateway routes for all modules. ModuleBasics.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // register app's OpenAPI routes. - apiSvr.Router.Handle("/static/openapi.yml", http.FileServer(http.FS(docs.Docs))) - apiSvr.Router.HandleFunc("/", openapiconsole.Handler(Name, "/static/openapi.yml")) + docs.RegisterOpenAPIService(Name, apiSvr.Router) } // RegisterTxService implements the Application.RegisterTxService method. @@ -885,13 +1001,9 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) { ) } -// GetMaccPerms returns a copy of the module account permissions -func GetMaccPerms() map[string][]string { - dupMaccPerms := make(map[string][]string) - for k, v := range maccPerms { - dupMaccPerms[k] = v - } - return dupMaccPerms +// RegisterNodeService implements the Application.RegisterNodeService method. +func (app *App) RegisterNodeService(clientCtx client.Context) { + nodeservice.RegisterNodeService(clientCtx, app.GRPCQueryRouter()) } // initParamsKeeper init params keeper and its subspaces @@ -907,7 +1019,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(ibchost.ModuleName) + paramsKeeper.Subspace(ibcexported.ModuleName) paramsKeeper.Subspace(icacontrollertypes.SubModuleName) paramsKeeper.Subspace(icahosttypes.SubModuleName) paramsKeeper.Subspace(keysharemoduletypes.ModuleName) @@ -917,7 +1029,26 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino return paramsKeeper } +// GetMaccPerms returns a copy of the module account permissions +func GetMaccPerms() map[string][]string { + dupMaccPerms := make(map[string][]string) + for k, v := range maccPerms { + dupMaccPerms[k] = v + } + return dupMaccPerms +} + // SimulationManager implements the SimulationApp interface func (app *App) SimulationManager() *module.SimulationManager { return app.sm } + +// ModuleManager returns the app ModuleManager +func (app *App) ModuleManager() *module.Manager { + return app.mm +} + +// SetCheckTx sets the checkTxHandler for the app. +func (app *App) SetCheckTx(handler abci.CheckTx) { + app.checkTxHandler = handler +} diff --git a/app/export.go b/app/export.go index 4f09d80a..9b638ead 100644 --- a/app/export.go +++ b/app/export.go @@ -4,18 +4,18 @@ import ( "encoding/json" "log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" ) -// ExportAppStateAndValidators exports the state of the application for a genesis -// file. func (app *App) 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,22 +28,19 @@ func (app *App) 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 } validators, err := staking.WriteValidators(ctx, app.StakingKeeper) - if err != nil { - return servertypes.ExportedApp{}, err - } return servertypes.ExportedApp{ AppState: appState, Validators: validators, Height: height, ConsensusParams: app.BaseApp.GetConsensusParams(ctx), - }, nil + }, err } // prepare for fresh start at zero height diff --git a/app/simulation_test.go b/app/simulation_test.go index 6e3c2a33..6c7446b3 100644 --- a/app/simulation_test.go +++ b/app/simulation_test.go @@ -1,17 +1,59 @@ package app_test import ( - "fairyring/app" - "github.com/cosmos/cosmos-sdk/simapp" + "encoding/json" + "fmt" + "math/rand" + "os" + "runtime/debug" + "strings" + "testing" + "time" + + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/server" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" simulationtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/simulation" + simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - "os" - "testing" + + "fairyring/app" ) +type storeKeysPrefixes struct { + A storetypes.StoreKey + B storetypes.StoreKey + Prefixes [][]byte +} + +// Get flags every time the simulator is run func init() { - simapp.GetSimulatorFlags() + simcli.GetSimulatorFlags() +} + +// fauxMerkleModeOpt returns a BaseApp option to use a dbStoreAdapter instead of +// an IAVLStore for faster simulation speed. +func fauxMerkleModeOpt(bapp *baseapp.BaseApp) { + bapp.SetFauxMerkleMode() } // BenchmarkSimulation run the chain simulation @@ -20,21 +62,32 @@ func init() { // Running as go benchmark test: // `go test -benchmem -run=^$ -bench ^BenchmarkSimulation ./app -NumBlocks=200 -BlockSize 50 -Commit=true -Verbose=true -Enabled=true` func BenchmarkSimulation(b *testing.B) { - simapp.FlagEnabledValue = true - simapp.FlagCommitValue = true + simcli.FlagSeedValue = time.Now().Unix() + simcli.FlagVerboseValue = true + simcli.FlagCommitValue = true + simcli.FlagEnabledValue = true - config, db, dir, logger, _, err := simapp.SetupSimulation("goleveldb-app-sim", "Simulation") + config := simcli.NewConfigFromFlags() + config.ChainID = "mars-simapp" + db, dir, logger, _, err := simtestutil.SetupSimulation( + config, + "leveldb-bApp-sim", + "Simulation", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) require.NoError(b, err, "simulation setup failed") b.Cleanup(func() { - db.Close() - err = os.RemoveAll(dir) - require.NoError(b, err) + require.NoError(b, db.Close()) + require.NoError(b, os.RemoveAll(dir)) }) - encoding := app.MakeEncodingConfig() + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = app.DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue - app := app.New( + bApp := app.New( logger, db, nil, @@ -42,29 +95,407 @@ func BenchmarkSimulation(b *testing.B) { map[int64]bool{}, app.DefaultNodeHome, 0, - encoding, - simapp.EmptyAppOptions{}, + app.MakeEncodingConfig(), + appOptions, + baseapp.SetChainID(config.ChainID), ) + require.Equal(b, app.Name, bApp.Name()) - // Run randomized simulations + // run randomized simulation _, simParams, simErr := simulation.SimulateFromSeed( b, os.Stdout, - app.BaseApp, - simapp.AppStateFn(app.AppCodec(), app.SimulationManager()), + bApp.BaseApp, + simtestutil.AppStateFn( + bApp.AppCodec(), + bApp.SimulationManager(), + app.NewDefaultGenesisState(bApp.AppCodec()), + ), simulationtypes.RandomAccounts, - simapp.SimulationOperations(app, app.AppCodec(), config), - app.ModuleAccountAddrs(), + simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), + bApp.ModuleAccountAddrs(), config, - app.AppCodec(), + bApp.AppCodec(), ) // export state and simParams before the simulation error is checked - err = simapp.CheckExportSimulation(app, config, simParams) + err = simtestutil.CheckExportSimulation(bApp, config, simParams) require.NoError(b, err) require.NoError(b, simErr) if config.Commit { - simapp.PrintStats(db) + simtestutil.PrintStats(db) + } +} + +func TestAppStateDeterminism(t *testing.T) { + if !simcli.FlagEnabledValue { + t.Skip("skipping application simulation") + } + + config := simcli.NewConfigFromFlags() + config.InitialBlockHeight = 1 + config.ExportParamsPath = "" + config.OnOperation = true + config.AllInvariants = true + + var ( + r = rand.New(rand.NewSource(time.Now().Unix())) + numSeeds = 3 + numTimesToRunPerSeed = 5 + appHashList = make([]json.RawMessage, numTimesToRunPerSeed) + appOptions = make(simtestutil.AppOptionsMap, 0) + ) + appOptions[flags.FlagHome] = app.DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + + for i := 0; i < numSeeds; i++ { + config.Seed = r.Int63() + + for j := 0; j < numTimesToRunPerSeed; j++ { + var logger log.Logger + if simcli.FlagVerboseValue { + logger = log.TestingLogger() + } else { + logger = log.NewNopLogger() + } + chainID := fmt.Sprintf("chain-id-%d-%d", i, j) + config.ChainID = chainID + + db := dbm.NewMemDB() + bApp := app.New( + logger, + db, + nil, + true, + map[int64]bool{}, + app.DefaultNodeHome, + simcli.FlagPeriodValue, + app.MakeEncodingConfig(), + appOptions, + fauxMerkleModeOpt, + baseapp.SetChainID(chainID), + ) + + fmt.Printf( + "running non-determinism simulation; seed %d: %d/%d, attempt: %d/%d\n", + config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, + ) + + _, _, err := simulation.SimulateFromSeed( + t, + os.Stdout, + bApp.BaseApp, + simtestutil.AppStateFn( + bApp.AppCodec(), + bApp.SimulationManager(), + app.NewDefaultGenesisState(bApp.AppCodec()), + ), + simulationtypes.RandomAccounts, + simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), + bApp.ModuleAccountAddrs(), + config, + bApp.AppCodec(), + ) + require.NoError(t, err) + + if config.Commit { + simtestutil.PrintStats(db) + } + + appHash := bApp.LastCommitID().Hash + appHashList[j] = appHash + + if j != 0 { + require.Equal( + t, string(appHashList[0]), string(appHashList[j]), + "non-determinism in seed %d: %d/%d, attempt: %d/%d\n", config.Seed, i+1, numSeeds, j+1, numTimesToRunPerSeed, + ) + } + } + } +} + +func TestAppImportExport(t *testing.T) { + config := simcli.NewConfigFromFlags() + config.ChainID = "mars-simapp-import" + + db, dir, logger, skip, err := simtestutil.SetupSimulation( + config, + "leveldb-app-sim", + "Simulation", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) + if skip { + t.Skip("skipping application import/export simulation") + } + require.NoError(t, err, "simulation setup failed") + + defer func() { + require.NoError(t, db.Close()) + require.NoError(t, os.RemoveAll(dir)) + }() + + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = app.DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + + bApp := app.New( + logger, + db, + nil, + true, + map[int64]bool{}, + app.DefaultNodeHome, + 0, + app.MakeEncodingConfig(), + appOptions, + baseapp.SetChainID(config.ChainID), + ) + require.Equal(t, app.Name, bApp.Name()) + + // run randomized simulation + _, simParams, simErr := simulation.SimulateFromSeed( + t, + os.Stdout, + bApp.BaseApp, + simtestutil.AppStateFn( + bApp.AppCodec(), + bApp.SimulationManager(), + app.NewDefaultGenesisState(bApp.AppCodec()), + ), + simulationtypes.RandomAccounts, + simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), + bApp.BlockedModuleAccountAddrs(), + config, + bApp.AppCodec(), + ) + require.NoError(t, simErr) + + // export state and simParams before the simulation error is checked + err = simtestutil.CheckExportSimulation(bApp, config, simParams) + require.NoError(t, err) + + if config.Commit { + simtestutil.PrintStats(db) } + + fmt.Printf("exporting genesis...\n") + + exported, err := bApp.ExportAppStateAndValidators(false, []string{}, []string{}) + require.NoError(t, err) + + fmt.Printf("importing genesis...\n") + + newDB, newDir, _, _, err := simtestutil.SetupSimulation( + config, + "leveldb-app-sim-2", + "Simulation-2", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) + require.NoError(t, err, "simulation setup failed") + + defer func() { + require.NoError(t, newDB.Close()) + require.NoError(t, os.RemoveAll(newDir)) + }() + + newApp := app.New( + log.NewNopLogger(), + newDB, + nil, + true, + map[int64]bool{}, + app.DefaultNodeHome, + 0, + app.MakeEncodingConfig(), + appOptions, + baseapp.SetChainID(config.ChainID), + ) + require.Equal(t, app.Name, bApp.Name()) + + var genesisState app.GenesisState + err = json.Unmarshal(exported.AppState, &genesisState) + require.NoError(t, err) + + defer func() { + if r := recover(); r != nil { + err := fmt.Sprintf("%v", r) + if !strings.Contains(err, "validator set is empty after InitGenesis") { + panic(r) + } + logger.Info("Skipping simulation as all validators have been unbonded") + logger.Info("err", err, "stacktrace", string(debug.Stack())) + } + }() + + ctxA := bApp.NewContext(true, tmproto.Header{Height: bApp.LastBlockHeight()}) + ctxB := newApp.NewContext(true, tmproto.Header{Height: bApp.LastBlockHeight()}) + newApp.ModuleManager().InitGenesis(ctxB, bApp.AppCodec(), genesisState) + newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) + + fmt.Printf("comparing stores...\n") + + storeKeysPrefixes := []storeKeysPrefixes{ + {bApp.GetKey(authtypes.StoreKey), newApp.GetKey(authtypes.StoreKey), [][]byte{}}, + { + bApp.GetKey(stakingtypes.StoreKey), newApp.GetKey(stakingtypes.StoreKey), + [][]byte{ + stakingtypes.UnbondingQueueKey, stakingtypes.RedelegationQueueKey, stakingtypes.ValidatorQueueKey, + stakingtypes.HistoricalInfoKey, stakingtypes.UnbondingIDKey, stakingtypes.UnbondingIndexKey, stakingtypes.UnbondingTypeKey, stakingtypes.ValidatorUpdatesKey, + }, + }, // ordering may change but it doesn't matter + {bApp.GetKey(slashingtypes.StoreKey), newApp.GetKey(slashingtypes.StoreKey), [][]byte{}}, + {bApp.GetKey(minttypes.StoreKey), newApp.GetKey(minttypes.StoreKey), [][]byte{}}, + {bApp.GetKey(distrtypes.StoreKey), newApp.GetKey(distrtypes.StoreKey), [][]byte{}}, + {bApp.GetKey(banktypes.StoreKey), newApp.GetKey(banktypes.StoreKey), [][]byte{banktypes.BalancesPrefix}}, + {bApp.GetKey(paramstypes.StoreKey), newApp.GetKey(paramstypes.StoreKey), [][]byte{}}, + {bApp.GetKey(govtypes.StoreKey), newApp.GetKey(govtypes.StoreKey), [][]byte{}}, + {bApp.GetKey(evidencetypes.StoreKey), newApp.GetKey(evidencetypes.StoreKey), [][]byte{}}, + {bApp.GetKey(capabilitytypes.StoreKey), newApp.GetKey(capabilitytypes.StoreKey), [][]byte{}}, + {bApp.GetKey(authzkeeper.StoreKey), newApp.GetKey(authzkeeper.StoreKey), [][]byte{authzkeeper.GrantKey, authzkeeper.GrantQueuePrefix}}, + } + + for _, skp := range storeKeysPrefixes { + storeA := ctxA.KVStore(skp.A) + storeB := ctxB.KVStore(skp.B) + + failedKVAs, failedKVBs := sdk.DiffKVStores(storeA, storeB, skp.Prefixes) + require.Equal(t, len(failedKVAs), len(failedKVBs), "unequal sets of key-values to compare") + + fmt.Printf("compared %d different key/value pairs between %s and %s\n", len(failedKVAs), skp.A, skp.B) + require.Equal(t, 0, len(failedKVAs), simtestutil.GetSimulationLog(skp.A.Name(), bApp.SimulationManager().StoreDecoders, failedKVAs, failedKVBs)) + } +} + +func TestAppSimulationAfterImport(t *testing.T) { + config := simcli.NewConfigFromFlags() + config.ChainID = "mars-simapp-after-import" + + db, dir, logger, skip, err := simtestutil.SetupSimulation( + config, + "leveldb-app-sim", + "Simulation", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) + if skip { + t.Skip("skipping application simulation after import") + } + require.NoError(t, err, "simulation setup failed") + + defer func() { + require.NoError(t, db.Close()) + require.NoError(t, os.RemoveAll(dir)) + }() + + appOptions := make(simtestutil.AppOptionsMap, 0) + appOptions[flags.FlagHome] = app.DefaultNodeHome + appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue + + bApp := app.New( + logger, + db, + nil, + true, + map[int64]bool{}, + app.DefaultNodeHome, + 0, + app.MakeEncodingConfig(), + appOptions, + fauxMerkleModeOpt, + baseapp.SetChainID(config.ChainID), + ) + require.Equal(t, app.Name, bApp.Name()) + + // run randomized simulation + stopEarly, simParams, simErr := simulation.SimulateFromSeed( + t, + os.Stdout, + bApp.BaseApp, + simtestutil.AppStateFn( + bApp.AppCodec(), + bApp.SimulationManager(), + app.NewDefaultGenesisState(bApp.AppCodec()), + ), + simulationtypes.RandomAccounts, + simtestutil.SimulationOperations(bApp, bApp.AppCodec(), config), + bApp.BlockedModuleAccountAddrs(), + config, + bApp.AppCodec(), + ) + require.NoError(t, simErr) + + // export state and simParams before the simulation error is checked + err = simtestutil.CheckExportSimulation(bApp, config, simParams) + require.NoError(t, err) + + if config.Commit { + simtestutil.PrintStats(db) + } + + if stopEarly { + fmt.Println("can't export or import a zero-validator genesis, exiting test...") + return + } + + fmt.Printf("exporting genesis...\n") + + exported, err := bApp.ExportAppStateAndValidators(true, []string{}, []string{}) + require.NoError(t, err) + + fmt.Printf("importing genesis...\n") + + newDB, newDir, _, _, err := simtestutil.SetupSimulation( + config, + "leveldb-app-sim-2", + "Simulation-2", + simcli.FlagVerboseValue, + simcli.FlagEnabledValue, + ) + require.NoError(t, err, "simulation setup failed") + + defer func() { + require.NoError(t, newDB.Close()) + require.NoError(t, os.RemoveAll(newDir)) + }() + + newApp := app.New( + log.NewNopLogger(), + newDB, + nil, + true, + map[int64]bool{}, + app.DefaultNodeHome, + 0, + app.MakeEncodingConfig(), + appOptions, + fauxMerkleModeOpt, + baseapp.SetChainID(config.ChainID), + ) + require.Equal(t, app.Name, bApp.Name()) + + newApp.InitChain(abci.RequestInitChain{ + ChainId: config.ChainID, + AppStateBytes: exported.AppState, + }) + + _, _, err = simulation.SimulateFromSeed( + t, + os.Stdout, + newApp.BaseApp, + simtestutil.AppStateFn( + bApp.AppCodec(), + bApp.SimulationManager(), + app.NewDefaultGenesisState(bApp.AppCodec()), + ), + simulationtypes.RandomAccounts, + simtestutil.SimulationOperations(newApp, newApp.AppCodec(), config), + newApp.BlockedModuleAccountAddrs(), + config, + bApp.AppCodec(), + ) + require.NoError(t, err) } diff --git a/blockbuster/README.md b/blockbuster/README.md new file mode 100644 index 00000000..8b20d1ae --- /dev/null +++ b/blockbuster/README.md @@ -0,0 +1,355 @@ +# BlockBuster + +> 📕 BlockBuster is an app-side mempool + set of proposal handlers that allows +developers to configure modular lanes of transactions in their blocks with +distinct validation/ordering logic. **BlockBuster is the ultimate highway +system for transactions.** + +## High Level Overview + +**`BlockBuster`** is a framework for creating modular, application specific +mempools by **separating transactions into “lanes” with custom transaction handling.** + +You can think of BlockBuster as a **transaction highway system**, where each +lane on the highway serves a specific purpose and has its own set of rules and +traffic flow. + +Similarly, **BlockBuster** redefines block-space into **`lanes`** - where each +`lane` has its own set of rules and transaction flow management systems. + +* A lane is what we might traditionally consider to be a standard mempool +where transaction ***validation***, ***ordering*** and ***prioritization*** for +contained transactions are shared. +* Lanes implement a **standard interface** that allows each individual lane to +propose and validate a portion of a block. +* Lanes are ordered with each other, configurable by developers. All lanes +together define the desired block structure of a chain. + +## BlockBuster Use Cases + +A mempool with separate `lanes` can be used for: + +1. **MEV mitigation**: a top of block lane could be designed to create an +in-protocol top-of-block auction (as we are doing with POB) to recapture MEV +in a transparent and governable way. +2. **Free/reduced fee txs**: transactions with certain properties (e.g. +from trusted accounts or performing encouraged actions) could leverage a +free lane to reward behavior. +3. **Dedicated oracle space** Oracles could be included before other kinds +of transactions to ensure that price updates occur first, and are not able +to be sandwiched or manipulated. +4. **Orderflow auctions**: an OFA lane could be constructed such that order +flow providers can have their submitted transactions bundled with specific +backrunners, to guarantee MEV rewards are attributed back to users. +Imagine MEV-share but in protocol. +5. **Enhanced and customizable privacy**: privacy-enhancing features could +be introduced, such as threshold encrypted lanes, to protect user data and + maintain privacy for specific use cases. +6. **Fee market improvements**: one or many fee markets - such as EIP-1559 - +could be easily adopted for different lanes (potentially custom for certain +dApps). Each smart contract/exchange could have its own fee market or auction +for transaction ordering. +7. **Congestion management**: segmentation of transactions to lanes can help +mitigate network congestion by capping usage of certain applications and +tailoring fee markets. + +## BlockBuster Design + +BlockBuster is a mempool composed of sub-mempools called **lanes**. All +lanes together define the transaction highway system and BlockBuster mempool. +When instantiating the BlockBuster mempool, developers will define all of the +desired lanes and their configurations (including lane ordering). + +Utilizing BlockBuster is a simple three step process: + +* Determine the lanes desired. Currently, POB supports three different +implementations of lanes: top of block lane, free lane, and a default lane. + 1. Top of block lane allows the top of every block to be auctioned off + and constructed using logic defined by the `x/builder` module. + 2. Free lane allows base app to not charge certain types of transactions + any fees. For example, delegations and/or re-delegations might be charged no + fees. What qualifies as a free transaction is determined + [here](https://fairyring/blob/main/blockbuster/lanes/free/factory.go). + 3. Default lane accepts all other transactions and is considered to be + analogous to how mempools and proposals are constructed today. +* Instantiate the mempool in base app. + +```go +mempool := blockbuster.NewMempool(lanes...) +app.App.SetMempool(mempool) +``` + +* Instantiate the BlockBuster proposal handlers in base app. + +```go +proposalHandlers := abci.NewProposalHandler( + app.Logger(), + app.txConfig.TxDecoder(), + mempool, // BlockBuster mempool +) +app.App.SetPrepareProposal(proposalHandlers.PrepareProposalHandler()) +app.App.SetProcessProposal(proposalHandlers.ProcessProposalHandler()) +``` + +***Note: BlockBuster should configure a `DefaultLane` that accepts transactions +that do not belong to any other lane.*** + +Transactions are inserted into the first lane that the transaction matches to. +This means that a given transaction should really only belong to one lane +(but this isn’t enforced). + +### Proposals + +The ordering of lanes when initializing BlockBuster in base app will determine +the ordering of how proposals are built. For example, say that we instantiate +three lanes: + +1. Top of block lane +2. Free lane +3. Default lane + +#### Preparing Proposals + +When the current proposer starts building a block, it will first populate the +proposal with transactions from the top of block lane, followed by free and +default lane. Each lane proposes its own set of transactions using the lane’s +`PrepareLane` (analogous to `PrepareProposal`). Each lane has a limit on the +relative percentage of total block space that the lane can consume. +For example, the free lane might be configured to only make up 10% of any +block. This is defined on each lane’s `Config` when it is instantiated. + +In the case when any lane fails to propose its portion of the block, it will +be skipped and the next lane in the set of lanes will propose its portion of +the block. Failures of partial block proposals are independent of one another. + +#### Processing Proposals + +Block proposals are validated iteratively following the exact ordering of lanes +defined on base app. Transactions included in block proposals must respect the +ordering of lanes. Any proposal that includes transactions that are out of +order relative to the ordering of lanes will be rejected. Following the +example defined above, if a proposal contains the following transactions: + +1. Default transaction (belonging to the default lane) +2. Top of block transaction (belonging to the top of block lane) +3. Free transaction (belonging to the free lane) + +It will be rejected because it does not respect the lane ordering. + +The BlockBuster `ProcessProposalHandler` processes the proposal by verifying +all transactions in the proposal according to each lane's verification logic +in a greedy fashion. If a lane's portion of the proposal is invalid, we +reject the proposal. After a lane's portion of the proposal is verified, we +pass the remaining transactions to the next lane in the chain. + +#### Coming Soon + +BlockBuster will have its own dedicated gRPC service for searchers, wallets, +and users that allows them to query what lane their transaction might belong +in, what fees they might have to pay for a given transaction, and the general +state of the BlockBuster mempool. + +### Lanes + +Each lane will define its own: + +1. Unique prioritization/ordering mechanism i.e. how will transactions from a +given lane be ordered in a block / mempool. +2. Inclusion function to determine what types of transactions belong in the lane. +3. Unique block building/verification mechanism. + +The general interface that each lane must implement can be found [here](https://fairyring/blob/main/blockbuster/lane.go): + +```go +// Lane defines an interface used for block construction +Lane interface { + sdkmempool.Mempool + + // Name returns the name of the lane. + Name() string + + // Match determines if a transaction belongs to this lane. + Match(tx sdk.Tx) bool + + // VerifyTx verifies the transaction belonging to this lane. + VerifyTx(ctx sdk.Context, tx sdk.Tx) error + + // Contains returns true if the mempool contains the given transaction. + Contains(tx sdk.Tx) (bool, error) + + // PrepareLane builds a portion of the block. It inputs the maxTxBytes that + // can be included in the proposal for the given lane, the partial + // proposal, and a function to call the next lane in the chain. The + // next lane in the chain will be called with the updated proposal and context. + PrepareLane( + ctx sdk.Context, + proposal BlockProposal, + maxTxBytes int64, + next PrepareLanesHandler, + ) (BlockProposal, error) + + // ProcessLaneBasic validates that transactions belonging to this lane are + // not misplaced in the block proposal. + ProcessLaneBasic(txs []sdk.Tx) error + + // ProcessLane verifies this lane's portion of a proposed block. It inputs + // the transactions that may belong to this lane and a function to call + // the next lane in the chain. The next lane in the chain will be + // called with the updated context and filtered down transactions. + ProcessLane( + ctx sdk.Context, + proposalTxs []sdk.Tx, + next ProcessLanesHandler, + ) (sdk.Context, error) + + // SetAnteHandler sets the lane's antehandler. + SetAnteHandler(antehander sdk.AnteHandler) + + // Logger returns the lane's logger. + Logger() log.Logger + + // GetMaxBlockSpace returns the max block space for the lane as a relative percentage. + GetMaxBlockSpace() sdk.Dec +} +``` + +### 1. Intra-lane Transaction Ordering + +**Note: Lanes must implement the `sdk.Mempool` interface.** + +Transactions within a lane are ordered in a proposal respecting the ordering +defined on the lane’s mempool. Developers can define their own custom ordering +by implementing a custom `TxPriority` struct that allows the lane’s mempool to +determine the priority of a transaction `GetTxPriority` and relatively order +two transactions given the priority `Compare`. The top of block lane includes +an custom `TxPriority` that orders transactions in the mempool based on their +bid. + +```go +func TxPriority(config Factory) blockbuster.TxPriority[string] { + return blockbuster.TxPriority[string]{ + GetTxPriority: func(goCtx context.Context, tx sdk.Tx) string { + bidInfo, err := config.GetAuctionBidInfo(tx) + if err != nil { + panic(err) + } + + return bidInfo.Bid.String() + }, + Compare: func(a, b string) int { + aCoins, _ := sdk.ParseCoinsNormalized(a) + bCoins, _ := sdk.ParseCoinsNormalized(b) + + switch { + case aCoins == nil && bCoins == nil: + return 0 + + case aCoins == nil: + return -1 + + case bCoins == nil: + return 1 + + default: + switch { + case aCoins.IsAllGT(bCoins): + return 1 + + case aCoins.IsAllLT(bCoins): + return -1 + + default: + return 0 + } + } + }, + MinValue: "", + } +} + +// NewMempool returns a new auction mempool. +func NewMempool(txEncoder sdk.TxEncoder, maxTx int, config Factory) *TOBMempool { + return &TOBMempool{ + index: blockbuster.NewPriorityMempool( + blockbuster.PriorityNonceMempoolConfig[string]{ + TxPriority: TxPriority(config), + MaxTx: maxTx, + }, + ), + txEncoder: txEncoder, + txIndex: make(map[string]struct{}), + Factory: config, + } +} +``` + +### 2. [Optional] Transaction Information Retrieval + +Each lane can define a factory that configures the necessary set of interfaces +required for transaction processing, ordering, and validation. Lanes are +designed such that any given chain can adopt upstream `POB` lanes as long as +developers implement the specified interface(s) associated with transaction +information retrieval for that lane. + +***A standard cosmos chain or EVM chain can then implement their own versions +of these interfaces and automatically utilize the lane with no changes upstream!*** + +For example, the free lane defines an `Factory` that includes a single +`IsFreeTx` function that allows developers to configure what is a free +transaction. The default implementation categorizes free transactions as any +transaction that includes a delegate type message. + +```go +// IsFreeTx defines a default function that checks if a transaction is free. In +// this case, any transaction that is a delegation/redelegation transaction is free. +func (config *DefaultFreeFactory) IsFreeTx(tx sdk.Tx) bool { + for _, msg := range tx.GetMsgs() { + switch msg.(type) { + case *types.MsgDelegate: + return true + case *types.MsgBeginRedelegate: + return true + case *types.MsgCancelUnbondingDelegation: + return true + } + } + + return false +} +``` + +### 3. Lane Inclusion Functionality + +Lanes must implement a `Match` interface which determines whether a transaction +should be considered for a given lane. Developer’s are encouraged to utilize the + same interfaces defined in the `Factory` to match transactions to lanes. For + example, developers might configure a top of block auction lane to accept + transactions if they contain a single `MsgAuctionBid` message in the transaction. + +### 4.1. [Optional] Transaction Validation + +Transactions will be verified the lane’s `VerifyTx` function. This logic can be +completely arbitrary. For example, the default lane verifies transactions +using base app’s `AnteHandler` while the top of block lane verifies transactions +by extracting all bundled transactions included in the bid transaction and then +verifying the transaction iteratively given the bundle. + +### 4.2. Block Building/Verification Logic + +Each lane will implement block building and verification logic - analogous to +`Prepare` and `Process` proposal - that is unique to itself. + +* `PrepareLane` will be in charge of building a partial block given the +transactions in the lane. +* `ProcessLaneBasic` ensures that transactions that should be included in the +current lane are not interleaved with other lanes i.e. transactions in +proposals are ordered respecting the ordering of lanes. +* `ProcessLane` will be in charge of verifying the lane’s partial block. + +### Inheritance + +Lanes can inherit the underlying implementation of other lanes and overwrite +any part of the implementation with their own custom functionality. We +recommend that user’s extend the functionality of the `Base` lane when first +exploring the code base. + diff --git a/blockbuster/abci/abci.go b/blockbuster/abci/abci.go new file mode 100644 index 00000000..3e5ddb57 --- /dev/null +++ b/blockbuster/abci/abci.go @@ -0,0 +1,207 @@ +package abci + +import ( + "fairyring/blockbuster" + "fairyring/blockbuster/lanes/terminator" + "fairyring/blockbuster/utils" + + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ( + // ProposalHandler is a wrapper around the ABCI++ PrepareProposal and ProcessProposal + // handlers. + ProposalHandler struct { + logger log.Logger + txDecoder sdk.TxDecoder + prepareLanesHandler blockbuster.PrepareLanesHandler + processLanesHandler blockbuster.ProcessLanesHandler + } +) + +// NewProposalHandler returns a new abci++ proposal handler. +func NewProposalHandler(logger log.Logger, txDecoder sdk.TxDecoder, mempool blockbuster.Mempool) *ProposalHandler { + return &ProposalHandler{ + logger: logger, + txDecoder: txDecoder, + prepareLanesHandler: ChainPrepareLanes(mempool.Registry()...), + processLanesHandler: ChainProcessLanes(mempool.Registry()...), + } +} + +// PrepareProposalHandler prepares the proposal by selecting transactions from each lane +// according to each lane's selection logic. We select transactions in a greedy fashion. Note that +// each lane has an boundary on the number of bytes that can be included in the proposal. By default, +// the default lane will not have a boundary on the number of bytes that can be included in the proposal and +// will include all valid transactions in the proposal (up to MaxTxBytes). +func (h *ProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { + return func(ctx sdk.Context, req abci.RequestPrepareProposal) (resp abci.ResponsePrepareProposal) { + // In the case where there is a panic, we recover here and return an empty proposal. + defer func() { + if err := recover(); err != nil { + h.logger.Error("failed to prepare proposal", "err", err) + resp = abci.ResponsePrepareProposal{Txs: make([][]byte, 0)} + } + }() + + proposal, err := h.prepareLanesHandler(ctx, blockbuster.NewProposal(req.MaxTxBytes)) + if err != nil { + h.logger.Error("failed to prepare proposal", "err", err) + return abci.ResponsePrepareProposal{Txs: make([][]byte, 0)} + } + + h.logger.Info( + "prepared proposal", + "num_txs", proposal.GetNumTxs(), + "total_tx_bytes", proposal.GetTotalTxBytes(), + ) + + return abci.ResponsePrepareProposal{ + Txs: proposal.GetProposal(), + } + } +} + +// ProcessProposalHandler processes the proposal by verifying all transactions in the proposal +// according to each lane's verification logic. We verify proposals in a greedy fashion. +// If a lane's portion of the proposal is invalid, we reject the proposal. After a lane's portion +// of the proposal is verified, we pass the remaining transactions to the next lane in the chain. +func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { + return func(ctx sdk.Context, req abci.RequestProcessProposal) (resp abci.ResponseProcessProposal) { + // In the case where any of the lanes panic, we recover here and return a reject status. + defer func() { + if err := recover(); err != nil { + h.logger.Error("failed to process proposal", "err", err) + resp = abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} + } + }() + + txs := req.Txs + if len(txs) == 0 { + h.logger.Info("accepted empty proposal") + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} + } + + // Decode the transactions from the proposal. + decodedTxs, err := utils.GetDecodedTxs(h.txDecoder, txs) + if err != nil { + h.logger.Error("failed to decode transactions", "err", err) + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} + } + + // Verify the proposal using the verification logic from each lane. + if _, err := h.processLanesHandler(ctx, decodedTxs); err != nil { + h.logger.Error("failed to validate the proposal", "err", err) + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} + } + + h.logger.Info("validated proposal", "num_txs", len(txs)) + + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} + } +} + +// ChainPrepareLanes chains together the proposal preparation logic from each lane +// into a single function. The first lane in the chain is the first lane to be prepared and +// the last lane in the chain is the last lane to be prepared. +// +// In the case where any of the lanes fail to prepare the partial proposal, the lane that failed +// will be skipped and the next lane in the chain will be called to prepare the proposal. +func ChainPrepareLanes(chain ...blockbuster.Lane) blockbuster.PrepareLanesHandler { + if len(chain) == 0 { + return nil + } + + // Handle non-terminated decorators chain + if (chain[len(chain)-1] != terminator.Terminator{}) { + chain = append(chain, terminator.Terminator{}) + } + + return func(ctx sdk.Context, partialProposal blockbuster.BlockProposal) (finalProposal blockbuster.BlockProposal, err error) { + lane := chain[0] + lane.Logger().Info("preparing lane", "lane", lane.Name()) + + // Cache the context in the case where any of the lanes fail to prepare the proposal. + cacheCtx, write := ctx.CacheContext() + + defer func() { + if rec := recover(); rec != nil || err != nil { + lane.Logger().Error("failed to prepare lane", "lane", lane.Name(), "err", err, "recover_error", rec) + + lanesRemaining := len(chain) + switch { + case lanesRemaining <= 2: + // If there are only two lanes remaining, then the first lane in the chain + // is the lane that failed to prepare the partial proposal and the second lane in the + // chain is the terminator lane. We return the proposal as is. + finalProposal, err = partialProposal, nil + default: + // If there are more than two lanes remaining, then the first lane in the chain + // is the lane that failed to prepare the proposal but the second lane in the + // chain is not the terminator lane so there could potentially be more transactions + // added to the proposal + maxTxBytesForLane := utils.GetMaxTxBytesForLane( + partialProposal.GetMaxTxBytes(), + partialProposal.GetTotalTxBytes(), + chain[1].GetMaxBlockSpace(), + ) + + finalProposal, err = chain[1].PrepareLane( + ctx, + partialProposal, + maxTxBytesForLane, + ChainPrepareLanes(chain[2:]...), + ) + } + } else { + // Write the cache to the context since we know that the lane successfully prepared + // the partial proposal. + write() + } + }() + + // Get the maximum number of bytes that can be included in the proposal for this lane. + maxTxBytesForLane := utils.GetMaxTxBytesForLane( + partialProposal.GetMaxTxBytes(), + partialProposal.GetTotalTxBytes(), + lane.GetMaxBlockSpace(), + ) + + return lane.PrepareLane( + cacheCtx, + partialProposal, + maxTxBytesForLane, + ChainPrepareLanes(chain[1:]...), + ) + } +} + +// ChainProcessLanes chains together the proposal verification logic from each lane +// into a single function. The first lane in the chain is the first lane to be verified and +// the last lane in the chain is the last lane to be verified. +func ChainProcessLanes(chain ...blockbuster.Lane) blockbuster.ProcessLanesHandler { + if len(chain) == 0 { + return nil + } + + // Handle non-terminated decorators chain + if (chain[len(chain)-1] != terminator.Terminator{}) { + chain = append(chain, terminator.Terminator{}) + } + + return func(ctx sdk.Context, proposalTxs []sdk.Tx) (sdk.Context, error) { + // Short circuit if there are no transactions to process. + if len(proposalTxs) == 0 { + return ctx, nil + } + + chain[0].Logger().Info("processing lane", "lane", chain[0].Name()) + if err := chain[0].ProcessLaneBasic(proposalTxs); err != nil { + return ctx, err + } + + return chain[0].ProcessLane(ctx, proposalTxs, ChainProcessLanes(chain[1:]...)) + } +} diff --git a/blockbuster/abci/check_tx.go b/blockbuster/abci/check_tx.go new file mode 100644 index 00000000..170f735f --- /dev/null +++ b/blockbuster/abci/check_tx.go @@ -0,0 +1,200 @@ +package abci + +import ( + "context" + "fmt" + + "fairyring/x/pep/types" + + cometabci "github.com/cometbft/cometbft/abci/types" + log "github.com/cometbft/cometbft/libs/log" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +type ( + // CheckTxHandler is a wrapper around baseapp's CheckTx method that allows us to + // verify aggregated keyshare transactions against the latest committed state. All other transactions + // are executed normally using base app's CheckTx. This defines all of the + // dependencies that are required to verify a keyshare transaction. + CheckTxHandler struct { + // baseApp is utilized to retrieve the latest committed state and to call + // baseapp's CheckTx method. + baseApp BaseApp + + // txDecoder is utilized to decode transactions to determine if they are + // keyshare transactions. + txDecoder sdk.TxDecoder + + // KeyShareLane is utilized to retrieve the keyshare info of a transaction and to + // insert a Keyshare transaction into the application-side mempool. + keyShareLane KeyShareLane + + // anteHandler is utilized to verify the keyshare transaction against the latest + // committed state. + anteHandler sdk.AnteHandler + + // chainID is the chain ID of the blockchain. + chainID string + } + + // CheckTx is baseapp's CheckTx method that checks the validity of a + // transaction. + CheckTx func(cometabci.RequestCheckTx) cometabci.ResponseCheckTx + + // KeyShareLane is the interface that defines all of the dependencies that + // are required to interact with the top of block lane. + KeyShareLane interface { + // GetKeyShareInfo is utilized to retrieve the Keyshare info of a transaction. + GetKeyShareInfo(tx sdk.Tx) (*types.AggregatedKeyShare, error) + + // Insert is utilized to insert a transaction into the application-side mempool. + Insert(ctx context.Context, tx sdk.Tx) error + + // Remove is utilized to delete a transaction from the application-side mempool. + Remove(tx sdk.Tx) error + } + + // BaseApp is an interface that allows us to call baseapp's CheckTx method + // as well as retrieve the latest committed state. + BaseApp interface { + // CommitMultiStore is utilized to retrieve the latest committed state. + CommitMultiStore() sdk.CommitMultiStore + + // CheckTx is baseapp's CheckTx method that checks the validity of a + // transaction. + CheckTx(cometabci.RequestCheckTx) cometabci.ResponseCheckTx + + // Logger is utilized to log errors. + Logger() log.Logger + + // LastBlockHeight is utilized to retrieve the latest block height. + LastBlockHeight() int64 + + // GetConsensusParams is utilized to retrieve the consensus params. + GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams + } +) + +// NewCheckTxHandler is a constructor for CheckTxHandler. +func NewCheckTxHandler( + baseApp BaseApp, + txDecoder sdk.TxDecoder, + keyShareLane KeyShareLane, + anteHandler sdk.AnteHandler, + chainID string, +) *CheckTxHandler { + return &CheckTxHandler{ + baseApp: baseApp, + txDecoder: txDecoder, + keyShareLane: keyShareLane, + anteHandler: anteHandler, + chainID: chainID, + } +} + +// CheckTxHandler is a wrapper around baseapp's CheckTx method that allows us to +// verify keyshare transactions against the latest committed state. All other transactions +// are executed normally. No state changes are applied to the state +// during this process. +func (handler *CheckTxHandler) CheckTx() CheckTx { + return func(req cometabci.RequestCheckTx) (resp cometabci.ResponseCheckTx) { + defer func() { + if err := recover(); err != nil { + resp = sdkerrors.ResponseCheckTxWithEvents(fmt.Errorf("panic in check tx handler: %s", err), 0, 0, nil, false) + } + }() + + tx, err := handler.txDecoder(req.Tx) + if err != nil { + return sdkerrors.ResponseCheckTxWithEvents(fmt.Errorf("failed to decode tx: %w", err), 0, 0, nil, false) + } + + // Attempt to get the keyshare info of the transaction. + ksInfo, err := handler.keyShareLane.GetKeyShareInfo(tx) + if err != nil { + return sdkerrors.ResponseCheckTxWithEvents(fmt.Errorf("failed to get keyshare info: %w", err), 0, 0, nil, false) + } + + // If this is not a keyshare transaction, we just execute it normally. + if ksInfo == nil { + return handler.baseApp.CheckTx(req) + } + + // We attempt to get the latest committed state in order to verify transactions + // as if they were to be executed at the top of the block. After verification, this + // context will be discarded and will not apply any state changes. + ctx := handler.GetContextForKeyshareTx(req) + + // Verify the keyshare transaction. + gasInfo, err := handler.ValidateKeyshareTx(ctx, tx, ksInfo) + if err != nil { + return sdkerrors.ResponseCheckTxWithEvents(fmt.Errorf("invalid keyshare tx: %w", err), gasInfo.GasWanted, gasInfo.GasUsed, nil, false) + } + + // If the keyshare transaction is valid, we know we can insert it into the mempool for consideration in the next block. + if err := handler.keyShareLane.Insert(ctx, tx); err != nil { + return sdkerrors.ResponseCheckTxWithEvents(fmt.Errorf("invalid keyshare tx; failed to insert keyshare transaction into mempool: %w", err), gasInfo.GasWanted, gasInfo.GasUsed, nil, false) + } + + return cometabci.ResponseCheckTx{ + Code: cometabci.CodeTypeOK, + GasWanted: int64(gasInfo.GasWanted), + GasUsed: int64(gasInfo.GasUsed), + } + } +} + +// ValidateKeyshareTx is utilized to verify the keyshare transaction against the latest committed state. +func (handler *CheckTxHandler) ValidateKeyshareTx(ctx sdk.Context, ksTx sdk.Tx, ksInfo *types.AggregatedKeyShare) (sdk.GasInfo, error) { + // Verify the keyshare transaction. + ctx, err := handler.anteHandler(ctx, ksTx, false) + if err != nil { + return sdk.GasInfo{}, fmt.Errorf("invalid keyshare tx; failed to execute ante handler: %w", err) + } + + // Store the gas info and priority of the keyshare transaction before applying changes with other transactions. + gasInfo := sdk.GasInfo{ + GasWanted: ctx.GasMeter().Limit(), + GasUsed: ctx.GasMeter().GasConsumed(), + } + + if _, err = handler.anteHandler(ctx, ksTx, false); err != nil { + return gasInfo, fmt.Errorf("invalid keyshare tx; failed to execute transaction: %w", err) + } + + return gasInfo, nil +} + +// GetContextForTx is returns the latest committed state and sets the context given +// the checkTx request. +func (handler *CheckTxHandler) GetContextForKeyshareTx(req cometabci.RequestCheckTx) sdk.Context { + // Retrieve the commit multi-store which is used to retrieve the latest committed state. + ms := handler.baseApp.CommitMultiStore().CacheMultiStore() + + // Create a new context based off of the latest committed state. + header := tmproto.Header{ + Height: handler.baseApp.LastBlockHeight(), + ChainID: handler.chainID, // TODO: Replace with actual chain ID. This is currently not exposed by the app. + } + ctx, _ := sdk.NewContext(ms, header, true, handler.baseApp.Logger()).CacheContext() + + // Set the context to the correct checking mode. + switch req.Type { + case cometabci.CheckTxType_New: + ctx = ctx.WithIsCheckTx(true) + case cometabci.CheckTxType_Recheck: + ctx = ctx.WithIsReCheckTx(true) + default: + panic("unknown check tx type") + } + + // Set the remaining important context values. + ctx = ctx. + WithTxBytes(req.Tx). + WithEventManager(sdk.NewEventManager()). + WithConsensusParams(handler.baseApp.GetConsensusParams(ctx)) + + return ctx +} diff --git a/blockbuster/lane.go b/blockbuster/lane.go new file mode 100644 index 00000000..820db75d --- /dev/null +++ b/blockbuster/lane.go @@ -0,0 +1,116 @@ +package blockbuster + +import ( + "fmt" + + "github.com/cometbft/cometbft/libs/log" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" +) + +type ( + // PrepareLanesHandler wraps all of the lanes Prepare function into a single chained + // function. You can think of it like an AnteHandler, but for preparing proposals in the + // context of lanes instead of modules. + PrepareLanesHandler func(ctx sdk.Context, proposal BlockProposal) (BlockProposal, error) + + // ProcessLanesHandler wraps all of the lanes Process functions into a single chained + // function. You can think of it like an AnteHandler, but for processing proposals in the + // context of lanes instead of modules. + ProcessLanesHandler func(ctx sdk.Context, txs []sdk.Tx) (sdk.Context, error) + + // BaseLaneConfig defines the basic functionality needed for a lane. + BaseLaneConfig struct { + Logger log.Logger + TxEncoder sdk.TxEncoder + TxDecoder sdk.TxDecoder + AnteHandler sdk.AnteHandler + + // MaxBlockSpace defines the relative percentage of block space that can be + // used by this lane. NOTE: If this is set to zero, then there is no limit + // on the number of transactions that can be included in the block for this + // lane (up to maxTxBytes as provided by the request). This is useful for the default lane. + MaxBlockSpace sdk.Dec + + // IgnoreList defines the list of lanes to ignore when processing transactions. This + // is useful for when you want lanes to exist after the default lane. For example, + // say there are two lanes: default and free. The free lane should be processed after + // the default lane. In this case, the free lane should be added to the ignore list + // of the default lane. Otherwise, the transactions that belong to the free lane + // will be processed by the default lane. + IgnoreList []Lane + } + + // Lane defines an interface used for block construction + Lane interface { + sdkmempool.Mempool + + // Name returns the name of the lane. + Name() string + + // Match determines if a transaction belongs to this lane. + Match(tx sdk.Tx) bool + + // VerifyTx verifies the transaction belonging to this lane. + VerifyTx(ctx sdk.Context, tx sdk.Tx) error + + // Contains returns true if the mempool contains the given transaction. + Contains(tx sdk.Tx) (bool, error) + + // PrepareLane builds a portion of the block. It inputs the maxTxBytes that can be + // included in the proposal for the given lane, the partial proposal, and a function + // to call the next lane in the chain. The next lane in the chain will be called with + // the updated proposal and context. + PrepareLane(ctx sdk.Context, proposal BlockProposal, maxTxBytes int64, next PrepareLanesHandler) (BlockProposal, error) + + // ProcessLaneBasic validates that transactions belonging to this lane are not misplaced + // in the block proposal. + ProcessLaneBasic(txs []sdk.Tx) error + + // ProcessLane verifies this lane's portion of a proposed block. It inputs the transactions + // that may belong to this lane and a function to call the next lane in the chain. The next + // lane in the chain will be called with the updated context and filtered down transactions. + ProcessLane(ctx sdk.Context, proposalTxs []sdk.Tx, next ProcessLanesHandler) (sdk.Context, error) + + // SetAnteHandler sets the lane's antehandler. + SetAnteHandler(antehander sdk.AnteHandler) + + // Logger returns the lane's logger. + Logger() log.Logger + + // GetMaxBlockSpace returns the max block space for the lane as a relative percentage. + GetMaxBlockSpace() sdk.Dec + } +) + +// NewLaneConfig returns a new LaneConfig. This will be embedded in a lane. +func NewBaseLaneConfig(logger log.Logger, txEncoder sdk.TxEncoder, txDecoder sdk.TxDecoder, anteHandler sdk.AnteHandler, maxBlockSpace sdk.Dec) BaseLaneConfig { + return BaseLaneConfig{ + Logger: logger, + TxEncoder: txEncoder, + TxDecoder: txDecoder, + AnteHandler: anteHandler, + MaxBlockSpace: maxBlockSpace, + } +} + +// ValidateBasic validates the lane configuration. +func (c *BaseLaneConfig) ValidateBasic() error { + if c.Logger == nil { + return fmt.Errorf("logger cannot be nil") + } + + if c.TxEncoder == nil { + return fmt.Errorf("tx encoder cannot be nil") + } + + if c.TxDecoder == nil { + return fmt.Errorf("tx decoder cannot be nil") + } + + if c.MaxBlockSpace.IsNil() || c.MaxBlockSpace.IsNegative() || c.MaxBlockSpace.GT(sdk.OneDec()) { + return fmt.Errorf("max block space must be set to a value between 0 and 1") + } + + return nil +} diff --git a/blockbuster/lanes/base/abci.go b/blockbuster/lanes/base/abci.go new file mode 100644 index 00000000..a753d4bc --- /dev/null +++ b/blockbuster/lanes/base/abci.go @@ -0,0 +1,129 @@ +package base + +import ( + "fmt" + + "fairyring/blockbuster" + "fairyring/blockbuster/utils" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// PrepareLane will prepare a partial proposal for the default lane. It will select and include +// all valid transactions in the mempool that are not already in the partial proposal. +// The default lane orders transactions by the sdk.Context priority. +func (l *DefaultLane) PrepareLane( + ctx sdk.Context, + proposal blockbuster.BlockProposal, + maxTxBytes int64, + next blockbuster.PrepareLanesHandler, +) (blockbuster.BlockProposal, error) { + // Define all of the info we need to select transactions for the partial proposal. + var ( + totalSize int64 + txsToAdd [][]byte + txsToRemove = make(map[sdk.Tx]struct{}, 0) + ) + + // Select all transactions in the mempool that are valid and not already in the + // partial proposal. + for iterator := l.Mempool.Select(ctx, nil); iterator != nil; iterator = iterator.Next() { + tx := iterator.Tx() + + txBytes, hash, err := utils.GetTxHashStr(l.Cfg.TxEncoder, tx) + if err != nil { + txsToRemove[tx] = struct{}{} + continue + } + + // if the transaction is already in the (partial) block proposal, we skip it. + if proposal.Contains(txBytes) { + continue + } + + // If the transaction is too large, we break and do not attempt to include more txs. + txSize := int64(len(txBytes)) + if updatedSize := totalSize + txSize; updatedSize > maxTxBytes { + break + } + + // Verify the transaction. + if err := l.VerifyTx(ctx, tx); err != nil { + l.Logger().Info( + "failed to verify tx", + "tx_hash", hash, + "err", err, + ) + txsToRemove[tx] = struct{}{} + continue + } + + totalSize += txSize + txsToAdd = append(txsToAdd, txBytes) + } + + // Remove all transactions that were invalid during the creation of the partial proposal. + if err := utils.RemoveTxsFromLane(txsToRemove, l.Mempool); err != nil { + return proposal, err + } + + // Update the partial proposal with the selected transactions. If the proposal is unable to + // be updated, we return an error. The proposal will only be modified if it passes all + // of the invarient checks. + if err := proposal.UpdateProposal(l, txsToAdd); err != nil { + return proposal, err + } + + return next(ctx, proposal) +} + +// ProcessLane verifies the default lane's portion of a block proposal. Since the default lane's +// ProcessLaneBasic function ensures that all of the default transactions are in the correct order, +// we only need to verify the contiguous set of transactions that match to the default lane. +func (l *DefaultLane) ProcessLane(ctx sdk.Context, txs []sdk.Tx, next blockbuster.ProcessLanesHandler) (sdk.Context, error) { + for index, tx := range txs { + if l.Match(tx) { + if err := l.VerifyTx(ctx, tx); err != nil { + return ctx, fmt.Errorf("failed to verify tx: %w", err) + } + } else { + return next(ctx, txs[index:]) + } + } + + // This means we have processed all transactions in the proposal. + return ctx, nil +} + +// transactions that belong to this lane are not misplaced in the block proposal i.e. +// the proposal only contains contiguous transactions that belong to this lane - there +// can be no interleaving of transactions from other lanes. +func (l *DefaultLane) ProcessLaneBasic(txs []sdk.Tx) error { + seenOtherLaneTx := false + lastSeenIndex := 0 + + for _, tx := range txs { + if l.Match(tx) { + if seenOtherLaneTx { + return fmt.Errorf("the %s lane contains a transaction that belongs to another lane", l.Name()) + } + + lastSeenIndex++ + continue + } + + seenOtherLaneTx = true + } + + return nil +} + +// VerifyTx does basic verification of the transaction using the ante handler. +func (l *DefaultLane) VerifyTx(ctx sdk.Context, tx sdk.Tx) error { + if l.Cfg.AnteHandler != nil { + _, err := l.Cfg.AnteHandler(ctx, tx, false) + return err + } + + return nil +} diff --git a/blockbuster/lanes/base/lane.go b/blockbuster/lanes/base/lane.go new file mode 100644 index 00000000..5d6aff2a --- /dev/null +++ b/blockbuster/lanes/base/lane.go @@ -0,0 +1,79 @@ +package base + +import ( + "fairyring/blockbuster" + + "github.com/cometbft/cometbft/libs/log" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + // LaneName defines the name of the default lane. + LaneName = "default" +) + +var _ blockbuster.Lane = (*DefaultLane)(nil) + +// DefaultLane defines a default lane implementation. The default lane orders +// transactions by the sdk.Context priority. The default lane will accept any +// transaction that is not a part of the lane's IgnoreList. By default, the IgnoreList +// is empty and the default lane will accept any transaction. The default lane on its +// own implements the same functionality as the pre v0.47.0 tendermint mempool and proposal +// handlers. +type DefaultLane struct { + // Mempool defines the mempool for the lane. + Mempool + + // LaneConfig defines the base lane configuration. + Cfg blockbuster.BaseLaneConfig +} + +// NewDefaultLane returns a new default lane. +func NewDefaultLane(cfg blockbuster.BaseLaneConfig) *DefaultLane { + if err := cfg.ValidateBasic(); err != nil { + panic(err) + } + + return &DefaultLane{ + Mempool: NewDefaultMempool(cfg.TxEncoder), + Cfg: cfg, + } +} + +// Match returns true if the transaction belongs to this lane. Since +// this is the default lane, it always returns true except for transactions +// that belong to lanes in the ignore list. +func (l *DefaultLane) Match(tx sdk.Tx) bool { + for _, lane := range l.Cfg.IgnoreList { + if lane.Match(tx) { + return false + } + } + + return true +} + +// Name returns the name of the lane. +func (l *DefaultLane) Name() string { + return LaneName +} + +// Logger returns the lane's logger. +func (l *DefaultLane) Logger() log.Logger { + return l.Cfg.Logger +} + +// SetAnteHandler sets the lane's antehandler. +func (l *DefaultLane) SetAnteHandler(anteHandler sdk.AnteHandler) { + l.Cfg.AnteHandler = anteHandler +} + +// GetMaxBlockSpace returns the maximum block space for the lane as a relative percentage. +func (l *DefaultLane) GetMaxBlockSpace() sdk.Dec { + return l.Cfg.MaxBlockSpace +} + +// GetIgnoreList returns the lane's ignore list. +func (l *DefaultLane) GetIgnoreList() []blockbuster.Lane { + return l.Cfg.IgnoreList +} diff --git a/blockbuster/lanes/base/mempool.go b/blockbuster/lanes/base/mempool.go new file mode 100644 index 00000000..3ea90b34 --- /dev/null +++ b/blockbuster/lanes/base/mempool.go @@ -0,0 +1,109 @@ +package base + +import ( + "context" + "errors" + "fmt" + + "fairyring/blockbuster" + "fairyring/blockbuster/utils" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" +) + +var _ sdkmempool.Mempool = (*DefaultMempool)(nil) + +type ( + // Mempool defines the interface of the default mempool. + Mempool interface { + sdkmempool.Mempool + + // Contains returns true if the transaction is contained in the mempool. + Contains(tx sdk.Tx) (bool, error) + } + + // DefaultMempool defines the most basic mempool. It can be seen as an extension of + // an SDK PriorityNonceMempool, i.e. a mempool that supports + // two-dimensional priority ordering, with the additional support of prioritizing + // and indexing transactions. + DefaultMempool struct { + // index defines an index transactions. + index sdkmempool.Mempool + + // txEncoder defines the sdk.Tx encoder that allows us to encode transactions + // to bytes. + txEncoder sdk.TxEncoder + + // txIndex is a map of all transactions in the mempool. It is used + // to quickly check if a transaction is already in the mempool. + txIndex map[string]struct{} + } +) + +// NewDefaultMempool returns a new default mempool instance. The default mempool +// orders transactions by the sdk.Context priority. +func NewDefaultMempool(txEncoder sdk.TxEncoder) *DefaultMempool { + return &DefaultMempool{ + index: blockbuster.NewPriorityMempool( + blockbuster.DefaultPriorityNonceMempoolConfig(), + ), + txEncoder: txEncoder, + txIndex: make(map[string]struct{}), + } +} + +// Insert inserts a transaction into the mempool based on the transaction type (normal or keyshare). +func (am *DefaultMempool) Insert(ctx context.Context, tx sdk.Tx) error { + if err := am.index.Insert(ctx, tx); err != nil { + return fmt.Errorf("failed to insert tx into keyshare index: %w", err) + } + + _, txHashStr, err := utils.GetTxHashStr(am.txEncoder, tx) + if err != nil { + return err + } + + am.txIndex[txHashStr] = struct{}{} + + return nil +} + +// Remove removes a transaction from the mempool based on the transaction type (normal or keyshare). +func (am *DefaultMempool) Remove(tx sdk.Tx) error { + am.removeTx(am.index, tx) + return nil +} + +func (am *DefaultMempool) Select(ctx context.Context, txs [][]byte) sdkmempool.Iterator { + return am.index.Select(ctx, txs) +} + +func (am *DefaultMempool) CountTx() int { + return am.index.CountTx() +} + +// Contains returns true if the transaction is contained in the mempool. +func (am *DefaultMempool) Contains(tx sdk.Tx) (bool, error) { + _, txHashStr, err := utils.GetTxHashStr(am.txEncoder, tx) + if err != nil { + return false, fmt.Errorf("failed to get tx hash string: %w", err) + } + + _, ok := am.txIndex[txHashStr] + return ok, nil +} + +func (am *DefaultMempool) removeTx(mp sdkmempool.Mempool, tx sdk.Tx) { + err := mp.Remove(tx) + if err != nil && !errors.Is(err, sdkmempool.ErrTxNotFound) { + panic(fmt.Errorf("failed to remove invalid transaction from the mempool: %w", err)) + } + + _, txHashStr, err := utils.GetTxHashStr(am.txEncoder, tx) + if err != nil { + panic(fmt.Errorf("failed to get tx hash string: %w", err)) + } + + delete(am.txIndex, txHashStr) +} diff --git a/blockbuster/lanes/keyshare/abci.go b/blockbuster/lanes/keyshare/abci.go new file mode 100644 index 00000000..109f7434 --- /dev/null +++ b/blockbuster/lanes/keyshare/abci.go @@ -0,0 +1,165 @@ +package keyshare + +import ( + "fmt" + + "fairyring/blockbuster" + "fairyring/blockbuster/utils" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// PrepareLane will attempt to select the keyshare transactions that are valid +// and include them in the proposal. It will return an empty partial proposal +// if no valid keyshare transactions are found. +func (l *KeyShareLane) PrepareLane( + ctx sdk.Context, + proposal blockbuster.BlockProposal, + maxTxBytes int64, + next blockbuster.PrepareLanesHandler, +) (blockbuster.BlockProposal, error) { + // Define all of the info we need to select transactions for the partial proposal. + var ( + keyshareTxs [][]byte + txsToRemove = make(map[sdk.Tx]struct{}, 0) + ) + + // Attempt to select the valid keyshare txs + keyshareTxIterator := l.Mempool.Select(ctx, nil) +selectKeyshareTxLoop: + for ; keyshareTxIterator != nil; keyshareTxIterator = keyshareTxIterator.Next() { + cacheCtx, write := ctx.CacheContext() + tmpKeyshareTx := keyshareTxIterator.Tx() + + keyshareTxBz, hash, err := utils.GetTxHashStr(l.Cfg.TxEncoder, tmpKeyshareTx) + if err != nil { + txsToRemove[tmpKeyshareTx] = struct{}{} + continue selectKeyshareTxLoop + } + + // if the transaction is already in the (partial) block proposal, we skip it. + if proposal.Contains(keyshareTxBz) { + continue selectKeyshareTxLoop + } + + keyshareTxSize := int64(len(keyshareTxBz)) + if keyshareTxSize <= maxTxBytes { + // Verify the keyshare transaction + if err := l.VerifyTx(cacheCtx, tmpKeyshareTx); err != nil { + l.Logger().Info( + "failed to verify aggregate keyshare tx", + "tx_hash", hash, + "err", err, + ) + txsToRemove[tmpKeyshareTx] = struct{}{} + continue selectKeyshareTxLoop + } + + // Build the partial proposal by selecting the keyshare transaction + keyshareInfo, err := l.GetKeyShareInfo(tmpKeyshareTx) + if keyshareInfo == nil || err != nil { + txsToRemove[tmpKeyshareTx] = struct{}{} + continue selectKeyshareTxLoop + } + + // At this point, and all the keyshare transactions are valid. + // So we select them bid and also mark these transactions as seen and + // update the total size selected thus far. + keyshareTxs = append(keyshareTxs, keyshareTxBz) + + // Write the cache context to the original context when we know we have a + // valid top of block bundle. + write() + + } else { + l.Cfg.Logger.Info( + "failed to select keyshare tx for lane; tx size is too large", + "tx_size", keyshareTxSize, + "max_size", maxTxBytes, + ) + } + } + + // Remove all transactions that were invalid during the creation of the partial proposal. + if err := utils.RemoveTxsFromLane(txsToRemove, l.Mempool); err != nil { + return proposal, err + } + + // Update the proposal with the selected transactions. This will only return an error + // if the invarient checks are not passed. In the case when this errors, the original proposal + // will be returned (without the selected transactions from this lane). + if err := proposal.UpdateProposal(l, keyshareTxs); err != nil { + return proposal, err + } + return next(ctx, proposal) +} + +// ProcessLane will ensure that block proposals that include transactions from +// the keyshare lane are valid. +func (l *KeyShareLane) ProcessLane(ctx sdk.Context, txs []sdk.Tx, next blockbuster.ProcessLanesHandler) (sdk.Context, error) { + var countKeyshareTxs = 0 + + for _, keyshareTx := range txs { + if !l.Match(keyshareTx) { + return next(ctx, txs[countKeyshareTxs:]) + } + + _, err := l.GetKeyShareInfo(keyshareTx) + if err != nil { + return ctx, fmt.Errorf("failed to get keyshare info for lane %s: %w", l.Name(), err) + } + + if err := l.VerifyTx(ctx, keyshareTx); err != nil { + return ctx, fmt.Errorf("invalid keyshare tx: %w", err) + } + + countKeyshareTxs = countKeyshareTxs + 1 + } + + return next(ctx, txs[countKeyshareTxs:]) +} + +// ProcessLaneBasic ensures that if keyshare transactions are present in a proposal, +// - they are the first transaction in the partial proposal +// - there are no other aggregate keyshare transactions in the proposal +func (l *KeyShareLane) ProcessLaneBasic(txs []sdk.Tx) error { + // If there are keyshare transaction, they must be the first transactions in the block proposal. + + for index, keyshareTx := range txs { + if !l.Match(keyshareTx) { + for _, tx := range txs[index:] { + if l.Match(tx) { + return fmt.Errorf("misplaced keyshare transactions in lane %s", l.Name()) + } + } + } + } + return nil +} + +// VerifyTx will verify that the keyshare transaction is valid. +// It will return an error if the transaction is invalid. +func (l *KeyShareLane) VerifyTx(ctx sdk.Context, keyshareTx sdk.Tx) error { + _, err := l.GetKeyShareInfo(keyshareTx) + if err != nil { + return fmt.Errorf("failed to get keyshare info: %w", err) + } + + // verify the keyshare transaction + _, err = l.verifyTx(ctx, keyshareTx) + if err != nil { + return fmt.Errorf("invalid keyshare tx; failed to execute ante handler: %w", err) + } + return nil +} + +// verifyTx will execute the ante handler on the transaction and return the +// resulting context and error. +func (l *KeyShareLane) verifyTx(ctx sdk.Context, tx sdk.Tx) (sdk.Context, error) { + if l.Cfg.AnteHandler != nil { + newCtx, err := l.Cfg.AnteHandler(ctx, tx, false) + return newCtx, err + } + + return ctx, nil +} diff --git a/blockbuster/lanes/keyshare/factory.go b/blockbuster/lanes/keyshare/factory.go new file mode 100644 index 00000000..184e65e6 --- /dev/null +++ b/blockbuster/lanes/keyshare/factory.go @@ -0,0 +1,85 @@ +package keyshare + +import ( + "errors" + "fairyring/x/pep/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ( + // Factory defines the interface for processing AggregateKeyShare transactions. It is + // a wrapper around all of the functionality that each application chain must implement + // in order for Aggregated keyshare processing to work. + Factory interface { + // IsKeyshareTx defines a function that checks if a transaction qualifies as AggregateKeyshare Tx. + IsKeyshareTx(tx sdk.Tx) bool + + // GetKeyShareInfo defines a function that returns the Aggregated KeyShare info from the Tx + GetKeyShareInfo(tx sdk.Tx) (*types.AggregatedKeyShare, error) + } + + // DefaultKeyshareFactory defines a default implmentation for the keyshare factory interface + // for processing aggregate keyshare transactions. + DefaultKeyshareFactory struct { + txDecoder sdk.TxDecoder + } + + // TxWithTimeoutHeight is used to extract timeouts from sdk.Tx transactions. In the case where, + // timeouts are explicitly set on the sdk.Tx, we can use this interface to extract the timeout. + TxWithTimeoutHeight interface { + sdk.Tx + + GetTimeoutHeight() uint64 + } +) + +var _ Factory = (*DefaultKeyshareFactory)(nil) + +// NewDefaultKeyshareFactory returns a default keyshare factory interface implementation. +func NewDefaultKeyshareFactory(txDecoder sdk.TxDecoder) Factory { + return &DefaultKeyshareFactory{ + txDecoder: txDecoder, + } +} + +func (config *DefaultKeyshareFactory) IsKeyshareTx(tx sdk.Tx) bool { + msgs := tx.GetMsgs() + if len(msgs) != 1 { + return false + } + + switch msgs[0].(type) { + case *types.MsgCreateAggregatedKeyShare: + return true + } + + return false +} + +func (config *DefaultKeyshareFactory) GetKeyShareInfo(tx sdk.Tx) (*types.AggregatedKeyShare, error) { + msg, err := GetAggregateKeyshareMsgFromTx(tx) + if err != nil { + return nil, err + } + + return &types.AggregatedKeyShare{ + Height: msg.Height, + Data: msg.Data, + Creator: msg.Creator, + }, nil +} + +func GetAggregateKeyshareMsgFromTx(tx sdk.Tx) (*types.MsgCreateAggregatedKeyShare, error) { + msgs := tx.GetMsgs() + if len(msgs) != 1 { + return nil, errors.New("invalid MsgCreateAggregatedKeyShare transaction") + } + + t, ok := msgs[0].(*types.MsgCreateAggregatedKeyShare) + if ok { + return t, nil + } + + return nil, errors.New("invalid MsgCreateAggregatedKeyShare transaction") +} diff --git a/blockbuster/lanes/keyshare/lane.go b/blockbuster/lanes/keyshare/lane.go new file mode 100644 index 00000000..a475ead9 --- /dev/null +++ b/blockbuster/lanes/keyshare/lane.go @@ -0,0 +1,60 @@ +package keyshare + +import ( + "fairyring/blockbuster" + "fairyring/blockbuster/lanes/base" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + // LaneName defines the name of the free lane. + LaneName = "keyshare" +) + +var ( + _ blockbuster.Lane = (*KeyShareLane)(nil) + _ Factory = (*KeyShareLane)(nil) +) + +// KeyShareLane defines the lane that is responsible for processing AggregateKeyShare transactions. +type KeyShareLane struct { + // Mempool defines the mempool for the lane. + Mempool + + // LaneConfig defines the base lane configuration. + *base.DefaultLane + + // Factory defines the API/functionality which is responsible for determining + // if a transaction is a aggregateKeyshare transaction and how to extract relevant + // information from the transaction (creator Address). + Factory +} + +// NewKeyShareLane returns a new KeyShare lane. +func NewKeyShareLane( + cfg blockbuster.BaseLaneConfig, + maxTx int, + af Factory, +) *KeyShareLane { + if err := cfg.ValidateBasic(); err != nil { + panic(err) + } + + return &KeyShareLane{ + Mempool: NewMempool(cfg.TxEncoder, maxTx, af), + DefaultLane: base.NewDefaultLane(cfg), + Factory: af, + } +} + +// Match returns true if the transaction is a aated keyshareggreg transaction. +// This is determined by the KeyShareFactory. +func (l *KeyShareLane) Match(tx sdk.Tx) bool { + return l.IsKeyshareTx(tx) +} + +// Name returns the name of the lane. +func (l *KeyShareLane) Name() string { + return LaneName +} diff --git a/blockbuster/lanes/keyshare/mempool.go b/blockbuster/lanes/keyshare/mempool.go new file mode 100644 index 00000000..be91994f --- /dev/null +++ b/blockbuster/lanes/keyshare/mempool.go @@ -0,0 +1,165 @@ +package keyshare + +import ( + "context" + "errors" + "fmt" + "strconv" + + "fairyring/blockbuster" + "fairyring/blockbuster/utils" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" +) + +var _ Mempool = (*KeyShareMempool)(nil) + +type ( + // Mempool defines the interface of the keyshare mempool. + Mempool interface { + sdkmempool.Mempool + + // Contains returns true if the transaction is contained in the mempool. + Contains(tx sdk.Tx) (bool, error) + } + + // KeyShareMempool defines an KeyShare mempool. It can be seen as an extension of + // an SDK PriorityNonceMempool, i.e. a mempool that supports + // two-dimensional priority ordering, with the additional support of prioritizing + // and indexing submitted aggregated keyshares. + KeyShareMempool struct { + // index defines an index of submitted keyshares. + index sdkmempool.Mempool + + // txEncoder defines the sdk.Tx encoder that allows us to encode transactions + // to bytes. + txEncoder sdk.TxEncoder + + // txIndex is a map of all transactions in the mempool. It is used + // to quickly check if a transaction is already in the mempool. + txIndex map[string]struct{} + + // Factory implements the functionality required to process AggregateKeyshare transactions. + Factory + } +) + +// TxPriority returns a TxPriority over AggregatedKeyShare transactions only. It +// is to be used in the AggregatedKeyShare index only. +func TxPriority(config Factory) blockbuster.TxPriority[string] { + return blockbuster.TxPriority[string]{ + GetTxPriority: func(goCtx context.Context, tx sdk.Tx) string { + ksInfo, err := config.GetKeyShareInfo(tx) + if err != nil { + panic(err) + } + + return strconv.FormatUint(ksInfo.Height, 10) + }, + Compare: func(a, b string) int { + aUint, _ := strconv.ParseUint(a, 10, 64) + bUint, _ := strconv.ParseUint(b, 10, 64) + + switch { + case aUint < bUint: + return 1 + case aUint > bUint: + return -1 + default: + return 0 + } + }, + MinValue: "", + } +} + +// NewMempool returns a new AggregateKeyShare mempool. +func NewMempool(txEncoder sdk.TxEncoder, maxTx int, config Factory) *KeyShareMempool { + return &KeyShareMempool{ + index: blockbuster.NewPriorityMempool( + blockbuster.PriorityNonceMempoolConfig[string]{ + TxPriority: TxPriority(config), + MaxTx: maxTx, + }, + ), + txEncoder: txEncoder, + txIndex: make(map[string]struct{}), + Factory: config, + } +} + +// Insert inserts a transaction into the KeyShare mempool. +func (am *KeyShareMempool) Insert(ctx context.Context, tx sdk.Tx) error { + ksInfo, err := am.GetKeyShareInfo(tx) + if err != nil { + return err + } + + // This mempool only supports aggrgayted Keyshare transactions. + if ksInfo == nil { + return fmt.Errorf("invalid transaction type") + } + + if err := am.index.Insert(ctx, tx); err != nil { + return fmt.Errorf("failed to insert tx into keyshare index: %w", err) + } + + _, txHashStr, err := utils.GetTxHashStr(am.txEncoder, tx) + if err != nil { + return err + } + + am.txIndex[txHashStr] = struct{}{} + + return nil +} + +// Remove removes a transaction from the mempool based. +func (am *KeyShareMempool) Remove(tx sdk.Tx) error { + ksInfo, err := am.GetKeyShareInfo(tx) + if err != nil { + return err + } + + // This mempool only supports aggregated keyshare transactions. + if ksInfo == nil { + return fmt.Errorf("invalid transaction type") + } + + am.removeTx(am.index, tx) + + return nil +} + +func (am *KeyShareMempool) Select(ctx context.Context, txs [][]byte) sdkmempool.Iterator { + return am.index.Select(ctx, txs) +} + +func (am *KeyShareMempool) CountTx() int { + return am.index.CountTx() +} + +// Contains returns true if the transaction is contained in the mempool. +func (am *KeyShareMempool) Contains(tx sdk.Tx) (bool, error) { + _, txHashStr, err := utils.GetTxHashStr(am.txEncoder, tx) + if err != nil { + return false, fmt.Errorf("failed to get tx hash string: %w", err) + } + + _, ok := am.txIndex[txHashStr] + return ok, nil +} + +func (am *KeyShareMempool) removeTx(mp sdkmempool.Mempool, tx sdk.Tx) { + if err := mp.Remove(tx); err != nil && !errors.Is(err, sdkmempool.ErrTxNotFound) { + panic(fmt.Errorf("failed to remove invalid transaction from the mempool: %w", err)) + } + + _, txHashStr, err := utils.GetTxHashStr(am.txEncoder, tx) + if err != nil { + panic(fmt.Errorf("failed to get tx hash string: %w", err)) + } + + delete(am.txIndex, txHashStr) +} diff --git a/blockbuster/lanes/terminator/lane.go b/blockbuster/lanes/terminator/lane.go new file mode 100644 index 00000000..7570d78d --- /dev/null +++ b/blockbuster/lanes/terminator/lane.go @@ -0,0 +1,104 @@ +package terminator + +import ( + "context" + "fmt" + + "fairyring/blockbuster" + + "github.com/cometbft/cometbft/libs/log" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" +) + +// Terminator Lane will get added to the chain to simplify chaining code so that we +// don't need to check if next == nil further up the chain +// +// sniped from the sdk +// +// ______ +// <((((((\\\ +// / . }\ +// ;--..--._|} +// (\ '--/\--' ) +// \\ | '-' :'| +// \\ . -==- .-| +// \\ \.__.' \--._ +// [\\ __.--| // _/'--. +// \ \\ .'-._ ('-----'/ __/ \ +// \ \\ / __>| | '--. | +// \ \\ | \ | / / / +// \ '\ / \ | | _/ / +// \ \ \ | | / / +// snd \ \ \ / +type Terminator struct{} + +var _ blockbuster.Lane = (*Terminator)(nil) + +// PrepareLane is a no-op +func (t Terminator) PrepareLane(_ sdk.Context, proposal blockbuster.BlockProposal, _ int64, _ blockbuster.PrepareLanesHandler) (blockbuster.BlockProposal, error) { + return proposal, nil +} + +// ProcessLane is a no-op +func (t Terminator) ProcessLane(ctx sdk.Context, _ []sdk.Tx, _ blockbuster.ProcessLanesHandler) (sdk.Context, error) { + return ctx, nil +} + +// Name returns the name of the lane +func (t Terminator) Name() string { + return "Terminator" +} + +// Match is a no-op +func (t Terminator) Match(sdk.Tx) bool { + return false +} + +// VerifyTx is a no-op +func (t Terminator) VerifyTx(sdk.Context, sdk.Tx) error { + return fmt.Errorf("Terminator lane should not be called") +} + +// Contains is a no-op +func (t Terminator) Contains(sdk.Tx) (bool, error) { + return false, nil +} + +// CountTx is a no-op +func (t Terminator) CountTx() int { + return 0 +} + +// Insert is a no-op +func (t Terminator) Insert(context.Context, sdk.Tx) error { + return nil +} + +// Remove is a no-op +func (t Terminator) Remove(sdk.Tx) error { + return nil +} + +// Select is a no-op +func (t Terminator) Select(context.Context, [][]byte) sdkmempool.Iterator { + return nil +} + +// ValidateLaneBasic is a no-op +func (t Terminator) ProcessLaneBasic([]sdk.Tx) error { + return nil +} + +// SetLaneConfig is a no-op +func (t Terminator) SetAnteHandler(sdk.AnteHandler) {} + +// Logger is a no-op +func (t Terminator) Logger() log.Logger { + return log.NewNopLogger() +} + +// GetMaxBlockSpace is a no-op +func (t Terminator) GetMaxBlockSpace() sdk.Dec { + return sdk.ZeroDec() +} diff --git a/blockbuster/mempool.go b/blockbuster/mempool.go new file mode 100644 index 00000000..969cfc99 --- /dev/null +++ b/blockbuster/mempool.go @@ -0,0 +1,179 @@ +package blockbuster + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" +) + +var _ Mempool = (*BBMempool)(nil) + +type ( + // Mempool defines the Blockbuster mempool interface. + Mempool interface { + sdkmempool.Mempool + + // Registry returns the mempool's lane registry. + Registry() []Lane + + // Contains returns true if the transaction is contained in the mempool. + Contains(tx sdk.Tx) (bool, error) + + // GetTxDistribution returns the number of transactions in each lane. + GetTxDistribution() map[string]int + + // Match will return the lane that the transaction belongs to. + Match(tx sdk.Tx) (Lane, error) + + // GetLane returns the lane with the given name. + GetLane(name string) (Lane, error) + } + + // Mempool defines the Blockbuster mempool implement. It contains a registry + // of lanes, which allows for customizable block proposal construction. + BBMempool struct { + registry []Lane + } +) + +// NewMempool returns a new Blockbuster mempool. The blockbuster mempool is +// comprised of a registry of lanes. Each lane is responsible for selecting +// transactions according to its own selection logic. The lanes are ordered +// according to their priority. The first lane in the registry has the highest +// priority. Proposals are verified according to the order of the lanes in the +// registry. Basic mempool API, such as insertion, removal, and contains, are +// delegated to the first lane that matches the transaction. Each transaction +// should only belong in one lane. +func NewMempool(lanes ...Lane) *BBMempool { + mempool := &BBMempool{ + registry: lanes, + } + + if err := mempool.ValidateBasic(); err != nil { + panic(err) + } + + return mempool +} + +// CountTx returns the total number of transactions in the mempool. This will +// be the sum of the number of transactions in each lane. +func (m *BBMempool) CountTx() int { + var total int + for _, lane := range m.registry { + total += lane.CountTx() + } + + return total +} + +// GetTxDistribution returns the number of transactions in each lane. +func (m *BBMempool) GetTxDistribution() map[string]int { + counts := make(map[string]int, len(m.registry)) + + for _, lane := range m.registry { + counts[lane.Name()] = lane.CountTx() + } + + return counts +} + +// Match will return the lane that the transaction belongs to. It matches to +// the first lane where lane.Match(tx) is true. +func (m *BBMempool) Match(tx sdk.Tx) (Lane, error) { + for _, lane := range m.registry { + if lane.Match(tx) { + return lane, nil + } + } + + return nil, fmt.Errorf("no lane matched transaction") +} + +// Insert will insert a transaction into the mempool. It inserts the transaction +// into the first lane that it matches. +func (m *BBMempool) Insert(ctx context.Context, tx sdk.Tx) error { + lane, err := m.Match(tx) + if err != nil { + return err + } + + return lane.Insert(ctx, tx) +} + +// Insert returns a nil iterator. +// +// TODO: +// - Determine if it even makes sense to return an iterator. What does that even +// mean in the context where you have multiple lanes? +// - Perhaps consider implementing and returning a no-op iterator? +func (m *BBMempool) Select(_ context.Context, _ [][]byte) sdkmempool.Iterator { + return nil +} + +// Remove removes a transaction from the mempool based on the first lane that +// it matches. +func (m *BBMempool) Remove(tx sdk.Tx) error { + lane, err := m.Match(tx) + if err != nil { + return err + } + + return lane.Remove(tx) +} + +// Contains returns true if the transaction is contained in the mempool. It +// checks the first lane that it matches to. +func (m *BBMempool) Contains(tx sdk.Tx) (bool, error) { + lane, err := m.Match(tx) + if err != nil { + return false, err + } + + return lane.Contains(tx) +} + +// Registry returns the mempool's lane registry. +func (m *BBMempool) Registry() []Lane { + return m.registry +} + +// ValidateBasic validates the mempools configuration. +func (m *BBMempool) ValidateBasic() error { + sum := sdk.ZeroDec() + seenZeroMaxBlockSpace := false + + for _, lane := range m.registry { + maxBlockSpace := lane.GetMaxBlockSpace() + if maxBlockSpace.IsZero() { + seenZeroMaxBlockSpace = true + } + + sum = sum.Add(lane.GetMaxBlockSpace()) + } + + switch { + // Ensure that the sum of the lane max block space percentages is less than + // or equal to 1. + case sum.GT(sdk.OneDec()): + return fmt.Errorf("sum of lane max block space percentages must be less than or equal to 1, got %s", sum) + // Ensure that there is no unused block space. + case sum.LT(sdk.OneDec()) && !seenZeroMaxBlockSpace: + return fmt.Errorf("sum of total block space percentages will be less than 1") + } + + return nil +} + +// GetLane returns the lane with the given name. +func (m *BBMempool) GetLane(name string) (Lane, error) { + for _, lane := range m.registry { + if lane.Name() == name { + return lane, nil + } + } + + return nil, fmt.Errorf("lane %s not found", name) +} diff --git a/blockbuster/priority_nonce.go b/blockbuster/priority_nonce.go new file mode 100644 index 00000000..b561d506 --- /dev/null +++ b/blockbuster/priority_nonce.go @@ -0,0 +1,479 @@ +package blockbuster + +import ( + "context" + "fmt" + "math" + + "github.com/huandu/skiplist" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +var ( + _ sdkmempool.Mempool = (*PriorityNonceMempool[int64])(nil) + _ sdkmempool.Iterator = (*PriorityNonceIterator[int64])(nil) +) + +type ( + // PriorityNonceMempoolConfig defines the configuration used to configure the + // PriorityNonceMempool. + PriorityNonceMempoolConfig[C comparable] struct { + // TxPriority defines the transaction priority and comparator. + TxPriority TxPriority[C] + + // OnRead is a callback to be called when a tx is read from the mempool. + OnRead func(tx sdk.Tx) + + // TxReplacement is a callback to be called when duplicated transaction nonce + // detected during mempool insert. An application can define a transaction + // replacement rule based on tx priority or certain transaction fields. + TxReplacement func(op, np C, oTx, nTx sdk.Tx) bool + + // MaxTx sets the maximum number of transactions allowed in the mempool with + // the semantics: + // - if MaxTx == 0, there is no cap on the number of transactions in the mempool + // - if MaxTx > 0, the mempool will cap the number of transactions it stores, + // and will prioritize transactions by their priority and sender-nonce + // (sequence number) when evicting transactions. + // - if MaxTx < 0, `Insert` is a no-op. + MaxTx int + } + + // PriorityNonceMempool is a mempool implementation that stores txs + // in a partially ordered set by 2 dimensions: priority, and sender-nonce + // (sequence number). Internally it uses one priority ordered skip list and one + // skip list per sender ordered by sender-nonce (sequence number). When there + // are multiple txs from the same sender, they are not always comparable by + // priority to other sender txs and must be partially ordered by both sender-nonce + // and priority. + PriorityNonceMempool[C comparable] struct { + priorityIndex *skiplist.SkipList + priorityCounts map[C]int + senderIndices map[string]*skiplist.SkipList + scores map[txMeta[C]]txMeta[C] + cfg PriorityNonceMempoolConfig[C] + } + + // PriorityNonceIterator defines an iterator that is used for mempool iteration + // on Select(). + PriorityNonceIterator[C comparable] struct { + mempool *PriorityNonceMempool[C] + priorityNode *skiplist.Element + senderCursors map[string]*skiplist.Element + sender string + nextPriority C + } + + // TxPriority defines a type that is used to retrieve and compare transaction + // priorities. Priorities must be comparable. + TxPriority[C comparable] struct { + // GetTxPriority returns the priority of the transaction. A priority must be + // comparable via Compare. + GetTxPriority func(ctx context.Context, tx sdk.Tx) C + + // CompareTxPriority compares two transaction priorities. The result should be + // 0 if a == b, -1 if a < b, and +1 if a > b. + Compare func(a, b C) int + + // MinValue defines the minimum priority value, e.g. MinInt64. This value is + // used when instantiating a new iterator and comparing weights. + MinValue C + } + + // txMeta stores transaction metadata used in indices + txMeta[C comparable] struct { + // nonce is the sender's sequence number + nonce uint64 + // priority is the transaction's priority + priority C + // sender is the transaction's sender + sender string + // weight is the transaction's weight, used as a tiebreaker for transactions + // with the same priority + weight C + // senderElement is a pointer to the transaction's element in the sender index + senderElement *skiplist.Element + } +) + +// NewDefaultTxPriority returns a TxPriority comparator using ctx.Priority as +// the defining transaction priority. +func NewDefaultTxPriority() TxPriority[int64] { + return TxPriority[int64]{ + GetTxPriority: func(goCtx context.Context, _ sdk.Tx) int64 { + return sdk.UnwrapSDKContext(goCtx).Priority() + }, + Compare: func(a, b int64) int { + return skiplist.Int64.Compare(a, b) + }, + MinValue: math.MinInt64, + } +} + +func DefaultPriorityNonceMempoolConfig() PriorityNonceMempoolConfig[int64] { + return PriorityNonceMempoolConfig[int64]{ + TxPriority: NewDefaultTxPriority(), + } +} + +// skiplistComparable is a comparator for txKeys that first compares priority, +// then weight, then sender, then nonce, uniquely identifying a transaction. +// +// Note, skiplistComparable is used as the comparator in the priority index. +func skiplistComparable[C comparable](txPriority TxPriority[C]) skiplist.Comparable { + return skiplist.LessThanFunc(func(a, b any) int { + keyA := a.(txMeta[C]) + keyB := b.(txMeta[C]) + + res := txPriority.Compare(keyA.priority, keyB.priority) + if res != 0 { + return res + } + + // Weight is used as a tiebreaker for transactions with the same priority. + // Weight is calculated in a single pass in .Select(...) and so will be 0 + // on .Insert(...). + res = txPriority.Compare(keyA.weight, keyB.weight) + if res != 0 { + return res + } + + // Because weight will be 0 on .Insert(...), we must also compare sender and + // nonce to resolve priority collisions. If we didn't then transactions with + // the same priority would overwrite each other in the priority index. + res = skiplist.String.Compare(keyA.sender, keyB.sender) + if res != 0 { + return res + } + + return skiplist.Uint64.Compare(keyA.nonce, keyB.nonce) + }) +} + +// NewPriorityMempool returns the SDK's default mempool implementation which +// returns txs in a partial order by 2 dimensions; priority, and sender-nonce. +func NewPriorityMempool[C comparable](cfg PriorityNonceMempoolConfig[C]) *PriorityNonceMempool[C] { + mp := &PriorityNonceMempool[C]{ + priorityIndex: skiplist.New(skiplistComparable(cfg.TxPriority)), + priorityCounts: make(map[C]int), + senderIndices: make(map[string]*skiplist.SkipList), + scores: make(map[txMeta[C]]txMeta[C]), + cfg: cfg, + } + + return mp +} + +// DefaultPriorityMempool returns a priorityNonceMempool with no options. +func DefaultPriorityMempool() *PriorityNonceMempool[int64] { + return NewPriorityMempool(DefaultPriorityNonceMempoolConfig()) +} + +// NextSenderTx returns the next transaction for a given sender by nonce order, +// i.e. the next valid transaction for the sender. If no such transaction exists, +// nil will be returned. +func (mp *PriorityNonceMempool[C]) NextSenderTx(sender string) sdk.Tx { + senderIndex, ok := mp.senderIndices[sender] + if !ok { + return nil + } + + cursor := senderIndex.Front() + return cursor.Value.(sdk.Tx) +} + +// Insert attempts to insert a Tx into the app-side mempool in O(log n) time, +// returning an error if unsuccessful. Sender and nonce are derived from the +// transaction's first signature. +// +// Transactions are unique by sender and nonce. Inserting a duplicate tx is an +// O(log n) no-op. +// +// Inserting a duplicate tx with a different priority overwrites the existing tx, +// changing the total order of the mempool. +func (mp *PriorityNonceMempool[C]) Insert(ctx context.Context, tx sdk.Tx) error { + if mp.cfg.MaxTx > 0 && mp.CountTx() >= mp.cfg.MaxTx { + return sdkmempool.ErrMempoolTxMaxCapacity + } else if mp.cfg.MaxTx < 0 { + return nil + } + + sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + if err != nil { + return err + } + if len(sigs) == 0 { + return fmt.Errorf("tx must have at least one signer") + } + + sig := sigs[0] + sender := sdk.AccAddress(sig.PubKey.Address()).String() + priority := mp.cfg.TxPriority.GetTxPriority(ctx, tx) + nonce := sig.Sequence + key := txMeta[C]{nonce: nonce, priority: priority, sender: sender} + + senderIndex, ok := mp.senderIndices[sender] + if !ok { + senderIndex = skiplist.New(skiplist.LessThanFunc(func(a, b any) int { + return skiplist.Uint64.Compare(b.(txMeta[C]).nonce, a.(txMeta[C]).nonce) + })) + + // initialize sender index if not found + mp.senderIndices[sender] = senderIndex + } + + // Since mp.priorityIndex is scored by priority, then sender, then nonce, a + // changed priority will create a new key, so we must remove the old key and + // re-insert it to avoid having the same tx with different priorityIndex indexed + // twice in the mempool. + // + // This O(log n) remove operation is rare and only happens when a tx's priority + // changes. + sk := txMeta[C]{nonce: nonce, sender: sender} + if oldScore, txExists := mp.scores[sk]; txExists { + if mp.cfg.TxReplacement != nil && !mp.cfg.TxReplacement(oldScore.priority, priority, senderIndex.Get(key).Value.(sdk.Tx), tx) { + return fmt.Errorf( + "tx doesn't fit the replacement rule, oldPriority: %v, newPriority: %v, oldTx: %v, newTx: %v", + oldScore.priority, + priority, + senderIndex.Get(key).Value.(sdk.Tx), + tx, + ) + } + + mp.priorityIndex.Remove(txMeta[C]{ + nonce: nonce, + sender: sender, + priority: oldScore.priority, + weight: oldScore.weight, + }) + mp.priorityCounts[oldScore.priority]-- + } + + mp.priorityCounts[priority]++ + + // Since senderIndex is scored by nonce, a changed priority will overwrite the + // existing key. + key.senderElement = senderIndex.Set(key, tx) + + mp.scores[sk] = txMeta[C]{priority: priority} + mp.priorityIndex.Set(key, tx) + + return nil +} + +func (i *PriorityNonceIterator[C]) iteratePriority() sdkmempool.Iterator { + // beginning of priority iteration + if i.priorityNode == nil { + i.priorityNode = i.mempool.priorityIndex.Front() + } else { + i.priorityNode = i.priorityNode.Next() + } + + // end of priority iteration + if i.priorityNode == nil { + return nil + } + + i.sender = i.priorityNode.Key().(txMeta[C]).sender + + nextPriorityNode := i.priorityNode.Next() + if nextPriorityNode != nil { + i.nextPriority = nextPriorityNode.Key().(txMeta[C]).priority + } else { + i.nextPriority = i.mempool.cfg.TxPriority.MinValue + } + + return i.Next() +} + +func (i *PriorityNonceIterator[C]) Next() sdkmempool.Iterator { + if i.priorityNode == nil { + return nil + } + + cursor, ok := i.senderCursors[i.sender] + if !ok { + // beginning of sender iteration + cursor = i.mempool.senderIndices[i.sender].Front() + } else { + // middle of sender iteration + cursor = cursor.Next() + } + + // end of sender iteration + if cursor == nil { + return i.iteratePriority() + } + + key := cursor.Key().(txMeta[C]) + + // We've reached a transaction with a priority lower than the next highest + // priority in the pool. + if i.priorityNode.Next() != nil { + if i.mempool.cfg.TxPriority.Compare(key.priority, i.nextPriority) < 0 { + return i.iteratePriority() + } else if i.mempool.cfg.TxPriority.Compare(key.priority, i.nextPriority) == 0 { + // Weight is incorporated into the priority index key only (not sender index) + // so we must fetch it here from the scores map. + weight := i.mempool.scores[txMeta[C]{nonce: key.nonce, sender: key.sender}].weight + if i.mempool.cfg.TxPriority.Compare(weight, i.priorityNode.Next().Key().(txMeta[C]).weight) < 0 { + return i.iteratePriority() + } + } + } + + i.senderCursors[i.sender] = cursor + return i +} + +func (i *PriorityNonceIterator[C]) Tx() sdk.Tx { + return i.senderCursors[i.sender].Value.(sdk.Tx) +} + +// Select returns a set of transactions from the mempool, ordered by priority +// and sender-nonce in O(n) time. The passed in list of transactions are ignored. +// This is a readonly operation, the mempool is not modified. +// +// The maxBytes parameter defines the maximum number of bytes of transactions to +// return. +func (mp *PriorityNonceMempool[C]) Select(_ context.Context, _ [][]byte) sdkmempool.Iterator { + if mp.priorityIndex.Len() == 0 { + return nil + } + + mp.reorderPriorityTies() + + iterator := &PriorityNonceIterator[C]{ + mempool: mp, + senderCursors: make(map[string]*skiplist.Element), + } + + return iterator.iteratePriority() +} + +type reorderKey[C comparable] struct { + deleteKey txMeta[C] + insertKey txMeta[C] + tx sdk.Tx +} + +func (mp *PriorityNonceMempool[C]) reorderPriorityTies() { + node := mp.priorityIndex.Front() + + var reordering []reorderKey[C] + for node != nil { + key := node.Key().(txMeta[C]) + if mp.priorityCounts[key.priority] > 1 { + newKey := key + newKey.weight = senderWeight(mp.cfg.TxPriority, key.senderElement) + reordering = append(reordering, reorderKey[C]{deleteKey: key, insertKey: newKey, tx: node.Value.(sdk.Tx)}) + } + + node = node.Next() + } + + for _, k := range reordering { + mp.priorityIndex.Remove(k.deleteKey) + delete(mp.scores, txMeta[C]{nonce: k.deleteKey.nonce, sender: k.deleteKey.sender}) + mp.priorityIndex.Set(k.insertKey, k.tx) + mp.scores[txMeta[C]{nonce: k.insertKey.nonce, sender: k.insertKey.sender}] = k.insertKey + } +} + +// senderWeight returns the weight of a given tx (t) at senderCursor. Weight is +// defined as the first (nonce-wise) same sender tx with a priority not equal to +// t. It is used to resolve priority collisions, that is when 2 or more txs from +// different senders have the same priority. +func senderWeight[C comparable](txPriority TxPriority[C], senderCursor *skiplist.Element) C { + if senderCursor == nil { + return txPriority.MinValue + } + + weight := senderCursor.Key().(txMeta[C]).priority + senderCursor = senderCursor.Next() + for senderCursor != nil { + p := senderCursor.Key().(txMeta[C]).priority + if txPriority.Compare(p, weight) != 0 { + weight = p + } + + senderCursor = senderCursor.Next() + } + + return weight +} + +// CountTx returns the number of transactions in the mempool. +func (mp *PriorityNonceMempool[C]) CountTx() int { + return mp.priorityIndex.Len() +} + +// Remove removes a transaction from the mempool in O(log n) time, returning an +// error if unsuccessful. +func (mp *PriorityNonceMempool[C]) Remove(tx sdk.Tx) error { + sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() + if err != nil { + return err + } + if len(sigs) == 0 { + return fmt.Errorf("attempted to remove a tx with no signatures") + } + + sig := sigs[0] + sender := sdk.AccAddress(sig.PubKey.Address()).String() + nonce := sig.Sequence + + scoreKey := txMeta[C]{nonce: nonce, sender: sender} + score, ok := mp.scores[scoreKey] + if !ok { + return sdkmempool.ErrTxNotFound + } + tk := txMeta[C]{nonce: nonce, priority: score.priority, sender: sender, weight: score.weight} + + senderTxs, ok := mp.senderIndices[sender] + if !ok { + return fmt.Errorf("sender %s not found", sender) + } + + mp.priorityIndex.Remove(tk) + senderTxs.Remove(tk) + delete(mp.scores, scoreKey) + mp.priorityCounts[score.priority]-- + + return nil +} + +func IsEmpty[C comparable](mempool sdkmempool.Mempool) error { + mp := mempool.(*PriorityNonceMempool[C]) + if mp.priorityIndex.Len() != 0 { + return fmt.Errorf("priorityIndex not empty") + } + + countKeys := make([]C, 0, len(mp.priorityCounts)) + for k := range mp.priorityCounts { + countKeys = append(countKeys, k) + } + + for _, k := range countKeys { + if mp.priorityCounts[k] != 0 { + return fmt.Errorf("priorityCounts not zero at %v, got %v", k, mp.priorityCounts[k]) + } + } + + senderKeys := make([]string, 0, len(mp.senderIndices)) + for k := range mp.senderIndices { + senderKeys = append(senderKeys, k) + } + + for _, k := range senderKeys { + if mp.senderIndices[k].Len() != 0 { + return fmt.Errorf("senderIndex not empty for sender %v", k) + } + } + + return nil +} diff --git a/blockbuster/proposals.go b/blockbuster/proposals.go new file mode 100644 index 00000000..1899bfb1 --- /dev/null +++ b/blockbuster/proposals.go @@ -0,0 +1,197 @@ +package blockbuster + +import ( + "crypto/sha256" + "encoding/hex" + "fmt" + + "fairyring/blockbuster/utils" + "github.com/cometbft/cometbft/libs/log" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var _ BlockProposal = (*Proposal)(nil) + +type ( + // LaneProposal defines the interface/APIs that are required for the proposal to interact + // with a lane. + LaneProposal interface { + // Logger returns the lane's logger. + Logger() log.Logger + + // GetMaxBlockSpace returns the maximum block space for the lane as a relative percentage. + GetMaxBlockSpace() sdk.Dec + + // Name returns the name of the lane. + Name() string + } + + // BlockProposal is the interface/APIs that are required for proposal creation + interacting with + // and updating proposals. BlockProposals are iteratively updated as each lane prepares its + // partial proposal. Each lane must call UpdateProposal with its partial proposal in PrepareLane. BlockProposals + // can also include vote extensions, which are included at the top of the proposal. + BlockProposal interface { + // UpdateProposal updates the proposal with the given transactions. There are a + // few invarients that are checked: + // 1. The total size of the proposal must be less than the maximum number of bytes allowed. + // 2. The total size of the partial proposal must be less than the maximum number of bytes allowed for + // the lane. + UpdateProposal(lane LaneProposal, partialProposalTxs [][]byte) error + + // GetMaxTxBytes returns the maximum number of bytes that can be included in the proposal. + GetMaxTxBytes() int64 + + // GetTotalTxBytes returns the total number of bytes currently included in the proposal. + GetTotalTxBytes() int64 + + // GetTxs returns the transactions in the proposal. + GetTxs() [][]byte + + // GetNumTxs returns the number of transactions in the proposal. + GetNumTxs() int + + // Contains returns true if the proposal contains the given transaction. + Contains(tx []byte) bool + + // AddVoteExtension adds a vote extension to the proposal. + AddVoteExtension(voteExtension []byte) + + // GetVoteExtensions returns the vote extensions in the proposal. + GetVoteExtensions() [][]byte + + // GetProposal returns all of the transactions in the proposal along with the vote extensions + // at the top of the proposal. + GetProposal() [][]byte + } + + // Proposal defines a block proposal type. + Proposal struct { + // txs is the list of transactions in the proposal. + txs [][]byte + + // voteExtensions is the list of vote extensions in the proposal. + voteExtensions [][]byte + + // cache is a cache of the selected transactions in the proposal. + cache map[string]struct{} + + // totalTxBytes is the total number of bytes currently included in the proposal. + totalTxBytes int64 + + // maxTxBytes is the maximum number of bytes that can be included in the proposal. + maxTxBytes int64 + } +) + +// NewProposal returns a new empty proposal. +func NewProposal(maxTxBytes int64) *Proposal { + return &Proposal{ + txs: make([][]byte, 0), + voteExtensions: make([][]byte, 0), + cache: make(map[string]struct{}), + maxTxBytes: maxTxBytes, + } +} + +// UpdateProposal updates the proposal with the given transactions and total size. There are a +// few invarients that are checked: +// 1. The total size of the proposal must be less than the maximum number of bytes allowed. +// 2. The total size of the partial proposal must be less than the maximum number of bytes allowed for +// the lane. +func (p *Proposal) UpdateProposal(lane LaneProposal, partialProposalTxs [][]byte) error { + if len(partialProposalTxs) == 0 { + return nil + } + + partialProposalSize := int64(0) + for _, tx := range partialProposalTxs { + partialProposalSize += int64(len(tx)) + } + + // Invarient check: Ensure that the lane did not prepare a partial proposal that is too large. + maxTxBytesForLane := utils.GetMaxTxBytesForLane(p.GetMaxTxBytes(), p.GetTotalTxBytes(), lane.GetMaxBlockSpace()) + if partialProposalSize > maxTxBytesForLane { + return fmt.Errorf( + "%s lane prepared a partial proposal that is too large: %d > %d", + lane.Name(), + partialProposalSize, + maxTxBytesForLane, + ) + } + + // Invarient check: Ensure that the lane did not prepare a block proposal that is too large. + updatedSize := p.totalTxBytes + partialProposalSize + if updatedSize > p.maxTxBytes { + return fmt.Errorf( + "lane %s prepared a block proposal that is too large: %d > %d", + lane.Name(), + p.totalTxBytes, + p.maxTxBytes, + ) + } + p.totalTxBytes = updatedSize + + lane.Logger().Info( + "adding transactions to proposal", + "lane", lane.Name(), + "num_txs", len(partialProposalTxs), + "total_tx_bytes", partialProposalSize, + "cumulative_size", updatedSize, + ) + + p.txs = append(p.txs, partialProposalTxs...) + + for _, tx := range partialProposalTxs { + txHash := sha256.Sum256(tx) + txHashStr := hex.EncodeToString(txHash[:]) + + p.cache[txHashStr] = struct{}{} + } + + return nil +} + +// GetProposal returns all of the transactions in the proposal along with the vote extensions +// at the top of the proposal. +func (p *Proposal) GetProposal() [][]byte { + return append(p.voteExtensions, p.txs...) +} + +// AddVoteExtension adds a vote extension to the proposal. +func (p *Proposal) AddVoteExtension(voteExtension []byte) { + p.voteExtensions = append(p.voteExtensions, voteExtension) +} + +// GetVoteExtensions returns the vote extensions in the proposal. +func (p *Proposal) GetVoteExtensions() [][]byte { + return p.voteExtensions +} + +// GetMaxTxBytes returns the maximum number of bytes that can be included in the proposal. +func (p *Proposal) GetMaxTxBytes() int64 { + return p.maxTxBytes +} + +// GetTotalTxBytes returns the total number of bytes currently included in the proposal. +func (p *Proposal) GetTotalTxBytes() int64 { + return p.totalTxBytes +} + +// GetTxs returns the transactions in the proposal. +func (p *Proposal) GetTxs() [][]byte { + return p.txs +} + +// GetNumTxs returns the number of transactions in the proposal. +func (p *Proposal) GetNumTxs() int { + return len(p.txs) +} + +// Contains returns true if the proposal contains the given transaction. +func (p *Proposal) Contains(tx []byte) bool { + txHash := sha256.Sum256(tx) + txHashStr := hex.EncodeToString(txHash[:]) + + _, ok := p.cache[txHashStr] + return ok +} diff --git a/blockbuster/utils/ante.go b/blockbuster/utils/ante.go new file mode 100644 index 00000000..7d4708c8 --- /dev/null +++ b/blockbuster/utils/ante.go @@ -0,0 +1,43 @@ +package utils + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ( + // Lane defines the required functionality for a lane. The ignore decorator + // will check if a transaction belongs to a lane by calling the Match function. + Lane interface { + Match(tx sdk.Tx) bool + } + + // IgnoreDecorator is an AnteDecorator that wraps an existing AnteDecorator. It allows + // for the AnteDecorator to be ignored for specified lanes. + IgnoreDecorator struct { + decorator sdk.AnteDecorator + lanes []Lane + } +) + +// NewIgnoreDecorator returns a new IgnoreDecorator instance. +func NewIgnoreDecorator(decorator sdk.AnteDecorator, lanes ...Lane) *IgnoreDecorator { + return &IgnoreDecorator{ + decorator: decorator, + lanes: lanes, + } +} + +// AnteHandle implements the sdk.AnteDecorator interface. If the transaction belongs to +// one of the lanes, the next AnteHandler is called. Otherwise, the decorator's AnteHandler +// is called. +func (sd IgnoreDecorator) AnteHandle( + ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler, +) (sdk.Context, error) { + for _, lane := range sd.lanes { + if lane.Match(tx) { + return next(ctx, tx, simulate) + } + } + + return sd.decorator.AnteHandle(ctx, tx, simulate, next) +} diff --git a/blockbuster/utils/utils.go b/blockbuster/utils/utils.go new file mode 100644 index 00000000..938b8405 --- /dev/null +++ b/blockbuster/utils/utils.go @@ -0,0 +1,70 @@ +package utils + +import ( + "crypto/sha256" + "encoding/hex" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" +) + +// GetTxHashStr returns the hex-encoded hash of the transaction alongside the +// transaction bytes. +func GetTxHashStr(txEncoder sdk.TxEncoder, tx sdk.Tx) ([]byte, string, error) { + txBz, err := txEncoder(tx) + if err != nil { + return nil, "", fmt.Errorf("failed to encode transaction: %w", err) + } + + txHash := sha256.Sum256(txBz) + txHashStr := hex.EncodeToString(txHash[:]) + + return txBz, txHashStr, nil +} + +// GetDecodedTxs returns the decoded transactions from the given bytes. +func GetDecodedTxs(txDecoder sdk.TxDecoder, txs [][]byte) ([]sdk.Tx, error) { + var decodedTxs []sdk.Tx + for _, txBz := range txs { + tx, err := txDecoder(txBz) + if err != nil { + return nil, fmt.Errorf("failed to decode transaction: %w", err) + } + + decodedTxs = append(decodedTxs, tx) + } + + return decodedTxs, nil +} + +// RemoveTxsFromLane removes the transactions from the given lane's mempool. +func RemoveTxsFromLane(txs map[sdk.Tx]struct{}, mempool sdkmempool.Mempool) error { + for tx := range txs { + if err := mempool.Remove(tx); err != nil { + return err + } + } + + return nil +} + +// GetMaxTxBytesForLane returns the maximum number of bytes that can be included in the proposal +// for the given lane. +func GetMaxTxBytesForLane(maxTxBytes, totalTxBytes int64, ratio sdk.Dec) int64 { + // In the case where the ratio is zero, we return the max tx bytes remaining. Note, the only + // lane that should have a ratio of zero is the default lane. This means the default lane + // will have no limit on the number of transactions it can include in a block and is only + // limited by the maxTxBytes included in the PrepareProposalRequest. + if ratio.IsZero() { + remainder := maxTxBytes - totalTxBytes + if remainder < 0 { + return 0 + } + + return remainder + } + + // Otherwise, we calculate the max tx bytes for the lane based on the ratio. + return ratio.MulInt64(maxTxBytes).TruncateInt().Int64() +} diff --git a/blockbuster/utils/utils_test.go b/blockbuster/utils/utils_test.go new file mode 100644 index 00000000..1648699d --- /dev/null +++ b/blockbuster/utils/utils_test.go @@ -0,0 +1,77 @@ +package utils_test + +import ( + "testing" + + "fairyring/blockbuster/utils" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func TestGetMaxTxBytesForLane(t *testing.T) { + testCases := []struct { + name string + maxTxBytes int64 + totalTxBytes int64 + ratio sdk.Dec + expected int64 + }{ + { + "ratio is zero", + 100, + 50, + sdk.ZeroDec(), + 50, + }, + { + "ratio is zero", + 100, + 100, + sdk.ZeroDec(), + 0, + }, + { + "ratio is zero", + 100, + 150, + sdk.ZeroDec(), + 0, + }, + { + "ratio is 1", + 100, + 50, + sdk.OneDec(), + 100, + }, + { + "ratio is 10%", + 100, + 50, + sdk.MustNewDecFromStr("0.1"), + 10, + }, + { + "ratio is 25%", + 100, + 50, + sdk.MustNewDecFromStr("0.25"), + 25, + }, + { + "ratio is 50%", + 101, + 50, + sdk.MustNewDecFromStr("0.5"), + 50, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + actual := utils.GetMaxTxBytesForLane(tc.maxTxBytes, tc.totalTxBytes, tc.ratio) + if actual != tc.expected { + t.Errorf("expected %d, got %d", tc.expected, actual) + } + }) + } +} diff --git a/cmd/fairyringd/cmd/root.go b/cmd/fairyringd/cmd/root.go index 0c408e07..8d864def 100644 --- a/cmd/fairyringd/cmd/root.go +++ b/cmd/fairyringd/cmd/root.go @@ -7,6 +7,11 @@ import ( "path/filepath" "strings" + 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" + tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" @@ -25,15 +30,13 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" + "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - "github.com/ignite/cli/ignite/services/network" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/pflag" - 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" + // this line is used by starport scaffolding # root/moduleImport "fairyring/app" @@ -55,7 +58,7 @@ func NewRootCmd() (*cobra.Command, appparams.EncodingConfig) { rootCmd := &cobra.Command{ Use: app.Name + "d", - Short: "Stargate CosmosHub App", + Short: "Start fairyring node", PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { // set the default command outputs cmd.SetOut(cmd.OutOrStdout()) @@ -104,9 +107,10 @@ func initRootCmd( // Set config initSDKConfig() + gentxModule := app.ModuleBasics[genutiltypes.ModuleName].(genutil.AppModuleBasic) rootCmd.AddCommand( genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), - genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), + genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, gentxModule.GenTxValidator), genutilcli.MigrateGenesisCmd(), genutilcli.GenTxCmd( app.ModuleBasics, @@ -141,7 +145,6 @@ func initRootCmd( queryCommand(), txCommand(), keys.Commands(app.DefaultNodeHome), - startWithTunnelingCommand(a, app.DefaultNodeHome), ) } @@ -197,29 +200,6 @@ func txCommand() *cobra.Command { return cmd } -// startWithTunnelingCommand returns a new start command with http tunneling -// enabled. -func startWithTunnelingCommand(appCreator appCreator, defaultNodeHome string) *cobra.Command { - startCmd := server.StartCmd(appCreator.newApp, defaultNodeHome) - startCmd.Use = "start-with-http-tunneling" - startCmd.Short = "Run the full node with http tunneling" - // Backup existing PreRunE, since we'll override it. - startPreRunE := startCmd.PreRunE - startCmd.PreRunE = func(cmd *cobra.Command, args []string) error { - var ( - ctx = cmd.Context() - clientCtx = client.GetClientContextFromCmd(cmd) - serverCtx = server.GetServerContextFromCmd(cmd) - ) - network.StartProxyForTunneledPeers(ctx, clientCtx, serverCtx) - if startPreRunE == nil { - return nil - } - return startPreRunE(cmd, args) - } - return startCmd -} - func addModuleInitFlags(startCmd *cobra.Command) { crisis.AddModuleInitFlags(startCmd) // this line is used by starport scaffolding # root/arguments @@ -229,7 +209,7 @@ func overwriteFlagDefaults(c *cobra.Command, defaults map[string]string) { set := func(s *pflag.FlagSet, key, val string) { if f := s.Lookup(key); f != nil { f.DefValue = val - _ = f.Value.Set(val) + f.Value.Set(val) } } for key, val := range defaults { @@ -268,6 +248,18 @@ func (a appCreator) newApp( panic(err) } + homeDir := cast.ToString(appOpts.Get(flags.FlagHome)) + chainID := cast.ToString(appOpts.Get(flags.FlagChainID)) + if chainID == "" { + // fallback to genesis chain-id + appGenesis, err := tmtypes.GenesisDocFromFile(filepath.Join(homeDir, "config", "genesis.json")) + if err != nil { + panic(err) + } + + chainID = appGenesis.ChainID + } + snapshotDir := filepath.Join(cast.ToString(appOpts.Get(flags.FlagHome)), "data", "snapshots") snapshotDB, err := dbm.NewDB("metadata", dbm.GoLevelDBBackend, snapshotDir) if err != nil { @@ -295,15 +287,16 @@ func (a appCreator) newApp( appOpts, baseapp.SetPruning(pruningOpts), baseapp.SetMinGasPrices(cast.ToString(appOpts.Get(server.FlagMinGasPrices))), - baseapp.SetMinRetainBlocks(cast.ToUint64(appOpts.Get(server.FlagMinRetainBlocks))), baseapp.SetHaltHeight(cast.ToUint64(appOpts.Get(server.FlagHaltHeight))), baseapp.SetHaltTime(cast.ToUint64(appOpts.Get(server.FlagHaltTime))), + baseapp.SetMinRetainBlocks(cast.ToUint64(appOpts.Get(server.FlagMinRetainBlocks))), baseapp.SetInterBlockCache(cache), baseapp.SetTrace(cast.ToBool(appOpts.Get(server.FlagTrace))), baseapp.SetIndexEvents(cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents))), baseapp.SetSnapshot(snapshotStore, snapshotOptions), baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), - baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagIAVLFastNode))), + baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagDisableIAVLFastNode))), + baseapp.SetChainID(chainID), ) } @@ -316,6 +309,7 @@ func (a appCreator) appExport( forZeroHeight bool, jailAllowedAddrs []string, appOpts servertypes.AppOptions, + modulesToExport []string, ) (servertypes.ExportedApp, error) { homePath, ok := appOpts.Get(flags.FlagHome).(string) if !ok || homePath == "" { @@ -340,7 +334,7 @@ func (a appCreator) appExport( } } - return app.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) + return app.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } // initAppConfig helps to override default appConfig template and configs. @@ -348,19 +342,8 @@ func (a appCreator) appExport( func initAppConfig() (string, interface{}) { // The following code snippet is just for reference. - // WASMConfig defines configuration for the wasm module. - type WASMConfig struct { - // This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries - QueryGasLimit uint64 `mapstructure:"query_gas_limit"` - - // Address defines the gRPC-web server to listen on - LruSize uint64 `mapstructure:"lru_size"` - } - type CustomAppConfig struct { serverconfig.Config - - WASM WASMConfig `mapstructure:"wasm"` } // Optionally allow the chain developer to overwrite the SDK's default @@ -382,19 +365,8 @@ func initAppConfig() (string, interface{}) { customAppConfig := CustomAppConfig{ Config: *srvCfg, - WASM: WASMConfig{ - LruSize: 1, - QueryGasLimit: 300000, - }, } - - customAppTemplate := serverconfig.DefaultConfigTemplate + ` -[wasm] -# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries -query_gas_limit = 300000 -# This is the number of wasm vm instances we keep cached in memory for speed-up -# Warning: this is currently unstable and may lead to crashes, best to keep for 0 unless testing locally -lru_size = 0` + customAppTemplate := serverconfig.DefaultConfigTemplate return customAppTemplate, customAppConfig } diff --git a/config.yml b/config.yml index 83bf8714..ad541a5c 100644 --- a/config.yml +++ b/config.yml @@ -1,12 +1,34 @@ version: 1 accounts: - name: alice - coins: ["20000token", "200000000stake"] + coins: + - 1000000000token + - 2000000000stake + mnemonic: "thought awake grace need recipe erode bullet dust salt breeze rural desk camp deal devote wisdom rotate pledge repair garbage aspect find lens afraid" - name: bob - coins: ["10000token", "100000000stake"] + coins: + - 500000000token + - 200000000stake + mnemonic: "south arm eager adjust dish aware rocket logic winter enlist idle reflect slogan urge clump angle input mechanic setup blue distance setup retreat rain" + - name: chris + coins: + - 500000000token + - 200000000stake + - name: donald + coins: + - 500000000token + - 200000000stake + - name: eli + coins: + - 500000000token + - 200000000stake + - name: fred + coins: + - 500000000token + - 200000000stake validators: - - name: alice - bonded: "100000000stake" +- name: alice + bonded: 100000000stake client: openapi: path: "docs/static/openapi.yml" @@ -16,10 +38,22 @@ client: path: "vue/src/store" faucet: name: bob - coins: ["5token", "100000stake"] + coins: + - 5token + - 100000stake genesis: + chain_id: "fairytest-1" app_state: keyshare: params: - trusted_addresses: ["cosmos18hl5c9xn5dze2g50uaw0l2mr02ew57zk2fgr8q"] + trusted_addresses: [ + "fairy14afvm0yfs27a00hnr85064r69lpg46zjncasuv", + "fairy12hxz66z2tu0lec9cqjf8q4732v8mepffqm4tyl", + ] key_expiry: 200 + pep: + params: + trusted_addresses: [ + "fairy14afvm0yfs27a00hnr85064r69lpg46zjncasuv", + "fairy12hxz66z2tu0lec9cqjf8q4732v8mepffqm4tyl", + ] \ No newline at end of file diff --git a/docs/docs.go b/docs/docs.go index 1167d565..1ba96c79 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,6 +1,40 @@ package docs -import "embed" +import ( + "embed" + httptemplate "html/template" + "net/http" + + "github.com/gorilla/mux" +) + +const ( + apiFile = "/static/openapi.yml" + indexFile = "template/index.tpl" +) //go:embed static -var Docs embed.FS +var Static embed.FS + +//go:embed template +var template embed.FS + +func RegisterOpenAPIService(appName string, rtr *mux.Router) { + rtr.Handle(apiFile, http.FileServer(http.FS(Static))) + rtr.HandleFunc("/", handler(appName)) +} + +// handler returns an http handler that servers OpenAPI console for an OpenAPI spec at specURL. +func handler(title string) http.HandlerFunc { + t, _ := httptemplate.ParseFS(template, indexFile) + + return func(w http.ResponseWriter, req *http.Request) { + t.Execute(w, struct { + Title string + URL string + }{ + title, + apiFile, + }) + } +} diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index cd469149..ad7eee64 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -4,10 +4,410 @@ info: name: '' description: '' paths: + /cosmos/auth/v1beta1/account_info/{address}: + get: + summary: AccountInfo queries account info which is common to all account types. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosAuthV1Beta1AccountInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + description: info is the account info which is represented by BaseAccount. + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + description: |- + QueryAccountInfoResponse is the Query/AccountInfo response type. + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + parameters: + - name: address + description: address is the account address string. + in: path + required: true + type: string + tags: + - Query /cosmos/auth/v1beta1/accounts: get: - summary: Accounts returns all the existing accounts - description: 'Since: cosmos-sdk 0.43' + summary: Accounts returns all the existing accounts. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.43 operationId: CosmosAuthV1Beta1Accounts responses: '200': @@ -471,7 +871,6 @@ paths: type: object properties: account: - description: account defines the account of the corresponding address. type: object properties: '@type': @@ -532,6 +931,114 @@ paths: used with implementation specific semantics. additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } description: >- QueryAccountResponse is the response type for the Query/Account RPC method. @@ -933,6 +1440,8 @@ paths: parameters: - name: id description: |- + Deprecated, use account_id instead + id is the account number of the address to be queried. This field should have been an uint64 (like all account numbers), and will be updated to uint64 in a future version of the auth query. @@ -940,6 +1449,15 @@ paths: required: true type: string format: int64 + - name: account_id + description: |- + account_id is the account number of the address to be queried. + + Since: cosmos-sdk 0.47 + in: query + required: false + type: string + format: uint64 tags: - Query /cosmos/auth/v1beta1/bech32: @@ -1951,6 +2469,380 @@ paths: } tags: - Query + /cosmos/auth/v1beta1/module_accounts/{name}: + get: + summary: ModuleAccountByName returns the module account info by module name + operationId: CosmosAuthV1Beta1ModuleAccountByName + responses: + '200': + description: A successful response. + schema: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + description: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + parameters: + - name: name + in: path + required: true + type: string + tags: + - Query /cosmos/auth/v1beta1/params: get: summary: Params queries all parameters. @@ -3609,6 +4501,11 @@ paths: /cosmos/bank/v1beta1/balances/{address}: get: summary: AllBalances queries the balance of all coins for a single account. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1AllBalances responses: '200': @@ -3799,7 +4696,14 @@ paths: token denomination. - description: 'Since: cosmos-sdk 0.46' + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.46 operationId: CosmosBankV1Beta1DenomOwners responses: '200': @@ -4311,6 +5215,18 @@ paths: (whether a denom is sendable). + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the + genesis object. + + Storage, lookup, and manipulation of this information is + now in the keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards + compatibility of genesis files. default_send_enabled: type: boolean description: Params defines the parameters for the bank module. @@ -4337,12 +5253,172 @@ paths: additionalProperties: {} tags: - Query + /cosmos/bank/v1beta1/send_enabled: + get: + summary: SendEnabled queries for SendEnabled entries. + description: >- + This query only returns denominations that have specific SendEnabled + settings. + + Any denomination that does not have a specific setting will use the + default + + params.default_send_enabled, and will not be returned by this query. + + + Since: cosmos-sdk 0.47 + operationId: CosmosBankV1Beta1SendEnabled + responses: + '200': + description: A successful response. + schema: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status + (whether a denom is + + sendable). + pagination: + description: >- + pagination defines the pagination in the response. This field + is only + + populated if the denoms field in the request is empty. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QuerySendEnabledResponse defines the RPC response of a SendEnable + query. + + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denoms + description: >- + denoms is the specific denoms you want look up. Leave empty to get + all entries. + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query /cosmos/bank/v1beta1/spendable_balances/{address}: get: - summary: |- - SpendableBalances queries the spenable balance of all coins for a single + summary: >- + SpendableBalances queries the spendable balance of all coins for a + single + account. - description: 'Since: cosmos-sdk 0.46' + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.46 operationId: CosmosBankV1Beta1SpendableBalances responses: '200': @@ -4477,9 +5553,83 @@ paths: type: boolean tags: - Query + /cosmos/bank/v1beta1/spendable_balances/{address}/by_denom: + get: + summary: >- + SpendableBalanceByDenom queries the spendable balance of a single denom + for + + a single account. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.47 + operationId: CosmosBankV1Beta1SpendableBalanceByDenom + responses: + '200': + description: A successful response. + schema: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + QuerySpendableBalanceByDenomResponse defines the gRPC response + structure for + + querying an account's spendable balance for a specific denom. + + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + type: string + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + type: string + tags: + - Query /cosmos/bank/v1beta1/supply: get: summary: TotalSupply queries the total supply of all coins. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1TotalSupply responses: '200': @@ -4612,6 +5762,11 @@ paths: /cosmos/bank/v1beta1/supply/by_denom: get: summary: SupplyOf queries the supply of a single coin. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosBankV1Beta1SupplyOf responses: '200': @@ -4656,15 +5811,51 @@ paths: type: string tags: - Query + /cosmos/base/node/v1beta1/config: + get: + summary: Config queries for the operator configuration. + operationId: CosmosBaseNodeV1Beta1Config + responses: + '200': + description: A successful response. + schema: + type: object + properties: + minimum_gas_price: + type: string + description: >- + ConfigResponse defines the response structure for the Config gRPC + query. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Service /cosmos/base/tendermint/v1beta1/abci_query: get: summary: >- ABCIQuery defines a query handler that supports ABCI queries directly to + the - the application, bypassing Tendermint completely. The ABCI query must + application, bypassing Tendermint completely. The ABCI query must + contain - contain a valid and supported path, including app, custom, p2p, and - store. + a valid and supported path, including app, custom, p2p, and store. description: 'Since: cosmos-sdk 0.46' operationId: CosmosBaseTendermintV1Beta1ABCIQuery responses: @@ -4711,24 +5902,20 @@ paths: ProofOp defines an operation used for calculating Merkle root. The data could - be arbitrary format, providing nessecary data for + be arbitrary format, providing necessary data for example neighbouring node hash. Note: This type is a duplicate of the ProofOp proto type - defined in - - Tendermint. + defined in Tendermint. description: >- ProofOps is Merkle proof defined by the list of ProofOps. Note: This type is a duplicate of the ProofOps proto type - defined in - - Tendermint. + defined in Tendermint. height: type: string format: int64 @@ -4736,9 +5923,7 @@ paths: type: string description: >- ABCIQueryResponse defines the response structure for the ABCIQuery - gRPC - - query. + gRPC query. Note: This type is a duplicate of the ResponseQuery proto type @@ -5069,7 +6254,7 @@ paths: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. data: type: object properties: @@ -5330,8 +6515,8 @@ paths: format: byte title: original proposer of the block description: >- - Header defines the structure of a - Tendermint block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -5412,7 +6597,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -5436,7 +6621,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -5468,7 +6653,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -5903,8 +7088,8 @@ paths: format: byte title: original proposer of the block description: >- - Header defines the structure of a - Tendermint block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -5985,7 +7170,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -6009,7 +7194,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -6041,7 +7226,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -6122,9 +7307,7 @@ paths: field converted to bech32 string. description: >- GetLatestBlockResponse is the response type for the - Query/GetLatestBlock RPC - - method. + Query/GetLatestBlock RPC method. default: description: An unexpected error response. schema: @@ -6430,7 +7613,7 @@ paths: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. data: type: object properties: @@ -6691,8 +7874,8 @@ paths: format: byte title: original proposer of the block description: >- - Header defines the structure of a - Tendermint block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -6773,7 +7956,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -6797,7 +7980,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -6829,7 +8012,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -7264,8 +8447,8 @@ paths: format: byte title: original proposer of the block description: >- - Header defines the structure of a - Tendermint block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -7346,7 +8529,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -7370,7 +8553,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -7402,7 +8585,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -7483,9 +8666,7 @@ paths: field converted to bech32 string. description: >- GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight - - RPC method. + Query/GetBlockByHeight RPC method. default: description: An unexpected error response. schema: @@ -7760,9 +8941,7 @@ paths: description: VersionInfo is the type for the GetNodeInfoResponse message. description: >- GetNodeInfoResponse is the response type for the Query/GetNodeInfo - RPC - - method. + RPC method. default: description: An unexpected error response. schema: @@ -8373,7 +9552,7 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: |- + description: >- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: @@ -8841,7 +10020,7 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: |- + description: >- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: @@ -9093,6 +10272,124 @@ paths: type: boolean tags: - Service + /cosmos/consensus/v1/params: + get: + summary: Params queries the parameters of x/consensus_param module. + operationId: CosmosConsensusV1Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: >- + params are the tendermint consensus params stored in the + consensus module. + + Please note that `params.version` is not populated in this + response, it is + + tracked separately in the x/upgrade module. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: + MaxAgeDuration / {average block + + time}. + max_age_duration: + type: string + description: >- + 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). + max_bytes: + type: string + format: int64 + title: >- + 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 + description: >- + EvidenceParams determine how we handle evidence of + malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: >- + ValidatorParams restrict the public key types validators + can use. + + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + description: >- + QueryParamsResponse defines the response type for querying + x/consensus parameters. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query /cosmos/distribution/v1beta1/community_pool: get: summary: CommunityPool queries the community pool coins. @@ -9405,8 +10702,18 @@ paths: type: string base_proposer_reward: type: string + description: >- + Deprecated: The base_proposer_reward field is deprecated + and is no longer used + + in the x/distribution module's reward mechanism. bonus_proposer_reward: type: string + description: >- + Deprecated: The bonus_proposer_reward field is deprecated + and is no longer used + + in the x/distribution module's reward mechanism. withdraw_addr_enabled: type: boolean description: >- @@ -9432,6 +10739,88 @@ paths: additionalProperties: {} tags: - Query + /cosmos/distribution/v1beta1/validators/{validator_address}: + get: + summary: >- + ValidatorDistributionInfo queries validator commission and + self-delegation rewards for validator + operationId: CosmosDistributionV1Beta1ValidatorDistributionInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + operator_address: + type: string + description: operator_address defines the validator operator address. + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + 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. + description: self_bond_rewards defines the self delegations rewards. + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + 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. + description: commission defines the commission the validator received. + description: >- + QueryValidatorDistributionInfoResponse is the response type for + the Query/ValidatorDistributionInfo RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query /cosmos/distribution/v1beta1/validators/{validator_address}/commission: get: summary: ValidatorCommission queries accumulated commission for a validator. @@ -9443,7 +10832,7 @@ paths: type: object properties: commission: - description: commission defines the commision the validator received. + description: commission defines the commission the validator received. type: object properties: commission: @@ -10166,7 +11555,7 @@ paths: type: boolean tags: - Query - /cosmos/evidence/v1beta1/evidence/{evidence_hash}: + /cosmos/evidence/v1beta1/evidence/{hash}: get: summary: Evidence queries evidence based on evidence hash. operationId: CosmosEvidenceV1Beta1Evidence @@ -10427,11 +11816,21 @@ paths: "value": "1.212s" } parameters: - - name: evidence_hash - description: evidence_hash defines the hash of the requested evidence. + - name: hash + description: |- + hash defines the evidence hash of the requested evidence. + + Since: cosmos-sdk 0.47 in: path required: true type: string + - name: evidence_hash + description: |- + evidence_hash defines the hash of the requested evidence. + Deprecated: Use hash, a HEX encoded string, instead. + in: query + required: false + type: string format: byte tags: - Query @@ -11475,14 +12874,18 @@ paths: type: object properties: voting_params: - description: voting_params defines the parameters related to voting. + description: |- + Deprecated: Prefer to use `params` instead. + voting_params defines the parameters related to voting. type: object properties: voting_period: type: string - description: Length of the voting period. + description: Duration of the voting period. deposit_params: - description: deposit_params defines the parameters related to deposit. + description: |- + Deprecated: Prefer to use `params` instead. + deposit_params defines the parameters related to deposit. type: object properties: min_deposit: @@ -11508,11 +12911,68 @@ paths: description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - months. + + months. tally_params: - description: tally_params defines the parameters related to tally. + description: |- + Deprecated: Prefer to use `params` instead. + tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + description: >- + Minimum percentage of total stake needed to vote for a + result to be + + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. + Default value: 0.5. + veto_threshold: + type: string + description: >- + Minimum value of Veto votes to Total votes ratio for + proposal to be + + vetoed. Default value: 1/3. + params: + description: |- + params defines all the paramaters of x/gov module. + + Since: cosmos-sdk 0.47 type: object properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + 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. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. + Initial value: 2 + + months. + voting_period: + type: string + description: Duration of the voting period. quorum: type: string description: >- @@ -11530,6 +12990,20 @@ paths: Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value + that must be paid at proposal submission. + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met description: >- QueryParamsResponse is the response type for the Query/Params RPC method. @@ -11748,6 +13222,7 @@ paths: id: type: string format: uint64 + description: id defines the unique id of the proposal. messages: type: array items: @@ -11925,7 +13400,11 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + description: >- + messages are the arbitrary messages to be executed if + the proposal passes. status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -11935,21 +13414,6 @@ paths: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: >- - ProposalStatus enumerates the valid statuses of a - proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: >- final_tally_result is the final tally result of the @@ -11963,18 +13427,28 @@ paths: properties: yes_count: type: string + description: yes_count is the number of yes votes on a proposal. abstain_count: type: string + description: >- + abstain_count is the number of abstain votes on a + proposal. no_count: type: string + description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string + description: >- + no_with_veto_count is the number of no with veto + votes on a proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -11993,20 +13467,38 @@ paths: custom method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: >- + voting_start_time is the starting time to vote on a + proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. metadata: type: string description: >- metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter description: >- Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object @@ -12322,11 +13814,13 @@ paths: type: object properties: proposal: + description: proposal is the requested governance proposal. type: object properties: id: type: string format: uint64 + description: id defines the unique id of the proposal. messages: type: array items: @@ -12504,7 +13998,11 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + description: >- + messages are the arbitrary messages to be executed if the + proposal passes. status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -12514,21 +14012,6 @@ paths: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: >- - ProposalStatus enumerates the valid statuses of a - proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: >- final_tally_result is the final tally result of the @@ -12542,18 +14025,28 @@ paths: properties: yes_count: type: string + description: yes_count is the number of yes votes on a proposal. abstain_count: type: string + description: >- + abstain_count is the number of abstain votes on a + proposal. no_count: type: string + description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string + description: >- + no_with_veto_count is the number of no with veto votes + on a proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -12571,20 +14064,34 @@ paths: custom method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: >- + voting_start_time is the starting time to vote on a + proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. metadata: type: string description: >- metadata is any arbitrary metadata attached to the proposal. - description: >- - Proposal defines the core field members of a governance - proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter description: >- QueryProposalResponse is the response type for the Query/Proposal RPC method. @@ -12800,8 +14307,12 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: >- + depositor defines the deposit addresses from the + proposals. amount: type: array items: @@ -12820,11 +14331,13 @@ paths: custom method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active proposal. + description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object @@ -13116,8 +14629,12 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: >- + depositor defines the deposit addresses from the + proposals. amount: type: array items: @@ -13135,6 +14652,7 @@ paths: custom method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. @@ -13353,12 +14871,20 @@ paths: properties: yes_count: type: string + description: yes_count is the number of yes votes on a proposal. abstain_count: type: string + description: >- + abstain_count is the number of abstain votes on a + proposal. no_count: type: string + description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string + description: >- + no_with_veto_count is the number of no with veto votes on + a proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -13574,14 +15100,19 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: + description: >- + option defines the valid vote options, it must not + contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -13590,20 +15121,15 @@ paths: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a - given governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: >- + weight is the vote weight associated with the vote + option. description: >- WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. metadata: type: string description: >- @@ -13614,7 +15140,7 @@ paths: A Vote consists of a proposal ID, the voter, and the vote option. - description: votes defined the queried votes. + description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object @@ -13898,20 +15424,25 @@ paths: type: object properties: vote: - description: vote defined the queried vote. + description: vote defines the queried vote. type: object properties: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: + description: >- + option defines the valid vote options, it must not + contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -13920,20 +15451,15 @@ paths: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a - given governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: >- + weight is the vote weight associated with the vote + option. description: >- WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. metadata: type: string description: >- @@ -14157,7 +15683,7 @@ paths: properties: voting_period: type: string - description: Length of the voting period. + description: Duration of the voting period. deposit_params: description: deposit_params defines the parameters related to deposit. type: object @@ -14185,7 +15711,8 @@ paths: description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - months. + + months. tally_params: description: tally_params defines the parameters related to tally. type: object @@ -14196,7 +15723,8 @@ paths: description: >- Minimum percentage of total stake needed to vote for a result to be - considered valid. + + considered valid. threshold: type: string format: byte @@ -14209,7 +15737,8 @@ paths: description: >- Minimum value of Veto votes to Total votes ratio for proposal to be - vetoed. Default value: 1/3. + + vetoed. Default value: 1/3. description: >- QueryParamsResponse is the response type for the Query/Params RPC method. @@ -14428,7 +15957,9 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. content: + description: content is the proposal's content. type: object properties: '@type': @@ -14490,120 +16021,8 @@ paths: used with implementation specific semantics. additionalProperties: {} - description: >- - `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 := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(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" - } status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -14613,21 +16032,6 @@ paths: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: >- - ProposalStatus enumerates the valid statuses of a - proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: >- final_tally_result is the final tally result of the @@ -14641,18 +16045,28 @@ paths: properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: >- + abstain is the number of abstain votes on a + proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string + description: >- + no_with_veto is the number of no with veto votes on + a proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -14671,15 +16085,21 @@ paths: custom method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: >- + voting_start_time is the starting time to vote on a + proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. description: >- Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object @@ -15000,7 +16420,9 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. content: + description: content is the proposal's content. type: object properties: '@type': @@ -15062,118 +16484,8 @@ paths: used with implementation specific semantics. additionalProperties: {} - description: >- - `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 := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(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" - } status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -15183,21 +16495,6 @@ paths: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: >- - ProposalStatus enumerates the valid statuses of a - proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: >- final_tally_result is the final tally result of the @@ -15211,18 +16508,26 @@ paths: properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string + description: >- + no_with_veto is the number of no with veto votes on a + proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -15240,12 +16545,17 @@ paths: custom method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: >- + voting_start_time is the starting time to vote on a + proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. description: >- Proposal defines the core field members of a governance proposal. @@ -15464,8 +16774,12 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: >- + depositor defines the deposit addresses from the + proposals. amount: type: array items: @@ -15484,11 +16798,13 @@ paths: custom method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active proposal. + description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object @@ -15780,8 +17096,12 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: >- + depositor defines the deposit addresses from the + proposals. amount: type: array items: @@ -15799,6 +17119,7 @@ paths: custom method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. @@ -16017,12 +17338,18 @@ paths: properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string + description: >- + no_with_veto is the number of no with veto votes on a + proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -16238,8 +17565,10 @@ paths: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field @@ -16264,6 +17593,9 @@ paths: type: object properties: option: + description: >- + option defines the valid vote options, it must not + contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -16272,30 +17604,27 @@ paths: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a - given governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: >- + weight is the vote weight associated with the vote + option. description: >- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 description: >- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. - description: votes defined the queried votes. + description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object @@ -16579,14 +17908,16 @@ paths: type: object properties: vote: - description: vote defined the queried vote. + description: vote defines the queried vote. type: object properties: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is @@ -16611,6 +17942,9 @@ paths: type: object properties: option: + description: >- + option defines the valid vote options, it must not + contain duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -16619,24 +17953,21 @@ paths: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a - given governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: >- + weight is the vote weight associated with the vote + option. description: >- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 description: >- QueryVoteResponse is the response type for the Query/Vote RPC method. @@ -16850,7 +18181,7 @@ paths: type: object properties: info: - description: info is the GroupInfo for the group. + description: info is the GroupInfo of the group. type: object properties: id: @@ -17086,7 +18417,7 @@ paths: - Query /cosmos/group/v1/group_members/{group_id}: get: - summary: GroupMembers queries members of a group + summary: GroupMembers queries members of a group by group id. operationId: CosmosGroupV1GroupMembers responses: '200': @@ -17404,7 +18735,7 @@ paths: - Query /cosmos/group/v1/group_policies_by_admin/{admin}: get: - summary: GroupsByAdmin queries group policies by admin address. + summary: GroupPoliciesByAdmin queries group policies by admin address. operationId: CosmosGroupV1GroupPoliciesByAdmin responses: '200': @@ -17429,9 +18760,14 @@ paths: description: admin is the account address of the group admin. metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the - group policy. + title: >- + metadata is any arbitrary metadata attached to the group + policy. + + the recommended format of the metadata is to be found + here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 @@ -17815,9 +19151,14 @@ paths: description: admin is the account address of the group admin. metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the - group policy. + title: >- + metadata is any arbitrary metadata attached to the group + policy. + + the recommended format of the metadata is to be found + here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 @@ -18188,7 +19529,7 @@ paths: type: object properties: info: - description: info is the GroupPolicyInfo for the group policy. + description: info is the GroupPolicyInfo of the group policy. type: object properties: address: @@ -18203,9 +19544,14 @@ paths: description: admin is the account address of the group admin. metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the - group policy. + title: >- + metadata is any arbitrary metadata attached to the group + policy. + + the recommended format of the metadata is to be found + here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 @@ -18481,6 +19827,329 @@ paths: type: string tags: - Query + /cosmos/group/v1/groups: + get: + summary: Groups queries all groups in state. + description: 'Since: cosmos-sdk 0.47.1' + operationId: CosmosGroupV1Groups + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: '`groups` is all the groups present in state.' + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryGroupsResponse is the Query/Groups response type. + + Since: cosmos-sdk 0.47.1 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query /cosmos/group/v1/groups_by_admin/{admin}: get: summary: GroupsByAdmin queries groups by admin address. @@ -19158,9 +20827,14 @@ paths: policy. metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the + title: >- + metadata is any arbitrary metadata attached to the proposal. + + the recommended format of the metadata is to be found + here: + + https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: @@ -19239,8 +20913,8 @@ paths: voting_period_end is the timestamp before which voting must be done. - Unless a successfull MsgExec is called before (to execute - a proposal whose + Unless a successful MsgExec is called before (to execute a + proposal whose tally is successful before the voting period ends), tallying will be done @@ -19440,6 +21114,14 @@ paths: description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal description: QueryProposalResponse is the Query/Proposal response type. default: description: An unexpected error response. @@ -19894,9 +21576,14 @@ paths: policy. metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the + title: >- + metadata is any arbitrary metadata attached to the proposal. + + the recommended format of the metadata is to be found + here: + + https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: @@ -19975,8 +21662,8 @@ paths: voting_period_end is the timestamp before which voting must be done. - Unless a successfull MsgExec is called before (to - execute a proposal whose + Unless a successful MsgExec is called before (to execute + a proposal whose tally is successful before the voting period ends), tallying will be done @@ -20176,6 +21863,14 @@ paths: description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can submit a proposal @@ -20494,9 +22189,7 @@ paths: default: VOTE_OPTION_UNSPECIFIED metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the - vote. + description: metadata is any arbitrary metadata attached to the vote. submit_time: type: string format: date-time @@ -20705,7 +22398,7 @@ paths: - Query /cosmos/group/v1/votes_by_proposal/{proposal_id}: get: - summary: VotesByProposal queries a vote by proposal. + summary: VotesByProposal queries a vote by proposal id. operationId: CosmosGroupV1VotesByProposal responses: '200': @@ -20737,9 +22430,7 @@ paths: default: VOTE_OPTION_UNSPECIFIED metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the - vote. + description: metadata is any arbitrary metadata attached to the vote. submit_time: type: string format: date-time @@ -21054,9 +22745,7 @@ paths: default: VOTE_OPTION_UNSPECIFIED metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the - vote. + description: metadata is any arbitrary metadata attached to the vote. submit_time: type: string format: date-time @@ -21483,6 +23172,9 @@ paths: amount: type: string format: uint64 + title: >- + amount is the number of all NFTs of a given class owned by the + owner title: >- QueryBalanceResponse is the response type for the Query/Balance RPC method @@ -21673,10 +23365,12 @@ paths: } parameters: - name: owner + description: owner is the owner address of the nft in: path required: true type: string - name: class_id + description: class_id associated with the nft in: path required: true type: string @@ -21908,7 +23602,9 @@ paths: "value": "1.212s" } description: Class defines the class of the nft type. + description: class defines the class of the nft type. pagination: + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -21926,16 +23622,6 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } title: >- QueryClassesResponse is the response type for the Query/Classes RPC method @@ -22194,6 +23880,7 @@ paths: type: object properties: class: + description: class defines the class of the nft type. type: object properties: id: @@ -22402,7 +24089,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - description: Class defines the class of the nft type. title: >- QueryClassResponse is the response type for the Query/Class RPC method @@ -22593,6 +24279,7 @@ paths: } parameters: - name: class_id + description: class_id associated with the nft in: path required: true type: string @@ -22808,7 +24495,9 @@ paths: "value": "1.212s" } description: NFT defines the NFT. + title: NFT defines the NFT pagination: + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -22826,16 +24515,6 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } title: >- QueryNFTsResponse is the response type for the Query/NFTs RPC methods @@ -23026,10 +24705,12 @@ paths: } parameters: - name: class_id + description: class_id associated with the nft in: query required: false type: string - name: owner + description: owner is the owner address of the nft in: query required: false type: string @@ -23102,6 +24783,7 @@ paths: type: object properties: nft: + title: owner is the owner address of the nft type: object properties: class_id: @@ -23481,10 +25163,12 @@ paths: } parameters: - name: class_id + description: class_id associated with the nft in: path required: true type: string - name: id + description: id is a unique identifier of the NFT in: path required: true type: string @@ -23504,6 +25188,7 @@ paths: properties: owner: type: string + title: owner is the owner address of the nft title: >- QueryOwnerResponse is the response type for the Query/Owner RPC method @@ -23694,10 +25379,12 @@ paths: } parameters: - name: class_id + description: class_id associated with the nft in: path required: true type: string - name: id + description: id is a unique identifier of the NFT in: path required: true type: string @@ -23718,6 +25405,7 @@ paths: amount: type: string format: uint64 + title: amount is the number of all NFTs from the given class title: >- QuerySupplyResponse is the response type for the Query/Supply RPC method @@ -23908,6 +25596,7 @@ paths: } parameters: - name: class_id + description: class_id associated with the nft in: path required: true type: string @@ -24354,6 +26043,11 @@ paths: summary: >- DelegatorDelegations queries all delegations of a given delegator address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1DelegatorDelegations responses: '200': @@ -24688,6 +26382,11 @@ paths: /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: get: summary: Redelegations queries redelegations of given address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Redelegations responses: '200': @@ -24746,6 +26445,18 @@ paths: shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: >- + Incrementing id that uniquely identifies this + entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding + has been stopped by external modules description: >- RedelegationEntry defines a redelegation object with relevant metadata. @@ -24790,6 +26501,18 @@ paths: shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: >- + Incrementing id that uniquely identifies this + entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding + has been stopped by external modules description: >- RedelegationEntry defines a redelegation object with relevant metadata. @@ -25101,6 +26824,11 @@ paths: given delegator address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1DelegatorUnbondingDelegations responses: '200': @@ -25150,6 +26878,18 @@ paths: description: >- balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: >- + Incrementing id that uniquely identifies this + entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has + been stopped by external modules description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -25440,6 +27180,11 @@ paths: summary: |- DelegatorValidators queries all validators info for given delegator address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1DelegatorValidators responses: '200': @@ -25627,6 +27372,20 @@ paths: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator description: >- Validator defines a validator, together with the total amount of the @@ -26112,6 +27871,20 @@ paths: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator description: |- QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. @@ -26414,7 +28187,7 @@ paths: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. valset: type: array items: @@ -26596,6 +28369,20 @@ paths: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has + been stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator description: >- Validator defines a validator, together with the total amount of the @@ -27258,6 +29045,11 @@ paths: /cosmos/staking/v1beta1/validators: get: summary: Validators queries all validators that match the given status. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1Validators responses: '200': @@ -27445,6 +29237,20 @@ paths: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator description: >- Validator defines a validator, together with the total amount of the @@ -27928,6 +29734,20 @@ paths: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an + unbonding of this validator title: >- QueryValidatorResponse is response type for the Query/Validator RPC method @@ -28127,6 +29947,11 @@ paths: /cosmos/staking/v1beta1/validators/{validator_addr}/delegations: get: summary: ValidatorDelegations queries delegate info for given validator. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1ValidatorDelegations responses: '200': @@ -28762,6 +30587,16 @@ paths: balance: type: string description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -28977,6 +30812,11 @@ paths: summary: >- ValidatorUnbondingDelegations queries unbonding delegations of a validator. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. operationId: CosmosStakingV1Beta1ValidatorUnbondingDelegations responses: '200': @@ -29026,6 +30866,18 @@ paths: description: >- balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: >- + Incrementing id that uniquely identifies this + entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has + been stopped by external modules description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -29311,276 +31163,16 @@ paths: type: boolean tags: - Query - /cosmos/tx/v1beta1/simulate: + /cosmos/tx/v1beta1/decode: post: - summary: Simulate simulates executing a transaction for estimating gas usage. - operationId: CosmosTxV1Beta1Simulate + summary: TxDecode decodes the transaction. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosTxV1Beta1TxDecode responses: '200': description: A successful response. schema: - type: object - properties: - gas_info: - description: gas_info is the information about gas used in the simulation. - type: object - properties: - gas_wanted: - type: string - format: uint64 - description: >- - GasWanted is the maximum units of work we allow this tx to - perform. - gas_used: - type: string - format: uint64 - description: GasUsed is the amount of gas actually consumed. - result: - description: result is the result of the simulation. - type: object - properties: - data: - type: string - format: byte - description: >- - Data is any data returned from message or handler - execution. It MUST be - - length prefixed in order to separate data from multiple - message executions. - - Deprecated. This field is still populated, but prefer - msg_response instead - - because it also contains the Msg response typeURL. - log: - type: string - description: >- - Log contains the log information from message or handler - execution. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: >- - EventAttribute is a single key-value pair, - associated with an event. - description: >- - Event allows application developers to attach additional - information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx - and ResponseDeliverTx. - - Later, transactions may be queried using these events. - description: >- - Events contains a slice of Event objects that were emitted - during message - - or handler execution. - msg_responses: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - 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. - additionalProperties: {} - description: >- - `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 := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(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" - } - description: >- - msg_responses contains the Msg handler responses type - packed in Anys. - - - Since: cosmos-sdk 0.46 - description: |- - SimulateResponse is the response type for the - Service.SimulateRPC method. + $ref: '#/definitions/cosmos.tx.v1beta1.TxDecodeResponse' default: description: An unexpected error response. schema: @@ -29769,23 +31361,47 @@ paths: parameters: - name: body description: |- - SimulateRequest is the request type for the Service.Simulate + TxDecodeRequest is the request type for the Service.TxDecode RPC method. + + Since: cosmos-sdk 0.47 in: body required: true schema: - $ref: '#/definitions/cosmos.tx.v1beta1.SimulateRequest' + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + + Since: cosmos-sdk 0.47 tags: - Service - /cosmos/tx/v1beta1/txs: - get: - summary: GetTxsEvent fetches txs by event. - operationId: CosmosTxV1Beta1GetTxsEvent + /cosmos/tx/v1beta1/decode/amino: + post: + summary: TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosTxV1Beta1TxDecodeAmino responses: '200': description: A successful response. schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' + type: object + properties: + amino_json: + type: string + description: >- + TxDecodeAminoResponse is the response type for the + Service.TxDecodeAmino + + RPC method. + + + Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: @@ -29972,322 +31588,53 @@ paths: "value": "1.212s" } parameters: - - name: events - description: events is the list of transaction event type. - in: query - required: false - type: array - items: - type: string - collectionFormat: multi - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total + - name: body description: >- - count_total is set to true to indicate that the result set should - include + TxDecodeAminoRequest is the request type for the + Service.TxDecodeAmino - a count of the total number of items available for pagination in - UIs. + RPC method. - count_total is only respected when offset is used. It is ignored - when key - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + Since: cosmos-sdk 0.47 + in: body + required: true + schema: + type: object + properties: + amino_binary: + type: string + format: byte + description: >- + TxDecodeAminoRequest is the request type for the + Service.TxDecodeAmino + RPC method. - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - - name: order_by - description: |2- - - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order - - ORDER_BY_DESC: ORDER_BY_DESC defines descending order - in: query - required: false - type: string - enum: - - ORDER_BY_UNSPECIFIED - - ORDER_BY_ASC - - ORDER_BY_DESC - default: ORDER_BY_UNSPECIFIED - - name: page - description: >- - page is the page number to query, starts at 1. If not provided, will - default to first page. - in: query - required: false - type: string - format: uint64 - - name: limit - description: >- - limit is the total number of results to be returned in the result - page. - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 + Since: cosmos-sdk 0.47 tags: - Service + /cosmos/tx/v1beta1/encode: post: - summary: BroadcastTx broadcast transaction. - operationId: CosmosTxV1Beta1BroadcastTx + summary: TxEncode encodes the transaction. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosTxV1Beta1TxEncode responses: '200': description: A successful response. schema: type: object properties: - tx_response: - description: tx_response is the queried TxResponses. - type: object - properties: - height: - type: string - format: int64 - title: The block height - txhash: - type: string - description: The transaction hash. - codespace: - type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: - type: string - description: Result bytes, if any. - raw_log: - type: string - description: >- - The output of the application's logger (raw string). May - be - - non-deterministic. - logs: - type: array - items: - type: object - properties: - msg_index: - type: integer - format: int64 - log: - type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where - the key and value are - - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where - all the attributes - - contain key/value pairs that are strings instead - of raw bytes. - description: >- - Events contains a slice of Event objects that were - emitted during some - - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed - tx ABCI message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: - type: string - description: Additional information. May be non-deterministic. - gas_wanted: - type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: - type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: - description: The request transaction bytes. - type: object - properties: - '@type': - type: string - description: >- - 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. - additionalProperties: {} - timestamp: - type: string - description: >- - Time of the previous block. For heights > 1, it's the - weighted median of - - the timestamps of the valid votes in the block.LastCommit. - For height == 1, - - it's genesis time. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - title: nondeterministic - description: >- - EventAttribute is a single key-value pair, - associated with an event. - description: >- - Event allows application developers to attach additional - information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx - and ResponseDeliverTx. - - Later, transactions may be queried using these events. - description: >- - Events defines all the events emitted by processing a - transaction. Note, - - these events include those emitted by processing all the - messages and those - - emitted from the ante. Whereas Logs contains the events, - with - - additional metadata, emitted only by processing the - messages. - - - Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. description: |- - BroadcastTxResponse is the response type for the - Service.BroadcastTx method. + TxEncodeResponse is the response type for the + Service.TxEncode method. + + Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: @@ -30475,56 +31822,39 @@ paths: } parameters: - name: body - description: >- - BroadcastTxRequest is the request type for the - Service.BroadcastTxRequest - + description: |- + TxEncodeRequest is the request type for the Service.TxEncode RPC method. + + Since: cosmos-sdk 0.47 in: body required: true + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.TxEncodeRequest' + tags: + - Service + /cosmos/tx/v1beta1/encode/amino: + post: + summary: TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosTxV1Beta1TxEncodeAmino + responses: + '200': + description: A successful response. schema: type: object properties: - tx_bytes: + amino_binary: type: string format: byte - description: tx_bytes is the raw transaction. - mode: - type: string - enum: - - BROADCAST_MODE_UNSPECIFIED - - BROADCAST_MODE_BLOCK - - BROADCAST_MODE_SYNC - - BROADCAST_MODE_ASYNC - default: BROADCAST_MODE_UNSPECIFIED - description: >- - BroadcastMode specifies the broadcast mode for the - TxService.Broadcast RPC method. - - - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - the tx to be committed in a block. - - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - a CheckTx execution response only. - - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - immediately. description: >- - BroadcastTxRequest is the request type for the - Service.BroadcastTxRequest + TxEncodeAminoResponse is the response type for the + Service.TxEncodeAmino RPC method. - tags: - - Service - /cosmos/tx/v1beta1/txs/block/{height}: - get: - summary: GetBlockWithTxs fetches a block with decoded txs. - description: 'Since: cosmos-sdk 0.45.2' - operationId: CosmosTxV1Beta1GetBlockWithTxs - responses: - '200': - description: A successful response. - schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + + + Since: cosmos-sdk 0.47 default: description: An unexpected error response. schema: @@ -30711,291 +32041,300 @@ paths: "value": "1.212s" } parameters: - - name: height - description: height is the height of the block to query. - in: path - required: true - type: string - format: int64 - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit + - name: body description: >- - limit is the total number of results to be returned in the result - page. + TxEncodeAminoRequest is the request type for the + Service.TxEncodeAmino - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include + RPC method. - a count of the total number of items available for pagination in - UIs. - count_total is only respected when offset is used. It is ignored - when key + Since: cosmos-sdk 0.47 + in: body + required: true + schema: + type: object + properties: + amino_json: + type: string + description: >- + TxEncodeAminoRequest is the request type for the + Service.TxEncodeAmino - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + RPC method. - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean + Since: cosmos-sdk 0.47 tags: - Service - /cosmos/tx/v1beta1/txs/{hash}: - get: - summary: GetTx fetches a tx by hash. - operationId: CosmosTxV1Beta1GetTx + /cosmos/tx/v1beta1/simulate: + post: + summary: Simulate simulates executing a transaction for estimating gas usage. + operationId: CosmosTxV1Beta1Simulate responses: '200': description: A successful response. - schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' - default: - description: An unexpected error response. schema: type: object properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + gas_info: + description: gas_info is the information about gas used in the simulation. + type: object + properties: + gas_wanted: + type: string + format: uint64 + description: >- + GasWanted is the maximum units of work we allow this tx to + perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + result: + description: result is the result of the simulation. + type: object + properties: + data: + type: string + format: byte + description: >- + Data is any data returned from message or handler + execution. It MUST be - protocol buffer message. This string must contain at - least + length prefixed in order to separate data from multiple + message executions. - one "/" character. The last segment of the URL's path - must represent + Deprecated. This field is still populated, but prefer + msg_response instead - the fully qualified name of the type (as in + because it also contains the Msg response typeURL. + log: + type: string + description: >- + Log contains the log information from message or handler + execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, + associated with an event. + description: >- + Event allows application developers to attach additional + information to - `path/google.protobuf.Duration`). The name should be in - a canonical form + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx + and ResponseDeliverTx. - (e.g., leading "." is not accepted). + Later, transactions may be queried using these events. + description: >- + Events contains a slice of Event objects that were emitted + during message + or handler execution. + msg_responses: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - In practice, teams usually precompile into the binary - all types that they + protocol buffer message. This string must contain at + least - expect it to use in the context of Any. However, for - URLs which use the + one "/" character. The last segment of the URL's + path must represent - scheme `http`, `https`, or no scheme, one can optionally - set up a type + the fully qualified name of the type (as in - server that maps type URLs to message definitions as - follows: + `path/google.protobuf.Duration`). The name should be + in a canonical form + (e.g., leading "." is not accepted). - * 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.) + In practice, teams usually precompile into the + binary all types that they - Note: this functionality is not currently available in - the official + expect it to use in the context of Any. However, for + URLs which use the - protobuf release, and it is not used for type URLs - beginning with + scheme `http`, `https`, or no scheme, one can + optionally set up a type - type.googleapis.com. + server that maps type URLs to message definitions as + follows: - Schemes other than `http`, `https` (or the empty scheme) - might be + * If no scheme is provided, `https` is assumed. - used with implementation specific semantics. - additionalProperties: {} - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + * 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.) - URL that describes the type of the serialized message. + Note: this functionality is not currently available + in the official + protobuf release, and it is not used for type URLs + beginning with - Protobuf library provides support to pack/unpack Any values - in the form + type.googleapis.com. - of utility functions or additional generated methods of the - Any type. + Schemes other than `http`, `https` (or the empty + scheme) might be - Example 1: Pack and unpack a message in C++. + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + URL that describes the type of the serialized message. - 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); - } + Protobuf library provides support to pack/unpack Any + values in the form - Example 3: Pack and unpack a message in Python. + of utility functions or additional generated methods of + the Any type. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 1: Pack and unpack a message in C++. - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - The pack methods provided by protobuf library will by - default use + Example 2: Pack and unpack a message in Java. - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - methods only use the fully qualified type name after the - last '/' + Example 3: Pack and unpack a message in Python. - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - name "y.z". + Example 4: Pack and unpack a message in Go + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + The pack methods provided by protobuf library will by + default use - JSON + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - ==== + methods only use the fully qualified type name after the + last '/' - The JSON representation of an `Any` value uses the regular + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - representation of the deserialized, embedded message, with - an + name "y.z". - 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": - } + JSON - If the embedded message type is well-known and has a custom - JSON + ==== - representation, that representation will be embedded adding - a field + The JSON representation of an `Any` value uses the + regular - `value` which holds the custom JSON in addition to the - `@type` + representation of the deserialized, embedded message, + with an - field. Example (for message [google.protobuf.Duration][]): + additional field `@type` which contains the type URL. + Example: - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: hash - description: hash is the tx hash to query, encoded as a hex string. - in: path - required: true - type: string - tags: - - Service - /cosmos/upgrade/v1beta1/applied_plan/{name}: - get: - summary: AppliedPlan queries a previously applied upgrade plan by its name. - operationId: CosmosUpgradeV1Beta1AppliedPlan - responses: - '200': - description: A successful response. - schema: - type: object - properties: - height: - type: string - format: int64 - description: height is the block height at which the plan was applied. - description: >- - QueryAppliedPlanResponse is the response type for the - Query/AppliedPlan RPC + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - method. + { + "@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" + } + description: >- + msg_responses contains the Msg handler responses type + packed in Anys. + + + Since: cosmos-sdk 0.46 + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. default: description: An unexpected error response. schema: @@ -31182,28 +32521,25 @@ paths: "value": "1.212s" } parameters: - - name: name - description: name is the name of the applied plan to query for. - in: path + - name: body + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. + in: body required: true - type: string + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.SimulateRequest' tags: - - Query - /cosmos/upgrade/v1beta1/authority: + - Service + /cosmos/tx/v1beta1/txs: get: - summary: Returns the account with authority to conduct upgrades - description: 'Since: cosmos-sdk 0.46' - operationId: CosmosUpgradeV1Beta1Authority + summary: GetTxsEvent fetches txs by event. + operationId: CosmosTxV1Beta1GetTxsEvent responses: '200': description: A successful response. schema: - type: object - properties: - address: - type: string - description: 'Since: cosmos-sdk 0.46' - title: QueryAuthorityResponse is the response type for Query/Authority + $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' default: description: An unexpected error response. schema: @@ -31389,77 +32725,203 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: events + description: events is the list of transaction event type. + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + - name: order_by + description: |2- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + in: query + required: false + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED + - name: page + description: >- + page is the page number to query, starts at 1. If not provided, will + default to first page. + in: query + required: false + type: string + format: uint64 + - name: limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 tags: - - Query - /cosmos/upgrade/v1beta1/current_plan: - get: - summary: CurrentPlan queries the current upgrade plan. - operationId: CosmosUpgradeV1Beta1CurrentPlan + - Service + post: + summary: BroadcastTx broadcast transaction. + operationId: CosmosTxV1Beta1BroadcastTx responses: '200': description: A successful response. schema: type: object properties: - plan: - description: plan is the current upgrade plan. + tx_response: + description: tx_response is the queried TxResponses. type: object properties: - name: + height: type: string - description: >- - Sets the name for the upgrade. This name will be used by - the upgraded - - version of the software to apply any special "on-upgrade" - commands during - - the first BeginBlock method after the upgrade is applied. - It is also used - - to detect whether a software version can handle a given - upgrade. If no - - upgrade handler with this name has been set in the - software, it will be - - assumed that the software is out-of-date when the upgrade - Time or Height is - - reached and the software will exit. - time: + format: int64 + title: The block height + txhash: type: string - format: date-time - description: >- - Deprecated: Time based upgrades have been deprecated. Time - based upgrade logic - - has been removed from the SDK. - - If this field is not empty, an error will be thrown. - height: + description: The transaction hash. + codespace: type: string + title: Namespace for the Code + code: + type: integer format: int64 - description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. - info: + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: type: string - title: >- - Any application specific upgrade info to be included - on-chain - - such as a git commit that validators could automatically - upgrade to - upgraded_client_state: description: >- - Deprecated: UpgradedClientState field has been deprecated. - IBC upgrade logic has been - - moved to the IBC module in the sub module 02-client. + The output of the application's logger (raw string). May + be - If this field is not empty, an error will be thrown. - type: object + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where + the key and value are + + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where + all the attributes + + contain key/value pairs that are strings instead + of raw bytes. + description: >- + Events contains a slice of Event objects that were + emitted during some + + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed + tx ABCI message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object properties: '@type': type: string @@ -31520,11 +32982,64 @@ paths: used with implementation specific semantics. additionalProperties: {} - description: >- - QueryCurrentPlanResponse is the response type for the - Query/CurrentPlan RPC + timestamp: + type: string + description: >- + Time of the previous block. For heights > 1, it's the + weighted median of - method. + the timestamps of the valid votes in the block.LastCommit. + For height == 1, + + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, + associated with an event. + description: >- + Event allows application developers to attach additional + information to + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx + and ResponseDeliverTx. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a + transaction. Note, + + these events include those emitted by processing all the + messages and those + + emitted from the ante. Whereas Logs contains the events, + with + + additional metadata, emitted only by processing the + messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. default: description: An unexpected error response. schema: @@ -31710,46 +33225,59 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - tags: - - Query - /cosmos/upgrade/v1beta1/module_versions: - get: - summary: ModuleVersions queries the list of module versions from state. - description: 'Since: cosmos-sdk 0.43' - operationId: CosmosUpgradeV1Beta1ModuleVersions - responses: - '200': - description: A successful response. + parameters: + - name: body + description: >- + BroadcastTxRequest is the request type for the + Service.BroadcastTxRequest + + RPC method. + in: body + required: true schema: type: object properties: - module_versions: - type: array - items: - type: object - properties: - name: - type: string - title: name of the app module - version: - type: string - format: uint64 - title: consensus version of the app module - description: |- - ModuleVersion specifies a module and its consensus version. - - Since: cosmos-sdk 0.43 + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED description: >- - module_versions is a list of module names with their consensus - versions. + BroadcastMode specifies the broadcast mode for the + TxService.Broadcast RPC method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x + onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. description: >- - QueryModuleVersionsResponse is the response type for the - Query/ModuleVersions + BroadcastTxRequest is the request type for the + Service.BroadcastTxRequest RPC method. - - - Since: cosmos-sdk 0.43 + tags: + - Service + /cosmos/tx/v1beta1/txs/block/{height}: + get: + summary: GetBlockWithTxs fetches a block with decoded txs. + description: 'Since: cosmos-sdk 0.45.2' + operationId: CosmosTxV1Beta1GetBlockWithTxs + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' default: description: An unexpected error response. schema: @@ -31936,46 +33464,1269 @@ paths: "value": "1.212s" } parameters: - - name: module_name + - name: height + description: height is the height of the block to query. + in: path + required: true + type: string + format: int64 + - name: pagination.key description: |- - module_name is a field to query a specific module - consensus version from state. Leaving this empty will - fetch the full list of module versions from state + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. in: query required: false type: string - tags: - - Query - /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: - get: - summary: >- - UpgradedConsensusState queries the consensus state that will serve + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - as a trusted kernel for the next version of this chain. It will only be + It is less efficient than using key. Only one of offset or key + should - stored at the last height of this chain. + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. - UpgradedConsensusState RPC not supported with legacy querier + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include - This rpc is deprecated now that IBC has its own replacement + a count of the total number of items available for pagination in + UIs. - (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - operationId: CosmosUpgradeV1Beta1UpgradedConsensusState + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Service + /cosmos/tx/v1beta1/txs/{hash}: + get: + summary: GetTx fetches a tx by hash. + operationId: CosmosTxV1Beta1GetTx responses: '200': description: A successful response. schema: - type: object - properties: - upgraded_consensus_state: - type: string - format: byte - title: 'Since: cosmos-sdk 0.43' - description: >- - QueryUpgradedConsensusStateResponse is the response type for the - Query/UpgradedConsensusState - - RPC method. + $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + parameters: + - name: hash + description: hash is the tx hash to query, encoded as a hex string. + in: path + required: true + type: string + tags: + - Service + /cosmos/upgrade/v1beta1/applied_plan/{name}: + get: + summary: AppliedPlan queries a previously applied upgrade plan by its name. + operationId: CosmosUpgradeV1Beta1AppliedPlan + responses: + '200': + description: A successful response. + schema: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height at which the plan was applied. + description: >- + QueryAppliedPlanResponse is the response type for the + Query/AppliedPlan RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + parameters: + - name: name + description: name is the name of the applied plan to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/upgrade/v1beta1/authority: + get: + summary: Returns the account with authority to conduct upgrades + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosUpgradeV1Beta1Authority + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + tags: + - Query + /cosmos/upgrade/v1beta1/current_plan: + get: + summary: CurrentPlan queries the current upgrade plan. + operationId: CosmosUpgradeV1Beta1CurrentPlan + responses: + '200': + description: A successful response. + schema: + type: object + properties: + plan: + description: plan is the current upgrade plan. + type: object + properties: + name: + type: string + description: >- + Sets the name for the upgrade. This name will be used by + the upgraded + + version of the software to apply any special "on-upgrade" + commands during + + the first BeginBlock method after the upgrade is applied. + It is also used + + to detect whether a software version can handle a given + upgrade. If no + + upgrade handler with this name has been set in the + software, it will be + + assumed that the software is out-of-date when the upgrade + Time or Height is + + reached and the software will exit. + time: + type: string + format: date-time + description: >- + Deprecated: Time based upgrades have been deprecated. Time + based upgrade logic + + has been removed from the SDK. + + If this field is not empty, an error will be thrown. + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: >- + Any application specific upgrade info to be included + on-chain + + such as a git commit that validators could automatically + upgrade to + upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. + IBC upgrade logic has been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + QueryCurrentPlanResponse is the response type for the + Query/CurrentPlan RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + tags: + - Query + /cosmos/upgrade/v1beta1/module_versions: + get: + summary: ModuleVersions queries the list of module versions from state. + description: 'Since: cosmos-sdk 0.43' + operationId: CosmosUpgradeV1Beta1ModuleVersions + responses: + '200': + description: A successful response. + schema: + type: object + properties: + module_versions: + type: array + items: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: |- + ModuleVersion specifies a module and its consensus version. + + Since: cosmos-sdk 0.43 + description: >- + module_versions is a list of module names with their consensus + versions. + description: >- + QueryModuleVersionsResponse is the response type for the + Query/ModuleVersions + + RPC method. + + + Since: cosmos-sdk 0.43 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + parameters: + - name: module_name + description: |- + module_name is a field to query a specific module + consensus version from state. Leaving this empty will + fetch the full list of module versions from state + in: query + required: false + type: string + tags: + - Query + /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: + get: + summary: >- + UpgradedConsensusState queries the consensus state that will serve + + as a trusted kernel for the next version of this chain. It will only be + + stored at the last height of this chain. + + UpgradedConsensusState RPC not supported with legacy querier + + This rpc is deprecated now that IBC has its own replacement + + (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + operationId: CosmosUpgradeV1Beta1UpgradedConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + title: 'Since: cosmos-sdk 0.43' + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. default: description: An unexpected error response. schema: @@ -32560,6 +35311,18 @@ paths: type: array items: type: string + slash_fraction_no_keyshare: + type: string + format: byte + slash_fraction_wrong_keyshare: + type: string + format: byte + minimum_bonded: + type: string + format: uint64 + max_idled_block: + type: string + format: uint64 description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -33096,6 +35859,24 @@ paths: params: description: params holds all the parameters of this module. type: object + properties: + trusted_counter_parties: + type: array + items: + type: object + properties: + client_id: + type: string + connection_id: + type: string + channel_id: + type: string + trusted_addresses: + type: array + items: + type: string + channel_id: + type: string description: >- QueryParamsResponse is response type for the Query/Params RPC method. @@ -33371,7 +36152,174 @@ paths: properties: '@type': type: string + description: >- + 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. additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } parameters: - name: owner in: path @@ -33422,7 +36370,174 @@ paths: properties: '@type': type: string + description: >- + 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. additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } tags: - Query /ibc/apps/interchain_accounts/host/v1/params: @@ -33897,6 +37012,7 @@ paths: in: path required: true type: string + pattern: .+ tags: - Query /ibc/apps/transfer/v1/denom_traces: @@ -34140,95 +37256,321 @@ paths: "value": "1.212s" } parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/apps/transfer/v1/denom_traces/{hash}: + get: + summary: DenomTrace queries a denomination trace information. + operationId: IbcApplicationsTransferV1DenomTrace + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom_trace: + description: >- + denom_trace returns the requested denomination trace + information. + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used + for tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + QueryDenomTraceResponse is the response type for the + Query/DenomTrace RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + parameters: + - name: hash description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false + hash (in hex format) or denom (full denom with ibc prefix) of the + denomination trace information. + in: path + required: true type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean + pattern: .+ tags: - Query - /ibc/apps/transfer/v1/denom_traces/{hash}: + /ibc/apps/transfer/v1/denoms/{denom}/total_escrow: get: - summary: DenomTrace queries a denomination trace information. - operationId: IbcApplicationsTransferV1DenomTrace + summary: >- + TotalEscrowForDenom returns the total amount of tokens in escrow based + on the denom. + operationId: IbcApplicationsTransferV1TotalEscrowForDenom responses: '200': description: A successful response. schema: type: object properties: - denom_trace: - description: >- - denom_trace returns the requested denomination trace - information. + amount: type: object properties: - path: + denom: type: string - description: >- - path defines the chain of port/channel identifiers used - for tracing the - - source of the fungible token. - base_denom: + amount: type: string - description: base denomination of the relayed fungible token. - description: >- - QueryDenomTraceResponse is the response type for the - Query/DenomTrace RPC + description: >- + Coin defines a token with a denomination and an amount. - method. + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + description: >- + QueryTotalEscrowForDenomResponse is the response type for + TotalEscrowForDenom RPC method. default: description: An unexpected error response. schema: @@ -34415,13 +37757,11 @@ paths: "value": "1.212s" } parameters: - - name: hash - description: >- - hash (in hex format) or denom (full denom with ibc prefix) of the - denomination trace information. + - name: denom in: path required: true type: string + pattern: .+ tags: - Query /ibc/apps/transfer/v1/params: @@ -38899,219 +42239,6 @@ paths: type: boolean tags: - Query - /ibc/client/v1/params: - get: - summary: ClientParams queries all parameters of the ibc client. - operationId: IbcCoreClientV1ClientParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - allowed_clients: - type: array - items: - type: string - description: >- - allowed_clients defines the list of allowed client state - types. - description: >- - QueryClientParamsResponse is the response type for the - Query/ClientParams RPC - - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - description: >- - 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. - additionalProperties: {} - description: >- - `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 := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(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" - } - tags: - - Query /ibc/core/client/v1/client_states: get: summary: ClientStates queries all the IBC light clients of a chain. @@ -41492,6 +44619,225 @@ paths: type: boolean tags: - Query + /ibc/core/client/v1/params: + get: + summary: ClientParams queries all parameters of the ibc client submodule. + operationId: IbcCoreClientV1ClientParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: >- + allowed_clients defines the list of allowed client state + types which can be created + + and interacted with. If a client type is removed from the + allowed clients list, usage + + of this client will be disabled until it is added again to + the list. + description: >- + QueryClientParamsResponse is the response type for the + Query/ClientParams RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + tags: + - Query /ibc/core/client/v1/upgraded_client_states: get: summary: UpgradedClientState queries an Upgraded IBC light client. @@ -43839,34 +47185,266 @@ paths: title: height at which the proof was retrieved type: object properties: - revision_number: - type: string - format: uint64 - title: the revision that the client is currently on - revision_height: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionConsensusStateResponse is the response type for the + Query/ConnectionConsensusState RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + parameters: + - name: connection_id + description: connection identifier + in: path + required: true + type: string + - name: revision_number + in: path + required: true + type: string + format: uint64 + - name: revision_height + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/core/connection/v1/params: + get: + summary: ConnectionParams queries all parameters of the ibc connection submodule. + operationId: IbcCoreConnectionV1ConnectionParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_expected_time_per_block: type: string format: uint64 - title: the height within the given revision - description: >- - Normally the RevisionHeight is incremented at each height - while keeping - - RevisionNumber the same. However some consensus algorithms may - choose to - - reset the height in certain conditions e.g. hard forks, - state-machine - - breaking changes In these cases, the RevisionNumber is - incremented so that + description: >- + maximum expected time per block (in nanoseconds), used to + enforce block delay. This parameter should reflect the - height continues to be monitonically increasing even as the - RevisionHeight + largest amount of time that the chain might reasonably + take to produce the next block under normal operating - gets reset - title: |- - QueryConnectionConsensusStateResponse is the response type for the - Query/ConnectionConsensusState RPC method + conditions. A safe choice is 3-5x the expected time per + block. + description: >- + QueryConnectionParamsResponse is the response type for the + Query/ConnectionParams RPC method. default: description: An unexpected error response. schema: @@ -44052,22 +47630,6 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: connection_id - description: connection identifier - in: path - required: true - type: string - - name: revision_number - in: path - required: true - type: string - format: uint64 - - name: revision_height - in: path - required: true - type: string - format: uint64 tags: - Query definitions: @@ -44094,6 +47656,182 @@ definitions: Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.BaseAccount: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + description: >- + BaseAccount defines a base account type. It contains all the necessary + fields + + for basic account functionality. Any custom account type should extend + this + + type for additional functionality (e.g. vesting). cosmos.auth.v1beta1.Bech32PrefixResponse: type: object properties: @@ -44103,6 +47841,13 @@ definitions: Bech32PrefixResponse is the response type for Bech32Prefix rpc method. Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 cosmos.auth.v1beta1.Params: type: object properties: @@ -44131,11 +47876,192 @@ definitions: title: >- QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method + cosmos.auth.v1beta1.QueryAccountInfoResponse: + type: object + properties: + info: + description: info is the account info which is represented by BaseAccount. + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + description: |- + QueryAccountInfoResponse is the Query/AccountInfo response type. + + Since: cosmos-sdk 0.47 cosmos.auth.v1beta1.QueryAccountResponse: type: object properties: account: - description: account defines the account of the corresponding address. type: object properties: '@type': @@ -44191,6 +48117,107 @@ definitions: used with implementation specific semantics. additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } description: >- QueryAccountResponse is the response type for the Query/Account RPC method. @@ -44385,6 +48412,169 @@ definitions: Since: cosmos-sdk 0.43 + cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: >- + 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. + additionalProperties: {} + description: >- + `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 := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(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" + } + description: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. cosmos.auth.v1beta1.QueryModuleAccountsResponse: type: object properties: @@ -46129,6 +50319,19 @@ definitions: cosmos.bank.v1beta1.MsgSendResponse: type: object description: MsgSendResponse defines the Msg/Send response type. + cosmos.bank.v1beta1.MsgSetSendEnabledResponse: + type: object + description: |- + MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. + + Since: cosmos-sdk 0.47 + cosmos.bank.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 cosmos.bank.v1beta1.Output: type: object properties: @@ -46166,6 +50369,18 @@ definitions: denom is sendable). + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the genesis + object. + + Storage, lookup, and manipulation of this information is now in the + keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards compatibility of + genesis files. default_send_enabled: type: boolean description: Params defines the parameters for the bank module. @@ -46508,12 +50723,85 @@ definitions: denom is sendable). + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the genesis + object. + + Storage, lookup, and manipulation of this information is now in + the keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards + compatibility of genesis files. default_send_enabled: type: boolean description: Params defines the parameters for the bank module. description: >- QueryParamsResponse defines the response type for querying x/bank parameters. + cosmos.bank.v1beta1.QuerySendEnabledResponse: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + pagination: + description: |- + pagination defines the pagination in the response. This field is only + populated if the denoms field in the request is empty. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QuerySendEnabledResponse defines the RPC response of a SendEnable query. + + Since: cosmos-sdk 0.47 + cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + QuerySpendableBalanceByDenomResponse defines the gRPC response structure + for + + querying an account's spendable balance for a specific denom. + + + Since: cosmos-sdk 0.47 cosmos.bank.v1beta1.QuerySpendableBalancesResponse: type: object properties: @@ -46640,6 +50928,12 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + cosmos.base.node.v1beta1.ConfigResponse: + type: object + properties: + minimum_gas_price: + type: string + description: ConfigResponse defines the response structure for the Config gRPC query. cosmos.base.tendermint.v1beta1.ABCIQueryResponse: type: object properties: @@ -46681,19 +50975,18 @@ definitions: ProofOp defines an operation used for calculating Merkle root. The data could - be arbitrary format, providing nessecary data for example + be arbitrary format, providing necessary data for example neighbouring node hash. Note: This type is a duplicate of the ProofOp proto type defined - in - - Tendermint. - description: |- + in Tendermint. + description: >- ProofOps is Merkle proof defined by the list of ProofOps. + Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. height: @@ -46701,11 +50994,13 @@ definitions: format: int64 codespace: type: string - description: |- + description: >- ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. + Note: This type is a duplicate of the ResponseQuery proto type defined in + Tendermint. cosmos.base.tendermint.v1beta1.Block: type: object @@ -47058,9 +51353,7 @@ definitions: type: string format: byte title: original proposer of the block - description: >- - Header defines the structure of a Tendermint - block header. + description: Header defines the structure of a block header. commit: type: object properties: @@ -47140,7 +51433,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -47164,7 +51457,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -47196,7 +51489,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -47377,7 +51670,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. data: type: object properties: @@ -47635,8 +51928,8 @@ definitions: format: byte title: original proposer of the block description: >- - Header defines the structure of a Tendermint - block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -47716,7 +52009,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -47740,7 +52033,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -47772,7 +52065,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -48197,8 +52490,8 @@ definitions: format: byte title: original proposer of the block description: >- - Header defines the structure of a Tendermint - block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -48278,7 +52571,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -48302,7 +52595,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -48334,7 +52627,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -48408,9 +52701,7 @@ definitions: field converted to bech32 string. description: >- GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight - - RPC method. + Query/GetBlockByHeight RPC method. cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: type: object properties: @@ -48520,7 +52811,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. data: type: object properties: @@ -48778,8 +53069,8 @@ definitions: format: byte title: original proposer of the block description: >- - Header defines the structure of a Tendermint - block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -48859,7 +53150,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -48883,7 +53174,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -48915,7 +53206,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -49340,8 +53631,8 @@ definitions: format: byte title: original proposer of the block description: >- - Header defines the structure of a Tendermint - block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -49421,7 +53712,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -49445,7 +53736,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -49477,7 +53768,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -49551,9 +53842,7 @@ definitions: field converted to bech32 string. description: >- GetLatestBlockResponse is the response type for the Query/GetLatestBlock - RPC - - method. + RPC method. cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: type: object properties: @@ -49760,7 +54049,7 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- + description: >- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: @@ -49835,7 +54124,7 @@ definitions: type: string title: 'Since: cosmos-sdk 0.43' description: VersionInfo is the type for the GetNodeInfoResponse message. - description: |- + description: >- GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. cosmos.base.tendermint.v1beta1.GetSyncingResponse: @@ -50052,7 +54341,7 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- + description: >- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. cosmos.base.tendermint.v1beta1.Header: @@ -50178,14 +54467,13 @@ definitions: ProofOp defines an operation used for calculating Merkle root. The data could - be arbitrary format, providing nessecary data for example neighbouring + be arbitrary format, providing necessary data for example neighbouring node hash. Note: This type is a duplicate of the ProofOp proto type defined in - Tendermint. cosmos.base.tendermint.v1beta1.ProofOps: type: object @@ -50207,18 +54495,18 @@ definitions: ProofOp defines an operation used for calculating Merkle root. The data could - be arbitrary format, providing nessecary data for example + be arbitrary format, providing necessary data for example neighbouring node hash. Note: This type is a duplicate of the ProofOp proto type defined in - Tendermint. - description: |- + description: >- ProofOps is Merkle proof defined by the list of ProofOps. + Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. cosmos.base.tendermint.v1beta1.Validator: @@ -50433,7 +54721,7 @@ definitions: secp256k1: type: string format: byte - title: PublicKey defines the keys available for use with Tendermint Validators + title: PublicKey defines the keys available for use with Validators tendermint.p2p.DefaultNodeInfo: type: object properties: @@ -50576,7 +54864,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. data: type: object properties: @@ -50830,9 +55118,7 @@ definitions: type: string format: byte title: original proposer of the block - description: >- - Header defines the structure of a Tendermint - block header. + description: Header defines the structure of a block header. commit: type: object properties: @@ -50912,7 +55198,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -50936,7 +55222,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -50968,7 +55254,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -51511,7 +55797,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. commit: type: object properties: @@ -51591,7 +55877,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -51615,7 +55901,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -51645,9 +55931,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -51898,9 +56182,7 @@ definitions: type: string format: byte title: original proposer of the block - description: >- - Header defines the structure of a Tendermint block - header. + description: Header defines the structure of a block header. commit: type: object properties: @@ -51980,7 +56262,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -52004,7 +56286,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -52036,7 +56318,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -52137,7 +56419,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. tendermint.types.LightBlock: type: object properties: @@ -52229,7 +56511,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. commit: type: object properties: @@ -52303,9 +56585,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -52327,9 +56607,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -52435,7 +56713,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. commit: type: object properties: @@ -52513,7 +56791,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -52537,7 +56815,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Validators voting_power: type: string format: int64 @@ -52567,9 +56845,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -52683,7 +56959,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. commit: type: object properties: @@ -52765,9 +57041,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -52794,9 +57068,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -52818,9 +57090,7 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Validators voting_power: type: string format: int64 @@ -52902,6 +57172,250 @@ definitions: application's state transition machine. + cosmos.consensus.v1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + cosmos.consensus.v1.QueryParamsResponse: + type: object + properties: + params: + description: >- + params are the tendermint consensus params stored in the consensus + module. + + Please note that `params.version` is not populated in this response, + it is + + tracked separately in the x/upgrade module. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / + {average block + + time}. + max_age_duration: + type: string + description: >- + 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). + max_bytes: + type: string + format: int64 + title: >- + 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 + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + description: >- + QueryParamsResponse defines the response type for querying x/consensus + parameters. + tendermint.types.BlockParams: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + tendermint.types.ConsensusParams: + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / + {average block + + time}. + max_age_duration: + type: string + description: >- + 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). + max_bytes: + type: string + format: int64 + title: >- + 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 + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + description: |- + ConsensusParams contains consensus critical parameters that determine the + validity of blocks. + tendermint.types.EvidenceParams: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / {average + block + + time}. + max_age_duration: + type: string + description: >- + 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). + max_bytes: + type: string + format: int64 + title: >- + 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 + description: EvidenceParams determine how we handle evidence of malfeasance. + tendermint.types.ValidatorParams: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + tendermint.types.VersionParams: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + cosmos.crisis.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 cosmos.crisis.v1beta1.MsgVerifyInvariantResponse: type: object description: MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. @@ -52939,6 +57453,13 @@ definitions: description: |- DelegationDelegatorReward represents the properties of a delegator's delegation reward. + cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse: + type: object + description: |- + MsgCommunityPoolSpendResponse defines the response to executing a + MsgCommunityPoolSpend message. + + Since: cosmos-sdk 0.47 cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse: type: object description: >- @@ -52946,9 +57467,16 @@ definitions: type. cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse: type: object - description: >- + description: |- MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. + cosmos.distribution.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse: type: object properties: @@ -52967,7 +57495,7 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: 'Since: cosmos-sdk 0.46' - description: >- + description: |- MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse: @@ -52988,7 +57516,7 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. title: 'Since: cosmos-sdk 0.46' - description: >- + description: |- MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. cosmos.distribution.v1beta1.Params: @@ -52998,8 +57526,18 @@ definitions: type: string base_proposer_reward: type: string + description: >- + Deprecated: The base_proposer_reward field is deprecated and is no + longer used + + in the x/distribution module's reward mechanism. bonus_proposer_reward: type: string + description: >- + Deprecated: The bonus_proposer_reward field is deprecated and is no + longer used + + in the x/distribution module's reward mechanism. withdraw_addr_enabled: type: boolean description: Params defines the set of params for the distribution module. @@ -53128,8 +57666,18 @@ definitions: type: string base_proposer_reward: type: string + description: >- + Deprecated: The base_proposer_reward field is deprecated and is no + longer used + + in the x/distribution module's reward mechanism. bonus_proposer_reward: type: string + description: >- + Deprecated: The bonus_proposer_reward field is deprecated and is + no longer used + + in the x/distribution module's reward mechanism. withdraw_addr_enabled: type: boolean description: QueryParamsResponse is the response type for the Query/Params RPC method. @@ -53137,7 +57685,7 @@ definitions: type: object properties: commission: - description: commission defines the commision the validator received. + description: commission defines the commission the validator received. type: object properties: commission: @@ -53161,6 +57709,45 @@ definitions: title: |- QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method + cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse: + type: object + properties: + operator_address: + type: string + description: operator_address defines the validator operator address. + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: self_bond_rewards defines the self delegations rewards. + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: commission defines the commission the validator received. + description: >- + QueryValidatorDistributionInfoResponse is the response type for the + Query/ValidatorDistributionInfo RPC method. cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: type: object properties: @@ -53927,8 +58514,10 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: depositor defines the deposit addresses from the proposals. amount: type: array items: @@ -53943,6 +58532,7 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + description: amount to be deposited by depositor. description: |- Deposit defines an amount deposited by an account address to an active proposal. @@ -53969,7 +58559,8 @@ definitions: description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - months. + + months. description: DepositParams defines the params for deposits on governance proposals. cosmos.gov.v1.MsgDepositResponse: type: object @@ -53985,19 +58576,89 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. + cosmos.gov.v1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 cosmos.gov.v1.MsgVoteResponse: type: object description: MsgVoteResponse defines the Msg/Vote response type. cosmos.gov.v1.MsgVoteWeightedResponse: type: object description: MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. + cosmos.gov.v1.Params: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + + months. + voting_period: + type: string + description: Duration of the voting period. + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default value: + 0.5. + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that must + be paid at proposal submission. + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met + description: |- + Params defines the parameters for the x/gov module. + + Since: cosmos-sdk 0.47 cosmos.gov.v1.Proposal: type: object properties: id: type: string format: uint64 + description: id defines the unique id of the proposal. messages: type: array items: @@ -54160,7 +58821,11 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + description: >- + messages are the arbitrary messages to be executed if the proposal + passes. status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -54170,20 +58835,6 @@ definitions: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: |- final_tally_result is the final tally result of the proposal. When @@ -54193,18 +58844,26 @@ definitions: properties: yes_count: type: string + description: yes_count is the number of yes votes on a proposal. abstain_count: type: string + description: abstain_count is the number of abstain votes on a proposal. no_count: type: string + description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string + description: >- + no_with_veto_count is the number of no with veto votes on a + proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -54219,15 +58878,30 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. metadata: type: string description: metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter description: Proposal defines the core field members of a governance proposal. cosmos.gov.v1.ProposalStatus: type: string @@ -54263,8 +58937,10 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: depositor defines the deposit addresses from the proposals. amount: type: array items: @@ -54282,6 +58958,7 @@ definitions: method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. @@ -54296,8 +58973,10 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: depositor defines the deposit addresses from the proposals. amount: type: array items: @@ -54315,11 +58994,13 @@ definitions: method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active proposal. + description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object @@ -54346,14 +59027,18 @@ definitions: type: object properties: voting_params: - description: voting_params defines the parameters related to voting. + description: |- + Deprecated: Prefer to use `params` instead. + voting_params defines the parameters related to voting. type: object properties: voting_period: type: string - description: Length of the voting period. + description: Duration of the voting period. deposit_params: - description: deposit_params defines the parameters related to deposit. + description: |- + Deprecated: Prefer to use `params` instead. + deposit_params defines the parameters related to deposit. type: object properties: min_deposit: @@ -54379,11 +59064,68 @@ definitions: description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - months. + + months. tally_params: - description: tally_params defines the parameters related to tally. + description: |- + Deprecated: Prefer to use `params` instead. + tally_params defines the parameters related to tally. type: object properties: + quorum: + type: string + description: >- + Minimum percentage of total stake needed to vote for a result to + be + + considered valid. + threshold: + type: string + description: >- + Minimum proportion of Yes votes for proposal to pass. Default + value: 0.5. + veto_threshold: + type: string + description: >- + Minimum value of Veto votes to Total votes ratio for proposal to + be + + vetoed. Default value: 1/3. + params: + description: |- + params defines all the paramaters of x/gov module. + + Since: cosmos-sdk 0.47 + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + 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. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + + months. + voting_period: + type: string + description: Duration of the voting period. quorum: type: string description: >- @@ -54401,16 +59143,32 @@ definitions: Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that + must be paid at proposal submission. + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.gov.v1.QueryProposalResponse: type: object properties: proposal: + description: proposal is the requested governance proposal. type: object properties: id: type: string format: uint64 + description: id defines the unique id of the proposal. messages: type: array items: @@ -54580,7 +59338,11 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + description: >- + messages are the arbitrary messages to be executed if the proposal + passes. status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -54590,20 +59352,6 @@ definitions: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When @@ -54616,18 +59364,26 @@ definitions: properties: yes_count: type: string + description: yes_count is the number of yes votes on a proposal. abstain_count: type: string + description: abstain_count is the number of abstain votes on a proposal. no_count: type: string + description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string + description: >- + no_with_veto_count is the number of no with veto votes on a + proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -54645,16 +59401,30 @@ definitions: method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. metadata: type: string description: metadata is any arbitrary metadata attached to the proposal. - description: Proposal defines the core field members of a governance proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter description: >- QueryProposalResponse is the response type for the Query/Proposal RPC method. @@ -54669,6 +59439,7 @@ definitions: id: type: string format: uint64 + description: id defines the unique id of the proposal. messages: type: array items: @@ -54840,7 +59611,11 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + description: >- + messages are the arbitrary messages to be executed if the + proposal passes. status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -54850,20 +59625,6 @@ definitions: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: >- final_tally_result is the final tally result of the proposal. @@ -54877,18 +59638,26 @@ definitions: properties: yes_count: type: string + description: yes_count is the number of yes votes on a proposal. abstain_count: type: string + description: abstain_count is the number of abstain votes on a proposal. no_count: type: string + description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string + description: >- + no_with_veto_count is the number of no with veto votes on a + proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -54906,16 +59675,32 @@ definitions: method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. metadata: type: string description: metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object @@ -54947,12 +59732,18 @@ definitions: properties: yes_count: type: string + description: yes_count is the number of yes votes on a proposal. abstain_count: type: string + description: abstain_count is the number of abstain votes on a proposal. no_count: type: string + description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string + description: >- + no_with_veto_count is the number of no with veto votes on a + proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -54960,20 +59751,25 @@ definitions: type: object properties: vote: - description: vote defined the queried vote. + description: vote defines the queried vote. type: object properties: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -54982,18 +59778,11 @@ definitions: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. metadata: type: string description: metadata is any arbitrary metadata to attached to the vote. @@ -55009,14 +59798,19 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -55025,25 +59819,18 @@ definitions: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. metadata: type: string description: metadata is any arbitrary metadata to attached to the vote. description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. - description: votes defined the queried votes. + description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object @@ -55071,7 +59858,7 @@ definitions: type: string description: |- Minimum percentage of total stake needed to vote for a result to be - considered valid. + considered valid. threshold: type: string description: >- @@ -55081,19 +59868,23 @@ definitions: type: string description: |- Minimum value of Veto votes to Total votes ratio for proposal to be - vetoed. Default value: 1/3. + vetoed. Default value: 1/3. description: TallyParams defines the params for tallying votes on governance proposals. cosmos.gov.v1.TallyResult: type: object properties: yes_count: type: string + description: yes_count is the number of yes votes on a proposal. abstain_count: type: string + description: abstain_count is the number of abstain votes on a proposal. no_count: type: string + description: no_count is the number of no votes on a proposal. no_with_veto_count: type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. description: TallyResult defines a standard tally for a governance proposal. cosmos.gov.v1.Vote: type: object @@ -55101,14 +59892,19 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. options: type: array items: type: object properties: option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -55117,18 +59913,11 @@ definitions: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. metadata: type: string description: metadata is any arbitrary metadata to attached to the vote. @@ -55158,12 +59947,15 @@ definitions: properties: voting_period: type: string - description: Length of the voting period. + description: Duration of the voting period. description: VotingParams defines the params for voting on governance proposals. cosmos.gov.v1.WeightedVoteOption: type: object properties: option: + description: >- + option defines the valid vote options, it must not contain duplicate + vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -55172,17 +59964,9 @@ definitions: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given governance - proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: weight is the vote weight associated with the vote option. description: WeightedVoteOption defines a unit of vote for vote split. cosmos.gov.v1beta1.Deposit: type: object @@ -55190,8 +59974,10 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: depositor defines the deposit addresses from the proposals. amount: type: array items: @@ -55206,6 +59992,7 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + description: amount to be deposited by depositor. description: |- Deposit defines an amount deposited by an account address to an active proposal. @@ -55232,7 +60019,8 @@ definitions: description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - months. + + months. description: DepositParams defines the params for deposits on governance proposals. cosmos.gov.v1beta1.MsgDepositResponse: type: object @@ -55243,6 +60031,7 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. cosmos.gov.v1beta1.MsgVoteResponse: type: object @@ -55259,7 +60048,9 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. content: + description: content is the proposal's content. type: object properties: '@type': @@ -55315,108 +60106,8 @@ definitions: used with implementation specific semantics. additionalProperties: {} - description: >- - `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 := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(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" - } status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -55426,20 +60117,6 @@ definitions: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: |- final_tally_result is the final tally result of the proposal. When @@ -55449,18 +60126,24 @@ definitions: properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string + description: no_with_veto is the number of no with veto votes on a proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -55475,12 +60158,15 @@ definitions: NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. description: Proposal defines the core field members of a governance proposal. cosmos.gov.v1beta1.ProposalStatus: type: string @@ -55516,8 +60202,10 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: depositor defines the deposit addresses from the proposals. amount: type: array items: @@ -55535,6 +60223,7 @@ definitions: method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- QueryDepositResponse is the response type for the Query/Deposit RPC method. @@ -55549,8 +60238,10 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. depositor: type: string + description: depositor defines the deposit addresses from the proposals. amount: type: array items: @@ -55568,11 +60259,13 @@ definitions: method signatures required by gogoproto. + description: amount to be deposited by depositor. description: >- Deposit defines an amount deposited by an account address to an active proposal. + description: deposits defines the requested deposits. pagination: description: pagination defines the pagination in the response. type: object @@ -55604,7 +60297,7 @@ definitions: properties: voting_period: type: string - description: Length of the voting period. + description: Duration of the voting period. deposit_params: description: deposit_params defines the parameters related to deposit. type: object @@ -55632,7 +60325,8 @@ definitions: description: >- Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - months. + + months. tally_params: description: tally_params defines the parameters related to tally. type: object @@ -55643,7 +60337,8 @@ definitions: description: >- Minimum percentage of total stake needed to vote for a result to be - considered valid. + + considered valid. threshold: type: string format: byte @@ -55656,7 +60351,8 @@ definitions: description: >- Minimum value of Veto votes to Total votes ratio for proposal to be - vetoed. Default value: 1/3. + + vetoed. Default value: 1/3. description: QueryParamsResponse is the response type for the Query/Params RPC method. cosmos.gov.v1beta1.QueryProposalResponse: type: object @@ -55667,7 +60363,9 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. content: + description: content is the proposal's content. type: object properties: '@type': @@ -55726,111 +60424,8 @@ definitions: used with implementation specific semantics. additionalProperties: {} - description: >- - `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 := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(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" - } status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -55840,20 +60435,6 @@ definitions: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: >- final_tally_result is the final tally result of the proposal. When @@ -55866,18 +60447,26 @@ definitions: properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string + description: >- + no_with_veto is the number of no with veto votes on a + proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -55895,12 +60484,15 @@ definitions: method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. description: Proposal defines the core field members of a governance proposal. description: >- QueryProposalResponse is the response type for the Query/Proposal RPC @@ -55916,7 +60508,9 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. content: + description: content is the proposal's content. type: object properties: '@type': @@ -55977,113 +60571,8 @@ definitions: used with implementation specific semantics. additionalProperties: {} - description: >- - `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 := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(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" - } status: + description: status defines the proposal status. type: string enum: - PROPOSAL_STATUS_UNSPECIFIED @@ -56093,20 +60582,6 @@ definitions: - PROPOSAL_STATUS_REJECTED - PROPOSAL_STATUS_FAILED default: PROPOSAL_STATUS_UNSPECIFIED - description: |- - ProposalStatus enumerates the valid statuses of a proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. final_tally_result: description: >- final_tally_result is the final tally result of the proposal. @@ -56120,18 +60595,26 @@ definitions: properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string + description: >- + no_with_veto is the number of no with veto votes on a + proposal. submit_time: type: string format: date-time + description: submit_time is the time of proposal submission. deposit_end_time: type: string format: date-time + description: deposit_end_time is the end time for deposition. total_deposit: type: array items: @@ -56149,13 +60632,17 @@ definitions: method signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. voting_start_time: type: string format: date-time + description: voting_start_time is the starting time to vote on a proposal. voting_end_time: type: string format: date-time + description: voting_end_time is the end time of voting on a proposal. description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. pagination: description: pagination defines the pagination in the response. type: object @@ -56187,12 +60674,16 @@ definitions: properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string + description: no_with_veto is the number of no with veto votes on a proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -56200,14 +60691,16 @@ definitions: type: object properties: vote: - description: vote defined the queried vote. + description: vote defines the queried vote. type: object properties: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is set in @@ -56231,6 +60724,9 @@ definitions: type: object properties: option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -56239,22 +60735,17 @@ definitions: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 description: QueryVoteResponse is the response type for the Query/Vote RPC method. cosmos.gov.v1beta1.QueryVotesResponse: type: object @@ -56267,8 +60758,10 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is set @@ -56292,6 +60785,9 @@ definitions: type: object properties: option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -56300,26 +60796,21 @@ definitions: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. - description: votes defined the queried votes. + description: votes defines the queried votes. pagination: description: pagination defines the pagination in the response. type: object @@ -56348,7 +60839,7 @@ definitions: format: byte description: |- Minimum percentage of total stake needed to vote for a result to be - considered valid. + considered valid. threshold: type: string format: byte @@ -56360,19 +60851,23 @@ definitions: format: byte description: |- Minimum value of Veto votes to Total votes ratio for proposal to be - vetoed. Default value: 1/3. + vetoed. Default value: 1/3. description: TallyParams defines the params for tallying votes on governance proposals. cosmos.gov.v1beta1.TallyResult: type: object properties: 'yes': type: string + description: yes is the number of yes votes on a proposal. abstain: type: string + description: abstain is the number of abstain votes on a proposal. 'no': type: string + description: no is the number of no votes on a proposal. no_with_veto: type: string + description: no_with_veto is the number of no with veto votes on a proposal. description: TallyResult defines a standard tally for a governance proposal. cosmos.gov.v1beta1.Vote: type: object @@ -56380,8 +60875,10 @@ definitions: proposal_id: type: string format: uint64 + description: proposal_id defines the unique id of the proposal. voter: type: string + description: voter is the voter address of the proposal. option: description: >- Deprecated: Prefer to use `options` instead. This field is set in @@ -56405,6 +60902,9 @@ definitions: type: object properties: option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -56413,22 +60913,17 @@ definitions: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given - governance proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 description: |- Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. @@ -56455,12 +60950,15 @@ definitions: properties: voting_period: type: string - description: Length of the voting period. + description: Duration of the voting period. description: VotingParams defines the params for voting on governance proposals. cosmos.gov.v1beta1.WeightedVoteOption: type: object properties: option: + description: >- + option defines the valid vote options, it must not contain duplicate + vote options. type: string enum: - VOTE_OPTION_UNSPECIFIED @@ -56469,17 +60967,9 @@ definitions: - VOTE_OPTION_NO - VOTE_OPTION_NO_WITH_VETO default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a given governance - proposal. - - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. weight: type: string + description: weight is the vote weight associated with the vote option. description: |- WeightedVoteOption defines a unit of vote for vote split. @@ -56575,7 +61065,10 @@ definitions: description: admin is the account address of the group admin. metadata: type: string - description: metadata is any arbitrary metadata to attached to the group policy. + title: |- + metadata is any arbitrary metadata attached to the group policy. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 @@ -56781,7 +61274,10 @@ definitions: description: group_policy_address is the account address of group policy. metadata: type: string - description: metadata is any arbitrary metadata to attached to the proposal. + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: @@ -56853,7 +61349,7 @@ definitions: description: >- voting_period_end is the timestamp before which voting must be done. - Unless a successfull MsgExec is called before (to execute a proposal + Unless a successful MsgExec is called before (to execute a proposal whose tally is successful before the voting period ends), tallying will be @@ -57038,6 +61534,14 @@ definitions: description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can submit a proposal @@ -57090,7 +61594,7 @@ definitions: type: object properties: info: - description: info is the GroupInfo for the group. + description: info is the GroupInfo of the group. type: object properties: id: @@ -57200,9 +61704,12 @@ definitions: description: admin is the account address of the group admin. metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the group - policy. + title: >- + metadata is any arbitrary metadata attached to the group policy. + + the recommended format of the metadata is to be found here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 @@ -57325,9 +61832,12 @@ definitions: description: admin is the account address of the group admin. metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the group - policy. + title: >- + metadata is any arbitrary metadata attached to the group policy. + + the recommended format of the metadata is to be found here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 @@ -57436,7 +61946,7 @@ definitions: type: object properties: info: - description: info is the GroupPolicyInfo for the group policy. + description: info is the GroupPolicyInfo of the group policy. type: object properties: address: @@ -57451,9 +61961,10 @@ definitions: description: admin is the account address of the group admin. metadata: type: string - description: >- - metadata is any arbitrary metadata to attached to the group - policy. + title: |- + metadata is any arbitrary metadata attached to the group policy. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 version: type: string format: uint64 @@ -57657,6 +62168,72 @@ definitions: was set, its value is undefined otherwise description: QueryGroupsByMemberResponse is the Query/GroupsByMember response type. + cosmos.group.v1.QueryGroupsResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: '`groups` is all the groups present in state.' + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryGroupsResponse is the Query/Groups response type. + + Since: cosmos-sdk 0.47.1 cosmos.group.v1.QueryProposalResponse: type: object properties: @@ -57673,7 +62250,10 @@ definitions: description: group_policy_address is the account address of group policy. metadata: type: string - description: metadata is any arbitrary metadata to attached to the proposal. + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: @@ -57751,7 +62331,7 @@ definitions: voting_period_end is the timestamp before which voting must be done. - Unless a successfull MsgExec is called before (to execute a + Unless a successful MsgExec is called before (to execute a proposal whose tally is successful before the voting period ends), tallying will @@ -57944,6 +62524,14 @@ definitions: description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal description: QueryProposalResponse is the Query/Proposal response type. cosmos.group.v1.QueryProposalsByGroupPolicyResponse: type: object @@ -57962,7 +62550,10 @@ definitions: description: group_policy_address is the account address of group policy. metadata: type: string - description: metadata is any arbitrary metadata to attached to the proposal. + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#proposal-4 proposers: type: array items: @@ -58041,7 +62632,7 @@ definitions: voting_period_end is the timestamp before which voting must be done. - Unless a successfull MsgExec is called before (to execute a + Unless a successful MsgExec is called before (to execute a proposal whose tally is successful before the voting period ends), tallying @@ -58236,6 +62827,14 @@ definitions: description: >- messages is a list of `sdk.Msg`s that will be executed if the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal description: >- Proposal defines a group proposal. Any member of a group can submit a proposal @@ -58316,7 +62915,7 @@ definitions: default: VOTE_OPTION_UNSPECIFIED metadata: type: string - description: metadata is any arbitrary metadata to attached to the vote. + description: metadata is any arbitrary metadata attached to the vote. submit_time: type: string format: date-time @@ -58351,7 +62950,7 @@ definitions: default: VOTE_OPTION_UNSPECIFIED metadata: type: string - description: metadata is any arbitrary metadata to attached to the vote. + description: metadata is any arbitrary metadata attached to the vote. submit_time: type: string format: date-time @@ -58405,7 +63004,7 @@ definitions: default: VOTE_OPTION_UNSPECIFIED metadata: type: string - description: metadata is any arbitrary metadata to attached to the vote. + description: metadata is any arbitrary metadata attached to the vote. submit_time: type: string format: date-time @@ -58470,7 +63069,7 @@ definitions: default: VOTE_OPTION_UNSPECIFIED metadata: type: string - description: metadata is any arbitrary metadata to attached to the vote. + description: metadata is any arbitrary metadata attached to the vote. submit_time: type: string format: date-time @@ -58494,6 +63093,13 @@ definitions: - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.mint.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 cosmos.mint.v1beta1.Params: type: object properties: @@ -58516,7 +63122,7 @@ definitions: type: string format: uint64 title: expected blocks per year - description: Params holds parameters for the mint module. + description: Params defines the parameters for the x/mint module. cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: type: object properties: @@ -58935,11 +63541,13 @@ definitions: amount: type: string format: uint64 + title: amount is the number of all NFTs of a given class owned by the owner title: QueryBalanceResponse is the response type for the Query/Balance RPC method cosmos.nft.v1beta1.QueryClassResponse: type: object properties: class: + description: class defines the class of the nft type. type: object properties: id: @@ -59130,7 +63738,6 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - description: Class defines the class of the nft type. title: QueryClassResponse is the response type for the Query/Class RPC method cosmos.nft.v1beta1.QueryClassesResponse: type: object @@ -59335,7 +63942,9 @@ definitions: "value": "1.212s" } description: Class defines the class of the nft type. + description: class defines the class of the nft type. pagination: + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -59353,19 +63962,12 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } title: QueryClassesResponse is the response type for the Query/Classes RPC method cosmos.nft.v1beta1.QueryNFTResponse: type: object properties: nft: + title: owner is the owner address of the nft type: object properties: class_id: @@ -59739,7 +64341,9 @@ definitions: "value": "1.212s" } description: NFT defines the NFT. + title: NFT defines the NFT pagination: + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -59757,20 +64361,13 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } title: QueryNFTsResponse is the response type for the Query/NFTs RPC methods cosmos.nft.v1beta1.QueryOwnerResponse: type: object properties: owner: type: string + title: owner is the owner address of the nft title: QueryOwnerResponse is the response type for the Query/Owner RPC method cosmos.nft.v1beta1.QuerySupplyResponse: type: object @@ -59778,6 +64375,7 @@ definitions: amount: type: string format: uint64 + title: amount is the number of all NFTs from the given class title: QuerySupplyResponse is the response type for the Query/Supply RPC method cosmos.params.v1beta1.ParamChange: type: object @@ -59849,6 +64447,13 @@ definitions: cosmos.slashing.v1beta1.MsgUnjailResponse: type: object title: MsgUnjailResponse defines the Msg/Unjail response type + cosmos.slashing.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 cosmos.slashing.v1beta1.Params: type: object properties: @@ -60298,7 +64903,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. valset: type: array items: @@ -60469,6 +65074,20 @@ definitions: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator description: >- Validator defines a validator, together with the total amount of the @@ -60527,6 +65146,13 @@ definitions: type: string format: date-time description: MsgUndelegateResponse defines the Msg/Undelegate response type. + cosmos.staking.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 cosmos.staking.v1beta1.Params: type: object properties: @@ -60555,7 +65181,7 @@ definitions: title: >- min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators - description: Params defines the parameters for the staking module. + description: Params defines the parameters for the x/staking module. cosmos.staking.v1beta1.Pool: type: object properties: @@ -60732,6 +65358,16 @@ definitions: balance: type: string description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -60934,6 +65570,20 @@ definitions: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator description: |- QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. @@ -61110,6 +65760,20 @@ definitions: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator description: >- Validator defines a validator, together with the total amount of the @@ -61246,7 +65910,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. valset: type: array items: @@ -61418,6 +66082,20 @@ definitions: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been + stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding + of this validator description: >- Validator defines a validator, together with the total amount of the @@ -61544,6 +66222,16 @@ definitions: description: >- shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules description: >- RedelegationEntry defines a redelegation object with relevant metadata. @@ -61587,6 +66275,16 @@ definitions: description: >- shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules description: >- RedelegationEntry defines a redelegation object with relevant metadata. @@ -61668,6 +66366,16 @@ definitions: balance: type: string description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -61921,6 +66629,20 @@ definitions: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator title: QueryValidatorResponse is response type for the Query/Validator RPC method cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: type: object @@ -61963,6 +66685,16 @@ definitions: balance: type: string description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been + stopped by external modules description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -62170,6 +66902,20 @@ definitions: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped + by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of + this validator description: >- Validator defines a validator, together with the total amount of the @@ -62257,6 +67003,16 @@ definitions: description: >- shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules description: >- RedelegationEntry defines a redelegation object with relevant metadata. @@ -62288,6 +67044,16 @@ definitions: description: >- shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules description: RedelegationEntry defines a redelegation object with relevant metadata. cosmos.staking.v1beta1.RedelegationEntryResponse: type: object @@ -62315,6 +67081,16 @@ definitions: description: >- shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules description: >- RedelegationEntry defines a redelegation object with relevant metadata. @@ -62373,6 +67149,16 @@ definitions: description: >- shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules description: >- RedelegationEntry defines a redelegation object with relevant metadata. @@ -62416,6 +67202,16 @@ definitions: description: >- shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules description: >- RedelegationEntry defines a redelegation object with relevant metadata. @@ -62466,6 +67262,16 @@ definitions: balance: type: string description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -62495,6 +67301,16 @@ definitions: balance: type: string description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules description: >- UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -62657,6 +67473,20 @@ definitions: Since: cosmos-sdk 0.46 + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifing an unbonding of this + validator description: >- Validator defines a validator, together with the total amount of the @@ -62771,10 +67601,8 @@ definitions: properties: key: type: string - format: byte value: type: string - format: byte index: type: boolean title: nondeterministic @@ -63145,10 +67973,8 @@ definitions: properties: key: type: string - format: byte value: type: string - format: byte index: type: boolean title: nondeterministic @@ -63371,8 +68197,8 @@ definitions: method. - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - the tx to be committed in a block. + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns @@ -63397,8 +68223,8 @@ definitions: RPC method. - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - - BROADCAST_MODE_BLOCK: BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - the tx to be committed in a block. + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for a CheckTx execution response only. - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns @@ -63578,10 +68404,8 @@ definitions: properties: key: type: string - format: byte value: type: string - format: byte index: type: boolean title: nondeterministic @@ -63780,7 +68604,7 @@ definitions: type: string format: byte title: original proposer of the block - description: Header defines the structure of a Tendermint block header. + description: Header defines the structure of a block header. data: type: object properties: @@ -64038,8 +68862,8 @@ definitions: format: byte title: original proposer of the block description: >- - Header defines the structure of a Tendermint - block header. + Header defines the structure of a block + header. commit: type: object properties: @@ -64119,7 +68943,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -64143,7 +68967,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Validators voting_power: type: string format: int64 @@ -64175,7 +68999,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Validators voting_power: type: string format: int64 @@ -64444,10 +69268,8 @@ definitions: properties: key: type: string - format: byte value: type: string - format: byte index: type: boolean title: nondeterministic @@ -64657,10 +69479,8 @@ definitions: properties: key: type: string - format: byte value: type: string - format: byte index: type: boolean title: nondeterministic @@ -65076,10 +69896,8 @@ definitions: properties: key: type: string - format: byte value: type: string - format: byte index: type: boolean title: nondeterministic @@ -66423,6 +71241,94 @@ definitions: and can't be handled, they will be ignored description: TxBody is the body of a transaction that all signers sign over. + cosmos.tx.v1beta1.TxDecodeAminoRequest: + type: object + properties: + amino_binary: + type: string + format: byte + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeAminoResponse: + type: object + properties: + amino_json: + type: string + description: |- + TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeRequest: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeResponse: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the decoded transaction. + description: |- + TxDecodeResponse is the response type for the + Service.TxDecode method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeAminoRequest: + type: object + properties: + amino_json: + type: string + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeAminoResponse: + type: object + properties: + amino_binary: + type: string + format: byte + description: |- + TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeRequest: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the transaction to encode. + description: |- + TxEncodeRequest is the request type for the Service.TxEncode + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeResponse: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. + + Since: cosmos-sdk 0.47 tendermint.abci.Event: type: object properties: @@ -66435,10 +71341,8 @@ definitions: properties: key: type: string - format: byte value: type: string - format: byte index: type: boolean title: nondeterministic @@ -66455,10 +71359,8 @@ definitions: properties: key: type: string - format: byte value: type: string - format: byte index: type: boolean title: nondeterministic @@ -66525,9 +71427,7 @@ definitions: height: type: string format: int64 - description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. + description: The height at which the upgrade must be performed. info: type: string title: |- @@ -66660,9 +71560,7 @@ definitions: height: type: string format: int64 - description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. + description: The height at which the upgrade must be performed. info: type: string title: >- @@ -66812,6 +71710,7 @@ definitions: length: type: string format: int64 + description: Period duration in seconds. amount: type: array items: @@ -66901,6 +71800,18 @@ definitions: type: array items: type: string + slash_fraction_no_keyshare: + type: string + format: byte + slash_fraction_wrong_keyshare: + type: string + format: byte + minimum_bonded: + type: string + format: uint64 + max_idled_block: + type: string + format: uint64 description: Params defines the parameters for the module. fairyring.keyshare.QueryAllAggregatedKeyShareResponse: type: object @@ -67098,6 +72009,18 @@ definitions: type: array items: type: string + slash_fraction_no_keyshare: + type: string + format: byte + slash_fraction_wrong_keyshare: + type: string + format: byte + minimum_bonded: + type: string + format: uint64 + max_idled_block: + type: string + format: uint64 description: QueryParamsResponse is response type for the Query/Params RPC method. fairyring.keyshare.QueryPubKeyResponse: type: object @@ -67190,6 +72113,24 @@ definitions: type: object fairyring.pep.Params: type: object + properties: + trusted_counter_parties: + type: array + items: + type: object + properties: + client_id: + type: string + connection_id: + type: string + channel_id: + type: string + trusted_addresses: + type: array + items: + type: string + channel_id: + type: string description: Params defines the parameters for the module. fairyring.pep.PepNonce: type: object @@ -67347,6 +72288,24 @@ definitions: params: description: params holds all the parameters of this module. type: object + properties: + trusted_counter_parties: + type: array + items: + type: object + properties: + client_id: + type: string + connection_id: + type: string + channel_id: + type: string + trusted_addresses: + type: array + items: + type: string + channel_id: + type: string description: QueryParamsResponse is response type for the Query/Params RPC method. fairyring.pep.QueryPubKeyResponse: type: object @@ -67381,6 +72340,32 @@ definitions: expiry: type: string format: uint64 + fairyring.pep.TrustedCounterParty: + type: object + properties: + client_id: + type: string + connection_id: + type: string + channel_id: + type: string + ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse: + type: object + properties: + channel_id: + type: string + port_id: + type: string + title: >- + MsgRegisterInterchainAccountResponse defines the response for + Msg/RegisterAccount + ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse: + type: object + properties: + sequence: + type: string + format: uint64 + title: MsgSendTxResponse defines the response for MsgSendTx ibc.applications.interchain_accounts.controller.v1.Params: type: object properties: @@ -67409,6 +72394,45 @@ definitions: type: boolean description: controller_enabled enables or disables the controller submodule. description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.interchain_accounts.v1.InterchainAccountPacketData: + type: object + properties: + type: + type: string + enum: + - TYPE_UNSPECIFIED + - TYPE_EXECUTE_TX + default: TYPE_UNSPECIFIED + description: |- + - TYPE_UNSPECIFIED: Default zero value enumeration + - TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain + title: >- + Type defines a classification of message issued from a controller + chain to its associated interchain accounts + + host + data: + type: string + format: byte + memo: + type: string + description: >- + InterchainAccountPacketData is comprised of a raw transaction, type of + transaction and optional memo field. + ibc.applications.interchain_accounts.v1.Type: + type: string + enum: + - TYPE_UNSPECIFIED + - TYPE_EXECUTE_TX + default: TYPE_UNSPECIFIED + description: |- + - TYPE_UNSPECIFIED: Default zero value enumeration + - TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain + title: >- + Type defines a classification of message issued from a controller chain to + its associated interchain accounts + + host ibc.applications.interchain_accounts.host.v1.Params: type: object properties: @@ -67463,6 +72487,11 @@ definitions: source tracing information path. ibc.applications.transfer.v1.MsgTransferResponse: type: object + properties: + sequence: + type: string + format: uint64 + title: sequence number of the transfer packet sent description: MsgTransferResponse defines the Msg/Transfer response type. ibc.applications.transfer.v1.Params: type: object @@ -67598,6 +72627,24 @@ definitions: chain. description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse: + type: object + properties: + amount: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + 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. + description: >- + QueryTotalEscrowForDenomResponse is the response type for + TotalEscrowForDenom RPC method. ibc.core.client.v1.Height: type: object properties: @@ -67817,6 +72864,8 @@ definitions: properties: version: type: string + channel_id: + type: string description: MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. ibc.core.channel.v1.MsgRecvPacketResponse: type: object @@ -69615,7 +74664,14 @@ definitions: type: array items: type: string - description: allowed_clients defines the list of allowed client state types. + description: >- + allowed_clients defines the list of allowed client state types which + can be created + + and interacted with. If a client type is removed from the allowed + clients list, usage + + of this client will be disabled until it is added again to the list. description: Params defines the set of IBC light client parameters. ibc.core.client.v1.QueryClientParamsResponse: type: object @@ -69628,7 +74684,15 @@ definitions: type: array items: type: string - description: allowed_clients defines the list of allowed client state types. + description: >- + allowed_clients defines the list of allowed client state types + which can be created + + and interacted with. If a client type is removed from the allowed + clients list, usage + + of this client will be disabled until it is added again to the + list. description: >- QueryClientParamsResponse is the response type for the Query/ClientParams RPC @@ -71130,6 +76194,21 @@ definitions: description: >- MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. + ibc.core.connection.v1.Params: + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to produce + the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: Params defines the set of Connection parameters. ibc.core.connection.v1.QueryClientConnectionsResponse: type: object properties: @@ -71584,6 +76663,27 @@ definitions: title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method + ibc.core.connection.v1.QueryConnectionParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to + produce the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: >- + QueryConnectionParamsResponse is the response type for the + Query/ConnectionParams RPC method. ibc.core.connection.v1.QueryConnectionResponse: type: object properties: diff --git a/docs/template/index.tpl b/docs/template/index.tpl new file mode 100644 index 00000000..ec098e82 --- /dev/null +++ b/docs/template/index.tpl @@ -0,0 +1,28 @@ + + + + + {{ .Title }} + + + + +
+ + + + + +Footer +© 2022 GitHub, Inc. +Footer navigation diff --git a/go.mod b/go.mod index a4ad0e59..d11dc749 100644 --- a/go.mod +++ b/go.mod @@ -1,214 +1,193 @@ module fairyring -go 1.18 +go 1.19 require ( + cosmossdk.io/api v0.3.1 cosmossdk.io/errors v1.0.0-beta.7 - cosmossdk.io/math v1.0.0 + cosmossdk.io/math v1.0.1 github.com/FairBlock/DistributedIBE v0.0.0-20230528025616-f58fb2b93eaf - github.com/cosmos/cosmos-sdk v0.46.3 - github.com/cosmos/ibc-go/v5 v5.0.0 + github.com/cometbft/cometbft v0.37.2 + github.com/cometbft/cometbft-db v0.8.0 + github.com/cosmos/cosmos-sdk v0.47.3 + github.com/cosmos/gogoproto v1.4.10 + github.com/cosmos/ibc-go/v7 v7.2.0 github.com/drand/kyber v1.2.0 github.com/drand/kyber-bls12381 v0.2.5 github.com/gogo/protobuf v1.3.3 + github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 + github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/ignite/cli v0.25.1 - github.com/spf13/cast v1.5.0 - github.com/spf13/cobra v1.5.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 + github.com/huandu/skiplist v1.2.0 + github.com/spf13/cast v1.5.1 + github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.2 - github.com/tendermint/tendermint v0.34.22 - github.com/tendermint/tm-db v0.6.7 - google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 - google.golang.org/grpc v1.53.0 + github.com/stretchr/testify v1.8.4 + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d + google.golang.org/grpc v1.58.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - cloud.google.com/go v0.107.0 // indirect - cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go v0.110.6 // indirect + cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v0.11.0 // indirect - cloud.google.com/go/storage v1.27.0 // indirect + cloud.google.com/go/iam v1.1.1 // 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.0 // indirect + cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/age v1.1.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/Microsoft/go-winio v0.6.0 // indirect - github.com/Microsoft/hcsshim v0.9.4 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect - github.com/Workiva/go-datastructures v1.0.53 // indirect - github.com/acomagu/bufpipe v1.0.3 // indirect - github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 // indirect - github.com/armon/go-metrics v0.4.0 // indirect - github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect - github.com/aws/aws-sdk-go v1.40.45 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/OneOfOne/xxhash v1.2.8 // indirect + github.com/armon/go-metrics v0.4.1 // 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/blang/semver v3.5.1+incompatible // indirect - github.com/btcsuite/btcd v0.22.1 // indirect - github.com/buger/jsonparser v1.1.1 // indirect - github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcutil v1.1.3 // indirect + github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect + github.com/cenkalti/backoff/v4 v4.2.0 // 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/confio/ics23/go v0.7.0 // indirect - github.com/containerd/cgroups v1.0.3 // indirect - github.com/containerd/containerd v1.6.8 // indirect - github.com/cosmos/btcutil v1.0.4 // indirect - github.com/cosmos/cosmos-proto v1.0.0-alpha7 // indirect + github.com/confio/ics23/go v0.9.0 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/gorocksdb v1.2.0 // indirect - github.com/cosmos/iavl v0.19.3 // indirect - github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect - github.com/cosmos/ledger-go v0.9.2 // indirect - github.com/creachadair/taskgroup v0.3.2 // indirect + github.com/cosmos/gogogateway v1.2.0 // indirect + github.com/cosmos/iavl v0.20.0 // indirect + github.com/cosmos/ics23/go v0.10.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.12.1 // 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.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.0 // indirect + github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/docker v20.10.17+incompatible // indirect - github.com/docker/go-units v0.4.0 // indirect - github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/emicklei/proto v1.11.0 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/felixge/httpsnoop v1.0.1 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.3.1 // indirect - github.com/go-git/go-git/v5 v5.4.2 // indirect + github.com/gin-gonic/gin v1.8.1 // 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/goccy/go-yaml v1.9.4 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-playground/validator/v10 v10.11.1 // indirect + github.com/goccy/go-json v0.9.11 // 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/snappy v0.0.4 // indirect - github.com/google/btree v1.0.1 // indirect + github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/google/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/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.6.1 // indirect + github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hdevalence/ed25519consensus v0.0.0-20220222234857-c00d1f31bab3 // indirect - github.com/iancoleman/strcase v0.2.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // 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/jpillora/ansi v1.0.2 // indirect - github.com/jpillora/backoff v1.0.0 // indirect - github.com/jpillora/chisel v1.7.7 // indirect - github.com/jpillora/requestlog v1.0.0 // indirect - github.com/jpillora/sizestr v1.0.0 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kilic/bls12-381 v0.1.0 // indirect - github.com/klauspost/compress v1.15.9 // indirect - github.com/lib/pq v1.10.6 // indirect + github.com/klauspost/compress v1.16.5 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/magiconair/properties v1.8.6 // 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.16 // indirect - github.com/mattn/go-zglob v0.0.3 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // 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 github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/go-testing-interface v1.0.0 // indirect + github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/moby/sys/mount v0.3.1 // indirect - github.com/moby/sys/mountinfo v0.6.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect - github.com/opencontainers/runc v1.1.3 // indirect - github.com/otiai10/copy v1.6.0 // 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/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect + github.com/opencontainers/runc v1.1.7 // 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_golang v1.12.2 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.34.0 // indirect - github.com/prometheus/procfs v0.7.3 // indirect - github.com/radovskyb/watcher v1.0.7 // indirect + github.com/prometheus/client_golang v1.14.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/regen-network/cosmos-proto v0.3.1 // indirect - github.com/rs/cors v1.8.2 // indirect - github.com/rs/zerolog v1.27.0 // indirect + github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/rs/cors v1.9.0 // indirect + github.com/rs/zerolog v1.29.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/sergi/go-diff v1.2.0 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect - github.com/spf13/afero v1.8.2 // indirect + github.com/sirupsen/logrus v1.9.2 // indirect + github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/viper v1.13.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/takuoki/gocase v1.0.0 // indirect - github.com/tendermint/btcd v0.1.1 // indirect - github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect + github.com/spf13/viper v1.16.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tendermint/spn v0.2.1-0.20220921200247-8bafad876bdd // indirect - github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce // indirect - github.com/ulikunitz/xz v0.5.8 // indirect - github.com/xanzy/ssh-agent v0.3.2 // indirect - github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect - go.etcd.io/bbolt v1.3.6 // 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.7 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.7.0 // indirect - golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.8.0 // indirect - golang.org/x/oauth2 v0.5.0 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect - golang.org/x/tools v0.6.0 // indirect + golang.org/x/crypto v0.13.0 // indirect + golang.org/x/exp v0.0.0-20230519143937-03e91628a987 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect + golang.org/x/sync v0.3.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/tools v0.9.1 // 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/protobuf v1.28.1 // indirect + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // 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/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 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 ) diff --git a/go.sum b/go.sum index 138cd18b..8bb1e49b 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,3 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -20,41 +19,192 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.107.0 h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww= -cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= +cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= -cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= +cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v0.11.0 h1:kwCWfKwB6ePZoZnGLwrd3B6Ru/agoHANTUBWpVNIdnM= -cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= -cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= +cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= +cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= +cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= +cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= +cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/math v1.0.0 h1:ro9w7eKx23om2tZz/VM2Pf+z2WAbGX1yDQQOJ6iGeJw= -cosmossdk.io/math v1.0.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/log v1.1.0 h1:v0ogPHYeTzPcBTcPR1A3j1hkei4pZama8kz8LKlCMv0= +cosmossdk.io/log v1.1.0/go.mod h1:6zjroETlcDs+mm62gd8Ig7mZ+N+fVOZS91V17H+M4N4= +cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= +cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/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/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= @@ -67,22 +217,10 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= 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 v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= @@ -93,67 +231,31 @@ github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/FairBlock/DistributedIBE v0.0.0-20230528025616-f58fb2b93eaf h1:b4eYrFmDvCv1cA4dIPsmH6cGhURs6aIERShJczjwFuA= github.com/FairBlock/DistributedIBE v0.0.0-20230528025616-f58fb2b93eaf/go.mod h1:qXpLBzZiSdWoweJkE/lAIPedf6GOl7WsYM8rxrZCCDk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= -github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= -github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= -github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= -github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= -github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= -github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= -github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= +github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= 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/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= 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= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 h1:axBiC50cNZOs7ygH5BgQp4N+aYrZ2DNpWZ1KG3VOSOM= -github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2/go.mod h1:jnzFpU88PccN/tPPhCpnNU8mZphvKxYM9lLNkd8e+os= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -161,19 +263,15 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= -github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI= -github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= +github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= @@ -184,40 +282,40 @@ github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7 github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 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/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +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/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= -github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= +github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= +github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= +github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.2/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= +github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= +github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= +github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= +github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= +github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= -github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= @@ -226,44 +324,32 @@ 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/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +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= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= 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/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= -github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= -github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= -github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= +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= @@ -272,161 +358,71 @@ github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3h github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= +github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/kryptology v1.8.0/go.mod h1:RYXOAPdzOGUe3qlSFkMGn58i3xUA8hmxYHksuq+8ciI= github.com/coinbase/rosetta-sdk-go v0.7.9 h1:lqllBjMnazTjIqYrOGv8h8jxjg9+hJazIGZr9ZvoCcA= github.com/coinbase/rosetta-sdk-go v0.7.9/go.mod h1:0/knutI7XGVqXmmH4OQD8OckFrbQ8yMsUZTG7FXCR2M= +github.com/cometbft/cometbft v0.37.2 h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc= +github.com/cometbft/cometbft v0.37.2/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft-db v0.8.0 h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo= +github.com/cometbft/cometbft-db v0.8.0/go.mod h1:6ASCP4pfhmrCBpfk01/9E1SI29nD3HfVHrY4PG8x5c0= github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= github.com/consensys/bavard v0.1.8-0.20210915155054-088da2f7f54a/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/consensys/gnark-crypto v0.5.3/go.mod h1:hOdPlWQV1gDLp7faZVeg8Y0iEPFaOUnCc4XeCCk96p0= -github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= -github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= -github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= -github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= -github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= -github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= -github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= -github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= -github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= -github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= -github.com/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= -github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= -github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= -github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= -github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= -github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= -github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= -github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= -github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= -github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= -github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= -github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= -github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= -github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= -github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= -github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= -github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= -github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= -github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= -github.com/cosmos/cosmos-sdk v0.46.3 h1:2jdJYcSwh4AtFJKGoNGvmEy2mKDWtGaVZphGpvedljQ= -github.com/cosmos/cosmos-sdk v0.46.3/go.mod h1:AynIAjXwtS3T/ApdhNCz/7/KGMbZSUBbKRTcbukb2ic= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= +github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= +github.com/cosmos/cosmos-sdk v0.47.3 h1:r0hGmZoAzP2D+MaPaFGHwAaTdFQq3pNpHaUp1BsffbM= +github.com/cosmos/cosmos-sdk v0.47.3/go.mod h1:c4OfLdAykA9zsj1CqrxBRqXzVz48I++JSvIMPSPcEmk= github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k= github.com/cosmos/cosmos-sdk/ics23/go v0.8.0/go.mod h1:2a4dBq88TUoqoWAU5eu0lGvpFP3wWDPgdHPargtyw30= 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.3 h1:cESO0OwTTxQm5rmyESKW+zESheDUYI7CcZDWWDwnuxg= -github.com/cosmos/iavl v0.19.3/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v5 v5.0.0 h1:MkObdarpoICPHXoRg/Ne9NRix4j7eQlJZq74/uzH3Zc= -github.com/cosmos/ibc-go/v5 v5.0.0/go.mod h1:Wqsguq98Iuns8tgTv8+xaGYbC+Q8zJfbpjzT6IgMJbs= -github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= -github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= -github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= -github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= +github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= +github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= +github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/ibc-go/v7 v7.2.0 h1:dx0DLUl7rxdyZ8NiT6UsrbzKOJx/w7s+BOaewFRH6cg= +github.com/cosmos/ibc-go/v7 v7.2.0/go.mod h1:OOcjKIRku/j1Xs1RgKK0yvKRrJ5iFuZYMetR1n3yMlc= +github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= +github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= +github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= +github.com/cosmos/ledger-cosmos-go v0.12.1/go.mod h1:dhO6kj+Y+AHIOgAe4L9HL/6NDdyyth4q238I9yFpD2g= +github.com/cosmos/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.0/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/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= @@ -436,20 +432,21 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= 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/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +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= @@ -457,29 +454,11 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= -github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +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/drand/kyber v1.2.0 h1:22SbBxsKbgQnJUoyYKIfG909PhBsj0vtANeu4BX5xgE= @@ -488,8 +467,8 @@ github.com/drand/kyber-bls12381 v0.2.5 h1:4ugiCmXQsvgAuylSk929rK49WGFxCxT/7ArH2v github.com/drand/kyber-bls12381 v0.2.5/go.mod h1:8fm2tmRaAdYRGMTh5tjF7qrGHywC+rmM5hrUFL+9fCI= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac h1:opbrjaN/L8gg6Xh5D04Tem+8xVcz6ajZlGCs49mQgyg= -github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac/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= @@ -497,113 +476,74 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/proto v1.11.0 h1:XcDEsxxv5xBp0jeZ4rt7dj1wuv/GQ4cSAe4BHbhrRXY= -github.com/emicklei/proto v1.11.0/go.mod h1:rn1FgRS/FANiZdD2djyH7TMA9jdRDcYQ9IEN9yvjX0A= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -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.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= 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.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.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 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +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= 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/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= 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/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= 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-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= -github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= -github.com/go-kit/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-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +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.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= 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-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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= @@ -614,30 +554,24 @@ 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-yaml v1.9.4 h1:S0GCYjwHKVI6IHqio7QWNKNThUl6NLzFd/g8Z65Axw8= -github.com/goccy/go-yaml v1.9.4/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= -github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= -github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= +github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +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-20190129154638-5b532d6fd5ef/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= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -650,6 +584,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -668,6 +603,7 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -678,8 +614,8 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -693,19 +629,20 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= 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.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 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= @@ -718,50 +655,62 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.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= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-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.0/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= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -771,20 +720,18 @@ github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uM github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= -github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= +github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= +github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= @@ -795,7 +742,6 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= @@ -810,33 +756,25 @@ 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= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ignite/cli v0.25.1 h1:Ake0dLhFeb5cid3jdqkknghwF86FeUm9a+pqSK0VI8I= -github.com/ignite/cli v0.25.1/go.mod h1:EcKz1T5hVkyQsEhdgK6Ka/YEgZvDmqk93c7JLUCMPW0= -github.com/ignite/modules v0.0.0-20220912090139-7c325cae763a h1:0P8qg4YS0hb8jomZedhbooEKE3JZhRNAewV8+8otr6k= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= 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= @@ -849,17 +787,11 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= 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/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -867,27 +799,15 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/ansi v1.0.2 h1:+Ei5HCAH0xsrQRCT2PDr4mq9r4Gm4tg+arNdXRkB22s= -github.com/jpillora/ansi v1.0.2/go.mod h1:D2tT+6uzJvN1nBVQILYWkIdq7zG+b5gcFN5WI/VyjMY= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jpillora/chisel v1.7.7 h1:eLbzoX+ekDhVmF5CpSJD01NtH/w7QMYeaFCIFbzn9ns= -github.com/jpillora/chisel v1.7.7/go.mod h1:X3ZzJDlOSlkMLVY3DMsdrd03rMtugLYk2IOUhvX0SXo= -github.com/jpillora/requestlog v1.0.0 h1:bg++eJ74T7DYL3DlIpiwknrtfdUA9oP/M4fL+PpqnyA= -github.com/jpillora/requestlog v1.0.0/go.mod h1:HTWQb7QfDc2jtHnWe2XEIEeJB7gJPnVdpNn52HXPvy8= -github.com/jpillora/sizestr v1.0.0 h1:4tr0FLxs1Mtq3TnsLDV+GYUWG7Q26a6s+tV5Zfw2ygw= -github.com/jpillora/sizestr v1.0.0/go.mod h1:bUhLv4ctkknatr6gR42qPxirmd5+ds1u7mzD+MZ33f0= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= @@ -897,9 +817,6 @@ 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/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -907,27 +824,23 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.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.11.13/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.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= +github.com/klauspost/compress v1.16.5/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= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -935,30 +848,27 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= 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.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= +github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= +github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= github.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +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/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= -github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -974,36 +884,31 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.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= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= 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/mattn/go-zglob v0.0.3 h1:6Ry4EYsScDyt5di4OI6xw1bYhOqfE5S33Z1OPy+d+To= -github.com/mattn/go-zglob v0.0.3/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= 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/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= +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/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= +github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -1012,38 +917,21 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/sys/mount v0.3.1 h1:RX1K0x95oR8j5P1YefKDt7tE1C2kCCixV0H8Aza3GaI= -github.com/moby/sys/mount v0.3.1/go.mod h1:6IZknFQiqjLpwuYJD5Zk0qYEuJiws36M88MIXnZHya0= -github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/mountinfo v0.6.0 h1:gUDhXQx58YNrpHlK4nSL+7y2pxFZkUcXqzFDKWdC0Oo= -github.com/moby/sys/mountinfo v0.6.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/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/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= 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= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -1053,69 +941,31 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/neilotoole/errgroup v0.1.6/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= 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.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +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 v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= -github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= -github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8= +github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk= +github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1126,13 +976,6 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= -github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= -github.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= -github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= -github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= -github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= -github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E= -github.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -1140,23 +983,19 @@ 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.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= -github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/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-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= +github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/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-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1166,67 +1005,47 @@ github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUI github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= 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.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +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= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.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.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE= -github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +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.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= 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.2.0/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 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +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/radovskyb/watcher v1.0.7 h1:AYePLih6dpmS32vlHfhCeli8127LzkIgwJGcwwe8tUE= -github.com/radovskyb/watcher v1.0.7/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= 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= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= @@ -1234,47 +1053,37 @@ github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRr github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= +github.com/rs/cors v1.9.0/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= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= +github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= @@ -1282,44 +1091,34 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +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.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/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= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= +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/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1330,81 +1129,46 @@ 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.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/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/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +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/takuoki/gocase v1.0.0 h1:gPwLJTWVm2T1kUiCsKirg/faaIUGVTI0FA3SYr75a44= -github.com/takuoki/gocase v1.0.0/go.mod h1:QgOKJrbuJoDrtoKswBX1/Dw8mJrkOV9tbQZJaxaJ6zc= -github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= -github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= -github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= -github.com/tendermint/fundraising v0.3.1 h1:S4uOV/T7YNBqXhsCZnq/TUoHB0d2kM+6tKeTD4WhLN0= 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/spn v0.2.1-0.20220921200247-8bafad876bdd h1:Sp1MgPWq73/a8WVJvE/B6/xOt7cXEzLFT/+KBtIiuk8= -github.com/tendermint/spn v0.2.1-0.20220921200247-8bafad876bdd/go.mod h1:p4b3ZAVTgLGxIpXZsXVeQuOxVUk1/kcwBIIlOMTZtsE= -github.com/tendermint/tendermint v0.34.22 h1:XMhtC8s8QqJO4l/dn+TkQvevTRSow3Vixjclr41o+2Q= -github.com/tendermint/tendermint v0.34.22/go.mod h1:YpP5vBEAKUT4g6oyfjKgFeZmdB/GjkJAxfF+cgmJg6Y= -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.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/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce h1:fb190+cK2Xz/dvi9Hv8eCYJYvIGUTN2/KLq1pT6CjEc= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= -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= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= +github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -github.com/xanzy/ssh-agent v0.3.2 h1:eKj4SX2Fe7mui28ZgnFW5fmTz1EIr7ugo5s6wDxdHBM= -github.com/xanzy/ssh-agent v0.3.2/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= @@ -1414,20 +1178,15 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg= -github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= +github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= +github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -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.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1436,13 +1195,13 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= @@ -1450,17 +1209,13 @@ go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1470,16 +1225,16 @@ golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -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.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/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= @@ -1494,8 +1249,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-20221205204356-47842c84f3db h1:D/cFflL63o2KSLJIwjlcIt8PR064j/xsmdEJL/YvY/o= -golang.org/x/exp v0.0.0-20221205204356-47842c84f3db/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230519143937-03e91628a987 h1:3xJIFvzUFbu4ls0BTBYcgbCGhA63eAOEMxIHugyXJqA= +golang.org/x/exp v0.0.0-20230519143937-03e91628a987/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= @@ -1510,6 +1265,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1521,13 +1277,12 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1539,16 +1294,12 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1566,7 +1317,6 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -1576,19 +1326,27 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/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.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= 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= @@ -1598,10 +1356,24 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= 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= @@ -1613,8 +1385,11 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1632,41 +1407,27 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1678,29 +1439,22 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/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-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/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-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/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-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1708,34 +1462,52 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/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-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/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-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/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.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/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-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/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= @@ -1745,20 +1517,19 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1770,11 +1541,8 @@ golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1801,18 +1569,14 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 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-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -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= @@ -1821,13 +1585,20 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= @@ -1836,7 +1607,6 @@ gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1857,8 +1627,37 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.110.0 h1:l+rh0KYUooe9JGbGVx71tbFo4SMbMTXK3I3ia2QSEeU= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= +google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1868,14 +1667,12 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -1887,7 +1684,6 @@ google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1903,26 +1699,93 @@ google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 h1:znp6mq/drrY+6khTAlJUDNFFcDGV2ENLYKpMq8SyCds= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1930,7 +1793,6 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -1946,9 +1808,26 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1962,15 +1841,14 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +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= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +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-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -1979,21 +1857,14 @@ gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -2007,14 +1878,11 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/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.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2024,52 +1892,16 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= -k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= -k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= -k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= -k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= 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.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= -pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= +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= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/hermes_config.toml b/hermes_config.toml index 93ba3e4e..465a417c 100644 --- a/hermes_config.toml +++ b/hermes_config.toml @@ -31,7 +31,7 @@ port = 3001 id = 'fairyring_test_1' type = 'CosmosSdk' rpc_addr = 'http://0.0.0.0:16657' -websocket_addr = 'ws://0.0.0.0:16657/websocket' +event_source = { mode = "push", url = "ws://0.0.0.0:16657/websocket", batch_delay = "500ms" } grpc_addr = 'http://0.0.0.0:9090' rpc_timeout = '10s' account_prefix = 'fairy' @@ -52,7 +52,7 @@ numerator = '1' denominator = '3' [chains.gas_price] -price = 0.1 +price = 1 denom = 'frt' [chains.address_type] @@ -63,7 +63,7 @@ derivation = 'cosmos' id = 'fairyring_test_2' type = 'CosmosSdk' rpc_addr = 'http://0.0.0.0:26657' -websocket_addr = 'ws://0.0.0.0:26657/websocket' +event_source = { mode = "push", url = "ws://0.0.0.0:26657/websocket", batch_delay = "500ms" } grpc_addr = 'http://0.0.0.0:9092' rpc_timeout = '10s' account_prefix = 'fairy' @@ -84,7 +84,7 @@ numerator = '1' denominator = '3' [chains.gas_price] -price = 0.1 +price = 1 denom = 'frt' [chains.address_type] diff --git a/proto/buf.gen.gogo.yaml b/proto/buf.gen.gogo.yaml new file mode 100644 index 00000000..4e8fb72d --- /dev/null +++ b/proto/buf.gen.gogo.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - name: gocosmos + out: .. + opt: plugins=grpc,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1alpha1/orm.proto=github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1 + - 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 00000000..6b3cbaf7 --- /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: d0536f4cfdc948e49ed0ec7bf049576f + digest: shake256:424505de91bafc6e6d07e6ad71f409a8bf18d8b48e13a3d005437dfe01a30526b127c8e7f48a9ba23069d661f9bd419684c6879b900b8d79b0db59dc4b5d3933 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 5e5b9fdd01804356895f8f79a6f1ddc1 + digest: shake256:0b85da49e2e5f9ebc4806eae058e2f56096ff3b1c59d1fb7c190413dd15f45dd456f0b69ced9059341c80795d2b6c943de15b120a9e0308b499e43e4b5fc2952 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 711e289f6a384c4caeebaff7c6931ade + digest: shake256:e08fb55dad7469f69df00304eed31427d2d1576e9aab31e6bf86642688e04caaf0372f15fe6974cf79432779a635b3ea401ca69c943976dc42749524e4c25d94 diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 00000000..8d65efbf --- /dev/null +++ b/proto/buf.yaml @@ -0,0 +1,23 @@ +version: v1 +name: buf.build/Fairblock/fairyring +deps: + - buf.build/cosmos/cosmos-sdk + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis +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 + ignore: + - tendermint \ No newline at end of file diff --git a/proto/fairyring/keyshare/authorized_address.proto b/proto/fairyring/keyshare/authorized_address.proto new file mode 100644 index 00000000..9a197353 --- /dev/null +++ b/proto/fairyring/keyshare/authorized_address.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +package fairyring.keyshare; + +option go_package = "fairyring/x/keyshare/types"; + +message AuthorizedAddress { + string target = 1; + bool isAuthorized = 2; + string authorizedBy = 3; +} + diff --git a/proto/fairyring/keyshare/commitments.proto b/proto/fairyring/keyshare/commitments.proto new file mode 100644 index 00000000..d6ed1b54 --- /dev/null +++ b/proto/fairyring/keyshare/commitments.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; +package fairyring.keyshare; + +option go_package = "fairyring/x/keyshare/types"; + +message Commitments { + repeated string commitments = 1; +} \ No newline at end of file diff --git a/proto/fairyring/keyshare/genesis.proto b/proto/fairyring/keyshare/genesis.proto index 2555ba72..9ce2ed15 100644 --- a/proto/fairyring/keyshare/genesis.proto +++ b/proto/fairyring/keyshare/genesis.proto @@ -8,6 +8,7 @@ import "fairyring/keyshare/validator_set.proto"; import "fairyring/keyshare/key_share.proto"; import "fairyring/keyshare/aggregated_key_share.proto"; import "fairyring/keyshare/pub_key.proto"; +import "fairyring/keyshare/authorized_address.proto"; // this line is used by starport scaffolding # genesis/proto/import @@ -21,7 +22,8 @@ message GenesisState { // this line is used by starport scaffolding # genesis/proto/state repeated AggregatedKeyShare aggregatedKeyShareList = 4 [(gogoproto.nullable) = false]; - ActivePubKey activePubKey = 5 [(gogoproto.nullable) = false]; - QueuedPubKey queuedPubKey = 6 [(gogoproto.nullable) = false]; + ActivePubKey activePubKey = 5 [(gogoproto.nullable) = false]; + QueuedPubKey queuedPubKey = 6 [(gogoproto.nullable) = false]; + repeated AuthorizedAddress authorizedAddressList = 7 [(gogoproto.nullable) = false]; } diff --git a/proto/fairyring/keyshare/key_share.proto b/proto/fairyring/keyshare/key_share.proto index 182f61dd..24f7bbcb 100644 --- a/proto/fairyring/keyshare/key_share.proto +++ b/proto/fairyring/keyshare/key_share.proto @@ -6,11 +6,9 @@ option go_package = "fairyring/x/keyshare/types"; message KeyShare { string validator = 1; uint64 blockHeight = 2; - string commitment = 3; - string keyShare = 4; - uint64 keyShareIndex = 5; - uint64 receivedTimestamp = 6; - uint64 receivedBlockHeight = 7; - + string keyShare = 3; + uint64 keyShareIndex = 4; + uint64 receivedTimestamp = 5; + uint64 receivedBlockHeight = 6; } diff --git a/proto/fairyring/keyshare/params.proto b/proto/fairyring/keyshare/params.proto index 8fa93790..30574351 100644 --- a/proto/fairyring/keyshare/params.proto +++ b/proto/fairyring/keyshare/params.proto @@ -10,4 +10,8 @@ message Params { option (gogoproto.goproto_stringer) = false; uint64 key_expiry = 1; repeated string trusted_addresses = 2; + bytes slash_fraction_no_keyshare = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + bytes slash_fraction_wrong_keyshare = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + uint64 minimum_bonded = 5; + uint64 max_idled_block = 6; } diff --git a/proto/fairyring/keyshare/query.proto b/proto/fairyring/keyshare/query.proto index dae71087..5d9069af 100644 --- a/proto/fairyring/keyshare/query.proto +++ b/proto/fairyring/keyshare/query.proto @@ -10,6 +10,7 @@ import "fairyring/keyshare/validator_set.proto"; import "fairyring/keyshare/key_share.proto"; import "fairyring/keyshare/aggregated_key_share.proto"; import "fairyring/keyshare/pub_key.proto"; +import "fairyring/keyshare/authorized_address.proto"; // this line is used by starport scaffolding # 1 @@ -21,26 +22,31 @@ service Query { // Parameters queries the parameters of the module. rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/fairyring/keyshare/params"; + } // Queries a ValidatorSet by index. rpc ValidatorSet (QueryGetValidatorSetRequest) returns (QueryGetValidatorSetResponse) { option (google.api.http).get = "/fairyring/keyshare/validator_set/{index}"; + } // Queries a list of ValidatorSet items. rpc ValidatorSetAll (QueryAllValidatorSetRequest) returns (QueryAllValidatorSetResponse) { option (google.api.http).get = "/fairyring/keyshare/validator_set"; + } // Queries a KeyShare by index. rpc KeyShare (QueryGetKeyShareRequest) returns (QueryGetKeyShareResponse) { option (google.api.http).get = "/fairyring/keyshare/key_share/{validator}/{blockHeight}"; + } // Queries a list of KeyShare items. rpc KeyShareAll (QueryAllKeyShareRequest) returns (QueryAllKeyShareResponse) { option (google.api.http).get = "/fairyring/keyshare/key_share"; + } // this line is used by starport scaffolding # 2 @@ -48,14 +54,27 @@ service Query { // Queries a list of AggregatedKeyShare items. rpc AggregatedKeyShare (QueryGetAggregatedKeyShareRequest) returns (QueryGetAggregatedKeyShareResponse) { option (google.api.http).get = "/fairyring/keyshare/aggregated_key_share/{height}"; + } rpc AggregatedKeyShareAll (QueryAllAggregatedKeyShareRequest) returns (QueryAllAggregatedKeyShareResponse) { option (google.api.http).get = "/fairyring/keyshare/aggregated_key_share"; + } - + // Queries the public keys - rpc PubKey (QueryPubKeyRequest) returns (QueryPubKeyResponse) { + rpc PubKey (QueryPubKeyRequest) returns (QueryPubKeyResponse) { option (google.api.http).get = "/fairyring/keyshare/pub_key"; + + } + + // Queries a list of AuthorizedAddress items. + rpc AuthorizedAddress (QueryGetAuthorizedAddressRequest) returns (QueryGetAuthorizedAddressResponse) { + option (google.api.http).get = "/fairyring/keyshare/authorized_address/{target}"; + + } + rpc AuthorizedAddressAll (QueryAllAuthorizedAddressRequest) returns (QueryAllAuthorizedAddressResponse) { + option (google.api.http).get = "/fairyring/keyshare/authorized_address"; + } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -124,7 +143,24 @@ message QueryAllAggregatedKeyShareResponse { message QueryPubKeyRequest {} message QueryPubKeyResponse { - ActivePubKey activePubKey = 1 [(gogoproto.nullable) = false]; + ActivePubKey activePubKey = 1 [(gogoproto.nullable) = false]; QueuedPubKey queuedPubKey = 2 [(gogoproto.nullable) = false]; } +message QueryGetAuthorizedAddressRequest { + string target = 1; +} + +message QueryGetAuthorizedAddressResponse { + AuthorizedAddress authorizedAddress = 1 [(gogoproto.nullable) = false]; +} + +message QueryAllAuthorizedAddressRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +message QueryAllAuthorizedAddressResponse { + repeated AuthorizedAddress authorizedAddress = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + diff --git a/proto/fairyring/keyshare/tx.proto b/proto/fairyring/keyshare/tx.proto index 7e4e1e3d..c3829664 100644 --- a/proto/fairyring/keyshare/tx.proto +++ b/proto/fairyring/keyshare/tx.proto @@ -10,9 +10,12 @@ option go_package = "fairyring/x/keyshare/types"; service Msg { rpc RegisterValidator (MsgRegisterValidator) returns (MsgRegisterValidatorResponse); rpc SendKeyshare (MsgSendKeyshare ) returns (MsgSendKeyshareResponse ); - + // this line is used by starport scaffolding # proto/tx/rpc - rpc CreateLatestPubKey (MsgCreateLatestPubKey) returns (MsgCreateLatestPubKeyResponse); + rpc CreateLatestPubKey (MsgCreateLatestPubKey ) returns (MsgCreateLatestPubKeyResponse ); + rpc CreateAuthorizedAddress (MsgCreateAuthorizedAddress) returns (MsgCreateAuthorizedAddressResponse); + rpc UpdateAuthorizedAddress (MsgUpdateAuthorizedAddress) returns (MsgUpdateAuthorizedAddressResponse); + rpc DeleteAuthorizedAddress (MsgDeleteAuthorizedAddress) returns (MsgDeleteAuthorizedAddressResponse); } message MsgRegisterValidator { string creator = 1; @@ -25,25 +28,48 @@ message MsgRegisterValidatorResponse { message MsgSendKeyshare { string creator = 1; string message = 2; - string commitment = 3; - uint64 keyShareIndex = 4; - uint64 blockHeight = 5; + uint64 keyShareIndex = 3; + uint64 blockHeight = 4; } message MsgSendKeyshareResponse { string creator = 1; string keyshare = 2; - string commitment = 3; - uint64 keyshareIndex = 4; - uint64 blockHeight = 5; - uint64 receivedBlockHeight = 6; + uint64 keyshareIndex = 3; + uint64 blockHeight = 4; + uint64 receivedBlockHeight = 5; + bool success = 6; + string errorMessage = 7; } - // this line is used by starport scaffolding # proto/tx/message message MsgCreateLatestPubKey { string creator = 1; string publicKey = 2; + repeated string commitments = 3; } message MsgCreateLatestPubKeyResponse {} + +message MsgCreateAuthorizedAddress { + string target = 1; + string creator = 2; +} + +message MsgCreateAuthorizedAddressResponse {} + +message MsgUpdateAuthorizedAddress { + string target = 1; + bool isAuthorized = 2; + string creator = 3; +} + +message MsgUpdateAuthorizedAddressResponse {} + +message MsgDeleteAuthorizedAddress { + string target = 1; + string creator = 2; +} + +message MsgDeleteAuthorizedAddressResponse {} + diff --git a/proto/fairyring/pep/encrypted_tx.proto b/proto/fairyring/pep/encrypted_tx.proto index ea0fd1b5..eb496405 100644 --- a/proto/fairyring/pep/encrypted_tx.proto +++ b/proto/fairyring/pep/encrypted_tx.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package fairyring.pep; import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; option go_package = "fairyring/x/pep/types"; @@ -10,6 +11,7 @@ message EncryptedTx { uint64 index = 2; string data = 3; string creator = 4; + cosmos.base.v1beta1.Coin chargedGas = 5; } message EncryptedTxArray { diff --git a/proto/fairyring/pep/genesis.proto b/proto/fairyring/pep/genesis.proto index d6711333..695acbb9 100644 --- a/proto/fairyring/pep/genesis.proto +++ b/proto/fairyring/pep/genesis.proto @@ -15,8 +15,8 @@ option go_package = "fairyring/x/pep/types"; // GenesisState defines the pep module's genesis state. message GenesisState { - Params params = 1 [(gogoproto.nullable) = false]; - string port_id = 2; + Params params = 1 [(gogoproto.nullable) = false]; + string port_id = 2; repeated EncryptedTxArray encryptedTxArray = 3 [(gogoproto.nullable) = false]; repeated PepNonce pepNonceList = 4 [(gogoproto.nullable) = false]; @@ -25,4 +25,3 @@ message GenesisState { ActivePubKey activePubKey = 7 [(gogoproto.nullable) = false]; QueuedPubKey queuedPubKey = 8 [(gogoproto.nullable) = false]; } - diff --git a/proto/fairyring/pep/params.proto b/proto/fairyring/pep/params.proto index 6687194b..5941872e 100644 --- a/proto/fairyring/pep/params.proto +++ b/proto/fairyring/pep/params.proto @@ -2,11 +2,21 @@ syntax = "proto3"; package fairyring.pep; import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; option go_package = "fairyring/x/pep/types"; // Params defines the parameters for the module. message Params { option (gogoproto.goproto_stringer) = false; - + repeated TrustedCounterParty trusted_counter_parties = 1; + repeated string trusted_addresses = 2; + string channel_id = 3; + cosmos.base.v1beta1.Coin minGasPrice = 4; } + +message TrustedCounterParty { + string client_id = 1; + string connection_id = 2; + string channel_id = 3; +} \ No newline at end of file diff --git a/proto/scripts/protocgen.sh b/proto/scripts/protocgen.sh index 3980d49d..55544e58 100644 --- a/proto/scripts/protocgen.sh +++ b/proto/scripts/protocgen.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -set -eo pipefail +set -e pipefail protoc_gen_gocosmos() { if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then @@ -13,18 +13,19 @@ protoc_gen_gocosmos() { protoc_gen_gocosmos -proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +cd proto +proto_dirs=$(find ./fairyring -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do - protoc \ - -I "proto" \ - -I "third_party/proto" \ - --gocosmos_out=plugins=interfacetype+grpc,\ -Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ - --grpc-gateway_out=logtostderr=true:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - + for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do + if grep go_package $file &>/dev/null; then + buf generate --template buf.gen.gogo.yaml $file + fi + done done +cd .. + # move proto files to the right places -cp -r github.com/Fairblock/fairyring/x/* x/ -rm -rf github.com \ No newline at end of file +cp -r fairyring/x/* x/ +rm -rf fairyring + diff --git a/scripts/start_relayer.sh b/scripts/start_relayer.sh index 898db60b..55a918cf 100755 --- a/scripts/start_relayer.sh +++ b/scripts/start_relayer.sh @@ -5,7 +5,7 @@ ignite relayer configure -a \ --source-faucet "http://0.0.0.0:4500" \ --source-port "pep" \ --source-version "pep-1" \ - --source-gasprice "0.0000025frt" \ + --source-gasprice "0.0000025ufairy" \ --source-prefix "cosmos" \ --source-gaslimit 300000 \ --target-rpc "http://0.0.0.0:26659" \ diff --git a/scripts/tests/blockTxLimit.sh b/scripts/tests/blockTxLimit.sh new file mode 100755 index 00000000..dba2980e --- /dev/null +++ b/scripts/tests/blockTxLimit.sh @@ -0,0 +1,205 @@ +#!/bin/bash + +# make BLOCK_TIME= TOTAL_ACC= OTHER_TX= MAX_TIMES= INTERVAL= test-block-tx-limit + +GENERATOR=ShareGenerator +BINARY=fairyringd +CHAIN_DIR=$(pwd)/data +CHAINID_1=fairyring_test_1 +CHAIN1_NODE=tcp://localhost:16657 + +MAX_TEST_TIMES=$MAX_TIMES +EACH_TEST_INTERVAL=$INTERVAL + +GENERAL_TX_AMOUNT=$OTHER_TX +BLOCK_TIME=$BLOCK_TIME +TOTAL_TEST_ACC_NUM=$TOTAL_ACC + +THRESHOLD=$(echo "scale=5; $TOTAL_TEST_ACC_NUM*(2/3)" | bc | perl -nl -MPOSIX -e 'print ceil($_);') + +TARGET_BLOCK_PLUS=$(echo "scale=5; $TOTAL_TEST_ACC_NUM/7" | bc | perl -nl -MPOSIX -e 'print ceil($_);') + +TARGET_BLOCK_PLUS=$((TARGET_BLOCK_PLUS>=10 ? TARGET_BLOCK_PLUS : 10)) + +WAIT_MULTIPLY=$(($TARGET_BLOCK_PLUS+2)) + +PIPE_PREFIX=/tmp/testfairyring + +echo "Block Time: $BLOCK_TIME, Total Acc number: $TOTAL_TEST_ACC_NUM, Threshold: $THRESHOLD" +echo "Target block plus: $TARGET_BLOCK_PLUS, Wait multiply: $WAIT_MULTIPLY" + +WALLET_1=$($BINARY keys show wallet1 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) +VALIDATOR_1=$($BINARY keys show val1 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) + +check_tx_code () { + local TX_CODE=$(echo "$1" | jq -r '.code') + if [ "$TX_CODE" != 0 ]; then + echo "ERROR: Tx failed with code: $TX_CODE" + exit 1 + fi +} + +wait_for_tx () { + sleep $BLOCK_TIME + local TXHASH=$(echo "$1" | jq -r '.txhash') + RESULT=$($BINARY q tx --type=hash $TXHASH --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE -o json) + echo "$RESULT" +} + + +GENERATED_RESULT=$($GENERATOR generate $TOTAL_TEST_ACC_NUM $THRESHOLD) +PUB_KEY=$(echo "$GENERATED_RESULT" | jq -r '.MasterPublicKey') + +GENERATED_SHARE=$(echo "$GENERATED_RESULT" | jq -r '.Shares[0].Value') + + +echo "Trusted address submit pub key on chain fairyring_test_1" +RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY --from $VALIDATOR_1 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +VALIDATOR_ADDR=$(echo "$RESULT" | jq -r '.logs[0].events[1].attributes[2].value') +if [ "$VALIDATOR_ADDR" != "$VALIDATOR_1" ]; then + echo "ERROR: KeyShare module submit pub key from trusted address error. Expected creator address '$VALIDATOR_1', got '$VALIDATOR_ADDR'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 +fi + + +for i in $(seq 0 $(($TOTAL_TEST_ACC_NUM-1))) +do + # echo "account test$i registering as a validator on chain fairyring_test_1" + NOW_ADDR=$($BINARY keys show test$i -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) + RESULT=$($BINARY tx keyshare register-validator --from test$i --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode async --keyring-backend test -o json -y) + check_tx_code $RESULT +done + +sleep $BLOCK_TIME + +echo "All account registered as validator" + +echo "Max Testing times: $MAX_TEST_TIMES, Interval: $EACH_TEST_INTERVAL" + +KEYSHARE_TEST_RESULTS=() +NORMAL_TEST_RESULTS=() + +for testing_i in $(seq 1 $MAX_TEST_TIMES) +do + echo "Current Testing Times: $testing_i" + + CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node $CHAIN1_NODE | jq -r '.block.header.height') + + TARGET_BLOCK=$(($CURRENT_BLOCK+$TARGET_BLOCK_PLUS)) + + PIPES=() + + for i in $(seq 0 $(($TOTAL_TEST_ACC_NUM-1))) + do + CURRENT_KEYSHARE_INDEX=$(($i-1)) + GENERATED_SHARE=$(echo "$GENERATED_RESULT" | jq -r ".Shares[$CURRENT_KEYSHARE_INDEX].Value") + ADDR=$($BINARY keys show test$i -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) + + PIPE_NAME="$PIPE_PREFIX""submit_tx$i" + + if [[ ! -p "$PIPE_NAME" ]]; then + mkfifo $PIPE_NAME + fi + #echo "Address: $ADDR | Share: $GENERATED_SHARE | Index: $i" + ./scripts/tests/submitTx.sh $ADDR $BLOCK_TIME $GENERATED_SHARE $i $TARGET_BLOCK $PIPE_NAME > $CHAIN_DIR/submit_tx_test$i.log & + + PIPES+=( $PIPE_NAME ) + done + + echo "Started all submit KeyShare tx client" + + if [[ "$GENERAL_TX_AMOUNT" -ge "1" ]]; then + ADDR=$($BINARY keys show "normaltxacc" -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) + + PIPE_NAME="$PIPE_PREFIX""normaltx$i" + + if [[ ! -p "$PIPE_NAME" ]]; then + mkfifo $PIPE_NAME + fi + + ./scripts/tests/submitNormalTx.sh $ADDR $BLOCK_TIME $TARGET_BLOCK $GENERAL_TX_AMOUNT $PIPE_NAME > $CHAIN_DIR/normaltxacc.log & + + PIPES+=( $PIPE_NAME ) + fi + + echo "Started submit general tx client" + + sleep $(($BLOCK_TIME*5)) + + echo "Start getting block height..." + + while true; do + CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node $CHAIN1_NODE | jq -r '.block.header.height') + + for i in "${PIPES[@]}"; do + echo "$CURRENT_BLOCK" >$i + done + + if [ "$CURRENT_BLOCK" -ge "$TARGET_BLOCK" ]; then + break + fi + + sleep 0.5 + done + + echo "Target block height reached..." + + echo "" + echo "Remember to kill all 'fairyringd' process & remove the 'data' directory" + echo "" + echo "Block Time: $BLOCK_TIME, Total Acc number: $TOTAL_TEST_ACC_NUM, Threshold: $THRESHOLD" + echo "Target block plus: $TARGET_BLOCK_PLUS, Wait multiply: $WAIT_MULTIPLY" + + sleep $(($BLOCK_TIME*$WAIT_MULTIPLY)) + + SUM_RESULT=0 + + for i in $(seq 0 $(($TOTAL_TEST_ACC_NUM-1))) + do + OUT=$(tail -n 1 $CHAIN_DIR/submit_tx_test$i.log) + SUM_RESULT=$(($OUT+$SUM_RESULT)) + done + + echo "" + echo "Total Submit Keyshare Tx confirmed in the next block: $SUM_RESULT" + + KEYSHARE_TEST_RESULTS+=( "$SUM_RESULT" ) + + sleep $(($BLOCK_TIME*($WAIT_MULTIPLY/4))) + + echo "" + echo "Total Normal Tx confirmed in the next block:" + NORMAL_RESULT=$(tail -n 1 $CHAIN_DIR/normaltxacc.log) + echo "$NORMAL_RESULT" + + NORMAL_TEST_RESULTS+=( "$NORMAL_RESULT" ) +done + +echo "Max Testing times: $MAX_TEST_TIMES, Interval: $EACH_TEST_INTERVAL" + +echo "All Test done" + +echo "All KeyShare Test Result: ${KEYSHARE_TEST_RESULTS[*]}" +KEYSHARE_TEST_LEN=${#KEYSHARE_TEST_RESULTS[@]} + +echo "All Normal Test Result: ${NORMAL_TEST_RESULTS[*]}" +NORMAL_TEST_LEN=${#NORMAL_TEST_RESULTS[@]} + +KEYSHARE_TEST_SUM=0 +for i in "${KEYSHARE_TEST_RESULTS[@]}"; +do + KEYSHARE_TEST_SUM=$(($KEYSHARE_TEST_SUM+$i)) +done + +echo "KEYSHARE TEST AVG: $(($KEYSHARE_TEST_SUM/$KEYSHARE_TEST_LEN))" + +NORMAL_TEST_SUM=0 +for i in "${NORMAL_TEST_RESULTS[@]}"; +do + NORMAL_TEST_SUM=$(($NORMAL_TEST_SUM+$i)) +done + +echo "NORMAL TEST AVG: $(($NORMAL_TEST_SUM/$NORMAL_TEST_LEN))" diff --git a/scripts/tests/keyshare.sh b/scripts/tests/keyshare.sh index 3a9fd284..b61434a1 100755 --- a/scripts/tests/keyshare.sh +++ b/scripts/tests/keyshare.sh @@ -5,7 +5,9 @@ echo "" echo "######################################################" echo "# Submit Valid & Invalid KeyShare to KeyShare Module #" echo "# Register as a validator in KeyShare Module #" +echo "# Submit KeyShare from Authorized address #" echo "# Submit Public Key to KeyShare Module #" +echo "# Authorize address #" echo "######################################################" echo "" @@ -15,14 +17,30 @@ BINARY=fairyringd CHAIN_DIR=$(pwd)/data CHAINID_1=fairyring_test_1 CHAINID_2=fairyring_test_2 - +BLOCK_TIME=5 WALLET_1=$($BINARY keys show wallet1 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) VALIDATOR_1=$($BINARY keys show val1 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) +check_tx_code () { + local TX_CODE=$(echo "$1" | jq -r '.code') + if [ "$TX_CODE" != 0 ]; then + echo "ERROR: Tx failed with code: $TX_CODE" + exit 1 + fi +} + +wait_for_tx () { + sleep $BLOCK_TIME + local TXHASH=$(echo "$1" | jq -r '.txhash') + RESULT=$($BINARY q tx --type=hash $TXHASH --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 -o json) + echo "$RESULT" +} echo "Staked account registering as a validator on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare register-validator --from $VALIDATOR_1 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode block --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare register-validator --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) VALIDATOR_ADDR=$(echo "$RESULT" | jq -r '.logs[0].events[1].attributes[0].value') if [ "$VALIDATOR_ADDR" != "$VALIDATOR_1" ]; then echo "ERROR: KeyShare module register validator error. Expected registered validator address '$VALIDATOR_1', got '$VALIDATOR_ADDR'" @@ -32,7 +50,8 @@ fi echo "Non staking account registering as a validator on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare register-validator --from $WALLET_1 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode block --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare register-validator --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') if [[ "$ERROR_MSG" != *"account is not staking"* ]]; then echo "ERROR: KeyShare module register validator error. Expected to get account is not staking error, got '$ERROR_MSG'" @@ -40,23 +59,13 @@ if [[ "$ERROR_MSG" != *"account is not staking"* ]]; then exit 1 fi - -echo "Registered validator submit invalid key share on chain fairyring_test_1" -CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') -RESULT=$($BINARY tx keyshare send-keyshare 0000 0000 0 $(($CURRENT_BLOCK + 2)) --from $VALIDATOR_1 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode block --keyring-backend test -o json -y) -BURN_EVENT=$(echo "$RESULT" | jq -r '.logs[0].events[0].type') -if [ "$BURN_EVENT" != "burn" ]; then - echo "ERROR: KeyShare module submit invalid key share from registered validator error. Expected the account to be slashed, got '$BURN_EVENT'" - echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" - exit 1 -fi - - -echo "Not registered account submit key share on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare send-keyshare 0000 0000 0 $(($CURRENT_BLOCK + 4)) --from $WALLET_1 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode block --keyring-backend test -o json -y) +echo "Non validator account authorizing another address to submit key share on chain fairyring_test_1" +RESULT=$($BINARY tx keyshare create-authorized-address $VALIDATOR_1 --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') -if [[ "$ERROR_MSG" != *"validator not registered"* ]]; then - echo "ERROR: KeyShare module submit key share from not registered account error. Expected to get account not registered error, got '$ERROR_MSG'" +if [[ "$ERROR_MSG" != *"only validator can authorize address to submit key share"* ]]; then + echo "ERROR: KeyShare module authorize address error. Expected to get account is not validator error, got '$ERROR_MSG'" echo "$RESULT" exit 1 fi @@ -65,10 +74,12 @@ fi GENERATED_RESULT=$($GENERATOR generate 1 1) GENERATED_SHARE=$(echo "$GENERATED_RESULT" | jq -r '.Shares[0].Value') PUB_KEY=$(echo "$GENERATED_RESULT" | jq -r '.MasterPublicKey') - +COMMITS=$(echo "$GENERATED_RESULT" | jq -r '.Commitments[0]') echo "Trusted address submit pub key on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY --from $VALIDATOR_1 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode block --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY $COMMITS --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) VALIDATOR_ADDR=$(echo "$RESULT" | jq -r '.logs[0].events[1].attributes[2].value') if [ "$VALIDATOR_ADDR" != "$VALIDATOR_1" ]; then echo "ERROR: KeyShare module submit pub key from trusted address error. Expected creator address '$VALIDATOR_1', got '$VALIDATOR_ADDR'" @@ -78,7 +89,9 @@ fi echo "Not trusted address submit pub key on chain fairyring_test_1" -RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY --from $WALLET_1 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode block --keyring-backend test -o json -y) +RESULT=$($BINARY tx keyshare create-latest-pub-key $PUB_KEY $COMMITS --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') if [[ "$ERROR_MSG" != *"address is not trusted"* ]]; then echo "ERROR: KeyShare module submit pub key from not trusted address error. Expected to get address is not trusted error, got '$ERROR_MSG'" @@ -87,20 +100,103 @@ if [[ "$ERROR_MSG" != *"address is not trusted"* ]]; then fi -echo "Registered validator submit valid key share on chain fairyring_test_1" CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') -TARGET_HEIGHT=$(($CURRENT_BLOCK + 60)) +TARGET_HEIGHT=$((CURRENT_BLOCK+1)) EXTRACTED_RESULT=$($GENERATOR derive $GENERATED_SHARE 0 $TARGET_HEIGHT) EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') -EXTRACTED_COMMITMENT=$(echo "$EXTRACTED_RESULT" | jq -r '.Commitment') -RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE $EXTRACTED_COMMITMENT 0 $TARGET_HEIGHT --from $VALIDATOR_1 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode block --keyring-backend test -o json -y) -RESULT_EVENT=$(echo "$RESULT" | jq -r '.logs[0].events[0].type') + + +echo "Not registered account submit key share on chain fairyring_test_1" +CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') +if [[ "$ERROR_MSG" != *"sender is not validator / authorized address to submit key share"* ]]; then + echo "ERROR: KeyShare module submit key share from not registered account error. Expected to get account not validator / authorized address error, got '$ERROR_MSG'" + echo "$RESULT" + exit 1 +fi + + +echo "Registered validator authorize another address to submit key share on chain fairyring_test_1" +RESULT=$($BINARY tx keyshare create-authorized-address $WALLET_1 --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +EVENT_ATR=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') +if [ "$EVENT_ATR" != "/fairyring.keyshare.MsgCreateAuthorizedAddress" ]; then + echo "ERROR: KeyShare module registered validator authorize address error. Expected the account to be authorized successfully, got '$EVENT_ATR'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 +fi + + +CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') +TARGET_HEIGHT=$((CURRENT_BLOCK+1)) +EXTRACTED_RESULT=$($GENERATOR derive $GENERATED_SHARE 1 $TARGET_HEIGHT) +EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') + + +echo "Authorized account submit key share on chain fairyring_test_1" +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +KEYSHARE_HEIGHT=$(echo "$RESULT" | jq -r '.logs[0].events[1].attributes[1].value') +if [ "$KEYSHARE_HEIGHT" != "$TARGET_HEIGHT" ]; then + echo "ERROR: KeyShare module submit valid key share from registered validator error. Expected the key received at height $TARGET_HEIGHT, got '$RESULT_EVENT'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 +fi + + +echo "Registered validator remove authorized address to submit key share on chain fairyring_test_1" +RESULT=$($BINARY tx keyshare delete-authorized-address $WALLET_1 --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +EVENT_ATR=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') +if [ "$EVENT_ATR" != "/fairyring.keyshare.MsgDeleteAuthorizedAddress" ]; then + echo "ERROR: KeyShare module registered validator remove authorized address error. Expected the account to be removed successfully, got '$EVENT_ATR'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 +fi + + +CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') +TARGET_HEIGHT=$((CURRENT_BLOCK+1)) +EXTRACTED_RESULT=$($GENERATOR derive $GENERATED_SHARE 1 $TARGET_HEIGHT) +EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') + + +echo "Removed Authorized account tries submit key share on chain fairyring_test_1" +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $WALLET_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') +if [[ "$ERROR_MSG" != *"sender is not validator / authorized address to submit key share"* ]]; then + echo "ERROR: KeyShare module submit valid key share from registered validator error. Expected the key received at height $TARGET_HEIGHT, got '$RESULT_EVENT'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 +fi + + +CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') +TARGET_HEIGHT=$((CURRENT_BLOCK+1)) +EXTRACTED_RESULT=$($GENERATOR derive $GENERATED_SHARE 1 $TARGET_HEIGHT) +EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') + + +echo "Registered validator submit valid key share on chain fairyring_test_1" +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $VALIDATOR_1 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node tcp://localhost:16657 --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +RESULT_EVENT=$(echo "$RESULT" | jq -r '.logs[0].events[2].type') if [ "$RESULT_EVENT" != "keyshare-aggregated" ]; then - echo "ERROR: KeyShare module submit invalid key share from registered validator error. Expected the key to be aggregated, got '$RESULT_EVENT'" + echo "ERROR: KeyShare module submit valid key share from registered validator error. Expected the key to be aggregated, got '$RESULT_EVENT'" echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" exit 1 fi +./scripts/tests/keyshareSender.sh $BINARY $CHAIN_DIR/$CHAINID_1 tcp://localhost:16657 $VALIDATOR_1 $CHAINID_1 $GENERATOR $GENERATED_SHARE > $CHAIN_DIR/keyshareSender.log 2>&1 & echo "Query submitted key share on chain fairyring_test_1" RESULT=$($BINARY query keyshare list-key-share --node tcp://localhost:16657 -o json) diff --git a/scripts/tests/keyshareSender.sh b/scripts/tests/keyshareSender.sh new file mode 100755 index 00000000..8c4a5817 --- /dev/null +++ b/scripts/tests/keyshareSender.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +BINARY=$1 +HOME=$2 +NODE=$3 +FROM=$4 +CHAINID=$5 +GENERATOR=$6 +GENERATED_SHARE=$7 + +BLOCK_TIME=5 + +check_tx_code () { + local TX_CODE=$(echo "$1" | jq -r '.code') + if [ "$TX_CODE" != 0 ]; then + echo "ERROR: Tx failed with code: $TX_CODE" + exit 1 + fi +} + +wait_for_tx () { + sleep $BLOCK_TIME + local TXHASH=$(echo "$1" | jq -r '.txhash') + RESULT=$($BINARY q tx --type=hash $TXHASH --home $HOME --chain-id $CHAINID --node $NODE -o json) + echo "$RESULT" +} + +while true +do + CURRENT_BLOCK=$($BINARY query block --home $HOME --node $NODE | jq -r '.block.header.height') + TARGET_HEIGHT=$((CURRENT_BLOCK+1)) + EXTRACTED_RESULT=$($GENERATOR derive $GENERATED_SHARE 1 $TARGET_HEIGHT) + EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') + #EXTRACTED_COMMITMENT=$(echo "$EXTRACTED_RESULT" | jq -r '.Commitment') + RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE 1 $TARGET_HEIGHT --from $FROM --gas-prices 1frt --home $HOME --chain-id $CHAINID --node $NODE --broadcast-mode sync --keyring-backend test -o json -y) + check_tx_code $RESULT + RESULT=$(wait_for_tx $RESULT) + RESULT_EVENT=$(echo "$RESULT" | jq -r '.logs[0].events[2].type') + if [ "$RESULT_EVENT" != "keyshare-aggregated" ]; then + echo "ERROR: KeyShare module submit invalid key share from registered validator error. Expected the key to be aggregated, got '$RESULT_EVENT'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 + fi + echo "Submitted keyshare for height: $TARGET_HEIGHT" +done \ No newline at end of file diff --git a/scripts/tests/pep.sh b/scripts/tests/pep.sh index 1462e59a..20c1caa1 100755 --- a/scripts/tests/pep.sh +++ b/scripts/tests/pep.sh @@ -7,6 +7,7 @@ echo "# Test Encrypted Tx Verification & Decryption & Execution #" echo "# Submit Valid & Invalid Aggregated Key to Pep Module #" echo "# Submit Valid & Invalid Encrypted Tx to Pep Module #" echo "# Test Pep Nonce Increment on Encrypted Tx #" +echo "# Gas Deduction for encrypted tx execution #" echo "###########################################################" echo "" @@ -19,35 +20,38 @@ CHAINID_1=fairyring_test_1 CHAIN1_NODE=tcp://localhost:16657 CHAINID_2=fairyring_test_2 CHAIN2_NODE=tcp://localhost:26657 - +BLOCK_TIME=5 WALLET_1=$($BINARY keys show wallet1 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) VALIDATOR_1=$($BINARY keys show val1 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_1) WALLET_2=$($BINARY keys show wallet2 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_2) VALIDATOR_2=$($BINARY keys show val2 -a --keyring-backend test --home $CHAIN_DIR/$CHAINID_2) +check_tx_code () { + local TX_CODE=$(echo "$1" | jq -r '.code') + if [ "$TX_CODE" != "0" ]; then + echo "ERROR: Tx failed with code: $TX_CODE" + exit 1 + fi +} + +wait_for_tx () { + sleep $BLOCK_TIME + local TXHASH=$(echo "$1" | jq -r '.txhash') + RESULT=$($BINARY q tx --type=hash $TXHASH --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE -o json) + echo "$RESULT" +} echo "Query new account pep nonce from pep module on chain fairyring_test_2" RESULT=$($BINARY query pep show-pep-nonce $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE -o json) VALIDATOR_PEP_NONCE=$(echo "$RESULT" | jq -r '.pepNonce.nonce') -if [ "$VALIDATOR_PEP_NONCE" != "0" ]; then - echo "ERROR: Pep module query Pep Nonce error. Expected Pep Nonce to be 0, got '$VALIDATOR_PEP_NONCE'" +if [ "$VALIDATOR_PEP_NONCE" != "1" ]; then + echo "ERROR: Pep module query Pep Nonce error. Expected Pep Nonce to be 1, got '$VALIDATOR_PEP_NONCE'" echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" exit 1 fi -echo "Query aggregated key share from key share module for submitting to pep module on chain fairyring_test_1" -CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node $CHAIN1_NODE | jq -r '.block.header.height') -RESULT=$($BINARY query keyshare list-aggregated-key-share --node $CHAIN1_NODE -o json) -AGG_KEY_HEIGHT=$(echo "$RESULT" | jq -r '.aggregatedKeyShare[0].height') -AGG_KEY=$(echo "$RESULT" | jq -r '.aggregatedKeyShare[0].data') -if [ "$CURRENT_BLOCK" -ge "$AGG_KEY_HEIGHT" ]; then - echo "ERROR: Height of the aggregated key from key share module '$AGG_KEY_HEIGHT' is less than current block height '$CURRENT_BLOCK'" - exit 1 -fi - - echo "Query master public key from key share module for submitting to pep module on chain fairyring_test_1" PUB_KEY=$($BINARY query keyshare show-active-pub-key --node $CHAIN1_NODE -o json | jq -r '.activePubKey.publicKey') if [ "$PUB_KEY" == "" ]; then @@ -58,7 +62,9 @@ fi echo "Submit encrypted tx with invalid block height to pep module on chain fairyring_test_2" CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node tcp://localhost:16657 | jq -r '.block.header.height') -RESULT=$($BINARY tx pep submit-encrypted-tx 0000 $((CURRENT_BLOCK - 1)) --from $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode block --keyring-backend test -o json -y) +RESULT=$($BINARY tx pep submit-encrypted-tx 0000 $((CURRENT_BLOCK - 1)) --from $VALIDATOR_2 --gas-prices 1frt --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) ERROR_MSG=$(echo "$RESULT" | jq -r '.raw_log') if [[ "$ERROR_MSG" != *"Invalid target block height"* ]]; then echo "ERROR: Pep module submit encrypted tx with invalid block height error. Expected tx to failed with error invalid target block height, got '$ERROR_MSG'" @@ -70,8 +76,8 @@ fi echo "Query account pep nonce before submitting encrypted tx from pep module on chain fairyring_test_2" RESULT=$($BINARY query pep show-pep-nonce $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE -o json) VALIDATOR_PEP_NONCE_BEFORE=$(echo "$RESULT" | jq -r '.pepNonce.nonce') -if [ "$VALIDATOR_PEP_NONCE_BEFORE" != "0" ]; then - echo "ERROR: Pep module query Pep Nonce error. Expected Pep Nonce to be 0, got '$VALIDATOR_PEP_NONCE'" +if [ "$VALIDATOR_PEP_NONCE_BEFORE" != "1" ]; then + echo "ERROR: Pep module query Pep Nonce error. Expected Pep Nonce to be 1, got '$VALIDATOR_PEP_NONCE'" echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" exit 1 fi @@ -86,21 +92,75 @@ echo "Target account has: $TARGET_BAL $TARGET_BAL_DENOM before encrypted bank se echo "Signing bank send tx with pep nonce: '$VALIDATOR_PEP_NONCE_BEFORE'" echo "Sending 1 $TARGET_BAL_DENOM to target address" -$BINARY tx bank send $VALIDATOR_2 $WALLET_2 1$TARGET_BAL_DENOM --from $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test --generate-only -o json -y > unsigned.json -SIGNED_DATA=$($BINARY tx sign unsigned.json --from $VALIDATOR_2 --offline --account-number 0 --sequence $VALIDATOR_PEP_NONCE_BEFORE --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test -y) +$BINARY tx bank send $VALIDATOR_2 $WALLET_2 1$TARGET_BAL_DENOM --from $VALIDATOR_2 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test --generate-only -o json -y > unsigned.json +SIGNED_DATA=$($BINARY tx sign unsigned.json --from $VALIDATOR_2 --offline --account-number 0 --sequence $VALIDATOR_PEP_NONCE_BEFORE --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test -y) + + +PEP_NONCE_2ND=$(($VALIDATOR_PEP_NONCE_BEFORE+1)) +echo "Signing second bank send tx with pep nonce: '$PEP_NONCE_2ND' without gas fee" +echo "Sending 1 $TARGET_BAL_DENOM to target address" +$BINARY tx bank send $VALIDATOR_2 $WALLET_2 1$TARGET_BAL_DENOM --from $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test --generate-only -o json -y > unsigned2.json +SIGNED_DATA_2=$($BINARY tx sign unsigned2.json --from $VALIDATOR_2 --offline --account-number 0 --sequence $PEP_NONCE_2ND --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --keyring-backend test -y) + + +echo "Query aggregated key share from key share module for submitting to pep module on chain fairyring_test_1" +CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node $CHAIN1_NODE | jq -r '.block.header.height') +RESULT=$($BINARY query keyshare list-aggregated-key-share --node $CHAIN1_NODE -o json) +AGG_KEY_HEIGHT=$(echo "$RESULT" | jq -r '.aggregatedKeyShare | last | .height') +AGG_KEY=$(echo "$RESULT" | jq -r '.aggregatedKeyShare | last | .data') +if [ "$CURRENT_BLOCK" -gt "$AGG_KEY_HEIGHT" ]; then + echo "ERROR: Height of the aggregated key from key share module '$AGG_KEY_HEIGHT' is less than current block height '$CURRENT_BLOCK'" + exit 1 +fi + +CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_2 --node $CHAIN2_NODE | jq -r '.block.header.height') +echo "Chain 2 Current Block: $CURRENT_BLOCK" +echo "Submit valid aggregated key to pep module on chain fairyring_test_2 from address: $VALIDATOR_2" +RESULT=$($BINARY tx pep create-aggregated-key-share $AGG_KEY_HEIGHT $AGG_KEY --from $VALIDATOR_2 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +ACTION=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') +if [ "$ACTION" != "/fairyring.pep.MsgCreateAggregatedKeyShare" ]; then + echo "ERROR: Pep module submit aggregated key error. Expected tx action to be MsgCreateAggregatedKeyShare, got '$ACTION'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + exit 1 +fi + + +echo "Query aggregated key share from key share module for submitting to pep module on chain fairyring_test_1" +CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_1 --node $CHAIN1_NODE | jq -r '.block.header.height') +RESULT=$($BINARY query keyshare list-aggregated-key-share --node $CHAIN1_NODE -o json) +AGG_KEY_HEIGHT=$(echo "$RESULT" | jq -r '.aggregatedKeyShare | last | .height') +AGG_KEY=$(echo "$RESULT" | jq -r '.aggregatedKeyShare | last | .data') +if [ "$CURRENT_BLOCK" -gt "$AGG_KEY_HEIGHT" ]; then + echo "ERROR: Height of the aggregated key from key share module '$AGG_KEY_HEIGHT' is less than current block height '$CURRENT_BLOCK'" + exit 1 +fi echo "Encrypting signed tx with Pub key: '$PUB_KEY'" CIPHER=$($ENCRYPTER $AGG_KEY_HEIGHT $PUB_KEY $SIGNED_DATA) +echo "Encrypting 2nd signed tx with Pub key: '$PUB_KEY'" +CIPHER_2=$($ENCRYPTER $AGG_KEY_HEIGHT $PUB_KEY $SIGNED_DATA_2) + rm -r unsigned.json &> /dev/null +rm -r unsigned2.json &> /dev/null + + +RESULT=$($BINARY query bank balances $VALIDATOR_2 --node $CHAIN2_NODE -o json) +BAL_DENOM=$(echo "$RESULT" | jq -r '.balances[0].denom') +BAL_AMT=$(echo "$RESULT" | jq -r '.balances[0].amount') +echo "Balance before submitting encrypted tx: $BAL_AMT$BAL_DENOM" echo "Submit encrypted tx to pep module on chain fairyring_test_2" -RESULT=$($BINARY tx pep submit-encrypted-tx $CIPHER $AGG_KEY_HEIGHT --from $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode block --keyring-backend test -o json -y) -EVENT_TYPE=$(echo "$RESULT" | jq -r '.logs[0].events[1].type') -TARGET_HEIGHT=$(echo "$RESULT" | jq -r '.logs[0].events[1].attributes[1].value') +RESULT=$($BINARY tx pep submit-encrypted-tx $CIPHER $AGG_KEY_HEIGHT --from $VALIDATOR_2 --gas-prices 1frt --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +EVENT_TYPE=$(echo "$RESULT" | jq -r '.logs[0].events[5].type') +TARGET_HEIGHT=$(echo "$RESULT" | jq -r '.logs[0].events[5].attributes[1].value') if [ "$EVENT_TYPE" != "new-encrypted-tx-submitted" ] && [ "$TARGET_HEIGHT" != "$AGG_KEY_HEIGHT" ]; then echo "ERROR: Pep module submit encrypted tx error. Expected tx to submitted without error with target height '$AGG_KEY_HEIGHT', got '$TARGET_HEIGHT' and '$EVENT_TYPE' | '$CURRENT_BLOCK'" echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" @@ -109,18 +169,48 @@ if [ "$EVENT_TYPE" != "new-encrypted-tx-submitted" ] && [ "$TARGET_HEIGHT" != "$ fi +RESULT=$($BINARY query bank balances $VALIDATOR_2 --node $CHAIN2_NODE -o json) +BAL_DENOM=$(echo "$RESULT" | jq -r '.balances[0].denom') +BAL_AMT=$(echo "$RESULT" | jq -r '.balances[0].amount') +echo "Balance after submitting first encrypted tx: $BAL_AMT$BAL_DENOM" + + +echo "Submit 2nd encrypted tx (without gas fee) to pep module on chain fairyring_test_2" +RESULT=$($BINARY tx pep submit-encrypted-tx $CIPHER_2 $AGG_KEY_HEIGHT --from $VALIDATOR_2 --gas-prices 1frt --gas 300000 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +EVENT_TYPE=$(echo "$RESULT" | jq -r '.logs[0].events[5].type') +TARGET_HEIGHT=$(echo "$RESULT" | jq -r '.logs[0].events[5].attributes[1].value') +if [ "$EVENT_TYPE" != "new-encrypted-tx-submitted" ] && [ "$TARGET_HEIGHT" != "$AGG_KEY_HEIGHT" ]; then + echo "ERROR: Pep module submit 2nd encrypted tx error. Expected tx to submitted without error with target height '$AGG_KEY_HEIGHT', got '$TARGET_HEIGHT' and '$EVENT_TYPE' | '$CURRENT_BLOCK'" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" + echo "ERROR MESSAGE: $(echo "$RESULT" | jq '.')" + exit 1 +fi + + +RESULT=$($BINARY query bank balances $VALIDATOR_2 --node $CHAIN2_NODE -o json) +BAL_DENOM=$(echo "$RESULT" | jq -r '.balances[0].denom') +BAL_AMT=$(echo "$RESULT" | jq -r '.balances[0].amount') +echo "Balance after submitting second encrypted tx: $BAL_AMT$BAL_DENOM" + + echo "Query account pep nonce after submitting encrypted tx from pep module on chain fairyring_test_2" RESULT=$($BINARY query pep show-pep-nonce $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE -o json) VALIDATOR_PEP_NONCE=$(echo "$RESULT" | jq -r '.pepNonce.nonce') -if [ "$VALIDATOR_PEP_NONCE" != "0" ]; then - echo "ERROR: Pep module query Pep Nonce error. Expected Pep Nonce to be 0, got '$VALIDATOR_PEP_NONCE'" +if [ "$VALIDATOR_PEP_NONCE" != "1" ]; then + echo "ERROR: Pep module query Pep Nonce error. Expected Pep Nonce to be 1, got '$VALIDATOR_PEP_NONCE'" echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" exit 1 fi -echo "Submit valid aggregated key to pep module on chain fairyring_test_2" -RESULT=$($BINARY tx pep create-aggregated-key-share $AGG_KEY_HEIGHT $AGG_KEY --from $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode block --keyring-backend test -o json -y) +CURRENT_BLOCK=$($BINARY query block --home $CHAIN_DIR/$CHAINID_2 --node $CHAIN2_NODE | jq -r '.block.header.height') +echo "Chain 2 Current Block: $CURRENT_BLOCK" +echo "Submit valid aggregated key to pep module on chain fairyring_test_2 from address: $VALIDATOR_2" +RESULT=$($BINARY tx pep create-aggregated-key-share $AGG_KEY_HEIGHT $AGG_KEY --from $VALIDATOR_2 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) ACTION=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') if [ "$ACTION" != "/fairyring.pep.MsgCreateAggregatedKeyShare" ]; then echo "ERROR: Pep module submit aggregated key error. Expected tx action to be MsgCreateAggregatedKeyShare, got '$ACTION'" @@ -129,7 +219,7 @@ if [ "$ACTION" != "/fairyring.pep.MsgCreateAggregatedKeyShare" ]; then fi -sleep 2 +sleep $BLOCK_TIME echo "Query latest height from pep module on chain fairyring_test_2" @@ -143,28 +233,39 @@ fi echo "Query account pep nonce after encrypted tx being processed from pep module on chain fairyring_test_2" RESULT=$($BINARY query pep show-pep-nonce $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE -o json) VALIDATOR_PEP_NONCE=$(echo "$RESULT" | jq -r '.pepNonce.nonce') -if [ "$VALIDATOR_PEP_NONCE" != "1" ]; then - echo "ERROR: Pep module query Pep Nonce error. Expected Pep Nonce to be 1, got '$VALIDATOR_PEP_NONCE'" +if [ "$VALIDATOR_PEP_NONCE" != "3" ]; then + echo "ERROR: Pep module query Pep Nonce error. Expected Pep Nonce to be 3, got '$VALIDATOR_PEP_NONCE'" echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" exit 1 fi + echo "Query target account token balance after encrypted tx being executed from pep module on chain fairyring_test_2" RESULT=$($BINARY query bank balances $WALLET_2 --node $CHAIN2_NODE -o json) TARGET_BAL_DENOM=$(echo "$RESULT" | jq -r '.balances[0].denom') TARGET_BAL_AFTER=$(echo "$RESULT" | jq -r '.balances[0].amount') echo "Target account has: $TARGET_BAL_AFTER $TARGET_BAL_DENOM after encrypted bank send tx being executed, balance increased $(($TARGET_BAL_AFTER - $TARGET_BAL)) $TARGET_BAL_DENOM" +if [ "$TARGET_BAL_AFTER" == "$TARGET_BAL" ]; then + echo "ERROR: Pep module encrypted tx execution error. Expected Target Balance to be updated, got same balance: '$TARGET_BAL_AFTER $TARGET_BAL_DENOM'" + exit 1 +fi + +RESULT=$($BINARY query bank balances $VALIDATOR_2 --node $CHAIN2_NODE -o json) +BAL_DENOM=$(echo "$RESULT" | jq -r '.balances[0].denom') +BAL_AMT=$(echo "$RESULT" | jq -r '.balances[0].amount') +echo "Balance after encrypted tx execution: $BAL_AMT$BAL_DENOM" echo "Submit invalid aggregated key to pep module on chain fairyring_test_2" -RESULT=$($BINARY tx pep create-aggregated-key-share $((AGG_KEY_HEIGHT+1)) 123123123 --from $VALIDATOR_2 --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode block --keyring-backend test -o json -y) -ACTION=$(echo "$RESULT" | jq -r '.logs[0].events[0].attributes[0].value') -if [ "$ACTION" != "/fairyring.pep.MsgCreateAggregatedKeyShare" ]; then +RESULT=$($BINARY tx pep create-aggregated-key-share $((AGG_KEY_HEIGHT+1)) 123123123 --from $VALIDATOR_2 --gas-prices 1frt --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --node $CHAIN2_NODE --broadcast-mode sync --keyring-backend test -o json -y) +check_tx_code $RESULT +RESULT=$(wait_for_tx $RESULT) +if [[ "$RESULT" != *"input string length must be equal to 96 bytes"* ]]; then echo "ERROR: Pep module submit aggregated key error. Expected tx action to be MsgCreateAggregatedKeyShare, got '$ACTION'" echo "ERROR MESSAGE: $(echo "$RESULT" | jq -r '.raw_log')" exit 1 fi -sleep 2 +sleep $BLOCK_TIME echo "Query latest height from pep module on chain fairyring_test_2" RESULT=$($BINARY q pep latest-height --node $CHAIN2_NODE -o json | jq -r '.height') @@ -180,5 +281,6 @@ echo "# Test Encrypted Tx Verification & Decryption & Execution #" echo "# Submit Valid & Invalid Aggregated Key to Pep Module #" echo "# Submit Valid & Invalid Encrypted Tx to Pep Module #" echo "# Test Pep Nonce Increment on Encrypted Tx #" +echo "# Gas Deduction for encrypted tx execution #" echo "###########################################################" echo "" diff --git a/scripts/tests/start.sh b/scripts/tests/start.sh index 8b06d4ba..955ba3a1 100755 --- a/scripts/tests/start.sh +++ b/scripts/tests/start.sh @@ -12,6 +12,7 @@ WALLET_MNEMONIC_1="banner spread envelope side kite person disagree path silver WALLET_MNEMONIC_2="veteran try aware erosion drink dance decade comic dawn museum release episode original list ability owner size tuition surface ceiling depth seminar capable only" WALLET_MNEMONIC_3="vacuum burst ordinary enact leaf rabbit gather lend left chase park action dish danger green jeans lucky dish mesh language collect acquire waste load" WALLET_MNEMONIC_4="open attitude harsh casino rent attitude midnight debris describe spare cancel crisp olive ride elite gallery leaf buffalo sheriff filter rotate path begin soldier" +WALLET_MNEMONIC_5="sleep garage unaware monster slide cruel barely blade sudden basic review mimic screen box human wing ritual use smooth ripple tuna ostrich pony eye" RLY_MNEMONIC_1="alley afraid soup fall idea toss can goose become valve initial strong forward bright dish figure check leopard decide warfare hub unusual join cart" RLY_MNEMONIC_2="record gift you once hip style during joke field prize dust unique length more pencil transfer quit train device arrive energy sort steak upset" @@ -29,6 +30,8 @@ GRPCPORT_2=9092 GRPCWEB_1=9091 GRPCWEB_2=9093 +BLOCK_TIME=5 + # Stop if it is already running if pgrep -x "$BINARY" >/dev/null; then echo "Terminating $BINARY..." @@ -84,46 +87,57 @@ $BINARY add-genesis-account $VAL1_ADDR 1000000000000frt,1000000000000stake --hom $BINARY add-genesis-account $VAL2_ADDR 1000000000000frt,1000000000000stake --home $CHAIN_DIR/$CHAINID_2 $BINARY add-genesis-account $WALLET1_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 $BINARY add-genesis-account $WALLET2_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_2 -$BINARY add-genesis-account $WALLET3_ADDR 1000000000000frt --vesting-amount 10000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_1 -$BINARY add-genesis-account $WALLET4_ADDR 1000000000000frt --vesting-amount 10000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_2 +$BINARY add-genesis-account $WALLET3_ADDR 1000000000000frt --vesting-amount 100000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $WALLET4_ADDR 1000000000000frt --vesting-amount 100000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_2 $BINARY add-genesis-account $RLY1_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 $BINARY add-genesis-account $RLY2_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_2 echo "Creating and collecting gentx..." -$BINARY gentx val1 10000000000stake --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --keyring-backend test -$BINARY gentx val2 10000000000stake --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --keyring-backend test +$BINARY gentx val1 100000000000stake --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --keyring-backend test +$BINARY gentx val2 100000000000stake --home $CHAIN_DIR/$CHAINID_2 --chain-id $CHAINID_2 --keyring-backend test $BINARY collect-gentxs --home $CHAIN_DIR/$CHAINID_1 &> /dev/null $BINARY collect-gentxs --home $CHAIN_DIR/$CHAINID_2 &> /dev/null echo "Changing defaults and ports in app.toml and config.toml files..." sed -i -e 's#"tcp://0.0.0.0:26656"#"tcp://0.0.0.0:'"$P2PPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/config.toml sed -i -e 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:'"$RPCPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/config.toml -sed -i -e 's/timeout_commit = "5s"/timeout_commit = "1s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml -sed -i -e 's/timeout_propose = "3s"/timeout_propose = "1s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/timeout_commit = "5s"/timeout_commit = "5s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/timeout_propose = "3s"/timeout_propose = "5s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml sed -i -e 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/$CHAINID_1/config/config.toml sed -i -e 's/enable = false/enable = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml sed -i -e 's/swagger = false/swagger = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml -sed -i -e 's#"tcp://0.0.0.0:1317"#"tcp://0.0.0.0:'"$RESTPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's#"tcp://localhost:1317"#"tcp://localhost:'"$RESTPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml sed -i -e 's#":8080"#":'"$ROSETTA_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's/minimum-gas-prices = "0stake"/minimum-gas-prices = "1frt"/g' $CHAIN_DIR/$CHAINID_1/config/app.toml sed -i -e 's#"tcp://0.0.0.0:26656"#"tcp://0.0.0.0:'"$P2PPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/config.toml sed -i -e 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:'"$RPCPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/config.toml -sed -i -e 's/timeout_commit = "5s"/timeout_commit = "1s"/g' $CHAIN_DIR/$CHAINID_2/config/config.toml -sed -i -e 's/timeout_propose = "3s"/timeout_propose = "1s"/g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's/timeout_commit = "5s"/timeout_commit = "5s"/g' $CHAIN_DIR/$CHAINID_2/config/config.toml +sed -i -e 's/timeout_propose = "3s"/timeout_propose = "5s"/g' $CHAIN_DIR/$CHAINID_2/config/config.toml sed -i -e 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/$CHAINID_2/config/config.toml sed -i -e 's/enable = false/enable = true/g' $CHAIN_DIR/$CHAINID_2/config/app.toml sed -i -e 's/0.0.0.0:9090/0.0.0.0:'"$GRPCPORT_2"'/g' $CHAIN_DIR/$CHAINID_2/config/app.toml sed -i -e 's/swagger = false/swagger = true/g' $CHAIN_DIR/$CHAINID_2/config/app.toml -sed -i -e 's#"tcp://0.0.0.0:1317"#"tcp://0.0.0.0:'"$RESTPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml +sed -i -e 's#"tcp://localhost:1317"#"tcp://localhost:'"$RESTPORT_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml sed -i -e 's#":8080"#":'"$ROSETTA_2"'"#g' $CHAIN_DIR/$CHAINID_2/config/app.toml +sed -i -e 's/minimum-gas-prices = "0stake"/minimum-gas-prices = "1frt"/g' $CHAIN_DIR/$CHAINID_2/config/app.toml echo "Changing genesis.json..." sed -i -e 's/"voting_period": "172800s"/"voting_period": "10s"/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json sed -i -e 's/"voting_period": "172800s"/"voting_period": "10s"/g' $CHAIN_DIR/$CHAINID_2/config/genesis.json sed -i -e 's/"reward_delay_time": "604800s"/"reward_delay_time": "0s"/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json sed -i -e 's/"reward_delay_time": "604800s"/"reward_delay_time": "0s"/g' $CHAIN_DIR/$CHAINID_2/config/genesis.json -sed -i -e 's/"trusted_addresses": \[\]/"trusted_addresses": \["'"$VAL1_ADDR"'"\]/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json -sed -i -e 's/"trusted_addresses": \[\]/"trusted_addresses": \["'"$VAL1_ADDR"'"\]/g' $CHAIN_DIR/$CHAINID_2/config/genesis.json + +sed -i -e 's/"trusted_addresses": \[\]/"trusted_addresses": \["'"$VAL1_ADDR"'","'"$VAL2_ADDR"'"\]/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json +sed -i -e 's/"trusted_addresses": \[\]/"trusted_addresses": \["'"$VAL1_ADDR"'","'"$VAL2_ADDR"'"\]/g' $CHAIN_DIR/$CHAINID_2/config/genesis.json + +TRUSTED_PARTIES='{"client_id": "07-tendermint-0", "connection_id": "connection-0", "channel_id": "channel-0"}' + +sed -i -e 's/"trusted_counter_parties": \[\]/"trusted_counter_parties": \['"$TRUSTED_PARTIES"'\]/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json +sed -i -e 's/"trusted_counter_parties": \[\]/"trusted_counter_parties": \['"$TRUSTED_PARTIES"'\]/g' $CHAIN_DIR/$CHAINID_2/config/genesis.json + +sed -i -e 's/"key_expiry": "100"/"key_expiry": "10000"/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json +sed -i -e 's/"key_expiry": "100"/"key_expiry": "10000"/g' $CHAIN_DIR/$CHAINID_2/config/genesis.json echo "Starting $CHAINID_1 in $CHAIN_DIR..." echo "Creating log file at $CHAIN_DIR/$CHAINID_1.log" @@ -152,7 +166,7 @@ rm rly1.json &> /dev/null rm rly2.json &> /dev/null echo "Waiting both chain to run..." -sleep 5 +sleep $((BLOCK_TIME*2)) echo "Starting Hermes Relayer..." echo "Creating log file at $CHAIN_DIR/relayer.log" diff --git a/scripts/tests/start_test_block_tx_limit.sh b/scripts/tests/start_test_block_tx_limit.sh new file mode 100755 index 00000000..22f77745 --- /dev/null +++ b/scripts/tests/start_test_block_tx_limit.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +BINARY=fairyringd +CHAIN_DIR=$(pwd)/data +CHAINID_1=fairyring_test_1 + +VAL_MNEMONIC_1="clock post desk civil pottery foster expand merit dash seminar song memory figure uniform spice circle try happy obvious trash crime hybrid hood cushion" +WALLET_MNEMONIC_1="banner spread envelope side kite person disagree path silver will brother under couch edit food venture squirrel civil budget number acquire point work mass" +WALLET_MNEMONIC_3="vacuum burst ordinary enact leaf rabbit gather lend left chase park action dish danger green jeans lucky dish mesh language collect acquire waste load" + +P2PPORT_1=16656 +RPCPORT_1=16657 +RESTPORT_1=1316 +ROSETTA_1=8080 +GRPCPORT_1=9090 +GRPCWEB_1=9091 + +BLOCK_TIME=$BLOCK_TIME +TOTAL_TEST_ACC_NUM=$TOTAL_ACC +GENERAL_TX_AMOUNT=$OTHER_TX + +# Stop if it is already running +if pgrep -x "$BINARY" >/dev/null; then + echo "Terminating $BINARY..." + killall $BINARY +fi + +if pgrep -x "hermes" >/dev/null; then + echo "Terminating Hermes Relayer..." + killall hermes +fi + +echo "Removing previous data..." +rm -rf $CHAIN_DIR/$CHAINID_1 &> /dev/null + +# Add directories for both chains, exit if an error occurs +if ! mkdir -p $CHAIN_DIR/$CHAINID_1 2>/dev/null; then + echo "Failed to create chain folder. Aborting..." + exit 1 +fi + + +echo "Initializing $CHAINID_1 ..." +$BINARY init test --home $CHAIN_DIR/$CHAINID_1 --chain-id=$CHAINID_1 &> /dev/null + +echo "Adding genesis accounts..." +echo $VAL_MNEMONIC_1 | $BINARY keys add val1 --home $CHAIN_DIR/$CHAINID_1 --recover --keyring-backend=test +echo $WALLET_MNEMONIC_1 | $BINARY keys add wallet1 --home $CHAIN_DIR/$CHAINID_1 --recover --keyring-backend=test +echo $WALLET_MNEMONIC_3 | $BINARY keys add wallet3 --home $CHAIN_DIR/$CHAINID_1 --recover --keyring-backend=test + +for i in $(seq 0 $(($TOTAL_TEST_ACC_NUM-1))) +do + $BINARY keys add "test$i" --home $CHAIN_DIR/$CHAINID_1 --keyring-backend=test +done + + +VAL1_ADDR=$($BINARY keys show val1 --home $CHAIN_DIR/$CHAINID_1 --keyring-backend test -a) +WALLET1_ADDR=$($BINARY keys show wallet1 --home $CHAIN_DIR/$CHAINID_1 --keyring-backend test -a) +WALLET3_ADDR=$($BINARY keys show wallet3 --home $CHAIN_DIR/$CHAINID_1 --keyring-backend test -a) + + +for i in $(seq 0 $(($TOTAL_TEST_ACC_NUM-1))) +do + $BINARY add-genesis-account "test$i" 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 +done + + +$BINARY keys add "normaltxacc" --home $CHAIN_DIR/$CHAINID_1 --keyring-backend=test +NORMALTXACC_ADDR=$($BINARY keys show normaltxacc --home $CHAIN_DIR/$CHAINID_1 --keyring-backend test -a) +$BINARY add-genesis-account $NORMALTXACC_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 + + +$BINARY add-genesis-account $VAL1_ADDR 1000000000000frt,1000000000000stake --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $WALLET1_ADDR 1000000000000frt --home $CHAIN_DIR/$CHAINID_1 +$BINARY add-genesis-account $WALLET3_ADDR 1000000000000frt --vesting-amount 10000000000stake --vesting-start-time $(date +%s) --vesting-end-time $(($(date '+%s') + 100000023)) --home $CHAIN_DIR/$CHAINID_1 + +echo "Creating and collecting gentx..." +$BINARY gentx val1 10000000000stake --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --keyring-backend test +$BINARY collect-gentxs --home $CHAIN_DIR/$CHAINID_1 &> /dev/null + +echo "Changing defaults and ports in app.toml and config.toml files..." +sed -i -e 's#"tcp://0.0.0.0:26656"#"tcp://0.0.0.0:'"$P2PPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:'"$RPCPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/timeout_commit = "5s"/timeout_commit = "'"$BLOCK_TIME"'s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/timeout_propose = "3s"/timeout_propose = "'"$BLOCK_TIME"'s"/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/index_all_keys = false/index_all_keys = true/g' $CHAIN_DIR/$CHAINID_1/config/config.toml +sed -i -e 's/enable = false/enable = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's/swagger = false/swagger = true/g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's#"tcp://localhost:1317"#"tcp://localhost:'"$RESTPORT_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml +sed -i -e 's#":8080"#":'"$ROSETTA_1"'"#g' $CHAIN_DIR/$CHAINID_1/config/app.toml + +echo "Changing genesis.json..." +sed -i -e 's/"voting_period": "172800s"/"voting_period": "10s"/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json +sed -i -e 's/"reward_delay_time": "604800s"/"reward_delay_time": "0s"/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json + +sed -i -e 's/"trusted_addresses": \[\]/"trusted_addresses": \["'"$VAL1_ADDR"'"\]/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json + +sed -i -e 's/"key_expiry": "100"/"key_expiry": "100000"/g' $CHAIN_DIR/$CHAINID_1/config/genesis.json + +echo "Starting $CHAINID_1 in $CHAIN_DIR..." +echo "Creating log file at $CHAIN_DIR/$CHAINID_1.log" +$BINARY start --log_level trace --log_format json --home $CHAIN_DIR/$CHAINID_1 --pruning=nothing --grpc.address="0.0.0.0:$GRPCPORT_1" --grpc-web.address="0.0.0.0:$GRPCWEB_1" > $CHAIN_DIR/$CHAINID_1.log 2>&1 & + +echo "Waiting chain to run..." +sleep $BLOCK_TIME + diff --git a/scripts/tests/submitNormalTx.sh b/scripts/tests/submitNormalTx.sh new file mode 100755 index 00000000..2b0ca136 --- /dev/null +++ b/scripts/tests/submitNormalTx.sh @@ -0,0 +1,102 @@ +#!/bin/bash + + +BINARY=fairyringd +CHAIN_DIR=$(pwd)/data +CHAINID_1=fairyring_test_1 +CHAIN1_NODE=tcp://localhost:16657 + + +FROM_ADDR=$1 +BLOCK_TIME=$2 +SLEEP_BLOCK_TIME=$(($BLOCK_TIME/2)) +TARGET_BLOCK_TO_SUBMIT=$3 +TX_AMOUNT=$4 +SRC_PIPE=$5 + +WALLET1_ADDR=$($BINARY keys show wallet1 --home $CHAIN_DIR/$CHAINID_1 --keyring-backend test -a) + +check_tx_code () { + local TX_CODE=$(echo "$1" | jq -r '.code') + if [ "$TX_CODE" != 0 ]; then + echo "ERROR: Tx failed with code: $TX_CODE" + exit 1 + fi +} + + +wait_for_tx () { + sleep $BLOCK_TIME + local TXHASH=$(echo "$1" | jq -r '.txhash') + RESULT=$($BINARY q tx --type=hash $TXHASH --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE -o json) + echo "$RESULT" +} + + +# ./submitNormalTx from_address block_time target_block tx_amount + + +ACCOUNT_INFO=$($BINARY query account $FROM_ADDR --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE -o json) +ACCOUNT_NUMBER=$(echo $ACCOUNT_INFO | jq -r '.account_number') +ACCOUNT_SEQ=$(echo $ACCOUNT_INFO | jq -r '.sequence') + +echo "Testing Submit general tx..." + +TARGET_HEIGHT=$(($TARGET_BLOCK_TO_SUBMIT+1)) +echo "Expected Tx to be confirmed in lower or equals to block: $TARGET_HEIGHT" + + +while true +do + if read line <$SRC_PIPE; then + LATEST_BLOCK=$line + echo "Current block: $LATEST_BLOCK, waiting until block: $TARGET_BLOCK_TO_SUBMIT" + if [ "$LATEST_BLOCK" -ge "$TARGET_BLOCK_TO_SUBMIT" ]; then + echo "$LATEST_BLOCK | $TARGET_BLOCK_TO_SUBMIT" + echo "Current block: $LATEST_BLOCK, Start submitting tx..." + break + fi + sleep 0.5 + fi +done + + +SUBMITTED_TX_HASH=() +NEXT_BLOCK_CONFIRMED=0 + +for i in $(seq 1 $TX_AMOUNT) +do + RESULT=$($BINARY tx bank send $FROM_ADDR $WALLET1_ADDR 1frt --from $FROM_ADDR --offline --account-number $ACCOUNT_NUMBER --sequence $ACCOUNT_SEQ --gas 600000 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode async --keyring-backend test -o json -y) + + TX_CODE=$(echo "$RESULT" | jq -r '.code') + TX_HASH=$(echo "$RESULT" | jq -r '.txhash') + # echo "Tx Code: $TX_CODE, Tx Hash: $TX_HASH" + + SUBMITTED_TX_HASH+=("$TX_HASH") + ACCOUNT_SEQ=$(($ACCOUNT_SEQ+1)) +done + + +TX_HASH_LENGTH=${#SUBMITTED_TX_HASH[*]} + +echo "Total Normal Tx Hash: $TX_HASH_LENGTH" + +sleep $(($BLOCK_TIME*3)) + +for EACH_TX_HASH in "${SUBMITTED_TX_HASH[@]}" +do + RESP=$($BINARY q tx --type=hash $EACH_TX_HASH --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE -o json) + CONFIRMED_BLOCK=$(echo $RESP | jq -r '.height') + CONFIRMED_CODE=$(echo $RESP | jq -r '.code') + echo "Tx Hash: $EACH_TX_HASH confirmed at block $CONFIRMED_BLOCK with code: $CONFIRMED_CODE" + + if [ "$CONFIRMED_BLOCK" -le "$TARGET_HEIGHT" ]; then + if [ "$CONFIRMED_CODE" = "0" ]; then + NEXT_BLOCK_CONFIRMED=$(($NEXT_BLOCK_CONFIRMED+1)) + fi + fi + +done + +echo "Total Normal Tx confirmed in next block: " +echo "$NEXT_BLOCK_CONFIRMED" diff --git a/scripts/tests/submitTx.sh b/scripts/tests/submitTx.sh new file mode 100755 index 00000000..374a0d5e --- /dev/null +++ b/scripts/tests/submitTx.sh @@ -0,0 +1,100 @@ +#!/bin/bash + + +GENERATOR=ShareGenerator +BINARY=fairyringd +CHAIN_DIR=$(pwd)/data +CHAINID_1=fairyring_test_1 +CHAIN1_NODE=tcp://localhost:16657 + + +FROM_ADDR=$1 +BLOCK_TIME=$2 +KEYSHARE_HEX=$3 +SLEEP_BLOCK_TIME=$(($BLOCK_TIME/2)) +KEYSHARE_INDEX=$4 +TARGET_BLOCK_TO_SUBMIT=$5 +SRC_PIPE=$6 + +check_tx_code () { + local TX_CODE=$(echo "$1" | jq -r '.code') + if [ "$TX_CODE" != 0 ]; then + echo "ERROR: Tx failed with code: $TX_CODE" + exit 1 + fi +} + + +wait_for_tx () { + sleep $BLOCK_TIME + local TXHASH=$(echo "$1" | jq -r '.txhash') + RESULT=$($BINARY q tx --type=hash $TXHASH --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE -o json) + echo "$RESULT" +} + + +# ./submitTx from_address block_time keyshare_hex keyshare_index target_block + + +ACCOUNT_INFO=$($BINARY query account $FROM_ADDR --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE -o json) +ACCOUNT_NUMBER=$(echo $ACCOUNT_INFO | jq -r '.account_number') +ACCOUNT_SEQ=$(echo $ACCOUNT_INFO | jq -r '.sequence') + +echo "Testing Submit keyshare tx limit" + +TARGET_HEIGHT=$(($TARGET_BLOCK_TO_SUBMIT+1)) +echo "Expected Tx to be confirmed in lower or equals to block: $TARGET_HEIGHT" + +EXTRACTED_RESULT=$($GENERATOR derive $KEYSHARE_HEX $KEYSHARE_INDEX $TARGET_HEIGHT) +EXTRACTED_SHARE=$(echo "$EXTRACTED_RESULT" | jq -r '.KeyShare') +EXTRACTED_COMMITMENT=$(echo "$EXTRACTED_RESULT" | jq -r '.Commitment') + + +while true +do + if read line <$SRC_PIPE; then + LATEST_BLOCK=$line + echo "Current block: $LATEST_BLOCK, waiting until block: $TARGET_BLOCK_TO_SUBMIT" + if [ "$LATEST_BLOCK" -ge "$TARGET_BLOCK_TO_SUBMIT" ]; then + echo "$LATEST_BLOCK | $TARGET_BLOCK_TO_SUBMIT" + echo "Current block: $LATEST_BLOCK, Start submitting tx..." + break + fi + sleep 0.5 + fi +done + + +RESULT=$($BINARY tx keyshare send-keyshare $EXTRACTED_SHARE $EXTRACTED_COMMITMENT $KEYSHARE_INDEX $TARGET_HEIGHT --from $FROM_ADDR --offline --account-number $ACCOUNT_NUMBER --sequence $ACCOUNT_SEQ --gas 600000 --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE --broadcast-mode async --keyring-backend test -o json -y) + +SUBMITTED_TX_HASH=() +NEXT_BLOCK_CONFIRMED=0 + +TX_CODE=$(echo "$RESULT" | jq -r '.code') +TX_HASH=$(echo "$RESULT" | jq -r '.txhash') +echo "Tx Code: $TX_CODE, Tx Hash: $TX_HASH" +SUBMITTED_TX_HASH+=("$TX_HASH") + +TX_HASH_LENGTH=${#SUBMITTED_TX_HASH[*]} + +echo "Total Tx Hash: $TX_HASH_LENGTH" + +sleep $(($BLOCK_TIME*3)) + +for EACH_TX_HASH in "${SUBMITTED_TX_HASH[@]}" +do + RESP=$($BINARY q tx --type=hash $EACH_TX_HASH --home $CHAIN_DIR/$CHAINID_1 --chain-id $CHAINID_1 --node $CHAIN1_NODE -o json) + CONFIRMED_BLOCK=$(echo $RESP | jq -r '.height') + CONFIRMED_CODE=$(echo $RESP | jq -r '.code') + echo "Tx Hash: $EACH_TX_HASH confirmed at block $CONFIRMED_BLOCK with code: $CONFIRMED_CODE" + + if [ "$CONFIRMED_BLOCK" -le "$TARGET_HEIGHT" ]; then + if [ "$CONFIRMED_CODE" = "0" ]; then + NEXT_BLOCK_CONFIRMED=$(($NEXT_BLOCK_CONFIRMED+1)) + fi + fi + +done + +echo "Total Tx confirmed in next block: " +echo "$NEXT_BLOCK_CONFIRMED" diff --git a/testutil/keeper/keyshare.go b/testutil/keeper/keyshare.go index 77261ccf..f73ac259 100644 --- a/testutil/keeper/keyshare.go +++ b/testutil/keeper/keyshare.go @@ -1,15 +1,20 @@ package keeper import ( + "testing" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - "testing" "fairyring/x/keyshare/keeper" "fairyring/x/keyshare/types" + 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/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store" @@ -17,16 +22,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" typesparams "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmdb "github.com/tendermint/tm-db" ) func KeyshareKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { storeKey := sdk.NewKVStoreKey(types.StoreKey) memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) - db := tmdb.NewMemDB() + db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(memStoreKey, storetypes.StoreTypeMemory, nil) @@ -45,28 +47,18 @@ func KeyshareKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { accountKeeper := authkeeper.NewAccountKeeper( cdc, sdk.NewKVStoreKey("acc"), - typesparams.NewSubspace(cdc, - types.Amino, - storeKey, - memStoreKey, - "acc", - ), authtypes.ProtoBaseAccount, map[string][]string{}, sdk.Bech32PrefixAccAddr, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) bankKeeper := bankkeeper.NewBaseKeeper( cdc, sdk.NewKVStoreKey("bank"), accountKeeper, - typesparams.NewSubspace(cdc, - types.Amino, - storeKey, - memStoreKey, - "bank", - ), map[string]bool{}, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) stakingKeeper := stakingkeeper.NewKeeper( @@ -74,12 +66,7 @@ func KeyshareKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { sdk.NewKVStoreKey("staking"), accountKeeper, bankKeeper, - typesparams.NewSubspace(cdc, - types.Amino, - storeKey, - memStoreKey, - "staking", - ), + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) pepKeeper, _ := PepKeeper(t) diff --git a/testutil/keeper/pep.go b/testutil/keeper/pep.go index 7b8e11d9..db68b71c 100644 --- a/testutil/keeper/pep.go +++ b/testutil/keeper/pep.go @@ -1,12 +1,20 @@ package keeper import ( + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "testing" "fairyring/x/pep/keeper" "fairyring/x/pep/types" + 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/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/store" @@ -14,12 +22,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" typesparams "github.com/cosmos/cosmos-sdk/x/params/types" - channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" - ibcexported "github.com/cosmos/ibc-go/v5/modules/core/exported" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + connTypes "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/stretchr/testify/require" - "github.com/tendermint/tendermint/libs/log" - tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - tmdb "github.com/tendermint/tm-db" ) // pepChannelKeeper is a stub of cosmosibckeeper.ChannelKeeper. @@ -31,9 +37,19 @@ func (pepChannelKeeper) GetChannel(ctx sdk.Context, srcPort, srcChan string) (ch func (pepChannelKeeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) { return 0, false } -func (pepChannelKeeper) SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error { - return nil + +func (pepChannelKeeper) SendPacket( + ctx sdk.Context, + channelCap *capabilitytypes.Capability, + sourcePort string, + sourceChannel string, + timeoutHeight clienttypes.Height, + timeoutTimestamp uint64, + data []byte, +) (uint64, error) { + return 0, nil } + func (pepChannelKeeper) ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error { return nil } @@ -45,13 +61,19 @@ func (pepPortKeeper) BindPort(ctx sdk.Context, portID string) *capabilitytypes.C return &capabilitytypes.Capability{} } +type pepconnectionKeeper struct{} + +func (pepconnectionKeeper) GetConnection(ctx sdk.Context, connectionID string) (connTypes.ConnectionEnd, bool) { + return connTypes.ConnectionEnd{}, true +} + func PepKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { logger := log.NewNopLogger() storeKey := sdk.NewKVStoreKey(types.StoreKey) memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey) - db := tmdb.NewMemDB() + db := dbm.NewMemDB() stateStore := store.NewCommitMultiStore(db) stateStore.MountStoreWithDB(storeKey, storetypes.StoreTypeIAVL, db) stateStore.MountStoreWithDB(memStoreKey, storetypes.StoreTypeMemory, nil) @@ -67,6 +89,24 @@ func PepKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { memStoreKey, "PepParams", ) + + accountKeeper := authkeeper.NewAccountKeeper( + appCodec, + sdk.NewKVStoreKey("acc"), + authtypes.ProtoBaseAccount, + map[string][]string{}, + sdk.Bech32PrefixAccAddr, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + + bankKeeper := bankkeeper.NewBaseKeeper( + appCodec, + sdk.NewKVStoreKey("bank"), + accountKeeper, + map[string]bool{}, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + ) + k := keeper.NewKeeper( appCodec, storeKey, @@ -75,6 +115,8 @@ func PepKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { pepChannelKeeper{}, pepPortKeeper{}, capabilityKeeper.ScopeToModule("pepScopedKeeper"), + pepconnectionKeeper{}, + bankKeeper, ) ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, logger) diff --git a/testutil/mocks.go b/testutil/mocks.go new file mode 100644 index 00000000..55991cb2 --- /dev/null +++ b/testutil/mocks.go @@ -0,0 +1,144 @@ +package testutil + +import ( + "reflect" + + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/golang/mock/gomock" +) + +type MockAccountKeeper struct { + ctrl *gomock.Controller + recorder *MockAccountKeeperMockRecorder +} + +type MockAccountKeeperMockRecorder struct { + mock *MockAccountKeeper +} + +func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { + mock := &MockAccountKeeper{ctrl: ctrl} + mock.recorder = &MockAccountKeeperMockRecorder{mock} + return mock +} + +func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { + return m.recorder +} + +func (m *MockAccountKeeper) GetModuleAddress(name string) sdk.AccAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddress", name) + ret0, _ := ret[0].(sdk.AccAddress) + return ret0 +} + +func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) +} + +type MockBankKeeper struct { + ctrl *gomock.Controller + recorder *MockBankKeeperMockRecorder +} + +type MockBankKeeperMockRecorder struct { + mock *MockBankKeeper +} + +func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { + mock := &MockBankKeeper{ctrl: ctrl} + mock.recorder = &MockBankKeeperMockRecorder{mock} + return mock +} + +func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { + return m.recorder +} + +func (m *MockBankKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom) + ret0 := ret[0].(sdk.Coin) + return ret0 +} + +func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom) +} + +func (m *MockBankKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SendCoins", ctx, fromAddr, toAddr, amt) + return nil +} + +func (mr *MockBankKeeperMockRecorder) SendCoins(ctx, fromAddr, toAddr, amt interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCoins", reflect.TypeOf((*MockBankKeeper)(nil).SendCoins), ctx, fromAddr, toAddr, amt) +} + +type MockDistributionKeeperRecorder struct { + mock *MockDistributionKeeper +} + +type MockDistributionKeeper struct { + ctrl *gomock.Controller + recorder *MockDistributionKeeperRecorder +} + +func NewMockDistributionKeeper(ctrl *gomock.Controller) *MockDistributionKeeper { + mock := &MockDistributionKeeper{ctrl: ctrl} + mock.recorder = &MockDistributionKeeperRecorder{mock} + return mock +} + +func (m *MockDistributionKeeper) EXPECT() *MockDistributionKeeperRecorder { + return m.recorder +} + +func (m *MockDistributionKeeper) GetPreviousProposerConsAddr(ctx sdk.Context) sdk.ConsAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetPreviousProposerConsAddr", ctx) + ret0 := ret[0].(sdk.ConsAddress) + return ret0 +} + +func (mr *MockDistributionKeeperRecorder) GetPreviousProposerConsAddr(ctx any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPreviousProposerConsAddr", reflect.TypeOf((*MockDistributionKeeper)(nil).GetPreviousProposerConsAddr), ctx) +} + +type MockStakingKeeperRecorder struct { + mock *MockStakingKeeper +} + +type MockStakingKeeper struct { + ctrl *gomock.Controller + recorder *MockStakingKeeperRecorder +} + +func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper { + mock := &MockStakingKeeper{ctrl: ctrl} + mock.recorder = &MockStakingKeeperRecorder{mock} + return mock +} + +func (m *MockStakingKeeper) EXPECT() *MockStakingKeeperRecorder { + return m.recorder +} + +func (m *MockStakingKeeper) ValidatorByConsAddr(ctx sdk.Context, consAddr sdk.ConsAddress) stakingtypes.ValidatorI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ValidatorByConsAddr", ctx, consAddr) + ret0 := ret[0].(stakingtypes.ValidatorI) + return ret0 +} + +func (mr *MockStakingKeeperRecorder) ValidatorByConsAddr(ctx, consAddr any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidatorByConsAddr", reflect.TypeOf((*MockStakingKeeper)(nil).ValidatorByConsAddr), ctx, consAddr) +} diff --git a/testutil/network/network.go b/testutil/network/network.go index cc8f8388..94238896 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -7,18 +7,19 @@ import ( "fairyring/app" + tmdb "github.com/cometbft/cometbft-db" + tmrand "github.com/cometbft/cometbft/libs/rand" + "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" - pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" - "github.com/cosmos/cosmos-sdk/simapp" + pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" "github.com/cosmos/cosmos-sdk/testutil/network" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" - tmrand "github.com/tendermint/tendermint/libs/rand" - tmdb "github.com/tendermint/tm-db" ) type ( @@ -47,20 +48,30 @@ func New(t *testing.T, configs ...network.Config) *network.Network { // DefaultConfig will initialize config for the network with custom application, // genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig func DefaultConfig() network.Config { - encoding := app.MakeEncodingConfig() + var ( + encoding = app.MakeEncodingConfig() + chainID = "chain-" + tmrand.NewRand().Str(6) + ) return network.Config{ Codec: encoding.Marshaler, TxConfig: encoding.TxConfig, LegacyAmino: encoding.Amino, InterfaceRegistry: encoding.InterfaceRegistry, AccountRetriever: authtypes.AccountRetriever{}, - AppConstructor: func(val network.Validator) servertypes.Application { + AppConstructor: func(val network.ValidatorI) servertypes.Application { return app.New( - val.Ctx.Logger, tmdb.NewMemDB(), nil, true, map[int64]bool{}, val.Ctx.Config.RootDir, 0, + val.GetCtx().Logger, + tmdb.NewMemDB(), + nil, + true, + map[int64]bool{}, + val.GetCtx().Config.RootDir, + 0, encoding, - simapp.EmptyAppOptions{}, - baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.AppConfig.Pruning)), - baseapp.SetMinGasPrices(val.AppConfig.MinGasPrices), + simtestutil.EmptyAppOptions{}, + baseapp.SetPruning(pruningtypes.NewPruningOptionsFromString(val.GetAppConfig().Pruning)), + baseapp.SetMinGasPrices(val.GetAppConfig().MinGasPrices), + baseapp.SetChainID(chainID), ) }, GenesisState: app.ModuleBasics.DefaultGenesis(encoding.Marshaler), diff --git a/testutil/utils.go b/testutil/utils.go new file mode 100644 index 00000000..ca49061b --- /dev/null +++ b/testutil/utils.go @@ -0,0 +1,282 @@ +package testutil + +// import ( +// "math/rand" + +// peptypes "fairyring/x/pep/types" + +// "github.com/cosmos/cosmos-sdk/client" +// "github.com/cosmos/cosmos-sdk/codec" +// "github.com/cosmos/cosmos-sdk/codec/types" +// cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" +// "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" +// "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" +// cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +// sdk "github.com/cosmos/cosmos-sdk/types" +// "github.com/cosmos/cosmos-sdk/types/tx/signing" +// authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" +// "github.com/cosmos/cosmos-sdk/x/auth/tx" +// banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" +// stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" +// ) + +// type EncodingConfig struct { +// InterfaceRegistry types.InterfaceRegistry +// Codec codec.Codec +// TxConfig client.TxConfig +// Amino *codec.LegacyAmino +// } + +// func CreateTestEncodingConfig() EncodingConfig { +// cdc := codec.NewLegacyAmino() +// interfaceRegistry := types.NewInterfaceRegistry() + +// banktypes.RegisterInterfaces(interfaceRegistry) +// cryptocodec.RegisterInterfaces(interfaceRegistry) +// peptypes.RegisterInterfaces(interfaceRegistry) +// stakingtypes.RegisterInterfaces(interfaceRegistry) + +// codec := codec.NewProtoCodec(interfaceRegistry) + +// return EncodingConfig{ +// InterfaceRegistry: interfaceRegistry, +// Codec: codec, +// TxConfig: tx.NewTxConfig(codec, tx.DefaultSignModes), +// Amino: cdc, +// } +// } + +// type Account struct { +// PrivKey cryptotypes.PrivKey +// PubKey cryptotypes.PubKey +// Address sdk.AccAddress +// ConsKey cryptotypes.PrivKey +// } + +// func (acc Account) Equals(acc2 Account) bool { +// return acc.Address.Equals(acc2.Address) +// } + +// func RandomAccounts(r *rand.Rand, n int) []Account { +// accs := make([]Account, n) + +// for i := 0; i < n; i++ { +// pkSeed := make([]byte, 15) +// r.Read(pkSeed) + +// accs[i].PrivKey = secp256k1.GenPrivKeyFromSecret(pkSeed) +// accs[i].PubKey = accs[i].PrivKey.PubKey() +// accs[i].Address = sdk.AccAddress(accs[i].PubKey.Address()) + +// accs[i].ConsKey = ed25519.GenPrivKeyFromSecret(pkSeed) +// } + +// return accs +// } + +// func CreateTx(txCfg client.TxConfig, account Account, nonce, timeout uint64, msgs []sdk.Msg) (authsigning.Tx, error) { +// txBuilder := txCfg.NewTxBuilder() +// if err := txBuilder.SetMsgs(msgs...); err != nil { +// return nil, err +// } + +// sigV2 := signing.SignatureV2{ +// PubKey: account.PrivKey.PubKey(), +// Data: &signing.SingleSignatureData{ +// SignMode: txCfg.SignModeHandler().DefaultMode(), +// Signature: nil, +// }, +// Sequence: nonce, +// } +// if err := txBuilder.SetSignatures(sigV2); err != nil { +// return nil, err +// } + +// txBuilder.SetTimeoutHeight(timeout) + +// return txBuilder.GetTx(), nil +// } + +// func CreateRandomTx(txCfg client.TxConfig, account Account, nonce, numberMsgs, timeout uint64) (authsigning.Tx, error) { +// msgs := make([]sdk.Msg, numberMsgs) +// for i := 0; i < int(numberMsgs); i++ { +// msgs[i] = &banktypes.MsgSend{ +// FromAddress: account.Address.String(), +// ToAddress: account.Address.String(), +// } +// } + +// txBuilder := txCfg.NewTxBuilder() +// if err := txBuilder.SetMsgs(msgs...); err != nil { +// return nil, err +// } + +// sigV2 := signing.SignatureV2{ +// PubKey: account.PrivKey.PubKey(), +// Data: &signing.SingleSignatureData{ +// SignMode: txCfg.SignModeHandler().DefaultMode(), +// Signature: nil, +// }, +// Sequence: nonce, +// } +// if err := txBuilder.SetSignatures(sigV2); err != nil { +// return nil, err +// } + +// txBuilder.SetTimeoutHeight(timeout) + +// return txBuilder.GetTx(), nil +// } + +// func CreateRandomTxBz(txCfg client.TxConfig, account Account, nonce, numberMsgs, timeout uint64) ([]byte, error) { +// tx, err := CreateRandomTx(txCfg, account, nonce, numberMsgs, timeout) +// if err != nil { +// return nil, err +// } + +// return txCfg.TxEncoder()(tx) +// } + +// func CreateTxWithSigners(txCfg client.TxConfig, nonce, timeout uint64, signers []Account) (authsigning.Tx, error) { +// msgs := []sdk.Msg{} +// for _, signer := range signers { +// msg := CreateRandomMsgs(signer.Address, 1) +// msgs = append(msgs, msg...) +// } + +// txBuilder := txCfg.NewTxBuilder() +// if err := txBuilder.SetMsgs(msgs...); err != nil { +// return nil, err +// } + +// sigV2 := signing.SignatureV2{ +// PubKey: signers[0].PrivKey.PubKey(), +// Data: &signing.SingleSignatureData{ +// SignMode: txCfg.SignModeHandler().DefaultMode(), +// Signature: nil, +// }, +// Sequence: nonce, +// } + +// if err := txBuilder.SetSignatures(sigV2); err != nil { +// return nil, err +// } + +// txBuilder.SetTimeoutHeight(timeout) + +// return txBuilder.GetTx(), nil +// } + +// func CreateKeyshareTx(txCfg client.TxConfig, creator Account, height uint64, data string) (authsigning.Tx, error) { +// bidMsg := &peptypes.MsgCreateAggregatedKeyShare{ +// Creator: creator.Address.String(), +// Height: height, +// Data: data, +// } + +// for i := 0; i < len(signers); i++ { +// randomMsg := CreateRandomMsgs(signers[i].Address, 1) +// randomTx, err := CreateTx(txCfg, signers[i], 0, timeout, randomMsg) +// if err != nil { +// return nil, err +// } + +// bz, err := txCfg.TxEncoder()(randomTx) +// if err != nil { +// return nil, err +// } + +// bidMsg.Transactions[i] = bz +// } + +// txBuilder := txCfg.NewTxBuilder() +// if err := txBuilder.SetMsgs(bidMsg); err != nil { +// return nil, err +// } + +// sigV2 := signing.SignatureV2{ +// PubKey: bidder.PrivKey.PubKey(), +// Data: &signing.SingleSignatureData{ +// SignMode: txCfg.SignModeHandler().DefaultMode(), +// Signature: nil, +// }, +// Sequence: nonce, +// } +// if err := txBuilder.SetSignatures(sigV2); err != nil { +// return nil, err +// } + +// txBuilder.SetTimeoutHeight(timeout) + +// return txBuilder.GetTx(), nil +// } + +// func CreateAuctionTxWithSignerBz(txCfg client.TxConfig, bidder Account, bid sdk.Coin, nonce, timeout uint64, signers []Account) ([]byte, error) { +// bidTx, err := CreateAuctionTxWithSigners(txCfg, bidder, bid, nonce, timeout, signers) +// if err != nil { +// return nil, err +// } + +// bz, err := txCfg.TxEncoder()(bidTx) +// if err != nil { +// return nil, err +// } + +// return bz, nil +// } + +// func CreateRandomMsgs(acc sdk.AccAddress, numberMsgs int) []sdk.Msg { +// msgs := make([]sdk.Msg, numberMsgs) +// for i := 0; i < numberMsgs; i++ { +// msgs[i] = &banktypes.MsgSend{ +// FromAddress: acc.String(), +// ToAddress: acc.String(), +// } +// } + +// return msgs +// } + +// func CreateMsgAggregateKeyshare(txCfg client.TxConfig, bidder Account, bid sdk.Coin, nonce uint64, numberMsgs int) (*peptypes.MsgCreateAggregatedKeyShare, error) { +// bidMsg := &peptypes.MsgCreateAggregatedKeyShare{ +// Bidder: bidder.Address.String(), +// Bid: bid, +// Transactions: make([][]byte, numberMsgs), +// } + +// for i := 0; i < numberMsgs; i++ { +// txBuilder := txCfg.NewTxBuilder() + +// msgs := []sdk.Msg{ +// &banktypes.MsgSend{ +// FromAddress: bidder.Address.String(), +// ToAddress: bidder.Address.String(), +// }, +// } +// if err := txBuilder.SetMsgs(msgs...); err != nil { +// return nil, err +// } + +// sigV2 := signing.SignatureV2{ +// PubKey: bidder.PrivKey.PubKey(), +// Data: &signing.SingleSignatureData{ +// SignMode: txCfg.SignModeHandler().DefaultMode(), +// Signature: nil, +// }, +// Sequence: nonce + uint64(i), +// } +// if err := txBuilder.SetSignatures(sigV2); err != nil { +// return nil, err +// } + +// bz, err := txCfg.TxEncoder()(txBuilder.GetTx()) +// if err != nil { +// return nil, err +// } + +// bidMsg.Transactions[i] = bz +// } + +// return bidMsg, nil +// } +// diff --git a/tools/tools.go b/tools/tools.go new file mode 100644 index 00000000..6e7a12d4 --- /dev/null +++ b/tools/tools.go @@ -0,0 +1,11 @@ +//go:build tools + +package tools + +import ( + _ "github.com/cosmos/gogoproto/protoc-gen-gocosmos" + _ "github.com/golang/protobuf/protoc-gen-go" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" + _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" +) diff --git a/ts-client/fairyring.keyshare/module.ts b/ts-client/fairyring.keyshare/module.ts index 9460d4fe..37228b7f 100755 --- a/ts-client/fairyring.keyshare/module.ts +++ b/ts-client/fairyring.keyshare/module.ts @@ -7,16 +7,29 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; +import { MsgCreateLatestPubKey } from "./types/fairyring/keyshare/tx"; import { MsgSendKeyshare } from "./types/fairyring/keyshare/tx"; import { MsgRegisterValidator } from "./types/fairyring/keyshare/tx"; -import { MsgCreateLatestPubKey } from "./types/fairyring/keyshare/tx"; +import { MsgDeleteAuthorizedAddress } from "./types/fairyring/keyshare/tx"; +import { MsgCreateAuthorizedAddress } from "./types/fairyring/keyshare/tx"; +import { MsgUpdateAuthorizedAddress } from "./types/fairyring/keyshare/tx"; import { AggregatedKeyShare as typeAggregatedKeyShare} from "./types" +import { AuthorizedAddress as typeAuthorizedAddress} from "./types" +import { Commitments as typeCommitments} from "./types" import { KeyShare as typeKeyShare} from "./types" import { Params as typeParams} from "./types" +import { ActivePubKey as typeActivePubKey} from "./types" +import { QueuedPubKey as typeQueuedPubKey} from "./types" import { ValidatorSet as typeValidatorSet} from "./types" -export { MsgSendKeyshare, MsgRegisterValidator, MsgCreateLatestPubKey }; +export { MsgCreateLatestPubKey, MsgSendKeyshare, MsgRegisterValidator, MsgDeleteAuthorizedAddress, MsgCreateAuthorizedAddress, MsgUpdateAuthorizedAddress }; + +type sendMsgCreateLatestPubKeyParams = { + value: MsgCreateLatestPubKey, + fee?: StdFee, + memo?: string +}; type sendMsgSendKeyshareParams = { value: MsgSendKeyshare, @@ -30,12 +43,28 @@ type sendMsgRegisterValidatorParams = { memo?: string }; -type sendMsgCreateLatestPubKeyParams = { - value: MsgCreateLatestPubKey, +type sendMsgDeleteAuthorizedAddressParams = { + value: MsgDeleteAuthorizedAddress, + fee?: StdFee, + memo?: string +}; + +type sendMsgCreateAuthorizedAddressParams = { + value: MsgCreateAuthorizedAddress, fee?: StdFee, memo?: string }; +type sendMsgUpdateAuthorizedAddressParams = { + value: MsgUpdateAuthorizedAddress, + fee?: StdFee, + memo?: string +}; + + +type msgCreateLatestPubKeyParams = { + value: MsgCreateLatestPubKey, +}; type msgSendKeyshareParams = { value: MsgSendKeyshare, @@ -45,8 +74,16 @@ type msgRegisterValidatorParams = { value: MsgRegisterValidator, }; -type msgCreateLatestPubKeyParams = { - value: MsgCreateLatestPubKey, +type msgDeleteAuthorizedAddressParams = { + value: MsgDeleteAuthorizedAddress, +}; + +type msgCreateAuthorizedAddressParams = { + value: MsgCreateAuthorizedAddress, +}; + +type msgUpdateAuthorizedAddressParams = { + value: MsgUpdateAuthorizedAddress, }; @@ -79,6 +116,20 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { + async sendMsgCreateLatestPubKey({ value, fee, memo }: sendMsgCreateLatestPubKeyParams): Promise { + if (!signer) { + throw new Error('TxClient:sendMsgCreateLatestPubKey: Unable to sign Tx. Signer is not present.') + } + try { + const { address } = (await signer.getAccounts())[0]; + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + let msg = this.msgCreateLatestPubKey({ value: MsgCreateLatestPubKey.fromPartial(value) }) + return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) + } catch (e: any) { + throw new Error('TxClient:sendMsgCreateLatestPubKey: Could not broadcast Tx: '+ e.message) + } + }, + async sendMsgSendKeyshare({ value, fee, memo }: sendMsgSendKeyshareParams): Promise { if (!signer) { throw new Error('TxClient:sendMsgSendKeyshare: Unable to sign Tx. Signer is not present.') @@ -107,21 +158,57 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - async sendMsgCreateLatestPubKey({ value, fee, memo }: sendMsgCreateLatestPubKeyParams): Promise { + async sendMsgDeleteAuthorizedAddress({ value, fee, memo }: sendMsgDeleteAuthorizedAddressParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateLatestPubKey: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgDeleteAuthorizedAddress: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateLatestPubKey({ value: MsgCreateLatestPubKey.fromPartial(value) }) + let msg = this.msgDeleteAuthorizedAddress({ value: MsgDeleteAuthorizedAddress.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateLatestPubKey: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgDeleteAuthorizedAddress: Could not broadcast Tx: '+ e.message) + } + }, + + async sendMsgCreateAuthorizedAddress({ value, fee, memo }: sendMsgCreateAuthorizedAddressParams): Promise { + if (!signer) { + throw new Error('TxClient:sendMsgCreateAuthorizedAddress: Unable to sign Tx. Signer is not present.') + } + try { + const { address } = (await signer.getAccounts())[0]; + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + let msg = this.msgCreateAuthorizedAddress({ value: MsgCreateAuthorizedAddress.fromPartial(value) }) + return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) + } catch (e: any) { + throw new Error('TxClient:sendMsgCreateAuthorizedAddress: Could not broadcast Tx: '+ e.message) + } + }, + + async sendMsgUpdateAuthorizedAddress({ value, fee, memo }: sendMsgUpdateAuthorizedAddressParams): Promise { + if (!signer) { + throw new Error('TxClient:sendMsgUpdateAuthorizedAddress: Unable to sign Tx. Signer is not present.') + } + try { + const { address } = (await signer.getAccounts())[0]; + const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); + let msg = this.msgUpdateAuthorizedAddress({ value: MsgUpdateAuthorizedAddress.fromPartial(value) }) + return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) + } catch (e: any) { + throw new Error('TxClient:sendMsgUpdateAuthorizedAddress: Could not broadcast Tx: '+ e.message) } }, + msgCreateLatestPubKey({ value }: msgCreateLatestPubKeyParams): EncodeObject { + try { + return { typeUrl: "/fairyring.keyshare.MsgCreateLatestPubKey", value: MsgCreateLatestPubKey.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgCreateLatestPubKey: Could not create message: ' + e.message) + } + }, + msgSendKeyshare({ value }: msgSendKeyshareParams): EncodeObject { try { return { typeUrl: "/fairyring.keyshare.MsgSendKeyshare", value: MsgSendKeyshare.fromPartial( value ) } @@ -138,11 +225,27 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht } }, - msgCreateLatestPubKey({ value }: msgCreateLatestPubKeyParams): EncodeObject { + msgDeleteAuthorizedAddress({ value }: msgDeleteAuthorizedAddressParams): EncodeObject { try { - return { typeUrl: "/fairyring.keyshare.MsgCreateLatestPubKey", value: MsgCreateLatestPubKey.fromPartial( value ) } + return { typeUrl: "/fairyring.keyshare.MsgDeleteAuthorizedAddress", value: MsgDeleteAuthorizedAddress.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateLatestPubKey: Could not create message: ' + e.message) + throw new Error('TxClient:MsgDeleteAuthorizedAddress: Could not create message: ' + e.message) + } + }, + + msgCreateAuthorizedAddress({ value }: msgCreateAuthorizedAddressParams): EncodeObject { + try { + return { typeUrl: "/fairyring.keyshare.MsgCreateAuthorizedAddress", value: MsgCreateAuthorizedAddress.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgCreateAuthorizedAddress: Could not create message: ' + e.message) + } + }, + + msgUpdateAuthorizedAddress({ value }: msgUpdateAuthorizedAddressParams): EncodeObject { + try { + return { typeUrl: "/fairyring.keyshare.MsgUpdateAuthorizedAddress", value: MsgUpdateAuthorizedAddress.fromPartial( value ) } + } catch (e: any) { + throw new Error('TxClient:MsgUpdateAuthorizedAddress: Could not create message: ' + e.message) } }, @@ -169,8 +272,12 @@ class SDKModule { this.updateTX(client); this.structure = { AggregatedKeyShare: getStructure(typeAggregatedKeyShare.fromPartial({})), + AuthorizedAddress: getStructure(typeAuthorizedAddress.fromPartial({})), + Commitments: getStructure(typeCommitments.fromPartial({})), KeyShare: getStructure(typeKeyShare.fromPartial({})), Params: getStructure(typeParams.fromPartial({})), + ActivePubKey: getStructure(typeActivePubKey.fromPartial({})), + QueuedPubKey: getStructure(typeQueuedPubKey.fromPartial({})), ValidatorSet: getStructure(typeValidatorSet.fromPartial({})), }; diff --git a/ts-client/fairyring.keyshare/registry.ts b/ts-client/fairyring.keyshare/registry.ts index c6288a4c..224149b1 100755 --- a/ts-client/fairyring.keyshare/registry.ts +++ b/ts-client/fairyring.keyshare/registry.ts @@ -1,12 +1,18 @@ import { GeneratedType } from "@cosmjs/proto-signing"; +import { MsgCreateLatestPubKey } from "./types/fairyring/keyshare/tx"; import { MsgSendKeyshare } from "./types/fairyring/keyshare/tx"; import { MsgRegisterValidator } from "./types/fairyring/keyshare/tx"; -import { MsgCreateLatestPubKey } from "./types/fairyring/keyshare/tx"; +import { MsgDeleteAuthorizedAddress } from "./types/fairyring/keyshare/tx"; +import { MsgCreateAuthorizedAddress } from "./types/fairyring/keyshare/tx"; +import { MsgUpdateAuthorizedAddress } from "./types/fairyring/keyshare/tx"; const msgTypes: Array<[string, GeneratedType]> = [ + ["/fairyring.keyshare.MsgCreateLatestPubKey", MsgCreateLatestPubKey], ["/fairyring.keyshare.MsgSendKeyshare", MsgSendKeyshare], ["/fairyring.keyshare.MsgRegisterValidator", MsgRegisterValidator], - ["/fairyring.keyshare.MsgCreateLatestPubKey", MsgCreateLatestPubKey], + ["/fairyring.keyshare.MsgDeleteAuthorizedAddress", MsgDeleteAuthorizedAddress], + ["/fairyring.keyshare.MsgCreateAuthorizedAddress", MsgCreateAuthorizedAddress], + ["/fairyring.keyshare.MsgUpdateAuthorizedAddress", MsgUpdateAuthorizedAddress], ]; diff --git a/ts-client/fairyring.keyshare/rest.ts b/ts-client/fairyring.keyshare/rest.ts index b6a12229..1a5634ae 100644 --- a/ts-client/fairyring.keyshare/rest.ts +++ b/ts-client/fairyring.keyshare/rest.ts @@ -9,18 +9,31 @@ * --------------------------------------------------------------- */ +export interface KeyshareActivePubKey { + publicKey?: string; + creator?: string; + + /** @format uint64 */ + expiry?: string; +} + export interface KeyshareAggregatedKeyShare { /** @format uint64 */ height?: string; data?: string; } +export interface KeyshareAuthorizedAddress { + target?: string; + isAuthorized?: boolean; + authorizedBy?: string; +} + export interface KeyshareKeyShare { validator?: string; /** @format uint64 */ blockHeight?: string; - commitment?: string; keyShare?: string; /** @format uint64 */ @@ -33,8 +46,12 @@ export interface KeyshareKeyShare { receivedBlockHeight?: string; } +export type KeyshareMsgCreateAuthorizedAddressResponse = object; + export type KeyshareMsgCreateLatestPubKeyResponse = object; +export type KeyshareMsgDeleteAuthorizedAddressResponse = object; + export interface KeyshareMsgRegisterValidatorResponse { creator?: string; } @@ -42,7 +59,6 @@ export interface KeyshareMsgRegisterValidatorResponse { export interface KeyshareMsgSendKeyshareResponse { creator?: string; keyshare?: string; - commitment?: string; /** @format uint64 */ keyshareIndex?: string; @@ -52,15 +68,31 @@ export interface KeyshareMsgSendKeyshareResponse { /** @format uint64 */ receivedBlockHeight?: string; + success?: boolean; + errorMessage?: string; } +export type KeyshareMsgUpdateAuthorizedAddressResponse = object; + /** * Params defines the parameters for the module. */ export interface KeyshareParams { /** @format uint64 */ - keyExpiry?: string; + key_expiry?: string; trusted_addresses?: string[]; + + /** @format byte */ + slash_fraction_no_keyshare?: string; + + /** @format byte */ + slash_fraction_wrong_keyshare?: string; + + /** @format uint64 */ + minimum_bonded?: string; + + /** @format uint64 */ + max_idled_block?: string; } export interface KeyshareQueryAllAggregatedKeyShareResponse { @@ -78,6 +110,21 @@ export interface KeyshareQueryAllAggregatedKeyShareResponse { pagination?: V1Beta1PageResponse; } +export interface KeyshareQueryAllAuthorizedAddressResponse { + authorizedAddress?: KeyshareAuthorizedAddress[]; + + /** + * PageResponse is to be embedded in gRPC response messages where the + * corresponding request message has used PageRequest. + * + * message SomeResponse { + * repeated Bar results = 1; + * PageResponse page = 2; + * } + */ + pagination?: V1Beta1PageResponse; +} + export interface KeyshareQueryAllKeyShareResponse { keyShare?: KeyshareKeyShare[]; @@ -112,6 +159,10 @@ export interface KeyshareQueryGetAggregatedKeyShareResponse { aggregatedKeyShare?: KeyshareAggregatedKeyShare; } +export interface KeyshareQueryGetAuthorizedAddressResponse { + authorizedAddress?: KeyshareAuthorizedAddress; +} + export interface KeyshareQueryGetKeyShareResponse { keyShare?: KeyshareKeyShare; } @@ -128,6 +179,19 @@ export interface KeyshareQueryParamsResponse { params?: KeyshareParams; } +export interface KeyshareQueryPubKeyResponse { + activePubKey?: KeyshareActivePubKey; + queuedPubKey?: KeyshareQueuedPubKey; +} + +export interface KeyshareQueuedPubKey { + publicKey?: string; + creator?: string; + + /** @format uint64 */ + expiry?: string; +} + export interface KeyshareValidatorSet { index?: string; validator?: string; @@ -384,6 +448,47 @@ export class Api extends HttpClient + this.request({ + path: `/fairyring/keyshare/authorized_address`, + method: "GET", + query: query, + format: "json", + ...params, + }); + + /** + * No description + * + * @tags Query + * @name QueryAuthorizedAddress + * @summary Queries a list of AuthorizedAddress items. + * @request GET:/fairyring/keyshare/authorized_address/{target} + */ + queryAuthorizedAddress = (target: string, params: RequestParams = {}) => + this.request({ + path: `/fairyring/keyshare/authorized_address/${target}`, + method: "GET", + format: "json", + ...params, + }); + /** * No description * @@ -442,6 +547,22 @@ export class Api extends HttpClient + this.request({ + path: `/fairyring/keyshare/pub_key`, + method: "GET", + format: "json", + ...params, + }); + /** * No description * diff --git a/ts-client/fairyring.keyshare/types.ts b/ts-client/fairyring.keyshare/types.ts index 092ff56e..cfdf994a 100755 --- a/ts-client/fairyring.keyshare/types.ts +++ b/ts-client/fairyring.keyshare/types.ts @@ -1,13 +1,21 @@ import { AggregatedKeyShare } from "./types/fairyring/keyshare/aggregated_key_share" +import { AuthorizedAddress } from "./types/fairyring/keyshare/authorized_address" +import { Commitments } from "./types/fairyring/keyshare/commitments" import { KeyShare } from "./types/fairyring/keyshare/key_share" import { Params } from "./types/fairyring/keyshare/params" +import { ActivePubKey } from "./types/fairyring/keyshare/pub_key" +import { QueuedPubKey } from "./types/fairyring/keyshare/pub_key" import { ValidatorSet } from "./types/fairyring/keyshare/validator_set" export { AggregatedKeyShare, + AuthorizedAddress, + Commitments, KeyShare, Params, + ActivePubKey, + QueuedPubKey, ValidatorSet, } \ No newline at end of file diff --git a/ts-client/fairyring.keyshare/types/fairyring/keyshare/authorized_address.ts b/ts-client/fairyring.keyshare/types/fairyring/keyshare/authorized_address.ts new file mode 100644 index 00000000..9f5ebcf0 --- /dev/null +++ b/ts-client/fairyring.keyshare/types/fairyring/keyshare/authorized_address.ts @@ -0,0 +1,92 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "fairyring.keyshare"; + +export interface AuthorizedAddress { + target: string; + isAuthorized: boolean; + authorizedBy: string; +} + +function createBaseAuthorizedAddress(): AuthorizedAddress { + return { target: "", isAuthorized: false, authorizedBy: "" }; +} + +export const AuthorizedAddress = { + encode(message: AuthorizedAddress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.target !== "") { + writer.uint32(10).string(message.target); + } + if (message.isAuthorized === true) { + writer.uint32(16).bool(message.isAuthorized); + } + if (message.authorizedBy !== "") { + writer.uint32(26).string(message.authorizedBy); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AuthorizedAddress { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAuthorizedAddress(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = reader.string(); + break; + case 2: + message.isAuthorized = reader.bool(); + break; + case 3: + message.authorizedBy = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): AuthorizedAddress { + return { + target: isSet(object.target) ? String(object.target) : "", + isAuthorized: isSet(object.isAuthorized) ? Boolean(object.isAuthorized) : false, + authorizedBy: isSet(object.authorizedBy) ? String(object.authorizedBy) : "", + }; + }, + + toJSON(message: AuthorizedAddress): unknown { + const obj: any = {}; + message.target !== undefined && (obj.target = message.target); + message.isAuthorized !== undefined && (obj.isAuthorized = message.isAuthorized); + message.authorizedBy !== undefined && (obj.authorizedBy = message.authorizedBy); + return obj; + }, + + fromPartial, I>>(object: I): AuthorizedAddress { + const message = createBaseAuthorizedAddress(); + message.target = object.target ?? ""; + message.isAuthorized = object.isAuthorized ?? false; + message.authorizedBy = object.authorizedBy ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/ts-client/fairyring.keyshare/types/fairyring/keyshare/commitments.ts b/ts-client/fairyring.keyshare/types/fairyring/keyshare/commitments.ts new file mode 100644 index 00000000..72bc32f2 --- /dev/null +++ b/ts-client/fairyring.keyshare/types/fairyring/keyshare/commitments.ts @@ -0,0 +1,70 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "fairyring.keyshare"; + +export interface Commitments { + commitments: string[]; +} + +function createBaseCommitments(): Commitments { + return { commitments: [] }; +} + +export const Commitments = { + encode(message: Commitments, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.commitments) { + writer.uint32(10).string(v!); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Commitments { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCommitments(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commitments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Commitments { + return { commitments: Array.isArray(object?.commitments) ? object.commitments.map((e: any) => String(e)) : [] }; + }, + + toJSON(message: Commitments): unknown { + const obj: any = {}; + if (message.commitments) { + obj.commitments = message.commitments.map((e) => e); + } else { + obj.commitments = []; + } + return obj; + }, + + fromPartial, I>>(object: I): Commitments { + const message = createBaseCommitments(); + message.commitments = object.commitments?.map((e) => e) || []; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; diff --git a/ts-client/fairyring.keyshare/types/fairyring/keyshare/genesis.ts b/ts-client/fairyring.keyshare/types/fairyring/keyshare/genesis.ts index d51ffcc8..a09b6e27 100644 --- a/ts-client/fairyring.keyshare/types/fairyring/keyshare/genesis.ts +++ b/ts-client/fairyring.keyshare/types/fairyring/keyshare/genesis.ts @@ -1,8 +1,10 @@ /* eslint-disable */ import _m0 from "protobufjs/minimal"; import { AggregatedKeyShare } from "./aggregated_key_share"; +import { AuthorizedAddress } from "./authorized_address"; import { KeyShare } from "./key_share"; import { Params } from "./params"; +import { ActivePubKey, QueuedPubKey } from "./pub_key"; import { ValidatorSet } from "./validator_set"; export const protobufPackage = "fairyring.keyshare"; @@ -14,10 +16,21 @@ export interface GenesisState { keyShareList: KeyShare[]; /** this line is used by starport scaffolding # genesis/proto/state */ aggregatedKeyShareList: AggregatedKeyShare[]; + activePubKey: ActivePubKey | undefined; + queuedPubKey: QueuedPubKey | undefined; + authorizedAddressList: AuthorizedAddress[]; } function createBaseGenesisState(): GenesisState { - return { params: undefined, validatorSetList: [], keyShareList: [], aggregatedKeyShareList: [] }; + return { + params: undefined, + validatorSetList: [], + keyShareList: [], + aggregatedKeyShareList: [], + activePubKey: undefined, + queuedPubKey: undefined, + authorizedAddressList: [], + }; } export const GenesisState = { @@ -34,6 +47,15 @@ export const GenesisState = { for (const v of message.aggregatedKeyShareList) { AggregatedKeyShare.encode(v!, writer.uint32(34).fork()).ldelim(); } + if (message.activePubKey !== undefined) { + ActivePubKey.encode(message.activePubKey, writer.uint32(42).fork()).ldelim(); + } + if (message.queuedPubKey !== undefined) { + QueuedPubKey.encode(message.queuedPubKey, writer.uint32(50).fork()).ldelim(); + } + for (const v of message.authorizedAddressList) { + AuthorizedAddress.encode(v!, writer.uint32(58).fork()).ldelim(); + } return writer; }, @@ -56,6 +78,15 @@ export const GenesisState = { case 4: message.aggregatedKeyShareList.push(AggregatedKeyShare.decode(reader, reader.uint32())); break; + case 5: + message.activePubKey = ActivePubKey.decode(reader, reader.uint32()); + break; + case 6: + message.queuedPubKey = QueuedPubKey.decode(reader, reader.uint32()); + break; + case 7: + message.authorizedAddressList.push(AuthorizedAddress.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -76,6 +107,11 @@ export const GenesisState = { aggregatedKeyShareList: Array.isArray(object?.aggregatedKeyShareList) ? object.aggregatedKeyShareList.map((e: any) => AggregatedKeyShare.fromJSON(e)) : [], + activePubKey: isSet(object.activePubKey) ? ActivePubKey.fromJSON(object.activePubKey) : undefined, + queuedPubKey: isSet(object.queuedPubKey) ? QueuedPubKey.fromJSON(object.queuedPubKey) : undefined, + authorizedAddressList: Array.isArray(object?.authorizedAddressList) + ? object.authorizedAddressList.map((e: any) => AuthorizedAddress.fromJSON(e)) + : [], }; }, @@ -99,6 +135,15 @@ export const GenesisState = { } else { obj.aggregatedKeyShareList = []; } + message.activePubKey !== undefined + && (obj.activePubKey = message.activePubKey ? ActivePubKey.toJSON(message.activePubKey) : undefined); + message.queuedPubKey !== undefined + && (obj.queuedPubKey = message.queuedPubKey ? QueuedPubKey.toJSON(message.queuedPubKey) : undefined); + if (message.authorizedAddressList) { + obj.authorizedAddressList = message.authorizedAddressList.map((e) => e ? AuthorizedAddress.toJSON(e) : undefined); + } else { + obj.authorizedAddressList = []; + } return obj; }, @@ -110,6 +155,13 @@ export const GenesisState = { message.validatorSetList = object.validatorSetList?.map((e) => ValidatorSet.fromPartial(e)) || []; message.keyShareList = object.keyShareList?.map((e) => KeyShare.fromPartial(e)) || []; message.aggregatedKeyShareList = object.aggregatedKeyShareList?.map((e) => AggregatedKeyShare.fromPartial(e)) || []; + message.activePubKey = (object.activePubKey !== undefined && object.activePubKey !== null) + ? ActivePubKey.fromPartial(object.activePubKey) + : undefined; + message.queuedPubKey = (object.queuedPubKey !== undefined && object.queuedPubKey !== null) + ? QueuedPubKey.fromPartial(object.queuedPubKey) + : undefined; + message.authorizedAddressList = object.authorizedAddressList?.map((e) => AuthorizedAddress.fromPartial(e)) || []; return message; }, }; diff --git a/ts-client/fairyring.keyshare/types/fairyring/keyshare/key_share.ts b/ts-client/fairyring.keyshare/types/fairyring/keyshare/key_share.ts index 679ced89..145f269b 100644 --- a/ts-client/fairyring.keyshare/types/fairyring/keyshare/key_share.ts +++ b/ts-client/fairyring.keyshare/types/fairyring/keyshare/key_share.ts @@ -7,7 +7,6 @@ export const protobufPackage = "fairyring.keyshare"; export interface KeyShare { validator: string; blockHeight: number; - commitment: string; keyShare: string; keyShareIndex: number; receivedTimestamp: number; @@ -18,7 +17,6 @@ function createBaseKeyShare(): KeyShare { return { validator: "", blockHeight: 0, - commitment: "", keyShare: "", keyShareIndex: 0, receivedTimestamp: 0, @@ -34,20 +32,17 @@ export const KeyShare = { if (message.blockHeight !== 0) { writer.uint32(16).uint64(message.blockHeight); } - if (message.commitment !== "") { - writer.uint32(26).string(message.commitment); - } if (message.keyShare !== "") { - writer.uint32(34).string(message.keyShare); + writer.uint32(26).string(message.keyShare); } if (message.keyShareIndex !== 0) { - writer.uint32(40).uint64(message.keyShareIndex); + writer.uint32(32).uint64(message.keyShareIndex); } if (message.receivedTimestamp !== 0) { - writer.uint32(48).uint64(message.receivedTimestamp); + writer.uint32(40).uint64(message.receivedTimestamp); } if (message.receivedBlockHeight !== 0) { - writer.uint32(56).uint64(message.receivedBlockHeight); + writer.uint32(48).uint64(message.receivedBlockHeight); } return writer; }, @@ -66,18 +61,15 @@ export const KeyShare = { message.blockHeight = longToNumber(reader.uint64() as Long); break; case 3: - message.commitment = reader.string(); - break; - case 4: message.keyShare = reader.string(); break; - case 5: + case 4: message.keyShareIndex = longToNumber(reader.uint64() as Long); break; - case 6: + case 5: message.receivedTimestamp = longToNumber(reader.uint64() as Long); break; - case 7: + case 6: message.receivedBlockHeight = longToNumber(reader.uint64() as Long); break; default: @@ -92,7 +84,6 @@ export const KeyShare = { return { validator: isSet(object.validator) ? String(object.validator) : "", blockHeight: isSet(object.blockHeight) ? Number(object.blockHeight) : 0, - commitment: isSet(object.commitment) ? String(object.commitment) : "", keyShare: isSet(object.keyShare) ? String(object.keyShare) : "", keyShareIndex: isSet(object.keyShareIndex) ? Number(object.keyShareIndex) : 0, receivedTimestamp: isSet(object.receivedTimestamp) ? Number(object.receivedTimestamp) : 0, @@ -104,7 +95,6 @@ export const KeyShare = { const obj: any = {}; message.validator !== undefined && (obj.validator = message.validator); message.blockHeight !== undefined && (obj.blockHeight = Math.round(message.blockHeight)); - message.commitment !== undefined && (obj.commitment = message.commitment); message.keyShare !== undefined && (obj.keyShare = message.keyShare); message.keyShareIndex !== undefined && (obj.keyShareIndex = Math.round(message.keyShareIndex)); message.receivedTimestamp !== undefined && (obj.receivedTimestamp = Math.round(message.receivedTimestamp)); @@ -116,7 +106,6 @@ export const KeyShare = { const message = createBaseKeyShare(); message.validator = object.validator ?? ""; message.blockHeight = object.blockHeight ?? 0; - message.commitment = object.commitment ?? ""; message.keyShare = object.keyShare ?? ""; message.keyShareIndex = object.keyShareIndex ?? 0; message.receivedTimestamp = object.receivedTimestamp ?? 0; diff --git a/ts-client/fairyring.keyshare/types/fairyring/keyshare/params.ts b/ts-client/fairyring.keyshare/types/fairyring/keyshare/params.ts index 96c16e72..308981af 100644 --- a/ts-client/fairyring.keyshare/types/fairyring/keyshare/params.ts +++ b/ts-client/fairyring.keyshare/types/fairyring/keyshare/params.ts @@ -8,10 +8,21 @@ export const protobufPackage = "fairyring.keyshare"; export interface Params { keyExpiry: number; trustedAddresses: string[]; + slashFractionNoKeyshare: Uint8Array; + slashFractionWrongKeyshare: Uint8Array; + minimumBonded: number; + maxIdledBlock: number; } function createBaseParams(): Params { - return { keyExpiry: 0, trustedAddresses: [] }; + return { + keyExpiry: 0, + trustedAddresses: [], + slashFractionNoKeyshare: new Uint8Array(), + slashFractionWrongKeyshare: new Uint8Array(), + minimumBonded: 0, + maxIdledBlock: 0, + }; } export const Params = { @@ -22,6 +33,18 @@ export const Params = { for (const v of message.trustedAddresses) { writer.uint32(18).string(v!); } + if (message.slashFractionNoKeyshare.length !== 0) { + writer.uint32(26).bytes(message.slashFractionNoKeyshare); + } + if (message.slashFractionWrongKeyshare.length !== 0) { + writer.uint32(34).bytes(message.slashFractionWrongKeyshare); + } + if (message.minimumBonded !== 0) { + writer.uint32(40).uint64(message.minimumBonded); + } + if (message.maxIdledBlock !== 0) { + writer.uint32(48).uint64(message.maxIdledBlock); + } return writer; }, @@ -38,6 +61,18 @@ export const Params = { case 2: message.trustedAddresses.push(reader.string()); break; + case 3: + message.slashFractionNoKeyshare = reader.bytes(); + break; + case 4: + message.slashFractionWrongKeyshare = reader.bytes(); + break; + case 5: + message.minimumBonded = longToNumber(reader.uint64() as Long); + break; + case 6: + message.maxIdledBlock = longToNumber(reader.uint64() as Long); + break; default: reader.skipType(tag & 7); break; @@ -52,6 +87,14 @@ export const Params = { trustedAddresses: Array.isArray(object?.trustedAddresses) ? object.trustedAddresses.map((e: any) => String(e)) : [], + slashFractionNoKeyshare: isSet(object.slashFractionNoKeyshare) + ? bytesFromBase64(object.slashFractionNoKeyshare) + : new Uint8Array(), + slashFractionWrongKeyshare: isSet(object.slashFractionWrongKeyshare) + ? bytesFromBase64(object.slashFractionWrongKeyshare) + : new Uint8Array(), + minimumBonded: isSet(object.minimumBonded) ? Number(object.minimumBonded) : 0, + maxIdledBlock: isSet(object.maxIdledBlock) ? Number(object.maxIdledBlock) : 0, }; }, @@ -63,6 +106,16 @@ export const Params = { } else { obj.trustedAddresses = []; } + message.slashFractionNoKeyshare !== undefined + && (obj.slashFractionNoKeyshare = base64FromBytes( + message.slashFractionNoKeyshare !== undefined ? message.slashFractionNoKeyshare : new Uint8Array(), + )); + message.slashFractionWrongKeyshare !== undefined + && (obj.slashFractionWrongKeyshare = base64FromBytes( + message.slashFractionWrongKeyshare !== undefined ? message.slashFractionWrongKeyshare : new Uint8Array(), + )); + message.minimumBonded !== undefined && (obj.minimumBonded = Math.round(message.minimumBonded)); + message.maxIdledBlock !== undefined && (obj.maxIdledBlock = Math.round(message.maxIdledBlock)); return obj; }, @@ -70,6 +123,10 @@ export const Params = { const message = createBaseParams(); message.keyExpiry = object.keyExpiry ?? 0; message.trustedAddresses = object.trustedAddresses?.map((e) => e) || []; + message.slashFractionNoKeyshare = object.slashFractionNoKeyshare ?? new Uint8Array(); + message.slashFractionWrongKeyshare = object.slashFractionWrongKeyshare ?? new Uint8Array(); + message.minimumBonded = object.minimumBonded ?? 0; + message.maxIdledBlock = object.maxIdledBlock ?? 0; return message; }, }; @@ -93,6 +150,31 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); +function bytesFromBase64(b64: string): Uint8Array { + if (globalThis.Buffer) { + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); + } else { + const bin = globalThis.atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; + } +} + +function base64FromBytes(arr: Uint8Array): string { + if (globalThis.Buffer) { + return globalThis.Buffer.from(arr).toString("base64"); + } else { + const bin: string[] = []; + arr.forEach((byte) => { + bin.push(String.fromCharCode(byte)); + }); + return globalThis.btoa(bin.join("")); + } +} + type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T diff --git a/ts-client/fairyring.keyshare/types/fairyring/keyshare/pub_key.ts b/ts-client/fairyring.keyshare/types/fairyring/keyshare/pub_key.ts new file mode 100644 index 00000000..d4f9ffe9 --- /dev/null +++ b/ts-client/fairyring.keyshare/types/fairyring/keyshare/pub_key.ts @@ -0,0 +1,197 @@ +/* eslint-disable */ +import Long from "long"; +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "fairyring.keyshare"; + +export interface ActivePubKey { + publicKey: string; + creator: string; + expiry: number; +} + +export interface QueuedPubKey { + publicKey: string; + creator: string; + expiry: number; +} + +function createBaseActivePubKey(): ActivePubKey { + return { publicKey: "", creator: "", expiry: 0 }; +} + +export const ActivePubKey = { + encode(message: ActivePubKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.publicKey !== "") { + writer.uint32(10).string(message.publicKey); + } + if (message.creator !== "") { + writer.uint32(18).string(message.creator); + } + if (message.expiry !== 0) { + writer.uint32(24).uint64(message.expiry); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ActivePubKey { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseActivePubKey(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = reader.string(); + break; + case 2: + message.creator = reader.string(); + break; + case 3: + message.expiry = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ActivePubKey { + return { + publicKey: isSet(object.publicKey) ? String(object.publicKey) : "", + creator: isSet(object.creator) ? String(object.creator) : "", + expiry: isSet(object.expiry) ? Number(object.expiry) : 0, + }; + }, + + toJSON(message: ActivePubKey): unknown { + const obj: any = {}; + message.publicKey !== undefined && (obj.publicKey = message.publicKey); + message.creator !== undefined && (obj.creator = message.creator); + message.expiry !== undefined && (obj.expiry = Math.round(message.expiry)); + return obj; + }, + + fromPartial, I>>(object: I): ActivePubKey { + const message = createBaseActivePubKey(); + message.publicKey = object.publicKey ?? ""; + message.creator = object.creator ?? ""; + message.expiry = object.expiry ?? 0; + return message; + }, +}; + +function createBaseQueuedPubKey(): QueuedPubKey { + return { publicKey: "", creator: "", expiry: 0 }; +} + +export const QueuedPubKey = { + encode(message: QueuedPubKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.publicKey !== "") { + writer.uint32(10).string(message.publicKey); + } + if (message.creator !== "") { + writer.uint32(18).string(message.creator); + } + if (message.expiry !== 0) { + writer.uint32(24).uint64(message.expiry); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueuedPubKey { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueuedPubKey(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = reader.string(); + break; + case 2: + message.creator = reader.string(); + break; + case 3: + message.expiry = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueuedPubKey { + return { + publicKey: isSet(object.publicKey) ? String(object.publicKey) : "", + creator: isSet(object.creator) ? String(object.creator) : "", + expiry: isSet(object.expiry) ? Number(object.expiry) : 0, + }; + }, + + toJSON(message: QueuedPubKey): unknown { + const obj: any = {}; + message.publicKey !== undefined && (obj.publicKey = message.publicKey); + message.creator !== undefined && (obj.creator = message.creator); + message.expiry !== undefined && (obj.expiry = Math.round(message.expiry)); + return obj; + }, + + fromPartial, I>>(object: I): QueuedPubKey { + const message = createBaseQueuedPubKey(); + message.publicKey = object.publicKey ?? ""; + message.creator = object.creator ?? ""; + message.expiry = object.expiry ?? 0; + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +declare var global: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + _m0.configure(); +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/ts-client/fairyring.keyshare/types/fairyring/keyshare/query.ts b/ts-client/fairyring.keyshare/types/fairyring/keyshare/query.ts index 21219d1d..20393c43 100644 --- a/ts-client/fairyring.keyshare/types/fairyring/keyshare/query.ts +++ b/ts-client/fairyring.keyshare/types/fairyring/keyshare/query.ts @@ -3,8 +3,10 @@ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../cosmos/base/query/v1beta1/pagination"; import { AggregatedKeyShare } from "./aggregated_key_share"; +import { AuthorizedAddress } from "./authorized_address"; import { KeyShare } from "./key_share"; import { Params } from "./params"; +import { ActivePubKey, QueuedPubKey } from "./pub_key"; import { ValidatorSet } from "./validator_set"; export const protobufPackage = "fairyring.keyshare"; @@ -72,6 +74,31 @@ export interface QueryAllAggregatedKeyShareResponse { pagination: PageResponse | undefined; } +export interface QueryPubKeyRequest { +} + +export interface QueryPubKeyResponse { + activePubKey: ActivePubKey | undefined; + queuedPubKey: QueuedPubKey | undefined; +} + +export interface QueryGetAuthorizedAddressRequest { + target: string; +} + +export interface QueryGetAuthorizedAddressResponse { + authorizedAddress: AuthorizedAddress | undefined; +} + +export interface QueryAllAuthorizedAddressRequest { + pagination: PageRequest | undefined; +} + +export interface QueryAllAuthorizedAddressResponse { + authorizedAddress: AuthorizedAddress[]; + pagination: PageResponse | undefined; +} + function createBaseQueryParamsRequest(): QueryParamsRequest { return {}; } @@ -823,6 +850,336 @@ export const QueryAllAggregatedKeyShareResponse = { }, }; +function createBaseQueryPubKeyRequest(): QueryPubKeyRequest { + return {}; +} + +export const QueryPubKeyRequest = { + encode(_: QueryPubKeyRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPubKeyRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryPubKeyRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): QueryPubKeyRequest { + return {}; + }, + + toJSON(_: QueryPubKeyRequest): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial, I>>(_: I): QueryPubKeyRequest { + const message = createBaseQueryPubKeyRequest(); + return message; + }, +}; + +function createBaseQueryPubKeyResponse(): QueryPubKeyResponse { + return { activePubKey: undefined, queuedPubKey: undefined }; +} + +export const QueryPubKeyResponse = { + encode(message: QueryPubKeyResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.activePubKey !== undefined) { + ActivePubKey.encode(message.activePubKey, writer.uint32(10).fork()).ldelim(); + } + if (message.queuedPubKey !== undefined) { + QueuedPubKey.encode(message.queuedPubKey, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPubKeyResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryPubKeyResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.activePubKey = ActivePubKey.decode(reader, reader.uint32()); + break; + case 2: + message.queuedPubKey = QueuedPubKey.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryPubKeyResponse { + return { + activePubKey: isSet(object.activePubKey) ? ActivePubKey.fromJSON(object.activePubKey) : undefined, + queuedPubKey: isSet(object.queuedPubKey) ? QueuedPubKey.fromJSON(object.queuedPubKey) : undefined, + }; + }, + + toJSON(message: QueryPubKeyResponse): unknown { + const obj: any = {}; + message.activePubKey !== undefined + && (obj.activePubKey = message.activePubKey ? ActivePubKey.toJSON(message.activePubKey) : undefined); + message.queuedPubKey !== undefined + && (obj.queuedPubKey = message.queuedPubKey ? QueuedPubKey.toJSON(message.queuedPubKey) : undefined); + return obj; + }, + + fromPartial, I>>(object: I): QueryPubKeyResponse { + const message = createBaseQueryPubKeyResponse(); + message.activePubKey = (object.activePubKey !== undefined && object.activePubKey !== null) + ? ActivePubKey.fromPartial(object.activePubKey) + : undefined; + message.queuedPubKey = (object.queuedPubKey !== undefined && object.queuedPubKey !== null) + ? QueuedPubKey.fromPartial(object.queuedPubKey) + : undefined; + return message; + }, +}; + +function createBaseQueryGetAuthorizedAddressRequest(): QueryGetAuthorizedAddressRequest { + return { target: "" }; +} + +export const QueryGetAuthorizedAddressRequest = { + encode(message: QueryGetAuthorizedAddressRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.target !== "") { + writer.uint32(10).string(message.target); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetAuthorizedAddressRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryGetAuthorizedAddressRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetAuthorizedAddressRequest { + return { target: isSet(object.target) ? String(object.target) : "" }; + }, + + toJSON(message: QueryGetAuthorizedAddressRequest): unknown { + const obj: any = {}; + message.target !== undefined && (obj.target = message.target); + return obj; + }, + + fromPartial, I>>( + object: I, + ): QueryGetAuthorizedAddressRequest { + const message = createBaseQueryGetAuthorizedAddressRequest(); + message.target = object.target ?? ""; + return message; + }, +}; + +function createBaseQueryGetAuthorizedAddressResponse(): QueryGetAuthorizedAddressResponse { + return { authorizedAddress: undefined }; +} + +export const QueryGetAuthorizedAddressResponse = { + encode(message: QueryGetAuthorizedAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authorizedAddress !== undefined) { + AuthorizedAddress.encode(message.authorizedAddress, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetAuthorizedAddressResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryGetAuthorizedAddressResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authorizedAddress = AuthorizedAddress.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryGetAuthorizedAddressResponse { + return { + authorizedAddress: isSet(object.authorizedAddress) + ? AuthorizedAddress.fromJSON(object.authorizedAddress) + : undefined, + }; + }, + + toJSON(message: QueryGetAuthorizedAddressResponse): unknown { + const obj: any = {}; + message.authorizedAddress !== undefined && (obj.authorizedAddress = message.authorizedAddress + ? AuthorizedAddress.toJSON(message.authorizedAddress) + : undefined); + return obj; + }, + + fromPartial, I>>( + object: I, + ): QueryGetAuthorizedAddressResponse { + const message = createBaseQueryGetAuthorizedAddressResponse(); + message.authorizedAddress = (object.authorizedAddress !== undefined && object.authorizedAddress !== null) + ? AuthorizedAddress.fromPartial(object.authorizedAddress) + : undefined; + return message; + }, +}; + +function createBaseQueryAllAuthorizedAddressRequest(): QueryAllAuthorizedAddressRequest { + return { pagination: undefined }; +} + +export const QueryAllAuthorizedAddressRequest = { + encode(message: QueryAllAuthorizedAddressRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.pagination !== undefined) { + PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllAuthorizedAddressRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryAllAuthorizedAddressRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllAuthorizedAddressRequest { + return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; + }, + + toJSON(message: QueryAllAuthorizedAddressRequest): unknown { + const obj: any = {}; + message.pagination !== undefined + && (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial, I>>( + object: I, + ): QueryAllAuthorizedAddressRequest { + const message = createBaseQueryAllAuthorizedAddressRequest(); + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + +function createBaseQueryAllAuthorizedAddressResponse(): QueryAllAuthorizedAddressResponse { + return { authorizedAddress: [], pagination: undefined }; +} + +export const QueryAllAuthorizedAddressResponse = { + encode(message: QueryAllAuthorizedAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.authorizedAddress) { + AuthorizedAddress.encode(v!, writer.uint32(10).fork()).ldelim(); + } + if (message.pagination !== undefined) { + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllAuthorizedAddressResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryAllAuthorizedAddressResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.authorizedAddress.push(AuthorizedAddress.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueryAllAuthorizedAddressResponse { + return { + authorizedAddress: Array.isArray(object?.authorizedAddress) + ? object.authorizedAddress.map((e: any) => AuthorizedAddress.fromJSON(e)) + : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, + }; + }, + + toJSON(message: QueryAllAuthorizedAddressResponse): unknown { + const obj: any = {}; + if (message.authorizedAddress) { + obj.authorizedAddress = message.authorizedAddress.map((e) => e ? AuthorizedAddress.toJSON(e) : undefined); + } else { + obj.authorizedAddress = []; + } + message.pagination !== undefined + && (obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined); + return obj; + }, + + fromPartial, I>>( + object: I, + ): QueryAllAuthorizedAddressResponse { + const message = createBaseQueryAllAuthorizedAddressResponse(); + message.authorizedAddress = object.authorizedAddress?.map((e) => AuthorizedAddress.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; + return message; + }, +}; + /** Query defines the gRPC querier service. */ export interface Query { /** Parameters queries the parameters of the module. */ @@ -838,6 +1195,11 @@ export interface Query { /** Queries a list of AggregatedKeyShare items. */ AggregatedKeyShare(request: QueryGetAggregatedKeyShareRequest): Promise; AggregatedKeyShareAll(request: QueryAllAggregatedKeyShareRequest): Promise; + /** Queries the public keys */ + PubKey(request: QueryPubKeyRequest): Promise; + /** Queries a list of AuthorizedAddress items. */ + AuthorizedAddress(request: QueryGetAuthorizedAddressRequest): Promise; + AuthorizedAddressAll(request: QueryAllAuthorizedAddressRequest): Promise; } export class QueryClientImpl implements Query { @@ -851,6 +1213,9 @@ export class QueryClientImpl implements Query { this.KeyShareAll = this.KeyShareAll.bind(this); this.AggregatedKeyShare = this.AggregatedKeyShare.bind(this); this.AggregatedKeyShareAll = this.AggregatedKeyShareAll.bind(this); + this.PubKey = this.PubKey.bind(this); + this.AuthorizedAddress = this.AuthorizedAddress.bind(this); + this.AuthorizedAddressAll = this.AuthorizedAddressAll.bind(this); } Params(request: QueryParamsRequest): Promise { const data = QueryParamsRequest.encode(request).finish(); @@ -893,6 +1258,24 @@ export class QueryClientImpl implements Query { const promise = this.rpc.request("fairyring.keyshare.Query", "AggregatedKeyShareAll", data); return promise.then((data) => QueryAllAggregatedKeyShareResponse.decode(new _m0.Reader(data))); } + + PubKey(request: QueryPubKeyRequest): Promise { + const data = QueryPubKeyRequest.encode(request).finish(); + const promise = this.rpc.request("fairyring.keyshare.Query", "PubKey", data); + return promise.then((data) => QueryPubKeyResponse.decode(new _m0.Reader(data))); + } + + AuthorizedAddress(request: QueryGetAuthorizedAddressRequest): Promise { + const data = QueryGetAuthorizedAddressRequest.encode(request).finish(); + const promise = this.rpc.request("fairyring.keyshare.Query", "AuthorizedAddress", data); + return promise.then((data) => QueryGetAuthorizedAddressResponse.decode(new _m0.Reader(data))); + } + + AuthorizedAddressAll(request: QueryAllAuthorizedAddressRequest): Promise { + const data = QueryAllAuthorizedAddressRequest.encode(request).finish(); + const promise = this.rpc.request("fairyring.keyshare.Query", "AuthorizedAddressAll", data); + return promise.then((data) => QueryAllAuthorizedAddressResponse.decode(new _m0.Reader(data))); + } } interface Rpc { diff --git a/ts-client/fairyring.keyshare/types/fairyring/keyshare/tx.ts b/ts-client/fairyring.keyshare/types/fairyring/keyshare/tx.ts index 5eb7a305..85bef1eb 100644 --- a/ts-client/fairyring.keyshare/types/fairyring/keyshare/tx.ts +++ b/ts-client/fairyring.keyshare/types/fairyring/keyshare/tx.ts @@ -15,7 +15,6 @@ export interface MsgRegisterValidatorResponse { export interface MsgSendKeyshare { creator: string; message: string; - commitment: string; keyShareIndex: number; blockHeight: number; } @@ -23,21 +22,48 @@ export interface MsgSendKeyshare { export interface MsgSendKeyshareResponse { creator: string; keyshare: string; - commitment: string; keyshareIndex: number; blockHeight: number; receivedBlockHeight: number; + success: boolean; + errorMessage: string; } /** this line is used by starport scaffolding # proto/tx/message */ export interface MsgCreateLatestPubKey { creator: string; publicKey: string; + commitments: string[]; } export interface MsgCreateLatestPubKeyResponse { } +export interface MsgCreateAuthorizedAddress { + target: string; + creator: string; +} + +export interface MsgCreateAuthorizedAddressResponse { +} + +export interface MsgUpdateAuthorizedAddress { + target: string; + isAuthorized: boolean; + creator: string; +} + +export interface MsgUpdateAuthorizedAddressResponse { +} + +export interface MsgDeleteAuthorizedAddress { + target: string; + creator: string; +} + +export interface MsgDeleteAuthorizedAddressResponse { +} + function createBaseMsgRegisterValidator(): MsgRegisterValidator { return { creator: "" }; } @@ -133,7 +159,7 @@ export const MsgRegisterValidatorResponse = { }; function createBaseMsgSendKeyshare(): MsgSendKeyshare { - return { creator: "", message: "", commitment: "", keyShareIndex: 0, blockHeight: 0 }; + return { creator: "", message: "", keyShareIndex: 0, blockHeight: 0 }; } export const MsgSendKeyshare = { @@ -144,14 +170,11 @@ export const MsgSendKeyshare = { if (message.message !== "") { writer.uint32(18).string(message.message); } - if (message.commitment !== "") { - writer.uint32(26).string(message.commitment); - } if (message.keyShareIndex !== 0) { - writer.uint32(32).uint64(message.keyShareIndex); + writer.uint32(24).uint64(message.keyShareIndex); } if (message.blockHeight !== 0) { - writer.uint32(40).uint64(message.blockHeight); + writer.uint32(32).uint64(message.blockHeight); } return writer; }, @@ -170,12 +193,9 @@ export const MsgSendKeyshare = { message.message = reader.string(); break; case 3: - message.commitment = reader.string(); - break; - case 4: message.keyShareIndex = longToNumber(reader.uint64() as Long); break; - case 5: + case 4: message.blockHeight = longToNumber(reader.uint64() as Long); break; default: @@ -190,7 +210,6 @@ export const MsgSendKeyshare = { return { creator: isSet(object.creator) ? String(object.creator) : "", message: isSet(object.message) ? String(object.message) : "", - commitment: isSet(object.commitment) ? String(object.commitment) : "", keyShareIndex: isSet(object.keyShareIndex) ? Number(object.keyShareIndex) : 0, blockHeight: isSet(object.blockHeight) ? Number(object.blockHeight) : 0, }; @@ -200,7 +219,6 @@ export const MsgSendKeyshare = { const obj: any = {}; message.creator !== undefined && (obj.creator = message.creator); message.message !== undefined && (obj.message = message.message); - message.commitment !== undefined && (obj.commitment = message.commitment); message.keyShareIndex !== undefined && (obj.keyShareIndex = Math.round(message.keyShareIndex)); message.blockHeight !== undefined && (obj.blockHeight = Math.round(message.blockHeight)); return obj; @@ -210,7 +228,6 @@ export const MsgSendKeyshare = { const message = createBaseMsgSendKeyshare(); message.creator = object.creator ?? ""; message.message = object.message ?? ""; - message.commitment = object.commitment ?? ""; message.keyShareIndex = object.keyShareIndex ?? 0; message.blockHeight = object.blockHeight ?? 0; return message; @@ -218,7 +235,15 @@ export const MsgSendKeyshare = { }; function createBaseMsgSendKeyshareResponse(): MsgSendKeyshareResponse { - return { creator: "", keyshare: "", commitment: "", keyshareIndex: 0, blockHeight: 0, receivedBlockHeight: 0 }; + return { + creator: "", + keyshare: "", + keyshareIndex: 0, + blockHeight: 0, + receivedBlockHeight: 0, + success: false, + errorMessage: "", + }; } export const MsgSendKeyshareResponse = { @@ -229,17 +254,20 @@ export const MsgSendKeyshareResponse = { if (message.keyshare !== "") { writer.uint32(18).string(message.keyshare); } - if (message.commitment !== "") { - writer.uint32(26).string(message.commitment); - } if (message.keyshareIndex !== 0) { - writer.uint32(32).uint64(message.keyshareIndex); + writer.uint32(24).uint64(message.keyshareIndex); } if (message.blockHeight !== 0) { - writer.uint32(40).uint64(message.blockHeight); + writer.uint32(32).uint64(message.blockHeight); } if (message.receivedBlockHeight !== 0) { - writer.uint32(48).uint64(message.receivedBlockHeight); + writer.uint32(40).uint64(message.receivedBlockHeight); + } + if (message.success === true) { + writer.uint32(48).bool(message.success); + } + if (message.errorMessage !== "") { + writer.uint32(58).string(message.errorMessage); } return writer; }, @@ -258,16 +286,19 @@ export const MsgSendKeyshareResponse = { message.keyshare = reader.string(); break; case 3: - message.commitment = reader.string(); + message.keyshareIndex = longToNumber(reader.uint64() as Long); break; case 4: - message.keyshareIndex = longToNumber(reader.uint64() as Long); + message.blockHeight = longToNumber(reader.uint64() as Long); break; case 5: - message.blockHeight = longToNumber(reader.uint64() as Long); + message.receivedBlockHeight = longToNumber(reader.uint64() as Long); break; case 6: - message.receivedBlockHeight = longToNumber(reader.uint64() as Long); + message.success = reader.bool(); + break; + case 7: + message.errorMessage = reader.string(); break; default: reader.skipType(tag & 7); @@ -281,10 +312,11 @@ export const MsgSendKeyshareResponse = { return { creator: isSet(object.creator) ? String(object.creator) : "", keyshare: isSet(object.keyshare) ? String(object.keyshare) : "", - commitment: isSet(object.commitment) ? String(object.commitment) : "", keyshareIndex: isSet(object.keyshareIndex) ? Number(object.keyshareIndex) : 0, blockHeight: isSet(object.blockHeight) ? Number(object.blockHeight) : 0, receivedBlockHeight: isSet(object.receivedBlockHeight) ? Number(object.receivedBlockHeight) : 0, + success: isSet(object.success) ? Boolean(object.success) : false, + errorMessage: isSet(object.errorMessage) ? String(object.errorMessage) : "", }; }, @@ -292,10 +324,11 @@ export const MsgSendKeyshareResponse = { const obj: any = {}; message.creator !== undefined && (obj.creator = message.creator); message.keyshare !== undefined && (obj.keyshare = message.keyshare); - message.commitment !== undefined && (obj.commitment = message.commitment); message.keyshareIndex !== undefined && (obj.keyshareIndex = Math.round(message.keyshareIndex)); message.blockHeight !== undefined && (obj.blockHeight = Math.round(message.blockHeight)); message.receivedBlockHeight !== undefined && (obj.receivedBlockHeight = Math.round(message.receivedBlockHeight)); + message.success !== undefined && (obj.success = message.success); + message.errorMessage !== undefined && (obj.errorMessage = message.errorMessage); return obj; }, @@ -303,16 +336,17 @@ export const MsgSendKeyshareResponse = { const message = createBaseMsgSendKeyshareResponse(); message.creator = object.creator ?? ""; message.keyshare = object.keyshare ?? ""; - message.commitment = object.commitment ?? ""; message.keyshareIndex = object.keyshareIndex ?? 0; message.blockHeight = object.blockHeight ?? 0; message.receivedBlockHeight = object.receivedBlockHeight ?? 0; + message.success = object.success ?? false; + message.errorMessage = object.errorMessage ?? ""; return message; }, }; function createBaseMsgCreateLatestPubKey(): MsgCreateLatestPubKey { - return { creator: "", publicKey: "" }; + return { creator: "", publicKey: "", commitments: [] }; } export const MsgCreateLatestPubKey = { @@ -323,6 +357,9 @@ export const MsgCreateLatestPubKey = { if (message.publicKey !== "") { writer.uint32(18).string(message.publicKey); } + for (const v of message.commitments) { + writer.uint32(26).string(v!); + } return writer; }, @@ -339,6 +376,9 @@ export const MsgCreateLatestPubKey = { case 2: message.publicKey = reader.string(); break; + case 3: + message.commitments.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -351,6 +391,7 @@ export const MsgCreateLatestPubKey = { return { creator: isSet(object.creator) ? String(object.creator) : "", publicKey: isSet(object.publicKey) ? String(object.publicKey) : "", + commitments: Array.isArray(object?.commitments) ? object.commitments.map((e: any) => String(e)) : [], }; }, @@ -358,6 +399,11 @@ export const MsgCreateLatestPubKey = { const obj: any = {}; message.creator !== undefined && (obj.creator = message.creator); message.publicKey !== undefined && (obj.publicKey = message.publicKey); + if (message.commitments) { + obj.commitments = message.commitments.map((e) => e); + } else { + obj.commitments = []; + } return obj; }, @@ -365,6 +411,7 @@ export const MsgCreateLatestPubKey = { const message = createBaseMsgCreateLatestPubKey(); message.creator = object.creator ?? ""; message.publicKey = object.publicKey ?? ""; + message.commitments = object.commitments?.map((e) => e) || []; return message; }, }; @@ -408,12 +455,321 @@ export const MsgCreateLatestPubKeyResponse = { }, }; +function createBaseMsgCreateAuthorizedAddress(): MsgCreateAuthorizedAddress { + return { target: "", creator: "" }; +} + +export const MsgCreateAuthorizedAddress = { + encode(message: MsgCreateAuthorizedAddress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.target !== "") { + writer.uint32(10).string(message.target); + } + if (message.creator !== "") { + writer.uint32(18).string(message.creator); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateAuthorizedAddress { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgCreateAuthorizedAddress(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = reader.string(); + break; + case 2: + message.creator = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgCreateAuthorizedAddress { + return { + target: isSet(object.target) ? String(object.target) : "", + creator: isSet(object.creator) ? String(object.creator) : "", + }; + }, + + toJSON(message: MsgCreateAuthorizedAddress): unknown { + const obj: any = {}; + message.target !== undefined && (obj.target = message.target); + message.creator !== undefined && (obj.creator = message.creator); + return obj; + }, + + fromPartial, I>>(object: I): MsgCreateAuthorizedAddress { + const message = createBaseMsgCreateAuthorizedAddress(); + message.target = object.target ?? ""; + message.creator = object.creator ?? ""; + return message; + }, +}; + +function createBaseMsgCreateAuthorizedAddressResponse(): MsgCreateAuthorizedAddressResponse { + return {}; +} + +export const MsgCreateAuthorizedAddressResponse = { + encode(_: MsgCreateAuthorizedAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateAuthorizedAddressResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgCreateAuthorizedAddressResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): MsgCreateAuthorizedAddressResponse { + return {}; + }, + + toJSON(_: MsgCreateAuthorizedAddressResponse): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial, I>>( + _: I, + ): MsgCreateAuthorizedAddressResponse { + const message = createBaseMsgCreateAuthorizedAddressResponse(); + return message; + }, +}; + +function createBaseMsgUpdateAuthorizedAddress(): MsgUpdateAuthorizedAddress { + return { target: "", isAuthorized: false, creator: "" }; +} + +export const MsgUpdateAuthorizedAddress = { + encode(message: MsgUpdateAuthorizedAddress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.target !== "") { + writer.uint32(10).string(message.target); + } + if (message.isAuthorized === true) { + writer.uint32(16).bool(message.isAuthorized); + } + if (message.creator !== "") { + writer.uint32(26).string(message.creator); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateAuthorizedAddress { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateAuthorizedAddress(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = reader.string(); + break; + case 2: + message.isAuthorized = reader.bool(); + break; + case 3: + message.creator = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgUpdateAuthorizedAddress { + return { + target: isSet(object.target) ? String(object.target) : "", + isAuthorized: isSet(object.isAuthorized) ? Boolean(object.isAuthorized) : false, + creator: isSet(object.creator) ? String(object.creator) : "", + }; + }, + + toJSON(message: MsgUpdateAuthorizedAddress): unknown { + const obj: any = {}; + message.target !== undefined && (obj.target = message.target); + message.isAuthorized !== undefined && (obj.isAuthorized = message.isAuthorized); + message.creator !== undefined && (obj.creator = message.creator); + return obj; + }, + + fromPartial, I>>(object: I): MsgUpdateAuthorizedAddress { + const message = createBaseMsgUpdateAuthorizedAddress(); + message.target = object.target ?? ""; + message.isAuthorized = object.isAuthorized ?? false; + message.creator = object.creator ?? ""; + return message; + }, +}; + +function createBaseMsgUpdateAuthorizedAddressResponse(): MsgUpdateAuthorizedAddressResponse { + return {}; +} + +export const MsgUpdateAuthorizedAddressResponse = { + encode(_: MsgUpdateAuthorizedAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateAuthorizedAddressResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateAuthorizedAddressResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): MsgUpdateAuthorizedAddressResponse { + return {}; + }, + + toJSON(_: MsgUpdateAuthorizedAddressResponse): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial, I>>( + _: I, + ): MsgUpdateAuthorizedAddressResponse { + const message = createBaseMsgUpdateAuthorizedAddressResponse(); + return message; + }, +}; + +function createBaseMsgDeleteAuthorizedAddress(): MsgDeleteAuthorizedAddress { + return { target: "", creator: "" }; +} + +export const MsgDeleteAuthorizedAddress = { + encode(message: MsgDeleteAuthorizedAddress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.target !== "") { + writer.uint32(10).string(message.target); + } + if (message.creator !== "") { + writer.uint32(18).string(message.creator); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteAuthorizedAddress { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgDeleteAuthorizedAddress(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.target = reader.string(); + break; + case 2: + message.creator = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): MsgDeleteAuthorizedAddress { + return { + target: isSet(object.target) ? String(object.target) : "", + creator: isSet(object.creator) ? String(object.creator) : "", + }; + }, + + toJSON(message: MsgDeleteAuthorizedAddress): unknown { + const obj: any = {}; + message.target !== undefined && (obj.target = message.target); + message.creator !== undefined && (obj.creator = message.creator); + return obj; + }, + + fromPartial, I>>(object: I): MsgDeleteAuthorizedAddress { + const message = createBaseMsgDeleteAuthorizedAddress(); + message.target = object.target ?? ""; + message.creator = object.creator ?? ""; + return message; + }, +}; + +function createBaseMsgDeleteAuthorizedAddressResponse(): MsgDeleteAuthorizedAddressResponse { + return {}; +} + +export const MsgDeleteAuthorizedAddressResponse = { + encode(_: MsgDeleteAuthorizedAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteAuthorizedAddressResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgDeleteAuthorizedAddressResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(_: any): MsgDeleteAuthorizedAddressResponse { + return {}; + }, + + toJSON(_: MsgDeleteAuthorizedAddressResponse): unknown { + const obj: any = {}; + return obj; + }, + + fromPartial, I>>( + _: I, + ): MsgDeleteAuthorizedAddressResponse { + const message = createBaseMsgDeleteAuthorizedAddressResponse(); + return message; + }, +}; + /** Msg defines the Msg service. */ export interface Msg { RegisterValidator(request: MsgRegisterValidator): Promise; SendKeyshare(request: MsgSendKeyshare): Promise; /** this line is used by starport scaffolding # proto/tx/rpc */ CreateLatestPubKey(request: MsgCreateLatestPubKey): Promise; + CreateAuthorizedAddress(request: MsgCreateAuthorizedAddress): Promise; + UpdateAuthorizedAddress(request: MsgUpdateAuthorizedAddress): Promise; + DeleteAuthorizedAddress(request: MsgDeleteAuthorizedAddress): Promise; } export class MsgClientImpl implements Msg { @@ -423,6 +779,9 @@ export class MsgClientImpl implements Msg { this.RegisterValidator = this.RegisterValidator.bind(this); this.SendKeyshare = this.SendKeyshare.bind(this); this.CreateLatestPubKey = this.CreateLatestPubKey.bind(this); + this.CreateAuthorizedAddress = this.CreateAuthorizedAddress.bind(this); + this.UpdateAuthorizedAddress = this.UpdateAuthorizedAddress.bind(this); + this.DeleteAuthorizedAddress = this.DeleteAuthorizedAddress.bind(this); } RegisterValidator(request: MsgRegisterValidator): Promise { const data = MsgRegisterValidator.encode(request).finish(); @@ -441,6 +800,24 @@ export class MsgClientImpl implements Msg { const promise = this.rpc.request("fairyring.keyshare.Msg", "CreateLatestPubKey", data); return promise.then((data) => MsgCreateLatestPubKeyResponse.decode(new _m0.Reader(data))); } + + CreateAuthorizedAddress(request: MsgCreateAuthorizedAddress): Promise { + const data = MsgCreateAuthorizedAddress.encode(request).finish(); + const promise = this.rpc.request("fairyring.keyshare.Msg", "CreateAuthorizedAddress", data); + return promise.then((data) => MsgCreateAuthorizedAddressResponse.decode(new _m0.Reader(data))); + } + + UpdateAuthorizedAddress(request: MsgUpdateAuthorizedAddress): Promise { + const data = MsgUpdateAuthorizedAddress.encode(request).finish(); + const promise = this.rpc.request("fairyring.keyshare.Msg", "UpdateAuthorizedAddress", data); + return promise.then((data) => MsgUpdateAuthorizedAddressResponse.decode(new _m0.Reader(data))); + } + + DeleteAuthorizedAddress(request: MsgDeleteAuthorizedAddress): Promise { + const data = MsgDeleteAuthorizedAddress.encode(request).finish(); + const promise = this.rpc.request("fairyring.keyshare.Msg", "DeleteAuthorizedAddress", data); + return promise.then((data) => MsgDeleteAuthorizedAddressResponse.decode(new _m0.Reader(data))); + } } interface Rpc { diff --git a/ts-client/fairyring.pep/module.ts b/ts-client/fairyring.pep/module.ts index 318f7056..ff997270 100755 --- a/ts-client/fairyring.pep/module.ts +++ b/ts-client/fairyring.pep/module.ts @@ -7,28 +7,23 @@ import { msgTypes } from './registry'; import { IgniteClient } from "../client" import { MissingWalletError } from "../helpers" import { Api } from "./rest"; -import { MsgSubmitEncryptedTx } from "./types/fairyring/pep/tx"; import { MsgCreateAggregatedKeyShare } from "./types/fairyring/pep/tx"; +import { MsgSubmitEncryptedTx } from "./types/fairyring/pep/tx"; import { AggregatedKeyShare as typeAggregatedKeyShare} from "./types" import { EncryptedTx as typeEncryptedTx} from "./types" import { EncryptedTxArray as typeEncryptedTxArray} from "./types" -import { ActivePubKey as typeActivePubKey} from "./types" -import { QueuedPubKey as typeQueuedPubKey} from "./types" import { PepPacketData as typePepPacketData} from "./types" import { NoData as typeNoData} from "./types" import { CurrentKeysPacketData as typeCurrentKeysPacketData} from "./types" import { CurrentKeysPacketAck as typeCurrentKeysPacketAck} from "./types" import { Params as typeParams} from "./types" +import { TrustedCounterParty as typeTrustedCounterParty} from "./types" import { PepNonce as typePepNonce} from "./types" +import { ActivePubKey as typeActivePubKey} from "./types" +import { QueuedPubKey as typeQueuedPubKey} from "./types" -export { MsgSubmitEncryptedTx, MsgCreateAggregatedKeyShare }; - -type sendMsgSubmitEncryptedTxParams = { - value: MsgSubmitEncryptedTx, - fee?: StdFee, - memo?: string -}; +export { MsgCreateAggregatedKeyShare, MsgSubmitEncryptedTx }; type sendMsgCreateAggregatedKeyShareParams = { value: MsgCreateAggregatedKeyShare, @@ -36,15 +31,21 @@ type sendMsgCreateAggregatedKeyShareParams = { memo?: string }; - -type msgSubmitEncryptedTxParams = { +type sendMsgSubmitEncryptedTxParams = { value: MsgSubmitEncryptedTx, + fee?: StdFee, + memo?: string }; + type msgCreateAggregatedKeyShareParams = { value: MsgCreateAggregatedKeyShare, }; +type msgSubmitEncryptedTxParams = { + value: MsgSubmitEncryptedTx, +}; + export const registry = new Registry(msgTypes); @@ -75,48 +76,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht return { - async sendMsgSubmitEncryptedTx({ value, fee, memo }: sendMsgSubmitEncryptedTxParams): Promise { + async sendMsgCreateAggregatedKeyShare({ value, fee, memo }: sendMsgCreateAggregatedKeyShareParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgSubmitEncryptedTx: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgCreateAggregatedKeyShare: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgSubmitEncryptedTx({ value: MsgSubmitEncryptedTx.fromPartial(value) }) + let msg = this.msgCreateAggregatedKeyShare({ value: MsgCreateAggregatedKeyShare.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgSubmitEncryptedTx: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgCreateAggregatedKeyShare: Could not broadcast Tx: '+ e.message) } }, - async sendMsgCreateAggregatedKeyShare({ value, fee, memo }: sendMsgCreateAggregatedKeyShareParams): Promise { + async sendMsgSubmitEncryptedTx({ value, fee, memo }: sendMsgSubmitEncryptedTxParams): Promise { if (!signer) { - throw new Error('TxClient:sendMsgCreateAggregatedKeyShare: Unable to sign Tx. Signer is not present.') + throw new Error('TxClient:sendMsgSubmitEncryptedTx: Unable to sign Tx. Signer is not present.') } try { const { address } = (await signer.getAccounts())[0]; const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix}); - let msg = this.msgCreateAggregatedKeyShare({ value: MsgCreateAggregatedKeyShare.fromPartial(value) }) + let msg = this.msgSubmitEncryptedTx({ value: MsgSubmitEncryptedTx.fromPartial(value) }) return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo) } catch (e: any) { - throw new Error('TxClient:sendMsgCreateAggregatedKeyShare: Could not broadcast Tx: '+ e.message) + throw new Error('TxClient:sendMsgSubmitEncryptedTx: Could not broadcast Tx: '+ e.message) } }, - msgSubmitEncryptedTx({ value }: msgSubmitEncryptedTxParams): EncodeObject { + msgCreateAggregatedKeyShare({ value }: msgCreateAggregatedKeyShareParams): EncodeObject { try { - return { typeUrl: "/fairyring.pep.MsgSubmitEncryptedTx", value: MsgSubmitEncryptedTx.fromPartial( value ) } + return { typeUrl: "/fairyring.pep.MsgCreateAggregatedKeyShare", value: MsgCreateAggregatedKeyShare.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgSubmitEncryptedTx: Could not create message: ' + e.message) + throw new Error('TxClient:MsgCreateAggregatedKeyShare: Could not create message: ' + e.message) } }, - msgCreateAggregatedKeyShare({ value }: msgCreateAggregatedKeyShareParams): EncodeObject { + msgSubmitEncryptedTx({ value }: msgSubmitEncryptedTxParams): EncodeObject { try { - return { typeUrl: "/fairyring.pep.MsgCreateAggregatedKeyShare", value: MsgCreateAggregatedKeyShare.fromPartial( value ) } + return { typeUrl: "/fairyring.pep.MsgSubmitEncryptedTx", value: MsgSubmitEncryptedTx.fromPartial( value ) } } catch (e: any) { - throw new Error('TxClient:MsgCreateAggregatedKeyShare: Could not create message: ' + e.message) + throw new Error('TxClient:MsgSubmitEncryptedTx: Could not create message: ' + e.message) } }, @@ -145,14 +146,15 @@ class SDKModule { AggregatedKeyShare: getStructure(typeAggregatedKeyShare.fromPartial({})), EncryptedTx: getStructure(typeEncryptedTx.fromPartial({})), EncryptedTxArray: getStructure(typeEncryptedTxArray.fromPartial({})), - ActivePubKey: getStructure(typeActivePubKey.fromPartial({})), - QueuedPubKey: getStructure(typeQueuedPubKey.fromPartial({})), PepPacketData: getStructure(typePepPacketData.fromPartial({})), NoData: getStructure(typeNoData.fromPartial({})), CurrentKeysPacketData: getStructure(typeCurrentKeysPacketData.fromPartial({})), CurrentKeysPacketAck: getStructure(typeCurrentKeysPacketAck.fromPartial({})), Params: getStructure(typeParams.fromPartial({})), + TrustedCounterParty: getStructure(typeTrustedCounterParty.fromPartial({})), PepNonce: getStructure(typePepNonce.fromPartial({})), + ActivePubKey: getStructure(typeActivePubKey.fromPartial({})), + QueuedPubKey: getStructure(typeQueuedPubKey.fromPartial({})), }; client.on('signer-changed',(signer) => { diff --git a/ts-client/fairyring.pep/registry.ts b/ts-client/fairyring.pep/registry.ts index 35605e55..b11c9047 100755 --- a/ts-client/fairyring.pep/registry.ts +++ b/ts-client/fairyring.pep/registry.ts @@ -1,10 +1,10 @@ import { GeneratedType } from "@cosmjs/proto-signing"; -import { MsgSubmitEncryptedTx } from "./types/fairyring/pep/tx"; import { MsgCreateAggregatedKeyShare } from "./types/fairyring/pep/tx"; +import { MsgSubmitEncryptedTx } from "./types/fairyring/pep/tx"; const msgTypes: Array<[string, GeneratedType]> = [ - ["/fairyring.pep.MsgSubmitEncryptedTx", MsgSubmitEncryptedTx], ["/fairyring.pep.MsgCreateAggregatedKeyShare", MsgCreateAggregatedKeyShare], + ["/fairyring.pep.MsgSubmitEncryptedTx", MsgSubmitEncryptedTx], ]; diff --git a/ts-client/fairyring.pep/rest.ts b/ts-client/fairyring.pep/rest.ts index 984d5c9e..c13a1532 100644 --- a/ts-client/fairyring.pep/rest.ts +++ b/ts-client/fairyring.pep/rest.ts @@ -25,6 +25,14 @@ export interface PepEncryptedTx { index?: string; data?: string; creator?: string; + + /** + * 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. + */ + chargedGas?: V1Beta1Coin; } export interface PepEncryptedTxArray { @@ -38,7 +46,19 @@ export type PepMsgSubmitEncryptedTxResponse = object; /** * Params defines the parameters for the module. */ -export type PepParams = object; +export interface PepParams { + trusted_counter_parties?: PepTrustedCounterParty[]; + trusted_addresses?: string[]; + channel_id?: string; + + /** + * 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. + */ + minGasPrice?: V1Beta1Coin; +} export interface PepPepNonce { address?: string; @@ -115,6 +135,12 @@ export interface PepQueuedPubKey { expiry?: string; } +export interface PepTrustedCounterParty { + client_id?: string; + connection_id?: string; + channel_id?: string; +} + export interface ProtobufAny { "@type"?: string; } @@ -126,6 +152,17 @@ export interface RpcStatus { details?: ProtobufAny[]; } +/** +* 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. +*/ +export interface V1Beta1Coin { + denom?: string; + amount?: string; +} + /** * message SomeRequest { Foo some_parameter = 1; diff --git a/ts-client/fairyring.pep/types.ts b/ts-client/fairyring.pep/types.ts index e0b1a66e..5387bf4d 100755 --- a/ts-client/fairyring.pep/types.ts +++ b/ts-client/fairyring.pep/types.ts @@ -1,27 +1,29 @@ import { AggregatedKeyShare } from "./types/fairyring/pep/aggregated_key_share" import { EncryptedTx } from "./types/fairyring/pep/encrypted_tx" import { EncryptedTxArray } from "./types/fairyring/pep/encrypted_tx" -import { ActivePubKey } from "./types/fairyring/pep/latest_pub_key" -import { QueuedPubKey } from "./types/fairyring/pep/latest_pub_key" import { PepPacketData } from "./types/fairyring/pep/packet" import { NoData } from "./types/fairyring/pep/packet" import { CurrentKeysPacketData } from "./types/fairyring/pep/packet" import { CurrentKeysPacketAck } from "./types/fairyring/pep/packet" import { Params } from "./types/fairyring/pep/params" +import { TrustedCounterParty } from "./types/fairyring/pep/params" import { PepNonce } from "./types/fairyring/pep/pep_nonce" +import { ActivePubKey } from "./types/fairyring/pep/pub_key" +import { QueuedPubKey } from "./types/fairyring/pep/pub_key" export { AggregatedKeyShare, EncryptedTx, EncryptedTxArray, - ActivePubKey, - QueuedPubKey, PepPacketData, NoData, CurrentKeysPacketData, CurrentKeysPacketAck, Params, + TrustedCounterParty, PepNonce, + ActivePubKey, + QueuedPubKey, } \ No newline at end of file diff --git a/ts-client/fairyring.pep/types/amino/amino.ts b/ts-client/fairyring.pep/types/amino/amino.ts new file mode 100644 index 00000000..4b67dcfe --- /dev/null +++ b/ts-client/fairyring.pep/types/amino/amino.ts @@ -0,0 +1,2 @@ +/* eslint-disable */ +export const protobufPackage = "amino"; diff --git a/ts-client/fairyring.pep/types/cosmos/base/v1beta1/coin.ts b/ts-client/fairyring.pep/types/cosmos/base/v1beta1/coin.ts new file mode 100644 index 00000000..b28eec03 --- /dev/null +++ b/ts-client/fairyring.pep/types/cosmos/base/v1beta1/coin.ts @@ -0,0 +1,261 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "cosmos.base.v1beta1"; + +/** + * 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. + */ +export interface Coin { + denom: string; + amount: string; +} + +/** + * 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. + */ +export interface DecCoin { + denom: string; + amount: string; +} + +/** IntProto defines a Protobuf wrapper around an Int object. */ +export interface IntProto { + int: string; +} + +/** DecProto defines a Protobuf wrapper around a Dec object. */ +export interface DecProto { + dec: string; +} + +function createBaseCoin(): Coin { + return { denom: "", amount: "" }; +} + +export const Coin = { + encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.denom !== "") { + writer.uint32(10).string(message.denom); + } + if (message.amount !== "") { + writer.uint32(18).string(message.amount); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Coin { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCoin(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Coin { + return { + denom: isSet(object.denom) ? String(object.denom) : "", + amount: isSet(object.amount) ? String(object.amount) : "", + }; + }, + + toJSON(message: Coin): unknown { + const obj: any = {}; + message.denom !== undefined && (obj.denom = message.denom); + message.amount !== undefined && (obj.amount = message.amount); + return obj; + }, + + fromPartial, I>>(object: I): Coin { + const message = createBaseCoin(); + message.denom = object.denom ?? ""; + message.amount = object.amount ?? ""; + return message; + }, +}; + +function createBaseDecCoin(): DecCoin { + return { denom: "", amount: "" }; +} + +export const DecCoin = { + encode(message: DecCoin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.denom !== "") { + writer.uint32(10).string(message.denom); + } + if (message.amount !== "") { + writer.uint32(18).string(message.amount); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DecCoin { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDecCoin(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DecCoin { + return { + denom: isSet(object.denom) ? String(object.denom) : "", + amount: isSet(object.amount) ? String(object.amount) : "", + }; + }, + + toJSON(message: DecCoin): unknown { + const obj: any = {}; + message.denom !== undefined && (obj.denom = message.denom); + message.amount !== undefined && (obj.amount = message.amount); + return obj; + }, + + fromPartial, I>>(object: I): DecCoin { + const message = createBaseDecCoin(); + message.denom = object.denom ?? ""; + message.amount = object.amount ?? ""; + return message; + }, +}; + +function createBaseIntProto(): IntProto { + return { int: "" }; +} + +export const IntProto = { + encode(message: IntProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.int !== "") { + writer.uint32(10).string(message.int); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IntProto { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIntProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.int = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): IntProto { + return { int: isSet(object.int) ? String(object.int) : "" }; + }, + + toJSON(message: IntProto): unknown { + const obj: any = {}; + message.int !== undefined && (obj.int = message.int); + return obj; + }, + + fromPartial, I>>(object: I): IntProto { + const message = createBaseIntProto(); + message.int = object.int ?? ""; + return message; + }, +}; + +function createBaseDecProto(): DecProto { + return { dec: "" }; +} + +export const DecProto = { + encode(message: DecProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.dec !== "") { + writer.uint32(10).string(message.dec); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DecProto { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDecProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dec = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DecProto { + return { dec: isSet(object.dec) ? String(object.dec) : "" }; + }, + + toJSON(message: DecProto): unknown { + const obj: any = {}; + message.dec !== undefined && (obj.dec = message.dec); + return obj; + }, + + fromPartial, I>>(object: I): DecProto { + const message = createBaseDecProto(); + message.dec = object.dec ?? ""; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/ts-client/fairyring.pep/types/cosmos_proto/cosmos.ts b/ts-client/fairyring.pep/types/cosmos_proto/cosmos.ts new file mode 100644 index 00000000..79c8d348 --- /dev/null +++ b/ts-client/fairyring.pep/types/cosmos_proto/cosmos.ts @@ -0,0 +1,247 @@ +/* eslint-disable */ +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "cosmos_proto"; + +export enum ScalarType { + SCALAR_TYPE_UNSPECIFIED = 0, + SCALAR_TYPE_STRING = 1, + SCALAR_TYPE_BYTES = 2, + UNRECOGNIZED = -1, +} + +export function scalarTypeFromJSON(object: any): ScalarType { + switch (object) { + case 0: + case "SCALAR_TYPE_UNSPECIFIED": + return ScalarType.SCALAR_TYPE_UNSPECIFIED; + case 1: + case "SCALAR_TYPE_STRING": + return ScalarType.SCALAR_TYPE_STRING; + case 2: + case "SCALAR_TYPE_BYTES": + return ScalarType.SCALAR_TYPE_BYTES; + case -1: + case "UNRECOGNIZED": + default: + return ScalarType.UNRECOGNIZED; + } +} + +export function scalarTypeToJSON(object: ScalarType): string { + switch (object) { + case ScalarType.SCALAR_TYPE_UNSPECIFIED: + return "SCALAR_TYPE_UNSPECIFIED"; + case ScalarType.SCALAR_TYPE_STRING: + return "SCALAR_TYPE_STRING"; + case ScalarType.SCALAR_TYPE_BYTES: + return "SCALAR_TYPE_BYTES"; + case ScalarType.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} + +/** + * InterfaceDescriptor describes an interface type to be used with + * accepts_interface and implements_interface and declared by declare_interface. + */ +export interface InterfaceDescriptor { + /** + * name is the name of the interface. It should be a short-name (without + * a period) such that the fully qualified name of the interface will be + * package.name, ex. for the package a.b and interface named C, the + * fully-qualified name will be a.b.C. + */ + name: string; + /** + * description is a human-readable description of the interface and its + * purpose. + */ + description: string; +} + +/** + * ScalarDescriptor describes an scalar type to be used with + * the scalar field option and declared by declare_scalar. + * Scalars extend simple protobuf built-in types with additional + * syntax and semantics, for instance to represent big integers. + * Scalars should ideally define an encoding such that there is only one + * valid syntactical representation for a given semantic meaning, + * i.e. the encoding should be deterministic. + */ +export interface ScalarDescriptor { + /** + * name is the name of the scalar. It should be a short-name (without + * a period) such that the fully qualified name of the scalar will be + * package.name, ex. for the package a.b and scalar named C, the + * fully-qualified name will be a.b.C. + */ + name: string; + /** + * description is a human-readable description of the scalar and its + * encoding format. For instance a big integer or decimal scalar should + * specify precisely the expected encoding format. + */ + description: string; + /** + * field_type is the type of field with which this scalar can be used. + * Scalars can be used with one and only one type of field so that + * encoding standards and simple and clear. Currently only string and + * bytes fields are supported for scalars. + */ + fieldType: ScalarType[]; +} + +function createBaseInterfaceDescriptor(): InterfaceDescriptor { + return { name: "", description: "" }; +} + +export const InterfaceDescriptor = { + encode(message: InterfaceDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): InterfaceDescriptor { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseInterfaceDescriptor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): InterfaceDescriptor { + return { + name: isSet(object.name) ? String(object.name) : "", + description: isSet(object.description) ? String(object.description) : "", + }; + }, + + toJSON(message: InterfaceDescriptor): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.description !== undefined && (obj.description = message.description); + return obj; + }, + + fromPartial, I>>(object: I): InterfaceDescriptor { + const message = createBaseInterfaceDescriptor(); + message.name = object.name ?? ""; + message.description = object.description ?? ""; + return message; + }, +}; + +function createBaseScalarDescriptor(): ScalarDescriptor { + return { name: "", description: "", fieldType: [] }; +} + +export const ScalarDescriptor = { + encode(message: ScalarDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { + writer.uint32(10).string(message.name); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + writer.uint32(26).fork(); + for (const v of message.fieldType) { + writer.int32(v); + } + writer.ldelim(); + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ScalarDescriptor { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseScalarDescriptor(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.fieldType.push(reader.int32() as any); + } + } else { + message.fieldType.push(reader.int32() as any); + } + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ScalarDescriptor { + return { + name: isSet(object.name) ? String(object.name) : "", + description: isSet(object.description) ? String(object.description) : "", + fieldType: Array.isArray(object?.fieldType) ? object.fieldType.map((e: any) => scalarTypeFromJSON(e)) : [], + }; + }, + + toJSON(message: ScalarDescriptor): unknown { + const obj: any = {}; + message.name !== undefined && (obj.name = message.name); + message.description !== undefined && (obj.description = message.description); + if (message.fieldType) { + obj.fieldType = message.fieldType.map((e) => scalarTypeToJSON(e)); + } else { + obj.fieldType = []; + } + return obj; + }, + + fromPartial, I>>(object: I): ScalarDescriptor { + const message = createBaseScalarDescriptor(); + message.name = object.name ?? ""; + message.description = object.description ?? ""; + message.fieldType = object.fieldType?.map((e) => e) || []; + return message; + }, +}; + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/ts-client/fairyring.pep/types/fairyring/pep/aggregated_key_share.ts b/ts-client/fairyring.pep/types/fairyring/pep/aggregated_key_share.ts index efcf6623..1af00a42 100644 --- a/ts-client/fairyring.pep/types/fairyring/pep/aggregated_key_share.ts +++ b/ts-client/fairyring.pep/types/fairyring/pep/aggregated_key_share.ts @@ -7,12 +7,11 @@ export const protobufPackage = "fairyring.pep"; export interface AggregatedKeyShare { height: number; data: string; - publicKey: string; creator: string; } function createBaseAggregatedKeyShare(): AggregatedKeyShare { - return { height: 0, data: "", publicKey: "", creator: "" }; + return { height: 0, data: "", creator: "" }; } export const AggregatedKeyShare = { @@ -23,11 +22,8 @@ export const AggregatedKeyShare = { if (message.data !== "") { writer.uint32(18).string(message.data); } - if (message.publicKey !== "") { - writer.uint32(26).string(message.publicKey); - } if (message.creator !== "") { - writer.uint32(34).string(message.creator); + writer.uint32(26).string(message.creator); } return writer; }, @@ -46,9 +42,6 @@ export const AggregatedKeyShare = { message.data = reader.string(); break; case 3: - message.publicKey = reader.string(); - break; - case 4: message.creator = reader.string(); break; default: @@ -63,7 +56,6 @@ export const AggregatedKeyShare = { return { height: isSet(object.height) ? Number(object.height) : 0, data: isSet(object.data) ? String(object.data) : "", - publicKey: isSet(object.publicKey) ? String(object.publicKey) : "", creator: isSet(object.creator) ? String(object.creator) : "", }; }, @@ -72,7 +64,6 @@ export const AggregatedKeyShare = { const obj: any = {}; message.height !== undefined && (obj.height = Math.round(message.height)); message.data !== undefined && (obj.data = message.data); - message.publicKey !== undefined && (obj.publicKey = message.publicKey); message.creator !== undefined && (obj.creator = message.creator); return obj; }, @@ -81,7 +72,6 @@ export const AggregatedKeyShare = { const message = createBaseAggregatedKeyShare(); message.height = object.height ?? 0; message.data = object.data ?? ""; - message.publicKey = object.publicKey ?? ""; message.creator = object.creator ?? ""; return message; }, diff --git a/ts-client/fairyring.pep/types/fairyring/pep/encrypted_tx.ts b/ts-client/fairyring.pep/types/fairyring/pep/encrypted_tx.ts index 35382183..9b6c8934 100644 --- a/ts-client/fairyring.pep/types/fairyring/pep/encrypted_tx.ts +++ b/ts-client/fairyring.pep/types/fairyring/pep/encrypted_tx.ts @@ -1,6 +1,7 @@ /* eslint-disable */ import Long from "long"; import _m0 from "protobufjs/minimal"; +import { Coin } from "../../cosmos/base/v1beta1/coin"; export const protobufPackage = "fairyring.pep"; @@ -9,6 +10,7 @@ export interface EncryptedTx { index: number; data: string; creator: string; + chargedGas: Coin | undefined; } export interface EncryptedTxArray { @@ -16,7 +18,7 @@ export interface EncryptedTxArray { } function createBaseEncryptedTx(): EncryptedTx { - return { targetHeight: 0, index: 0, data: "", creator: "" }; + return { targetHeight: 0, index: 0, data: "", creator: "", chargedGas: undefined }; } export const EncryptedTx = { @@ -33,6 +35,9 @@ export const EncryptedTx = { if (message.creator !== "") { writer.uint32(34).string(message.creator); } + if (message.chargedGas !== undefined) { + Coin.encode(message.chargedGas, writer.uint32(42).fork()).ldelim(); + } return writer; }, @@ -55,6 +60,9 @@ export const EncryptedTx = { case 4: message.creator = reader.string(); break; + case 5: + message.chargedGas = Coin.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -69,6 +77,7 @@ export const EncryptedTx = { index: isSet(object.index) ? Number(object.index) : 0, data: isSet(object.data) ? String(object.data) : "", creator: isSet(object.creator) ? String(object.creator) : "", + chargedGas: isSet(object.chargedGas) ? Coin.fromJSON(object.chargedGas) : undefined, }; }, @@ -78,6 +87,8 @@ export const EncryptedTx = { message.index !== undefined && (obj.index = Math.round(message.index)); message.data !== undefined && (obj.data = message.data); message.creator !== undefined && (obj.creator = message.creator); + message.chargedGas !== undefined + && (obj.chargedGas = message.chargedGas ? Coin.toJSON(message.chargedGas) : undefined); return obj; }, @@ -87,6 +98,9 @@ export const EncryptedTx = { message.index = object.index ?? 0; message.data = object.data ?? ""; message.creator = object.creator ?? ""; + message.chargedGas = (object.chargedGas !== undefined && object.chargedGas !== null) + ? Coin.fromPartial(object.chargedGas) + : undefined; return message; }, }; diff --git a/ts-client/fairyring.pep/types/fairyring/pep/genesis.ts b/ts-client/fairyring.pep/types/fairyring/pep/genesis.ts index 6bfef00f..ce0d6e91 100644 --- a/ts-client/fairyring.pep/types/fairyring/pep/genesis.ts +++ b/ts-client/fairyring.pep/types/fairyring/pep/genesis.ts @@ -2,9 +2,9 @@ import _m0 from "protobufjs/minimal"; import { AggregatedKeyShare } from "./aggregated_key_share"; import { EncryptedTxArray } from "./encrypted_tx"; -import { ActivePubKey, QueuedPubKey } from "./latest_pub_key"; import { Params } from "./params"; import { PepNonce } from "./pep_nonce"; +import { ActivePubKey, QueuedPubKey } from "./pub_key"; export const protobufPackage = "fairyring.pep"; diff --git a/ts-client/fairyring.pep/types/fairyring/pep/packet.ts b/ts-client/fairyring.pep/types/fairyring/pep/packet.ts index c5f78fdd..29c8f56c 100644 --- a/ts-client/fairyring.pep/types/fairyring/pep/packet.ts +++ b/ts-client/fairyring.pep/types/fairyring/pep/packet.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import _m0 from "protobufjs/minimal"; -import { ActivePubKey, QueuedPubKey } from "./latest_pub_key"; +import { ActivePubKey, QueuedPubKey } from "./pub_key"; export const protobufPackage = "fairyring.pep"; diff --git a/ts-client/fairyring.pep/types/fairyring/pep/params.ts b/ts-client/fairyring.pep/types/fairyring/pep/params.ts index 9535d02b..21ce2e94 100644 --- a/ts-client/fairyring.pep/types/fairyring/pep/params.ts +++ b/ts-client/fairyring.pep/types/fairyring/pep/params.ts @@ -1,18 +1,41 @@ /* eslint-disable */ import _m0 from "protobufjs/minimal"; +import { Coin } from "../../cosmos/base/v1beta1/coin"; export const protobufPackage = "fairyring.pep"; /** Params defines the parameters for the module. */ export interface Params { + trustedCounterParties: TrustedCounterParty[]; + trustedAddresses: string[]; + channelId: string; + minGasPrice: Coin | undefined; +} + +export interface TrustedCounterParty { + clientId: string; + connectionId: string; + channelId: string; } function createBaseParams(): Params { - return {}; + return { trustedCounterParties: [], trustedAddresses: [], channelId: "", minGasPrice: undefined }; } export const Params = { - encode(_: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.trustedCounterParties) { + TrustedCounterParty.encode(v!, writer.uint32(10).fork()).ldelim(); + } + for (const v of message.trustedAddresses) { + writer.uint32(18).string(v!); + } + if (message.channelId !== "") { + writer.uint32(26).string(message.channelId); + } + if (message.minGasPrice !== undefined) { + Coin.encode(message.minGasPrice, writer.uint32(34).fork()).ldelim(); + } return writer; }, @@ -23,6 +46,18 @@ export const Params = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.trustedCounterParties.push(TrustedCounterParty.decode(reader, reader.uint32())); + break; + case 2: + message.trustedAddresses.push(reader.string()); + break; + case 3: + message.channelId = reader.string(); + break; + case 4: + message.minGasPrice = Coin.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -31,17 +66,114 @@ export const Params = { return message; }, - fromJSON(_: any): Params { - return {}; + fromJSON(object: any): Params { + return { + trustedCounterParties: Array.isArray(object?.trustedCounterParties) + ? object.trustedCounterParties.map((e: any) => TrustedCounterParty.fromJSON(e)) + : [], + trustedAddresses: Array.isArray(object?.trustedAddresses) + ? object.trustedAddresses.map((e: any) => String(e)) + : [], + channelId: isSet(object.channelId) ? String(object.channelId) : "", + minGasPrice: isSet(object.minGasPrice) ? Coin.fromJSON(object.minGasPrice) : undefined, + }; }, - toJSON(_: Params): unknown { + toJSON(message: Params): unknown { const obj: any = {}; + if (message.trustedCounterParties) { + obj.trustedCounterParties = message.trustedCounterParties.map((e) => + e ? TrustedCounterParty.toJSON(e) : undefined + ); + } else { + obj.trustedCounterParties = []; + } + if (message.trustedAddresses) { + obj.trustedAddresses = message.trustedAddresses.map((e) => e); + } else { + obj.trustedAddresses = []; + } + message.channelId !== undefined && (obj.channelId = message.channelId); + message.minGasPrice !== undefined + && (obj.minGasPrice = message.minGasPrice ? Coin.toJSON(message.minGasPrice) : undefined); return obj; }, - fromPartial, I>>(_: I): Params { + fromPartial, I>>(object: I): Params { const message = createBaseParams(); + message.trustedCounterParties = object.trustedCounterParties?.map((e) => TrustedCounterParty.fromPartial(e)) || []; + message.trustedAddresses = object.trustedAddresses?.map((e) => e) || []; + message.channelId = object.channelId ?? ""; + message.minGasPrice = (object.minGasPrice !== undefined && object.minGasPrice !== null) + ? Coin.fromPartial(object.minGasPrice) + : undefined; + return message; + }, +}; + +function createBaseTrustedCounterParty(): TrustedCounterParty { + return { clientId: "", connectionId: "", channelId: "" }; +} + +export const TrustedCounterParty = { + encode(message: TrustedCounterParty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.clientId !== "") { + writer.uint32(10).string(message.clientId); + } + if (message.connectionId !== "") { + writer.uint32(18).string(message.connectionId); + } + if (message.channelId !== "") { + writer.uint32(26).string(message.channelId); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): TrustedCounterParty { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTrustedCounterParty(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + case 3: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): TrustedCounterParty { + return { + clientId: isSet(object.clientId) ? String(object.clientId) : "", + connectionId: isSet(object.connectionId) ? String(object.connectionId) : "", + channelId: isSet(object.channelId) ? String(object.channelId) : "", + }; + }, + + toJSON(message: TrustedCounterParty): unknown { + const obj: any = {}; + message.clientId !== undefined && (obj.clientId = message.clientId); + message.connectionId !== undefined && (obj.connectionId = message.connectionId); + message.channelId !== undefined && (obj.channelId = message.channelId); + return obj; + }, + + fromPartial, I>>(object: I): TrustedCounterParty { + const message = createBaseTrustedCounterParty(); + message.clientId = object.clientId ?? ""; + message.connectionId = object.connectionId ?? ""; + message.channelId = object.channelId ?? ""; return message; }, }; @@ -56,3 +188,7 @@ export type DeepPartial = T extends Builtin ? T type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/ts-client/fairyring.pep/types/fairyring/pep/pub_key.ts b/ts-client/fairyring.pep/types/fairyring/pep/pub_key.ts new file mode 100644 index 00000000..8909617d --- /dev/null +++ b/ts-client/fairyring.pep/types/fairyring/pep/pub_key.ts @@ -0,0 +1,197 @@ +/* eslint-disable */ +import Long from "long"; +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "fairyring.pep"; + +export interface ActivePubKey { + publicKey: string; + creator: string; + expiry: number; +} + +export interface QueuedPubKey { + publicKey: string; + creator: string; + expiry: number; +} + +function createBaseActivePubKey(): ActivePubKey { + return { publicKey: "", creator: "", expiry: 0 }; +} + +export const ActivePubKey = { + encode(message: ActivePubKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.publicKey !== "") { + writer.uint32(10).string(message.publicKey); + } + if (message.creator !== "") { + writer.uint32(18).string(message.creator); + } + if (message.expiry !== 0) { + writer.uint32(24).uint64(message.expiry); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ActivePubKey { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseActivePubKey(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = reader.string(); + break; + case 2: + message.creator = reader.string(); + break; + case 3: + message.expiry = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): ActivePubKey { + return { + publicKey: isSet(object.publicKey) ? String(object.publicKey) : "", + creator: isSet(object.creator) ? String(object.creator) : "", + expiry: isSet(object.expiry) ? Number(object.expiry) : 0, + }; + }, + + toJSON(message: ActivePubKey): unknown { + const obj: any = {}; + message.publicKey !== undefined && (obj.publicKey = message.publicKey); + message.creator !== undefined && (obj.creator = message.creator); + message.expiry !== undefined && (obj.expiry = Math.round(message.expiry)); + return obj; + }, + + fromPartial, I>>(object: I): ActivePubKey { + const message = createBaseActivePubKey(); + message.publicKey = object.publicKey ?? ""; + message.creator = object.creator ?? ""; + message.expiry = object.expiry ?? 0; + return message; + }, +}; + +function createBaseQueuedPubKey(): QueuedPubKey { + return { publicKey: "", creator: "", expiry: 0 }; +} + +export const QueuedPubKey = { + encode(message: QueuedPubKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.publicKey !== "") { + writer.uint32(10).string(message.publicKey); + } + if (message.creator !== "") { + writer.uint32(18).string(message.creator); + } + if (message.expiry !== 0) { + writer.uint32(24).uint64(message.expiry); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueuedPubKey { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueuedPubKey(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = reader.string(); + break; + case 2: + message.creator = reader.string(); + break; + case 3: + message.expiry = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): QueuedPubKey { + return { + publicKey: isSet(object.publicKey) ? String(object.publicKey) : "", + creator: isSet(object.creator) ? String(object.creator) : "", + expiry: isSet(object.expiry) ? Number(object.expiry) : 0, + }; + }, + + toJSON(message: QueuedPubKey): unknown { + const obj: any = {}; + message.publicKey !== undefined && (obj.publicKey = message.publicKey); + message.creator !== undefined && (obj.creator = message.creator); + message.expiry !== undefined && (obj.expiry = Math.round(message.expiry)); + return obj; + }, + + fromPartial, I>>(object: I): QueuedPubKey { + const message = createBaseQueuedPubKey(); + message.publicKey = object.publicKey ?? ""; + message.creator = object.creator ?? ""; + message.expiry = object.expiry ?? 0; + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +declare var global: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") { + return globalThis; + } + if (typeof self !== "undefined") { + return self; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + throw "Unable to locate global object"; +})(); + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +export type DeepPartial = T extends Builtin ? T + : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in keyof T]?: DeepPartial } + : Partial; + +type KeysOfUnion = T extends T ? keyof T : never; +export type Exact = P extends Builtin ? P + : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + _m0.configure(); +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/ts-client/fairyring.pep/types/fairyring/pep/query.ts b/ts-client/fairyring.pep/types/fairyring/pep/query.ts index 6145bd28..c1793585 100644 --- a/ts-client/fairyring.pep/types/fairyring/pep/query.ts +++ b/ts-client/fairyring.pep/types/fairyring/pep/query.ts @@ -3,9 +3,9 @@ import Long from "long"; import _m0 from "protobufjs/minimal"; import { PageRequest, PageResponse } from "../../cosmos/base/query/v1beta1/pagination"; import { EncryptedTx, EncryptedTxArray } from "./encrypted_tx"; -import { ActivePubKey, QueuedPubKey } from "./latest_pub_key"; import { Params } from "./params"; import { PepNonce } from "./pep_nonce"; +import { ActivePubKey, QueuedPubKey } from "./pub_key"; export const protobufPackage = "fairyring.pep"; diff --git a/ts-client/fairyring.pep/types/fairyring/pep/tx.ts b/ts-client/fairyring.pep/types/fairyring/pep/tx.ts index f65db315..e7a9c6f2 100644 --- a/ts-client/fairyring.pep/types/fairyring/pep/tx.ts +++ b/ts-client/fairyring.pep/types/fairyring/pep/tx.ts @@ -18,7 +18,6 @@ export interface MsgCreateAggregatedKeyShare { creator: string; height: number; data: string; - publicKey: string; } export interface MsgCreateAggregatedKeyShareResponse { @@ -131,7 +130,7 @@ export const MsgSubmitEncryptedTxResponse = { }; function createBaseMsgCreateAggregatedKeyShare(): MsgCreateAggregatedKeyShare { - return { creator: "", height: 0, data: "", publicKey: "" }; + return { creator: "", height: 0, data: "" }; } export const MsgCreateAggregatedKeyShare = { @@ -145,9 +144,6 @@ export const MsgCreateAggregatedKeyShare = { if (message.data !== "") { writer.uint32(26).string(message.data); } - if (message.publicKey !== "") { - writer.uint32(34).string(message.publicKey); - } return writer; }, @@ -167,9 +163,6 @@ export const MsgCreateAggregatedKeyShare = { case 3: message.data = reader.string(); break; - case 4: - message.publicKey = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -183,7 +176,6 @@ export const MsgCreateAggregatedKeyShare = { creator: isSet(object.creator) ? String(object.creator) : "", height: isSet(object.height) ? Number(object.height) : 0, data: isSet(object.data) ? String(object.data) : "", - publicKey: isSet(object.publicKey) ? String(object.publicKey) : "", }; }, @@ -192,7 +184,6 @@ export const MsgCreateAggregatedKeyShare = { message.creator !== undefined && (obj.creator = message.creator); message.height !== undefined && (obj.height = Math.round(message.height)); message.data !== undefined && (obj.data = message.data); - message.publicKey !== undefined && (obj.publicKey = message.publicKey); return obj; }, @@ -201,7 +192,6 @@ export const MsgCreateAggregatedKeyShare = { message.creator = object.creator ?? ""; message.height = object.height ?? 0; message.data = object.data ?? ""; - message.publicKey = object.publicKey ?? ""; return message; }, }; diff --git a/x/keyshare/client/cli/query.go b/x/keyshare/client/cli/query.go index a122143a..06b54801 100644 --- a/x/keyshare/client/cli/query.go +++ b/x/keyshare/client/cli/query.go @@ -32,6 +32,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdListAggregatedKeyShare()) cmd.AddCommand(CmdShowAggregatedKeyShare()) cmd.AddCommand(CmdShowPubKey()) + cmd.AddCommand(CmdListAuthorizedAddress()) + cmd.AddCommand(CmdShowAuthorizedAddress()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/keyshare/client/cli/query_aggregated_key_share.go b/x/keyshare/client/cli/query_aggregated_key_share.go index c1cc2fad..97cf573b 100644 --- a/x/keyshare/client/cli/query_aggregated_key_share.go +++ b/x/keyshare/client/cli/query_aggregated_key_share.go @@ -14,9 +14,12 @@ import ( func CmdListAggregatedKeyShare() *cobra.Command { cmd := &cobra.Command{ Use: "list-aggregated-key-share", - Short: "list all AggregatedKeyShare", + Short: "list all aggregated keyshares for all blocks", RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { @@ -47,10 +50,13 @@ func CmdListAggregatedKeyShare() *cobra.Command { func CmdShowAggregatedKeyShare() *cobra.Command { cmd := &cobra.Command{ Use: "show-aggregated-key-share [height]", - Short: "shows a AggregatedKeyShare", + Short: "shows a aggregated keyshare for a particular block", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/keyshare/client/cli/query_aggregated_key_share_test.go b/x/keyshare/client/cli/query_aggregated_key_share_test.go index 41e391de..60c09254 100644 --- a/x/keyshare/client/cli/query_aggregated_key_share_test.go +++ b/x/keyshare/client/cli/query_aggregated_key_share_test.go @@ -5,10 +5,10 @@ import ( "strconv" "testing" + tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/stretchr/testify/require" - tmcli "github.com/tendermint/tendermint/libs/cli" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/keyshare/client/cli/query_authorized_address.go b/x/keyshare/client/cli/query_authorized_address.go new file mode 100644 index 00000000..4973d671 --- /dev/null +++ b/x/keyshare/client/cli/query_authorized_address.go @@ -0,0 +1,73 @@ +package cli + +import ( + "context" + + "fairyring/x/keyshare/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" +) + +func CmdListAuthorizedAddress() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-authorized-address", + Short: "list all authorizedAddress", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAllAuthorizedAddressRequest{ + Pagination: pageReq, + } + + res, err := queryClient.AuthorizedAddressAll(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddPaginationFlagsToCmd(cmd, cmd.Use) + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdShowAuthorizedAddress() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-authorized-address [target]", + Short: "shows a authorizedAddress", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + argTarget := args[0] + + params := &types.QueryGetAuthorizedAddressRequest{ + Target: argTarget, + } + + res, err := queryClient.AuthorizedAddress(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/keyshare/client/cli/query_authorized_address_test.go b/x/keyshare/client/cli/query_authorized_address_test.go new file mode 100644 index 00000000..b350acf5 --- /dev/null +++ b/x/keyshare/client/cli/query_authorized_address_test.go @@ -0,0 +1,161 @@ +package cli_test + +import ( + "fmt" + "strconv" + "testing" + + "github.com/cosmos/cosmos-sdk/client/flags" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + "github.com/stretchr/testify/require" + tmcli "github.com/tendermint/tendermint/libs/cli" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "fairyring/testutil/network" + "fairyring/testutil/nullify" + "fairyring/x/keyshare/client/cli" + "fairyring/x/keyshare/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func networkWithAuthorizedAddressObjects(t *testing.T, n int) (*network.Network, []types.AuthorizedAddress) { + t.Helper() + cfg := network.DefaultConfig() + state := types.GenesisState{} + require.NoError(t, cfg.Codec.UnmarshalJSON(cfg.GenesisState[types.ModuleName], &state)) + + for i := 0; i < n; i++ { + authorizedAddress := types.AuthorizedAddress{ + Target: strconv.Itoa(i), + } + nullify.Fill(&authorizedAddress) + state.AuthorizedAddressList = append(state.AuthorizedAddressList, authorizedAddress) + } + buf, err := cfg.Codec.MarshalJSON(&state) + require.NoError(t, err) + cfg.GenesisState[types.ModuleName] = buf + return network.New(t, cfg), state.AuthorizedAddressList +} + +func TestShowAuthorizedAddress(t *testing.T) { + net, objs := networkWithAuthorizedAddressObjects(t, 2) + + ctx := net.Validators[0].ClientCtx + common := []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + for _, tc := range []struct { + desc string + idTarget string + + args []string + err error + obj types.AuthorizedAddress + }{ + { + desc: "found", + idTarget: objs[0].Target, + + args: common, + obj: objs[0], + }, + { + desc: "not found", + idTarget: strconv.Itoa(100000), + + args: common, + err: status.Error(codes.NotFound, "not found"), + }, + } { + t.Run(tc.desc, func(t *testing.T) { + args := []string{ + tc.idTarget, + } + args = append(args, tc.args...) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdShowAuthorizedAddress(), args) + if tc.err != nil { + stat, ok := status.FromError(tc.err) + require.True(t, ok) + require.ErrorIs(t, stat.Err(), tc.err) + } else { + require.NoError(t, err) + var resp types.QueryGetAuthorizedAddressResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.NotNil(t, resp.AuthorizedAddress) + require.Equal(t, + nullify.Fill(&tc.obj), + nullify.Fill(&resp.AuthorizedAddress), + ) + } + }) + } +} + +func TestListAuthorizedAddress(t *testing.T) { + net, objs := networkWithAuthorizedAddressObjects(t, 5) + + ctx := net.Validators[0].ClientCtx + request := func(next []byte, offset, limit uint64, total bool) []string { + args := []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + } + if next == nil { + args = append(args, fmt.Sprintf("--%s=%d", flags.FlagOffset, offset)) + } else { + args = append(args, fmt.Sprintf("--%s=%s", flags.FlagPageKey, next)) + } + args = append(args, fmt.Sprintf("--%s=%d", flags.FlagLimit, limit)) + if total { + args = append(args, fmt.Sprintf("--%s", flags.FlagCountTotal)) + } + return args + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(objs); i += step { + args := request(nil, uint64(i), uint64(step), false) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListAuthorizedAddress(), args) + require.NoError(t, err) + var resp types.QueryAllAuthorizedAddressResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.LessOrEqual(t, len(resp.AuthorizedAddress), step) + require.Subset(t, + nullify.Fill(objs), + nullify.Fill(resp.AuthorizedAddress), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(objs); i += step { + args := request(next, 0, uint64(step), false) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListAuthorizedAddress(), args) + require.NoError(t, err) + var resp types.QueryAllAuthorizedAddressResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.LessOrEqual(t, len(resp.AuthorizedAddress), step) + require.Subset(t, + nullify.Fill(objs), + nullify.Fill(resp.AuthorizedAddress), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + args := request(nil, 0, uint64(len(objs)), true) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdListAuthorizedAddress(), args) + require.NoError(t, err) + var resp types.QueryAllAuthorizedAddressResponse + require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.NoError(t, err) + require.Equal(t, len(objs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(objs), + nullify.Fill(resp.AuthorizedAddress), + ) + }) +} diff --git a/x/keyshare/client/cli/query_key_share.go b/x/keyshare/client/cli/query_key_share.go index 4ff3c6be..b8a3b192 100644 --- a/x/keyshare/client/cli/query_key_share.go +++ b/x/keyshare/client/cli/query_key_share.go @@ -14,9 +14,12 @@ import ( func CmdListKeyShare() *cobra.Command { cmd := &cobra.Command{ Use: "list-key-share", - Short: "list all keyShare", + Short: "List all keyshares of all validators", RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { @@ -47,10 +50,13 @@ func CmdListKeyShare() *cobra.Command { func CmdShowKeyShare() *cobra.Command { cmd := &cobra.Command{ Use: "show-key-share [validator] [block-height]", - Short: "shows a keyShare", + Short: "shows the keyshare of a particular validator for a particular block", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/keyshare/client/cli/query_key_share_test.go b/x/keyshare/client/cli/query_key_share_test.go index 104fa790..bc4fd69c 100644 --- a/x/keyshare/client/cli/query_key_share_test.go +++ b/x/keyshare/client/cli/query_key_share_test.go @@ -5,10 +5,10 @@ import ( "strconv" "testing" + tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/stretchr/testify/require" - tmcli "github.com/tendermint/tendermint/libs/cli" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/keyshare/client/cli/query_params.go b/x/keyshare/client/cli/query_params.go index 53864d0a..a37073b6 100644 --- a/x/keyshare/client/cli/query_params.go +++ b/x/keyshare/client/cli/query_params.go @@ -16,7 +16,10 @@ func CmdQueryParams() *cobra.Command { Short: "shows the parameters of the module", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/keyshare/client/cli/query_pubkey.go b/x/keyshare/client/cli/query_pubkey.go index f70f3911..518f96ac 100644 --- a/x/keyshare/client/cli/query_pubkey.go +++ b/x/keyshare/client/cli/query_pubkey.go @@ -13,9 +13,12 @@ import ( func CmdShowPubKey() *cobra.Command { cmd := &cobra.Command{ Use: "show-active-pub-key", - Short: "Show the active public key", + Short: "Show the active and queued public key", RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/keyshare/client/cli/query_validator_set.go b/x/keyshare/client/cli/query_validator_set.go index 84727a8a..3ac8c657 100644 --- a/x/keyshare/client/cli/query_validator_set.go +++ b/x/keyshare/client/cli/query_validator_set.go @@ -13,9 +13,12 @@ import ( func CmdListValidatorSet() *cobra.Command { cmd := &cobra.Command{ Use: "list-validator-set", - Short: "list all validatorSet", + Short: "Show the list of all registered validators for all blocks", RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { @@ -46,10 +49,13 @@ func CmdListValidatorSet() *cobra.Command { func CmdShowValidatorSet() *cobra.Command { cmd := &cobra.Command{ Use: "show-validator-set [index]", - Short: "shows a validatorSet", + Short: "shows a validatorSet for a particular block", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/keyshare/client/cli/query_validator_set_test.go b/x/keyshare/client/cli/query_validator_set_test.go index 3a98af65..2353fed2 100644 --- a/x/keyshare/client/cli/query_validator_set_test.go +++ b/x/keyshare/client/cli/query_validator_set_test.go @@ -5,10 +5,10 @@ import ( "strconv" "testing" + tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/stretchr/testify/require" - tmcli "github.com/tendermint/tendermint/libs/cli" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/keyshare/client/cli/tx.go b/x/keyshare/client/cli/tx.go index d6ab8a94..e91fa154 100644 --- a/x/keyshare/client/cli/tx.go +++ b/x/keyshare/client/cli/tx.go @@ -28,6 +28,9 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(CmdRegisterValidator()) cmd.AddCommand(CmdSendKeyshare()) cmd.AddCommand(CmdCreateLatestPubKey()) + cmd.AddCommand(CmdCreateAuthorizedAddress()) + cmd.AddCommand(CmdUpdateAuthorizedAddress()) + cmd.AddCommand(CmdDeleteAuthorizedAddress()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/keyshare/client/cli/tx_authorized_address.go b/x/keyshare/client/cli/tx_authorized_address.go new file mode 100644 index 00000000..ebdbe80f --- /dev/null +++ b/x/keyshare/client/cli/tx_authorized_address.go @@ -0,0 +1,106 @@ +package cli + +import ( + "fairyring/x/keyshare/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/spf13/cast" + "github.com/spf13/cobra" +) + +func CmdCreateAuthorizedAddress() *cobra.Command { + cmd := &cobra.Command{ + Use: "create-authorized-address [target]", + Short: "Create a new authorizedAddress", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + // Get indexes + indexTarget := args[0] + + // Get value arguments + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgCreateAuthorizedAddress( + clientCtx.GetFromAddress().String(), + indexTarget, + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func CmdUpdateAuthorizedAddress() *cobra.Command { + cmd := &cobra.Command{ + Use: "update-authorized-address [target] [is-authorized]", + Short: "Update a authorizedAddress", + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) (err error) { + // Get indexes + indexTarget := args[0] + + isAuthorized := cast.ToBool(args[1]) + + // Get value arguments + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgUpdateAuthorizedAddress( + clientCtx.GetFromAddress().String(), + indexTarget, + isAuthorized, + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} + +func CmdDeleteAuthorizedAddress() *cobra.Command { + cmd := &cobra.Command{ + Use: "delete-authorized-address [target]", + Short: "Delete a authorizedAddress", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + indexTarget := args[0] + + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + msg := types.NewMsgDeleteAuthorizedAddress( + clientCtx.GetFromAddress().String(), + indexTarget, + ) + if err := msg.ValidateBasic(); err != nil { + return err + } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/keyshare/client/cli/tx_authorized_address_test.go b/x/keyshare/client/cli/tx_authorized_address_test.go new file mode 100644 index 00000000..4eb95d49 --- /dev/null +++ b/x/keyshare/client/cli/tx_authorized_address_test.go @@ -0,0 +1,187 @@ +package cli_test + +import ( + "fmt" + "strconv" + "testing" + + sdkmath "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/client/flags" + clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" + + "fairyring/testutil/network" + "fairyring/x/keyshare/client/cli" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestCreateAuthorizedAddress(t *testing.T) { + net := network.New(t) + val := net.Validators[0] + ctx := val.ClientCtx + + fields := []string{} + for _, tc := range []struct { + desc string + idTarget string + + args []string + err error + code uint32 + }{ + { + idTarget: strconv.Itoa(0), + + desc: "valid", + args: []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(net.Config.BondDenom, sdkmath.NewInt(10))).String()), + }, + }, + } { + t.Run(tc.desc, func(t *testing.T) { + args := []string{ + tc.idTarget, + } + args = append(args, fields...) + args = append(args, tc.args...) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdCreateAuthorizedAddress(), args) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + var resp sdk.TxResponse + require.NoError(t, ctx.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.Equal(t, tc.code, resp.Code) + } + }) + } +} + +func TestUpdateAuthorizedAddress(t *testing.T) { + net := network.New(t) + val := net.Validators[0] + ctx := val.ClientCtx + + fields := []string{} + common := []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(net.Config.BondDenom, sdkmath.NewInt(10))).String()), + } + args := []string{ + "0", + } + args = append(args, fields...) + args = append(args, common...) + _, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdCreateAuthorizedAddress(), args) + require.NoError(t, err) + + for _, tc := range []struct { + desc string + idTarget string + + args []string + code uint32 + err error + }{ + { + desc: "valid", + idTarget: strconv.Itoa(0), + + args: common, + }, + { + desc: "key not found", + idTarget: strconv.Itoa(100000), + + args: common, + code: sdkerrors.ErrKeyNotFound.ABCICode(), + }, + } { + t.Run(tc.desc, func(t *testing.T) { + args := []string{ + tc.idTarget, + } + args = append(args, fields...) + args = append(args, tc.args...) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdUpdateAuthorizedAddress(), args) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + var resp sdk.TxResponse + require.NoError(t, ctx.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.Equal(t, tc.code, resp.Code) + } + }) + } +} + +func TestDeleteAuthorizedAddress(t *testing.T) { + net := network.New(t) + + val := net.Validators[0] + ctx := val.ClientCtx + + fields := []string{} + common := []string{ + fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(net.Config.BondDenom, sdkmath.NewInt(10))).String()), + } + args := []string{ + "0", + } + args = append(args, fields...) + args = append(args, common...) + _, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdCreateAuthorizedAddress(), args) + require.NoError(t, err) + + for _, tc := range []struct { + desc string + idTarget string + + args []string + code uint32 + err error + }{ + { + desc: "valid", + idTarget: strconv.Itoa(0), + + args: common, + }, + { + desc: "key not found", + idTarget: strconv.Itoa(100000), + + args: common, + code: sdkerrors.ErrKeyNotFound.ABCICode(), + }, + } { + t.Run(tc.desc, func(t *testing.T) { + args := []string{ + tc.idTarget, + } + args = append(args, tc.args...) + out, err := clitestutil.ExecTestCLICmd(ctx, cli.CmdDeleteAuthorizedAddress(), args) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + var resp sdk.TxResponse + require.NoError(t, ctx.Codec.UnmarshalJSON(out.Bytes(), &resp)) + require.Equal(t, tc.code, resp.Code) + } + }) + } +} diff --git a/x/keyshare/client/cli/tx_latest_pub_key.go b/x/keyshare/client/cli/tx_latest_pub_key.go index 4600a6ab..04386d0a 100644 --- a/x/keyshare/client/cli/tx_latest_pub_key.go +++ b/x/keyshare/client/cli/tx_latest_pub_key.go @@ -2,6 +2,7 @@ package cli import ( "fairyring/x/keyshare/types" + "strings" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" @@ -11,14 +12,17 @@ import ( func CmdCreateLatestPubKey() *cobra.Command { cmd := &cobra.Command{ - Use: "create-latest-pub-key [public-key]", + Use: "create-latest-pub-key [public-key] [commitments]", Short: "Create a latest public key", - Args: cobra.ExactArgs(1), + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { // Get value arguments argPublicKey := args[0] + commitmentStr := args[1] + commitments := strings.Split(commitmentStr, ",") + clientCtx, err := client.GetClientTxContext(cmd) if err != nil { return err @@ -27,10 +31,8 @@ func CmdCreateLatestPubKey() *cobra.Command { msg := types.NewMsgCreateLatestPubKey( clientCtx.GetFromAddress().String(), argPublicKey, + commitments, ) - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/keyshare/client/cli/tx_latest_pub_key_test.go b/x/keyshare/client/cli/tx_latest_pub_key_test.go index 9fe28051..deb638be 100644 --- a/x/keyshare/client/cli/tx_latest_pub_key_test.go +++ b/x/keyshare/client/cli/tx_latest_pub_key_test.go @@ -39,7 +39,7 @@ func TestCreateLatestPubKey(t *testing.T) { args: []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(net.Config.BondDenom, sdkmath.NewInt(10))).String()), }, }, diff --git a/x/keyshare/client/cli/tx_register_validator.go b/x/keyshare/client/cli/tx_register_validator.go index 3bdc6fcf..d0b83949 100644 --- a/x/keyshare/client/cli/tx_register_validator.go +++ b/x/keyshare/client/cli/tx_register_validator.go @@ -16,7 +16,7 @@ var _ = strconv.Itoa(0) func CmdRegisterValidator() *cobra.Command { cmd := &cobra.Command{ Use: "register-validator", - Short: "Broadcast message registerValidator", + Short: "Register a validator for being eligible to send keyshares", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) (err error) { @@ -28,9 +28,6 @@ func CmdRegisterValidator() *cobra.Command { msg := types.NewMsgRegisterValidator( clientCtx.GetFromAddress().String(), ) - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/keyshare/client/cli/tx_send_keyshare.go b/x/keyshare/client/cli/tx_send_keyshare.go index e934e9f6..045503a1 100644 --- a/x/keyshare/client/cli/tx_send_keyshare.go +++ b/x/keyshare/client/cli/tx_send_keyshare.go @@ -16,19 +16,18 @@ var _ = strconv.Itoa(0) func CmdSendKeyshare() *cobra.Command { cmd := &cobra.Command{ - Use: "send-keyshare [message] [commitment] [keyshare-index] [block-height]", + Use: "send-keyshare [message] [keyshare-index] [block-height]", Short: "Broadcast message sendKeyshare", - Args: cobra.ExactArgs(4), + Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) (err error) { argMessage := args[0] - argCommitment := args[1] - keyshareIndex, err := cast.ToUint64E(args[2]) + keyshareIndex, err := cast.ToUint64E(args[1]) if err != nil { return err } - argBlockHeight, err := cast.ToUint64E(args[3]) + argBlockHeight, err := cast.ToUint64E(args[2]) if err != nil { return err } @@ -41,13 +40,9 @@ func CmdSendKeyshare() *cobra.Command { msg := types.NewMsgSendKeyshare( clientCtx.GetFromAddress().String(), argMessage, - argCommitment, keyshareIndex, argBlockHeight, ) - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/keyshare/genesis.go b/x/keyshare/genesis.go index 69f89890..ad78cb56 100644 --- a/x/keyshare/genesis.go +++ b/x/keyshare/genesis.go @@ -26,6 +26,10 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) // Set queued public key k.SetQueuedPubKey(ctx, genState.QueuedPubKey) + // Set all the authorizedAddress + for _, elem := range genState.AuthorizedAddressList { + k.SetAuthorizedAddress(ctx, elem) + } // this line is used by starport scaffolding # genesis/module/init k.SetParams(ctx, genState.Params) } @@ -48,6 +52,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.QueuedPubKey = qkey } + genesis.AuthorizedAddressList = k.GetAllAuthorizedAddress(ctx) // this line is used by starport scaffolding # genesis/module/export return genesis diff --git a/x/keyshare/genesis_test.go b/x/keyshare/genesis_test.go index 3087488f..1798ba4f 100644 --- a/x/keyshare/genesis_test.go +++ b/x/keyshare/genesis_test.go @@ -41,6 +41,14 @@ func TestGenesis(t *testing.T) { Height: 1, }, }, + AuthorizedAddressList: []types.AuthorizedAddress{ + { + Target: "0", + }, + { + Target: "1", + }, + }, // this line is used by starport scaffolding # genesis/test/state } @@ -55,5 +63,6 @@ func TestGenesis(t *testing.T) { require.ElementsMatch(t, genesisState.ValidatorSetList, got.ValidatorSetList) require.ElementsMatch(t, genesisState.KeyShareList, got.KeyShareList) require.ElementsMatch(t, genesisState.AggregatedKeyShareList, got.AggregatedKeyShareList) + require.ElementsMatch(t, genesisState.AuthorizedAddressList, got.AuthorizedAddressList) // this line is used by starport scaffolding # genesis/test/assert } diff --git a/x/keyshare/keeper/authorized_address.go b/x/keyshare/keeper/authorized_address.go new file mode 100644 index 00000000..c9ba0caa --- /dev/null +++ b/x/keyshare/keeper/authorized_address.go @@ -0,0 +1,116 @@ +package keeper + +import ( + "encoding/binary" + "fairyring/x/keyshare/types" + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k Keeper) GetAuthorizedCount( + ctx sdk.Context, + creator string, +) uint64 { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AuthorizedCountKeyPrefix)) + + b := store.Get(types.AuthorizedCountKey( + creator, + )) + if b == nil { + return 0 + } + + return binary.BigEndian.Uint64(b) +} + +func (k Keeper) IncreaseAuthorizedCount( + ctx sdk.Context, + creator string, +) { + count := k.GetAuthorizedCount(ctx, creator) + + countByte := make([]byte, 8) + + binary.BigEndian.PutUint64(countByte, count+1) + + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AuthorizedCountKeyPrefix)) + + store.Set(types.AuthorizedCountKey(creator), countByte) +} + +func (k Keeper) DecreaseAuthorizedCount( + ctx sdk.Context, + creator string, +) { + count := k.GetAuthorizedCount(ctx, creator) + + countByte := make([]byte, 8) + + var newCount uint64 = 0 + + if count > 0 { + newCount = count - 1 + } + + binary.BigEndian.PutUint64(countByte, newCount) + + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AuthorizedCountKeyPrefix)) + + store.Set(types.AuthorizedCountKey(creator), countByte) +} + +// SetAuthorizedAddress set a specific authorizedAddress in the store from its index +func (k Keeper) SetAuthorizedAddress(ctx sdk.Context, authorizedAddress types.AuthorizedAddress) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AuthorizedAddressKeyPrefix)) + b := k.cdc.MustMarshal(&authorizedAddress) + store.Set(types.AuthorizedAddressKey( + authorizedAddress.Target, + ), b) +} + +// GetAuthorizedAddress returns a authorizedAddress from its index +func (k Keeper) GetAuthorizedAddress( + ctx sdk.Context, + target string, + +) (val types.AuthorizedAddress, found bool) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AuthorizedAddressKeyPrefix)) + + b := store.Get(types.AuthorizedAddressKey( + target, + )) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + return val, true +} + +// RemoveAuthorizedAddress removes a authorizedAddress from the store +func (k Keeper) RemoveAuthorizedAddress( + ctx sdk.Context, + target string, + +) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AuthorizedAddressKeyPrefix)) + store.Delete(types.AuthorizedAddressKey( + target, + )) +} + +// GetAllAuthorizedAddress returns all authorizedAddress +func (k Keeper) GetAllAuthorizedAddress(ctx sdk.Context) (list []types.AuthorizedAddress) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.AuthorizedAddressKeyPrefix)) + iterator := sdk.KVStorePrefixIterator(store, []byte{}) + + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + var val types.AuthorizedAddress + k.cdc.MustUnmarshal(iterator.Value(), &val) + list = append(list, val) + } + + return +} diff --git a/x/keyshare/keeper/authorized_address_test.go b/x/keyshare/keeper/authorized_address_test.go new file mode 100644 index 00000000..a4fc8e49 --- /dev/null +++ b/x/keyshare/keeper/authorized_address_test.go @@ -0,0 +1,63 @@ +package keeper_test + +import ( + "strconv" + "testing" + + keepertest "fairyring/testutil/keeper" + "fairyring/testutil/nullify" + "fairyring/x/keyshare/keeper" + "fairyring/x/keyshare/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func createNAuthorizedAddress(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.AuthorizedAddress { + items := make([]types.AuthorizedAddress, n) + for i := range items { + items[i].Target = strconv.Itoa(i) + + keeper.SetAuthorizedAddress(ctx, items[i]) + } + return items +} + +func TestAuthorizedAddressGet(t *testing.T) { + keeper, ctx := keepertest.KeyshareKeeper(t) + items := createNAuthorizedAddress(keeper, ctx, 10) + for _, item := range items { + rst, found := keeper.GetAuthorizedAddress(ctx, + item.Target, + ) + require.True(t, found) + require.Equal(t, + nullify.Fill(&item), + nullify.Fill(&rst), + ) + } +} +func TestAuthorizedAddressRemove(t *testing.T) { + keeper, ctx := keepertest.KeyshareKeeper(t) + items := createNAuthorizedAddress(keeper, ctx, 10) + for _, item := range items { + keeper.RemoveAuthorizedAddress(ctx, + item.Target, + ) + _, found := keeper.GetAuthorizedAddress(ctx, + item.Target, + ) + require.False(t, found) + } +} + +func TestAuthorizedAddressGetAll(t *testing.T) { + keeper, ctx := keepertest.KeyshareKeeper(t) + items := createNAuthorizedAddress(keeper, ctx, 10) + require.ElementsMatch(t, + nullify.Fill(items), + nullify.Fill(keeper.GetAllAuthorizedAddress(ctx)), + ) +} diff --git a/x/keyshare/keeper/commitments.go b/x/keyshare/keeper/commitments.go new file mode 100644 index 00000000..3df01bb1 --- /dev/null +++ b/x/keyshare/keeper/commitments.go @@ -0,0 +1,65 @@ +package keeper + +import ( + "fairyring/x/keyshare/types" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// SetActiveCommitments set a specific public key to active in the store +func (k Keeper) SetActiveCommitments(ctx sdk.Context, commits types.Commitments) { + store := ctx.KVStore(k.storeKey) + b := k.cdc.MustMarshal(&commits) + store.Set(types.KeyPrefix(types.ActiveCommitmentsPrefix), b) +} + +// SetQueuedCommitments set a specific public key in the store +func (k Keeper) SetQueuedCommitments(ctx sdk.Context, commits types.Commitments) { + store := ctx.KVStore(k.storeKey) + b := k.cdc.MustMarshal(&commits) + store.Set(types.KeyPrefix(types.QueuedCommitmentsPrefix), b) +} + +// GetActiveCommitments returns the Active public key +func (k Keeper) GetActiveCommitments( + ctx sdk.Context, +) (val types.Commitments, found bool) { + store := ctx.KVStore(k.storeKey) + + b := store.Get(types.KeyPrefix(types.ActiveCommitmentsPrefix)) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + + return val, true +} + +// GetQueuedCommitments returns the Queued public key +func (k Keeper) GetQueuedCommitments( + ctx sdk.Context, +) (val types.Commitments, found bool) { + store := ctx.KVStore(k.storeKey) + + b := store.Get(types.KeyPrefix(types.QueuedCommitmentsPrefix)) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + + return val, true +} + +// DeleteActiveCommitments deletes the active public key in the store +func (k Keeper) DeleteActiveCommitments(ctx sdk.Context) { + store := ctx.KVStore(k.storeKey) + store.Delete(types.KeyPrefix(types.ActiveCommitmentsPrefix)) +} + +// DeleteQueuedCommitments deletes the queued public key in the store +func (k Keeper) DeleteQueuedCommitments(ctx sdk.Context) { + store := ctx.KVStore(k.storeKey) + store.Delete(types.KeyPrefix(types.QueuedCommitmentsPrefix)) +} diff --git a/x/keyshare/keeper/keeper.go b/x/keyshare/keeper/keeper.go index 8d723258..79ea15e1 100644 --- a/x/keyshare/keeper/keeper.go +++ b/x/keyshare/keeper/keeper.go @@ -3,16 +3,13 @@ package keeper import ( "fmt" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - "fairyring/x/keyshare/types" - pepKeeper "fairyring/x/pep/keeper" + "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" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/tendermint/tendermint/libs/log" ) type ( @@ -21,8 +18,8 @@ type ( storeKey storetypes.StoreKey memKey storetypes.StoreKey paramstore paramtypes.Subspace - stakingKeeper stakingkeeper.Keeper - pepKeeper pepKeeper.Keeper + stakingKeeper types.StakingKeeper + pepKeeper types.PepKeeper } ) @@ -31,8 +28,8 @@ func NewKeeper( storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, - pk pepKeeper.Keeper, - stakingKeeper stakingkeeper.Keeper, + pk types.PepKeeper, + stakingKeeper types.StakingKeeper, ) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { @@ -49,7 +46,7 @@ func NewKeeper( } } -func (k Keeper) StakingKeeper() stakingkeeper.Keeper { +func (k Keeper) StakingKeeper() types.StakingKeeper { return k.stakingKeeper } diff --git a/x/keyshare/keeper/last_submitted_height.go b/x/keyshare/keeper/last_submitted_height.go new file mode 100644 index 00000000..429696d5 --- /dev/null +++ b/x/keyshare/keeper/last_submitted_height.go @@ -0,0 +1,26 @@ +package keeper + +import ( + "fairyring/x/keyshare/types" + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "strconv" +) + +func (k Keeper) SetLastSubmittedHeight(ctx sdk.Context, validator, height string) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.KeyLastSubmittedHeightPrefix)) + store.Set(types.LastSubmittedHeightKey(validator), []byte(height)) +} + +func (k Keeper) GetLastSubmittedHeight(ctx sdk.Context, validator string) uint64 { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.KeyLastSubmittedHeightPrefix)) + b := store.Get(types.LastSubmittedHeightKey(validator)) + if len(b) == 0 { + return 0 + } + if val, err := strconv.ParseUint(string(b), 10, 64); err != nil { + return 0 + } else { + return val + } +} diff --git a/x/keyshare/keeper/msg_server_authorized_address.go b/x/keyshare/keeper/msg_server_authorized_address.go new file mode 100644 index 00000000..5a231d60 --- /dev/null +++ b/x/keyshare/keeper/msg_server_authorized_address.go @@ -0,0 +1,102 @@ +package keeper + +import ( + "context" + "fairyring/x/keyshare/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k msgServer) CreateAuthorizedAddress(goCtx context.Context, msg *types.MsgCreateAuthorizedAddress) (*types.MsgCreateAuthorizedAddressResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + _, isFound := k.GetAuthorizedAddress( + ctx, + msg.Target, + ) + if isFound { + return nil, types.ErrAddressAlreadyAuthorized + } + + if msg.Target == msg.Creator { + return nil, types.ErrAuthorizeSelfAddress + } + + _, found := k.GetValidatorSet(ctx, msg.Creator) + // Only allow registered validator to authorize address + if !found { + return nil, types.ErrOnlyValidatorCanAuthorizeAddr.Wrap(msg.Creator) + } + + if k.GetAuthorizedCount(ctx, msg.Creator) >= 1 { + return nil, types.ErrExceedMaxAuthAddr + } + + var authorizedAddress = types.AuthorizedAddress{ + AuthorizedBy: msg.Creator, + Target: msg.Target, + IsAuthorized: true, + } + + k.SetAuthorizedAddress( + ctx, + authorizedAddress, + ) + k.IncreaseAuthorizedCount(ctx, msg.Creator) + return &types.MsgCreateAuthorizedAddressResponse{}, nil +} + +func (k msgServer) UpdateAuthorizedAddress(goCtx context.Context, msg *types.MsgUpdateAuthorizedAddress) (*types.MsgUpdateAuthorizedAddressResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + valFound, isFound := k.GetAuthorizedAddress( + ctx, + msg.Target, + ) + if !isFound { + return nil, types.ErrAuthorizedAddrNotFound + } + + if msg.Creator != valFound.AuthorizedBy { + return nil, types.ErrNotAuthorizedAddrCreator + } + + if msg.Target == msg.Creator { + return nil, types.ErrAuthorizeSelfAddress + } + + var authorizedAddress = types.AuthorizedAddress{ + AuthorizedBy: msg.Creator, + Target: msg.Target, + IsAuthorized: msg.IsAuthorized, + } + + k.SetAuthorizedAddress(ctx, authorizedAddress) + + return &types.MsgUpdateAuthorizedAddressResponse{}, nil +} + +func (k msgServer) DeleteAuthorizedAddress(goCtx context.Context, msg *types.MsgDeleteAuthorizedAddress) (*types.MsgDeleteAuthorizedAddressResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + valFound, isFound := k.GetAuthorizedAddress( + ctx, + msg.Target, + ) + if !isFound { + return nil, types.ErrAuthorizedAddrNotFound + } + + // Allow the authorized addr creator / target authorized address to remove authorization + if msg.Creator != valFound.AuthorizedBy && msg.Target != valFound.Target { + return nil, types.ErrNotTargetOrAuthAddrCreator + } + + k.RemoveAuthorizedAddress( + ctx, + msg.Target, + ) + + k.DecreaseAuthorizedCount(ctx, valFound.AuthorizedBy) + + return &types.MsgDeleteAuthorizedAddressResponse{}, nil +} diff --git a/x/keyshare/keeper/msg_server_authorized_address_test.go b/x/keyshare/keeper/msg_server_authorized_address_test.go new file mode 100644 index 00000000..08d53422 --- /dev/null +++ b/x/keyshare/keeper/msg_server_authorized_address_test.go @@ -0,0 +1,142 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" + + keepertest "fairyring/testutil/keeper" + "fairyring/x/keyshare/keeper" + "fairyring/x/keyshare/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestAuthorizedAddressMsgServerCreate(t *testing.T) { + k, ctx := keepertest.KeyshareKeeper(t) + srv := keeper.NewMsgServerImpl(*k) + wctx := sdk.WrapSDKContext(ctx) + creator := "A" + for i := 0; i < 5; i++ { + expected := &types.MsgCreateAuthorizedAddress{Creator: creator, + Target: strconv.Itoa(i), + } + _, err := srv.CreateAuthorizedAddress(wctx, expected) + require.NoError(t, err) + rst, found := k.GetAuthorizedAddress(ctx, + expected.Target, + ) + require.True(t, found) + require.Equal(t, expected.Creator, rst.AuthorizedBy) + } +} + +func TestAuthorizedAddressMsgServerUpdate(t *testing.T) { + creator := "A" + + for _, tc := range []struct { + desc string + request *types.MsgUpdateAuthorizedAddress + err error + }{ + { + desc: "Completed", + request: &types.MsgUpdateAuthorizedAddress{Creator: creator, + Target: strconv.Itoa(0), + }, + }, + { + desc: "Unauthorized", + request: &types.MsgUpdateAuthorizedAddress{Creator: "B", + Target: strconv.Itoa(0), + }, + err: sdkerrors.ErrUnauthorized, + }, + { + desc: "KeyNotFound", + request: &types.MsgUpdateAuthorizedAddress{Creator: creator, + Target: strconv.Itoa(100000), + }, + err: sdkerrors.ErrKeyNotFound, + }, + } { + t.Run(tc.desc, func(t *testing.T) { + k, ctx := keepertest.KeyshareKeeper(t) + srv := keeper.NewMsgServerImpl(*k) + wctx := sdk.WrapSDKContext(ctx) + expected := &types.MsgCreateAuthorizedAddress{Creator: creator, + Target: strconv.Itoa(0), + } + _, err := srv.CreateAuthorizedAddress(wctx, expected) + require.NoError(t, err) + + _, err = srv.UpdateAuthorizedAddress(wctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + rst, found := k.GetAuthorizedAddress(ctx, + expected.Target, + ) + require.True(t, found) + require.Equal(t, expected.Creator, rst.AuthorizedBy) + } + }) + } +} + +func TestAuthorizedAddressMsgServerDelete(t *testing.T) { + creator := "A" + + for _, tc := range []struct { + desc string + request *types.MsgDeleteAuthorizedAddress + err error + }{ + { + desc: "Completed", + request: &types.MsgDeleteAuthorizedAddress{Creator: creator, + Target: strconv.Itoa(0), + }, + }, + { + desc: "Unauthorized", + request: &types.MsgDeleteAuthorizedAddress{Creator: "B", + Target: strconv.Itoa(0), + }, + err: sdkerrors.ErrUnauthorized, + }, + { + desc: "KeyNotFound", + request: &types.MsgDeleteAuthorizedAddress{Creator: creator, + Target: strconv.Itoa(100000), + }, + err: sdkerrors.ErrKeyNotFound, + }, + } { + t.Run(tc.desc, func(t *testing.T) { + k, ctx := keepertest.KeyshareKeeper(t) + srv := keeper.NewMsgServerImpl(*k) + wctx := sdk.WrapSDKContext(ctx) + + _, err := srv.CreateAuthorizedAddress(wctx, &types.MsgCreateAuthorizedAddress{Creator: creator, + Target: strconv.Itoa(0), + }) + require.NoError(t, err) + _, err = srv.DeleteAuthorizedAddress(wctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + _, found := k.GetAuthorizedAddress(ctx, + tc.request.Target, + ) + require.False(t, found) + } + }) + } +} diff --git a/x/keyshare/keeper/msg_server_pub_key.go b/x/keyshare/keeper/msg_server_pub_key.go index a9915501..dc2433bf 100644 --- a/x/keyshare/keeper/msg_server_pub_key.go +++ b/x/keyshare/keeper/msg_server_pub_key.go @@ -25,17 +25,31 @@ func (k msgServer) CreateLatestPubKey(goCtx context.Context, msg *types.MsgCreat return nil, types.ErrQueuedKeyAlreadyExists.Wrap(msg.Creator) } + if len(msg.Commitments) == 0 { + return nil, types.ErrEmptyCommitments + } + + commitments := types.Commitments{ + Commitments: msg.Commitments, + } + expHeight := params.KeyExpiry + uint64(ctx.BlockHeight()) ak, found := k.GetActivePubKey(ctx) if found { expHeight = ak.Expiry + params.KeyExpiry } + var queuedPubKey = types.QueuedPubKey{ Creator: msg.Creator, PublicKey: msg.PublicKey, Expiry: expHeight, } + k.SetQueuedCommitments( + ctx, + commitments, + ) + k.SetQueuedPubKey( ctx, queuedPubKey, diff --git a/x/keyshare/keeper/msg_server_register_validator.go b/x/keyshare/keeper/msg_server_register_validator.go index e78a7e9c..dbf7903d 100644 --- a/x/keyshare/keeper/msg_server_register_validator.go +++ b/x/keyshare/keeper/msg_server_register_validator.go @@ -4,8 +4,9 @@ import ( "context" "encoding/hex" "fairyring/x/keyshare/types" - + "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + "strconv" ) // RegisterValidator adds a new validator to the validator set @@ -18,37 +19,40 @@ func (k msgServer) RegisterValidator(goCtx context.Context, msg *types.MsgRegist return nil, types.ErrValidatorAlreadyRegistered.Wrap(msg.Creator) } - isStaking := false - var senderConsAddr string - - allStakingValidators := k.stakingKeeper.GetAllValidators(ctx) - for _, eachV := range allStakingValidators { - valAddr, _ := sdk.ValAddressFromBech32(eachV.OperatorAddress) - valAccAddr := sdk.AccAddress(valAddr) - consAddr, _ := eachV.GetConsAddr() - - if valAccAddr.String() == msg.Creator { - isStaking = true - consByte := consAddr.Bytes() - consHex := hex.EncodeToString(consByte) - senderConsAddr = consHex - break - } + accAddr, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return nil, err } - if !isStaking { + stakingValidator, found := k.stakingKeeper.GetValidator(ctx, sdk.ValAddress(accAddr)) + if !found { return nil, types.ErrAccountNotStaking.Wrap(msg.Creator) } + bonded := stakingValidator.GetBondedTokens().Uint64() + minBonded := k.MinimumBonded(ctx) + if bonded < minBonded { + return nil, types.ErrInsufficientBondedAmount.Wrap( + fmt.Sprintf("Expected minimum bonded: %d, Got: %d", minBonded, bonded), + ) + } + + consAddr, _ := stakingValidator.GetConsAddr() + consByte := consAddr.Bytes() + consHex := hex.EncodeToString(consByte) + validator := types.ValidatorSet{ Index: msg.Creator, Validator: msg.Creator, - ConsAddr: senderConsAddr, + ConsAddr: consHex, IsActive: true, } k.SetValidatorSet(ctx, validator) + // This is to prevent the validator be slashed immediately after registering + k.SetLastSubmittedHeight(ctx, msg.Creator, strconv.FormatInt(ctx.BlockHeight(), 10)) + ctx.EventManager().EmitEvent( sdk.NewEvent(types.RegisteredValidatorEventType, sdk.NewAttribute(types.RegisteredValidatorEventCreator, msg.Creator), diff --git a/x/keyshare/keeper/msg_server_send_keyshare.go b/x/keyshare/keeper/msg_server_send_keyshare.go index da2d27ec..d6a4d428 100644 --- a/x/keyshare/keeper/msg_server_send_keyshare.go +++ b/x/keyshare/keeper/msg_server_send_keyshare.go @@ -5,9 +5,10 @@ import ( "encoding/hex" "fairyring/x/keyshare/types" "fmt" - distIBE "github.com/FairBlock/DistributedIBE" "strconv" + distIBE "github.com/FairBlock/DistributedIBE" + "github.com/drand/kyber" bls "github.com/drand/kyber-bls12381" "github.com/drand/kyber/pairing" @@ -24,17 +25,49 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar validatorInfo, found := k.GetValidatorSet(ctx, msg.Creator) if !found { - return nil, types.ErrValidatorNotRegistered.Wrap(msg.Creator) + authorizedAddrInfo, found := k.GetAuthorizedAddress(ctx, msg.Creator) + if !found || !authorizedAddrInfo.IsAuthorized { + return nil, types.ErrAddrIsNotValidatorOrAuthorized.Wrap(msg.Creator) + } + + authorizedByValInfo, found := k.GetValidatorSet(ctx, authorizedAddrInfo.AuthorizedBy) + if !found { + return nil, types.ErrAuthorizerIsNotValidator.Wrap(authorizedAddrInfo.AuthorizedBy) + } + validatorInfo = authorizedByValInfo + + // If the sender is in the validator set & authorized another address to submit key share + } else if count := k.GetAuthorizedCount(ctx, msg.Creator); count != 0 { + return nil, types.ErrAuthorizedAnotherAddress + } + + if uint64(ctx.BlockHeight()) > msg.BlockHeight { + return nil, types.ErrInvalidBlockHeight.Wrapf("key share height is lower than the current block height, expected height: %d, got: %d", ctx.BlockHeight(), msg.BlockHeight) + } + + if msg.BlockHeight > uint64(ctx.BlockHeight())+1 { + return nil, types.ErrInvalidBlockHeight.Wrapf("key share height is higher than the current block height + 1, expected max height to be: %d, got: %d", ctx.BlockHeight()+1, msg.BlockHeight) } // Setup suite := bls.NewBLS12381Suite() ibeID := strconv.FormatUint(msg.BlockHeight, 10) + commitments, found := k.GetActiveCommitments(ctx) + if !found { + return nil, types.ErrCommitmentsNotFound + } + + commitmentsLen := uint64(len(commitments.Commitments)) + if msg.KeyShareIndex > commitmentsLen { + return nil, types.ErrInvalidKeyShareIndex.Wrap(fmt.Sprintf("Expect Index within: %d, got: %d", commitmentsLen, msg.KeyShareIndex)) + } + // Parse the keyshare & commitment then verify it - _, _, err := parseKeyShareCommitment(suite, msg.Message, msg.Commitment, uint32(msg.KeyShareIndex), ibeID) + _, _, err := parseKeyShareCommitment(suite, msg.Message, commitments.Commitments[msg.KeyShareIndex-1], uint32(msg.KeyShareIndex), ibeID) if err != nil { k.Logger(ctx).Error(fmt.Sprintf("Error in parsing & verifying keyshare & commitment: %s", err.Error())) + k.Logger(ctx).Error(fmt.Sprintf("KeyShare is: %v | Commitment is: %v | Index: %d", msg.Message, commitments.Commitments, msg.KeyShareIndex)) // Invalid Share, slash validator var consAddr sdk.ConsAddress @@ -48,15 +81,21 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar return nil, err } - k.stakingKeeper.Slash(ctx, consAddr, ctx.BlockHeight()-1, 100, sdk.NewDecWithPrec(5, 1)) + k.stakingKeeper.Slash( + ctx, consAddr, + ctx.BlockHeight()-1, + types.SlashPower, + k.SlashFractionWrongKeyshare(ctx), + ) return &types.MsgSendKeyshareResponse{ Creator: msg.Creator, Keyshare: msg.Message, - Commitment: msg.Commitment, KeyshareIndex: msg.KeyShareIndex, ReceivedBlockHeight: uint64(ctx.BlockHeight()), BlockHeight: msg.BlockHeight, + Success: false, + ErrorMessage: "Invalid KeyShare", }, nil } @@ -64,7 +103,6 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar Validator: msg.Creator, BlockHeight: msg.BlockHeight, KeyShare: msg.Message, - Commitment: msg.Commitment, KeyShareIndex: msg.KeyShareIndex, ReceivedTimestamp: uint64(ctx.BlockTime().Unix()), ReceivedBlockHeight: uint64(ctx.BlockHeight()), @@ -73,6 +111,8 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar // Save the new keyshare to state k.SetKeyShare(ctx, keyShare) + k.SetLastSubmittedHeight(ctx, msg.Creator, strconv.FormatUint(msg.BlockHeight, 10)) + validatorList := k.GetAllValidatorSet(ctx) // Get all the keyshares for the provided block height in state @@ -98,7 +138,6 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar sdk.NewAttribute(types.SendKeyshareEventKeyshareBlockHeight, strconv.FormatUint(msg.BlockHeight, 10)), sdk.NewAttribute(types.SendKeyshareEventReceivedBlockHeight, strconv.FormatInt(ctx.BlockHeight(), 10)), sdk.NewAttribute(types.SendKeyshareEventMessage, msg.Message), - sdk.NewAttribute(types.SendKeyshareEventCommitment, msg.Commitment), sdk.NewAttribute(types.SendKeyshareEventIndex, strconv.FormatUint(msg.KeyShareIndex, 10)), ), ) @@ -112,10 +151,10 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar return &types.MsgSendKeyshareResponse{ Creator: msg.Creator, Keyshare: msg.Message, - Commitment: msg.Commitment, KeyshareIndex: msg.KeyShareIndex, ReceivedBlockHeight: uint64(ctx.BlockHeight()), BlockHeight: msg.BlockHeight, + Success: true, }, nil } @@ -131,7 +170,11 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar var listOfCommitment []distIBE.Commitment for _, eachKeyShare := range stateKeyShares { - keyShare, commitment, err := parseKeyShareCommitment(suite, eachKeyShare.KeyShare, eachKeyShare.Commitment, uint32(eachKeyShare.KeyShareIndex), ibeID) + if eachKeyShare.KeyShareIndex > commitmentsLen { + k.Logger(ctx).Error(fmt.Sprintf("KeyShareIndex: %d should not higher or equals to commitments length: %d", eachKeyShare.KeyShareIndex, commitmentsLen)) + continue + } + keyShare, commitment, err := parseKeyShareCommitment(suite, eachKeyShare.KeyShare, commitments.Commitments[eachKeyShare.KeyShareIndex-1], uint32(eachKeyShare.KeyShareIndex), ibeID) if err != nil { k.Logger(ctx).Error(err.Error()) continue @@ -175,10 +218,10 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar return &types.MsgSendKeyshareResponse{ Creator: msg.Creator, Keyshare: msg.Message, - Commitment: msg.Commitment, KeyshareIndex: msg.KeyShareIndex, ReceivedBlockHeight: uint64(ctx.BlockHeight()), BlockHeight: msg.BlockHeight, + Success: true, }, nil } diff --git a/x/keyshare/keeper/params.go b/x/keyshare/keeper/params.go index eaf6cb5c..07c25781 100644 --- a/x/keyshare/keeper/params.go +++ b/x/keyshare/keeper/params.go @@ -11,6 +11,10 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params { return types.NewParams( k.KeyExpiry(ctx), k.TrustedAddresses(ctx), + k.MinimumBonded(ctx), + k.SlashFractionNoKeyshare(ctx), + k.SlashFractionWrongKeyshare(ctx), + k.MaxIdledBlock(ctx), ) } @@ -30,3 +34,27 @@ func (k Keeper) TrustedAddresses(ctx sdk.Context) (res []string) { k.paramstore.Get(ctx, types.KeyTrustedAddresses, &res) return } + +// MinimumBonded returns the MinimumBonded param +func (k Keeper) MinimumBonded(ctx sdk.Context) (res uint64) { + k.paramstore.Get(ctx, types.KeyMinimumBonded, &res) + return +} + +// SlashFractionNoKeyshare returns the SlashFractionNoKeyshare param +func (k Keeper) SlashFractionNoKeyshare(ctx sdk.Context) (res sdk.Dec) { + k.paramstore.Get(ctx, types.KeySlashFractionNoKeyShare, &res) + return +} + +// SlashFractionWrongKeyshare returns the SlashFractionWrongKeyshare param +func (k Keeper) SlashFractionWrongKeyshare(ctx sdk.Context) (res sdk.Dec) { + k.paramstore.Get(ctx, types.KeySlashFractionWrongKeyShare, &res) + return +} + +// MaxIdledBlock returns the MaxIdledBlock param +func (k Keeper) MaxIdledBlock(ctx sdk.Context) (res uint64) { + k.paramstore.Get(ctx, types.KeyMaxIdledBlock, &res) + return +} diff --git a/x/keyshare/keeper/query_authorized_address.go b/x/keyshare/keeper/query_authorized_address.go new file mode 100644 index 00000000..ed173932 --- /dev/null +++ b/x/keyshare/keeper/query_authorized_address.go @@ -0,0 +1,57 @@ +package keeper + +import ( + "context" + + "fairyring/x/keyshare/types" + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) AuthorizedAddressAll(goCtx context.Context, req *types.QueryAllAuthorizedAddressRequest) (*types.QueryAllAuthorizedAddressResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + var authorizedAddresss []types.AuthorizedAddress + ctx := sdk.UnwrapSDKContext(goCtx) + + store := ctx.KVStore(k.storeKey) + authorizedAddressStore := prefix.NewStore(store, types.KeyPrefix(types.AuthorizedAddressKeyPrefix)) + + pageRes, err := query.Paginate(authorizedAddressStore, req.Pagination, func(key []byte, value []byte) error { + var authorizedAddress types.AuthorizedAddress + if err := k.cdc.Unmarshal(value, &authorizedAddress); err != nil { + return err + } + + authorizedAddresss = append(authorizedAddresss, authorizedAddress) + return nil + }) + + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryAllAuthorizedAddressResponse{AuthorizedAddress: authorizedAddresss, Pagination: pageRes}, nil +} + +func (k Keeper) AuthorizedAddress(goCtx context.Context, req *types.QueryGetAuthorizedAddressRequest) (*types.QueryGetAuthorizedAddressResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + val, found := k.GetAuthorizedAddress( + ctx, + req.Target, + ) + if !found { + return nil, types.ErrAuthorizedAddrNotFound + } + + return &types.QueryGetAuthorizedAddressResponse{AuthorizedAddress: val}, nil +} diff --git a/x/keyshare/keeper/query_authorized_address_test.go b/x/keyshare/keeper/query_authorized_address_test.go new file mode 100644 index 00000000..a20ed27d --- /dev/null +++ b/x/keyshare/keeper/query_authorized_address_test.go @@ -0,0 +1,126 @@ +package keeper_test + +import ( + "strconv" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + keepertest "fairyring/testutil/keeper" + "fairyring/testutil/nullify" + "fairyring/x/keyshare/types" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func TestAuthorizedAddressQuerySingle(t *testing.T) { + keeper, ctx := keepertest.KeyshareKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNAuthorizedAddress(keeper, ctx, 2) + for _, tc := range []struct { + desc string + request *types.QueryGetAuthorizedAddressRequest + response *types.QueryGetAuthorizedAddressResponse + err error + }{ + { + desc: "First", + request: &types.QueryGetAuthorizedAddressRequest{ + Target: msgs[0].Target, + }, + response: &types.QueryGetAuthorizedAddressResponse{AuthorizedAddress: msgs[0]}, + }, + { + desc: "Second", + request: &types.QueryGetAuthorizedAddressRequest{ + Target: msgs[1].Target, + }, + response: &types.QueryGetAuthorizedAddressResponse{AuthorizedAddress: msgs[1]}, + }, + { + desc: "KeyNotFound", + request: &types.QueryGetAuthorizedAddressRequest{ + Target: strconv.Itoa(100000), + }, + err: status.Error(codes.NotFound, "not found"), + }, + { + desc: "InvalidRequest", + err: status.Error(codes.InvalidArgument, "invalid request"), + }, + } { + t.Run(tc.desc, func(t *testing.T) { + response, err := keeper.AuthorizedAddress(wctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + require.Equal(t, + nullify.Fill(tc.response), + nullify.Fill(response), + ) + } + }) + } +} + +func TestAuthorizedAddressQueryPaginated(t *testing.T) { + keeper, ctx := keepertest.KeyshareKeeper(t) + wctx := sdk.WrapSDKContext(ctx) + msgs := createNAuthorizedAddress(keeper, ctx, 5) + + request := func(next []byte, offset, limit uint64, total bool) *types.QueryAllAuthorizedAddressRequest { + return &types.QueryAllAuthorizedAddressRequest{ + Pagination: &query.PageRequest{ + Key: next, + Offset: offset, + Limit: limit, + CountTotal: total, + }, + } + } + t.Run("ByOffset", func(t *testing.T) { + step := 2 + for i := 0; i < len(msgs); i += step { + resp, err := keeper.AuthorizedAddressAll(wctx, request(nil, uint64(i), uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.AuthorizedAddress), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.AuthorizedAddress), + ) + } + }) + t.Run("ByKey", func(t *testing.T) { + step := 2 + var next []byte + for i := 0; i < len(msgs); i += step { + resp, err := keeper.AuthorizedAddressAll(wctx, request(next, 0, uint64(step), false)) + require.NoError(t, err) + require.LessOrEqual(t, len(resp.AuthorizedAddress), step) + require.Subset(t, + nullify.Fill(msgs), + nullify.Fill(resp.AuthorizedAddress), + ) + next = resp.Pagination.NextKey + } + }) + t.Run("Total", func(t *testing.T) { + resp, err := keeper.AuthorizedAddressAll(wctx, request(nil, 0, 0, true)) + require.NoError(t, err) + require.Equal(t, len(msgs), int(resp.Pagination.Total)) + require.ElementsMatch(t, + nullify.Fill(msgs), + nullify.Fill(resp.AuthorizedAddress), + ) + }) + t.Run("InvalidRequest", func(t *testing.T) { + _, err := keeper.AuthorizedAddressAll(wctx, nil) + require.ErrorIs(t, err, status.Error(codes.InvalidArgument, "invalid request")) + }) +} diff --git a/x/keyshare/module.go b/x/keyshare/module.go index 4e795635..a18cf18c 100644 --- a/x/keyshare/module.go +++ b/x/keyshare/module.go @@ -2,21 +2,23 @@ package keyshare import ( "context" + "encoding/hex" "encoding/json" peptypes "fairyring/x/pep/types" "fmt" + "strconv" // this line is used by starport scaffolding # 1 "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" - "fairyring/x/keyshare/client/cli" "fairyring/x/keyshare/keeper" "fairyring/x/keyshare/types" + 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" @@ -116,17 +118,6 @@ func NewAppModule( } } -// Deprecated: use RegisterServices -func (am AppModule) Route() sdk.Route { return sdk.Route{} } - -// Deprecated: use RegisterServices -func (AppModule) QuerierRoute() string { return types.RouterKey } - -// Deprecated: use RegisterServices -func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) @@ -158,12 +149,26 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { - validators := am.keeper.StakingKeeper().GetAllValidators(ctx) - for _, eachValidator := range validators { - if !eachValidator.IsBonded() { - valAddr, _ := sdk.ValAddressFromBech32(eachValidator.OperatorAddress) - valAccAddr := sdk.AccAddress(valAddr) - am.keeper.RemoveValidatorSet(ctx, valAccAddr.String()) + validatorSet := am.keeper.GetAllValidatorSet(ctx) + for _, eachValidator := range validatorSet { + accAddr, err := sdk.AccAddressFromBech32(eachValidator.Validator) + if err != nil { + ctx.Logger().Error( + fmt.Sprintf( + "Error on converting validator addr: %s to AccAddr: %s", + eachValidator.Validator, + err.Error(), + ), + ) + continue + } + bondedVal, found := am.keeper.StakingKeeper().GetValidator(ctx, sdk.ValAddress(accAddr)) + if !found { + am.keeper.RemoveValidatorSet(ctx, eachValidator.Validator) + continue + } + if !bondedVal.IsBonded() { + am.keeper.RemoveValidatorSet(ctx, eachValidator.Validator) } } @@ -171,6 +176,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { ak, foundAk := am.keeper.GetActivePubKey(ctx) qk, foundQk := am.keeper.GetQueuedPubKey(ctx) + qc, foundQc := am.keeper.GetQueuedCommitments(ctx) if foundAk { am.keeper.SetActivePubKey(ctx, ak) @@ -183,6 +189,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { if ak.Expiry <= height { am.keeper.DeleteActivePubKey(ctx) am.pepKeeper.DeleteActivePubKey(ctx) + am.keeper.DeleteActiveCommitments(ctx) } else { if foundQk { am.keeper.SetQueuedPubKey(ctx, qk) @@ -200,13 +207,58 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { if qk.Expiry > height { am.keeper.SetActivePubKey(ctx, types.ActivePubKey(qk)) am.pepKeeper.SetActivePubKey(ctx, peptypes.ActivePubKey(qk)) + if foundQc { + am.keeper.SetActiveCommitments(ctx, qc) + } } am.keeper.DeleteQueuedPubKey(ctx) am.pepKeeper.DeleteQueuedPubKey(ctx) + if foundQc { + am.keeper.DeleteQueuedCommitments(ctx) + } } } // EndBlock contains the logic that is automatically triggered at the end of each block func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { + am.keeper.Logger(ctx).Info(fmt.Sprintf("End Blocker of Height: %d", ctx.BlockHeight())) + validators := am.keeper.GetAllValidatorSet(ctx) + params := am.keeper.GetParams(ctx) + + for _, eachValidator := range validators { + lastSubmittedHeight := am.keeper.GetLastSubmittedHeight(ctx, eachValidator.Validator) + am.keeper.Logger(ctx).Info(fmt.Sprintf("Last submitted: %s: %d", eachValidator.Validator, lastSubmittedHeight)) + // Validator will be slashed if their last submitted height is N block ago + // Lets say N is 10, and last submitted height is 0, current height is 10 + // then he/she will be slashed + if lastSubmittedHeight+params.GetMaxIdledBlock() > uint64(ctx.BlockHeight()) { + continue + } + + savedConsAddrByte, err := hex.DecodeString(eachValidator.ConsAddr) + if err != nil { + am.keeper.Logger(ctx).Error(fmt.Sprintf("Error while decoding validator %s cons addr: %s", eachValidator.Validator, err.Error())) + continue + } + + var consAddr sdk.ConsAddress + err = consAddr.Unmarshal(savedConsAddrByte) + if err != nil { + am.keeper.Logger(ctx).Error(fmt.Sprintf("Error while unmarshaling validator %s cons addr: %s", eachValidator.Validator, err.Error())) + continue + } + + am.keeper.StakingKeeper().Slash( + ctx, + consAddr, + ctx.BlockHeight()-1, + types.SlashPower, + params.SlashFractionNoKeyshare, + ) + + // After being slashed, his/her last submitted height will be set to the current block + // So he/she won't be slashed in the next block instead he/she will be slashed if he didn't submit for N block again. + am.keeper.SetLastSubmittedHeight(ctx, eachValidator.Validator, strconv.FormatInt(ctx.BlockHeight(), 10)) + } return []abci.ValidatorUpdate{} } diff --git a/x/keyshare/module_simulation.go b/x/keyshare/module_simulation.go index 0ec374e1..d9c4b275 100644 --- a/x/keyshare/module_simulation.go +++ b/x/keyshare/module_simulation.go @@ -8,7 +8,6 @@ import ( "fairyring/x/keyshare/types" "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -19,7 +18,6 @@ import ( var ( _ = sample.AccAddress _ = keysharesimulation.FindAccount - _ = simappparams.StakePerAccount _ = simulation.MsgEntryKind _ = baseapp.Paramspace ) @@ -34,6 +32,18 @@ const ( opWeightMsgCreateLatestPubKey = "op_weight_msg_latest_pub_key" defaultWeightMsgCreateLatestPubKey int = 100 + opWeightMsgCreateAuthorizedAddress = "op_weight_msg_authorized_address" + // TODO: Determine the simulation weight value + defaultWeightMsgCreateAuthorizedAddress int = 100 + + opWeightMsgUpdateAuthorizedAddress = "op_weight_msg_authorized_address" + // TODO: Determine the simulation weight value + defaultWeightMsgUpdateAuthorizedAddress int = 100 + + opWeightMsgDeleteAuthorizedAddress = "op_weight_msg_authorized_address" + // TODO: Determine the simulation weight value + defaultWeightMsgDeleteAuthorizedAddress int = 100 + // this line is used by starport scaffolding # simapp/module/const ) @@ -45,6 +55,16 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } keyshareGenesis := types.GenesisState{ Params: types.DefaultParams(), + AuthorizedAddressList: []types.AuthorizedAddress{ + { + AuthorizedBy: sample.AccAddress(), + Target: "0", + }, + { + AuthorizedBy: sample.AccAddress(), + Target: "1", + }, + }, // this line is used by starport scaffolding # simapp/module/genesisState } simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&keyshareGenesis) @@ -55,12 +75,6 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP return nil } -// RandomizedParams creates randomized param changes for the simulator -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - - return []simtypes.ParamChange{} -} - // RegisterStoreDecoder registers a decoder func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} @@ -101,6 +115,39 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp keysharesimulation.SimulateMsgCreateLatestPubKey(am.accountKeeper, am.bankKeeper, am.keeper), )) + var weightMsgCreateAuthorizedAddress int + simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgCreateAuthorizedAddress, &weightMsgCreateAuthorizedAddress, nil, + func(_ *rand.Rand) { + weightMsgCreateAuthorizedAddress = defaultWeightMsgCreateAuthorizedAddress + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgCreateAuthorizedAddress, + keysharesimulation.SimulateMsgCreateAuthorizedAddress(am.accountKeeper, am.bankKeeper, am.keeper), + )) + + var weightMsgUpdateAuthorizedAddress int + simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgUpdateAuthorizedAddress, &weightMsgUpdateAuthorizedAddress, nil, + func(_ *rand.Rand) { + weightMsgUpdateAuthorizedAddress = defaultWeightMsgUpdateAuthorizedAddress + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgUpdateAuthorizedAddress, + keysharesimulation.SimulateMsgUpdateAuthorizedAddress(am.accountKeeper, am.bankKeeper, am.keeper), + )) + + var weightMsgDeleteAuthorizedAddress int + simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgDeleteAuthorizedAddress, &weightMsgDeleteAuthorizedAddress, nil, + func(_ *rand.Rand) { + weightMsgDeleteAuthorizedAddress = defaultWeightMsgDeleteAuthorizedAddress + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgDeleteAuthorizedAddress, + keysharesimulation.SimulateMsgDeleteAuthorizedAddress(am.accountKeeper, am.bankKeeper, am.keeper), + )) + // this line is used by starport scaffolding # simapp/module/operation return operations diff --git a/x/keyshare/simulation/authorized_address.go b/x/keyshare/simulation/authorized_address.go new file mode 100644 index 00000000..70c1e1e3 --- /dev/null +++ b/x/keyshare/simulation/authorized_address.go @@ -0,0 +1,147 @@ +package simulation + +import ( + "github.com/cosmos/cosmos-sdk/types/module/testutil" + "math/rand" + "strconv" + + "fairyring/x/keyshare/keeper" + "fairyring/x/keyshare/types" + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/simulation" +) + +// Prevent strconv unused error +var _ = strconv.IntSize + +func SimulateMsgCreateAuthorizedAddress( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simAccount, _ := simtypes.RandomAcc(r, accs) + + i := r.Int() + msg := &types.MsgCreateAuthorizedAddress{ + Creator: simAccount.Address.String(), + Target: strconv.Itoa(i), + } + + _, found := k.GetAuthorizedAddress(ctx, msg.Target) + if found { + return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "AuthorizedAddress already exist"), nil, nil + } + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: testutil.MakeTestTxConfig(), + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + ModuleName: types.ModuleName, + CoinsSpentInMsg: sdk.NewCoins(), + AccountKeeper: ak, + Bankkeeper: bk, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +func SimulateMsgUpdateAuthorizedAddress( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + var ( + simAccount = simtypes.Account{} + authorizedAddress = types.AuthorizedAddress{} + msg = &types.MsgUpdateAuthorizedAddress{} + allAuthorizedAddress = k.GetAllAuthorizedAddress(ctx) + found = false + ) + for _, obj := range allAuthorizedAddress { + simAccount, found = FindAccount(accs, obj.Target) + if found { + authorizedAddress = obj + break + } + } + if !found { + return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "authorizedAddress creator not found"), nil, nil + } + msg.Creator = simAccount.Address.String() + + msg.Target = authorizedAddress.Target + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: testutil.MakeTestTxConfig(), + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + ModuleName: types.ModuleName, + CoinsSpentInMsg: sdk.NewCoins(), + AccountKeeper: ak, + Bankkeeper: bk, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} + +func SimulateMsgDeleteAuthorizedAddress( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + var ( + simAccount = simtypes.Account{} + authorizedAddress = types.AuthorizedAddress{} + msg = &types.MsgUpdateAuthorizedAddress{} + allAuthorizedAddress = k.GetAllAuthorizedAddress(ctx) + found = false + ) + for _, obj := range allAuthorizedAddress { + simAccount, found = FindAccount(accs, obj.Target) + if found { + authorizedAddress = obj + break + } + } + if !found { + return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "authorizedAddress creator not found"), nil, nil + } + msg.Creator = simAccount.Address.String() + + msg.Target = authorizedAddress.Target + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: testutil.MakeTestTxConfig(), + Cdc: nil, + Msg: msg, + MsgType: msg.Type(), + Context: ctx, + SimAccount: simAccount, + ModuleName: types.ModuleName, + CoinsSpentInMsg: sdk.NewCoins(), + AccountKeeper: ak, + Bankkeeper: bk, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} diff --git a/x/keyshare/simulation/latest_pub_key.go b/x/keyshare/simulation/latest_pub_key.go index b7414ebc..55328aa4 100644 --- a/x/keyshare/simulation/latest_pub_key.go +++ b/x/keyshare/simulation/latest_pub_key.go @@ -8,8 +8,8 @@ import ( "fairyring/x/keyshare/types" "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" ) @@ -34,7 +34,7 @@ func SimulateMsgCreateLatestPubKey( txCtx := simulation.OperationInput{ R: r, App: app, - TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + TxGen: testutil.MakeTestTxConfig(), Cdc: nil, Msg: msg, MsgType: msg.Type(), diff --git a/x/keyshare/simulation/register_validator.go b/x/keyshare/simulation/register_validator.go index b1a69e67..9d0873bb 100644 --- a/x/keyshare/simulation/register_validator.go +++ b/x/keyshare/simulation/register_validator.go @@ -1,15 +1,16 @@ package simulation import ( - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" - "github.com/cosmos/cosmos-sdk/x/simulation" "math/rand" + "github.com/cosmos/cosmos-sdk/x/simulation" + "fairyring/x/keyshare/keeper" "fairyring/x/keyshare/types" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) @@ -28,7 +29,7 @@ func SimulateMsgRegisterValidator( txCtx := simulation.OperationInput{ R: r, App: app, - TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + TxGen: testutil.MakeTestTxConfig(), Cdc: nil, Msg: msg, MsgType: msg.Type(), diff --git a/x/keyshare/simulation/send_keyshare.go b/x/keyshare/simulation/send_keyshare.go index 79788d02..b386ce03 100644 --- a/x/keyshare/simulation/send_keyshare.go +++ b/x/keyshare/simulation/send_keyshare.go @@ -1,15 +1,16 @@ package simulation import ( - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" - "github.com/cosmos/cosmos-sdk/x/simulation" "math/rand" + "github.com/cosmos/cosmos-sdk/x/simulation" + "fairyring/x/keyshare/keeper" "fairyring/x/keyshare/types" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) @@ -28,7 +29,7 @@ func SimulateMsgSendKeyshare( txCtx := simulation.OperationInput{ R: r, App: app, - TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + TxGen: testutil.MakeTestTxConfig(), Cdc: nil, Msg: msg, MsgType: msg.Type(), diff --git a/x/keyshare/types/aggregated_key_share.pb.go b/x/keyshare/types/aggregated_key_share.pb.go index 42adbc88..0a578ee6 100644 --- a/x/keyshare/types/aggregated_key_share.pb.go +++ b/x/keyshare/types/aggregated_key_share.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/keyshare/types/authorized_address.pb.go b/x/keyshare/types/authorized_address.pb.go new file mode 100644 index 00000000..36d0ee55 --- /dev/null +++ b/x/keyshare/types/authorized_address.pb.go @@ -0,0 +1,410 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: fairyring/keyshare/authorized_address.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type AuthorizedAddress struct { + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + IsAuthorized bool `protobuf:"varint,2,opt,name=isAuthorized,proto3" json:"isAuthorized,omitempty"` + AuthorizedBy string `protobuf:"bytes,3,opt,name=authorizedBy,proto3" json:"authorizedBy,omitempty"` +} + +func (m *AuthorizedAddress) Reset() { *m = AuthorizedAddress{} } +func (m *AuthorizedAddress) String() string { return proto.CompactTextString(m) } +func (*AuthorizedAddress) ProtoMessage() {} +func (*AuthorizedAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_7b09dee94c56d60e, []int{0} +} +func (m *AuthorizedAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AuthorizedAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AuthorizedAddress.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 *AuthorizedAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_AuthorizedAddress.Merge(m, src) +} +func (m *AuthorizedAddress) XXX_Size() int { + return m.Size() +} +func (m *AuthorizedAddress) XXX_DiscardUnknown() { + xxx_messageInfo_AuthorizedAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_AuthorizedAddress proto.InternalMessageInfo + +func (m *AuthorizedAddress) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func (m *AuthorizedAddress) GetIsAuthorized() bool { + if m != nil { + return m.IsAuthorized + } + return false +} + +func (m *AuthorizedAddress) GetAuthorizedBy() string { + if m != nil { + return m.AuthorizedBy + } + return "" +} + +func init() { + proto.RegisterType((*AuthorizedAddress)(nil), "fairyring.keyshare.AuthorizedAddress") +} + +func init() { + proto.RegisterFile("fairyring/keyshare/authorized_address.proto", fileDescriptor_7b09dee94c56d60e) +} + +var fileDescriptor_7b09dee94c56d60e = []byte{ + // 179 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4e, 0x4b, 0xcc, 0x2c, + 0xaa, 0x2c, 0xca, 0xcc, 0x4b, 0xd7, 0xcf, 0x4e, 0xad, 0x2c, 0xce, 0x48, 0x2c, 0x4a, 0xd5, 0x4f, + 0x2c, 0x2d, 0xc9, 0xc8, 0x2f, 0xca, 0xac, 0x4a, 0x4d, 0x89, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, + 0x2e, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x2b, 0xd6, 0x83, 0x29, 0x56, 0x2a, + 0xe6, 0x12, 0x74, 0x84, 0xab, 0x77, 0x84, 0x28, 0x17, 0x12, 0xe3, 0x62, 0x2b, 0x49, 0x2c, 0x4a, + 0x4f, 0x2d, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0xf2, 0x84, 0x94, 0xb8, 0x78, 0x32, + 0x8b, 0x11, 0xca, 0x25, 0x98, 0x14, 0x18, 0x35, 0x38, 0x82, 0x50, 0xc4, 0x40, 0x6a, 0x10, 0x0e, + 0x70, 0xaa, 0x94, 0x60, 0x06, 0x9b, 0x80, 0x22, 0xe6, 0x64, 0x72, 0xe2, 0x91, 0x1c, 0xe3, 0x85, + 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, + 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x52, 0x08, 0xff, 0x54, 0x20, 0x7c, 0x54, 0x52, 0x59, 0x90, 0x5a, + 0x9c, 0xc4, 0x06, 0xf6, 0x85, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x25, 0xfc, 0x33, 0x00, 0xf4, + 0x00, 0x00, 0x00, +} + +func (m *AuthorizedAddress) 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 *AuthorizedAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AuthorizedAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AuthorizedBy) > 0 { + i -= len(m.AuthorizedBy) + copy(dAtA[i:], m.AuthorizedBy) + i = encodeVarintAuthorizedAddress(dAtA, i, uint64(len(m.AuthorizedBy))) + i-- + dAtA[i] = 0x1a + } + if m.IsAuthorized { + i-- + if m.IsAuthorized { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintAuthorizedAddress(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintAuthorizedAddress(dAtA []byte, offset int, v uint64) int { + offset -= sovAuthorizedAddress(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AuthorizedAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Target) + if l > 0 { + n += 1 + l + sovAuthorizedAddress(uint64(l)) + } + if m.IsAuthorized { + n += 2 + } + l = len(m.AuthorizedBy) + if l > 0 { + n += 1 + l + sovAuthorizedAddress(uint64(l)) + } + return n +} + +func sovAuthorizedAddress(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAuthorizedAddress(x uint64) (n int) { + return sovAuthorizedAddress(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AuthorizedAddress) 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 ErrIntOverflowAuthorizedAddress + } + 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: AuthorizedAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AuthorizedAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizedAddress + } + 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 ErrInvalidLengthAuthorizedAddress + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthorizedAddress + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Target = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAuthorized", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizedAddress + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAuthorized = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthorizedBy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuthorizedAddress + } + 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 ErrInvalidLengthAuthorizedAddress + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAuthorizedAddress + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuthorizedBy = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAuthorizedAddress(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAuthorizedAddress + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAuthorizedAddress(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, ErrIntOverflowAuthorizedAddress + } + 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, ErrIntOverflowAuthorizedAddress + } + 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, ErrIntOverflowAuthorizedAddress + } + 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, ErrInvalidLengthAuthorizedAddress + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAuthorizedAddress + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAuthorizedAddress + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAuthorizedAddress = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAuthorizedAddress = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAuthorizedAddress = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/keyshare/types/codec.go b/x/keyshare/types/codec.go index 0ea98e47..c215f25f 100644 --- a/x/keyshare/types/codec.go +++ b/x/keyshare/types/codec.go @@ -5,12 +5,17 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" + + authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" ) func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgRegisterValidator{}, "fairyring/RegisterValidator", nil) cdc.RegisterConcrete(&MsgSendKeyshare{}, "fairyring/SendKeyshare", nil) cdc.RegisterConcrete(&MsgCreateLatestPubKey{}, "fairyring/CreateLatestPubKey", nil) + cdc.RegisterConcrete(&MsgCreateAuthorizedAddress{}, "keyshare/CreateAuthorizedAddress", nil) + cdc.RegisterConcrete(&MsgUpdateAuthorizedAddress{}, "keyshare/UpdateAuthorizedAddress", nil) + cdc.RegisterConcrete(&MsgDeleteAuthorizedAddress{}, "keyshare/DeleteAuthorizedAddress", nil) // this line is used by starport scaffolding # 2 } @@ -24,6 +29,11 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgCreateLatestPubKey{}, ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateAuthorizedAddress{}, + &MsgUpdateAuthorizedAddress{}, + &MsgDeleteAuthorizedAddress{}, + ) // this line is used by starport scaffolding # 3 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) @@ -33,3 +43,9 @@ var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) ) + +func init() { + RegisterCodec(Amino) + sdk.RegisterLegacyAminoCodec(Amino) + RegisterCodec(authzcodec.Amino) +} diff --git a/x/keyshare/types/commitments.pb.go b/x/keyshare/types/commitments.pb.go new file mode 100644 index 00000000..8dca08f0 --- /dev/null +++ b/x/keyshare/types/commitments.pb.go @@ -0,0 +1,319 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: fairyring/keyshare/commitments.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Commitments struct { + Commitments []string `protobuf:"bytes,1,rep,name=commitments,proto3" json:"commitments,omitempty"` +} + +func (m *Commitments) Reset() { *m = Commitments{} } +func (m *Commitments) String() string { return proto.CompactTextString(m) } +func (*Commitments) ProtoMessage() {} +func (*Commitments) Descriptor() ([]byte, []int) { + return fileDescriptor_31bcc80e7d85b088, []int{0} +} +func (m *Commitments) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Commitments) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Commitments.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 *Commitments) XXX_Merge(src proto.Message) { + xxx_messageInfo_Commitments.Merge(m, src) +} +func (m *Commitments) XXX_Size() int { + return m.Size() +} +func (m *Commitments) XXX_DiscardUnknown() { + xxx_messageInfo_Commitments.DiscardUnknown(m) +} + +var xxx_messageInfo_Commitments proto.InternalMessageInfo + +func (m *Commitments) GetCommitments() []string { + if m != nil { + return m.Commitments + } + return nil +} + +func init() { + proto.RegisterType((*Commitments)(nil), "fairyring.keyshare.Commitments") +} + +func init() { + proto.RegisterFile("fairyring/keyshare/commitments.proto", fileDescriptor_31bcc80e7d85b088) +} + +var fileDescriptor_31bcc80e7d85b088 = []byte{ + // 136 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x4b, 0xcc, 0x2c, + 0xaa, 0x2c, 0xca, 0xcc, 0x4b, 0xd7, 0xcf, 0x4e, 0xad, 0x2c, 0xce, 0x48, 0x2c, 0x4a, 0xd5, 0x4f, + 0xce, 0xcf, 0xcd, 0xcd, 0x2c, 0xc9, 0x4d, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x82, 0xab, 0xd2, 0x83, 0xa9, 0x52, 0xd2, 0xe7, 0xe2, 0x76, 0x46, 0x28, 0x14, 0x52, + 0xe0, 0xe2, 0x46, 0xd2, 0x27, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x19, 0x84, 0x2c, 0xe4, 0x64, 0x72, + 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, + 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x52, 0x08, 0x47, 0x54, 0x20, 0x9c, + 0x51, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0x81, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, + 0x5f, 0x7f, 0xf7, 0x34, 0xa9, 0x00, 0x00, 0x00, +} + +func (m *Commitments) 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 *Commitments) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Commitments) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Commitments) > 0 { + for iNdEx := len(m.Commitments) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Commitments[iNdEx]) + copy(dAtA[i:], m.Commitments[iNdEx]) + i = encodeVarintCommitments(dAtA, i, uint64(len(m.Commitments[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintCommitments(dAtA []byte, offset int, v uint64) int { + offset -= sovCommitments(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Commitments) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Commitments) > 0 { + for _, s := range m.Commitments { + l = len(s) + n += 1 + l + sovCommitments(uint64(l)) + } + } + return n +} + +func sovCommitments(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCommitments(x uint64) (n int) { + return sovCommitments(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Commitments) 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 ErrIntOverflowCommitments + } + 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: Commitments: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Commitments: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commitments", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitments + } + 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 ErrInvalidLengthCommitments + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommitments + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Commitments = append(m.Commitments, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitments(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitments + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCommitments(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, ErrIntOverflowCommitments + } + 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, ErrIntOverflowCommitments + } + 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, ErrIntOverflowCommitments + } + 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, ErrInvalidLengthCommitments + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCommitments + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCommitments + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCommitments = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCommitments = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCommitments = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/keyshare/types/errors.go b/x/keyshare/types/errors.go index 78308e0b..d0f2349f 100644 --- a/x/keyshare/types/errors.go +++ b/x/keyshare/types/errors.go @@ -8,18 +8,36 @@ import ( // x/keyshare module sentinel errors var ( - ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error") - ErrValidatorAlreadyRegistered = sdkerrors.Register(ModuleName, 1101, "validator already registered") - ErrValidatorNotRegistered = sdkerrors.Register(ModuleName, 1102, "validator not registered") - ErrInvalidBlockHeight = sdkerrors.Register(ModuleName, 1103, "invalid block height") - ErrDecodingKeyShare = sdkerrors.Register(ModuleName, 1104, "error decoding keyshare") - ErrUnmarshallingKeyShare = sdkerrors.Register(ModuleName, 1105, "error unmarshalling keyshare") - ErrDecodingCommitment = sdkerrors.Register(ModuleName, 1106, "error decoding commitment") - ErrUnmarshallingCommitment = sdkerrors.Register(ModuleName, 1107, "error unmarhsalling commitment") - ErrUnableToVerifyShare = sdkerrors.Register(ModuleName, 1108, "unable to verify share") - ErrInvalidShare = sdkerrors.Register(ModuleName, 1109, "invalid share / commitment") - ErrPubKeyNotFound = sdkerrors.Register(ModuleName, 1110, "Public key does not exists now") - ErrQueuedKeyAlreadyExists = sdkerrors.Register(ModuleName, 1111, "a queued key already exists") - ErrAccountNotStaking = sdkerrors.Register(ModuleName, 1112, "account is not staking") - ErrAddressNotTrusted = sdkerrors.Register(ModuleName, 1113, "address is not trusted") + ErrValidatorAlreadyRegistered = sdkerrors.Register(ModuleName, 1101, "validator already registered") + ErrValidatorNotRegistered = sdkerrors.Register(ModuleName, 1102, "validator not registered") + ErrInvalidBlockHeight = sdkerrors.Register(ModuleName, 1103, "invalid block height") + ErrDecodingKeyShare = sdkerrors.Register(ModuleName, 1104, "error decoding keyshare") + ErrUnmarshallingKeyShare = sdkerrors.Register(ModuleName, 1105, "error unmarshalling keyshare") + ErrDecodingCommitment = sdkerrors.Register(ModuleName, 1106, "error decoding commitment") + ErrUnmarshallingCommitment = sdkerrors.Register(ModuleName, 1107, "error unmarhsalling commitment") + ErrUnableToVerifyShare = sdkerrors.Register(ModuleName, 1108, "unable to verify share") + ErrInvalidShare = sdkerrors.Register(ModuleName, 1109, "invalid share / commitment") + ErrPubKeyNotFound = sdkerrors.Register(ModuleName, 1110, "Public key does not exists now") + ErrQueuedKeyAlreadyExists = sdkerrors.Register(ModuleName, 1111, "a queued key already exists") + ErrAccountNotStaking = sdkerrors.Register(ModuleName, 1112, "account is not staking") + ErrAddressNotTrusted = sdkerrors.Register(ModuleName, 1113, "address is not trusted") + ErrInsufficientBondedAmount = sdkerrors.Register(ModuleName, 1114, "insufficient bonded amount to be a validator") + ErrEmptyCommitments = sdkerrors.Register(ModuleName, 1115, "provided commitments are empty") + ErrCommitmentsNotFound = sdkerrors.Register(ModuleName, 1116, "commitments not found") + ErrInvalidKeyShareIndex = sdkerrors.Register(ModuleName, 1117, "invalid KeyShare index") + ErrInvalidKeyShareLength = sdkerrors.Register(ModuleName, 1118, "invalid KeyShare length") + ErrInvalidPubKeyLength = sdkerrors.Register(ModuleName, 1119, "invalid PubKey length") + ErrInvalidPubKey = sdkerrors.Register(ModuleName, 1120, "invalid PubKey") + ErrInvalidCommitment = sdkerrors.Register(ModuleName, 1121, "invalid commitment") + ErrInvalidCommitmentLength = sdkerrors.Register(ModuleName, 1122, "invalid commitment length") + ErrAddressAlreadyAuthorized = sdkerrors.Register(ModuleName, 1900, "address is already authorized") + ErrAuthorizedAddrNotFound = sdkerrors.Register(ModuleName, 1901, "target authorized address not found") + ErrNotAuthorizedAddrCreator = sdkerrors.Register(ModuleName, 1902, "sender is not the creator of target authorized address") + ErrNotTargetOrAuthAddrCreator = sdkerrors.Register(ModuleName, 1903, "only the authorized address / the creator can delete authorized address") + ErrAddrIsNotValidatorOrAuthorized = sdkerrors.Register(ModuleName, 1904, "sender is not validator / authorized address to submit key share") + ErrAuthorizerIsNotValidator = sdkerrors.Register(ModuleName, 1905, "address authorized you is not a validator") + ErrOnlyValidatorCanAuthorizeAddr = sdkerrors.Register(ModuleName, 1906, "only validator can authorize address to submit key share") + ErrExceedMaxAuthAddr = sdkerrors.Register(ModuleName, 1907, "each validator can only authorize max 1 address to submit key share") + ErrAuthorizeSelfAddress = sdkerrors.Register(ModuleName, 1908, "unable to authorize sender own address") + ErrAuthorizedAnotherAddress = sdkerrors.Register(ModuleName, 1909, "validator authorized another address to submit key share is not allow to submit key share") ) diff --git a/x/keyshare/types/expected_keepers.go b/x/keyshare/types/expected_keepers.go index a0280398..bf8dd845 100644 --- a/x/keyshare/types/expected_keepers.go +++ b/x/keyshare/types/expected_keepers.go @@ -3,8 +3,10 @@ package types import ( peptypes "fairyring/x/pep/types" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // AccountKeeper defines the expected account keeper used for simulations (noalias) @@ -28,3 +30,10 @@ type PepKeeper interface { DeleteActivePubKey(ctx sdk.Context) DeleteQueuedPubKey(ctx sdk.Context) } + +// StakingKeeper defines the expected interface needed to retrieve the list of validators. +type StakingKeeper interface { + GetAllValidators(ctx sdk.Context) []stakingtypes.Validator + GetValidator(ctx sdk.Context, addr sdk.ValAddress) (stakingtypes.Validator, bool) + Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) math.Int +} diff --git a/x/keyshare/types/genesis.go b/x/keyshare/types/genesis.go index a37c3189..f3143731 100644 --- a/x/keyshare/types/genesis.go +++ b/x/keyshare/types/genesis.go @@ -13,6 +13,7 @@ func DefaultGenesis() *GenesisState { ValidatorSetList: []ValidatorSet{}, KeyShareList: []KeyShare{}, AggregatedKeyShareList: []AggregatedKeyShare{}, + AuthorizedAddressList: []AuthorizedAddress{}, // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), } @@ -23,6 +24,8 @@ func DefaultGenesis() *GenesisState { func (gs GenesisState) Validate() error { // Check for duplicated index in validatorSet validatorSetIndexMap := make(map[string]struct{}) + validatorMap := make(map[string]string) + consMap := make(map[string]string) for _, elem := range gs.ValidatorSetList { index := string(ValidatorSetKey(elem.Index)) @@ -30,6 +33,18 @@ func (gs GenesisState) Validate() error { return fmt.Errorf("duplicated index for validatorSet") } validatorSetIndexMap[index] = struct{}{} + + if _, found := validatorMap[elem.Validator]; found { + return fmt.Errorf("duplicated validator in validatorSet") + } else { + validatorMap[elem.Validator] = elem.Validator + } + + if _, found := consMap[elem.ConsAddr]; found { + return fmt.Errorf("duplicated consensus address in validatorSet") + } else { + validatorMap[elem.ConsAddr] = elem.ConsAddr + } } // Check for duplicated index in keyShare keyShareIndexMap := make(map[string]struct{}) @@ -51,6 +66,16 @@ func (gs GenesisState) Validate() error { } aggregatedKeyShareIndexMap[index] = struct{}{} } + // Check for duplicated index in authorizedAddress + authorizedAddressIndexMap := make(map[string]struct{}) + + for _, elem := range gs.AuthorizedAddressList { + index := string(AuthorizedAddressKey(elem.Target)) + if _, ok := authorizedAddressIndexMap[index]; ok { + return fmt.Errorf("duplicated index for authorizedAddress") + } + authorizedAddressIndexMap[index] = struct{}{} + } // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() diff --git a/x/keyshare/types/genesis.pb.go b/x/keyshare/types/genesis.pb.go index 072d39fe..a38925ac 100644 --- a/x/keyshare/types/genesis.pb.go +++ b/x/keyshare/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" @@ -32,6 +32,7 @@ type GenesisState struct { AggregatedKeyShareList []AggregatedKeyShare `protobuf:"bytes,4,rep,name=aggregatedKeyShareList,proto3" json:"aggregatedKeyShareList"` ActivePubKey ActivePubKey `protobuf:"bytes,5,opt,name=activePubKey,proto3" json:"activePubKey"` QueuedPubKey QueuedPubKey `protobuf:"bytes,6,opt,name=queuedPubKey,proto3" json:"queuedPubKey"` + AuthorizedAddressList []AuthorizedAddress `protobuf:"bytes,7,rep,name=authorizedAddressList,proto3" json:"authorizedAddressList"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -109,6 +110,13 @@ func (m *GenesisState) GetQueuedPubKey() QueuedPubKey { return QueuedPubKey{} } +func (m *GenesisState) GetAuthorizedAddressList() []AuthorizedAddress { + if m != nil { + return m.AuthorizedAddressList + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "fairyring.keyshare.GenesisState") } @@ -116,30 +124,32 @@ func init() { func init() { proto.RegisterFile("fairyring/keyshare/genesis.proto", fileDescriptor_6629804056e1ba8d) } var fileDescriptor_6629804056e1ba8d = []byte{ - // 357 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x31, 0x4f, 0xf2, 0x40, - 0x18, 0xc7, 0xdb, 0x17, 0x5e, 0x86, 0x83, 0xc1, 0x5c, 0x8c, 0x21, 0x8d, 0x29, 0x0d, 0x03, 0x61, - 0xb1, 0x24, 0xe8, 0xe0, 0x0a, 0x83, 0x26, 0xe2, 0x80, 0x90, 0x38, 0xb8, 0x90, 0xc3, 0x3e, 0x9e, - 0x0d, 0x4a, 0xeb, 0xf5, 0x4a, 0xbc, 0x6f, 0xe1, 0xc7, 0x62, 0x64, 0x74, 0x32, 0xa6, 0x7c, 0x11, - 0xd3, 0xeb, 0x01, 0xa7, 0x1c, 0xdb, 0x25, 0xf7, 0xfb, 0xff, 0xf2, 0xfc, 0x9f, 0x3c, 0xc8, 0x7b, - 0x22, 0x21, 0x13, 0x2c, 0x9c, 0xd3, 0xce, 0x0c, 0x44, 0xf2, 0x4c, 0x18, 0x74, 0x28, 0xcc, 0x21, - 0x09, 0x13, 0x3f, 0x66, 0x11, 0x8f, 0x30, 0xde, 0x12, 0xfe, 0x86, 0x70, 0x8e, 0x69, 0x44, 0x23, - 0xf9, 0xdd, 0xc9, 0x5f, 0x05, 0xe9, 0x34, 0x0c, 0xae, 0x98, 0x30, 0xf2, 0xaa, 0x54, 0x4e, 0xcb, - 0x00, 0x2c, 0xc8, 0x4b, 0x18, 0x10, 0x1e, 0xb1, 0x49, 0x02, 0x5c, 0x71, 0x4d, 0x03, 0x37, 0x03, - 0x31, 0x91, 0x2f, 0xc5, 0x9c, 0x19, 0x18, 0x42, 0x29, 0x03, 0x4a, 0x38, 0x04, 0x93, 0xbf, 0xb8, - 0xa9, 0x67, 0x9c, 0x4e, 0x73, 0xae, 0x20, 0x9a, 0x59, 0x09, 0xd5, 0xae, 0x8b, 0xe6, 0x63, 0x4e, - 0x38, 0xe0, 0x4b, 0x54, 0x29, 0xa6, 0xaf, 0xdb, 0x9e, 0xdd, 0xae, 0x76, 0x1d, 0x7f, 0x7f, 0x13, - 0xfe, 0x50, 0x12, 0xfd, 0xf2, 0xf2, 0xab, 0x61, 0x8d, 0x14, 0x8f, 0x47, 0xe8, 0x68, 0x5b, 0x6b, - 0x0c, 0xfc, 0x36, 0x4c, 0x78, 0xfd, 0x9f, 0x57, 0x6a, 0x57, 0xbb, 0x9e, 0xc9, 0x71, 0xaf, 0xb1, - 0xca, 0xb4, 0x97, 0xc7, 0x57, 0xa8, 0x36, 0x03, 0x31, 0xce, 0x03, 0xd2, 0x57, 0x92, 0xbe, 0x53, - 0x93, 0x6f, 0xa0, 0x38, 0xe5, 0xfa, 0x95, 0xc3, 0x01, 0x3a, 0xd9, 0xad, 0x69, 0xa0, 0x1b, 0xcb, - 0xd2, 0xd8, 0x32, 0x19, 0x7b, 0x7b, 0x09, 0xe5, 0x3e, 0xe0, 0xc2, 0x37, 0xa8, 0x46, 0x1e, 0x79, - 0xb8, 0x80, 0x61, 0x3a, 0x1d, 0x80, 0xa8, 0xff, 0x97, 0x1b, 0x34, 0xb6, 0xef, 0x69, 0xdc, 0x66, - 0x62, 0x3d, 0x9b, 0xbb, 0xde, 0x52, 0x48, 0x21, 0x50, 0xae, 0xca, 0x61, 0xd7, 0x9d, 0xc6, 0x6d, - 0x5c, 0x7a, 0xb6, 0x7f, 0xb1, 0xcc, 0x5c, 0x7b, 0x95, 0xb9, 0xf6, 0x77, 0xe6, 0xda, 0x1f, 0x6b, - 0xd7, 0x5a, 0xad, 0x5d, 0xeb, 0x73, 0xed, 0x5a, 0x0f, 0xce, 0xee, 0x40, 0xde, 0x77, 0x27, 0xc2, - 0x45, 0x0c, 0xc9, 0xb4, 0x22, 0x2f, 0xe4, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x21, 0x06, - 0xbd, 0x2d, 0x03, 0x00, 0x00, + // 399 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6a, 0xea, 0x40, + 0x14, 0x86, 0x93, 0xab, 0xd7, 0x0b, 0xa3, 0x8b, 0xcb, 0x70, 0x6f, 0x91, 0x50, 0x62, 0x10, 0x2a, + 0x42, 0x69, 0x04, 0xdb, 0x45, 0xb7, 0xba, 0x68, 0xa1, 0x76, 0x61, 0x15, 0xba, 0xe8, 0x26, 0x8c, + 0xcd, 0x69, 0x0c, 0xb6, 0x26, 0x9d, 0x99, 0x48, 0xd3, 0xa7, 0xe8, 0x4b, 0x15, 0x5c, 0xba, 0xec, + 0xaa, 0x14, 0x7d, 0x91, 0x92, 0xc9, 0x68, 0x52, 0x1d, 0x77, 0x03, 0xf9, 0xfe, 0x8f, 0xf3, 0x9f, + 0x1c, 0x64, 0x3d, 0x10, 0x9f, 0xc6, 0xd4, 0x9f, 0x7a, 0xad, 0x09, 0xc4, 0x6c, 0x4c, 0x28, 0xb4, + 0x3c, 0x98, 0x02, 0xf3, 0x99, 0x1d, 0xd2, 0x80, 0x07, 0x18, 0x6f, 0x08, 0x7b, 0x4d, 0x18, 0xff, + 0xbc, 0xc0, 0x0b, 0xc4, 0xe7, 0x56, 0xf2, 0x4a, 0x49, 0xa3, 0xa6, 0x70, 0x85, 0x84, 0x92, 0x27, + 0xa9, 0x32, 0x1a, 0x0a, 0x60, 0x46, 0x1e, 0x7d, 0x97, 0xf0, 0x80, 0x3a, 0x0c, 0xb8, 0xe4, 0xea, + 0x0a, 0x6e, 0x02, 0xb1, 0x23, 0x5e, 0x92, 0x39, 0x51, 0x30, 0xc4, 0xf3, 0x28, 0x78, 0x84, 0x83, + 0xeb, 0x6c, 0xe3, 0xaa, 0x9e, 0x61, 0x34, 0x4a, 0x38, 0x49, 0x1c, 0xab, 0x84, 0x11, 0x1f, 0x07, + 0xd4, 0x7f, 0x05, 0xd7, 0x21, 0xae, 0x4b, 0x81, 0xc9, 0x26, 0xf5, 0xf7, 0x22, 0xaa, 0x5c, 0xa6, + 0x6b, 0x1a, 0x72, 0xc2, 0x01, 0x9f, 0xa3, 0x52, 0x5a, 0xb5, 0xaa, 0x5b, 0x7a, 0xb3, 0xdc, 0x36, + 0xec, 0xdd, 0xb5, 0xd9, 0x7d, 0x41, 0x74, 0x8b, 0xf3, 0xcf, 0x9a, 0x36, 0x90, 0x3c, 0x1e, 0xa0, + 0xbf, 0x9b, 0x1d, 0x0c, 0x81, 0x5f, 0xfb, 0x8c, 0x57, 0x7f, 0x59, 0x85, 0x66, 0xb9, 0x6d, 0xa9, + 0x1c, 0xb7, 0x39, 0x56, 0x9a, 0x76, 0xf2, 0xf8, 0x02, 0x55, 0x26, 0x10, 0x0f, 0x93, 0x80, 0xf0, + 0x15, 0x84, 0xef, 0x50, 0xe5, 0xeb, 0x49, 0x4e, 0xba, 0x7e, 0xe4, 0xb0, 0x8b, 0x0e, 0xb2, 0x9d, + 0xf6, 0xf2, 0xc6, 0xa2, 0x30, 0x36, 0x54, 0xc6, 0xce, 0x4e, 0x42, 0xba, 0xf7, 0xb8, 0xf0, 0x15, + 0xaa, 0x90, 0x7b, 0xee, 0xcf, 0xa0, 0x1f, 0x8d, 0x7a, 0x10, 0x57, 0x7f, 0x8b, 0x0d, 0x2a, 0xdb, + 0x77, 0x72, 0xdc, 0x7a, 0xe2, 0x7c, 0x36, 0x71, 0x3d, 0x47, 0x10, 0x81, 0x2b, 0x5d, 0xa5, 0xfd, + 0xae, 0x9b, 0x1c, 0xb7, 0x76, 0xe5, 0xb3, 0x98, 0xa0, 0xff, 0xd9, 0x01, 0x74, 0xd2, 0xff, 0x2f, + 0xca, 0xff, 0x11, 0xe5, 0x8f, 0x94, 0x03, 0x6e, 0x07, 0xa4, 0x59, 0x6d, 0xea, 0x9e, 0xcd, 0x97, + 0xa6, 0xbe, 0x58, 0x9a, 0xfa, 0xd7, 0xd2, 0xd4, 0xdf, 0x56, 0xa6, 0xb6, 0x58, 0x99, 0xda, 0xc7, + 0xca, 0xd4, 0xee, 0x8c, 0xec, 0x1c, 0x5f, 0xb2, 0x83, 0xe4, 0x71, 0x08, 0x6c, 0x54, 0x12, 0x47, + 0x78, 0xfa, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x72, 0x34, 0x24, 0x26, 0xbd, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -162,6 +172,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AuthorizedAddressList) > 0 { + for iNdEx := len(m.AuthorizedAddressList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AuthorizedAddressList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } { size, err := m.QueuedPubKey.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -278,6 +302,12 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) l = m.QueuedPubKey.Size() n += 1 + l + sovGenesis(uint64(l)) + if len(m.AuthorizedAddressList) > 0 { + for _, e := range m.AuthorizedAddressList { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -517,6 +547,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthorizedAddressList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuthorizedAddressList = append(m.AuthorizedAddressList, AuthorizedAddress{}) + if err := m.AuthorizedAddressList[len(m.AuthorizedAddressList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/keyshare/types/genesis_test.go b/x/keyshare/types/genesis_test.go index 1627c6e8..3b35086a 100644 --- a/x/keyshare/types/genesis_test.go +++ b/x/keyshare/types/genesis_test.go @@ -49,6 +49,14 @@ func TestGenesisState_Validate(t *testing.T) { Height: 1, }, }, + AuthorizedAddressList: []types.AuthorizedAddress{ + { + Target: "0", + }, + { + Target: "1", + }, + }, // this line is used by starport scaffolding # types/genesis/validField }, valid: true, @@ -97,6 +105,20 @@ func TestGenesisState_Validate(t *testing.T) { }, valid: false, }, + { + desc: "duplicated authorizedAddress", + genState: &types.GenesisState{ + AuthorizedAddressList: []types.AuthorizedAddress{ + { + Target: "0", + }, + { + Target: "0", + }, + }, + }, + valid: false, + }, // this line is used by starport scaffolding # types/genesis/testcase } { t.Run(tc.desc, func(t *testing.T) { diff --git a/x/keyshare/types/key_authorized_address.go b/x/keyshare/types/key_authorized_address.go new file mode 100644 index 00000000..3a78ba34 --- /dev/null +++ b/x/keyshare/types/key_authorized_address.go @@ -0,0 +1,37 @@ +package types + +import "encoding/binary" + +var _ binary.ByteOrder + +const ( + // AuthorizedAddressKeyPrefix is the prefix to retrieve all AuthorizedAddress + AuthorizedAddressKeyPrefix = "AuthorizedAddress/value/" + + AuthorizedCountKeyPrefix = "AuthorizedCount/value/" +) + +// AuthorizedAddressKey returns the store key to retrieve a AuthorizedAddress from the index fields +func AuthorizedAddressKey( + target string, +) []byte { + var key []byte + + targetBytes := []byte(target) + key = append(key, targetBytes...) + key = append(key, []byte("/")...) + + return key +} + +func AuthorizedCountKey( + creator string, +) []byte { + var key []byte + + targetBytes := []byte(creator) + key = append(key, targetBytes...) + key = append(key, []byte("/")...) + + return key +} \ No newline at end of file diff --git a/x/keyshare/types/key_commitments.go b/x/keyshare/types/key_commitments.go new file mode 100644 index 00000000..f8ffeef7 --- /dev/null +++ b/x/keyshare/types/key_commitments.go @@ -0,0 +1,9 @@ +package types + +const ( + // ActiveCommitmentsPrefix is the prefix to retrieve the active Commitments + ActiveCommitmentsPrefix = "ActiveCommitments/value/" + + // QueuedCommitmentsPrefix is the prefix to retrieve the queued Commitments + QueuedCommitmentsPrefix = "QueuedCommitments/value/" +) diff --git a/x/keyshare/types/key_last_submitted_height.go b/x/keyshare/types/key_last_submitted_height.go new file mode 100644 index 00000000..ea0ae05c --- /dev/null +++ b/x/keyshare/types/key_last_submitted_height.go @@ -0,0 +1,23 @@ +package types + +import "encoding/binary" + +var _ binary.ByteOrder + +const ( + // KeyLastSubmittedHeightPrefix is the prefix to retrieve all LastSubmittedHeight + KeyLastSubmittedHeightPrefix = "LastSubmittedHeight/value/" +) + +// LastSubmittedHeightKey returns the store key to retrieve a LastSubmittedHeight from the index fields +func LastSubmittedHeightKey( + validator string, +) []byte { + var key []byte + + validatorBytes := []byte(validator) + key = append(key, validatorBytes...) + key = append(key, []byte("/")...) + + return key +} diff --git a/x/keyshare/types/key_share.pb.go b/x/keyshare/types/key_share.pb.go index 808aaaee..84301d53 100644 --- a/x/keyshare/types/key_share.pb.go +++ b/x/keyshare/types/key_share.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -25,11 +25,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type KeyShare struct { Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` BlockHeight uint64 `protobuf:"varint,2,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` - Commitment string `protobuf:"bytes,3,opt,name=commitment,proto3" json:"commitment,omitempty"` - KeyShare string `protobuf:"bytes,4,opt,name=keyShare,proto3" json:"keyShare,omitempty"` - KeyShareIndex uint64 `protobuf:"varint,5,opt,name=keyShareIndex,proto3" json:"keyShareIndex,omitempty"` - ReceivedTimestamp uint64 `protobuf:"varint,6,opt,name=receivedTimestamp,proto3" json:"receivedTimestamp,omitempty"` - ReceivedBlockHeight uint64 `protobuf:"varint,7,opt,name=receivedBlockHeight,proto3" json:"receivedBlockHeight,omitempty"` + KeyShare string `protobuf:"bytes,3,opt,name=keyShare,proto3" json:"keyShare,omitempty"` + KeyShareIndex uint64 `protobuf:"varint,4,opt,name=keyShareIndex,proto3" json:"keyShareIndex,omitempty"` + ReceivedTimestamp uint64 `protobuf:"varint,5,opt,name=receivedTimestamp,proto3" json:"receivedTimestamp,omitempty"` + ReceivedBlockHeight uint64 `protobuf:"varint,6,opt,name=receivedBlockHeight,proto3" json:"receivedBlockHeight,omitempty"` } func (m *KeyShare) Reset() { *m = KeyShare{} } @@ -79,13 +78,6 @@ func (m *KeyShare) GetBlockHeight() uint64 { return 0 } -func (m *KeyShare) GetCommitment() string { - if m != nil { - return m.Commitment - } - return "" -} - func (m *KeyShare) GetKeyShare() string { if m != nil { return m.KeyShare @@ -123,23 +115,22 @@ func init() { } var fileDescriptor_cb45212b5123dd29 = []byte{ - // 255 bytes of a gzipped FileDescriptorProto + // 235 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0x4b, 0xcc, 0x2c, 0xaa, 0x2c, 0xca, 0xcc, 0x4b, 0xd7, 0xcf, 0x4e, 0xad, 0x2c, 0xce, 0x48, 0x2c, 0x4a, 0x05, 0x31, 0xe2, 0xc1, 0x2c, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x21, 0xb8, 0x1a, 0x3d, 0x98, 0x1a, - 0xa5, 0x1e, 0x26, 0x2e, 0x0e, 0xef, 0xd4, 0xca, 0x60, 0x10, 0x47, 0x48, 0x86, 0x8b, 0xb3, 0x2c, - 0x31, 0x27, 0x33, 0x25, 0xb1, 0x24, 0xbf, 0x48, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0x21, - 0x20, 0xa4, 0xc0, 0xc5, 0x9d, 0x94, 0x93, 0x9f, 0x9c, 0xed, 0x91, 0x9a, 0x99, 0x9e, 0x51, 0x22, - 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x12, 0x84, 0x2c, 0x24, 0x24, 0xc7, 0xc5, 0x95, 0x9c, 0x9f, 0x9b, - 0x9b, 0x59, 0x92, 0x9b, 0x9a, 0x57, 0x22, 0xc1, 0x0c, 0x36, 0x00, 0x49, 0x44, 0x48, 0x8a, 0x8b, - 0x23, 0x1b, 0x6a, 0x97, 0x04, 0x0b, 0x58, 0x16, 0xce, 0x17, 0x52, 0xe1, 0xe2, 0x85, 0xb1, 0x3d, - 0xf3, 0x52, 0x52, 0x2b, 0x24, 0x58, 0xc1, 0xe6, 0xa3, 0x0a, 0x0a, 0xe9, 0x70, 0x09, 0x16, 0xa5, - 0x26, 0xa7, 0x66, 0x96, 0xa5, 0xa6, 0x84, 0x64, 0xe6, 0xa6, 0x16, 0x97, 0x24, 0xe6, 0x16, 0x48, - 0xb0, 0x81, 0x55, 0x62, 0x4a, 0x08, 0x19, 0x70, 0x09, 0xc3, 0x04, 0x9d, 0x90, 0x5c, 0xce, 0x0e, - 0x56, 0x8f, 0x4d, 0xca, 0xc9, 0xe4, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, - 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, - 0xa4, 0x10, 0x01, 0x5c, 0x81, 0x08, 0xe2, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0xf8, - 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x9a, 0x2b, 0xcb, 0x85, 0x01, 0x00, 0x00, + 0xa5, 0x37, 0x8c, 0x5c, 0x1c, 0xde, 0xa9, 0x95, 0xc1, 0x20, 0x8e, 0x90, 0x0c, 0x17, 0x67, 0x59, + 0x62, 0x4e, 0x66, 0x4a, 0x62, 0x49, 0x7e, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x42, + 0x40, 0x48, 0x81, 0x8b, 0x3b, 0x29, 0x27, 0x3f, 0x39, 0xdb, 0x23, 0x35, 0x33, 0x3d, 0xa3, 0x44, + 0x82, 0x49, 0x81, 0x51, 0x83, 0x25, 0x08, 0x59, 0x48, 0x48, 0x8a, 0x8b, 0x23, 0x1b, 0x6a, 0x96, + 0x04, 0x33, 0x58, 0x3b, 0x9c, 0x2f, 0xa4, 0xc2, 0xc5, 0x0b, 0x63, 0x7b, 0xe6, 0xa5, 0xa4, 0x56, + 0x48, 0xb0, 0x80, 0xf5, 0xa3, 0x0a, 0x0a, 0xe9, 0x70, 0x09, 0x16, 0xa5, 0x26, 0xa7, 0x66, 0x96, + 0xa5, 0xa6, 0x84, 0x64, 0xe6, 0xa6, 0x16, 0x97, 0x24, 0xe6, 0x16, 0x48, 0xb0, 0x82, 0x55, 0x62, + 0x4a, 0x08, 0x19, 0x70, 0x09, 0xc3, 0x04, 0x9d, 0x90, 0x5c, 0xc6, 0x06, 0x56, 0x8f, 0x4d, 0xca, + 0xc9, 0xe4, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, + 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xa4, 0x10, 0x01, 0x58, + 0x81, 0x08, 0xc2, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0xf8, 0x19, 0x03, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x11, 0x1c, 0x0e, 0xa8, 0x65, 0x01, 0x00, 0x00, } func (m *KeyShare) Marshal() (dAtA []byte, err error) { @@ -165,30 +156,23 @@ func (m *KeyShare) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.ReceivedBlockHeight != 0 { i = encodeVarintKeyShare(dAtA, i, uint64(m.ReceivedBlockHeight)) i-- - dAtA[i] = 0x38 + dAtA[i] = 0x30 } if m.ReceivedTimestamp != 0 { i = encodeVarintKeyShare(dAtA, i, uint64(m.ReceivedTimestamp)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if m.KeyShareIndex != 0 { i = encodeVarintKeyShare(dAtA, i, uint64(m.KeyShareIndex)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if len(m.KeyShare) > 0 { i -= len(m.KeyShare) copy(dAtA[i:], m.KeyShare) i = encodeVarintKeyShare(dAtA, i, uint64(len(m.KeyShare))) i-- - dAtA[i] = 0x22 - } - if len(m.Commitment) > 0 { - i -= len(m.Commitment) - copy(dAtA[i:], m.Commitment) - i = encodeVarintKeyShare(dAtA, i, uint64(len(m.Commitment))) - i-- dAtA[i] = 0x1a } if m.BlockHeight != 0 { @@ -230,10 +214,6 @@ func (m *KeyShare) Size() (n int) { if m.BlockHeight != 0 { n += 1 + sovKeyShare(uint64(m.BlockHeight)) } - l = len(m.Commitment) - if l > 0 { - n += 1 + l + sovKeyShare(uint64(l)) - } l = len(m.KeyShare) if l > 0 { n += 1 + l + sovKeyShare(uint64(l)) @@ -337,38 +317,6 @@ func (m *KeyShare) Unmarshal(dAtA []byte) error { } } case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowKeyShare - } - 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 ErrInvalidLengthKeyShare - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthKeyShare - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Commitment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field KeyShare", wireType) } @@ -400,7 +348,7 @@ func (m *KeyShare) Unmarshal(dAtA []byte) error { } m.KeyShare = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field KeyShareIndex", wireType) } @@ -419,7 +367,7 @@ func (m *KeyShare) Unmarshal(dAtA []byte) error { break } } - case 6: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ReceivedTimestamp", wireType) } @@ -438,7 +386,7 @@ func (m *KeyShare) Unmarshal(dAtA []byte) error { break } } - case 7: + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ReceivedBlockHeight", wireType) } diff --git a/x/keyshare/types/keys.go b/x/keyshare/types/keys.go index c96f7c14..73059798 100644 --- a/x/keyshare/types/keys.go +++ b/x/keyshare/types/keys.go @@ -20,6 +20,10 @@ const ( KeyAggregationThresholdDenominator = 3 ) +const ( + SlashPower int64 = 100 +) + const ( RegisteredValidatorEventType = "new validator-registered" RegisteredValidatorEventCreator = "creator" diff --git a/x/keyshare/types/message_send_keyshare.go b/x/keyshare/types/message_send_keyshare.go index dba10aa4..07d47b03 100644 --- a/x/keyshare/types/message_send_keyshare.go +++ b/x/keyshare/types/message_send_keyshare.go @@ -2,19 +2,22 @@ package types import ( sdkerrors "cosmossdk.io/errors" + "encoding/hex" sdk "github.com/cosmos/cosmos-sdk/types" cosmoserror "github.com/cosmos/cosmos-sdk/types/errors" ) -const TypeMsgSendKeyshare = "send_keyshare" +const ( + TypeMsgSendKeyshare = "send_keyshare" + KeyShareHexLen = 192 +) var _ sdk.Msg = &MsgSendKeyshare{} -func NewMsgSendKeyshare(creator string, message string, commitment string, keyShareIndex uint64, blockHeight uint64) *MsgSendKeyshare { +func NewMsgSendKeyshare(creator string, message string, keyShareIndex uint64, blockHeight uint64) *MsgSendKeyshare { return &MsgSendKeyshare{ Creator: creator, Message: message, - Commitment: commitment, KeyShareIndex: keyShareIndex, BlockHeight: blockHeight, } @@ -46,5 +49,14 @@ func (msg *MsgSendKeyshare) ValidateBasic() error { if err != nil { return sdkerrors.Wrapf(cosmoserror.ErrInvalidAddress, "invalid creator address (%s)", err) } + if len(msg.Message) != KeyShareHexLen { + return ErrInvalidKeyShareLength.Wrapf("expected hex encoded key share length to be %d", KeyShareHexLen) + } + if _, err = hex.DecodeString(msg.Message); err != nil { + return ErrInvalidShare.Wrapf("expected hex encoded key share, got: %s", msg.Message) + } + if msg.KeyShareIndex < 1 { + return ErrInvalidShare.Wrapf("expected key share index to be at least 1, got: %d", msg.KeyShareIndex) + } return nil } diff --git a/x/keyshare/types/messages_authorized_address.go b/x/keyshare/types/messages_authorized_address.go new file mode 100644 index 00000000..f3327ad4 --- /dev/null +++ b/x/keyshare/types/messages_authorized_address.go @@ -0,0 +1,138 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const ( + TypeMsgCreateAuthorizedAddress = "create_authorized_address" + TypeMsgUpdateAuthorizedAddress = "update_authorized_address" + TypeMsgDeleteAuthorizedAddress = "delete_authorized_address" +) + +var _ sdk.Msg = &MsgCreateAuthorizedAddress{} + +func NewMsgCreateAuthorizedAddress( + creator string, + target string, + +) *MsgCreateAuthorizedAddress { + return &MsgCreateAuthorizedAddress{ + Creator: creator, + Target: target, + } +} + +func (msg *MsgCreateAuthorizedAddress) Route() string { + return RouterKey +} + +func (msg *MsgCreateAuthorizedAddress) Type() string { + return TypeMsgCreateAuthorizedAddress +} + +func (msg *MsgCreateAuthorizedAddress) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgCreateAuthorizedAddress) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgCreateAuthorizedAddress) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} + +var _ sdk.Msg = &MsgUpdateAuthorizedAddress{} + +func NewMsgUpdateAuthorizedAddress( + creator string, + target string, + isAuthorized bool, +) *MsgUpdateAuthorizedAddress { + return &MsgUpdateAuthorizedAddress{ + Creator: creator, + Target: target, + IsAuthorized: isAuthorized, + } +} + +func (msg *MsgUpdateAuthorizedAddress) Route() string { + return RouterKey +} + +func (msg *MsgUpdateAuthorizedAddress) Type() string { + return TypeMsgUpdateAuthorizedAddress +} + +func (msg *MsgUpdateAuthorizedAddress) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgUpdateAuthorizedAddress) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgUpdateAuthorizedAddress) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} + +var _ sdk.Msg = &MsgDeleteAuthorizedAddress{} + +func NewMsgDeleteAuthorizedAddress( + creator string, + target string, + +) *MsgDeleteAuthorizedAddress { + return &MsgDeleteAuthorizedAddress{ + Creator: creator, + Target: target, + } +} +func (msg *MsgDeleteAuthorizedAddress) Route() string { + return RouterKey +} + +func (msg *MsgDeleteAuthorizedAddress) Type() string { + return TypeMsgDeleteAuthorizedAddress +} + +func (msg *MsgDeleteAuthorizedAddress) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func (msg *MsgDeleteAuthorizedAddress) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} + +func (msg *MsgDeleteAuthorizedAddress) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/keyshare/types/messages_authorized_address_test.go b/x/keyshare/types/messages_authorized_address_test.go new file mode 100644 index 00000000..4824aab8 --- /dev/null +++ b/x/keyshare/types/messages_authorized_address_test.go @@ -0,0 +1,102 @@ +package types + +import ( + "testing" + + "fairyring/testutil/sample" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" +) + +func TestMsgCreateAuthorizedAddress_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgCreateAuthorizedAddress + err error + }{ + { + name: "invalid address", + msg: MsgCreateAuthorizedAddress{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgCreateAuthorizedAddress{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} + +func TestMsgUpdateAuthorizedAddress_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgUpdateAuthorizedAddress + err error + }{ + { + name: "invalid address", + msg: MsgUpdateAuthorizedAddress{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgUpdateAuthorizedAddress{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} + +func TestMsgDeleteAuthorizedAddress_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgDeleteAuthorizedAddress + err error + }{ + { + name: "invalid address", + msg: MsgDeleteAuthorizedAddress{ + Creator: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgDeleteAuthorizedAddress{ + Creator: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/keyshare/types/messages_latest_pub_key.go b/x/keyshare/types/messages_latest_pub_key.go index 38c59896..4038a27a 100644 --- a/x/keyshare/types/messages_latest_pub_key.go +++ b/x/keyshare/types/messages_latest_pub_key.go @@ -2,12 +2,15 @@ package types import ( sdkerrors "cosmossdk.io/errors" + "encoding/hex" sdk "github.com/cosmos/cosmos-sdk/types" cosmoserror "github.com/cosmos/cosmos-sdk/types/errors" ) const ( TypeMsgCreateLatestPubKeyID = "create_latest_pub_key" + PubKeyHexLength = 96 + CommitmentHexLength = 96 ) var _ sdk.Msg = &MsgCreateLatestPubKey{} @@ -15,10 +18,12 @@ var _ sdk.Msg = &MsgCreateLatestPubKey{} func NewMsgCreateLatestPubKey( creator string, publicKey string, + commitments []string, ) *MsgCreateLatestPubKey { return &MsgCreateLatestPubKey{ - Creator: creator, - PublicKey: publicKey, + Creator: creator, + PublicKey: publicKey, + Commitments: commitments, } } @@ -48,5 +53,19 @@ func (msg *MsgCreateLatestPubKey) ValidateBasic() error { if err != nil { return sdkerrors.Wrapf(cosmoserror.ErrInvalidAddress, "invalid creator address (%s)", err) } + if len(msg.PublicKey) != PubKeyHexLength { + return ErrInvalidPubKeyLength.Wrapf("expected hex encoding public key to be length: %d", CommitmentHexLength) + } + if _, err = hex.DecodeString(msg.PublicKey); err != nil { + return ErrInvalidPubKey.Wrapf("expected hex encoded public key, got: %s", msg.PublicKey) + } + for _, c := range msg.Commitments { + if len(c) != CommitmentHexLength { + return ErrInvalidCommitmentLength.Wrapf("expected hex encoding commitment to be length: %d", CommitmentHexLength) + } + if _, err = hex.DecodeString(c); err != nil { + return ErrInvalidCommitment.Wrapf("expected hex encoded commitment, got: %s", c) + } + } return nil } diff --git a/x/keyshare/types/params.go b/x/keyshare/types/params.go index a8242301..b1acc15e 100644 --- a/x/keyshare/types/params.go +++ b/x/keyshare/types/params.go @@ -3,12 +3,18 @@ package types import ( fmt "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "gopkg.in/yaml.v2" ) var _ paramtypes.ParamSet = (*Params)(nil) +var ( + KeyMinimumBonded = []byte("MinimumBonded") + DefaultMinimumBonded uint64 = 10000000000 +) + var ( KeyKeyExpiry = []byte("KeyExpiry") DefaultKeyExpiry uint64 = 100 @@ -18,6 +24,20 @@ var ( KeyTrustedAddresses = []byte("TrustedAddresses") DefaultTrustedAddresses []string ) +var ( + KeySlashFractionNoKeyShare = []byte("KeyNoShareSlashFraction") + DefaultSlashFractionNoKeyShare = sdk.NewDecWithPrec(5, 1) // 0.5 +) + +var ( + KeySlashFractionWrongKeyShare = []byte("KeyWrongShareSlashFraction") + DefaultSlashFractionWrongKeyShare = sdk.NewDecWithPrec(5, 1) // 0.5 +) + +var ( + KeyMaxIdledBlock = []byte("KeyMaxIdledBlock") + DefaultMaxIdledBlock uint64 = 10 +) // ParamKeyTable the param key table for launch module func ParamKeyTable() paramtypes.KeyTable { @@ -28,10 +48,18 @@ func ParamKeyTable() paramtypes.KeyTable { func NewParams( keyExp uint64, trAddrs []string, + minimumBonded uint64, + noKeyShareFraction sdk.Dec, + wrongKeyShareFraction sdk.Dec, + maxIdledBlock uint64, ) Params { return Params{ - KeyExpiry: keyExp, - TrustedAddresses: trAddrs, + KeyExpiry: keyExp, + TrustedAddresses: trAddrs, + SlashFractionNoKeyshare: noKeyShareFraction, + SlashFractionWrongKeyshare: wrongKeyShareFraction, + MaxIdledBlock: maxIdledBlock, + MinimumBonded: minimumBonded, } } @@ -40,6 +68,10 @@ func DefaultParams() Params { return NewParams( DefaultKeyExpiry, DefaultTrustedAddresses, + DefaultMinimumBonded, + DefaultSlashFractionNoKeyShare, + DefaultSlashFractionWrongKeyShare, + DefaultMaxIdledBlock, ) } @@ -48,6 +80,10 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ paramtypes.NewParamSetPair(KeyKeyExpiry, &p.KeyExpiry, validateKeyExpiry), paramtypes.NewParamSetPair(KeyTrustedAddresses, &p.TrustedAddresses, validateTrustedAddresses), + paramtypes.NewParamSetPair(KeyMinimumBonded, &p.MinimumBonded, validateMinimumBonded), + paramtypes.NewParamSetPair(KeySlashFractionNoKeyShare, &p.SlashFractionNoKeyshare, validateSlashFractionNoKeyshare), + paramtypes.NewParamSetPair(KeySlashFractionWrongKeyShare, &p.SlashFractionWrongKeyshare, validateSlashFractionWrongKeyshare), + paramtypes.NewParamSetPair(KeyMaxIdledBlock, &p.MaxIdledBlock, validateMaxIdledBlock), } } @@ -61,6 +97,9 @@ func (p Params) Validate() error { return err } + if err := validateMinimumBonded(p.MinimumBonded); err != nil { + return err + } return nil } @@ -70,7 +109,7 @@ func (p Params) String() string { return string(out) } -// validate validates the KeyExpiry param +// validateKeyExpiry validates the KeyExpiry param func validateKeyExpiry(v interface{}) error { _, ok := v.(uint64) if !ok { @@ -80,9 +119,62 @@ func validateKeyExpiry(v interface{}) error { return nil } -// validate validates the TrustedAddresses param +// validateTrustedAddresses validates the TrustedAddresses param func validateTrustedAddresses(v interface{}) error { - _, ok := v.([]string) + trustedList, ok := v.([]string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + + // Validate each address in the slice + for i, element := range trustedList { + // Perform validation logic on each element + _, err := sdk.AccAddressFromBech32(element) + if err != nil { + return fmt.Errorf("address at index %d is invalid", i) + } + } + + return nil +} + +// validates the MinimumBonded param +func validateMinimumBonded(v interface{}) error { + _, ok := v.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + + return nil +} + +// validateSlashFractionNoKeyshare validates the SlashFractionNoKeyshare param +func validateSlashFractionNoKeyshare(v interface{}) error { + val, ok := v.(sdk.Dec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + if val.LTE(sdk.NewDec(0)) || val.GT(sdk.NewDec(1)) { + return fmt.Errorf("invalid parameter value, expected value between 0 and 1, not including 0, got %v", val) + } + return nil +} + +// validateSlashFractionWrongKeyshare validates the SlashFractionWrongKeyshare param +func validateSlashFractionWrongKeyshare(v interface{}) error { + val, ok := v.(sdk.Dec) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + if val.LTE(sdk.NewDec(0)) || val.GT(sdk.NewDec(1)) { + return fmt.Errorf("invalid parameter value, expected value between 0 and 1, not including 0, got %v", val) + } + return nil +} + +// validateMaxIdledBlock validates the MaxIdledBlock param +func validateMaxIdledBlock(v interface{}) error { + _, ok := v.(uint64) if !ok { return fmt.Errorf("invalid parameter type: %T", v) } diff --git a/x/keyshare/types/params.pb.go b/x/keyshare/types/params.pb.go index 4e99444d..38942ccf 100644 --- a/x/keyshare/types/params.pb.go +++ b/x/keyshare/types/params.pb.go @@ -5,8 +5,9 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -25,8 +26,12 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the parameters for the module. type Params struct { - KeyExpiry uint64 `protobuf:"varint,1,opt,name=key_expiry,json=keyExpiry,proto3" json:"key_expiry,omitempty"` - TrustedAddresses []string `protobuf:"bytes,2,rep,name=trusted_addresses,json=trustedAddresses,proto3" json:"trusted_addresses,omitempty"` + KeyExpiry uint64 `protobuf:"varint,1,opt,name=key_expiry,json=keyExpiry,proto3" json:"key_expiry,omitempty"` + TrustedAddresses []string `protobuf:"bytes,2,rep,name=trusted_addresses,json=trustedAddresses,proto3" json:"trusted_addresses,omitempty"` + SlashFractionNoKeyshare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=slash_fraction_no_keyshare,json=slashFractionNoKeyshare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_no_keyshare"` + SlashFractionWrongKeyshare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=slash_fraction_wrong_keyshare,json=slashFractionWrongKeyshare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"slash_fraction_wrong_keyshare"` + MinimumBonded uint64 `protobuf:"varint,5,opt,name=minimum_bonded,json=minimumBonded,proto3" json:"minimum_bonded,omitempty"` + MaxIdledBlock uint64 `protobuf:"varint,6,opt,name=max_idled_block,json=maxIdledBlock,proto3" json:"max_idled_block,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -75,6 +80,20 @@ func (m *Params) GetTrustedAddresses() []string { return nil } +func (m *Params) GetMinimumBonded() uint64 { + if m != nil { + return m.MinimumBonded + } + return 0 +} + +func (m *Params) GetMaxIdledBlock() uint64 { + if m != nil { + return m.MaxIdledBlock + } + return 0 +} + func init() { proto.RegisterType((*Params)(nil), "fairyring.keyshare.Params") } @@ -82,20 +101,30 @@ func init() { func init() { proto.RegisterFile("fairyring/keyshare/params.proto", fileDescriptor_09ef7bd565425b36) } var fileDescriptor_09ef7bd565425b36 = []byte{ - // 197 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4b, 0xcc, 0x2c, - 0xaa, 0x2c, 0xca, 0xcc, 0x4b, 0xd7, 0xcf, 0x4e, 0xad, 0x2c, 0xce, 0x48, 0x2c, 0x4a, 0xd5, 0x2f, - 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x2b, 0xd0, - 0x83, 0x29, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x4a, - 0x51, 0x5c, 0x6c, 0x01, 0x60, 0x9d, 0x42, 0xb2, 0x5c, 0x5c, 0xd9, 0xa9, 0x95, 0xf1, 0xa9, 0x15, - 0x05, 0x99, 0x45, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x9c, 0xd9, 0xa9, 0x95, 0xae, - 0x60, 0x01, 0x21, 0x6d, 0x2e, 0xc1, 0x92, 0xa2, 0xd2, 0xe2, 0x92, 0xd4, 0x94, 0xf8, 0xc4, 0x94, - 0x94, 0xa2, 0xd4, 0xe2, 0xe2, 0xd4, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0xce, 0x20, 0x01, 0xa8, - 0x84, 0x23, 0x4c, 0xdc, 0x8a, 0x65, 0xc6, 0x02, 0x79, 0x06, 0x27, 0x93, 0x13, 0x8f, 0xe4, 0x18, - 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, - 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x92, 0x42, 0x78, 0xa0, 0x02, 0xe1, 0x85, 0x92, 0xca, 0x82, - 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xc3, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, 0x38, 0x3b, - 0x51, 0xe5, 0x00, 0x00, 0x00, + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0x4f, 0x4b, 0xfb, 0x30, + 0x1c, 0xc6, 0xdb, 0xdf, 0xf6, 0x1b, 0x2c, 0xfc, 0xfe, 0x68, 0x10, 0x2c, 0x85, 0xb5, 0x43, 0x70, + 0x0c, 0xc4, 0xf6, 0xa0, 0x27, 0x6f, 0x16, 0x15, 0x44, 0x10, 0xd9, 0x45, 0xf0, 0x12, 0xd2, 0x26, + 0xeb, 0x42, 0x97, 0xa6, 0x26, 0x1d, 0xb6, 0x2f, 0xc1, 0x9b, 0x47, 0x8f, 0xbe, 0x9c, 0x1d, 0x77, + 0x14, 0x0f, 0x43, 0xb6, 0x37, 0x22, 0x8d, 0xdd, 0x86, 0x1e, 0x3d, 0x25, 0x7c, 0xbe, 0x4f, 0x9e, + 0xe7, 0x4b, 0x1e, 0xe0, 0x0e, 0x31, 0x93, 0xa5, 0x64, 0x69, 0xec, 0x27, 0xb4, 0x54, 0x23, 0x2c, + 0xa9, 0x9f, 0x61, 0x89, 0xb9, 0xf2, 0x32, 0x29, 0x72, 0x01, 0xe1, 0x5a, 0xe0, 0xad, 0x04, 0xf6, + 0x4e, 0x2c, 0x62, 0xa1, 0xc7, 0x7e, 0x75, 0xfb, 0x54, 0xee, 0x3d, 0x36, 0x40, 0xeb, 0x46, 0x3f, + 0x85, 0x1d, 0x00, 0x12, 0x5a, 0x22, 0x5a, 0x64, 0x4c, 0x96, 0x96, 0xd9, 0x35, 0xfb, 0xcd, 0x41, + 0x3b, 0xa1, 0xe5, 0xb9, 0x06, 0xf0, 0x00, 0x6c, 0xe7, 0x72, 0xa2, 0x72, 0x4a, 0x10, 0x26, 0x44, + 0x52, 0xa5, 0xa8, 0xb2, 0x7e, 0x75, 0x1b, 0xfd, 0xf6, 0x60, 0xab, 0x1e, 0x9c, 0xae, 0x38, 0x4c, + 0x80, 0xad, 0xc6, 0x58, 0x8d, 0xd0, 0x50, 0xe2, 0x28, 0x67, 0x22, 0x45, 0xa9, 0x40, 0xab, 0x55, + 0xac, 0x46, 0xd7, 0xec, 0xff, 0x09, 0xbc, 0xe9, 0xdc, 0x35, 0xde, 0xe6, 0x6e, 0x2f, 0x66, 0xf9, + 0x68, 0x12, 0x7a, 0x91, 0xe0, 0x7e, 0x24, 0x14, 0x17, 0xaa, 0x3e, 0x0e, 0x15, 0x49, 0xfc, 0xbc, + 0xcc, 0xa8, 0xf2, 0xce, 0x68, 0x34, 0xd8, 0xd5, 0x8e, 0x17, 0xb5, 0xe1, 0xb5, 0xb8, 0xaa, 0xed, + 0xe0, 0x3d, 0xe8, 0x7c, 0x0b, 0x7b, 0x90, 0x22, 0x8d, 0x37, 0x79, 0xcd, 0x1f, 0xe5, 0xd9, 0x5f, + 0xf2, 0x6e, 0x2b, 0xcb, 0x75, 0xe4, 0x3e, 0xf8, 0xc7, 0x59, 0xca, 0xf8, 0x84, 0xa3, 0x50, 0xa4, + 0x84, 0x12, 0xeb, 0xb7, 0xfe, 0xaf, 0xbf, 0x35, 0x0d, 0x34, 0x84, 0x3d, 0xf0, 0x9f, 0xe3, 0x02, + 0x31, 0x32, 0xa6, 0x04, 0x85, 0x63, 0x11, 0x25, 0x56, 0xab, 0xd6, 0xe1, 0xe2, 0xb2, 0xa2, 0x41, + 0x05, 0x4f, 0x9a, 0xcf, 0x2f, 0xae, 0x11, 0x1c, 0x4f, 0x17, 0x8e, 0x39, 0x5b, 0x38, 0xe6, 0xfb, + 0xc2, 0x31, 0x9f, 0x96, 0x8e, 0x31, 0x5b, 0x3a, 0xc6, 0xeb, 0xd2, 0x31, 0xee, 0xec, 0x4d, 0xe1, + 0xc5, 0xa6, 0x72, 0xbd, 0x6a, 0xd8, 0xd2, 0x45, 0x1e, 0x7d, 0x04, 0x00, 0x00, 0xff, 0xff, 0x6b, + 0xfc, 0xe2, 0xef, 0x15, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -118,6 +147,36 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MaxIdledBlock != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MaxIdledBlock)) + i-- + dAtA[i] = 0x30 + } + if m.MinimumBonded != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.MinimumBonded)) + i-- + dAtA[i] = 0x28 + } + { + size := m.SlashFractionWrongKeyshare.Size() + i -= size + if _, err := m.SlashFractionWrongKeyshare.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.SlashFractionNoKeyshare.Size() + i -= size + if _, err := m.SlashFractionNoKeyshare.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a if len(m.TrustedAddresses) > 0 { for iNdEx := len(m.TrustedAddresses) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.TrustedAddresses[iNdEx]) @@ -161,6 +220,16 @@ func (m *Params) Size() (n int) { n += 1 + l + sovParams(uint64(l)) } } + l = m.SlashFractionNoKeyshare.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.SlashFractionWrongKeyshare.Size() + n += 1 + l + sovParams(uint64(l)) + if m.MinimumBonded != 0 { + n += 1 + sovParams(uint64(m.MinimumBonded)) + } + if m.MaxIdledBlock != 0 { + n += 1 + sovParams(uint64(m.MaxIdledBlock)) + } return n } @@ -250,6 +319,110 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.TrustedAddresses = append(m.TrustedAddresses, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionNoKeyshare", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SlashFractionNoKeyshare.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SlashFractionWrongKeyshare", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SlashFractionWrongKeyshare.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinimumBonded", wireType) + } + m.MinimumBonded = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MinimumBonded |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxIdledBlock", wireType) + } + m.MaxIdledBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxIdledBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/keyshare/types/pub_key.pb.go b/x/keyshare/types/pub_key.pb.go index b43c69e7..2a19ed1b 100644 --- a/x/keyshare/types/pub_key.pb.go +++ b/x/keyshare/types/pub_key.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/keyshare/types/query.pb.go b/x/keyshare/types/query.pb.go index 8716eabf..67b94ebb 100644 --- a/x/keyshare/types/query.pb.go +++ b/x/keyshare/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -762,6 +762,190 @@ func (m *QueryPubKeyResponse) GetQueuedPubKey() QueuedPubKey { return QueuedPubKey{} } +type QueryGetAuthorizedAddressRequest struct { + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` +} + +func (m *QueryGetAuthorizedAddressRequest) Reset() { *m = QueryGetAuthorizedAddressRequest{} } +func (m *QueryGetAuthorizedAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetAuthorizedAddressRequest) ProtoMessage() {} +func (*QueryGetAuthorizedAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_572603c2d521bf14, []int{16} +} +func (m *QueryGetAuthorizedAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAuthorizedAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAuthorizedAddressRequest.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 *QueryGetAuthorizedAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAuthorizedAddressRequest.Merge(m, src) +} +func (m *QueryGetAuthorizedAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAuthorizedAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAuthorizedAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAuthorizedAddressRequest proto.InternalMessageInfo + +func (m *QueryGetAuthorizedAddressRequest) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +type QueryGetAuthorizedAddressResponse struct { + AuthorizedAddress AuthorizedAddress `protobuf:"bytes,1,opt,name=authorizedAddress,proto3" json:"authorizedAddress"` +} + +func (m *QueryGetAuthorizedAddressResponse) Reset() { *m = QueryGetAuthorizedAddressResponse{} } +func (m *QueryGetAuthorizedAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetAuthorizedAddressResponse) ProtoMessage() {} +func (*QueryGetAuthorizedAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_572603c2d521bf14, []int{17} +} +func (m *QueryGetAuthorizedAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetAuthorizedAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetAuthorizedAddressResponse.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 *QueryGetAuthorizedAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetAuthorizedAddressResponse.Merge(m, src) +} +func (m *QueryGetAuthorizedAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetAuthorizedAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetAuthorizedAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetAuthorizedAddressResponse proto.InternalMessageInfo + +func (m *QueryGetAuthorizedAddressResponse) GetAuthorizedAddress() AuthorizedAddress { + if m != nil { + return m.AuthorizedAddress + } + return AuthorizedAddress{} +} + +type QueryAllAuthorizedAddressRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllAuthorizedAddressRequest) Reset() { *m = QueryAllAuthorizedAddressRequest{} } +func (m *QueryAllAuthorizedAddressRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllAuthorizedAddressRequest) ProtoMessage() {} +func (*QueryAllAuthorizedAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_572603c2d521bf14, []int{18} +} +func (m *QueryAllAuthorizedAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllAuthorizedAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllAuthorizedAddressRequest.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 *QueryAllAuthorizedAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllAuthorizedAddressRequest.Merge(m, src) +} +func (m *QueryAllAuthorizedAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllAuthorizedAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllAuthorizedAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllAuthorizedAddressRequest proto.InternalMessageInfo + +func (m *QueryAllAuthorizedAddressRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllAuthorizedAddressResponse struct { + AuthorizedAddress []AuthorizedAddress `protobuf:"bytes,1,rep,name=authorizedAddress,proto3" json:"authorizedAddress"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllAuthorizedAddressResponse) Reset() { *m = QueryAllAuthorizedAddressResponse{} } +func (m *QueryAllAuthorizedAddressResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllAuthorizedAddressResponse) ProtoMessage() {} +func (*QueryAllAuthorizedAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_572603c2d521bf14, []int{19} +} +func (m *QueryAllAuthorizedAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllAuthorizedAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllAuthorizedAddressResponse.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 *QueryAllAuthorizedAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllAuthorizedAddressResponse.Merge(m, src) +} +func (m *QueryAllAuthorizedAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllAuthorizedAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllAuthorizedAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllAuthorizedAddressResponse proto.InternalMessageInfo + +func (m *QueryAllAuthorizedAddressResponse) GetAuthorizedAddress() []AuthorizedAddress { + if m != nil { + return m.AuthorizedAddress + } + return nil +} + +func (m *QueryAllAuthorizedAddressResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "fairyring.keyshare.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "fairyring.keyshare.QueryParamsResponse") @@ -779,68 +963,82 @@ func init() { proto.RegisterType((*QueryAllAggregatedKeyShareResponse)(nil), "fairyring.keyshare.QueryAllAggregatedKeyShareResponse") proto.RegisterType((*QueryPubKeyRequest)(nil), "fairyring.keyshare.QueryPubKeyRequest") proto.RegisterType((*QueryPubKeyResponse)(nil), "fairyring.keyshare.QueryPubKeyResponse") + proto.RegisterType((*QueryGetAuthorizedAddressRequest)(nil), "fairyring.keyshare.QueryGetAuthorizedAddressRequest") + proto.RegisterType((*QueryGetAuthorizedAddressResponse)(nil), "fairyring.keyshare.QueryGetAuthorizedAddressResponse") + proto.RegisterType((*QueryAllAuthorizedAddressRequest)(nil), "fairyring.keyshare.QueryAllAuthorizedAddressRequest") + proto.RegisterType((*QueryAllAuthorizedAddressResponse)(nil), "fairyring.keyshare.QueryAllAuthorizedAddressResponse") } func init() { proto.RegisterFile("fairyring/keyshare/query.proto", fileDescriptor_572603c2d521bf14) } var fileDescriptor_572603c2d521bf14 = []byte{ - // 896 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x4f, 0x03, 0x45, - 0x14, 0xc7, 0x3b, 0xfc, 0x68, 0x60, 0x20, 0x31, 0x19, 0x51, 0xc9, 0x52, 0x4a, 0x19, 0x22, 0x3f, - 0x75, 0x87, 0x82, 0xa8, 0xc4, 0x44, 0x53, 0x0e, 0x62, 0xe4, 0x20, 0x94, 0xc4, 0x44, 0x62, 0x42, - 0xa6, 0x74, 0xdc, 0xae, 0x5d, 0xba, 0x65, 0x77, 0xdb, 0xd0, 0x34, 0xf5, 0xc0, 0xc1, 0xab, 0x26, - 0xfe, 0x01, 0x1e, 0x34, 0xde, 0x3c, 0x79, 0xf1, 0xe4, 0x99, 0xc4, 0x0b, 0x89, 0x17, 0x4f, 0xc6, - 0x80, 0x7f, 0x88, 0xd9, 0xd9, 0xb7, 0xdb, 0x6d, 0xbb, 0xbb, 0x2d, 0xa4, 0xb7, 0xee, 0xcc, 0x7b, - 0x6f, 0x3e, 0xef, 0xfb, 0xa6, 0xef, 0x0d, 0xce, 0x7e, 0xc5, 0x75, 0xab, 0x65, 0xe9, 0x35, 0x8d, - 0x55, 0x45, 0xcb, 0xae, 0x70, 0x4b, 0xb0, 0x9b, 0x86, 0xb0, 0x5a, 0x6a, 0xdd, 0x32, 0x1d, 0x93, - 0x90, 0x60, 0x5f, 0xf5, 0xf7, 0x95, 0x05, 0xcd, 0xd4, 0x4c, 0xb9, 0xcd, 0xdc, 0x5f, 0x9e, 0xa5, - 0x92, 0xd1, 0x4c, 0x53, 0x33, 0x04, 0xe3, 0x75, 0x9d, 0xf1, 0x5a, 0xcd, 0x74, 0xb8, 0xa3, 0x9b, - 0x35, 0x1b, 0x76, 0xb7, 0xaf, 0x4c, 0xfb, 0xda, 0xb4, 0x59, 0x89, 0xdb, 0x70, 0x00, 0x6b, 0xe6, - 0x4b, 0xc2, 0xe1, 0x79, 0x56, 0xe7, 0x9a, 0x5e, 0x93, 0xc6, 0x60, 0xbb, 0x12, 0xc1, 0x54, 0xe7, - 0x16, 0xbf, 0xf6, 0x83, 0xad, 0x47, 0x18, 0x34, 0xb9, 0xa1, 0x97, 0xb9, 0x63, 0x5a, 0x97, 0xb6, - 0x70, 0xc0, 0x8e, 0x46, 0xd8, 0x55, 0x45, 0xeb, 0x52, 0xfe, 0x02, 0x9b, 0xb7, 0x23, 0x6c, 0xb8, - 0xa6, 0x59, 0x42, 0xe3, 0x8e, 0x28, 0x5f, 0xf6, 0x9b, 0xe7, 0xa2, 0xd8, 0x1a, 0x25, 0xd7, 0xce, - 0xb3, 0xa0, 0x0b, 0x98, 0x9c, 0xb9, 0xf9, 0x9d, 0x4a, 0xe2, 0xa2, 0xb8, 0x69, 0x08, 0xdb, 0xa1, - 0x9f, 0xe1, 0x57, 0x7b, 0x56, 0xed, 0xba, 0x59, 0xb3, 0x05, 0x79, 0x1f, 0xa7, 0xbd, 0xcc, 0x16, - 0x51, 0x0e, 0x6d, 0xce, 0xed, 0x29, 0xea, 0xa0, 0xde, 0xaa, 0xe7, 0x73, 0x34, 0x75, 0xff, 0xcf, - 0x4a, 0xaa, 0x08, 0xf6, 0x74, 0x1f, 0x2f, 0xc9, 0x80, 0xc7, 0xc2, 0xf9, 0xdc, 0x4f, 0xfd, 0x5c, - 0x38, 0x70, 0x1e, 0x59, 0xc0, 0xd3, 0x7a, 0xad, 0x2c, 0x6e, 0x65, 0xdc, 0xd9, 0xa2, 0xf7, 0x41, - 0xbf, 0xc6, 0x99, 0x68, 0x27, 0xc0, 0xf9, 0x14, 0xcf, 0x37, 0x43, 0xeb, 0x00, 0x95, 0x8b, 0x82, - 0x0a, 0xfb, 0x03, 0x5a, 0x8f, 0x2f, 0x15, 0x00, 0x58, 0x30, 0x8c, 0x28, 0xc0, 0x8f, 0x31, 0xee, - 0x16, 0x1e, 0x0e, 0x5a, 0x57, 0xbd, 0x5b, 0xa2, 0xba, 0xb7, 0x44, 0xf5, 0xae, 0x21, 0xdc, 0x12, - 0xf5, 0x94, 0x6b, 0x02, 0x7c, 0x8b, 0x21, 0x4f, 0xfa, 0x1b, 0x82, 0x9c, 0x06, 0xce, 0x89, 0xcd, - 0x69, 0xf2, 0xa5, 0x39, 0x91, 0xe3, 0x1e, 0xe8, 0x09, 0x09, 0xbd, 0x31, 0x14, 0xda, 0x03, 0xe9, - 0xa1, 0xfe, 0x02, 0xbf, 0xe1, 0x17, 0xe2, 0x44, 0xb4, 0xce, 0xdd, 0xd3, 0x7d, 0x61, 0x32, 0x78, - 0x36, 0x38, 0x13, 0xaa, 0xd7, 0x5d, 0x20, 0x39, 0x3c, 0x57, 0x32, 0xcc, 0xab, 0xea, 0x27, 0x42, - 0xd7, 0x2a, 0x8e, 0x44, 0x98, 0x2a, 0x86, 0x97, 0xe8, 0x05, 0x5e, 0x1c, 0x0c, 0x0d, 0x5a, 0x7c, - 0x88, 0x67, 0xaa, 0xb0, 0x06, 0x92, 0x67, 0xa2, 0x74, 0xf0, 0xfd, 0x40, 0x83, 0xc0, 0x87, 0x72, - 0xc0, 0x2e, 0x18, 0x46, 0x3f, 0xf6, 0xb8, 0xea, 0xf9, 0x13, 0x02, 0xfe, 0x9e, 0x33, 0x22, 0xf9, - 0x27, 0x9f, 0xcb, 0x3f, 0xbe, 0xfa, 0x7d, 0x80, 0x57, 0x7d, 0x91, 0x0b, 0x41, 0xb3, 0xe8, 0x97, - 0xe4, 0x75, 0x9c, 0xae, 0x78, 0x65, 0x42, 0xb2, 0x4c, 0xf0, 0x45, 0xef, 0x10, 0xa6, 0x49, 0xde, - 0x90, 0xec, 0x97, 0x98, 0xf0, 0x81, 0xdd, 0x40, 0xd9, 0x88, 0xb4, 0x07, 0x63, 0x81, 0x00, 0x11, - 0x71, 0x68, 0x15, 0x32, 0x28, 0x18, 0x46, 0x7c, 0x06, 0xe3, 0x2a, 0xea, 0x9f, 0x7e, 0xc6, 0x31, - 0xa7, 0x0d, 0xc9, 0x78, 0x72, 0x1c, 0x19, 0x8f, 0xaf, 0xf8, 0x41, 0x87, 0x6f, 0x94, 0x4e, 0x44, - 0xcb, 0xef, 0xf0, 0xbf, 0x22, 0xbf, 0xc5, 0xc3, 0x72, 0xb7, 0xff, 0xf0, 0x2b, 0x47, 0x6f, 0x0a, - 0x6f, 0x3d, 0xa9, 0xa7, 0x16, 0x42, 0x76, 0x7e, 0xff, 0x09, 0xfb, 0xba, 0xb1, 0x6e, 0x1a, 0xa2, - 0x21, 0xca, 0x10, 0x6b, 0x22, 0x3e, 0xd6, 0x59, 0xc8, 0xce, 0x8f, 0x15, 0xf6, 0xdd, 0xfb, 0x16, - 0xe3, 0x69, 0xc9, 0x4b, 0x3a, 0x38, 0xed, 0x8d, 0x18, 0xb2, 0x1e, 0x13, 0xa9, 0x6f, 0x9a, 0x29, - 0x1b, 0x43, 0xed, 0xbc, 0xe4, 0x29, 0xbd, 0xfb, 0xeb, 0xbf, 0x1f, 0x26, 0x32, 0x44, 0x61, 0xb1, - 0x33, 0x9d, 0xfc, 0x8c, 0xf0, 0x7c, 0xb8, 0xf3, 0x12, 0x16, 0x1b, 0x3d, 0x7a, 0xd8, 0x29, 0xbb, - 0xa3, 0x3b, 0x00, 0x57, 0x5e, 0x72, 0xed, 0x90, 0x2d, 0x36, 0xec, 0x29, 0xc1, 0xda, 0x72, 0x74, - 0x76, 0xc8, 0x8f, 0x08, 0xbf, 0x12, 0x8e, 0x55, 0x30, 0x8c, 0x04, 0xd2, 0xe8, 0xa9, 0x97, 0x40, - 0x1a, 0x33, 0xbe, 0xe8, 0x96, 0x24, 0x5d, 0x23, 0xab, 0x43, 0x49, 0xc9, 0x2f, 0x08, 0xcf, 0x04, - 0xb7, 0x7d, 0x27, 0x49, 0x93, 0xbe, 0xff, 0xb9, 0xf2, 0xd6, 0x68, 0xc6, 0x80, 0xf4, 0x91, 0x44, - 0x3a, 0x24, 0xef, 0xb1, 0xa4, 0xf7, 0x15, 0x6b, 0x07, 0x74, 0x1d, 0xd6, 0x0e, 0x4d, 0xa8, 0x0e, - 0xf9, 0x0e, 0xe1, 0x39, 0x3f, 0xaa, 0x2b, 0xe3, 0x4e, 0x92, 0x2a, 0xa3, 0xb3, 0x46, 0x4c, 0x0c, - 0xfa, 0xa6, 0x64, 0x5d, 0x21, 0xcb, 0x89, 0xac, 0xe4, 0x0f, 0x84, 0xc9, 0x60, 0x33, 0x21, 0x07, - 0x49, 0xba, 0xc4, 0xb6, 0x4d, 0xe5, 0xdd, 0xe7, 0xba, 0x01, 0xec, 0xa1, 0x84, 0xdd, 0x27, 0x79, - 0x36, 0xe2, 0xa3, 0x94, 0xb5, 0x2b, 0x20, 0xe9, 0xef, 0x08, 0xbf, 0x36, 0x18, 0xd9, 0x15, 0xf7, - 0x20, 0x49, 0xaf, 0x97, 0xe4, 0x90, 0xd8, 0xc3, 0xe9, 0xae, 0xcc, 0x61, 0x9b, 0x6c, 0x8e, 0x9a, - 0x03, 0xf9, 0x06, 0xa7, 0xa1, 0xbd, 0x25, 0xb4, 0x9f, 0x70, 0xab, 0x4d, 0x6a, 0x3f, 0x3d, 0xbd, - 0x97, 0xae, 0x49, 0x98, 0x65, 0xb2, 0xc4, 0xe2, 0x9f, 0xed, 0x47, 0xef, 0xdc, 0x3f, 0x66, 0xd1, - 0xc3, 0x63, 0x16, 0xfd, 0xfb, 0x98, 0x45, 0xdf, 0x3f, 0x65, 0x53, 0x0f, 0x4f, 0xd9, 0xd4, 0xdf, - 0x4f, 0xd9, 0xd4, 0x85, 0xd2, 0xf5, 0xba, 0xed, 0xfa, 0x39, 0xad, 0xba, 0xb0, 0x4b, 0x69, 0xf9, - 0xda, 0xdf, 0xff, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x83, 0x3d, 0xe8, 0xf7, 0x41, 0x0d, 0x00, 0x00, + // 1054 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xc0, 0x33, 0x49, 0x6b, 0x35, 0x93, 0x48, 0xa8, 0x43, 0x80, 0x6a, 0xeb, 0x3a, 0xee, 0x54, + 0x4d, 0xd3, 0x06, 0x76, 0xea, 0x26, 0xa1, 0x14, 0x24, 0x90, 0x7b, 0xa0, 0x88, 0x1e, 0x68, 0x5d, + 0x09, 0xa9, 0x15, 0x52, 0x34, 0x8e, 0x87, 0xf5, 0xd6, 0x5b, 0xaf, 0xb3, 0xbb, 0x8e, 0x6a, 0x2c, + 0xf7, 0xd0, 0x2f, 0x00, 0x12, 0x1f, 0x80, 0x03, 0x88, 0x1b, 0xa7, 0x5e, 0xe0, 0xc2, 0x95, 0x4a, + 0x5c, 0x2a, 0x71, 0xe1, 0x84, 0x50, 0xc2, 0x87, 0xe0, 0x88, 0x76, 0xf6, 0xed, 0x7a, 0xed, 0x9d, + 0x1d, 0xdb, 0xc1, 0xb7, 0x78, 0xe6, 0xbd, 0x37, 0xbf, 0xf7, 0x27, 0xef, 0xbd, 0xc5, 0xa5, 0x2f, + 0xb9, 0xed, 0xf5, 0x3c, 0xbb, 0x6d, 0xb1, 0x96, 0xe8, 0xf9, 0x4d, 0xee, 0x09, 0x76, 0xd0, 0x15, + 0x5e, 0xcf, 0xec, 0x78, 0x6e, 0xe0, 0x12, 0x92, 0xdc, 0x9b, 0xf1, 0xbd, 0xb1, 0x66, 0xb9, 0x96, + 0x2b, 0xaf, 0x59, 0xf8, 0x57, 0x24, 0x69, 0x14, 0x2d, 0xd7, 0xb5, 0x1c, 0xc1, 0x78, 0xc7, 0x66, + 0xbc, 0xdd, 0x76, 0x03, 0x1e, 0xd8, 0x6e, 0xdb, 0x87, 0xdb, 0x6b, 0xfb, 0xae, 0xff, 0xc4, 0xf5, + 0x59, 0x9d, 0xfb, 0xf0, 0x00, 0x3b, 0xac, 0xd4, 0x45, 0xc0, 0x2b, 0xac, 0xc3, 0x2d, 0xbb, 0x2d, + 0x85, 0x41, 0x76, 0x5d, 0xc1, 0xd4, 0xe1, 0x1e, 0x7f, 0x12, 0x1b, 0xdb, 0x50, 0x08, 0x1c, 0x72, + 0xc7, 0x6e, 0xf0, 0xc0, 0xf5, 0xf6, 0x7c, 0x11, 0x80, 0x1c, 0x55, 0xc8, 0xb5, 0x44, 0x6f, 0x4f, + 0xfe, 0x05, 0x32, 0xef, 0x28, 0x64, 0xb8, 0x65, 0x79, 0xc2, 0xe2, 0x81, 0x68, 0xec, 0x8d, 0x8b, + 0x97, 0x55, 0x6c, 0xdd, 0x7a, 0x28, 0x07, 0x12, 0x5b, 0x2a, 0x83, 0xdd, 0xa0, 0xe9, 0x7a, 0xf6, + 0x57, 0xa2, 0xb1, 0xc7, 0x1b, 0x0d, 0x4f, 0xf8, 0xe0, 0x09, 0x5d, 0xc3, 0xe4, 0x7e, 0x18, 0x8c, + 0x7b, 0xd2, 0xbd, 0x9a, 0x38, 0xe8, 0x0a, 0x3f, 0xa0, 0x9f, 0xe1, 0xd7, 0x47, 0x4e, 0xfd, 0x8e, + 0xdb, 0xf6, 0x05, 0x79, 0x0f, 0x17, 0xa2, 0x30, 0x9c, 0x43, 0x65, 0xb4, 0xb9, 0x72, 0xc3, 0x30, + 0xb3, 0xc9, 0x31, 0x23, 0x9d, 0xdb, 0xa7, 0x5e, 0xfe, 0xb5, 0xbe, 0x50, 0x03, 0x79, 0xba, 0x8d, + 0xcf, 0x4b, 0x83, 0x77, 0x44, 0xf0, 0x79, 0x1c, 0xa7, 0x07, 0x22, 0x80, 0xf7, 0xc8, 0x1a, 0x3e, + 0x6d, 0xb7, 0x1b, 0xe2, 0xa9, 0xb4, 0xbb, 0x5c, 0x8b, 0x7e, 0xd0, 0xc7, 0xb8, 0xa8, 0x56, 0x02, + 0x9c, 0x4f, 0xf1, 0xea, 0x61, 0xea, 0x1c, 0xa0, 0xca, 0x2a, 0xa8, 0xb4, 0x3e, 0xa0, 0x8d, 0xe8, + 0x52, 0x01, 0x80, 0x55, 0xc7, 0x51, 0x01, 0x7e, 0x8c, 0xf1, 0xb0, 0x4a, 0xe0, 0xa1, 0x0d, 0x33, + 0x2a, 0x29, 0x33, 0x2c, 0x29, 0x33, 0xaa, 0x59, 0x28, 0x29, 0xf3, 0x1e, 0xb7, 0x04, 0xe8, 0xd6, + 0x52, 0x9a, 0xf4, 0x05, 0x02, 0x9f, 0x32, 0xef, 0xe4, 0xfa, 0xb4, 0x74, 0x52, 0x9f, 0xc8, 0x9d, + 0x11, 0xe8, 0x45, 0x09, 0x7d, 0x65, 0x22, 0x74, 0x04, 0x32, 0x42, 0xfd, 0x10, 0xbf, 0x15, 0x27, + 0xe2, 0xae, 0xe8, 0x3d, 0x08, 0x5f, 0x8f, 0x03, 0x53, 0xc4, 0xcb, 0xc9, 0x9b, 0x90, 0xbd, 0xe1, + 0x01, 0x29, 0xe3, 0x95, 0xba, 0xe3, 0xee, 0xb7, 0x3e, 0x11, 0xb6, 0xd5, 0x0c, 0x24, 0xc2, 0xa9, + 0x5a, 0xfa, 0x88, 0x3e, 0xc2, 0xe7, 0xb2, 0xa6, 0x21, 0x16, 0x1f, 0xe2, 0x33, 0x2d, 0x38, 0x83, + 0x90, 0x17, 0x55, 0x71, 0x88, 0xf5, 0x20, 0x06, 0x89, 0x0e, 0xe5, 0x80, 0x5d, 0x75, 0x9c, 0x71, + 0xec, 0x79, 0xe5, 0xf3, 0x7b, 0x04, 0xfc, 0x23, 0x6f, 0x28, 0xf9, 0x97, 0x66, 0xe5, 0x9f, 0x5f, + 0xfe, 0x3e, 0xc0, 0x17, 0xe3, 0x20, 0x57, 0x93, 0xce, 0x32, 0x1e, 0x92, 0x37, 0x71, 0xa1, 0x19, + 0xa5, 0x09, 0xc9, 0x34, 0xc1, 0x2f, 0xfa, 0x1c, 0x61, 0xaa, 0xd3, 0x06, 0x67, 0xbf, 0xc0, 0x84, + 0x67, 0x6e, 0x93, 0xc8, 0x2a, 0xdc, 0xce, 0xda, 0x82, 0x00, 0x28, 0xec, 0xd0, 0x16, 0x78, 0x50, + 0x75, 0x9c, 0x7c, 0x0f, 0xe6, 0x95, 0xd4, 0xdf, 0x63, 0x8f, 0x73, 0x5e, 0x9b, 0xe0, 0xf1, 0xd2, + 0x3c, 0x3c, 0x9e, 0x5f, 0xf2, 0x93, 0x0e, 0xdf, 0xad, 0xdf, 0x15, 0xbd, 0xb8, 0xc3, 0xff, 0x84, + 0xe2, 0x16, 0x0f, 0xc7, 0xc3, 0xfe, 0xc3, 0xf7, 0x03, 0xfb, 0x50, 0x44, 0xe7, 0xba, 0x9e, 0x5a, + 0x4d, 0xc9, 0xc5, 0xfd, 0x27, 0xad, 0x1b, 0xda, 0x3a, 0xe8, 0x8a, 0xae, 0x68, 0x80, 0xad, 0xc5, + 0x7c, 0x5b, 0xf7, 0x53, 0x72, 0xb1, 0xad, 0xb4, 0x2e, 0x7d, 0x1f, 0x97, 0x93, 0x22, 0x4c, 0x66, + 0x59, 0x35, 0x1a, 0x65, 0xa9, 0x0a, 0x0e, 0xb8, 0x67, 0xc1, 0x24, 0x58, 0xae, 0xc1, 0x2f, 0xfa, + 0x2c, 0x55, 0xfe, 0x59, 0x5d, 0x70, 0xfc, 0x21, 0x3e, 0xcb, 0xc7, 0x2f, 0xc1, 0xfb, 0xcb, 0x4a, + 0xef, 0xc7, 0x85, 0x01, 0x3b, 0x6b, 0x85, 0x3e, 0x06, 0xf6, 0xb0, 0x9c, 0xf2, 0xd8, 0xe7, 0x55, + 0xbb, 0xbf, 0xa1, 0xd4, 0x7f, 0xca, 0xac, 0xce, 0x2e, 0xfd, 0x7f, 0x67, 0xe7, 0x56, 0xb7, 0x37, + 0xfe, 0x5d, 0xc5, 0xa7, 0xa5, 0x27, 0x64, 0x80, 0x0b, 0xd1, 0x52, 0x41, 0x36, 0x72, 0x6a, 0x67, + 0x6c, 0x7f, 0x31, 0xae, 0x4c, 0x94, 0x8b, 0x1e, 0xa4, 0xf4, 0xf9, 0x1f, 0xff, 0x7c, 0xbb, 0x58, + 0x24, 0x06, 0xcb, 0x5d, 0xf9, 0xc8, 0x0f, 0x08, 0xaf, 0xa6, 0x67, 0x2d, 0x61, 0xb9, 0xd6, 0xd5, + 0xeb, 0x8d, 0x71, 0x7d, 0x7a, 0x05, 0xe0, 0xaa, 0x48, 0xae, 0x2d, 0x72, 0x95, 0x4d, 0xda, 0x34, + 0x59, 0x5f, 0x2e, 0x4b, 0x03, 0xf2, 0x1d, 0xc2, 0xaf, 0xa5, 0x6d, 0x55, 0x1d, 0x47, 0x43, 0xaa, + 0xde, 0x73, 0x34, 0xa4, 0x39, 0x0b, 0x0b, 0xbd, 0x2a, 0x49, 0x2f, 0x91, 0x8b, 0x13, 0x49, 0xc9, + 0x8f, 0x08, 0x9f, 0x49, 0xfa, 0xdb, 0x96, 0x2e, 0x26, 0x63, 0x9d, 0xdd, 0x78, 0x7b, 0x3a, 0x61, + 0x40, 0xfa, 0x48, 0x22, 0xdd, 0x22, 0x37, 0x99, 0x6e, 0xfd, 0x66, 0xfd, 0x84, 0x6e, 0xc0, 0xfa, + 0xa9, 0x9d, 0x64, 0x40, 0xbe, 0x46, 0x78, 0x25, 0xb6, 0x1a, 0x86, 0x71, 0x4b, 0x17, 0x95, 0xe9, + 0x59, 0x15, 0x3b, 0x02, 0xbd, 0x2c, 0x59, 0xd7, 0xc9, 0x05, 0x2d, 0x2b, 0xf9, 0x15, 0x61, 0x92, + 0x1d, 0x1f, 0x64, 0x57, 0x17, 0x97, 0xdc, 0x41, 0x69, 0xbc, 0x3b, 0xab, 0x1a, 0xc0, 0xde, 0x92, + 0xb0, 0xdb, 0xa4, 0xc2, 0xa6, 0xfc, 0x66, 0x61, 0xfd, 0x26, 0x84, 0xf4, 0x67, 0x84, 0xdf, 0xc8, + 0x5a, 0x0e, 0x83, 0xbb, 0xab, 0x8b, 0xd7, 0x49, 0x7c, 0xd0, 0x4e, 0x6d, 0x7a, 0x5d, 0xfa, 0x70, + 0x8d, 0x6c, 0x4e, 0xeb, 0x03, 0x79, 0x86, 0x0b, 0x30, 0xd0, 0x34, 0xed, 0x27, 0x3d, 0x5c, 0x75, + 0xed, 0x67, 0x64, 0xda, 0xd2, 0x4b, 0x12, 0xe6, 0x02, 0x39, 0xcf, 0xf2, 0xbf, 0xea, 0xc8, 0x2f, + 0x08, 0x9f, 0xcd, 0x34, 0x60, 0xb2, 0xa3, 0xcd, 0x61, 0xce, 0x98, 0x31, 0x76, 0x67, 0xd4, 0x02, + 0xce, 0x9b, 0x92, 0xb3, 0x42, 0x18, 0x9b, 0xea, 0xdb, 0x92, 0xf5, 0xa3, 0xc9, 0x3b, 0x20, 0x2f, + 0x10, 0x5e, 0xcb, 0x98, 0x0d, 0xb3, 0xbe, 0xa3, 0x4d, 0xdf, 0xec, 0xf8, 0xba, 0x71, 0x47, 0x4d, + 0x89, 0xbf, 0x49, 0x36, 0xa6, 0xc3, 0xbf, 0xbd, 0xf3, 0xf2, 0xa8, 0x84, 0x5e, 0x1d, 0x95, 0xd0, + 0xdf, 0x47, 0x25, 0xf4, 0xcd, 0x71, 0x69, 0xe1, 0xd5, 0x71, 0x69, 0xe1, 0xcf, 0xe3, 0xd2, 0xc2, + 0x23, 0x63, 0x68, 0xe0, 0xe9, 0xd0, 0x44, 0xd0, 0xeb, 0x08, 0xbf, 0x5e, 0x90, 0x5f, 0xd4, 0xdb, + 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x70, 0xe6, 0x11, 0x82, 0xd2, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -870,6 +1068,9 @@ type QueryClient interface { AggregatedKeyShareAll(ctx context.Context, in *QueryAllAggregatedKeyShareRequest, opts ...grpc.CallOption) (*QueryAllAggregatedKeyShareResponse, error) // Queries the public keys PubKey(ctx context.Context, in *QueryPubKeyRequest, opts ...grpc.CallOption) (*QueryPubKeyResponse, error) + // Queries a list of AuthorizedAddress items. + AuthorizedAddress(ctx context.Context, in *QueryGetAuthorizedAddressRequest, opts ...grpc.CallOption) (*QueryGetAuthorizedAddressResponse, error) + AuthorizedAddressAll(ctx context.Context, in *QueryAllAuthorizedAddressRequest, opts ...grpc.CallOption) (*QueryAllAuthorizedAddressResponse, error) } type queryClient struct { @@ -952,6 +1153,24 @@ func (c *queryClient) PubKey(ctx context.Context, in *QueryPubKeyRequest, opts . return out, nil } +func (c *queryClient) AuthorizedAddress(ctx context.Context, in *QueryGetAuthorizedAddressRequest, opts ...grpc.CallOption) (*QueryGetAuthorizedAddressResponse, error) { + out := new(QueryGetAuthorizedAddressResponse) + err := c.cc.Invoke(ctx, "/fairyring.keyshare.Query/AuthorizedAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AuthorizedAddressAll(ctx context.Context, in *QueryAllAuthorizedAddressRequest, opts ...grpc.CallOption) (*QueryAllAuthorizedAddressResponse, error) { + out := new(QueryAllAuthorizedAddressResponse) + err := c.cc.Invoke(ctx, "/fairyring.keyshare.Query/AuthorizedAddressAll", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. @@ -969,6 +1188,9 @@ type QueryServer interface { AggregatedKeyShareAll(context.Context, *QueryAllAggregatedKeyShareRequest) (*QueryAllAggregatedKeyShareResponse, error) // Queries the public keys PubKey(context.Context, *QueryPubKeyRequest) (*QueryPubKeyResponse, error) + // Queries a list of AuthorizedAddress items. + AuthorizedAddress(context.Context, *QueryGetAuthorizedAddressRequest) (*QueryGetAuthorizedAddressResponse, error) + AuthorizedAddressAll(context.Context, *QueryAllAuthorizedAddressRequest) (*QueryAllAuthorizedAddressResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -999,6 +1221,12 @@ func (*UnimplementedQueryServer) AggregatedKeyShareAll(ctx context.Context, req func (*UnimplementedQueryServer) PubKey(ctx context.Context, req *QueryPubKeyRequest) (*QueryPubKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PubKey not implemented") } +func (*UnimplementedQueryServer) AuthorizedAddress(ctx context.Context, req *QueryGetAuthorizedAddressRequest) (*QueryGetAuthorizedAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthorizedAddress not implemented") +} +func (*UnimplementedQueryServer) AuthorizedAddressAll(ctx context.Context, req *QueryAllAuthorizedAddressRequest) (*QueryAllAuthorizedAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AuthorizedAddressAll not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1148,6 +1376,42 @@ func _Query_PubKey_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_AuthorizedAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetAuthorizedAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AuthorizedAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fairyring.keyshare.Query/AuthorizedAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AuthorizedAddress(ctx, req.(*QueryGetAuthorizedAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AuthorizedAddressAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllAuthorizedAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AuthorizedAddressAll(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fairyring.keyshare.Query/AuthorizedAddressAll", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AuthorizedAddressAll(ctx, req.(*QueryAllAuthorizedAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "fairyring.keyshare.Query", HandlerType: (*QueryServer)(nil), @@ -1184,6 +1448,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "PubKey", Handler: _Query_PubKey_Handler, }, + { + MethodName: "AuthorizedAddress", + Handler: _Query_AuthorizedAddress_Handler, + }, + { + MethodName: "AuthorizedAddressAll", + Handler: _Query_AuthorizedAddressAll_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "fairyring/keyshare/query.proto", @@ -1755,97 +2027,244 @@ func (m *QueryPubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryGetAuthorizedAddressRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - return n + return dAtA[:n], nil } -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n +func (m *QueryGetAuthorizedAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetValidatorSetRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryGetAuthorizedAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - l = len(m.Index) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0xa } - return n + return len(dAtA) - i, nil } -func (m *QueryGetValidatorSetResponse) Size() (n int) { - if m == nil { - return 0 +func (m *QueryGetAuthorizedAddressResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - var l int - _ = l - l = m.ValidatorSet.Size() - n += 1 + l + sovQuery(uint64(l)) - return n + return dAtA[:n], nil } -func (m *QueryAllValidatorSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n +func (m *QueryGetAuthorizedAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryAllValidatorSetResponse) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryGetAuthorizedAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.ValidatorSet) > 0 { - for _, e := range m.ValidatorSet { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) + { + size, err := m.AuthorizedAddress.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *QueryGetKeyShareRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryAllAuthorizedAddressRequest) 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 *QueryAllAuthorizedAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllAuthorizedAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.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 +} + +func (m *QueryAllAuthorizedAddressResponse) 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 *QueryAllAuthorizedAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllAuthorizedAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.AuthorizedAddress) > 0 { + for iNdEx := len(m.AuthorizedAddress) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AuthorizedAddress[iNdEx].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 +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryGetValidatorSetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Index) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetValidatorSetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ValidatorSet.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllValidatorSetRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllValidatorSetResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ValidatorSet) > 0 { + for _, e := range m.ValidatorSet { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetKeyShareRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Validator) @@ -1978,6 +2397,62 @@ func (m *QueryPubKeyResponse) Size() (n int) { return n } +func (m *QueryGetAuthorizedAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Target) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryGetAuthorizedAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.AuthorizedAddress.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryAllAuthorizedAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllAuthorizedAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.AuthorizedAddress) > 0 { + for _, e := range m.AuthorizedAddress { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3402,6 +3877,377 @@ func (m *QueryPubKeyResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryGetAuthorizedAddressRequest) 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 ErrIntOverflowQuery + } + 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: QueryGetAuthorizedAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetAuthorizedAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Target = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetAuthorizedAddressResponse) 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 ErrIntOverflowQuery + } + 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: QueryGetAuthorizedAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetAuthorizedAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthorizedAddress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AuthorizedAddress.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllAuthorizedAddressRequest) 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 ErrIntOverflowQuery + } + 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: QueryAllAuthorizedAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllAuthorizedAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllAuthorizedAddressResponse) 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 ErrIntOverflowQuery + } + 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: QueryAllAuthorizedAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllAuthorizedAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthorizedAddress", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuthorizedAddress = append(m.AuthorizedAddress, AuthorizedAddress{}) + if err := m.AuthorizedAddress[len(m.AuthorizedAddress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/keyshare/types/query.pb.gw.go b/x/keyshare/types/query.pb.gw.go index 599acc5e..cff29d76 100644 --- a/x/keyshare/types/query.pb.gw.go +++ b/x/keyshare/types/query.pb.gw.go @@ -361,6 +361,96 @@ func local_request_Query_PubKey_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_AuthorizedAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAuthorizedAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["target"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "target") + } + + protoReq.Target, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "target", err) + } + + msg, err := client.AuthorizedAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AuthorizedAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetAuthorizedAddressRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["target"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "target") + } + + protoReq.Target, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "target", err) + } + + msg, err := server.AuthorizedAddress(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AuthorizedAddressAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AuthorizedAddressAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllAuthorizedAddressRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AuthorizedAddressAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AuthorizedAddressAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AuthorizedAddressAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllAuthorizedAddressRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AuthorizedAddressAll_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AuthorizedAddressAll(ctx, &protoReq) + return msg, metadata, err + +} + // 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. @@ -551,6 +641,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_AuthorizedAddress_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 { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AuthorizedAddress_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) + return + } + + forward_Query_AuthorizedAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AuthorizedAddressAll_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 { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AuthorizedAddressAll_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) + return + } + + forward_Query_AuthorizedAddressAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -752,6 +888,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_AuthorizedAddress_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AuthorizedAddress_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_AuthorizedAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AuthorizedAddressAll_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) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AuthorizedAddressAll_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_AuthorizedAddressAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -771,6 +947,10 @@ var ( pattern_Query_AggregatedKeyShareAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"fairyring", "keyshare", "aggregated_key_share"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_PubKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"fairyring", "keyshare", "pub_key"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AuthorizedAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"fairyring", "keyshare", "authorized_address", "target"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_AuthorizedAddressAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"fairyring", "keyshare", "authorized_address"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -789,4 +969,8 @@ var ( forward_Query_AggregatedKeyShareAll_0 = runtime.ForwardResponseMessage forward_Query_PubKey_0 = runtime.ForwardResponseMessage + + forward_Query_AuthorizedAddress_0 = runtime.ForwardResponseMessage + + forward_Query_AuthorizedAddressAll_0 = runtime.ForwardResponseMessage ) diff --git a/x/keyshare/types/tx.pb.go b/x/keyshare/types/tx.pb.go index dd709c24..50821a45 100644 --- a/x/keyshare/types/tx.pb.go +++ b/x/keyshare/types/tx.pb.go @@ -6,8 +6,8 @@ package types import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -118,9 +118,8 @@ func (m *MsgRegisterValidatorResponse) GetCreator() string { type MsgSendKeyshare struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - Commitment string `protobuf:"bytes,3,opt,name=commitment,proto3" json:"commitment,omitempty"` - KeyShareIndex uint64 `protobuf:"varint,4,opt,name=keyShareIndex,proto3" json:"keyShareIndex,omitempty"` - BlockHeight uint64 `protobuf:"varint,5,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` + KeyShareIndex uint64 `protobuf:"varint,3,opt,name=keyShareIndex,proto3" json:"keyShareIndex,omitempty"` + BlockHeight uint64 `protobuf:"varint,4,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` } func (m *MsgSendKeyshare) Reset() { *m = MsgSendKeyshare{} } @@ -170,13 +169,6 @@ func (m *MsgSendKeyshare) GetMessage() string { return "" } -func (m *MsgSendKeyshare) GetCommitment() string { - if m != nil { - return m.Commitment - } - return "" -} - func (m *MsgSendKeyshare) GetKeyShareIndex() uint64 { if m != nil { return m.KeyShareIndex @@ -194,10 +186,11 @@ func (m *MsgSendKeyshare) GetBlockHeight() uint64 { type MsgSendKeyshareResponse struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Keyshare string `protobuf:"bytes,2,opt,name=keyshare,proto3" json:"keyshare,omitempty"` - Commitment string `protobuf:"bytes,3,opt,name=commitment,proto3" json:"commitment,omitempty"` - KeyshareIndex uint64 `protobuf:"varint,4,opt,name=keyshareIndex,proto3" json:"keyshareIndex,omitempty"` - BlockHeight uint64 `protobuf:"varint,5,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` - ReceivedBlockHeight uint64 `protobuf:"varint,6,opt,name=receivedBlockHeight,proto3" json:"receivedBlockHeight,omitempty"` + KeyshareIndex uint64 `protobuf:"varint,3,opt,name=keyshareIndex,proto3" json:"keyshareIndex,omitempty"` + BlockHeight uint64 `protobuf:"varint,4,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` + ReceivedBlockHeight uint64 `protobuf:"varint,5,opt,name=receivedBlockHeight,proto3" json:"receivedBlockHeight,omitempty"` + Success bool `protobuf:"varint,6,opt,name=success,proto3" json:"success,omitempty"` + ErrorMessage string `protobuf:"bytes,7,opt,name=errorMessage,proto3" json:"errorMessage,omitempty"` } func (m *MsgSendKeyshareResponse) Reset() { *m = MsgSendKeyshareResponse{} } @@ -247,13 +240,6 @@ func (m *MsgSendKeyshareResponse) GetKeyshare() string { return "" } -func (m *MsgSendKeyshareResponse) GetCommitment() string { - if m != nil { - return m.Commitment - } - return "" -} - func (m *MsgSendKeyshareResponse) GetKeyshareIndex() uint64 { if m != nil { return m.KeyshareIndex @@ -275,10 +261,25 @@ func (m *MsgSendKeyshareResponse) GetReceivedBlockHeight() uint64 { return 0 } +func (m *MsgSendKeyshareResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *MsgSendKeyshareResponse) GetErrorMessage() string { + if m != nil { + return m.ErrorMessage + } + return "" +} + // this line is used by starport scaffolding # proto/tx/message type MsgCreateLatestPubKey struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` + PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` + Commitments []string `protobuf:"bytes,3,rep,name=commitments,proto3" json:"commitments,omitempty"` } func (m *MsgCreateLatestPubKey) Reset() { *m = MsgCreateLatestPubKey{} } @@ -328,6 +329,13 @@ func (m *MsgCreateLatestPubKey) GetPublicKey() string { return "" } +func (m *MsgCreateLatestPubKey) GetCommitments() []string { + if m != nil { + return m.Commitments + } + return nil +} + type MsgCreateLatestPubKeyResponse struct { } @@ -364,6 +372,278 @@ func (m *MsgCreateLatestPubKeyResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateLatestPubKeyResponse proto.InternalMessageInfo +type MsgCreateAuthorizedAddress struct { + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *MsgCreateAuthorizedAddress) Reset() { *m = MsgCreateAuthorizedAddress{} } +func (m *MsgCreateAuthorizedAddress) String() string { return proto.CompactTextString(m) } +func (*MsgCreateAuthorizedAddress) ProtoMessage() {} +func (*MsgCreateAuthorizedAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_1f96ac6a55f1845c, []int{6} +} +func (m *MsgCreateAuthorizedAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateAuthorizedAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateAuthorizedAddress.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 *MsgCreateAuthorizedAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateAuthorizedAddress.Merge(m, src) +} +func (m *MsgCreateAuthorizedAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateAuthorizedAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateAuthorizedAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateAuthorizedAddress proto.InternalMessageInfo + +func (m *MsgCreateAuthorizedAddress) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func (m *MsgCreateAuthorizedAddress) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +type MsgCreateAuthorizedAddressResponse struct { +} + +func (m *MsgCreateAuthorizedAddressResponse) Reset() { *m = MsgCreateAuthorizedAddressResponse{} } +func (m *MsgCreateAuthorizedAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateAuthorizedAddressResponse) ProtoMessage() {} +func (*MsgCreateAuthorizedAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1f96ac6a55f1845c, []int{7} +} +func (m *MsgCreateAuthorizedAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateAuthorizedAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateAuthorizedAddressResponse.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 *MsgCreateAuthorizedAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateAuthorizedAddressResponse.Merge(m, src) +} +func (m *MsgCreateAuthorizedAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateAuthorizedAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateAuthorizedAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateAuthorizedAddressResponse proto.InternalMessageInfo + +type MsgUpdateAuthorizedAddress struct { + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + IsAuthorized bool `protobuf:"varint,2,opt,name=isAuthorized,proto3" json:"isAuthorized,omitempty"` + Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *MsgUpdateAuthorizedAddress) Reset() { *m = MsgUpdateAuthorizedAddress{} } +func (m *MsgUpdateAuthorizedAddress) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateAuthorizedAddress) ProtoMessage() {} +func (*MsgUpdateAuthorizedAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_1f96ac6a55f1845c, []int{8} +} +func (m *MsgUpdateAuthorizedAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateAuthorizedAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateAuthorizedAddress.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 *MsgUpdateAuthorizedAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateAuthorizedAddress.Merge(m, src) +} +func (m *MsgUpdateAuthorizedAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateAuthorizedAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateAuthorizedAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateAuthorizedAddress proto.InternalMessageInfo + +func (m *MsgUpdateAuthorizedAddress) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func (m *MsgUpdateAuthorizedAddress) GetIsAuthorized() bool { + if m != nil { + return m.IsAuthorized + } + return false +} + +func (m *MsgUpdateAuthorizedAddress) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +type MsgUpdateAuthorizedAddressResponse struct { +} + +func (m *MsgUpdateAuthorizedAddressResponse) Reset() { *m = MsgUpdateAuthorizedAddressResponse{} } +func (m *MsgUpdateAuthorizedAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateAuthorizedAddressResponse) ProtoMessage() {} +func (*MsgUpdateAuthorizedAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1f96ac6a55f1845c, []int{9} +} +func (m *MsgUpdateAuthorizedAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateAuthorizedAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateAuthorizedAddressResponse.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 *MsgUpdateAuthorizedAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateAuthorizedAddressResponse.Merge(m, src) +} +func (m *MsgUpdateAuthorizedAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateAuthorizedAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateAuthorizedAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateAuthorizedAddressResponse proto.InternalMessageInfo + +type MsgDeleteAuthorizedAddress struct { + Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` +} + +func (m *MsgDeleteAuthorizedAddress) Reset() { *m = MsgDeleteAuthorizedAddress{} } +func (m *MsgDeleteAuthorizedAddress) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteAuthorizedAddress) ProtoMessage() {} +func (*MsgDeleteAuthorizedAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_1f96ac6a55f1845c, []int{10} +} +func (m *MsgDeleteAuthorizedAddress) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteAuthorizedAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteAuthorizedAddress.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 *MsgDeleteAuthorizedAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteAuthorizedAddress.Merge(m, src) +} +func (m *MsgDeleteAuthorizedAddress) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteAuthorizedAddress) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteAuthorizedAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteAuthorizedAddress proto.InternalMessageInfo + +func (m *MsgDeleteAuthorizedAddress) GetTarget() string { + if m != nil { + return m.Target + } + return "" +} + +func (m *MsgDeleteAuthorizedAddress) GetCreator() string { + if m != nil { + return m.Creator + } + return "" +} + +type MsgDeleteAuthorizedAddressResponse struct { +} + +func (m *MsgDeleteAuthorizedAddressResponse) Reset() { *m = MsgDeleteAuthorizedAddressResponse{} } +func (m *MsgDeleteAuthorizedAddressResponse) String() string { return proto.CompactTextString(m) } +func (*MsgDeleteAuthorizedAddressResponse) ProtoMessage() {} +func (*MsgDeleteAuthorizedAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1f96ac6a55f1845c, []int{11} +} +func (m *MsgDeleteAuthorizedAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgDeleteAuthorizedAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgDeleteAuthorizedAddressResponse.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 *MsgDeleteAuthorizedAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDeleteAuthorizedAddressResponse.Merge(m, src) +} +func (m *MsgDeleteAuthorizedAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgDeleteAuthorizedAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDeleteAuthorizedAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDeleteAuthorizedAddressResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgRegisterValidator)(nil), "fairyring.keyshare.MsgRegisterValidator") proto.RegisterType((*MsgRegisterValidatorResponse)(nil), "fairyring.keyshare.MsgRegisterValidatorResponse") @@ -371,39 +651,54 @@ func init() { proto.RegisterType((*MsgSendKeyshareResponse)(nil), "fairyring.keyshare.MsgSendKeyshareResponse") proto.RegisterType((*MsgCreateLatestPubKey)(nil), "fairyring.keyshare.MsgCreateLatestPubKey") proto.RegisterType((*MsgCreateLatestPubKeyResponse)(nil), "fairyring.keyshare.MsgCreateLatestPubKeyResponse") + proto.RegisterType((*MsgCreateAuthorizedAddress)(nil), "fairyring.keyshare.MsgCreateAuthorizedAddress") + proto.RegisterType((*MsgCreateAuthorizedAddressResponse)(nil), "fairyring.keyshare.MsgCreateAuthorizedAddressResponse") + proto.RegisterType((*MsgUpdateAuthorizedAddress)(nil), "fairyring.keyshare.MsgUpdateAuthorizedAddress") + proto.RegisterType((*MsgUpdateAuthorizedAddressResponse)(nil), "fairyring.keyshare.MsgUpdateAuthorizedAddressResponse") + proto.RegisterType((*MsgDeleteAuthorizedAddress)(nil), "fairyring.keyshare.MsgDeleteAuthorizedAddress") + proto.RegisterType((*MsgDeleteAuthorizedAddressResponse)(nil), "fairyring.keyshare.MsgDeleteAuthorizedAddressResponse") } func init() { proto.RegisterFile("fairyring/keyshare/tx.proto", fileDescriptor_1f96ac6a55f1845c) } var fileDescriptor_1f96ac6a55f1845c = []byte{ - // 419 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xbd, 0x8e, 0xd3, 0x40, - 0x10, 0xc7, 0xb3, 0x77, 0xc7, 0xc1, 0x0d, 0x20, 0xc4, 0x02, 0xc2, 0x32, 0x87, 0x89, 0x0c, 0x45, - 0x10, 0x92, 0x13, 0x3e, 0x0a, 0xea, 0xd0, 0x80, 0x82, 0x05, 0x72, 0x24, 0x0a, 0x2a, 0xfc, 0x31, - 0x6c, 0x56, 0x89, 0x3f, 0xb4, 0xbb, 0x41, 0xf1, 0x5b, 0xf0, 0x22, 0xbc, 0x07, 0x05, 0x45, 0x4a, - 0x4a, 0x94, 0x54, 0xbc, 0x05, 0xb2, 0xb1, 0x1d, 0x87, 0x38, 0xc1, 0xd7, 0x79, 0xe6, 0xff, 0xdb, - 0xf9, 0xf2, 0x68, 0xe0, 0xde, 0x67, 0x97, 0x8b, 0x54, 0xf0, 0x88, 0xf5, 0xa7, 0x98, 0xca, 0x89, - 0x2b, 0xb0, 0xaf, 0x16, 0x56, 0x22, 0x62, 0x15, 0x53, 0x5a, 0x89, 0x56, 0x29, 0x9a, 0x03, 0xb8, - 0x6d, 0x4b, 0xe6, 0x20, 0xe3, 0x52, 0xa1, 0xf8, 0xe0, 0xce, 0x78, 0xe0, 0xaa, 0x58, 0x50, 0x0d, - 0x2e, 0xfb, 0x02, 0xb3, 0x4f, 0x8d, 0x74, 0x49, 0xef, 0xcc, 0x29, 0x4d, 0xf3, 0x25, 0x9c, 0x37, - 0xbd, 0x70, 0x50, 0x26, 0x71, 0x24, 0xf1, 0xc0, 0xcb, 0x6f, 0x04, 0x6e, 0xd8, 0x92, 0x8d, 0x31, - 0x0a, 0x46, 0x45, 0xfe, 0xfd, 0x74, 0xa6, 0x84, 0x28, 0xa5, 0xcb, 0x50, 0x3b, 0xfa, 0xab, 0x14, - 0x26, 0x35, 0x00, 0xfc, 0x38, 0x0c, 0xb9, 0x0a, 0x31, 0x52, 0xda, 0x71, 0x2e, 0xd6, 0x3c, 0xf4, - 0x11, 0x5c, 0x9f, 0x62, 0x3a, 0xce, 0xe2, 0xbf, 0x89, 0x02, 0x5c, 0x68, 0x27, 0x5d, 0xd2, 0x3b, - 0x71, 0xb6, 0x9d, 0xb4, 0x0b, 0x57, 0xbd, 0x59, 0xec, 0x4f, 0x5f, 0x23, 0x67, 0x13, 0xa5, 0x5d, - 0xca, 0x99, 0xba, 0xcb, 0xfc, 0x4d, 0xe0, 0xee, 0x3f, 0xf5, 0xfe, 0xbf, 0x4b, 0xaa, 0xc3, 0x95, - 0x72, 0xba, 0x45, 0xe1, 0x95, 0xdd, 0xb2, 0x72, 0xd9, 0x54, 0xb9, 0xbc, 0x40, 0xe5, 0x74, 0x00, - 0xb7, 0x04, 0xfa, 0xc8, 0xbf, 0x60, 0x30, 0xac, 0x91, 0xa7, 0x39, 0xd9, 0x24, 0x99, 0xef, 0xe0, - 0x8e, 0x2d, 0xd9, 0xab, 0xac, 0x07, 0x7c, 0xeb, 0x2a, 0x94, 0xea, 0xfd, 0xdc, 0x1b, 0x61, 0x7a, - 0xa0, 0xd1, 0x73, 0x38, 0x4b, 0xe6, 0xde, 0x8c, 0xfb, 0x23, 0x4c, 0x8b, 0x4e, 0x37, 0x0e, 0xf3, - 0x01, 0xdc, 0x6f, 0x0c, 0x58, 0x4e, 0xf0, 0xd9, 0x8f, 0x23, 0x38, 0xb6, 0x25, 0xa3, 0x31, 0xdc, - 0xdc, 0x5d, 0xbf, 0x9e, 0xb5, 0xbb, 0xab, 0x56, 0xd3, 0xda, 0xe9, 0x83, 0xb6, 0x64, 0xf5, 0xeb, - 0x3e, 0xc1, 0xb5, 0xad, 0x15, 0x7c, 0xb8, 0x27, 0x42, 0x1d, 0xd2, 0x9f, 0xb4, 0x80, 0xaa, 0x0c, - 0x02, 0x68, 0xc3, 0x24, 0x1f, 0xef, 0x09, 0xb1, 0x8b, 0xea, 0x4f, 0x5b, 0xa3, 0x65, 0xce, 0xe1, - 0x8b, 0xef, 0x2b, 0x83, 0x2c, 0x57, 0x06, 0xf9, 0xb5, 0x32, 0xc8, 0xd7, 0xb5, 0xd1, 0x59, 0xae, - 0x8d, 0xce, 0xcf, 0xb5, 0xd1, 0xf9, 0xa8, 0x6f, 0x6e, 0xc2, 0xa2, 0x76, 0x15, 0xd2, 0x04, 0xa5, - 0x77, 0x9a, 0x5f, 0x86, 0xe7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x78, 0x77, 0x38, 0x51, 0x38, - 0x04, 0x00, 0x00, + // 573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x4b, 0x6f, 0xd3, 0x40, + 0x10, 0xc7, 0xeb, 0xa4, 0x4d, 0x93, 0x21, 0x08, 0xb1, 0x3c, 0x6a, 0x99, 0x62, 0x22, 0xd3, 0x43, + 0x10, 0x52, 0x1a, 0x1e, 0x42, 0x5c, 0x5b, 0x38, 0x80, 0x42, 0x10, 0x72, 0x05, 0x07, 0x4e, 0x38, + 0xf6, 0xe0, 0xac, 0xf2, 0xb0, 0xd9, 0xdd, 0xa0, 0x98, 0x1b, 0x27, 0x4e, 0x48, 0x7c, 0x2c, 0x8e, + 0x3d, 0xf6, 0x88, 0x92, 0x2f, 0x82, 0x6c, 0x6c, 0xc7, 0x6e, 0xbc, 0x79, 0x48, 0xdc, 0xb2, 0x33, + 0xff, 0x9d, 0xff, 0x6f, 0x27, 0xe3, 0x5d, 0xb8, 0xf3, 0xd9, 0xa2, 0x2c, 0x60, 0x74, 0xec, 0x1e, + 0x0f, 0x30, 0xe0, 0x7d, 0x8b, 0xe1, 0xb1, 0x98, 0xb6, 0x7c, 0xe6, 0x09, 0x8f, 0x90, 0x34, 0xd9, + 0x4a, 0x92, 0x46, 0x1b, 0x6e, 0x76, 0xb9, 0x6b, 0xa2, 0x4b, 0xb9, 0x40, 0xf6, 0xc1, 0x1a, 0x52, + 0xc7, 0x12, 0x1e, 0x23, 0x2a, 0xec, 0xdb, 0x0c, 0xc3, 0x9f, 0xaa, 0xd2, 0x50, 0x9a, 0x35, 0x33, + 0x59, 0x1a, 0xcf, 0xe1, 0xb0, 0x68, 0x87, 0x89, 0xdc, 0xf7, 0xc6, 0x1c, 0x57, 0xec, 0xfc, 0xa9, + 0xc0, 0xb5, 0x2e, 0x77, 0xcf, 0x70, 0xec, 0x74, 0x62, 0x7f, 0xb9, 0x3a, 0xcc, 0x8c, 0x90, 0x73, + 0xcb, 0x45, 0xb5, 0xf4, 0x2f, 0x13, 0x2f, 0xc9, 0x11, 0x5c, 0x1d, 0x60, 0x70, 0x16, 0xee, 0x7f, + 0x3d, 0x76, 0x70, 0xaa, 0x96, 0x1b, 0x4a, 0x73, 0xd7, 0xcc, 0x07, 0x49, 0x03, 0xae, 0xf4, 0x86, + 0x9e, 0x3d, 0x78, 0x85, 0xd4, 0xed, 0x0b, 0x75, 0x37, 0xd2, 0x64, 0x43, 0xc6, 0x8f, 0x12, 0x1c, + 0x5c, 0xe2, 0x59, 0x7f, 0x0a, 0xa2, 0x41, 0x35, 0xe9, 0x5e, 0x0c, 0x96, 0xae, 0x63, 0x32, 0x5e, + 0x44, 0xc6, 0xb7, 0x20, 0x23, 0x6d, 0xb8, 0xc1, 0xd0, 0x46, 0xfa, 0x15, 0x9d, 0xd3, 0x8c, 0x72, + 0x2f, 0x52, 0x16, 0xa5, 0x42, 0x5e, 0x3e, 0xb1, 0x6d, 0xe4, 0x5c, 0xad, 0x34, 0x94, 0x66, 0xd5, + 0x4c, 0x96, 0xc4, 0x80, 0x3a, 0x32, 0xe6, 0xb1, 0x6e, 0xdc, 0xcc, 0xfd, 0x88, 0x39, 0x17, 0x33, + 0xbe, 0xc0, 0xad, 0x2e, 0x77, 0x5f, 0x84, 0x27, 0xc4, 0x37, 0x96, 0x40, 0x2e, 0xde, 0x4d, 0x7a, + 0x1d, 0x0c, 0x56, 0xb4, 0xe1, 0x10, 0x6a, 0xfe, 0xa4, 0x37, 0xa4, 0x76, 0x07, 0x83, 0xb8, 0x0f, + 0x8b, 0x40, 0x78, 0x44, 0xdb, 0x1b, 0x8d, 0xa8, 0x18, 0xe1, 0x58, 0x70, 0xb5, 0xdc, 0x28, 0x37, + 0x6b, 0x66, 0x36, 0x64, 0xdc, 0x83, 0xbb, 0x85, 0x96, 0xc9, 0x3f, 0x60, 0xbc, 0x05, 0x2d, 0x15, + 0x9c, 0x4c, 0x44, 0xdf, 0x63, 0xf4, 0x1b, 0x3a, 0x27, 0x8e, 0xc3, 0xc2, 0x53, 0xdd, 0x86, 0x8a, + 0xb0, 0x98, 0x8b, 0x22, 0xe6, 0x8a, 0x57, 0x59, 0xe0, 0x52, 0x7e, 0xfa, 0x8e, 0xc0, 0x90, 0xd7, + 0x4b, 0x5d, 0x59, 0xe4, 0xfa, 0xde, 0x77, 0xb6, 0x72, 0x35, 0xa0, 0x4e, 0xf9, 0x42, 0x1e, 0x59, + 0x57, 0xcd, 0x5c, 0x2c, 0x4b, 0x56, 0x2e, 0x22, 0x93, 0x78, 0x5e, 0xea, 0xc7, 0x4b, 0x1c, 0xe2, + 0xff, 0xec, 0x87, 0xa4, 0x5e, 0xe2, 0xfa, 0xf8, 0x62, 0x0f, 0xca, 0x5d, 0xee, 0x12, 0x0f, 0xae, + 0x2f, 0x5f, 0x12, 0xcd, 0xd6, 0xf2, 0x8d, 0xd2, 0x2a, 0xba, 0x1c, 0xb4, 0xf6, 0xa6, 0xca, 0xf4, + 0x03, 0xfc, 0x04, 0xf5, 0xdc, 0x45, 0x71, 0x5f, 0x52, 0x21, 0x2b, 0xd2, 0x1e, 0x6e, 0x20, 0x4a, + 0x1d, 0x18, 0x90, 0x82, 0x89, 0x7f, 0x20, 0x29, 0xb1, 0x2c, 0xd5, 0x1e, 0x6d, 0x2c, 0x4d, 0x3d, + 0xbf, 0x2b, 0x70, 0x20, 0x1b, 0xe9, 0xd6, 0xca, 0x72, 0x4b, 0x7a, 0xed, 0xd9, 0x76, 0xfa, 0x1c, + 0x83, 0x6c, 0xc0, 0x65, 0x0c, 0x12, 0xbd, 0x94, 0x61, 0xcd, 0x30, 0x47, 0x0c, 0xb2, 0x51, 0x96, + 0x31, 0x48, 0xf4, 0x52, 0x86, 0x35, 0xa3, 0x7d, 0xfa, 0xf4, 0xf7, 0x4c, 0x57, 0xce, 0x67, 0xba, + 0xf2, 0x67, 0xa6, 0x2b, 0xbf, 0xe6, 0xfa, 0xce, 0xf9, 0x5c, 0xdf, 0xb9, 0x98, 0xeb, 0x3b, 0x1f, + 0xb5, 0xc5, 0x2b, 0x3a, 0xcd, 0xbc, 0xa3, 0x81, 0x8f, 0xbc, 0x57, 0x89, 0xde, 0xd2, 0x27, 0x7f, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x82, 0x63, 0x82, 0xc2, 0x6a, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -422,6 +717,9 @@ type MsgClient interface { SendKeyshare(ctx context.Context, in *MsgSendKeyshare, opts ...grpc.CallOption) (*MsgSendKeyshareResponse, error) // this line is used by starport scaffolding # proto/tx/rpc CreateLatestPubKey(ctx context.Context, in *MsgCreateLatestPubKey, opts ...grpc.CallOption) (*MsgCreateLatestPubKeyResponse, error) + CreateAuthorizedAddress(ctx context.Context, in *MsgCreateAuthorizedAddress, opts ...grpc.CallOption) (*MsgCreateAuthorizedAddressResponse, error) + UpdateAuthorizedAddress(ctx context.Context, in *MsgUpdateAuthorizedAddress, opts ...grpc.CallOption) (*MsgUpdateAuthorizedAddressResponse, error) + DeleteAuthorizedAddress(ctx context.Context, in *MsgDeleteAuthorizedAddress, opts ...grpc.CallOption) (*MsgDeleteAuthorizedAddressResponse, error) } type msgClient struct { @@ -459,12 +757,42 @@ func (c *msgClient) CreateLatestPubKey(ctx context.Context, in *MsgCreateLatestP return out, nil } +func (c *msgClient) CreateAuthorizedAddress(ctx context.Context, in *MsgCreateAuthorizedAddress, opts ...grpc.CallOption) (*MsgCreateAuthorizedAddressResponse, error) { + out := new(MsgCreateAuthorizedAddressResponse) + err := c.cc.Invoke(ctx, "/fairyring.keyshare.Msg/CreateAuthorizedAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateAuthorizedAddress(ctx context.Context, in *MsgUpdateAuthorizedAddress, opts ...grpc.CallOption) (*MsgUpdateAuthorizedAddressResponse, error) { + out := new(MsgUpdateAuthorizedAddressResponse) + err := c.cc.Invoke(ctx, "/fairyring.keyshare.Msg/UpdateAuthorizedAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteAuthorizedAddress(ctx context.Context, in *MsgDeleteAuthorizedAddress, opts ...grpc.CallOption) (*MsgDeleteAuthorizedAddressResponse, error) { + out := new(MsgDeleteAuthorizedAddressResponse) + err := c.cc.Invoke(ctx, "/fairyring.keyshare.Msg/DeleteAuthorizedAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { RegisterValidator(context.Context, *MsgRegisterValidator) (*MsgRegisterValidatorResponse, error) SendKeyshare(context.Context, *MsgSendKeyshare) (*MsgSendKeyshareResponse, error) // this line is used by starport scaffolding # proto/tx/rpc CreateLatestPubKey(context.Context, *MsgCreateLatestPubKey) (*MsgCreateLatestPubKeyResponse, error) + CreateAuthorizedAddress(context.Context, *MsgCreateAuthorizedAddress) (*MsgCreateAuthorizedAddressResponse, error) + UpdateAuthorizedAddress(context.Context, *MsgUpdateAuthorizedAddress) (*MsgUpdateAuthorizedAddressResponse, error) + DeleteAuthorizedAddress(context.Context, *MsgDeleteAuthorizedAddress) (*MsgDeleteAuthorizedAddressResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -480,6 +808,15 @@ func (*UnimplementedMsgServer) SendKeyshare(ctx context.Context, req *MsgSendKey func (*UnimplementedMsgServer) CreateLatestPubKey(ctx context.Context, req *MsgCreateLatestPubKey) (*MsgCreateLatestPubKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateLatestPubKey not implemented") } +func (*UnimplementedMsgServer) CreateAuthorizedAddress(ctx context.Context, req *MsgCreateAuthorizedAddress) (*MsgCreateAuthorizedAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAuthorizedAddress not implemented") +} +func (*UnimplementedMsgServer) UpdateAuthorizedAddress(ctx context.Context, req *MsgUpdateAuthorizedAddress) (*MsgUpdateAuthorizedAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAuthorizedAddress not implemented") +} +func (*UnimplementedMsgServer) DeleteAuthorizedAddress(ctx context.Context, req *MsgDeleteAuthorizedAddress) (*MsgDeleteAuthorizedAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAuthorizedAddress not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -539,6 +876,60 @@ func _Msg_CreateLatestPubKey_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Msg_CreateAuthorizedAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateAuthorizedAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateAuthorizedAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fairyring.keyshare.Msg/CreateAuthorizedAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateAuthorizedAddress(ctx, req.(*MsgCreateAuthorizedAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateAuthorizedAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateAuthorizedAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateAuthorizedAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fairyring.keyshare.Msg/UpdateAuthorizedAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateAuthorizedAddress(ctx, req.(*MsgUpdateAuthorizedAddress)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteAuthorizedAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgDeleteAuthorizedAddress) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteAuthorizedAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/fairyring.keyshare.Msg/DeleteAuthorizedAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteAuthorizedAddress(ctx, req.(*MsgDeleteAuthorizedAddress)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "fairyring.keyshare.Msg", HandlerType: (*MsgServer)(nil), @@ -555,6 +946,18 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateLatestPubKey", Handler: _Msg_CreateLatestPubKey_Handler, }, + { + MethodName: "CreateAuthorizedAddress", + Handler: _Msg_CreateAuthorizedAddress_Handler, + }, + { + MethodName: "UpdateAuthorizedAddress", + Handler: _Msg_UpdateAuthorizedAddress_Handler, + }, + { + MethodName: "DeleteAuthorizedAddress", + Handler: _Msg_DeleteAuthorizedAddress_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "fairyring/keyshare/tx.proto", @@ -643,19 +1046,12 @@ func (m *MsgSendKeyshare) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.BlockHeight != 0 { i = encodeVarintTx(dAtA, i, uint64(m.BlockHeight)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if m.KeyShareIndex != 0 { i = encodeVarintTx(dAtA, i, uint64(m.KeyShareIndex)) i-- - dAtA[i] = 0x20 - } - if len(m.Commitment) > 0 { - i -= len(m.Commitment) - copy(dAtA[i:], m.Commitment) - i = encodeVarintTx(dAtA, i, uint64(len(m.Commitment))) - i-- - dAtA[i] = 0x1a + dAtA[i] = 0x18 } if len(m.Message) > 0 { i -= len(m.Message) @@ -694,27 +1090,37 @@ func (m *MsgSendKeyshareResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.ErrorMessage) > 0 { + i -= len(m.ErrorMessage) + copy(dAtA[i:], m.ErrorMessage) + i = encodeVarintTx(dAtA, i, uint64(len(m.ErrorMessage))) + i-- + dAtA[i] = 0x3a + } + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } if m.ReceivedBlockHeight != 0 { i = encodeVarintTx(dAtA, i, uint64(m.ReceivedBlockHeight)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x28 } if m.BlockHeight != 0 { i = encodeVarintTx(dAtA, i, uint64(m.BlockHeight)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if m.KeyshareIndex != 0 { i = encodeVarintTx(dAtA, i, uint64(m.KeyshareIndex)) i-- - dAtA[i] = 0x20 - } - if len(m.Commitment) > 0 { - i -= len(m.Commitment) - copy(dAtA[i:], m.Commitment) - i = encodeVarintTx(dAtA, i, uint64(len(m.Commitment))) - i-- - dAtA[i] = 0x1a + dAtA[i] = 0x18 } if len(m.Keyshare) > 0 { i -= len(m.Keyshare) @@ -753,6 +1159,15 @@ func (m *MsgCreateLatestPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Commitments) > 0 { + for iNdEx := len(m.Commitments) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Commitments[iNdEx]) + copy(dAtA[i:], m.Commitments[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Commitments[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if len(m.PublicKey) > 0 { i -= len(m.PublicKey) copy(dAtA[i:], m.PublicKey) @@ -793,6 +1208,196 @@ func (m *MsgCreateLatestPubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *MsgCreateAuthorizedAddress) 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 *MsgCreateAuthorizedAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateAuthorizedAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x12 + } + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintTx(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateAuthorizedAddressResponse) 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 *MsgCreateAuthorizedAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateAuthorizedAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateAuthorizedAddress) 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 *MsgUpdateAuthorizedAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateAuthorizedAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x1a + } + if m.IsAuthorized { + i-- + if m.IsAuthorized { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintTx(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateAuthorizedAddressResponse) 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 *MsgUpdateAuthorizedAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateAuthorizedAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgDeleteAuthorizedAddress) 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 *MsgDeleteAuthorizedAddress) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteAuthorizedAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x12 + } + if len(m.Target) > 0 { + i -= len(m.Target) + copy(dAtA[i:], m.Target) + i = encodeVarintTx(dAtA, i, uint64(len(m.Target))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgDeleteAuthorizedAddressResponse) 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 *MsgDeleteAuthorizedAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgDeleteAuthorizedAddressResponse) 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 @@ -844,10 +1449,6 @@ func (m *MsgSendKeyshare) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Commitment) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } if m.KeyShareIndex != 0 { n += 1 + sovTx(uint64(m.KeyShareIndex)) } @@ -871,10 +1472,6 @@ func (m *MsgSendKeyshareResponse) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Commitment) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } if m.KeyshareIndex != 0 { n += 1 + sovTx(uint64(m.KeyshareIndex)) } @@ -884,6 +1481,13 @@ func (m *MsgSendKeyshareResponse) Size() (n int) { if m.ReceivedBlockHeight != 0 { n += 1 + sovTx(uint64(m.ReceivedBlockHeight)) } + if m.Success { + n += 2 + } + l = len(m.ErrorMessage) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -901,6 +1505,12 @@ func (m *MsgCreateLatestPubKey) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if len(m.Commitments) > 0 { + for _, s := range m.Commitments { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } return n } @@ -913,6 +1523,87 @@ func (m *MsgCreateLatestPubKeyResponse) Size() (n int) { return n } +func (m *MsgCreateAuthorizedAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Target) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateAuthorizedAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateAuthorizedAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Target) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.IsAuthorized { + n += 2 + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateAuthorizedAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgDeleteAuthorizedAddress) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Target) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgDeleteAuthorizedAddressResponse) 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 } @@ -1177,38 +1868,6 @@ func (m *MsgSendKeyshare) Unmarshal(dAtA []byte) error { m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", 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.Commitment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field KeyShareIndex", wireType) } @@ -1227,7 +1886,7 @@ func (m *MsgSendKeyshare) Unmarshal(dAtA []byte) error { break } } - case 5: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } @@ -1361,10 +2020,10 @@ func (m *MsgSendKeyshareResponse) Unmarshal(dAtA []byte) error { m.Keyshare = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commitment", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyshareIndex", wireType) } - var stringLen uint64 + m.KeyshareIndex = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1374,29 +2033,16 @@ func (m *MsgSendKeyshareResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.KeyshareIndex |= 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.Commitment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyshareIndex", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - m.KeyshareIndex = 0 + m.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1406,16 +2052,16 @@ func (m *MsgSendKeyshareResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.KeyshareIndex |= uint64(b&0x7F) << shift + m.BlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 5: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ReceivedBlockHeight", wireType) } - m.BlockHeight = 0 + m.ReceivedBlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1425,16 +2071,16 @@ func (m *MsgSendKeyshareResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.BlockHeight |= uint64(b&0x7F) << shift + m.ReceivedBlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 6: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReceivedBlockHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } - m.ReceivedBlockHeight = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1444,11 +2090,44 @@ func (m *MsgSendKeyshareResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ReceivedBlockHeight |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", 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.ErrorMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1563,6 +2242,38 @@ func (m *MsgCreateLatestPubKey) Unmarshal(dAtA []byte) error { } m.PublicKey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commitments", 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.Commitments = append(m.Commitments, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1634,6 +2345,518 @@ func (m *MsgCreateLatestPubKeyResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCreateAuthorizedAddress) 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: MsgCreateAuthorizedAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateAuthorizedAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", 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.Target = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + 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 *MsgCreateAuthorizedAddressResponse) 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: MsgCreateAuthorizedAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateAuthorizedAddressResponse: 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 (m *MsgUpdateAuthorizedAddress) 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: MsgUpdateAuthorizedAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateAuthorizedAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", 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.Target = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsAuthorized", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsAuthorized = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + 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 *MsgUpdateAuthorizedAddressResponse) 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: MsgUpdateAuthorizedAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateAuthorizedAddressResponse: 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 (m *MsgDeleteAuthorizedAddress) 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: MsgDeleteAuthorizedAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteAuthorizedAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Target", 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.Target = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) + 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 *MsgDeleteAuthorizedAddressResponse) 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: MsgDeleteAuthorizedAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgDeleteAuthorizedAddressResponse: 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 diff --git a/x/keyshare/types/validator_set.pb.go b/x/keyshare/types/validator_set.pb.go index 104a97ca..c466fdba 100644 --- a/x/keyshare/types/validator_set.pb.go +++ b/x/keyshare/types/validator_set.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/pep/ante/ante.go b/x/pep/ante/ante.go new file mode 100644 index 00000000..3c6e4c12 --- /dev/null +++ b/x/pep/ante/ante.go @@ -0,0 +1,74 @@ +package ante + +import ( + "fmt" + + "fairyring/x/pep/keeper" + "fairyring/x/pep/types" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var _ sdk.AnteDecorator = PEPDecorator{} + +type ( + // KeyShareLane is an interface that defines the methods required to interact with + // the Keyshare lane. + KeyShareLane interface { + IsKeyshareTx(tx sdk.Tx) bool + GetKeyShareInfo(tx sdk.Tx) (*types.AggregatedKeyShare, error) + } + + // Mempool is an interface that defines the methods required to interact with the application-side mempool. + Mempool interface { + Contains(tx sdk.Tx) (bool, error) + Remove(tx sdk.Tx) error + } + + // PEPDecorator is an AnteDecorator that validates the KeyShare transactions. + PEPDecorator struct { + pepKeeper keeper.Keeper + txEncoder sdk.TxEncoder + lane KeyShareLane + mempool Mempool + } +) + +func NewPepDecorator(pk keeper.Keeper, txEncoder sdk.TxEncoder, lane KeyShareLane, mempool Mempool) PEPDecorator { + return PEPDecorator{ + pepKeeper: pk, + txEncoder: txEncoder, + lane: lane, + mempool: mempool, + } +} + +// AnteHandle validates that the keyshare is valid if one exists. +func (pd PEPDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + // If comet is re-checking a transaction, we only need to check if the transaction is in the application-side mempool. + if ctx.IsReCheckTx() { + contains, err := pd.mempool.Contains(tx) + if err != nil { + return ctx, err + } + + if !contains { + return ctx, fmt.Errorf("transaction not found in application-side mempool") + } + } + + ksInfo, err := pd.lane.GetKeyShareInfo(tx) + if ksInfo != nil { + return ctx, err + } + + // Validate the keyshare if one exists. + if ksInfo != nil { + if ctx.BlockHeight() > int64(ksInfo.Height) { + return ctx, errors.Wrap(err, "failed to validate keyshare") + } + } + + return next(ctx, tx, simulate) +} diff --git a/x/pep/client/cli/query_encrypted_tx.go b/x/pep/client/cli/query_encrypted_tx.go index 693d9419..0bb74093 100644 --- a/x/pep/client/cli/query_encrypted_tx.go +++ b/x/pep/client/cli/query_encrypted_tx.go @@ -14,9 +14,12 @@ import ( func CmdListEncryptedTx() *cobra.Command { cmd := &cobra.Command{ Use: "list-encrypted-tx", - Short: "list all EncryptedTx", + Short: "list all pending encrypted transactions from all future blocks", RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { @@ -47,10 +50,13 @@ func CmdListEncryptedTx() *cobra.Command { func CmdListEncryptedTxFromBlock() *cobra.Command { cmd := &cobra.Command{ Use: "list-encrypted-tx-from-block", - Short: "list all EncryptedTx from block", + Short: "list all encrypted transactions for a particular target height", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) @@ -81,10 +87,13 @@ func CmdListEncryptedTxFromBlock() *cobra.Command { func CmdShowEncryptedTx() *cobra.Command { cmd := &cobra.Command{ Use: "show-encrypted-tx [target-height] [index]", - Short: "shows a EncryptedTx", + Short: "shows a particular encrypted transaction at a given target height and index", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/pep/client/cli/query_encrypted_tx_test.go b/x/pep/client/cli/query_encrypted_tx_test.go index ecfceeb7..cf933d6c 100644 --- a/x/pep/client/cli/query_encrypted_tx_test.go +++ b/x/pep/client/cli/query_encrypted_tx_test.go @@ -5,10 +5,10 @@ import ( "strconv" "testing" + tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/stretchr/testify/require" - tmcli "github.com/tendermint/tendermint/libs/cli" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/pep/client/cli/query_latest_height.go b/x/pep/client/cli/query_latest_height.go index 26493d6a..5de34235 100644 --- a/x/pep/client/cli/query_latest_height.go +++ b/x/pep/client/cli/query_latest_height.go @@ -15,7 +15,7 @@ var _ = strconv.Itoa(0) func CmdLatestHeight() *cobra.Command { cmd := &cobra.Command{ Use: "latest-height", - Short: "Query latestHeight", + Short: "Query the latest recorded height of the Fairyring chain on the destination chain", Args: cobra.ExactArgs(0), RunE: func(cmd *cobra.Command, args []string) (err error) { diff --git a/x/pep/client/cli/query_params.go b/x/pep/client/cli/query_params.go index e89bca21..0fdb4afc 100644 --- a/x/pep/client/cli/query_params.go +++ b/x/pep/client/cli/query_params.go @@ -16,7 +16,10 @@ func CmdQueryParams() *cobra.Command { Short: "shows the parameters of the module", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/pep/client/cli/query_pep_nonce.go b/x/pep/client/cli/query_pep_nonce.go index f8465fae..a0a3b0d7 100644 --- a/x/pep/client/cli/query_pep_nonce.go +++ b/x/pep/client/cli/query_pep_nonce.go @@ -13,9 +13,12 @@ import ( func CmdListPepNonce() *cobra.Command { cmd := &cobra.Command{ Use: "list-pep-nonce", - Short: "list all PepNonce", + Short: "list all PepNonce of all addresses", RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { @@ -46,10 +49,13 @@ func CmdListPepNonce() *cobra.Command { func CmdShowPepNonce() *cobra.Command { cmd := &cobra.Command{ Use: "show-pep-nonce [address]", - Short: "shows a PepNonce", + Short: "shows a PepNonce for a particular address", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/pep/client/cli/query_pep_nonce_test.go b/x/pep/client/cli/query_pep_nonce_test.go index 9ad07121..bd6d7de5 100644 --- a/x/pep/client/cli/query_pep_nonce_test.go +++ b/x/pep/client/cli/query_pep_nonce_test.go @@ -5,10 +5,10 @@ import ( "strconv" "testing" + tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/stretchr/testify/require" - tmcli "github.com/tendermint/tendermint/libs/cli" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/x/pep/client/cli/query_pubkey.go b/x/pep/client/cli/query_pubkey.go index 4779b092..4429b242 100644 --- a/x/pep/client/cli/query_pubkey.go +++ b/x/pep/client/cli/query_pubkey.go @@ -13,9 +13,12 @@ import ( func CmdShowPubKey() *cobra.Command { cmd := &cobra.Command{ Use: "show-active-pub-key", - Short: "Show the active public key", + Short: "Show the active and queued public key", RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } queryClient := types.NewQueryClient(clientCtx) diff --git a/x/pep/client/cli/tx_aggregated_key_share.go b/x/pep/client/cli/tx_aggregated_key_share.go index 1c840d45..9fc2fe71 100644 --- a/x/pep/client/cli/tx_aggregated_key_share.go +++ b/x/pep/client/cli/tx_aggregated_key_share.go @@ -13,7 +13,7 @@ import ( func CmdCreateAggregatedKeyShare() *cobra.Command { cmd := &cobra.Command{ Use: "create-aggregated-key-share [height] [data]", - Short: "Create a new AggregatedKeyShare", + Short: "Submit a new aggregated keyshare into a destination chain", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { // Get indexes @@ -35,9 +35,6 @@ func CmdCreateAggregatedKeyShare() *cobra.Command { indexHeight, argData, ) - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/pep/client/cli/tx_aggregated_key_share_test.go b/x/pep/client/cli/tx_aggregated_key_share_test.go index e0f903f3..83bc725d 100644 --- a/x/pep/client/cli/tx_aggregated_key_share_test.go +++ b/x/pep/client/cli/tx_aggregated_key_share_test.go @@ -39,7 +39,7 @@ func TestCreateAggregatedKeyShare(t *testing.T) { args: []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), + fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(net.Config.BondDenom, sdkmath.NewInt(10))).String()), }, }, diff --git a/x/pep/client/cli/tx_submit_encrypted_tx.go b/x/pep/client/cli/tx_submit_encrypted_tx.go index 0feb60bd..0e25c632 100644 --- a/x/pep/client/cli/tx_submit_encrypted_tx.go +++ b/x/pep/client/cli/tx_submit_encrypted_tx.go @@ -17,7 +17,7 @@ var _ = strconv.Itoa(0) func CmdSubmitEncryptedTx() *cobra.Command { cmd := &cobra.Command{ Use: "submit-encrypted-tx [data] [target-block-height]", - Short: "Broadcast message submitEncryptedTx", + Short: "Submit an encrypted transaction along with its execution height (execution height refers to the height in the FairyRing chain)", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { argData := args[0] @@ -36,9 +36,6 @@ func CmdSubmitEncryptedTx() *cobra.Command { argData, argTargetBlockHeight, ) - if err := msg.ValidateBasic(); err != nil { - return err - } return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } diff --git a/x/pep/keeper/channel.go b/x/pep/keeper/channel.go deleted file mode 100644 index bdedb295..00000000 --- a/x/pep/keeper/channel.go +++ /dev/null @@ -1,22 +0,0 @@ -package keeper - -import ( - "fairyring/x/pep/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func (k Keeper) GetChannel( - ctx sdk.Context, -) string { - store := ctx.KVStore(k.storeKey) - return string(store.Get(types.ChannelKey)) -} - -func (k Keeper) SetChannel( - ctx sdk.Context, - channelID string, -) { - store := ctx.KVStore(k.storeKey) - store.Set(types.ChannelKey, []byte(channelID)) -} diff --git a/x/pep/keeper/current_keys.go b/x/pep/keeper/current_keys.go index ee5c1fcb..59afd895 100644 --- a/x/pep/keeper/current_keys.go +++ b/x/pep/keeper/current_keys.go @@ -9,14 +9,15 @@ import ( sdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" cosmoserror "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" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" ) func (k Keeper) QueryFairyringCurrentKeys(ctx sdk.Context) error { srcPort := k.GetPort(ctx) - srcChannel := k.GetChannel(ctx) + params := k.GetParams(ctx) + srcChannel := params.ChannelId timeoutTimestamp := ctx.BlockTime().Add(time.Second * 20).UnixNano() var packet types.CurrentKeysPacketData @@ -42,16 +43,13 @@ func (k Keeper) TransmitCurrentKeysPacket( timeoutTimestamp uint64, ) error { - sourceChannelEnd, found := k.ChannelKeeper.GetChannel(ctx, sourcePort, sourceChannel) + _, found := k.ChannelKeeper.GetChannel(ctx, sourcePort, sourceChannel) if !found { return sdkerrors.Wrapf(channeltypes.ErrChannelNotFound, "port ID (%s) channel ID (%s)", sourcePort, sourceChannel) } - destinationPort := sourceChannelEnd.GetCounterparty().GetPortID() - destinationChannel := sourceChannelEnd.GetCounterparty().GetChannelID() - // get the next sequence - sequence, found := k.ChannelKeeper.GetNextSequenceSend(ctx, sourcePort, sourceChannel) + _, found = k.ChannelKeeper.GetNextSequenceSend(ctx, sourcePort, sourceChannel) if !found { return sdkerrors.Wrapf( channeltypes.ErrSequenceSendNotFound, @@ -69,18 +67,7 @@ func (k Keeper) TransmitCurrentKeysPacket( return sdkerrors.Wrap(cosmoserror.ErrJSONMarshal, "cannot marshal the packet: "+err.Error()) } - packet := channeltypes.NewPacket( - packetBytes, - sequence, - sourcePort, - sourceChannel, - destinationPort, - destinationChannel, - timeoutHeight, - timeoutTimestamp, - ) - - if err := k.ChannelKeeper.SendPacket(ctx, channelCap, packet); err != nil { + if _, err := k.ChannelKeeper.SendPacket(ctx, channelCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, packetBytes); err != nil { return err } @@ -126,6 +113,30 @@ func (k Keeper) OnAcknowledgementCurrentKeysPacket(ctx sdk.Context, packet chann k.Logger(ctx).Error(dispatchedAck.Error) return errors.New(dispatchedAck.Error) case *channeltypes.Acknowledgement_Result: + channel, found := k.ChannelKeeper.GetChannel(ctx, packet.SourcePort, packet.SourceChannel) + if !found { + return errors.New("channel info not found") + } + + // Retrieve the connection associated with the channel + connection, found := k.connectionKeeper.GetConnection(ctx, channel.ConnectionHops[0]) + if !found { + return errors.New("connection info not found") + } + + params := k.GetParams(ctx) + + trusted := verifyCounterparty( + connection.Counterparty.ClientId, + connection.Counterparty.ConnectionId, + channel.Counterparty.GetChannelID(), + params.TrustedCounterParties, + ) + + if !trusted { + return errors.New("counterparty is not trusted") + } + // Decode the packet acknowledgment var packetAck types.CurrentKeysPacketAck @@ -178,3 +189,13 @@ func (k Keeper) OnTimeoutCurrentKeysPacket(ctx sdk.Context, packet channeltypes. k.Logger(ctx).Info(data.String()) return nil } + +func verifyCounterparty(clientID string, connectionID string, channelId string, trustedChannels []*types.TrustedCounterParty) bool { + for _, channelInfo := range trustedChannels { + if channelInfo.ClientId == clientID && channelInfo.ConnectionId == connectionID && channelInfo.ChannelId == channelId { + return true + } + } + + return false +} diff --git a/x/pep/keeper/keeper.go b/x/pep/keeper/keeper.go index 8b092e91..8381624f 100644 --- a/x/pep/keeper/keeper.go +++ b/x/pep/keeper/keeper.go @@ -5,21 +5,22 @@ import ( "fairyring/x/pep/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" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/ignite/cli/ignite/pkg/cosmosibckeeper" - "github.com/tendermint/tendermint/libs/log" ) type ( Keeper struct { - *cosmosibckeeper.Keeper - cdc codec.BinaryCodec - storeKey storetypes.StoreKey - memKey storetypes.StoreKey - paramstore paramtypes.Subspace + *types.IBCKeeper + cdc codec.BinaryCodec + storeKey storetypes.StoreKey + memKey storetypes.StoreKey + paramstore paramtypes.Subspace + connectionKeeper types.ConnectionKeeper + bankKeeper types.BankKeeper } ) @@ -28,9 +29,11 @@ func NewKeeper( storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, - channelKeeper cosmosibckeeper.ChannelKeeper, - portKeeper cosmosibckeeper.PortKeeper, - scopedKeeper cosmosibckeeper.ScopedKeeper, + channelKeeper types.ChannelKeeper, + portKeeper types.PortKeeper, + scopedKeeper types.ScopedKeeper, + connectionKeeper types.ConnectionKeeper, + bankKeeper types.BankKeeper, ) *Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { @@ -38,17 +41,19 @@ func NewKeeper( } return &Keeper{ - Keeper: cosmosibckeeper.NewKeeper( + IBCKeeper: types.NewIBCKeeper( types.PortKey, storeKey, channelKeeper, portKeeper, scopedKeeper, ), - cdc: cdc, - storeKey: storeKey, - memKey: memKey, - paramstore: ps, + cdc: cdc, + storeKey: storeKey, + memKey: memKey, + paramstore: ps, + connectionKeeper: connectionKeeper, + bankKeeper: bankKeeper, } } diff --git a/x/pep/keeper/msg_server_aggregated_key_share.go b/x/pep/keeper/msg_server_aggregated_key_share.go index aa9a25ce..b005ff9c 100644 --- a/x/pep/keeper/msg_server_aggregated_key_share.go +++ b/x/pep/keeper/msg_server_aggregated_key_share.go @@ -1,24 +1,109 @@ package keeper import ( + "bytes" "context" + "encoding/hex" + "errors" "fairyring/x/pep/types" + "fmt" + "strconv" + enc "github.com/FairBlock/DistributedIBE/encryption" sdk "github.com/cosmos/cosmos-sdk/types" + bls "github.com/drand/kyber-bls12381" ) func (k msgServer) CreateAggregatedKeyShare(goCtx context.Context, msg *types.MsgCreateAggregatedKeyShare) (*types.MsgCreateAggregatedKeyShareResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - var aggregatedKeyShare = types.AggregatedKeyShare{ - Creator: msg.Creator, + var trusted = false + + for _, trustedAddr := range k.TrustedAddresses(ctx) { + if trustedAddr == msg.Creator { + trusted = true + break + } + } + + if !trusted { + return nil, errors.New("msg not from trusted source") + } + + var dummyData = "test data" + var encryptedDataBytes bytes.Buffer + var dummyDataBuffer bytes.Buffer + dummyDataBuffer.Write([]byte(dummyData)) + var decryptedDataBytes bytes.Buffer + + ak, found := k.GetActivePubKey(ctx) + if !found { + k.Logger(ctx).Error("Active key not found") + return nil, errors.New("active key not found") + } + + keyByte, _ := hex.DecodeString(msg.Data) + publicKeyByte, _ := hex.DecodeString(ak.PublicKey) + + suite := bls.NewBLS12381Suite() + publicKeyPoint := suite.G1().Point() + if err := publicKeyPoint.UnmarshalBinary(publicKeyByte); err != nil { + return nil, err + } + + skPoint := suite.G2().Point() + if err := skPoint.UnmarshalBinary(keyByte); err != nil { + return nil, err + } + + processHeightStr := strconv.FormatUint(msg.Height, 10) + if err := enc.Encrypt(publicKeyPoint, []byte(processHeightStr), &encryptedDataBytes, &dummyDataBuffer); err != nil { + return nil, err + } + + err := enc.Decrypt(publicKeyPoint, skPoint, &decryptedDataBytes, &encryptedDataBytes) + if err != nil { + k.Logger(ctx).Error("Decryption error when verifying aggregated keyshare") + k.Logger(ctx).Error(err.Error()) + ctx.EventManager().EmitEvent( + sdk.NewEvent(types.KeyShareVerificationType, + sdk.NewAttribute(types.KeyShareVerificationCreator, msg.Creator), + sdk.NewAttribute(types.KeyShareVerificationHeight, strconv.FormatUint(msg.Height, 10)), + sdk.NewAttribute(types.KeyShareVerificationReason, err.Error()), + ), + ) + return nil, err + } + + if decryptedDataBytes.String() != dummyData { + k.Logger(ctx).Error("Decrypted data does not match original data") + k.Logger(ctx).Error(err.Error()) + ctx.EventManager().EmitEvent( + sdk.NewEvent(types.KeyShareVerificationType, + sdk.NewAttribute(types.KeyShareVerificationCreator, msg.Creator), + sdk.NewAttribute(types.KeyShareVerificationHeight, strconv.FormatUint(msg.Height, 10)), + sdk.NewAttribute(types.KeyShareVerificationReason, "decrypted data does not match original data"), + ), + ) + return nil, err + } + + k.SetAggregatedKeyShare(ctx, types.AggregatedKeyShare{ Height: msg.Height, Data: msg.Data, + Creator: msg.Creator, + }) + + latestHeight, err := strconv.ParseUint(k.GetLatestHeight(ctx), 10, 64) + if err != nil { + latestHeight = 0 } - k.SetAggregatedKeyShare( - ctx, - aggregatedKeyShare, - ) + if latestHeight < msg.Height { + k.SetLatestHeight(ctx, strconv.FormatUint(msg.Height, 10)) + } + + k.Logger(ctx).Info(fmt.Sprintf("[ProcessUnconfirmedTxs] Aggregated Key Added, height: %d", msg.Height)) + return &types.MsgCreateAggregatedKeyShareResponse{}, nil } diff --git a/x/pep/keeper/msg_server_submit_encrypted_tx.go b/x/pep/keeper/msg_server_submit_encrypted_tx.go index df5b40c5..0ee64ed2 100644 --- a/x/pep/keeper/msg_server_submit_encrypted_tx.go +++ b/x/pep/keeper/msg_server_submit_encrypted_tx.go @@ -2,9 +2,9 @@ package keeper import ( "context" - "strconv" - "fairyring/x/pep/types" + "fmt" + "strconv" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -32,10 +32,30 @@ func (k msgServer) SubmitEncryptedTx(goCtx context.Context, msg *types.MsgSubmit return nil, types.ErrInvalidTargetBlockHeight } + senderAddr, err := sdk.AccAddressFromBech32(msg.Creator) + if err != nil { + return nil, types.ErrInvalidMsgCreator + } + + minGas := k.MinGasPrice(ctx) + + err = k.bankKeeper.SendCoinsFromAccountToModule( + ctx, + senderAddr, + types.ModuleName, + sdk.NewCoins(minGas), + ) + + if err != nil { + k.Logger(ctx).Info(fmt.Sprintf("Error on sending coins: %v", err.Error())) + return nil, err + } + encryptedTx := types.EncryptedTx{ TargetHeight: msg.TargetBlockHeight, Data: msg.Data, Creator: msg.Creator, + ChargedGas: &minGas, } txIndex := k.AppendEncryptedTx(ctx, encryptedTx) diff --git a/x/pep/keeper/params.go b/x/pep/keeper/params.go index fabf964c..c3f797b0 100644 --- a/x/pep/keeper/params.go +++ b/x/pep/keeper/params.go @@ -8,10 +8,39 @@ import ( // GetParams get all parameters as types.Params func (k Keeper) GetParams(ctx sdk.Context) types.Params { - return types.NewParams() + coin := k.MinGasPrice(ctx) + return types.NewParams( + k.TrustedAddresses(ctx), + k.TrustedCounterParties(ctx), + k.ChannelID(ctx), + &coin, + ) } // SetParams set the params func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { k.paramstore.SetParamSet(ctx, ¶ms) } + +// TrustedAddresses returns the TrustedAddresses param +func (k Keeper) TrustedAddresses(ctx sdk.Context) (res []string) { + k.paramstore.Get(ctx, types.KeyTrustedAddresses, &res) + return +} + +// TrustedCounterParties returns the TrustedCounterParties param +func (k Keeper) TrustedCounterParties(ctx sdk.Context) (res []*types.TrustedCounterParty) { + k.paramstore.Get(ctx, types.KeyTrustedCounterParties, &res) + return +} + +// ChannelID returns the ChannelID param +func (k Keeper) ChannelID(ctx sdk.Context) (res string) { + k.paramstore.Get(ctx, types.KeyChannelID, &res) + return +} + +func (k Keeper) MinGasPrice(ctx sdk.Context) (res sdk.Coin) { + k.paramstore.Get(ctx, types.KeyMinGasPrice, &res) + return +} diff --git a/x/pep/keeper/pep_nonce.go b/x/pep/keeper/pep_nonce.go index 9be58d05..27660e0f 100644 --- a/x/pep/keeper/pep_nonce.go +++ b/x/pep/keeper/pep_nonce.go @@ -28,12 +28,12 @@ func (k Keeper) IncreasePepNonce( )) var nonce types.PepNonce - var newNonce uint64 = 1 + var newNonce uint64 = 2 if b == nil { // New address ? nonce = types.PepNonce{ Address: address, - Nonce: 1, + Nonce: newNonce, } } else { k.cdc.MustUnmarshal(b, &nonce) @@ -60,7 +60,7 @@ func (k Keeper) GetPepNonce( if b == nil { initNonce := types.PepNonce{ Address: address, - Nonce: 0, + Nonce: 1, } k.SetPepNonce(ctx, initNonce) return initNonce, true diff --git a/x/pep/keeper/unconfirmed_txs.go b/x/pep/keeper/unconfirmed_txs.go deleted file mode 100644 index b4d1abd1..00000000 --- a/x/pep/keeper/unconfirmed_txs.go +++ /dev/null @@ -1,130 +0,0 @@ -package keeper - -import ( - "bytes" - "encoding/hex" - "errors" - "fairyring/x/pep/types" - "fmt" - "strconv" - - enc "github.com/FairBlock/DistributedIBE/encryption" - - sdk "github.com/cosmos/cosmos-sdk/types" - cosmostxTypes "github.com/cosmos/cosmos-sdk/types/tx" - bls "github.com/drand/kyber-bls12381" - coretypes "github.com/tendermint/tendermint/rpc/core/types" -) - -// ProcessUnconfirmedTxs attempts to decode TXs in the mempool and -// execute the MsgCreateAggregatedKeyShare messages directly from the mempool. -func (k Keeper) ProcessUnconfirmedTxs(ctx sdk.Context, utxs *coretypes.ResultUnconfirmedTxs) error { - for _, utx := range utxs.Txs { - var decodedTx cosmostxTypes.Tx - err := decodedTx.Unmarshal(utx) - if err != nil { - k.Logger(ctx).Error("[ProcessUnconfirmedTxs] Error Parsing Unconfirmed Tx") - k.Logger(ctx).Error(err.Error()) - continue - } - - for _, message := range decodedTx.Body.Messages { - if message.TypeUrl == "/fairyring.pep.MsgCreateAggregatedKeyShare" { - var msg types.MsgCreateAggregatedKeyShare - err := msg.Unmarshal(message.Value) - if err != nil { - k.Logger(ctx).Error("[ProcessUnconfirmedTxs] Error Parsing Message") - k.Logger(ctx).Error(err.Error()) - continue - } - - if err := k.processMessage(ctx, msg); err != nil { - k.Logger(ctx).Error("[ProcessUnconfirmedTxs] Error processing message") - k.Logger(ctx).Error(err.Error()) - } - } - } - } - return nil -} - -// processMessage executes a MsgCreateAggregatedKeyShare message. It decrypts the message, -// checks for its authenticity and updates the last registered height of FairyRing -func (k Keeper) processMessage(ctx sdk.Context, msg types.MsgCreateAggregatedKeyShare) error { - var dummyData = "test data" - var encryptedDataBytes bytes.Buffer - var dummyDataBuffer bytes.Buffer - dummyDataBuffer.Write([]byte(dummyData)) - var decryptedDataBytes bytes.Buffer - - ak, found := k.GetActivePubKey(ctx) - if !found { - k.Logger(ctx).Error("Active key not found") - return errors.New("active key not found") - } - - keyByte, _ := hex.DecodeString(msg.Data) - publicKeyByte, _ := hex.DecodeString(ak.PublicKey) - - suite := bls.NewBLS12381Suite() - publicKeyPoint := suite.G1().Point() - if err := publicKeyPoint.UnmarshalBinary(publicKeyByte); err != nil { - return err - } - - skPoint := suite.G2().Point() - if err := skPoint.UnmarshalBinary(keyByte); err != nil { - return err - } - - processHeightStr := strconv.FormatUint(msg.Height, 10) - if err := enc.Encrypt(publicKeyPoint, []byte(processHeightStr), &encryptedDataBytes, &dummyDataBuffer); err != nil { - return err - } - - err := enc.Decrypt(publicKeyPoint, skPoint, &decryptedDataBytes, &encryptedDataBytes) - if err != nil { - k.Logger(ctx).Error("Decryption error when verifying aggregated keyshare") - k.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.KeyShareVerificationType, - sdk.NewAttribute(types.KeyShareVerificationCreator, msg.Creator), - sdk.NewAttribute(types.KeyShareVerificationHeight, strconv.FormatUint(msg.Height, 10)), - sdk.NewAttribute(types.KeyShareVerificationReason, err.Error()), - ), - ) - return err - } - - if decryptedDataBytes.String() != dummyData { - k.Logger(ctx).Error("Decrypted data does not match original data") - k.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.KeyShareVerificationType, - sdk.NewAttribute(types.KeyShareVerificationCreator, msg.Creator), - sdk.NewAttribute(types.KeyShareVerificationHeight, strconv.FormatUint(msg.Height, 10)), - sdk.NewAttribute(types.KeyShareVerificationReason, "decrypted data does not match original data"), - ), - ) - return err - } - - k.SetAggregatedKeyShare(ctx, types.AggregatedKeyShare{ - Height: msg.Height, - Data: msg.Data, - Creator: msg.Creator, - }) - - latestHeight, err := strconv.ParseUint(k.GetLatestHeight(ctx), 10, 64) - if err != nil { - latestHeight = 0 - } - - if latestHeight < msg.Height { - k.SetLatestHeight(ctx, strconv.FormatUint(msg.Height, 10)) - } - - k.Logger(ctx).Info(fmt.Sprintf("[ProcessUnconfirmedTxs] Aggregated Key Added, height: %d", msg.Height)) - - return nil -} diff --git a/x/pep/module.go b/x/pep/module.go index a98f04f8..b8585683 100644 --- a/x/pep/module.go +++ b/x/pep/module.go @@ -3,23 +3,27 @@ package pep import ( "bytes" "context" + cosmosmath "cosmossdk.io/math" "encoding/hex" "encoding/json" "fmt" + enc "github.com/FairBlock/DistributedIBE/encryption" - "math" - "strconv" "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/x/auth/ante" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" bls "github.com/drand/kyber-bls12381" + "math" + "strconv" + "strings" // this line is used by starport scaffolding # 1 "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - abci "github.com/tendermint/tendermint/abci/types" + abci "github.com/cometbft/cometbft/abci/types" "fairyring/x/pep/client/cli" "fairyring/x/pep/keeper" @@ -30,7 +34,6 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - tmcore "github.com/tendermint/tendermint/rpc/core" ) var ( @@ -110,6 +113,7 @@ type AppModule struct { msgServiceRouter *baseapp.MsgServiceRouter txConfig client.TxConfig + simCheck func(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) } func NewAppModule( @@ -119,6 +123,7 @@ func NewAppModule( bankKeeper types.BankKeeper, msgServiceRouter *baseapp.MsgServiceRouter, txConfig client.TxConfig, + simCheck func(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error), ) AppModule { return AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc, cdcJson: cdc}, @@ -127,20 +132,10 @@ func NewAppModule( bankKeeper: bankKeeper, msgServiceRouter: msgServiceRouter, txConfig: txConfig, + simCheck: simCheck, } } -// Deprecated: use RegisterServices -func (am AppModule) Route() sdk.Route { return sdk.Route{} } - -// Deprecated: use RegisterServices -func (AppModule) QuerierRoute() string { return types.RouterKey } - -// Deprecated: use RegisterServices -func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { - return nil -} - // RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) @@ -170,9 +165,75 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1 func (AppModule) ConsensusVersion() uint64 { return 1 } +func (am AppModule) handleGasConsumption(ctx sdk.Context, recipient sdk.AccAddress, gasUsed cosmosmath.Int, gasCharged *sdk.Coin) { + creatorAccount := am.accountKeeper.GetAccount(ctx, recipient) + + if gasUsed.GT(gasCharged.Amount) { + deductFeeErr := ante.DeductFees( + am.bankKeeper, + ctx, + creatorAccount, + sdk.NewCoins( + sdk.NewCoin( + gasCharged.Denom, + gasUsed.Sub(gasCharged.Amount)), + ), + ) + if deductFeeErr != nil { + am.keeper.Logger(ctx).Error("deduct failed tx fee error") + am.keeper.Logger(ctx).Error(deductFeeErr.Error()) + } else { + am.keeper.Logger(ctx).Info("failed tx fee deducted without error") + } + } else { + amount := gasCharged.Amount.Sub(gasUsed) + if amount.IsZero() { + am.keeper.Logger(ctx).Info("refund failed tx fee amount is zero, no need to refund...") + return + } + refundFeeErr := am.bankKeeper.SendCoinsFromModuleToAccount( + ctx, + types.ModuleName, + recipient, + sdk.NewCoins(sdk.NewCoin(gasCharged.Denom, amount)), + ) + if refundFeeErr != nil { + am.keeper.Logger(ctx).Error("refund failed tx fee error") + am.keeper.Logger(ctx).Error(refundFeeErr.Error()) + } else { + am.keeper.Logger(ctx).Info("failed tx fee refunded without error") + } + } +} + +func (am AppModule) processFailedEncryptedTx(ctx sdk.Context, tx types.EncryptedTx, failReason string, startConsumedGas uint64) { + am.keeper.Logger(ctx).Error(fmt.Sprintf("failed to process encrypted tx: %s", failReason)) + ctx.EventManager().EmitEvent( + sdk.NewEvent(types.EncryptedTxRevertedEventType, + sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, tx.Creator), + sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(tx.TargetHeight, 10)), + sdk.NewAttribute(types.EncryptedTxRevertedEventReason, failReason), + sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(tx.Index, 10)), + ), + ) + + creatorAddr, err := sdk.AccAddressFromBech32(tx.Creator) + if err != nil { + am.keeper.Logger(ctx).Error("error while trying to parse tx creator address when processing failed encrypted tx") + am.keeper.Logger(ctx).Error(err.Error()) + return + } + + var actualGasConsumed uint64 = 0 + if ctx.GasMeter().GasConsumed() > startConsumedGas { + actualGasConsumed = ctx.GasMeter().GasConsumed() - startConsumedGas + } + + am.handleGasConsumption(ctx, creatorAddr, cosmosmath.NewIntFromUint64(actualGasConsumed), tx.ChargedGas) +} + // BeginBlock contains the logic that is automatically triggered at the beginning of each block func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { - strLastExecutedHeight := am.keeper.GetLastExecutedHeight(ctx) lastExecutedHeight, err := strconv.ParseUint(strLastExecutedHeight, 10, 64) @@ -181,17 +242,9 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { lastExecutedHeight = 0 } - utxs, err := tmcore.UnconfirmedTxs(nil, nil) - if err != nil { - am.keeper.Logger(ctx).Error("Error on getting unconfirmed txs") - am.keeper.Logger(ctx).Error(err.Error()) - } - if utxs != nil { - if err := am.keeper.ProcessUnconfirmedTxs(ctx, utxs); err != nil { - am.keeper.Logger(ctx).Error("Process unconfirmed txs error") - am.keeper.Logger(ctx).Error(err.Error()) - } - } + allAggKey := am.keeper.GetAllAggregatedKeyShare(ctx) + + am.keeper.Logger(ctx).Info(fmt.Sprintf("[PEP][AGGKEY] %v", allAggKey)) strHeight := am.keeper.GetLatestHeight(ctx) height, err := strconv.ParseUint(strHeight, 10, 64) @@ -265,17 +318,9 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { am.keeper.Logger(ctx).Info(skPoint.String()) for _, eachTx := range arr.EncryptedTx { - + startConsumedGas := ctx.GasMeter().GasConsumed() if currentNonce, found := am.keeper.GetPepNonce(ctx, eachTx.Creator); found && currentNonce.Nonce == math.MaxUint64 { - am.keeper.Logger(ctx).Error("Invalid PEP Nonce") - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "Invalid pep nonce"), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, "invalid pep nonce", startConsumedGas) continue } @@ -283,16 +328,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { creatorAddr, err := sdk.AccAddressFromBech32(eachTx.Creator) if err != nil { - am.keeper.Logger(ctx).Error("Parse creator address error in BeginBlock") - am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, err.Error()), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error parsing creator address: %s", err.Error()), startConsumedGas) continue } @@ -300,16 +336,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { txBytes, err := hex.DecodeString(eachTx.Data) if err != nil { - am.keeper.Logger(ctx).Error("Error decoding tx data to bytes") - am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, err.Error()), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error decoding tx data to bytes: %s", err.Error()), startConsumedGas) continue } @@ -317,31 +344,13 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { var txBuffer bytes.Buffer _, err = txBuffer.Write(txBytes) if err != nil { - am.keeper.Logger(ctx).Error("Error write byte to tx buffer") - am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, err.Error()), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error while writing bytes to tx buffer: %s", err.Error()), startConsumedGas) continue } err = enc.Decrypt(publicKeyPoint, skPoint, &decryptedTx, &txBuffer) if err != nil { - am.keeper.Logger(ctx).Error("Error decrypting tx data") - am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, err.Error()), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error decrypting tx data: %s", err.Error()), startConsumedGas) continue } @@ -350,102 +359,62 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { txDecoderTx, err := am.txConfig.TxDecoder()(decryptedTx.Bytes()) if err != nil { - am.keeper.Logger(ctx).Error("Decoding Tx error in Beginblock") + am.keeper.Logger(ctx).Error("Decoding Tx error in BeginBlock... Trying JSON Decoder") am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "Unable to decode tx data to Cosmos Tx"), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) - continue + + txDecoderTx, err = am.txConfig.TxJSONDecoder()(decryptedTx.Bytes()) + if err != nil { + am.keeper.Logger(ctx).Error("JSON Decoding Tx error in BeginBlock") + am.keeper.Logger(ctx).Error(err.Error()) + ctx.EventManager().EmitEvent( + sdk.NewEvent(types.EncryptedTxRevertedEventType, + sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), + sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), + sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "Unable to decode tx data to Cosmos Tx"), + sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), + ), + ) + + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error trying to json decoding tx: %s", err.Error()), startConsumedGas) + continue + } else { + am.keeper.Logger(ctx).Error("TX Successfully Decode with JSON Decoder") + } } wrappedTx, err := am.txConfig.WrapTxBuilder(txDecoderTx) if err != nil { - am.keeper.Logger(ctx).Error("Error in wrapping tx to TxBuilder") - am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "Unable to wrap tx to TxBuilder"), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error when trying to wrap decoded tx to tx builder: %s", err.Error()), startConsumedGas) continue } sigs, err := wrappedTx.GetTx().GetSignaturesV2() if err != nil { - am.keeper.Logger(ctx).Error("Error in getting tx signature") - am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "Unable to get tx signature"), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error getting decoded tx signatures: %s", err.Error()), startConsumedGas) continue } if len(sigs) != 1 { - am.keeper.Logger(ctx).Error("Number of signatures provided is more than 1") - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "Number of signatures provided is more than 1"), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, "number of provided signatures is more than one", startConsumedGas) continue } txMsgs := wrappedTx.GetTx().GetMsgs() if len(sigs) != len(txMsgs) { - am.keeper.Logger(ctx).Error("Number of signature is not equals to number of messages") - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "Number of signature is not equals to number of messages"), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, "number of provided signatures is not equals to number of tx messages", startConsumedGas) continue } if !sigs[0].PubKey.Equals(creatorAccount.GetPubKey()) { - am.keeper.Logger(ctx).Error("Signer is not sender") - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "signer public key does not match sender public key"), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, "tx signer is not tx sender", startConsumedGas) continue } expectingNonce := newExecutedNonce - 1 if sigs[0].Sequence < expectingNonce { - am.keeper.Logger(ctx).Error(fmt.Sprintf("Incorrect Nonce sequence, Provided: %d, Expecting: %d", sigs[0].Sequence, expectingNonce)) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, fmt.Sprintf("Incorrect nonce sequence, provided: %d, expecting: %d", sigs[0].Sequence, expectingNonce)), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("Incorrect Nonce sequence, Provided: %d, Expecting: %d", sigs[0].Sequence, expectingNonce), startConsumedGas) continue } @@ -475,36 +444,89 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { ) if err != nil { - am.keeper.Logger(ctx).Error("Invalid Signature in BeginBlock") - am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, "Invalid signature"), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error when verifying signature: invalid signature: %s", err.Error()), startConsumedGas) + continue + } + + decryptionConsumed := ctx.GasMeter().GasConsumed() - startConsumedGas + simCheckGas, _, err := am.simCheck(am.txConfig.TxEncoder(), txDecoderTx) + // We are using SimCheck() to only estimate gas for the underlying transaction + // Since user is supposed to sign the underlying transaction with Pep Nonce, + // is expected that we gets 'account sequence mismatch' error + // however, the underlying tx is not expected to get other errors + // such as insufficient fee, out of gas etc... + if err != nil && !strings.Contains(err.Error(), "account sequence mismatch") { + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error while performing check tx: %s", err.Error()), startConsumedGas) continue } + txFee := wrappedTx.GetTx().GetFee() + + // If it passes the CheckTx but Tx Fee is empty, + // that means the minimum-gas-prices for the validator is 0 + // therefore, we are not charging for the tx execution + if !txFee.Empty() { + gasProvided := cosmosmath.NewIntFromUint64(wrappedTx.GetTx().GetGas()) + // Underlying tx consumed gas + gas consumed on decrypting & decoding tx + am.keeper.Logger(ctx).Info(fmt.Sprintf("Underlying tx consumed: %d, decryption consumed: %d", simCheckGas.GasUsed, decryptionConsumed)) + gasUsedInBig := cosmosmath.NewIntFromUint64(simCheckGas.GasUsed).Add(cosmosmath.NewIntFromUint64(decryptionConsumed)) + newCoins := make([]sdk.Coin, len(txFee)) + refundDenom := txFee[0].Denom + refundAmount := cosmosmath.NewIntFromUint64(0) + + usedGasFee := sdk.NewCoin( + txFee[0].Denom, + // Tx Fee Amount Divide Provide Gas => provided gas price + // Provided Gas Price * Gas Used => Amount to deduct as gas fee + txFee[0].Amount.Quo(gasProvided).Mul(gasUsedInBig), + ) + + if usedGasFee.Denom != eachTx.ChargedGas.Denom { + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("underlying tx gas denom does not match charged gas denom, got: %s, expect: %s", usedGasFee.Denom, eachTx.ChargedGas.Denom), startConsumedGas) + continue + } + + if usedGasFee.Amount.GT(eachTx.ChargedGas.Amount) { + usedGasFee.Amount = usedGasFee.Amount.Sub(eachTx.ChargedGas.Amount) + } else { // less than or equals to + refundAmount = eachTx.ChargedGas.Amount.Sub(usedGasFee.Amount) + usedGasFee.Amount = cosmosmath.NewIntFromUint64(0) + } + + am.keeper.Logger(ctx).Info(fmt.Sprintf("Deduct fee amount: %v | Refund amount: %v", newCoins, refundAmount)) + + if refundAmount.IsZero() { + deductFeeErr := ante.DeductFees(am.bankKeeper, ctx, creatorAccount, sdk.NewCoins(usedGasFee)) + if deductFeeErr != nil { + am.keeper.Logger(ctx).Error("Deduct fee Err") + am.keeper.Logger(ctx).Error(deductFeeErr.Error()) + } else { + am.keeper.Logger(ctx).Info("Fee deducted without error") + } + } else { + refundFeeErr := am.bankKeeper.SendCoinsFromModuleToAccount( + ctx, + types.ModuleName, + creatorAddr, + sdk.NewCoins(sdk.NewCoin(refundDenom, refundAmount)), + ) + if refundFeeErr != nil { + am.keeper.Logger(ctx).Error("Refund fee Err") + am.keeper.Logger(ctx).Error(refundFeeErr.Error()) + } else { + am.keeper.Logger(ctx).Info("Fee refunded without error") + } + } + } + handler := am.msgServiceRouter.Handler(txMsgs[0]) _, err = handler(ctx, txMsgs[0]) if err != nil { - am.keeper.Logger(ctx).Error("Handle Tx Msg Error") - am.keeper.Logger(ctx).Error(err.Error()) - ctx.EventManager().EmitEvent( - sdk.NewEvent(types.EncryptedTxRevertedEventType, - sdk.NewAttribute(types.EncryptedTxRevertedEventCreator, eachTx.Creator), - sdk.NewAttribute(types.EncryptedTxRevertedEventHeight, strconv.FormatUint(eachTx.TargetHeight, 10)), - sdk.NewAttribute(types.EncryptedTxRevertedEventReason, err.Error()), - sdk.NewAttribute(types.EncryptedTxRevertedEventIndex, strconv.FormatUint(eachTx.Index, 10)), - ), - ) + am.processFailedEncryptedTx(ctx, eachTx, fmt.Sprintf("error when handling tx message: %s", err.Error()), startConsumedGas) continue } - am.keeper.Logger(ctx).Info("!Executed successfully!") + am.keeper.Logger(ctx).Info("! Encrypted Tx Decrypted & Decoded & Executed successfully !") ctx.EventManager().EmitEvent( sdk.NewEvent(types.EncryptedTxExecutedEventType, @@ -525,7 +547,7 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { err := am.keeper.QueryFairyringCurrentKeys(ctx) if err != nil { - am.keeper.Logger(ctx).Error("Beginblocker get keys err", err) + am.keeper.Logger(ctx).Error("Endblocker get keys err", err) am.keeper.Logger(ctx).Error(err.Error()) } diff --git a/x/pep/module_ibc.go b/x/pep/module_ibc.go index 02032872..4acfbece 100644 --- a/x/pep/module_ibc.go +++ b/x/pep/module_ibc.go @@ -10,10 +10,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" cosmoserror "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" ) type IBCModule struct { @@ -112,7 +112,7 @@ func (im IBCModule) OnChanOpenConfirm( portID, channelID string, ) error { - im.keeper.SetChannel(ctx, channelID) + // im.keeper.SetChannel(ctx, channelID) return nil } diff --git a/x/pep/module_simulation.go b/x/pep/module_simulation.go index a767ef42..7a1c2fa6 100644 --- a/x/pep/module_simulation.go +++ b/x/pep/module_simulation.go @@ -8,7 +8,6 @@ import ( "fairyring/x/pep/types" "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" @@ -19,7 +18,6 @@ import ( var ( _ = sample.AccAddress _ = pepsimulation.FindAccount - _ = simappparams.StakePerAccount _ = simulation.MsgEntryKind _ = baseapp.Paramspace ) @@ -62,12 +60,6 @@ func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedP return nil } -// RandomizedParams creates randomized param changes for the simulator -func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { - - return []simtypes.ParamChange{} -} - // RegisterStoreDecoder registers a decoder func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} diff --git a/x/pep/simulation/aggregated_key_share.go b/x/pep/simulation/aggregated_key_share.go index f3006f4f..c3286070 100644 --- a/x/pep/simulation/aggregated_key_share.go +++ b/x/pep/simulation/aggregated_key_share.go @@ -8,8 +8,8 @@ import ( "fairyring/x/pep/types" "github.com/cosmos/cosmos-sdk/baseapp" - simappparams "github.com/cosmos/cosmos-sdk/simapp/params" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" ) @@ -40,7 +40,7 @@ func SimulateMsgCreateAggregatedKeyShare( txCtx := simulation.OperationInput{ R: r, App: app, - TxGen: simappparams.MakeTestEncodingConfig().TxConfig, + TxGen: testutil.MakeTestTxConfig(), Cdc: nil, Msg: msg, MsgType: msg.Type(), diff --git a/x/pep/specs/07_end_block.md b/x/pep/specs/07_end_block.md index 46872317..bb10e823 100644 --- a/x/pep/specs/07_end_block.md +++ b/x/pep/specs/07_end_block.md @@ -7,7 +7,7 @@ The Pep module maintains a copy of the active and queued public keys for the pur ```go err := am.keeper.QueryFairyringCurrentKeys(ctx) if err != nil { - am.keeper.Logger(ctx).Error("Beginblocker get keys err", err) + am.keeper.Logger(ctx).Error("Endblocker get keys err", err) am.keeper.Logger(ctx).Error(err.Error()) } ``` diff --git a/x/pep/types/aggregated_key_share.pb.go b/x/pep/types/aggregated_key_share.pb.go index 879f3bc7..66c14412 100644 --- a/x/pep/types/aggregated_key_share.pb.go +++ b/x/pep/types/aggregated_key_share.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/pep/types/codec.go b/x/pep/types/codec.go index 70ea6161..d26e44e5 100644 --- a/x/pep/types/codec.go +++ b/x/pep/types/codec.go @@ -5,6 +5,7 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" + authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" ) func RegisterCodec(cdc *codec.LegacyAmino) { @@ -29,3 +30,9 @@ var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) ) + +func init() { + RegisterCodec(Amino) + sdk.RegisterLegacyAminoCodec(Amino) + RegisterCodec(authzcodec.Amino) +} diff --git a/x/pep/types/encrypted_tx.pb.go b/x/pep/types/encrypted_tx.pb.go index 67f04f3e..ec66a5fe 100644 --- a/x/pep/types/encrypted_tx.pb.go +++ b/x/pep/types/encrypted_tx.pb.go @@ -5,8 +5,9 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -24,10 +25,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type EncryptedTx struct { - TargetHeight uint64 `protobuf:"varint,1,opt,name=targetHeight,proto3" json:"targetHeight,omitempty"` - Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` - Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` + TargetHeight uint64 `protobuf:"varint,1,opt,name=targetHeight,proto3" json:"targetHeight,omitempty"` + Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` + ChargedGas *types.Coin `protobuf:"bytes,5,opt,name=chargedGas,proto3" json:"chargedGas,omitempty"` } func (m *EncryptedTx) Reset() { *m = EncryptedTx{} } @@ -91,6 +93,13 @@ func (m *EncryptedTx) GetCreator() string { return "" } +func (m *EncryptedTx) GetChargedGas() *types.Coin { + if m != nil { + return m.ChargedGas + } + return nil +} + type EncryptedTxArray struct { EncryptedTx []EncryptedTx `protobuf:"bytes,1,rep,name=encryptedTx,proto3" json:"encryptedTx"` } @@ -143,23 +152,27 @@ func init() { func init() { proto.RegisterFile("fairyring/pep/encrypted_tx.proto", fileDescriptor_7c124d687cde8326) } var fileDescriptor_7c124d687cde8326 = []byte{ - // 246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x50, 0xbd, 0x4a, 0xc4, 0x40, - 0x10, 0xce, 0x7a, 0x51, 0x71, 0xa3, 0x20, 0xcb, 0x09, 0xcb, 0x15, 0x6b, 0x48, 0x95, 0x2a, 0x01, - 0x7d, 0x02, 0x03, 0x82, 0x75, 0x10, 0x0b, 0x1b, 0x59, 0x2f, 0xe3, 0x9a, 0x26, 0xbb, 0x8c, 0x23, - 0x64, 0xdf, 0xc2, 0xc7, 0xba, 0xf2, 0x4a, 0x2b, 0x91, 0xe4, 0x45, 0xc4, 0x3d, 0xee, 0x2e, 0xd7, - 0x7d, 0xbf, 0x0c, 0xf3, 0xf1, 0xf4, 0x4d, 0xb7, 0xe8, 0xb1, 0xed, 0x4c, 0xe9, 0xc0, 0x95, 0xd0, - 0x2d, 0xd1, 0x3b, 0x82, 0xe6, 0x85, 0xfa, 0xc2, 0xa1, 0x25, 0x2b, 0x2e, 0x76, 0x89, 0xc2, 0x81, - 0x5b, 0xcc, 0x8d, 0x35, 0x36, 0x38, 0xe5, 0x3f, 0xda, 0x84, 0xb2, 0x4f, 0x9e, 0xdc, 0x6f, 0xab, - 0x8f, 0xbd, 0xc8, 0xf8, 0x39, 0x69, 0x34, 0x40, 0x0f, 0xd0, 0x9a, 0x77, 0x92, 0x2c, 0x65, 0x79, - 0x5c, 0x1f, 0x68, 0x62, 0xce, 0x8f, 0xdb, 0xae, 0x81, 0x5e, 0x1e, 0x05, 0x73, 0x43, 0x84, 0xe0, - 0x71, 0xa3, 0x49, 0xcb, 0x59, 0xca, 0xf2, 0xb3, 0x3a, 0x60, 0x21, 0xf9, 0xe9, 0x12, 0x41, 0x93, - 0x45, 0x19, 0x07, 0x79, 0x4b, 0xb3, 0x27, 0x7e, 0x39, 0x39, 0x7b, 0x87, 0xa8, 0xbd, 0xa8, 0x78, - 0x02, 0x7b, 0x4d, 0xb2, 0x74, 0x96, 0x27, 0x37, 0x8b, 0xe2, 0xe0, 0x8b, 0x62, 0xd2, 0xaa, 0xe2, - 0xd5, 0xcf, 0x75, 0x54, 0x4f, 0x4b, 0x55, 0xb9, 0x1a, 0x14, 0x5b, 0x0f, 0x8a, 0xfd, 0x0e, 0x8a, - 0x7d, 0x8d, 0x2a, 0x5a, 0x8f, 0x2a, 0xfa, 0x1e, 0x55, 0xf4, 0x7c, 0xb5, 0xdf, 0xab, 0x0f, 0x8b, - 0x91, 0x77, 0xf0, 0xf1, 0x7a, 0x12, 0x66, 0xb8, 0xfd, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x44, - 0x40, 0x86, 0x4f, 0x01, 0x00, 0x00, + // 306 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x86, 0x63, 0x9a, 0x82, 0x70, 0x40, 0x42, 0x56, 0x91, 0x4c, 0x07, 0x13, 0x75, 0xca, 0x64, + 0xab, 0x65, 0x62, 0xa4, 0x08, 0xc1, 0x1c, 0x21, 0x06, 0x16, 0xe4, 0x26, 0x47, 0xea, 0x81, 0xd8, + 0x72, 0x2c, 0x94, 0xbc, 0x05, 0x8f, 0xc2, 0x63, 0x74, 0xec, 0xc8, 0x84, 0x50, 0xfb, 0x22, 0xa8, + 0x0e, 0xa5, 0xe9, 0x76, 0xf7, 0xff, 0xff, 0x9d, 0x3e, 0xdd, 0xe1, 0xf8, 0x55, 0x2a, 0xdb, 0x58, + 0x55, 0x16, 0xc2, 0x80, 0x11, 0x50, 0x66, 0xb6, 0x31, 0x0e, 0xf2, 0x17, 0x57, 0x73, 0x63, 0xb5, + 0xd3, 0xe4, 0xf4, 0x3f, 0xc1, 0x0d, 0x98, 0xe1, 0xa0, 0xd0, 0x85, 0xf6, 0x8e, 0xd8, 0x54, 0x6d, + 0x68, 0xc8, 0x32, 0x5d, 0xbd, 0xe9, 0x4a, 0xcc, 0x64, 0x05, 0xe2, 0x7d, 0x3c, 0x03, 0x27, 0xc7, + 0x22, 0xd3, 0xaa, 0x6c, 0xfd, 0xd1, 0x27, 0xc2, 0xd1, 0xdd, 0x76, 0xf7, 0x63, 0x4d, 0x46, 0xf8, + 0xc4, 0x49, 0x5b, 0x80, 0x7b, 0x00, 0x55, 0xcc, 0x1d, 0x45, 0x31, 0x4a, 0xc2, 0x74, 0x4f, 0x23, + 0x03, 0xdc, 0x57, 0x65, 0x0e, 0x35, 0x3d, 0xf0, 0x66, 0xdb, 0x10, 0x82, 0xc3, 0x5c, 0x3a, 0x49, + 0x7b, 0x31, 0x4a, 0x8e, 0x53, 0x5f, 0x13, 0x8a, 0x8f, 0x32, 0x0b, 0xd2, 0x69, 0x4b, 0x43, 0x2f, + 0x6f, 0x5b, 0x72, 0x8d, 0x71, 0x36, 0xdf, 0x2c, 0xcd, 0xef, 0x65, 0x45, 0xfb, 0x31, 0x4a, 0xa2, + 0xc9, 0x05, 0x6f, 0x61, 0xf9, 0x06, 0x96, 0xff, 0xc1, 0xf2, 0x5b, 0xad, 0xca, 0xb4, 0x13, 0x1e, + 0x3d, 0xe1, 0xb3, 0x0e, 0xf1, 0x8d, 0xb5, 0xb2, 0x21, 0x53, 0x1c, 0xc1, 0x4e, 0xa3, 0x28, 0xee, + 0x25, 0xd1, 0x64, 0xc8, 0xf7, 0x2e, 0xc4, 0x3b, 0x53, 0xd3, 0x70, 0xf1, 0x7d, 0x19, 0xa4, 0xdd, + 0xa1, 0xa9, 0x58, 0xac, 0x18, 0x5a, 0xae, 0x18, 0xfa, 0x59, 0x31, 0xf4, 0xb1, 0x66, 0xc1, 0x72, + 0xcd, 0x82, 0xaf, 0x35, 0x0b, 0x9e, 0xcf, 0x77, 0xbf, 0xa8, 0xfd, 0x37, 0x5c, 0x63, 0xa0, 0x9a, + 0x1d, 0xfa, 0x13, 0x5e, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x95, 0xcb, 0x8a, 0x8d, 0xab, 0x01, + 0x00, 0x00, } func (m *EncryptedTx) Marshal() (dAtA []byte, err error) { @@ -182,6 +195,18 @@ func (m *EncryptedTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ChargedGas != nil { + { + size, err := m.ChargedGas.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEncryptedTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } if len(m.Creator) > 0 { i -= len(m.Creator) copy(dAtA[i:], m.Creator) @@ -277,6 +302,10 @@ func (m *EncryptedTx) Size() (n int) { if l > 0 { n += 1 + l + sovEncryptedTx(uint64(l)) } + if m.ChargedGas != nil { + l = m.ChargedGas.Size() + n += 1 + l + sovEncryptedTx(uint64(l)) + } return n } @@ -432,6 +461,42 @@ func (m *EncryptedTx) Unmarshal(dAtA []byte) error { } m.Creator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChargedGas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEncryptedTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEncryptedTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEncryptedTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ChargedGas == nil { + m.ChargedGas = &types.Coin{} + } + if err := m.ChargedGas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEncryptedTx(dAtA[iNdEx:]) diff --git a/x/pep/types/errors.go b/x/pep/types/errors.go index 8026f9b6..f535c555 100644 --- a/x/pep/types/errors.go +++ b/x/pep/types/errors.go @@ -8,8 +8,7 @@ import ( // x/pep module sentinel errors var ( - ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error") - ErrInvalidPacketTimeout = sdkerrors.Register(ModuleName, 1500, "invalid packet timeout") ErrInvalidVersion = sdkerrors.Register(ModuleName, 1501, "invalid version") ErrInvalidTargetBlockHeight = sdkerrors.Register(ModuleName, 1600, "Invalid target block height") + ErrInvalidMsgCreator = sdkerrors.Register(ModuleName, 1700, "Invalid msg creator address") ) diff --git a/x/pep/types/expected_keepers.go b/x/pep/types/expected_keepers.go index 6aa6e977..48b87af5 100644 --- a/x/pep/types/expected_keepers.go +++ b/x/pep/types/expected_keepers.go @@ -1,8 +1,15 @@ package types import ( + sdkerrors "cosmossdk.io/errors" + storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/types" + capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" + clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" + connTypes "github.com/cosmos/ibc-go/v7/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" + host "github.com/cosmos/ibc-go/v7/modules/core/24-host" ) // AccountKeeper defines the expected account keeper used for simulations (noalias) @@ -14,5 +21,113 @@ type AccountKeeper interface { // BankKeeper defines the expected interface needed to retrieve account balances. type BankKeeper interface { SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins + SendCoins(ctx sdk.Context, from, to sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error // Methods imported from bank should be defined here } + +// ConnectionKeeper defines the expected interfaces needed to retrieve connection info +type ConnectionKeeper interface { + GetConnection(ctx sdk.Context, connectionID string) (connTypes.ConnectionEnd, bool) +} + +// ChannelKeeper defines the expected IBC channel keeper +type ChannelKeeper interface { + GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) + GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) + SendPacket( + ctx sdk.Context, + channelCap *capabilitytypes.Capability, + sourcePort string, + sourceChannel string, + timeoutHeight clienttypes.Height, + timeoutTimestamp uint64, + data []byte, + ) (uint64, error) + ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error +} + +// PortKeeper defines the expected IBC port keeper +type PortKeeper interface { + BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability +} + +// ScopedKeeper defines the expected IBC scoped keeper +type ScopedKeeper interface { + GetCapability(ctx sdk.Context, name string) (*capabilitytypes.Capability, bool) + AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool + ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error +} + +// IBCKeeper defines the IBC Keeper +type IBCKeeper struct { + portKey []byte + storeKey storetypes.StoreKey + ChannelKeeper ChannelKeeper + PortKeeper PortKeeper + ScopedKeeper ScopedKeeper +} + +// NewKeeper create an IBC Keeper +func NewIBCKeeper( + portKey []byte, + storeKey storetypes.StoreKey, + channelKeeper ChannelKeeper, + portKeeper PortKeeper, + scopedKeeper ScopedKeeper, +) *IBCKeeper { + return &IBCKeeper{ + portKey: portKey, + storeKey: storeKey, + ChannelKeeper: channelKeeper, + PortKeeper: portKeeper, + ScopedKeeper: scopedKeeper, + } +} + +// ChanCloseInit defines a wrapper function for the channel Keeper's function +func (k IBCKeeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error { + capName := host.ChannelCapabilityPath(portID, channelID) + chanCap, ok := k.ScopedKeeper.GetCapability(ctx, capName) + if !ok { + return sdkerrors.Wrapf(channeltypes.ErrChannelCapabilityNotFound, "could not retrieve channel capability at: %s", capName) + } + return k.ChannelKeeper.ChanCloseInit(ctx, portID, channelID, chanCap) +} + +// IsBound checks if the module is already bound to the desired port +func (k IBCKeeper) IsBound(ctx sdk.Context, portID string) bool { + _, ok := k.ScopedKeeper.GetCapability(ctx, host.PortPath(portID)) + return ok +} + +// BindPort defines a wrapper function for the ort Keeper's function in +// order to expose it to module's InitGenesis function +func (k IBCKeeper) BindPort(ctx sdk.Context, portID string) error { + cap := k.PortKeeper.BindPort(ctx, portID) + return k.ClaimCapability(ctx, cap, host.PortPath(portID)) +} + +// GetPort returns the portID for the module. Used in ExportGenesis +func (k IBCKeeper) GetPort(ctx sdk.Context) string { + store := ctx.KVStore(k.storeKey) + return string(store.Get(k.portKey)) +} + +// SetPort sets the portID for the module. Used in InitGenesis +func (k IBCKeeper) SetPort(ctx sdk.Context, portID string) { + store := ctx.KVStore(k.storeKey) + store.Set(k.portKey, []byte(portID)) +} + +// AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function +func (k IBCKeeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool { + return k.ScopedKeeper.AuthenticateCapability(ctx, cap, name) +} + +// ClaimCapability allows the module that can claim a capability that IBC module passes to it +func (k IBCKeeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error { + return k.ScopedKeeper.ClaimCapability(ctx, cap, name) +} diff --git a/x/pep/types/fairblock_nonce.pb.go b/x/pep/types/fairblock_nonce.pb.go deleted file mode 100644 index 1ff5580c..00000000 --- a/x/pep/types/fairblock_nonce.pb.go +++ /dev/null @@ -1,351 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: fairyring/fairblock/fairblock_nonce.proto - -package types - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type FairblockNonce struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` -} - -func (m *FairblockNonce) Reset() { *m = FairblockNonce{} } -func (m *FairblockNonce) String() string { return proto.CompactTextString(m) } -func (*FairblockNonce) ProtoMessage() {} -func (*FairblockNonce) Descriptor() ([]byte, []int) { - return fileDescriptor_759755c7446091ee, []int{0} -} -func (m *FairblockNonce) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FairblockNonce) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FairblockNonce.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 *FairblockNonce) XXX_Merge(src proto.Message) { - xxx_messageInfo_FairblockNonce.Merge(m, src) -} -func (m *FairblockNonce) XXX_Size() int { - return m.Size() -} -func (m *FairblockNonce) XXX_DiscardUnknown() { - xxx_messageInfo_FairblockNonce.DiscardUnknown(m) -} - -var xxx_messageInfo_FairblockNonce proto.InternalMessageInfo - -func (m *FairblockNonce) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *FairblockNonce) GetNonce() uint64 { - if m != nil { - return m.Nonce - } - return 0 -} - -func init() { - proto.RegisterType((*FairblockNonce)(nil), "fairyring.fairblock.FairblockNonce") -} - -func init() { - proto.RegisterFile("fairyring/fairblock/fairblock_nonce.proto", fileDescriptor_759755c7446091ee) -} - -var fileDescriptor_759755c7446091ee = []byte{ - // 153 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4c, 0x4b, 0xcc, 0x2c, - 0xaa, 0x2c, 0xca, 0xcc, 0x4b, 0xd7, 0x07, 0xb1, 0x92, 0x72, 0xf2, 0x93, 0xb3, 0x11, 0xac, 0xf8, - 0xbc, 0xfc, 0xbc, 0xe4, 0x54, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x61, 0xb8, 0x52, 0x3d, - 0xb8, 0x02, 0x25, 0x07, 0x2e, 0x3e, 0x37, 0x18, 0xc7, 0x0f, 0xa4, 0x58, 0x48, 0x82, 0x8b, 0x3d, - 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, 0x58, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, - 0x12, 0xe1, 0x62, 0x05, 0x9b, 0x27, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x12, 0x04, 0xe1, 0x38, 0x99, - 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, - 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x34, 0xc2, 0x6d, 0x15, 0x48, - 0xae, 0x2b, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x3b, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, - 0xff, 0xc7, 0x98, 0x28, 0x32, 0xc1, 0x00, 0x00, 0x00, -} - -func (m *FairblockNonce) 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 *FairblockNonce) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FairblockNonce) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Nonce != 0 { - i = encodeVarintFairblockNonce(dAtA, i, uint64(m.Nonce)) - i-- - dAtA[i] = 0x10 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintFairblockNonce(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintFairblockNonce(dAtA []byte, offset int, v uint64) int { - offset -= sovFairblockNonce(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *FairblockNonce) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovFairblockNonce(uint64(l)) - } - if m.Nonce != 0 { - n += 1 + sovFairblockNonce(uint64(m.Nonce)) - } - return n -} - -func sovFairblockNonce(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFairblockNonce(x uint64) (n int) { - return sovFairblockNonce(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *FairblockNonce) 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 ErrIntOverflowFairblockNonce - } - 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: FairblockNonce: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FairblockNonce: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFairblockNonce - } - 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 ErrInvalidLengthFairblockNonce - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFairblockNonce - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) - } - m.Nonce = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFairblockNonce - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nonce |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipFairblockNonce(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFairblockNonce - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFairblockNonce(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, ErrIntOverflowFairblockNonce - } - 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, ErrIntOverflowFairblockNonce - } - 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, ErrIntOverflowFairblockNonce - } - 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, ErrInvalidLengthFairblockNonce - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFairblockNonce - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFairblockNonce - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFairblockNonce = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFairblockNonce = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFairblockNonce = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/pep/types/genesis.go b/x/pep/types/genesis.go index 760c1fbc..12b82cc4 100644 --- a/x/pep/types/genesis.go +++ b/x/pep/types/genesis.go @@ -2,6 +2,8 @@ package types import ( "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" ) // DefaultIndex is the default global index @@ -50,5 +52,13 @@ func (gs GenesisState) Validate() error { } // this line is used by starport scaffolding # genesis/types/validate + // Check for valid addresses in NONCE + for _, elem := range gs.PepNonceList { + _, err := sdk.AccAddressFromBech32(elem.Address) + if err != nil { + return err + } + } + return gs.Params.Validate() } diff --git a/x/pep/types/genesis.pb.go b/x/pep/types/genesis.pb.go index acf7f4b5..94e1d909 100644 --- a/x/pep/types/genesis.pb.go +++ b/x/pep/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/pep/types/key_fairblock_nonce.go b/x/pep/types/key_pep_nonce.go similarity index 100% rename from x/pep/types/key_fairblock_nonce.go rename to x/pep/types/key_pep_nonce.go diff --git a/x/pep/types/keys.go b/x/pep/types/keys.go index e0fe4b13..15704553 100644 --- a/x/pep/types/keys.go +++ b/x/pep/types/keys.go @@ -18,6 +18,9 @@ const ( // PortID is the default port id that module binds to PortID = "pep" + + // ChannelID is the default channel id that module will use to transmit IBC packets. + ChannelID = "channel-0" ) var ( diff --git a/x/pep/types/packet.pb.go b/x/pep/types/packet.pb.go index d1b3fabb..f5387f87 100644 --- a/x/pep/types/packet.pb.go +++ b/x/pep/types/packet.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/pep/types/params.go b/x/pep/types/params.go index 357196ad..e60b5931 100644 --- a/x/pep/types/params.go +++ b/x/pep/types/params.go @@ -1,34 +1,84 @@ package types import ( + cosmosmath "cosmossdk.io/math" + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "gopkg.in/yaml.v2" ) var _ paramtypes.ParamSet = (*Params)(nil) +var ( + KeyTrustedAddresses = []byte("TrustedAddresses") + DefaultTrustedAddresses []string +) + +var ( + KeyTrustedCounterParties = []byte("TrustedCounterParty") + DefaultTrustedCounterParties []*TrustedCounterParty +) + +var ( + KeyChannelID = []byte("ChannelID") + DefaultChannelID = ChannelID + KeyMinGasPrice = []byte("MinGasPrice") + DefaultMinGasPrice = sdk.NewCoin("frt", cosmosmath.NewInt(300000)) +) + // ParamKeyTable the param key table for launch module func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } // NewParams creates a new Params instance -func NewParams() Params { - return Params{} +func NewParams( + trAddrs []string, + trustedParties []*TrustedCounterParty, + channelID string, + minGasPrice *sdk.Coin, +) Params { + return Params{ + TrustedAddresses: trAddrs, + TrustedCounterParties: trustedParties, + ChannelId: channelID, + MinGasPrice: minGasPrice, + } } // DefaultParams returns a default set of parameters func DefaultParams() Params { - return NewParams() + return NewParams(DefaultTrustedAddresses, DefaultTrustedCounterParties, DefaultChannelID, &DefaultMinGasPrice) } // ParamSetPairs get the params.ParamSet func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{} + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyTrustedAddresses, &p.TrustedAddresses, validateTrustedAddresses), + paramtypes.NewParamSetPair(KeyTrustedCounterParties, &p.TrustedCounterParties, validateTrustedCounterParties), + paramtypes.NewParamSetPair(KeyChannelID, &p.ChannelId, validateChannelID), + paramtypes.NewParamSetPair(KeyMinGasPrice, &p.MinGasPrice, validateMinGasPrice), + } } // Validate validates the set of params func (p Params) Validate() error { + if err := validateTrustedAddresses(p.TrustedAddresses); err != nil { + return err + } + + if err := validateTrustedCounterParties(p.TrustedCounterParties); err != nil { + return err + } + + if err := validateChannelID(p.ChannelId); err != nil { + return err + } + if err := validateMinGasPrice(p.MinGasPrice); err != nil { + return err + } + return nil } @@ -37,3 +87,78 @@ func (p Params) String() string { out, _ := yaml.Marshal(p) return string(out) } + +// validateChannelID validates the channelID param +func validateChannelID(v interface{}) error { + channelID, ok := v.(string) + + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + + if len(channelID) < 1 { + return fmt.Errorf("invalid Channel ID") + } + + return nil +} + +func validateMinGasPrice(v interface{}) error { + + minGasPrice, ok := v.(*sdk.Coin) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + + if minGasPrice.Amount.IsZero() || minGasPrice.Amount.IsNegative() { + return fmt.Errorf("invalid min gas price amount, expected > 0, got: %d", minGasPrice) + } + + return nil +} + +// validateTrustedAddresses validates the TrustedAddresses param +func validateTrustedAddresses(v interface{}) error { + trustedList, ok := v.([]string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + + // Validate each address in the slice + for i, element := range trustedList { + // Perform validation logic on each element + _, err := sdk.AccAddressFromBech32(element) + if err != nil { + return fmt.Errorf("address at index %d is invalid", i) + } + } + + return nil +} + +// validateTrustedAddresses validates the TrustedAddresses param +func validateTrustedCounterParties(v interface{}) error { + trustedParties, ok := v.([]*TrustedCounterParty) + if !ok { + return fmt.Errorf("invalid parameter type: %T", v) + } + + // Validate each party in the slice + for i, element := range trustedParties { + if element == nil { + return fmt.Errorf("trusted Party is null") + } + // Perform validation logic on each element + if len(element.ChannelId) < 1 { + return fmt.Errorf("channel ID at index %d is empty", i) + } + if len(element.ConnectionId) < 1 { + return fmt.Errorf("connection ID at index %d is empty", i) + } + if len(element.ClientId) < 1 { + return fmt.Errorf("client ID at index %d is empty", i) + } + } + + return nil +} diff --git a/x/pep/types/params.pb.go b/x/pep/types/params.pb.go index 5d65ff4e..12013120 100644 --- a/x/pep/types/params.pb.go +++ b/x/pep/types/params.pb.go @@ -5,8 +5,9 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" @@ -25,6 +26,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Params defines the parameters for the module. type Params struct { + TrustedCounterParties []*TrustedCounterParty `protobuf:"bytes,1,rep,name=trusted_counter_parties,json=trustedCounterParties,proto3" json:"trusted_counter_parties,omitempty"` + TrustedAddresses []string `protobuf:"bytes,2,rep,name=trusted_addresses,json=trustedAddresses,proto3" json:"trusted_addresses,omitempty"` + ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` + MinGasPrice *types.Coin `protobuf:"bytes,4,opt,name=minGasPrice,proto3" json:"minGasPrice,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -59,23 +64,126 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo +func (m *Params) GetTrustedCounterParties() []*TrustedCounterParty { + if m != nil { + return m.TrustedCounterParties + } + return nil +} + +func (m *Params) GetTrustedAddresses() []string { + if m != nil { + return m.TrustedAddresses + } + return nil +} + +func (m *Params) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + +func (m *Params) GetMinGasPrice() *types.Coin { + if m != nil { + return m.MinGasPrice + } + return nil +} + +type TrustedCounterParty struct { + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` + ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` +} + +func (m *TrustedCounterParty) Reset() { *m = TrustedCounterParty{} } +func (m *TrustedCounterParty) String() string { return proto.CompactTextString(m) } +func (*TrustedCounterParty) ProtoMessage() {} +func (*TrustedCounterParty) Descriptor() ([]byte, []int) { + return fileDescriptor_9a32cf7d58c7a431, []int{1} +} +func (m *TrustedCounterParty) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TrustedCounterParty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TrustedCounterParty.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 *TrustedCounterParty) XXX_Merge(src proto.Message) { + xxx_messageInfo_TrustedCounterParty.Merge(m, src) +} +func (m *TrustedCounterParty) XXX_Size() int { + return m.Size() +} +func (m *TrustedCounterParty) XXX_DiscardUnknown() { + xxx_messageInfo_TrustedCounterParty.DiscardUnknown(m) +} + +var xxx_messageInfo_TrustedCounterParty proto.InternalMessageInfo + +func (m *TrustedCounterParty) GetClientId() string { + if m != nil { + return m.ClientId + } + return "" +} + +func (m *TrustedCounterParty) GetConnectionId() string { + if m != nil { + return m.ConnectionId + } + return "" +} + +func (m *TrustedCounterParty) GetChannelId() string { + if m != nil { + return m.ChannelId + } + return "" +} + func init() { proto.RegisterType((*Params)(nil), "fairyring.pep.Params") + proto.RegisterType((*TrustedCounterParty)(nil), "fairyring.pep.TrustedCounterParty") } func init() { proto.RegisterFile("fairyring/pep/params.proto", fileDescriptor_9a32cf7d58c7a431) } var fileDescriptor_9a32cf7d58c7a431 = []byte{ - // 131 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0x4b, 0xcc, 0x2c, - 0xaa, 0x2c, 0xca, 0xcc, 0x4b, 0xd7, 0x2f, 0x48, 0x2d, 0xd0, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x85, 0xcb, 0xe9, 0x15, 0xa4, 0x16, 0x48, 0x89, - 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf4, 0x41, 0x2c, 0x88, 0x22, 0x25, 0x3e, 0x2e, 0xb6, 0x00, - 0xb0, 0x26, 0x2b, 0x96, 0x19, 0x0b, 0xe4, 0x19, 0x9c, 0xf4, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, - 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, - 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x14, 0x61, 0x55, 0x05, 0xd8, 0xb2, 0x92, 0xca, 0x82, 0xd4, 0xe2, - 0x24, 0x36, 0xb0, 0x39, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xd1, 0xc8, 0xaf, 0x8a, - 0x00, 0x00, 0x00, + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xc1, 0x4e, 0x2a, 0x31, + 0x18, 0x85, 0xa7, 0x40, 0xc8, 0x9d, 0x72, 0x49, 0xee, 0x9d, 0x7b, 0x89, 0x23, 0xc6, 0x71, 0x82, + 0x9b, 0x49, 0x4c, 0x3a, 0x01, 0x77, 0xba, 0x52, 0x16, 0x86, 0x1d, 0x99, 0xb8, 0x62, 0x43, 0x4a, + 0xe7, 0x17, 0x9b, 0x40, 0xdb, 0xb4, 0x85, 0xc8, 0x5b, 0xb8, 0x74, 0xe9, 0xe3, 0xb8, 0x64, 0xe9, + 0xd2, 0xc0, 0x23, 0xf8, 0x02, 0x66, 0x66, 0x40, 0x34, 0x9a, 0xb8, 0x6b, 0xce, 0xf9, 0xd2, 0xf3, + 0x9f, 0x1c, 0xdc, 0xbc, 0xa1, 0x5c, 0x2f, 0x34, 0x17, 0xe3, 0x58, 0x81, 0x8a, 0x15, 0xd5, 0x74, + 0x6a, 0x88, 0xd2, 0xd2, 0x4a, 0xaf, 0xfe, 0xee, 0x11, 0x05, 0xaa, 0xf9, 0x7f, 0x2c, 0xc7, 0x32, + 0x77, 0xe2, 0xec, 0x55, 0x40, 0xcd, 0x80, 0x49, 0x33, 0x95, 0x26, 0x1e, 0x51, 0x03, 0xf1, 0xbc, + 0x3d, 0x02, 0x4b, 0xdb, 0x31, 0x93, 0x5c, 0x14, 0x7e, 0xeb, 0x15, 0xe1, 0x6a, 0x3f, 0xff, 0xd5, + 0x1b, 0xe0, 0x3d, 0xab, 0x67, 0xc6, 0x42, 0x3a, 0x64, 0x72, 0x26, 0x2c, 0xe8, 0xa1, 0xa2, 0xda, + 0x72, 0x30, 0x3e, 0x0a, 0xcb, 0x51, 0xad, 0xd3, 0x22, 0x9f, 0x12, 0xc9, 0x75, 0x41, 0x77, 0x0b, + 0xb8, 0x4f, 0xb5, 0x5d, 0x24, 0x0d, 0xfb, 0x45, 0xe4, 0x60, 0xbc, 0x13, 0xfc, 0x77, 0xfb, 0x37, + 0x4d, 0x53, 0x0d, 0xc6, 0x80, 0xf1, 0x4b, 0x61, 0x39, 0x72, 0x93, 0x3f, 0x1b, 0xe3, 0x62, 0xab, + 0x7b, 0x87, 0x18, 0xb3, 0x5b, 0x2a, 0x04, 0x4c, 0x86, 0x3c, 0xf5, 0xcb, 0x21, 0x8a, 0xdc, 0xc4, + 0xdd, 0x28, 0xbd, 0xd4, 0x3b, 0xc7, 0xb5, 0x29, 0x17, 0x57, 0xd4, 0xf4, 0x35, 0x67, 0xe0, 0x57, + 0x42, 0x14, 0xd5, 0x3a, 0xfb, 0xa4, 0x28, 0x4a, 0xb2, 0xa2, 0x64, 0x53, 0x94, 0x74, 0x25, 0x17, + 0xc9, 0x47, 0xfa, 0xac, 0xf2, 0xf0, 0x78, 0xe4, 0xb4, 0xe6, 0xf8, 0xdf, 0x37, 0xc7, 0x7b, 0x07, + 0xd8, 0x65, 0x13, 0x0e, 0xc2, 0x66, 0xb9, 0x28, 0xcf, 0xfd, 0x55, 0x08, 0xbd, 0xd4, 0x3b, 0xc6, + 0x75, 0x26, 0x85, 0x00, 0x66, 0xb9, 0x14, 0x19, 0x50, 0xca, 0x81, 0xdf, 0x3b, 0xb1, 0x97, 0xfe, + 0x70, 0xfa, 0x65, 0xfc, 0xb4, 0x0a, 0xd0, 0x72, 0x15, 0xa0, 0x97, 0x55, 0x80, 0xee, 0xd7, 0x81, + 0xb3, 0x5c, 0x07, 0xce, 0xf3, 0x3a, 0x70, 0x06, 0x8d, 0xdd, 0xd0, 0x77, 0xf9, 0xd4, 0x76, 0xa1, + 0xc0, 0x8c, 0xaa, 0xf9, 0x4a, 0xa7, 0x6f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x45, 0xbc, 0x8c, 0x68, + 0x08, 0x02, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -98,6 +206,92 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MinGasPrice != nil { + { + size, err := m.MinGasPrice.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintParams(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x1a + } + if len(m.TrustedAddresses) > 0 { + for iNdEx := len(m.TrustedAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TrustedAddresses[iNdEx]) + copy(dAtA[i:], m.TrustedAddresses[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.TrustedAddresses[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.TrustedCounterParties) > 0 { + for iNdEx := len(m.TrustedCounterParties) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TrustedCounterParties[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *TrustedCounterParty) 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 *TrustedCounterParty) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TrustedCounterParty) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChannelId) > 0 { + i -= len(m.ChannelId) + copy(dAtA[i:], m.ChannelId) + i = encodeVarintParams(dAtA, i, uint64(len(m.ChannelId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ConnectionId) > 0 { + i -= len(m.ConnectionId) + copy(dAtA[i:], m.ConnectionId) + i = encodeVarintParams(dAtA, i, uint64(len(m.ConnectionId))) + i-- + dAtA[i] = 0x12 + } + if len(m.ClientId) > 0 { + i -= len(m.ClientId) + copy(dAtA[i:], m.ClientId) + i = encodeVarintParams(dAtA, i, uint64(len(m.ClientId))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -118,6 +312,47 @@ func (m *Params) Size() (n int) { } var l int _ = l + if len(m.TrustedCounterParties) > 0 { + for _, e := range m.TrustedCounterParties { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } + } + if len(m.TrustedAddresses) > 0 { + for _, s := range m.TrustedAddresses { + l = len(s) + n += 1 + l + sovParams(uint64(l)) + } + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + if m.MinGasPrice != nil { + l = m.MinGasPrice.Size() + n += 1 + l + sovParams(uint64(l)) + } + return n +} + +func (m *TrustedCounterParty) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + l = len(m.ConnectionId) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } + l = len(m.ChannelId) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) + } return n } @@ -156,6 +391,286 @@ func (m *Params) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrustedCounterParties", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TrustedCounterParties = append(m.TrustedCounterParties, &TrustedCounterParty{}) + if err := m.TrustedCounterParties[len(m.TrustedCounterParties)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrustedAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TrustedAddresses = append(m.TrustedAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinGasPrice", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinGasPrice == nil { + m.MinGasPrice = &types.Coin{} + } + if err := m.MinGasPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrustedCounterParty) 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 ErrIntOverflowParams + } + 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: TrustedCounterParty: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrustedCounterParty: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConnectionId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) diff --git a/x/pep/types/pep_nonce.pb.go b/x/pep/types/pep_nonce.pb.go index cd3d1b23..e117d888 100644 --- a/x/pep/types/pep_nonce.pb.go +++ b/x/pep/types/pep_nonce.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/pep/types/pub_key.pb.go b/x/pep/types/pub_key.pb.go index 22d79d51..e0757a61 100644 --- a/x/pep/types/pub_key.pb.go +++ b/x/pep/types/pub_key.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" diff --git a/x/pep/types/query.pb.go b/x/pep/types/query.pb.go index 1582802f..1e5e67d5 100644 --- a/x/pep/types/query.pb.go +++ b/x/pep/types/query.pb.go @@ -7,9 +7,9 @@ import ( context "context" fmt "fmt" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" diff --git a/x/pep/types/tx.pb.go b/x/pep/types/tx.pb.go index 6dfd5126..ce00806b 100644 --- a/x/pep/types/tx.pb.go +++ b/x/pep/types/tx.pb.go @@ -6,8 +6,8 @@ package types import ( context "context" fmt "fmt" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status"