From 7aa6db910325aabb527b66fe32e56916e1c42395 Mon Sep 17 00:00:00 2001 From: Marius Poke Date: Thu, 29 Aug 2024 10:46:49 +0200 Subject: [PATCH] feat!: migrations for permissionless (#2174) * migrations for permissionless -- wip * feat!: migrations for permissionless (#2177) * initial commit * took into account comments * removed deprecated queries * fix error due to rebase * remove fields from provider genesis * remove commented code --------- Co-authored-by: insumity --- .../ccv/provider/v1/genesis.proto | 12 +- .../ccv/provider/v1/query.proto | 49 - x/ccv/provider/client/cli/query.go | 92 - x/ccv/provider/keeper/genesis.go | 13 +- x/ccv/provider/keeper/genesis_test.go | 12 - x/ccv/provider/keeper/grpc_query.go | 47 - x/ccv/provider/keeper/hooks.go | 89 - x/ccv/provider/keeper/keeper.go | 76 +- x/ccv/provider/keeper/keeper_test.go | 95 - x/ccv/provider/keeper/key_assignment.go | 18 +- x/ccv/provider/keeper/legacy_proposal.go | 24 - x/ccv/provider/keeper/legacy_proposal_test.go | 150 -- x/ccv/provider/keeper/partial_set_security.go | 23 +- .../keeper/partial_set_security_test.go | 2 - x/ccv/provider/keeper/proposal.go | 212 --- x/ccv/provider/keeper/proposal_test.go | 196 +- x/ccv/provider/keeper/validator_set_update.go | 2 +- x/ccv/provider/migrations/migrator.go | 3 + x/ccv/provider/migrations/v8/migrations.go | 285 ++- .../provider/migrations/v8/migrations_test.go | 4 +- x/ccv/provider/module_test.go | 2 - x/ccv/provider/types/genesis.go | 30 +- x/ccv/provider/types/genesis.pb.go | 225 +-- x/ccv/provider/types/genesis_test.go | 40 - x/ccv/provider/types/keys.go | 266 +-- x/ccv/provider/types/keys_test.go | 216 +-- x/ccv/provider/types/query.pb.go | 1690 ++--------------- x/ccv/provider/types/query.pb.gw.go | 195 -- 28 files changed, 746 insertions(+), 3322 deletions(-) delete mode 100644 x/ccv/provider/keeper/legacy_proposal_test.go diff --git a/proto/interchain_security/ccv/provider/v1/genesis.proto b/proto/interchain_security/ccv/provider/v1/genesis.proto index 34c0daf633..8a8a3e4cb8 100644 --- a/proto/interchain_security/ccv/provider/v1/genesis.proto +++ b/proto/interchain_security/ccv/provider/v1/genesis.proto @@ -17,6 +17,12 @@ message GenesisState { // Reserve 4th slot for removed mature_unbonding_ops field reserved 4; + // Reserve 6th slot for removed consumer_addition_proposals field + reserved 6; + + // Reserve 7th slot for removed consumer_removal_proposals field + reserved 7; + // Reserve 11th slot for consumer_addrs_to_prune field reserved 11; @@ -36,12 +42,6 @@ message GenesisState { // empty for a new chain repeated ValsetUpdateIdToHeight valset_update_id_to_height = 5 [ (gogoproto.nullable) = false ]; - // empty for a new chain - repeated ConsumerAdditionProposal consumer_addition_proposals = 6 - [ (gogoproto.nullable) = false ]; - // empty for a new chain - repeated ConsumerRemovalProposal consumer_removal_proposals = 7 - [ (gogoproto.nullable) = false ]; Params params = 8 [ (gogoproto.nullable) = false ]; // empty for a new chain repeated ValidatorConsumerPubKey validator_consumer_pubkeys = 9 diff --git a/proto/interchain_security/ccv/provider/v1/query.proto b/proto/interchain_security/ccv/provider/v1/query.proto index ddd7805c75..51d49d1313 100644 --- a/proto/interchain_security/ccv/provider/v1/query.proto +++ b/proto/interchain_security/ccv/provider/v1/query.proto @@ -35,20 +35,6 @@ service Query { "/interchain_security/ccv/provider/consumer_chains"; } - // QueryConsumerChainStarts queries consumer chain start proposals. - rpc QueryConsumerChainStarts(QueryConsumerChainStartProposalsRequest) - returns (QueryConsumerChainStartProposalsResponse) { - option (google.api.http).get = - "/interchain_security/ccv/provider/consumer_chain_start_proposals"; - } - - // QueryConsumerChainStops queries consumer chain stop proposals. - rpc QueryConsumerChainStops(QueryConsumerChainStopProposalsRequest) - returns (QueryConsumerChainStopProposalsResponse) { - option (google.api.http).get = - "/interchain_security/ccv/provider/consumer_chain_stop_proposals"; - } - // QueryValidatorConsumerAddr queries the address // assigned by a validator for a consumer chain. rpc QueryValidatorConsumerAddr(QueryValidatorConsumerAddrRequest) @@ -82,15 +68,6 @@ service Query { "/interchain_security/ccv/provider/registered_consumer_reward_denoms"; } - // QueryProposedConsumerChainIDs returns the chain IDs of the proposed consumer chain addition proposals - // that are still in the voting period - rpc QueryProposedConsumerChainIDs( - QueryProposedChainIDsRequest) - returns (QueryProposedChainIDsResponse) { - option (google.api.http).get = - "/interchain_security/ccv/provider/proposed_consumer_chains"; - } - // QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address // between provider and consumer chain rpc QueryAllPairsValConAddrByConsumerChainID ( @@ -210,18 +187,6 @@ message QueryConsumerChainsRequest { message QueryConsumerChainsResponse { repeated Chain chains = 1; } -message QueryConsumerChainStartProposalsRequest {} - -message QueryConsumerChainStartProposalsResponse { - ConsumerAdditionProposals proposals = 1; -} - -message QueryConsumerChainStopProposalsRequest {} - -message QueryConsumerChainStopProposalsResponse { - ConsumerRemovalProposals proposals = 1; -} - message Chain { string chain_id = 1; string client_id = 2; @@ -302,20 +267,6 @@ message QueryRegisteredConsumerRewardDenomsResponse { repeated string denoms = 1; } -message QueryProposedChainIDsRequest {} - -message QueryProposedChainIDsResponse { - repeated ProposedChain proposedChains = 1 - [ (gogoproto.nullable) = false ]; -} - -message ProposedChain { - // [DEPRECATED] use `consumer_id` instead - string chainID = 1 [deprecated = true]; - uint64 proposalID = 2; - string consumer_id = 3; -} - message QueryAllPairsValConAddrByConsumerChainIDRequest { // [DEPRECATED] use `consumer_id` instead string chain_id = 1 [deprecated = true]; diff --git a/x/ccv/provider/client/cli/query.go b/x/ccv/provider/client/cli/query.go index 53f81a90bf..fd5d5d7762 100644 --- a/x/ccv/provider/client/cli/query.go +++ b/x/ccv/provider/client/cli/query.go @@ -27,13 +27,10 @@ func NewQueryCmd() *cobra.Command { cmd.AddCommand(CmdConsumerGenesis()) cmd.AddCommand(CmdConsumerChains()) - cmd.AddCommand(CmdConsumerStartProposals()) - cmd.AddCommand(CmdConsumerStopProposals()) cmd.AddCommand(CmdConsumerValidatorKeyAssignment()) cmd.AddCommand(CmdProviderValidatorKey()) cmd.AddCommand(CmdThrottleState()) cmd.AddCommand(CmdRegisteredConsumerRewardDenoms()) - cmd.AddCommand(CmdProposedConsumerChains()) cmd.AddCommand(CmdAllPairsValConAddrByConsumerChainID()) cmd.AddCommand(CmdProviderParameters()) cmd.AddCommand(CmdConsumerChainOptedInValidators()) @@ -121,95 +118,6 @@ func CmdConsumerChains() *cobra.Command { return cmd } -func CmdProposedConsumerChains() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-proposed-consumer-chains", - Short: "Query chainIDs in consumer addition proposal before voting finishes", - Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - req := &types.QueryProposedChainIDsRequest{} - res, err := queryClient.QueryProposedConsumerChainIDs(cmd.Context(), req) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdConsumerStartProposals() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-start-proposals", - Short: "Query consumer chains start proposals on provider chain.", - Long: `Query mature and pending consumer chains start proposals on provider chain. - Matured proposals will be executed on the next block - their spawn_time has passed - Pending proposals are waiting for their spawn_time to pass. - `, - Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - req := &types.QueryConsumerChainStartProposalsRequest{} - res, err := queryClient.QueryConsumerChainStarts(cmd.Context(), req) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdConsumerStopProposals() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-stop-proposals", - Short: "Query consumer chains stop proposals on provider chain.", - Long: `Query mature and pending consumer chains stop proposals on provider chain. - Matured proposals will be executed on the next block - their stop_time has passed - Pending proposals are waiting for their stop_time to pass. - `, - Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - req := &types.QueryConsumerChainStopProposalsRequest{} - res, err := queryClient.QueryConsumerChainStops(cmd.Context(), req) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - // TODO: fix naming func CmdConsumerValidatorKeyAssignment() *cobra.Command { bech32PrefixConsAddr := sdk.GetConfig().GetBech32ConsensusAddrPrefix() diff --git a/x/ccv/provider/keeper/genesis.go b/x/ccv/provider/keeper/genesis.go index 0c01cef1e9..127b15c65a 100644 --- a/x/ccv/provider/keeper/genesis.go +++ b/x/ccv/provider/keeper/genesis.go @@ -32,16 +32,6 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState) []abc k.SetValsetUpdateBlockHeight(ctx, v2h.ValsetUpdateId, v2h.Height) } - for _, prop := range genState.ConsumerAdditionProposals { - // prevent implicit memory aliasing - p := prop - k.SetPendingConsumerAdditionProp(ctx, &p) - } - for _, prop := range genState.ConsumerRemovalProposals { - p := prop - k.SetPendingConsumerRemovalProp(ctx, &p) - } - // Set initial state for each consumer chain for _, cs := range genState.ConsumerStates { chainID := cs.ChainId @@ -173,12 +163,11 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { params := k.GetParams(ctx) + // TODO (PERMISSIONLESS) return types.NewGenesisState( k.GetValidatorSetUpdateId(ctx), k.GetAllValsetUpdateBlockHeights(ctx), consumerStates, - k.GetAllPendingConsumerAdditionProps(ctx), - k.GetAllPendingConsumerRemovalProps(ctx), params, k.GetAllValidatorConsumerPubKeys(ctx, nil), k.GetAllValidatorsByConsumerAddr(ctx, nil), diff --git a/x/ccv/provider/keeper/genesis_test.go b/x/ccv/provider/keeper/genesis_test.go index 8f305f1197..3f3ec2d240 100644 --- a/x/ccv/provider/keeper/genesis_test.go +++ b/x/ccv/provider/keeper/genesis_test.go @@ -62,14 +62,6 @@ func TestInitAndExportGenesis(t *testing.T) { nil, ), }, - []providertypes.ConsumerAdditionProposal{{ - ChainId: cChainIDs[0], - SpawnTime: oneHourFromNow, - }}, - []providertypes.ConsumerRemovalProposal{{ - ChainId: cChainIDs[0], - StopTime: oneHourFromNow, - }}, params, []providertypes.ValidatorConsumerPubKey{ { @@ -139,10 +131,6 @@ func TestInitAndExportGenesis(t *testing.T) { height, found := pk.GetValsetUpdateBlockHeight(ctx, vscID) require.True(t, found) require.Equal(t, initHeight, height) - addProp, found := pk.GetPendingConsumerAdditionProp(ctx, oneHourFromNow, cChainIDs[0]) - require.True(t, found) - require.Equal(t, provGenesis.ConsumerAdditionProposals[0], addProp) - require.True(t, pk.PendingConsumerRemovalPropExists(ctx, cChainIDs[0], oneHourFromNow)) require.Equal(t, provGenesis.Params, pk.GetParams(ctx)) providerConsensusValSet, err := pk.GetLastProviderConsensusValSet(ctx) diff --git a/x/ccv/provider/keeper/grpc_query.go b/x/ccv/provider/keeper/grpc_query.go index 855f66fe5e..d782d650f5 100644 --- a/x/ccv/provider/keeper/grpc_query.go +++ b/x/ccv/provider/keeper/grpc_query.go @@ -160,39 +160,6 @@ func (k Keeper) GetConsumerChain(ctx sdk.Context, consumerId string) (types.Chai }, nil } -func (k Keeper) QueryConsumerChainStarts(goCtx context.Context, req *types.QueryConsumerChainStartProposalsRequest) (*types.QueryConsumerChainStartProposalsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - ctx := sdk.UnwrapSDKContext(goCtx) - var props []*types.ConsumerAdditionProposal - - for _, prop := range k.GetAllPendingConsumerAdditionProps(ctx) { - // prevent implicit memory aliasing - p := prop - props = append(props, &p) - } - - return &types.QueryConsumerChainStartProposalsResponse{Proposals: &types.ConsumerAdditionProposals{Pending: props}}, nil -} - -func (k Keeper) QueryConsumerChainStops(goCtx context.Context, req *types.QueryConsumerChainStopProposalsRequest) (*types.QueryConsumerChainStopProposalsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - ctx := sdk.UnwrapSDKContext(goCtx) - var props []*types.ConsumerRemovalProposal - for _, prop := range k.GetAllPendingConsumerRemovalProps(ctx) { - // prevent implicit memory aliasing - p := prop - props = append(props, &p) - } - - return &types.QueryConsumerChainStopProposalsResponse{Proposals: &types.ConsumerRemovalProposals{Pending: props}}, nil -} - func (k Keeper) QueryValidatorConsumerAddr(goCtx context.Context, req *types.QueryValidatorConsumerAddrRequest) (*types.QueryValidatorConsumerAddrResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") @@ -285,20 +252,6 @@ func (k Keeper) QueryRegisteredConsumerRewardDenoms(goCtx context.Context, req * }, nil } -func (k Keeper) QueryProposedConsumerChainIDs(goCtx context.Context, req *types.QueryProposedChainIDsRequest) (*types.QueryProposedChainIDsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - ctx := sdk.UnwrapSDKContext(goCtx) - - chains := k.GetAllProposedConsumerChainIDs(ctx) - - return &types.QueryProposedChainIDsResponse{ - ProposedChains: chains, - }, nil -} - func (k Keeper) QueryAllPairsValConAddrByConsumerChainID(goCtx context.Context, req *types.QueryAllPairsValConAddrByConsumerChainIDRequest) (*types.QueryAllPairsValConAddrByConsumerChainIDResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") diff --git a/x/ccv/provider/keeper/hooks.go b/x/ccv/provider/keeper/hooks.go index ffb1b46c15..f61facac50 100644 --- a/x/ccv/provider/keeper/hooks.go +++ b/x/ccv/provider/keeper/hooks.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "fmt" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -106,52 +105,11 @@ func (h Hooks) BeforeTokenizeShareRecordRemoved(_ context.Context, _ uint64) err // gov hooks // -// AfterProposalSubmission - call hook if registered -// If an update consumer message exists in the proposal, a record is created that maps the proposal id to the consumer id func (h Hooks) AfterProposalSubmission(goCtx context.Context, proposalId uint64) error { - ctx := sdk.UnwrapSDKContext(goCtx) - - p, err := h.k.govKeeper.Proposals.Get(ctx, proposalId) - if err != nil { - return fmt.Errorf("cannot retrieve proposal with id: %d", proposalId) - } - - err = DoesNotHaveDeprecatedMessage(&p) - if err != nil { - return err - } - - msgUpdateConsumer, err := h.k.HasAtMostOnceCorrectMsgUpdateConsumer(ctx, &p) - if err != nil { - return err - } - - if msgUpdateConsumer != nil { - // a correctly set `MsgUpdateConsumer` was found - h.k.SetProposalIdToConsumerId(ctx, proposalId, msgUpdateConsumer.ConsumerId) - } - return nil } -// AfterProposalVotingPeriodEnded - call hook if registered -// After proposal voting ends, the consumer to proposal id record in store is deleted. func (h Hooks) AfterProposalVotingPeriodEnded(goCtx context.Context, proposalId uint64) error { - ctx := sdk.UnwrapSDKContext(goCtx) - - p, err := h.k.govKeeper.Proposals.Get(ctx, proposalId) - if err != nil { - return fmt.Errorf("cannot retrieve proposal with id: %d", proposalId) - } - - for _, msg := range p.GetMessages() { - _, isUpdateConsumer := msg.GetCachedValue().(*providertypes.MsgUpdateConsumer) - if isUpdateConsumer { - h.k.DeleteProposalIdToConsumerId(ctx, proposalId) - return nil - } - } - return nil } @@ -166,50 +124,3 @@ func (h Hooks) AfterProposalVote(ctx context.Context, proposalID uint64, voterAd func (h Hooks) AfterProposalFailedMinDeposit(ctx context.Context, proposalID uint64) error { return nil } - -// GetConsumerAdditionFromProp extracts a consumer addition proposal from -// the proposal with the given ID -func (h Hooks) GetConsumerAdditionFromProp( - ctx sdk.Context, - proposalID uint64, -) (providertypes.ConsumerAdditionProposal, bool) { - p, err := h.k.govKeeper.Proposals.Get(ctx, proposalID) - if err != nil { - return providertypes.ConsumerAdditionProposal{}, false - } - - // Iterate over the messages in the proposal - // Note that it's assumed that at most ONE message can contain a consumer addition proposal - for _, msg := range p.GetMessages() { - sdkMsg, isConsumerAddition := msg.GetCachedValue().(*providertypes.MsgConsumerAddition) - if !isConsumerAddition { - continue - } - - proposal := providertypes.ConsumerAdditionProposal{ - Title: p.Title, - Description: p.Summary, - ChainId: sdkMsg.ChainId, - InitialHeight: sdkMsg.InitialHeight, - GenesisHash: sdkMsg.GenesisHash, - BinaryHash: sdkMsg.BinaryHash, - SpawnTime: sdkMsg.SpawnTime, - UnbondingPeriod: sdkMsg.UnbondingPeriod, - CcvTimeoutPeriod: sdkMsg.CcvTimeoutPeriod, - TransferTimeoutPeriod: sdkMsg.TransferTimeoutPeriod, - ConsumerRedistributionFraction: sdkMsg.ConsumerRedistributionFraction, - BlocksPerDistributionTransmission: sdkMsg.BlocksPerDistributionTransmission, - HistoricalEntries: sdkMsg.HistoricalEntries, - DistributionTransmissionChannel: sdkMsg.DistributionTransmissionChannel, - Top_N: sdkMsg.Top_N, - ValidatorsPowerCap: sdkMsg.ValidatorsPowerCap, - ValidatorSetCap: sdkMsg.ValidatorSetCap, - Allowlist: sdkMsg.Allowlist, - Denylist: sdkMsg.Denylist, - MinStake: sdkMsg.MinStake, - AllowInactiveVals: sdkMsg.AllowInactiveVals, - } - return proposal, true - } - return providertypes.ConsumerAdditionProposal{}, false -} diff --git a/x/ccv/provider/keeper/keeper.go b/x/ccv/provider/keeper/keeper.go index 318fb7c90c..93469af316 100644 --- a/x/ccv/provider/keeper/keeper.go +++ b/x/ccv/provider/keeper/keeper.go @@ -211,64 +211,6 @@ func (k Keeper) DeleteConsumerIdToChannelId(ctx sdk.Context, consumerId string) store.Delete(types.ConsumerIdToChannelIdKey(consumerId)) } -// SetProposalIdToConsumerId stores a consumer id corresponding to a proposal that contains a `MsgUpdateConsumer` mesage. -// This consumer id is deleted once the voting period for the proposal ends. -func (k Keeper) SetProposalIdToConsumerId(ctx sdk.Context, proposalId uint64, consumerId string) { - store := ctx.KVStore(k.storeKey) - store.Set(types.ProposedConsumerChainKey(proposalId), []byte(consumerId)) -} - -// GetProposalIdToConsumerId returns the proposed consumer id for the given proposal id. -// This method is only used for testing. -func (k Keeper) GetProposalIdToConsumerId(ctx sdk.Context, proposalId uint64) (string, bool) { - store := ctx.KVStore(k.storeKey) - consumerChain := store.Get(types.ProposedConsumerChainKey(proposalId)) - if consumerChain != nil { - return string(consumerChain), true - } - return "", false -} - -// DeleteProposalIdToConsumerId deletes the proposal to consumer id record from store -func (k Keeper) DeleteProposalIdToConsumerId(ctx sdk.Context, proposalId uint64) { - store := ctx.KVStore(k.storeKey) - store.Delete(types.ProposedConsumerChainKey(proposalId)) -} - -// GetAllProposedConsumerChainIDs returns the proposed consumer ids of all gov proposals that are still in the voting period -func (k Keeper) GetAllProposedConsumerChainIDs(ctx sdk.Context) []types.ProposedChain { - store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, types.ProposedConsumerChainKeyPrefix()) - defer iterator.Close() - - proposedChains := []types.ProposedChain{} - for ; iterator.Valid(); iterator.Next() { - proposalID, err := types.ParseProposedConsumerChainKey(iterator.Key()) - if err != nil { - panic(fmt.Errorf("proposed chains cannot be parsed: %w", err)) - } - - proposedChains = append(proposedChains, types.ProposedChain{ - ConsumerId: string(iterator.Value()), - ProposalID: proposalID, - }) - - } - - return proposedChains -} - -// GetAllPendingConsumerChainIDs gets pending consumer chains have not reach spawn time -func (k Keeper) GetAllPendingConsumerChainIDs(ctx sdk.Context) []string { - chainIDs := []string{} - props := k.GetAllPendingConsumerAdditionProps(ctx) - for _, prop := range props { - chainIDs = append(chainIDs, prop.ChainId) - } - - return chainIDs -} - // GetAllRegisteredConsumerIds gets all of the consumer chain IDs, for which the provider module // created IBC clients. Consumer chains with created clients are also referred to as registered. // @@ -820,7 +762,7 @@ func (k Keeper) GetAllOptedIn( consumerId string, ) (providerConsAddresses []types.ProviderConsAddress) { store := ctx.KVStore(k.storeKey) - key := types.ConsumerIdWithLenKey(types.OptedInKeyPrefix(), consumerId) + key := types.StringIdWithLenKey(types.OptedInKeyPrefix(), consumerId) iterator := storetypes.KVStorePrefixIterator(store, key) defer iterator.Close() @@ -837,7 +779,7 @@ func (k Keeper) DeleteAllOptedIn( consumerId string, ) { store := ctx.KVStore(k.storeKey) - key := types.ConsumerIdWithLenKey(types.OptedInKeyPrefix(), consumerId) + key := types.StringIdWithLenKey(types.OptedInKeyPrefix(), consumerId) iterator := storetypes.KVStorePrefixIterator(store, key) var keysToDel [][]byte @@ -900,7 +842,7 @@ func (k Keeper) GetAllCommissionRateValidators( consumerId string, ) (addresses []types.ProviderConsAddress) { store := ctx.KVStore(k.storeKey) - key := types.ConsumerIdWithLenKey(types.ConsumerCommissionRateKeyPrefix(), consumerId) + key := types.StringIdWithLenKey(types.ConsumerCommissionRateKeyPrefix(), consumerId) iterator := storetypes.KVStorePrefixIterator(store, key) defer iterator.Close() @@ -963,7 +905,7 @@ func (k Keeper) GetAllowList( consumerId string, ) (providerConsAddresses []types.ProviderConsAddress) { store := ctx.KVStore(k.storeKey) - key := types.ConsumerIdWithLenKey(types.AllowlistKeyPrefix(), consumerId) + key := types.StringIdWithLenKey(types.AllowlistKeyPrefix(), consumerId) iterator := storetypes.KVStorePrefixIterator(store, key) defer iterator.Close() @@ -988,7 +930,7 @@ func (k Keeper) IsAllowlisted( // DeleteAllowlist deletes all allowlisted validators func (k Keeper) DeleteAllowlist(ctx sdk.Context, consumerId string) { store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, types.ConsumerIdWithLenKey(types.AllowlistKeyPrefix(), consumerId)) + iterator := storetypes.KVStorePrefixIterator(store, types.StringIdWithLenKey(types.AllowlistKeyPrefix(), consumerId)) defer iterator.Close() keysToDel := [][]byte{} @@ -1004,7 +946,7 @@ func (k Keeper) DeleteAllowlist(ctx sdk.Context, consumerId string) { // IsAllowlistEmpty returns `true` if no validator is allowlisted on chain `consumerId` func (k Keeper) IsAllowlistEmpty(ctx sdk.Context, consumerId string) bool { store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, types.ConsumerIdWithLenKey(types.AllowlistKeyPrefix(), consumerId)) + iterator := storetypes.KVStorePrefixIterator(store, types.StringIdWithLenKey(types.AllowlistKeyPrefix(), consumerId)) defer iterator.Close() return !iterator.Valid() @@ -1026,7 +968,7 @@ func (k Keeper) GetDenyList( consumerId string, ) (providerConsAddresses []types.ProviderConsAddress) { store := ctx.KVStore(k.storeKey) - key := types.ConsumerIdWithLenKey(types.DenylistKeyPrefix(), consumerId) + key := types.StringIdWithLenKey(types.DenylistKeyPrefix(), consumerId) iterator := storetypes.KVStorePrefixIterator(store, key) defer iterator.Close() @@ -1051,7 +993,7 @@ func (k Keeper) IsDenylisted( // DeleteDenylist deletes all denylisted validators func (k Keeper) DeleteDenylist(ctx sdk.Context, consumerId string) { store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, types.ConsumerIdWithLenKey(types.DenylistKeyPrefix(), consumerId)) + iterator := storetypes.KVStorePrefixIterator(store, types.StringIdWithLenKey(types.DenylistKeyPrefix(), consumerId)) defer iterator.Close() keysToDel := [][]byte{} @@ -1067,7 +1009,7 @@ func (k Keeper) DeleteDenylist(ctx sdk.Context, consumerId string) { // IsDenylistEmpty returns `true` if no validator is denylisted on chain `consumerId` func (k Keeper) IsDenylistEmpty(ctx sdk.Context, consumerId string) bool { store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, types.ConsumerIdWithLenKey(types.DenylistKeyPrefix(), consumerId)) + iterator := storetypes.KVStorePrefixIterator(store, types.StringIdWithLenKey(types.DenylistKeyPrefix(), consumerId)) defer iterator.Close() return !iterator.Valid() diff --git a/x/ccv/provider/keeper/keeper_test.go b/x/ccv/provider/keeper/keeper_test.go index d781164e5b..b9b8294955 100644 --- a/x/ccv/provider/keeper/keeper_test.go +++ b/x/ccv/provider/keeper/keeper_test.go @@ -284,101 +284,6 @@ func TestSetSlashLog(t *testing.T) { require.False(t, providerKeeper.GetSlashLog(ctx, addrWithoutDoubleSigns)) } -func TestSetProposedConsumerChains(t *testing.T) { - providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) - defer ctrl.Finish() - - tests := []struct { - consumerId string - proposalId uint64 - }{ - {consumerId: "1", proposalId: 1}, - {consumerId: "some other ID", proposalId: 12}, - {consumerId: "some other other chain ID", proposalId: 123}, - {consumerId: "", proposalId: 1234}, - } - - for _, test := range tests { - providerKeeper.SetProposalIdToConsumerId(ctx, test.proposalId, test.consumerId) - cID, _ := providerKeeper.GetProposalIdToConsumerId(ctx, test.proposalId) - require.Equal(t, cID, test.consumerId) - } -} - -func TestDeleteProposedConsumerChainInStore(t *testing.T) { - providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) - defer ctrl.Finish() - - tests := []struct { - chainId string - proposalId uint64 - deleteProposalId uint64 - ok bool - }{ - {chainId: "1", proposalId: 1, deleteProposalId: 1, ok: true}, - {chainId: "", proposalId: 12, deleteProposalId: 12, ok: true}, - {chainId: "1", proposalId: 0, deleteProposalId: 1, ok: false}, - } - for _, test := range tests { - providerKeeper.SetProposalIdToConsumerId(ctx, test.proposalId, test.chainId) - providerKeeper.DeleteProposalIdToConsumerId(ctx, test.deleteProposalId) - cID, found := providerKeeper.GetProposalIdToConsumerId(ctx, test.proposalId) - if test.ok { - require.False(t, found) - } else { - require.Equal(t, cID, test.chainId) - } - } -} - -func TestGetAllProposedConsumerChainIDs(t *testing.T) { - providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) - defer ctrl.Finish() - tests := [][]types.ProposedChain{ - {}, - { - { - ConsumerId: "1", - ProposalID: 1, - }, - }, - { - { - ConsumerId: "1", - ProposalID: 1, - }, - { - ConsumerId: "2", - ProposalID: 2, - }, - { - ConsumerId: "", - ProposalID: 3, - }, - }, - } - - for _, test := range tests { - for _, tc := range test { - providerKeeper.SetProposalIdToConsumerId(ctx, tc.ProposalID, tc.ConsumerId) - } - - chains := providerKeeper.GetAllProposedConsumerChainIDs(ctx) - - sort.Slice(chains, func(i, j int) bool { - return chains[i].ProposalID < chains[j].ProposalID - }) - sort.Slice(test, func(i, j int) bool { - return test[i].ProposalID < test[j].ProposalID - }) - require.Equal(t, chains, test) - - for _, tc := range test { - providerKeeper.DeleteProposalIdToConsumerId(ctx, tc.ProposalID) - } - } -} - // TestTopN tests the `SetTopN`, `GetTopN`, `IsTopN`, and `IsOptIn` methods func TestTopN(t *testing.T) { providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) diff --git a/x/ccv/provider/keeper/key_assignment.go b/x/ccv/provider/keeper/key_assignment.go index c01a061266..d037fcd648 100644 --- a/x/ccv/provider/keeper/key_assignment.go +++ b/x/ccv/provider/keeper/key_assignment.go @@ -118,13 +118,13 @@ func (k Keeper) GetAllValidatorConsumerPubKeys(ctx sdk.Context, consumerId *stri prefix = []byte{consumerValidatorsKeyPrefix} } else { // iterate over the validators public keys assigned for consumerId - prefix = types.ConsumerIdWithLenKey(consumerValidatorsKeyPrefix, *consumerId) + prefix = types.StringIdWithLenKey(consumerValidatorsKeyPrefix, *consumerId) } iterator := storetypes.KVStorePrefixIterator(store, prefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { // TODO: store consumerId and provider cons address in value bytes, marshaled as protobuf type - consumerId, providerAddrTmp, err := types.ParseChainIdAndConsAddrKey(consumerValidatorsKeyPrefix, iterator.Key()) + consumerId, providerAddrTmp, err := types.ParseStringIdAndConsAddrKey(consumerValidatorsKeyPrefix, iterator.Key()) if err != nil { // An error here would indicate something is very wrong, // the store key is assumed to be correctly serialized in SetValidatorConsumerPubKey. @@ -203,13 +203,13 @@ func (k Keeper) GetAllValidatorsByConsumerAddr(ctx sdk.Context, consumerId *stri prefix = []byte{validatorsByConsumerAddrKeyPrefix} } else { // iterate over the mappings from consensus addresses on consumerId - prefix = types.ConsumerIdWithLenKey(validatorsByConsumerAddrKeyPrefix, *consumerId) + prefix = types.StringIdWithLenKey(validatorsByConsumerAddrKeyPrefix, *consumerId) } iterator := storetypes.KVStorePrefixIterator(store, prefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { // TODO: store consumerId and consumer cons address in value bytes, marshaled as protobuf type - consumerId, consumerAddrTmp, err := types.ParseChainIdAndConsAddrKey(validatorsByConsumerAddrKeyPrefix, iterator.Key()) + consumerId, consumerAddrTmp, err := types.ParseStringIdAndConsAddrKey(validatorsByConsumerAddrKeyPrefix, iterator.Key()) if err != nil { // An error here would indicate something is very wrong, // store keys are assumed to be correctly serialized in SetValidatorByConsumerAddr. @@ -307,7 +307,7 @@ func (k Keeper) ConsumeConsumerAddrsToPrune( ) (consumerAddrsToPrune types.AddressList) { store := ctx.KVStore(k.storeKey) consumerAddrsToPruneKeyPrefix := types.ConsumerAddrsToPruneV2KeyPrefix() - startPrefix := types.ConsumerIdWithLenKey(consumerAddrsToPruneKeyPrefix, consumerId) + startPrefix := types.StringIdWithLenKey(consumerAddrsToPruneKeyPrefix, consumerId) iterator := store.Iterator(startPrefix, storetypes.InclusiveEndBytes(types.ConsumerAddrsToPruneV2Key(consumerId, ts))) defer iterator.Close() @@ -315,10 +315,10 @@ func (k Keeper) ConsumeConsumerAddrsToPrune( var keysToDel [][]byte for ; iterator.Valid(); iterator.Next() { // Sanity check - if _, pruneTs, err := types.ParseConsumerIdAndTsKey(consumerAddrsToPruneKeyPrefix, iterator.Key()); err != nil { + if _, pruneTs, err := types.ParseStringIdAndTsKey(consumerAddrsToPruneKeyPrefix, iterator.Key()); err != nil { // An error here would indicate something is very wrong, // store keys are assumed to be correctly serialized in AppendConsumerAddrsToPrune. - k.Logger(ctx).Error("ParseConsumerIdAndTsKey failed", + k.Logger(ctx).Error("ParseStringIdAndTsKey failed", "key", string(iterator.Key()), "error", err.Error(), ) @@ -360,11 +360,11 @@ func (k Keeper) ConsumeConsumerAddrsToPrune( func (k Keeper) GetAllConsumerAddrsToPrune(ctx sdk.Context, consumerId string) (consumerAddrsToPrune []types.ConsumerAddrsToPruneV2) { store := ctx.KVStore(k.storeKey) consumerAddrsToPruneKeyPrefix := types.ConsumerAddrsToPruneV2KeyPrefix() - iteratorPrefix := types.ConsumerIdWithLenKey(consumerAddrsToPruneKeyPrefix, consumerId) + iteratorPrefix := types.StringIdWithLenKey(consumerAddrsToPruneKeyPrefix, consumerId) iterator := storetypes.KVStorePrefixIterator(store, iteratorPrefix) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - _, ts, err := types.ParseConsumerIdAndTsKey(consumerAddrsToPruneKeyPrefix, iterator.Key()) + _, ts, err := types.ParseStringIdAndTsKey(consumerAddrsToPruneKeyPrefix, iterator.Key()) if err != nil { // An error here would indicate something is very wrong, // store keys are assumed to be correctly serialized in AppendConsumerAddrsToPrune. diff --git a/x/ccv/provider/keeper/legacy_proposal.go b/x/ccv/provider/keeper/legacy_proposal.go index 074b611e47..a3e6ed2f30 100644 --- a/x/ccv/provider/keeper/legacy_proposal.go +++ b/x/ccv/provider/keeper/legacy_proposal.go @@ -33,27 +33,3 @@ func (k Keeper) HandleLegacyConsumerRewardDenomProposal(ctx sdk.Context, p *type } return nil } - -// HandleConsumerRemovalProposal stops a consumer chain and released the outstanding unbonding operations. -// If the consumer can be successfully stopped in a cached context, it stores the proposal as a pending proposal. -// -// This method implements StopConsumerChainProposalHandler from spec. -// See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-hcrprop1 -// Spec tag: [CCV-PCF-HCRPROP.1] -func (k Keeper) HandleLegacyConsumerRemovalProposal(ctx sdk.Context, p *types.ConsumerRemovalProposal) error { - // verify the consumer removal proposal execution - // in cached context and discard the cached writes - if _, _, err := k.StopConsumerChainInCachedCtx(ctx, *p); err != nil { - return err - } - - k.SetPendingConsumerRemovalProp(ctx, p) - - k.Logger(ctx).Info("consumer removal proposal enqueued", - "chain id", p.ChainId, - "title", p.Title, - "stop time", p.StopTime.UTC(), - ) - - return nil -} diff --git a/x/ccv/provider/keeper/legacy_proposal_test.go b/x/ccv/provider/keeper/legacy_proposal_test.go deleted file mode 100644 index 7f8a08d90b..0000000000 --- a/x/ccv/provider/keeper/legacy_proposal_test.go +++ /dev/null @@ -1,150 +0,0 @@ -package keeper_test - -import ( - "testing" - "time" - - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" - testkeeper "github.com/cosmos/interchain-security/v5/testutil/keeper" - providerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" - providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" -) - -// -// Initialization sub-protocol related tests of proposal.go -// - -// TestHandleConsumerRemovalProposal tests HandleConsumerRemovalProposal against its corresponding spec method. -// -// See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-hcrprop1 -// Spec tag: [CCV-PCF-HCRPROP.1] -func TestHandleLegacyConsumerRemovalProposal(t *testing.T) { - type testCase struct { - description string - setupMocks func(ctx sdk.Context, k providerkeeper.Keeper, chainID string) - - // Consumer removal proposal to handle - prop *providertypes.ConsumerRemovalProposal - // Time when prop is handled - blockTime time.Time - // Whether it's expected that the proposal is successfully verified - // and appended to the pending proposals - expAppendProp bool - - // consumerId of the consumer chain - // tests need to check that the CCV channel is not closed prematurely - chainId string - } - - // Snapshot times asserted in tests - now := time.Now().UTC() - hourAfterNow := now.Add(time.Hour).UTC() - hourBeforeNow := now.Add(-time.Hour).UTC() - - tests := []testCase{ - { - description: "valid proposal", - setupMocks: func(ctx sdk.Context, k providerkeeper.Keeper, chainID string) { - k.SetConsumerClientId(ctx, chainID, "ClientID") - }, - prop: providertypes.NewConsumerRemovalProposal( - "title", - "description", - "consumerId", - now, - ).(*providertypes.ConsumerRemovalProposal), - blockTime: hourAfterNow, // After stop time. - expAppendProp: true, - chainId: "consumerId", - }, - { - description: "valid proposal - stop_time in the past", - setupMocks: func(ctx sdk.Context, k providerkeeper.Keeper, chainID string) { - k.SetConsumerClientId(ctx, chainID, "ClientID") - }, - prop: providertypes.NewConsumerRemovalProposal( - "title", - "description", - "consumerId", - hourBeforeNow, - ).(*providertypes.ConsumerRemovalProposal), - blockTime: hourAfterNow, // After stop time. - expAppendProp: true, - chainId: "consumerId", - }, - { - description: "valid proposal - before stop_time in the future", - setupMocks: func(ctx sdk.Context, k providerkeeper.Keeper, chainID string) { - k.SetConsumerClientId(ctx, chainID, "ClientID") - }, - prop: providertypes.NewConsumerRemovalProposal( - "title", - "description", - "consumerId", - hourAfterNow, - ).(*providertypes.ConsumerRemovalProposal), - blockTime: now, - expAppendProp: true, - chainId: "consumerId", - }, - { - description: "rejected valid proposal - consumer chain does not exist", - setupMocks: func(ctx sdk.Context, k providerkeeper.Keeper, chainID string) {}, - prop: providertypes.NewConsumerRemovalProposal( - "title", - "description", - "consumerId-2", - hourAfterNow, - ).(*providertypes.ConsumerRemovalProposal), - blockTime: hourAfterNow, // After stop time. - expAppendProp: false, - chainId: "consumerId-2", - }, - } - - for _, tc := range tests { - - // Common setup - keeperParams := testkeeper.NewInMemKeeperParams(t) - providerKeeper, ctx, ctrl, mocks := testkeeper.GetProviderKeeperAndCtx(t, keeperParams) - providerKeeper.SetParams(ctx, providertypes.DefaultParams()) - ctx = ctx.WithBlockTime(tc.blockTime) - - // Mock expectations and setup for stopping the consumer chain, if applicable - // Note: when expAppendProp is false, no mocks are setup, - // meaning no external keeper methods are allowed to be called. - if tc.expAppendProp { - testkeeper.SetupForStoppingConsumerChain(t, ctx, &providerKeeper, mocks, tc.prop.ChainId) - // Valid client creation is asserted with mock expectations here - gomock.InOrder(testkeeper.GetMocksForStopConsumerChainWithCloseChannel(ctx, &mocks)...) - } - - tc.setupMocks(ctx, providerKeeper, tc.prop.ChainId) - - err := providerKeeper.HandleLegacyConsumerRemovalProposal(ctx, tc.prop) - - if tc.expAppendProp { - require.NoError(t, err) - - // Proposal should be stored as pending - found := providerKeeper.PendingConsumerRemovalPropExists(ctx, tc.prop.ChainId, tc.prop.StopTime) - require.True(t, found) - - // confirm that the channel was not closed - _, found = providerKeeper.GetConsumerIdToChannelId(ctx, tc.chainId) - require.True(t, found) - } else { - require.Error(t, err) - - // Expect no pending proposal to exist - found := providerKeeper.PendingConsumerRemovalPropExists(ctx, tc.prop.ChainId, tc.prop.StopTime) - require.False(t, found) - } - - // Assert mock calls from setup function - ctrl.Finish() - } -} diff --git a/x/ccv/provider/keeper/partial_set_security.go b/x/ccv/provider/keeper/partial_set_security.go index 2a3152a27d..eccbc5e81a 100644 --- a/x/ccv/provider/keeper/partial_set_security.go +++ b/x/ccv/provider/keeper/partial_set_security.go @@ -117,27 +117,38 @@ func (k Keeper) OptInTopNValidators(ctx sdk.Context, consumerId string, bondedVa valAddr, err := sdk.ValAddressFromBech32(val.GetOperator()) if err != nil { - k.Logger(ctx).Error("could not retrieve validator address: %s: %s", - val.GetOperator(), err) + k.Logger(ctx).Error("could not retrieve validator address from operator address", + "validator operator address", val.GetOperator(), + "error", err.Error()) continue } power, err := k.stakingKeeper.GetLastValidatorPower(ctx, valAddr) if err != nil { - k.Logger(ctx).Error("could not retrieve last power of validator address: %s: %s", - val.GetOperator(), err) + k.Logger(ctx).Error("could not retrieve last power of validator", + "validator operator address", val.GetOperator(), + "error", err.Error()) continue } if power >= minPowerToOptIn { consAddr, err := val.GetConsAddr() if err != nil { - k.Logger(ctx).Error("could not retrieve validators consensus address: %s: %s", - val, err) + k.Logger(ctx).Error("could not retrieve validator consensus address", + "validator operator address", val.GetOperator(), + "error", err.Error()) continue } k.Logger(ctx).Debug("Opting in validator", "validator", val.GetOperator()) // if validator already exists it gets overwritten + err = k.AppendOptedInConsumerId(ctx, types.NewProviderConsAddress(consAddr), consumerId) + if err != nil { + k.Logger(ctx).Error("could not append validator as opted-in validator for this consumer chain", + "validator operator address", val.GetOperator(), + "consumer id", consumerId, + "error", err.Error()) + continue + } k.SetOptedIn(ctx, consumerId, types.NewProviderConsAddress(consAddr)) } // else validators that do not belong to the top N validators but were opted in, remain opted in } diff --git a/x/ccv/provider/keeper/partial_set_security_test.go b/x/ccv/provider/keeper/partial_set_security_test.go index cbccfe7e9e..357811441f 100644 --- a/x/ccv/provider/keeper/partial_set_security_test.go +++ b/x/ccv/provider/keeper/partial_set_security_test.go @@ -81,7 +81,6 @@ func TestHandleOptInWithConsumerKey(t *testing.T) { } gomock.InOrder(calls...) - providerKeeper.SetProposalIdToConsumerId(ctx, 1, "consumerId") // create a sample consumer key to assign to the `providerAddr` validator // on the consumer chain with `consumerId` @@ -199,7 +198,6 @@ func TestHandleSetConsumerCommissionRate(t *testing.T) { consumerId := "0" providerKeeper.FetchAndIncrementConsumerId(ctx) providerKeeper.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) - providerKeeper.SetPendingConsumerAdditionProp(ctx, &types.ConsumerAdditionProposal{ChainId: consumerId}) // check that there's no commission rate set for the validator yet _, found := providerKeeper.GetConsumerCommissionRate(ctx, consumerId, providerAddr) diff --git a/x/ccv/provider/keeper/proposal.go b/x/ccv/provider/keeper/proposal.go index a175518257..03e1293645 100644 --- a/x/ccv/provider/keeper/proposal.go +++ b/x/ccv/provider/keeper/proposal.go @@ -2,7 +2,6 @@ package keeper import ( "fmt" - "time" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -12,7 +11,6 @@ import ( ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" errorsmod "cosmossdk.io/errors" - storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -295,44 +293,6 @@ func (k Keeper) MakeConsumerGenesis( return gen, hash, nil } -// SetPendingConsumerAdditionProp stores a pending consumer addition proposal. -// -// Note that the pending consumer addition proposals are stored under keys with -// the following format: PendingCAPKeyPrefix | spawnTime | consumerId -// Thus, if multiple consumer addition proposal for the same chain will pass at -// the same time, then only the last one will be stored. -func (k Keeper) SetPendingConsumerAdditionProp(ctx sdk.Context, prop *types.ConsumerAdditionProposal) { - store := ctx.KVStore(k.storeKey) - bz, err := prop.Marshal() - if err != nil { - // An error here would indicate something is very wrong - panic(fmt.Errorf("failed to marshal consumer addition proposal: %w", err)) - } - store.Set(types.PendingCAPKey(prop.SpawnTime, prop.ChainId), bz) -} - -// GetPendingConsumerAdditionProp retrieves a pending consumer addition proposal -// by spawn time and chain id. -// -// Note: this method is only used in testing -func (k Keeper) GetPendingConsumerAdditionProp(ctx sdk.Context, spawnTime time.Time, - chainID string, -) (prop types.ConsumerAdditionProposal, found bool) { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.PendingCAPKey(spawnTime, chainID)) - if bz == nil { - return prop, false - } - err := prop.Unmarshal(bz) - if err != nil { - // An error here would indicate something is very wrong, - // the ConsumerAdditionProp is assumed to be correctly serialized in SetPendingConsumerAdditionProp. - panic(fmt.Errorf("failed to unmarshal consumer addition proposal: %w", err)) - } - - return prop, true -} - // BeginBlockInit iterates over the initialized consumers chains and creates clients for chains // in which the spawn time has passed func (k Keeper) BeginBlockInit(ctx sdk.Context) { @@ -365,109 +325,6 @@ func (k Keeper) BeginBlockInit(ctx sdk.Context) { } } -// GetConsumerAdditionPropsToExecute returns the pending consumer addition proposals -// that are ready to be executed, i.e., consumer clients to be created. -// A prop is included in the returned list if its proposed spawn time has passed. -// -// Note: this method is split out from BeginBlockInit to be easily unit tested. -func (k Keeper) GetConsumerAdditionPropsToExecute(ctx sdk.Context) (propsToExecute []types.ConsumerAdditionProposal) { - store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, types.PendingCAPKeyPrefix()) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var prop types.ConsumerAdditionProposal - err := prop.Unmarshal(iterator.Value()) - if err != nil { - // An error here would indicate something is very wrong, - // the ConsumerAdditionProp is assumed to be correctly serialized in SetPendingConsumerAdditionProp. - panic(fmt.Errorf("failed to unmarshal consumer addition proposal: %w", err)) - } - - if !ctx.BlockTime().Before(prop.SpawnTime) { - propsToExecute = append(propsToExecute, prop) - } else { - break - } - } - - return propsToExecute -} - -// GetAllPendingConsumerAdditionProps gets all pending consumer addition proposals. -// -// Note that the pending consumer addition proposals are stored under keys with the following format: -// PendingCAPKeyPrefix | spawnTime.UnixNano() | consumerId -// Thus, the returned array is in spawnTime order. If two proposals have the same spawnTime, -// then they are ordered by consumerId. -func (k Keeper) GetAllPendingConsumerAdditionProps(ctx sdk.Context) (props []types.ConsumerAdditionProposal) { - store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, types.PendingCAPKeyPrefix()) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var prop types.ConsumerAdditionProposal - err := prop.Unmarshal(iterator.Value()) - if err != nil { - // An error here would indicate something is very wrong, - // the ConsumerAdditionProp is assumed to be correctly serialized in SetPendingConsumerAdditionProp. - panic(fmt.Errorf("failed to unmarshal consumer addition proposal: %w", err)) - } - - props = append(props, prop) - } - - return props -} - -// DeletePendingConsumerAdditionProps deletes the given consumer addition proposals -func (k Keeper) DeletePendingConsumerAdditionProps(ctx sdk.Context, proposals ...types.ConsumerAdditionProposal) { - store := ctx.KVStore(k.storeKey) - - for _, p := range proposals { - store.Delete(types.PendingCAPKey(p.SpawnTime, p.ChainId)) - } -} - -// SetPendingConsumerRemovalProp stores a pending consumer removal proposal. -// -// Note that the pending removal addition proposals are stored under keys with -// the following format: PendingCRPKeyPrefix | stopTime | consumerId -// Thus, if multiple removal addition proposal for the same chain will pass at -// the same time, then only the last one will be stored. -func (k Keeper) SetPendingConsumerRemovalProp(ctx sdk.Context, prop *types.ConsumerRemovalProposal) { - store := ctx.KVStore(k.storeKey) - bz, err := prop.Marshal() - if err != nil { - // An error here would indicate something is very wrong - panic(fmt.Errorf("failed to marshal consumer removal proposal: %w", err)) - } - store.Set(types.PendingCRPKey(prop.StopTime, prop.ChainId), bz) -} - -// PendingConsumerRemovalPropExists checks whether a pending consumer removal proposal -// exists for the given consumer chain ID and stopTime -// -// Note: this method is only used in testing -func (k Keeper) PendingConsumerRemovalPropExists(ctx sdk.Context, chainID string, timestamp time.Time) bool { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.PendingCRPKey(timestamp, chainID)) - - return bz != nil -} - -// DeletePendingConsumerRemovalProps deletes the given pending consumer removal proposals. -// This method should be called once the proposal has been acted upon. -func (k Keeper) DeletePendingConsumerRemovalProps(ctx sdk.Context, proposals ...types.ConsumerRemovalProposal) { - store := ctx.KVStore(k.storeKey) - - for _, p := range proposals { - store.Delete(types.PendingCRPKey(p.StopTime, p.ChainId)) - } -} - // BeginBlockCCR iterates over the pending consumer proposals and stop/removes the chain if the stop time has passed func (k Keeper) BeginBlockCCR(ctx sdk.Context) { // TODO (PERMISSIONLESS): parameterize the limit @@ -505,72 +362,3 @@ func (k Keeper) BeginBlockCCR(ctx sdk.Context) { ) } } - -// TODO (PERMISSIONLESS): leaving commented out because it might be used for migration -//// GetConsumerRemovalPropsToExecute iterates over the pending consumer removal proposals -//// and returns an ordered list of consumer removal proposals to be executed, -//// ie. consumer chains to be stopped and removed from the provider chain. -//// A prop is included in the returned list if its proposed stop time has passed. -//// -//// Note: this method is split out from BeginBlockCCR to be easily unit tested. -//func (k Keeper) GetConsumerRemovalPropsToExecute(ctx sdk.Context) []types.ConsumerRemovalProposal { -// // store the (to be) executed consumer removal proposals in order -// propsToExecute := []types.ConsumerRemovalProposal{} -// -// store := ctx.KVStore(k.storeKey) -// iterator := storetypes.KVStorePrefixIterator(store, types.PendingCRPKeyPrefix()) -// defer iterator.Close() -// -// for ; iterator.Valid(); iterator.Next() { -// var prop types.ConsumerRemovalProposal -// err := prop.Unmarshal(iterator.Value()) -// if err != nil { -// // An error here would indicate something is very wrong, -// // the ConsumerRemovalProposal is assumed to be correctly serialized in SetPendingConsumerRemovalProp. -// panic(fmt.Errorf("failed to unmarshal consumer removal proposal: %w", err)) -// } -// -// // If current block time is equal to or after stop time, proposal is ready to be executed -// if !ctx.BlockTime().Before(prop.StopTime) { -// propsToExecute = append(propsToExecute, prop) -// } else { -// // No more proposals to check, since they're stored/ordered by timestamp. -// break -// } -// } -// -// return propsToExecute -//} - -// GetAllPendingConsumerRemovalProps iterates through the pending consumer removal proposals. -// -// Note that the pending consumer removal proposals are stored under keys with the following format: -// PendingCRPKeyPrefix | stopTime.UnixNano() | consumerId -// Thus, the returned array is in stopTime order. -func (k Keeper) GetAllPendingConsumerRemovalProps(ctx sdk.Context) (props []types.ConsumerRemovalProposal) { - store := ctx.KVStore(k.storeKey) - iterator := storetypes.KVStorePrefixIterator(store, types.PendingCRPKeyPrefix()) - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var prop types.ConsumerRemovalProposal - err := prop.Unmarshal(iterator.Value()) - if err != nil { - // An error here would indicate something is very wrong, - // the ConsumerRemovalProposal is assumed to be correctly serialized in SetPendingConsumerRemovalProp. - panic(fmt.Errorf("failed to unmarshal consumer removal proposal: %w", err)) - } - - props = append(props, prop) - } - - return props -} - -// StopConsumerChainInCachedCtx stop a consumer chain -// from a given consumer removal proposal in a cached context -func (k Keeper) StopConsumerChainInCachedCtx(ctx sdk.Context, p types.ConsumerRemovalProposal) (cc sdk.Context, writeCache func(), err error) { - cc, writeCache = ctx.CacheContext() - err = k.StopConsumerChain(cc, p.ChainId, true) - return -} diff --git a/x/ccv/provider/keeper/proposal_test.go b/x/ccv/provider/keeper/proposal_test.go index 2386ab65f2..eaa7d76ec9 100644 --- a/x/ccv/provider/keeper/proposal_test.go +++ b/x/ccv/provider/keeper/proposal_test.go @@ -1,10 +1,9 @@ package keeper_test import ( - "bytes" "encoding/json" "fmt" - "sort" + "testing" "time" @@ -117,162 +116,6 @@ func testCreatedConsumerClient(t *testing.T, require.True(t, ok) } -// TestPendingConsumerAdditionPropDeletion tests the getting/setting -// and deletion keeper methods for pending consumer addition props -func TestPendingConsumerAdditionPropDeletion(t *testing.T) { - testCases := []struct { - providertypes.ConsumerAdditionProposal - ExpDeleted bool - }{ - { - ConsumerAdditionProposal: providertypes.ConsumerAdditionProposal{ChainId: "0", SpawnTime: time.Now().UTC()}, - ExpDeleted: true, - }, - { - ConsumerAdditionProposal: providertypes.ConsumerAdditionProposal{ChainId: "1", SpawnTime: time.Now().UTC().Add(time.Hour)}, - ExpDeleted: false, - }, - } - providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) - defer ctrl.Finish() - - for _, tc := range testCases { - tc := tc - providerKeeper.SetPendingConsumerAdditionProp(ctx, &tc.ConsumerAdditionProposal) - } - - ctx = ctx.WithBlockTime(time.Now().UTC()) - - propsToExecute := providerKeeper.GetConsumerAdditionPropsToExecute(ctx) - // Delete consumer addition proposals, same as what would be done by BeginBlockInit - providerKeeper.DeletePendingConsumerAdditionProps(ctx, propsToExecute...) - numDeleted := 0 - for _, tc := range testCases { - res, found := providerKeeper.GetPendingConsumerAdditionProp(ctx, tc.SpawnTime, tc.ChainId) - if !tc.ExpDeleted { - require.True(t, found) - require.NotEmpty(t, res, "consumer addition proposal was deleted: %s %s", tc.ChainId, tc.SpawnTime.String()) - continue - } - require.Empty(t, res, "consumer addition proposal was not deleted %s %s", tc.ChainId, tc.SpawnTime.String()) - require.Equal(t, propsToExecute[numDeleted].ChainId, tc.ChainId) - numDeleted += 1 - } -} - -// TestGetConsumerAdditionPropsToExecute tests that pending consumer addition proposals -// that are ready to execute are accessed in order by timestamp via the iterator -func TestGetConsumerAdditionPropsToExecute(t *testing.T) { - now := time.Now().UTC() - sampleProp1 := providertypes.ConsumerAdditionProposal{ChainId: "chain-2", SpawnTime: now} - sampleProp2 := providertypes.ConsumerAdditionProposal{ChainId: "chain-1", SpawnTime: now.Add(time.Hour)} - sampleProp3 := providertypes.ConsumerAdditionProposal{ChainId: "chain-4", SpawnTime: now.Add(-time.Hour)} - sampleProp4 := providertypes.ConsumerAdditionProposal{ChainId: "chain-3", SpawnTime: now} - sampleProp5 := providertypes.ConsumerAdditionProposal{ChainId: "chain-1", SpawnTime: now.Add(2 * time.Hour)} - - getExpectedOrder := func(props []providertypes.ConsumerAdditionProposal, accessTime time.Time) []providertypes.ConsumerAdditionProposal { - expectedOrder := []providertypes.ConsumerAdditionProposal{} - for _, prop := range props { - if !accessTime.Before(prop.SpawnTime) { - expectedOrder = append(expectedOrder, prop) - } - } - if len(expectedOrder) == 0 { - return nil - } - // sorting by SpawnTime.UnixNano() - sort.Slice(expectedOrder, func(i, j int) bool { - if expectedOrder[i].SpawnTime.UTC() == expectedOrder[j].SpawnTime.UTC() { - // proposals with same SpawnTime - return expectedOrder[i].ChainId < expectedOrder[j].ChainId - } - return expectedOrder[i].SpawnTime.UTC().Before(expectedOrder[j].SpawnTime.UTC()) - }) - return expectedOrder - } - - testCases := []struct { - propSubmitOrder []providertypes.ConsumerAdditionProposal - accessTime time.Time - }{ - { - propSubmitOrder: []providertypes.ConsumerAdditionProposal{ - sampleProp1, sampleProp2, sampleProp3, sampleProp4, sampleProp5, - }, - accessTime: now, - }, - { - propSubmitOrder: []providertypes.ConsumerAdditionProposal{ - sampleProp3, sampleProp2, sampleProp1, sampleProp5, sampleProp4, - }, - accessTime: now.Add(time.Hour), - }, - { - propSubmitOrder: []providertypes.ConsumerAdditionProposal{ - sampleProp5, sampleProp4, sampleProp3, sampleProp2, sampleProp1, - }, - accessTime: now.Add(-2 * time.Hour), - }, - { - propSubmitOrder: []providertypes.ConsumerAdditionProposal{ - sampleProp5, sampleProp4, sampleProp3, sampleProp2, sampleProp1, - }, - accessTime: now.Add(3 * time.Hour), - }, - } - - for _, tc := range testCases { - providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) - defer ctrl.Finish() - - expectedOrderedProps := getExpectedOrder(tc.propSubmitOrder, tc.accessTime) - - for _, prop := range tc.propSubmitOrder { - cpProp := prop - providerKeeper.SetPendingConsumerAdditionProp(ctx, &cpProp) - } - propsToExecute := providerKeeper.GetConsumerAdditionPropsToExecute(ctx.WithBlockTime(tc.accessTime)) - require.Equal(t, expectedOrderedProps, propsToExecute) - } -} - -// Test getting both matured and pending consumer addition proposals -func TestGetAllConsumerAdditionProps(t *testing.T) { - pk, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) - defer ctrl.Finish() - - now := time.Now().UTC() - props := []providertypes.ConsumerAdditionProposal{ - {ChainId: "chain-2", SpawnTime: now}, - {ChainId: "chain-1", SpawnTime: now.Add(2 * time.Hour)}, - {ChainId: "chain-4", SpawnTime: now.Add(-time.Hour)}, - {ChainId: "chain-3", SpawnTime: now.Add(4 * time.Hour)}, - {ChainId: "chain-1", SpawnTime: now}, - } - expectedGetAllOrder := props - // sorting by SpawnTime.UnixNano() - sort.Slice(expectedGetAllOrder, func(i, j int) bool { - tsi := uint64(expectedGetAllOrder[i].SpawnTime.UTC().UnixNano()) - tsj := uint64(expectedGetAllOrder[j].SpawnTime.UTC().UnixNano()) - cmpTimestamps := bytes.Compare(sdk.Uint64ToBigEndian(tsi), sdk.Uint64ToBigEndian(tsj)) - if cmpTimestamps == 0 { - // proposals with same SpawnTime - return expectedGetAllOrder[i].ChainId < expectedGetAllOrder[j].ChainId - } - return cmpTimestamps == -1 - }) - - for _, prop := range props { - cpProp := prop // bring into loop scope - avoids using iterator pointer instead of value pointer - pk.SetPendingConsumerAdditionProp(ctx, &cpProp) - } - - // iterate and check all results are returned in the expected order - result := pk.GetAllPendingConsumerAdditionProps(ctx.WithBlockTime(now)) - require.Len(t, result, len(props)) - require.Equal(t, expectedGetAllOrder, result) -} - // Tests the StopConsumerChain method against the spec, // with more granularity than what's covered in TestHandleLegacyConsumerRemovalProposal, or integration tests. // See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-stcc1 @@ -410,43 +253,6 @@ func TestStopConsumerChain(t *testing.T) { // } //} -// Test getting both matured and pending consumer removal proposals -func TestGetAllConsumerRemovalProps(t *testing.T) { - pk, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) - defer ctrl.Finish() - - now := time.Now().UTC() - props := []providertypes.ConsumerRemovalProposal{ - {ChainId: "chain-2", StopTime: now}, - {ChainId: "chain-1", StopTime: now.Add(2 * time.Hour)}, - {ChainId: "chain-4", StopTime: now.Add(-time.Hour)}, - {ChainId: "chain-3", StopTime: now.Add(4 * time.Hour)}, - {ChainId: "chain-1", StopTime: now}, - } - expectedGetAllOrder := props - // sorting by StopTime.UnixNano() - sort.Slice(expectedGetAllOrder, func(i, j int) bool { - tsi := uint64(expectedGetAllOrder[i].StopTime.UTC().UnixNano()) - tsj := uint64(expectedGetAllOrder[j].StopTime.UTC().UnixNano()) - cmpTimestamps := bytes.Compare(sdk.Uint64ToBigEndian(tsi), sdk.Uint64ToBigEndian(tsj)) - if cmpTimestamps == 0 { - // proposals with same StopTime - return expectedGetAllOrder[i].ChainId < expectedGetAllOrder[j].ChainId - } - return cmpTimestamps == -1 - }) - - for _, prop := range props { - cpProp := prop // bring into loop scope - avoids using iterator pointer instead of value pointer - pk.SetPendingConsumerRemovalProp(ctx, &cpProp) - } - - // iterate and check all results are returned in the expected order - result := pk.GetAllPendingConsumerRemovalProps(ctx.WithBlockTime(now)) - require.Len(t, result, len(props)) - require.Equal(t, expectedGetAllOrder, result) -} - // TestMakeConsumerGenesis tests the MakeConsumerGenesis keeper method. // An expected genesis state is hardcoded in json, unmarshaled, and compared // against an actual consumer genesis state constructed by a provider keeper. diff --git a/x/ccv/provider/keeper/validator_set_update.go b/x/ccv/provider/keeper/validator_set_update.go index a0afc94ef9..95a8d5c9a7 100644 --- a/x/ccv/provider/keeper/validator_set_update.go +++ b/x/ccv/provider/keeper/validator_set_update.go @@ -14,7 +14,7 @@ import ( // GetConsumerChainConsensusValidatorsKey returns the store key for consumer validators of the consumer chain with `consumerId` func (k Keeper) GetConsumerChainConsensusValidatorsKey(ctx sdk.Context, consumerId string) []byte { - return types.ConsumerIdWithLenKey(types.ConsumerValidatorKeyPrefix(), consumerId) + return types.StringIdWithLenKey(types.ConsumerValidatorKeyPrefix(), consumerId) } // SetConsumerValidator sets provided consumer `validator` on the consumer chain with `consumerId` diff --git a/x/ccv/provider/migrations/migrator.go b/x/ccv/provider/migrations/migrator.go index 4678fe83cd..b2d733de11 100644 --- a/x/ccv/provider/migrations/migrator.go +++ b/x/ccv/provider/migrations/migrator.go @@ -92,6 +92,9 @@ func (m Migrator) Migrate7to8(ctx sdktypes.Context) error { if err := v8.MigrateConsumerAddrsToPrune(ctx, store, m.providerKeeper); err != nil { return err } + if err := v8.MigrateLaunchedConsumerChains(ctx, store, m.providerKeeper); err != nil { + return err + } v8.CleanupState(store) return nil diff --git a/x/ccv/provider/migrations/v8/migrations.go b/x/ccv/provider/migrations/v8/migrations.go index cdf299f91f..916e3d0a22 100644 --- a/x/ccv/provider/migrations/v8/migrations.go +++ b/x/ccv/provider/migrations/v8/migrations.go @@ -4,11 +4,15 @@ import ( "encoding/binary" "time" + "github.com/cosmos/cosmos-sdk/types/bech32" + + errorsmod "cosmossdk.io/errors" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" providerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" + ccv "github.com/cosmos/interchain-security/v5/x/ccv/types" ) const ( @@ -19,6 +23,30 @@ const ( LegacyInitTimeoutTimestampBytePrefix = byte(8) LegacyVscSendTimestampBytePrefix = byte(18) LegacyVSCMaturedHandledThisBlockBytePrefix = byte(28) + + LegacyPendingCAPKeyPrefix = byte(9) + LegacyPendingCRPKeyPrefix = byte(10) + LegacyProposedConsumerChainKeyPrefix = byte(30) + + LegacyThrottledPacketDataSizeKeyPrefix = byte(19) + LegacyThrottledPacketDataKeyPrefix = byte(20) + LegacyGlobalSlashEntryKeyPrefix = byte(21) + LegacyTopNKeyPrefix = byte(33) + LegacyValidatorsPowerCapKeyPrefix = byte(34) + LegacyValidatorSetCapKeyPrefix = byte(35) + + LegacyChainToChannelKeyPrefix = byte(5) + LegacyChannelToChainKeyPrefix = byte(6) + LegacyChainToClientKeyPrefix = byte(7) + + // needed for rekeying + ConsumerGenesisKeyPrefix = byte(14) + SlashAcksKeyPrefix = byte(15) + InitChainHeightKeyPrefix = byte(16) + PendingVSCsKeyPrefix = byte(17) + EquivocationEvidenceMinHeightKeyPrefix = byte(29) + ConsumerRewardsAllocationKeyPrefix = byte(38) + MinimumPowerInTopNKeyPrefix = byte(40) ) // CompleteUnbondingOps completes all unbonding operations. @@ -51,7 +79,7 @@ func MigrateConsumerAddrsToPrune(ctx sdk.Context, store storetypes.KVStore, pk p } for ; iterator.Valid(); iterator.Next() { - chainID, vscID, err := providertypes.ParseChainIdAndUintIdKey(LegacyConsumerAddrsToPruneBytePrefix, iterator.Key()) + chainID, vscID, err := providertypes.ParseStringIdAndUintIdKey(LegacyConsumerAddrsToPruneBytePrefix, iterator.Key()) if err != nil { pk.Logger(ctx).Error("ParseChainIdAndUintIdKey failed while migrating ConsumerAddrsToPrune", "key", string(iterator.Key()), @@ -60,7 +88,7 @@ func MigrateConsumerAddrsToPrune(ctx sdk.Context, store storetypes.KVStore, pk p continue } // use the VscSendTimestamp index to compute the timestamp after which this consumer address can be pruned - vscSendTimestampKey := providertypes.ChainIdAndUintIdKey(LegacyVscSendTimestampBytePrefix, chainID, vscID) + vscSendTimestampKey := providertypes.StringIdAndUintIdKey(LegacyVscSendTimestampBytePrefix, chainID, vscID) var sentTime time.Time if timeBz := store.Get(vscSendTimestampKey); timeBz != nil { if ts, err := sdk.ParseTimeBytes(timeBz); err == nil { @@ -95,6 +123,247 @@ func MigrateConsumerAddrsToPrune(ctx sdk.Context, store storetypes.KVStore, pk p return nil } +// MigrateLaunchedConsumerChains migrates all the state for consumer chains with an existing client +// Note that it must be executed before CleanupState. +func MigrateLaunchedConsumerChains(ctx sdk.Context, store storetypes.KVStore, pk providerkeeper.Keeper) error { + chainIds := []string{} + iterator := storetypes.KVStorePrefixIterator(store, []byte{LegacyChainToClientKeyPrefix}) + for ; iterator.Valid(); iterator.Next() { + // remove 1 byte prefix from key to retrieve chainId + chainId := string(iterator.Key()[1:]) + chainIds = append(chainIds, chainId) + } + err := iterator.Close() + if err != nil { + return err + } + + for _, chainId := range chainIds { + // create new consumerId + consumerId := pk.FetchAndIncrementConsumerId(ctx) + + // re-key store + + // channelId -> chainId + channelId, found := pk.GetConsumerIdToChannelId(ctx, chainId) + if !found { + return errorsmod.Wrapf(ccv.ErrInvalidConsumerState, "cannot find channel id associated with consumer id: %s", consumerId) + } + pk.SetChannelToConsumerId(ctx, channelId, consumerId) + + // chainId -> channelId + rekeyFromChainIdToConsumerId(store, LegacyChainToChannelKeyPrefix, chainId, consumerId) + + // chainId -> clientId + rekeyFromChainIdToConsumerId(store, LegacyChainToClientKeyPrefix, chainId, consumerId) + + // chainId -> consumer genesis + rekeyFromChainIdToConsumerId(store, ConsumerGenesisKeyPrefix, chainId, consumerId) + + // chainId -> SlashAcks + rekeyFromChainIdToConsumerId(store, SlashAcksKeyPrefix, chainId, consumerId) + + // chainId -> InitChainHeight + rekeyFromChainIdToConsumerId(store, InitChainHeightKeyPrefix, chainId, consumerId) + + // chainId -> PendingVSCs + rekeyFromChainIdToConsumerId(store, PendingVSCsKeyPrefix, chainId, consumerId) + + // chainId -> ConsumerValidators + rekeyChainIdAndConsAddrKey(store, providertypes.ConsumerValidatorsKeyPrefix(), chainId, consumerId) + + // chainId -> ValidatorsByConsumerAddr + rekeyChainIdAndConsAddrKey(store, providertypes.ValidatorsByConsumerAddrKeyPrefix(), chainId, consumerId) + + // chainId -> EquivocationEvidenceMinHeight + rekeyFromChainIdToConsumerId(store, EquivocationEvidenceMinHeightKeyPrefix, chainId, consumerId) + + // chainId -> ConsumerValidator + rekeyChainIdAndConsAddrKey(store, providertypes.ConsumerValidatorKeyPrefix(), chainId, consumerId) + + // chainId -> OptedIn + rekeyChainIdAndConsAddrKey(store, providertypes.OptedInKeyPrefix(), chainId, consumerId) + + // chainId -> Allowlist + rekeyChainIdAndConsAddrKey(store, providertypes.AllowlistKeyPrefix(), chainId, consumerId) + + // chainId -> Denylist + rekeyChainIdAndConsAddrKey(store, providertypes.DenylistKeyPrefix(), chainId, consumerId) + + // chainId -> ConsumerRewardsAllocations + rekeyFromChainIdToConsumerId(store, ConsumerRewardsAllocationKeyPrefix, chainId, consumerId) + + // chainId -> ConsumerCommissionRate + rekeyChainIdAndConsAddrKey(store, providertypes.ConsumerCommissionRateKeyPrefix(), chainId, consumerId) + + // chainId -> MinimumPowerInTopN + rekeyFromChainIdToConsumerId(store, MinimumPowerInTopNKeyPrefix, chainId, consumerId) + + // chainId -> ConsumerAddrsToPruneV2 + rekeyChainIdAndTsKey(store, providertypes.ConsumerAddrsToPruneV2KeyPrefix(), chainId, consumerId) + + pk.SetConsumerChainId(ctx, consumerId, chainId) + + // set ownership -- all existing chains are owned by gov + pk.SetConsumerOwnerAddress(ctx, consumerId, pk.GetAuthority()) + + // Note: ConsumerMetadata will be populated in the upgrade handler + // Note: InitializationParameters is not needed since the chain is already launched + + // migrate power shaping params + topNKey := append([]byte{LegacyTopNKeyPrefix}, []byte(chainId)...) + var topN uint32 = 0 + buf := store.Get(topNKey) + if buf != nil { + topN = binary.BigEndian.Uint32(buf) + } + + validatorsPowerCapKey := append([]byte{LegacyValidatorsPowerCapKeyPrefix}, []byte(chainId)...) + var validatorsPowerCap uint32 = 0 + buf = store.Get(validatorsPowerCapKey) + if buf != nil { + validatorsPowerCap = binary.BigEndian.Uint32(buf) + } + + validatorSetCapKey := append([]byte{LegacyValidatorSetCapKeyPrefix}, []byte(chainId)...) + var validatorSetCap uint32 = 0 + buf = store.Get(validatorSetCapKey) + if buf != nil { + validatorSetCap = binary.BigEndian.Uint32(buf) + } + + bech32PrefixConsAddr := sdk.GetConfig().GetBech32ConsensusAddrPrefix() + var allowlist []string + for _, addr := range pk.GetAllowList(ctx, consumerId) { + foo, _ := bech32.ConvertAndEncode(bech32PrefixConsAddr, addr.ToSdkConsAddr().Bytes()) + allowlist = append(allowlist, foo) + } + + var denylist []string + for _, addr := range pk.GetDenyList(ctx, consumerId) { + foo, _ := bech32.ConvertAndEncode(bech32PrefixConsAddr, addr.ToSdkConsAddr().Bytes()) + allowlist = append(allowlist, foo) + } + + powerShapingParameters := providertypes.PowerShapingParameters{ + Top_N: topN, + ValidatorsPowerCap: validatorsPowerCap, + ValidatorSetCap: validatorSetCap, + Allowlist: allowlist, + Denylist: denylist, + // do not set those since they do not exist in a previous interchain-security version and hence cannot be set + MinStake: 0, + AllowInactiveVals: false, + } + err := pk.SetConsumerPowerShapingParameters(ctx, consumerId, powerShapingParameters) + if err != nil { + return err + } + + // set phase to launched + pk.SetConsumerPhase(ctx, consumerId, providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) + + // This is to migrate everything under `ProviderConsAddrToOptedInConsumerIdsKey` + // `OptedIn` was already re-keyed earlier (see above) and hence we can use `consumerId` here. + for _, providerConsAddr := range pk.GetAllOptedIn(ctx, consumerId) { + pk.AppendOptedInConsumerId(ctx, providerConsAddr, consumerId) + } + + // set clientId -> consumerId mapping + clientId, found := pk.GetConsumerClientId(ctx, consumerId) // consumer to client was already re-keyed so we can use `consumerId` here + if !found { + return errorsmod.Wrapf(ccv.ErrInvalidConsumerState, "cannot find client ID associated with consumer ID: %s", consumerId) + } + pk.SetClientIdToConsumerId(ctx, clientId, consumerId) + } + + return nil +} + +// rekeyFromChainIdToConsumerId migrates store keys from `keyPrefix | chainId` +// to `keyPrefix | consumerId` leaving the value unchanged +func rekeyFromChainIdToConsumerId( + store storetypes.KVStore, + keyPrefix byte, + chainId, consumerId string, +) { + oldKey := append([]byte{keyPrefix}, []byte(chainId)...) + value := store.Get(oldKey) + newKey := append([]byte{keyPrefix}, []byte(consumerId)...) + store.Set(newKey, value) + store.Delete(oldKey) +} + +// rekeyChainIdAndConsAddrKey migrates store keys +// from `keyPrefix | len(chainID) | chainID | ConsAddress` +// to `keyPrefix | len(consumerId) | consumerId | ConsAddress“ +// leaving the value unchanged +func rekeyChainIdAndConsAddrKey( + store storetypes.KVStore, + keyPrefix byte, + chainId, consumerId string, +) error { + oldPartialKey := providertypes.StringIdWithLenKey(keyPrefix, chainId) + addrs := []sdk.ConsAddress{} + iterator := storetypes.KVStorePrefixIterator(store, oldPartialKey) + for ; iterator.Valid(); iterator.Next() { + _, addr, err := providertypes.ParseStringIdAndConsAddrKey(keyPrefix, iterator.Key()) + if err != nil { + return err + } + addrs = append(addrs, addr) + } + err := iterator.Close() + if err != nil { + return err + } + + for _, addr := range addrs { + oldKey := providertypes.StringIdAndConsAddrKey(keyPrefix, chainId, addr) + value := store.Get(oldKey) + newKey := providertypes.StringIdAndConsAddrKey(keyPrefix, consumerId, addr) + store.Set(newKey, value) + store.Delete(oldKey) + } + + return nil +} + +// rekeyChainIdAndTsKey migrates store keys +// from `keyPrefix | len(chainID) | chainID | timestamp` +// to `keyPrefix | len(consumerId) | consumerId | timestamp +// leaving the value unchanged +func rekeyChainIdAndTsKey( + store storetypes.KVStore, + keyPrefix byte, + chainId, consumerId string, +) error { + oldPartialKey := providertypes.StringIdWithLenKey(keyPrefix, chainId) + timestamps := []time.Time{} + iterator := storetypes.KVStorePrefixIterator(store, oldPartialKey) + for ; iterator.Valid(); iterator.Next() { + _, ts, err := providertypes.ParseStringIdAndTsKey(keyPrefix, iterator.Key()) + if err != nil { + return err + } + timestamps = append(timestamps, ts) + } + err := iterator.Close() + if err != nil { + return err + } + + for _, ts := range timestamps { + oldKey := providertypes.StringIdAndTsKey(keyPrefix, chainId, ts) + value := store.Get(oldKey) + newKey := providertypes.StringIdAndTsKey(keyPrefix, consumerId, ts) + store.Set(newKey, value) + store.Delete(oldKey) + } + + return nil +} + // CleanupState removes deprecated state func CleanupState(store storetypes.KVStore) { removePrefix(store, LegacyMaturedUnbondingOpsByteKey) @@ -104,6 +373,18 @@ func CleanupState(store storetypes.KVStore) { removePrefix(store, LegacyVscSendTimestampBytePrefix) removePrefix(store, LegacyVSCMaturedHandledThisBlockBytePrefix) removePrefix(store, LegacyConsumerAddrsToPruneBytePrefix) + + removePrefix(store, LegacyPendingCAPKeyPrefix) + removePrefix(store, LegacyPendingCRPKeyPrefix) + removePrefix(store, LegacyProposedConsumerChainKeyPrefix) + + removePrefix(store, LegacyThrottledPacketDataSizeKeyPrefix) + removePrefix(store, LegacyThrottledPacketDataKeyPrefix) + removePrefix(store, LegacyGlobalSlashEntryKeyPrefix) + + removePrefix(store, LegacyTopNKeyPrefix) + removePrefix(store, LegacyValidatorsPowerCapKeyPrefix) + removePrefix(store, LegacyValidatorSetCapKeyPrefix) } func removePrefix(store storetypes.KVStore, prefix byte) { diff --git a/x/ccv/provider/migrations/v8/migrations_test.go b/x/ccv/provider/migrations/v8/migrations_test.go index 8c23fccc64..8f37f84d13 100644 --- a/x/ccv/provider/migrations/v8/migrations_test.go +++ b/x/ccv/provider/migrations/v8/migrations_test.go @@ -14,7 +14,7 @@ import ( ) func legacyConsumerAddrsToPruneKey(chainID string, vscID uint64) []byte { - return providertypes.ChainIdAndUintIdKey(LegacyConsumerAddrsToPruneBytePrefix, chainID, vscID) + return providertypes.StringIdAndUintIdKey(LegacyConsumerAddrsToPruneBytePrefix, chainID, vscID) } func legacyAppendConsumerAddrsToPrune( @@ -44,7 +44,7 @@ func legacyAppendConsumerAddrsToPrune( } func legacyVscSendingTimestampKey(chainID string, vscID uint64) []byte { - return providertypes.ChainIdAndUintIdKey(LegacyVscSendTimestampBytePrefix, chainID, vscID) + return providertypes.StringIdAndUintIdKey(LegacyVscSendTimestampBytePrefix, chainID, vscID) } func legacySetVscSendTimestamp( diff --git a/x/ccv/provider/module_test.go b/x/ccv/provider/module_test.go index a019eb162f..9cbe5d6f4c 100644 --- a/x/ccv/provider/module_test.go +++ b/x/ccv/provider/module_test.go @@ -104,8 +104,6 @@ func TestInitGenesis(t *testing.T) { providerKeeper.GetValidatorSetUpdateId(ctx), nil, tc.consumerStates, - nil, - nil, types.DefaultParams(), nil, nil, diff --git a/x/ccv/provider/types/genesis.go b/x/ccv/provider/types/genesis.go index 5cd60982a6..be4b9d8934 100644 --- a/x/ccv/provider/types/genesis.go +++ b/x/ccv/provider/types/genesis.go @@ -16,23 +16,19 @@ func NewGenesisState( vscID uint64, vscIdToHeights []ValsetUpdateIdToHeight, consumerStates []ConsumerState, - additionProposals []ConsumerAdditionProposal, - removalProposals []ConsumerRemovalProposal, params Params, validatorConsumerPubkeys []ValidatorConsumerPubKey, validatorsByConsumerAddr []ValidatorByConsumerAddr, consumerAddrsToPrune []ConsumerAddrsToPruneV2, ) *GenesisState { return &GenesisState{ - ValsetUpdateId: vscID, - ValsetUpdateIdToHeight: vscIdToHeights, - ConsumerStates: consumerStates, - ConsumerAdditionProposals: additionProposals, - ConsumerRemovalProposals: removalProposals, - Params: params, - ValidatorConsumerPubkeys: validatorConsumerPubkeys, - ValidatorsByConsumerAddr: validatorsByConsumerAddr, - ConsumerAddrsToPruneV2: consumerAddrsToPrune, + ValsetUpdateId: vscID, + ValsetUpdateIdToHeight: vscIdToHeights, + ConsumerStates: consumerStates, + Params: params, + ValidatorConsumerPubkeys: validatorConsumerPubkeys, + ValidatorsByConsumerAddr: validatorsByConsumerAddr, + ConsumerAddrsToPruneV2: consumerAddrsToPrune, } } @@ -49,18 +45,6 @@ func (gs GenesisState) Validate() error { return errorsmod.Wrap(ccv.ErrInvalidGenesis, "valset update ID cannot be equal to zero") } - for _, prop := range gs.ConsumerAdditionProposals { - if err := prop.ValidateBasic(); err != nil { - return errorsmod.Wrap(ccv.ErrInvalidGenesis, err.Error()) - } - } - - for _, prop := range gs.ConsumerRemovalProposals { - if err := prop.ValidateBasic(); err != nil { - return errorsmod.Wrap(ccv.ErrInvalidGenesis, err.Error()) - } - } - if len(gs.ValsetUpdateIdToHeight) > 0 { // check only the first tuple of the list since it is ordered by VSC ID if gs.ValsetUpdateIdToHeight[0].ValsetUpdateId == 0 { diff --git a/x/ccv/provider/types/genesis.pb.go b/x/ccv/provider/types/genesis.pb.go index 7097cd1a2b..5dc5b300c4 100644 --- a/x/ccv/provider/types/genesis.pb.go +++ b/x/ccv/provider/types/genesis.pb.go @@ -32,11 +32,7 @@ type GenesisState struct { ConsumerStates []ConsumerState `protobuf:"bytes,2,rep,name=consumer_states,json=consumerStates,proto3" json:"consumer_states" yaml:"consumer_states"` // empty for a new chain ValsetUpdateIdToHeight []ValsetUpdateIdToHeight `protobuf:"bytes,5,rep,name=valset_update_id_to_height,json=valsetUpdateIdToHeight,proto3" json:"valset_update_id_to_height"` - // empty for a new chain - ConsumerAdditionProposals []ConsumerAdditionProposal `protobuf:"bytes,6,rep,name=consumer_addition_proposals,json=consumerAdditionProposals,proto3" json:"consumer_addition_proposals"` - // empty for a new chain - ConsumerRemovalProposals []ConsumerRemovalProposal `protobuf:"bytes,7,rep,name=consumer_removal_proposals,json=consumerRemovalProposals,proto3" json:"consumer_removal_proposals"` - Params Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params"` + Params Params `protobuf:"bytes,8,opt,name=params,proto3" json:"params"` // empty for a new chain ValidatorConsumerPubkeys []ValidatorConsumerPubKey `protobuf:"bytes,9,rep,name=validator_consumer_pubkeys,json=validatorConsumerPubkeys,proto3" json:"validator_consumer_pubkeys"` // empty for a new chain @@ -99,20 +95,6 @@ func (m *GenesisState) GetValsetUpdateIdToHeight() []ValsetUpdateIdToHeight { return nil } -func (m *GenesisState) GetConsumerAdditionProposals() []ConsumerAdditionProposal { - if m != nil { - return m.ConsumerAdditionProposals - } - return nil -} - -func (m *GenesisState) GetConsumerRemovalProposals() []ConsumerRemovalProposal { - if m != nil { - return m.ConsumerRemovalProposals - } - return nil -} - func (m *GenesisState) GetParams() Params { if m != nil { return m.Params @@ -308,56 +290,53 @@ func init() { } var fileDescriptor_48411d9c7900d48e = []byte{ - // 782 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xd1, 0x6e, 0xda, 0x48, - 0x14, 0xc5, 0xc1, 0x21, 0x66, 0x12, 0x58, 0xcb, 0x8a, 0x90, 0x43, 0xb4, 0x24, 0x62, 0x15, 0x09, - 0x69, 0x77, 0x71, 0x60, 0xb5, 0xd2, 0x6a, 0x77, 0xf3, 0x10, 0x12, 0x69, 0x17, 0xfa, 0x82, 0x48, - 0x9a, 0x4a, 0x79, 0xb1, 0x86, 0xf1, 0x08, 0x46, 0x18, 0x8f, 0xe5, 0x19, 0x9c, 0xa2, 0xaa, 0x52, - 0xab, 0xfe, 0x40, 0x9f, 0xfb, 0x0d, 0xfd, 0x90, 0x3c, 0xe6, 0xb1, 0x4f, 0x51, 0x95, 0xfc, 0x41, - 0xbf, 0xa0, 0xf2, 0x78, 0xec, 0x42, 0x4a, 0x22, 0xe8, 0x1b, 0xcc, 0x99, 0x73, 0xee, 0xb9, 0xd7, - 0xf7, 0xde, 0x01, 0x0d, 0xe2, 0x71, 0x1c, 0xa0, 0x21, 0x24, 0x9e, 0xcd, 0x30, 0x9a, 0x04, 0x84, - 0x4f, 0x2d, 0x84, 0x42, 0xcb, 0x0f, 0x68, 0x48, 0x1c, 0x1c, 0x58, 0x61, 0xc3, 0x1a, 0x60, 0x0f, - 0x33, 0xc2, 0xea, 0x7e, 0x40, 0x39, 0x35, 0x7e, 0x59, 0x40, 0xa9, 0x23, 0x14, 0xd6, 0x13, 0x4a, - 0x3d, 0x6c, 0x94, 0xb7, 0x07, 0x74, 0x40, 0xc5, 0x7d, 0x2b, 0xfa, 0x15, 0x53, 0xcb, 0x87, 0x8f, - 0x45, 0x0b, 0x1b, 0x16, 0x1b, 0xc2, 0x00, 0x3b, 0x36, 0xa2, 0x1e, 0x9b, 0x8c, 0x71, 0x20, 0x19, - 0x07, 0x4f, 0x30, 0xae, 0x48, 0x80, 0xe5, 0xb5, 0xe6, 0x32, 0x69, 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 0x10, 0x3e, - 0x9c, 0xf4, 0xeb, 0x88, 0x8e, 0x2d, 0x44, 0xd9, 0x98, 0x32, 0xeb, 0x5b, 0x41, 0x7e, 0x4f, 0xdf, - 0xa1, 0xf0, 0x4f, 0xeb, 0xe5, 0xfc, 0x63, 0xc4, 0xa7, 0x3e, 0x66, 0xfd, 0x9c, 0x78, 0x87, 0xfe, - 0xf8, 0x1a, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x95, 0x75, 0xdb, 0x84, 0x07, 0x00, 0x00, + // 730 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6e, 0xda, 0x4c, + 0x14, 0xc5, 0xc1, 0x01, 0x33, 0x09, 0x7c, 0x96, 0x15, 0x21, 0x7f, 0x89, 0x4a, 0x10, 0x55, 0x24, + 0xa4, 0xb6, 0x38, 0x50, 0x55, 0xaa, 0xfa, 0xb3, 0x08, 0x89, 0xd4, 0xe2, 0x6e, 0x10, 0x49, 0x53, + 0x29, 0x1b, 0x6b, 0x98, 0x19, 0xc1, 0x08, 0xb0, 0x2d, 0xcf, 0xe0, 0x14, 0x55, 0x95, 0xda, 0x37, + 0xe8, 0xba, 0x2f, 0xd1, 0xd7, 0xc8, 0x32, 0xcb, 0xae, 0xa2, 0x2a, 0x79, 0x83, 0x3e, 0x41, 0xe5, + 0xf1, 0xe0, 0x40, 0x4a, 0x22, 0xd2, 0x9d, 0x7d, 0xcf, 0x9c, 0x7b, 0xcf, 0xfd, 0x05, 0x75, 0xea, + 0x72, 0x12, 0xa0, 0x3e, 0xa4, 0xae, 0xc3, 0x08, 0x1a, 0x07, 0x94, 0x4f, 0x2c, 0x84, 0x42, 0xcb, + 0x0f, 0xbc, 0x90, 0x62, 0x12, 0x58, 0x61, 0xdd, 0xea, 0x11, 0x97, 0x30, 0xca, 0x6a, 0x7e, 0xe0, + 0x71, 0xcf, 0x78, 0xb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, 0x95, 0x52, 0x27, 0xaf, 0x7b, 0x94, 0xf7, 0xc7, 0xdd, 0x1a, 0xf2, + 0x46, 0x16, 0xf2, 0xd8, 0xc8, 0x63, 0xd6, 0x75, 0x41, 0x9e, 0x24, 0xa7, 0x38, 0x7c, 0x66, 0x7d, + 0x9c, 0xbf, 0xc7, 0x7c, 0xe2, 0x13, 0xd6, 0xcd, 0x88, 0x53, 0xfc, 0xf4, 0x4f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x42, 0x5f, 0xb9, 0x07, 0x87, 0x06, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -432,34 +411,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x42 - if len(m.ConsumerRemovalProposals) > 0 { - for iNdEx := len(m.ConsumerRemovalProposals) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ConsumerRemovalProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.ConsumerAdditionProposals) > 0 { - for iNdEx := len(m.ConsumerAdditionProposals) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ConsumerAdditionProposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } if len(m.ValsetUpdateIdToHeight) > 0 { for iNdEx := len(m.ValsetUpdateIdToHeight) - 1; iNdEx >= 0; iNdEx-- { { @@ -643,18 +594,6 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.ConsumerAdditionProposals) > 0 { - for _, e := range m.ConsumerAdditionProposals { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.ConsumerRemovalProposals) > 0 { - for _, e := range m.ConsumerRemovalProposals { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) if len(m.ValidatorConsumerPubkeys) > 0 { @@ -853,74 +792,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsumerAdditionProposals", 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.ConsumerAdditionProposals = append(m.ConsumerAdditionProposals, ConsumerAdditionProposal{}) - if err := m.ConsumerAdditionProposals[len(m.ConsumerAdditionProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsumerRemovalProposals", 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.ConsumerRemovalProposals = append(m.ConsumerRemovalProposals, ConsumerRemovalProposal{}) - if err := m.ConsumerRemovalProposals[len(m.ConsumerRemovalProposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) diff --git a/x/ccv/provider/types/genesis_test.go b/x/ccv/provider/types/genesis_test.go index c5472e07d5..09256a3cdd 100644 --- a/x/ccv/provider/types/genesis_test.go +++ b/x/ccv/provider/types/genesis_test.go @@ -33,8 +33,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id", ConsumerGenesis: getInitialConsumerGenesis(t, "chainid-1")}}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -53,8 +51,6 @@ func TestValidateGenesisState(t *testing.T) { {ChainId: "chainid-3", ChannelId: "channelid3", ClientId: "client-id", ConsumerGenesis: getInitialConsumerGenesis(t, "chainid-3")}, {ChainId: "chainid-4", ChannelId: "channelid4", ClientId: "client-id", ConsumerGenesis: getInitialConsumerGenesis(t, "chainid-4")}, }, - nil, - nil, types.DefaultParams(), nil, nil, @@ -68,8 +64,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id", ConsumerGenesis: getInitialConsumerGenesis(t, "chainid-1")}}, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: math.NewInt(10000000)}, 600, 24, 180), @@ -85,8 +79,6 @@ func TestValidateGenesisState(t *testing.T) { 0, nil, nil, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: math.NewInt(10000000)}, 600, 24, 180), @@ -102,8 +94,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, []types.ValsetUpdateIdToHeight{{ValsetUpdateId: 0}}, nil, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: math.NewInt(10000000)}, 600, 24, 180), @@ -119,8 +109,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id"}}, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, 0, clienttypes.Height{}, nil, []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, @@ -140,8 +128,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id"}}, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), "0.0", // 0 trusting period fraction here @@ -161,8 +147,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id"}}, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, @@ -182,8 +166,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id"}}, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, @@ -203,8 +185,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id"}}, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, @@ -224,8 +204,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "", ChannelId: "channelid", ClientId: "client-id"}}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -239,8 +217,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid", ChannelId: "ivnalidChannel{}", ClientId: "client-id"}}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -254,8 +230,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid", ChannelId: "channel-0", ClientId: ""}}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -269,8 +243,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid", ChannelId: "channel-0", ClientId: "abc", ConsumerGenesis: getInitialConsumerGenesis(t, "chainid")}}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -287,8 +259,6 @@ func TestValidateGenesisState(t *testing.T) { ChainId: "chainid", ChannelId: "channel-0", ClientId: "client-id", ConsumerGenesis: ccv.ConsumerGenesisState{}, }}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -306,8 +276,6 @@ func TestValidateGenesisState(t *testing.T) { ConsumerGenesis: getInitialConsumerGenesis(t, "chainid"), SlashDowntimeAck: []string{"cosmosvaloper1qlmk6r5w5taqrky4ycur4zq6jqxmuzr688htpp"}, }}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -325,8 +293,6 @@ func TestValidateGenesisState(t *testing.T) { ConsumerGenesis: getInitialConsumerGenesis(t, "chainid"), PendingValsetChanges: []ccv.ValidatorSetChangePacketData{{}}, }}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -348,8 +314,6 @@ func TestValidateGenesisState(t *testing.T) { ValidatorUpdates: []abci.ValidatorUpdate{{}}, }}, }}, - nil, - nil, types.DefaultParams(), nil, nil, @@ -363,8 +327,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id", ConsumerGenesis: getInitialConsumerGenesis(t, "chainid-1")}}, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "st", Amount: math.NewInt(10000000)}, 600, 24, 180), @@ -380,8 +342,6 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultValsetUpdateID, nil, []types.ConsumerState{{ChainId: "chainid-1", ChannelId: "channelid", ClientId: "client-id", ConsumerGenesis: getInitialConsumerGenesis(t, "chainid-1")}}, - nil, - nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: math.NewInt(-1000000)}, 600, 24, 180), diff --git a/x/ccv/provider/types/keys.go b/x/ccv/provider/types/keys.go index b9bf842a43..5f6010d260 100644 --- a/x/ccv/provider/types/keys.go +++ b/x/ccv/provider/types/keys.go @@ -57,9 +57,9 @@ const ( DeprecatedInitTimeoutTimestampKeyName = "DeprecatedInitTimeoutTimestampKey" - PendingCAPKeyName = "PendingCAPKey" + DeprecatedPendingCAPKeyName = "DeprecatedPendingCAPKey" - PendingCRPKeyName = "PendingCRPKey" + DeprecatedPendingCRPKeyName = "DeprecatedPendingCRPKey" DeprecatedUnbondingOpKeyName = "DeprecatedUnbondingOpKey" @@ -77,9 +77,9 @@ const ( DeprecatedVscSendTimestampKeyName = "DeprecatedVscSendTimestampKey" - ThrottledPacketDataSizeKeyName = "ThrottledPacketDataSizeKey" + DeprecatedThrottledPacketDataSizeKeyName = "DeprecatedThrottledPacketDataSizeKey" - ThrottledPacketDataKeyName = "ThrottledPacketDataKey" + DeprecatedThrottledPacketDataKeyName = "DeprecatedThrottledPacketDataKey" DeprecatedGlobalSlashEntryKeyName = "DeprecatedGlobalSlashEntryKey" @@ -99,7 +99,7 @@ const ( EquivocationEvidenceMinHeightKeyName = "EquivocationEvidenceMinHeightKey" - ProposedConsumerChainKeyName = "ProposedConsumerChainKey" + DeprecatedProposedConsumerChainKeyName = "DeprecatedProposedConsumerChainKey" ConsumerValidatorKeyName = "ConsumerValidatorKey" @@ -123,10 +123,6 @@ const ( LastProviderConsensusValsKeyName = "LastProviderConsensusValsKey" - DeprecatedMinStakeKeyName = "DeprecatedMinStakeKey" - - DeprecatedAllowInactiveValidatorsKeyName = "DeprecatedAllowInactiveValidatorsKey" - ConsumerAddrsToPruneV2KeyName = "ConsumerAddrsToPruneV2Key" ConsumerIdKeyName = "ConsumerIdKey" @@ -200,11 +196,13 @@ func getKeyPrefixes() map[string]byte { // PendingCAPKey is the key for storing pending consumer addition proposals before the spawn time occurs. // The key includes the BigEndian timestamp to allow for efficient chronological iteration - PendingCAPKeyName: 9, + // [DEPRECATED] + DeprecatedPendingCAPKeyName: 9, // PendingCRPKey is the key for storing pending consumer removal proposals before the stop time occurs. // The key includes the BigEndian timestamp to allow for efficient chronological iteration - PendingCRPKeyName: 10, + // [DEPRECATED] + DeprecatedPendingCRPKeyName: 10, // UnbondingOpKey is the key that stores a record of all the ids of consumer chains that // need to unbond before a given unbonding operation can unbond on this chain. @@ -241,10 +239,12 @@ func getKeyPrefixes() map[string]byte { DeprecatedVscSendTimestampKeyName: 18, // ThrottledPacketDataSizeKey is the key for storing the size of chain-specific throttled packet data queues - ThrottledPacketDataSizeKeyName: 19, + // [DEPRECATED] + DeprecatedThrottledPacketDataSizeKeyName: 19, // ThrottledPacketDataKey is the key for storing throttled packet data - ThrottledPacketDataKeyName: 20, + // [DEPRECATED] + DeprecatedThrottledPacketDataKeyName: 20, // GlobalSlashEntryKey is the key for storing global slash queue entries // [DEPRECATED] @@ -286,7 +286,8 @@ func getKeyPrefixes() map[string]byte { EquivocationEvidenceMinHeightKeyName: 29, // ProposedConsumerChainKey is the key for storing the consumer chainId in consumerAddition gov proposal submitted before voting finishes - ProposedConsumerChainKeyName: 30, + // [DEPRECATED] + DeprecatedProposedConsumerChainKeyName: 30, // ConsumerValidatorKey is the key for storing for each consumer chain all the consumer // validators in this epoch that are validating the consumer chain @@ -478,44 +479,6 @@ func ConsumerIdToClientIdKey(consumerId string) []byte { return append(ConsumerIdToClientIdKeyPrefix(), []byte(consumerId)...) } -// PendingCAPKeyPrefix returns the key prefix for storing a pending consumer addition proposal -func PendingCAPKeyPrefix() []byte { - return []byte{mustGetKeyPrefix(PendingCAPKeyName)} -} - -// PendingCAPKey returns the key under which a pending consumer addition proposal is stored. -// The key has the following format: PendingCAPKeyPrefix | timestamp.UnixNano() | chainID -func PendingCAPKey(timestamp time.Time, chainID string) []byte { - ts := uint64(timestamp.UTC().UnixNano()) - return ccvtypes.AppendMany( - // Append the prefix - PendingCAPKeyPrefix(), - // Append the time - sdk.Uint64ToBigEndian(ts), - // Append the chainId - []byte(chainID), - ) -} - -// PendingCRPKeyPrefix returns the key prefix for storing pending consumer removal proposals. -func PendingCRPKeyPrefix() []byte { - return []byte{mustGetKeyPrefix(PendingCRPKeyName)} -} - -// PendingCRPKey returns the key under which pending consumer removal proposals are stored. -// The key has the following format: PendingCRPKeyPrefix | timestamp.UnixNano() | chainID -func PendingCRPKey(timestamp time.Time, chainID string) []byte { - ts := uint64(timestamp.UTC().UnixNano()) - return ccvtypes.AppendMany( - // Append the prefix - PendingCRPKeyPrefix(), - // Append the time - sdk.Uint64ToBigEndian(ts), - // Append the chainId - []byte(chainID), - ) -} - // ValsetUpdateBlockHeightKeyPrefix returns the key prefix that storing the mapping from valset update ID to block height func ValsetUpdateBlockHeightKeyPrefix() []byte { return []byte{mustGetKeyPrefix(ValsetUpdateBlockHeightKeyName)} @@ -550,35 +513,6 @@ func PendingVSCsKey(consumerId string) []byte { return append([]byte{mustGetKeyPrefix(PendingVSCsKeyName)}, []byte(consumerId)...) } -// ThrottledPacketDataSizeKey returns the key storing the size of the throttled packet data queue for a given chain ID -func ThrottledPacketDataSizeKey(consumerChainID string) []byte { - return append([]byte{mustGetKeyPrefix(ThrottledPacketDataSizeKeyName)}, []byte(consumerChainID)...) -} - -// ThrottledPacketDataKeyPrefix returns the key prefix for storing the throttled packet data queue -func ThrottledPacketDataKeyPrefix() byte { - return mustGetKeyPrefix(ThrottledPacketDataKeyName) -} - -// ThrottledPacketDataKey returns the key for storing the throttled packet data queue for a given chain ID and ibc seq num -func ThrottledPacketDataKey(consumerChainID string, ibcSeqNum uint64) []byte { - return ChainIdAndUintIdKey(ThrottledPacketDataKeyPrefix(), consumerChainID, ibcSeqNum) -} - -// MustParseThrottledPacketDataKey parses a throttled packet data key or panics upon failure -func MustParseThrottledPacketDataKey(key []byte) (string, uint64) { - chainId, ibcSeqNum, err := ParseThrottledPacketDataKey(key) - if err != nil { - panic(fmt.Sprintf("failed to parse throttled packet data key: %s", err.Error())) - } - return chainId, ibcSeqNum -} - -// ParseThrottledPacketDataKey parses a throttled packet data key -func ParseThrottledPacketDataKey(key []byte) (chainId string, ibcSeqNum uint64, err error) { - return ParseChainIdAndUintIdKey(ThrottledPacketDataKeyPrefix(), key) -} - // ConsumerValidatorsKey returns the key for storing the validator assigned keys for every consumer chain func ConsumerValidatorsKeyPrefix() byte { return mustGetKeyPrefix(ConsumerValidatorsKeyName) @@ -587,7 +521,7 @@ func ConsumerValidatorsKeyPrefix() byte { // ConsumerValidatorsKey returns the key under which the // validator assigned keys for every consumer chain are stored func ConsumerValidatorsKey(consumerId string, addr ProviderConsAddress) []byte { - return ConsumerIdAndConsAddrKey(ConsumerValidatorsKeyPrefix(), consumerId, addr.ToSdkConsAddr()) + return StringIdAndConsAddrKey(ConsumerValidatorsKeyPrefix(), consumerId, addr.ToSdkConsAddr()) } // ValidatorsByConsumerAddrKeyPrefix returns the key prefix for storing the mapping from validator addresses @@ -599,7 +533,7 @@ func ValidatorsByConsumerAddrKeyPrefix() byte { // ValidatorsByConsumerAddrKey returns the key for storing the mapping from validator addresses // on consumer chains to validator addresses on the provider chain func ValidatorsByConsumerAddrKey(consumerId string, addr ConsumerConsAddress) []byte { - return ConsumerIdAndConsAddrKey(ValidatorsByConsumerAddrKeyPrefix(), consumerId, addr.ToSdkConsAddr()) + return StringIdAndConsAddrKey(ValidatorsByConsumerAddrKeyPrefix(), consumerId, addr.ToSdkConsAddr()) } // SlashLogKey returns the key to a validator's slash log @@ -623,32 +557,6 @@ func EquivocationEvidenceMinHeightKey(consumerId string) []byte { return append([]byte{mustGetKeyPrefix(EquivocationEvidenceMinHeightKeyName)}, []byte(consumerId)...) } -// ProposedConsumerChainKeyPrefix returns the key prefix for storing proposed consumer chainId -// in consumerAddition gov proposal before voting finishes -func ProposedConsumerChainKeyPrefix() []byte { - return []byte{mustGetKeyPrefix(ProposedConsumerChainKeyName)} -} - -// ProposedConsumerChainKey returns the key of proposed consumer chainId in consumerAddition gov proposal before voting finishes, the stored key format is prefix|proposalID, value is chainID -func ProposedConsumerChainKey(proposalID uint64) []byte { - return ccvtypes.AppendMany( - ProposedConsumerChainKeyPrefix(), - sdk.Uint64ToBigEndian(proposalID), - ) -} - -// ParseProposedConsumerChainKey get the proposalID in the key -func ParseProposedConsumerChainKey(bz []byte) (uint64, error) { - expectedPrefix := ProposedConsumerChainKeyPrefix() - prefixL := len(expectedPrefix) - if prefix := bz[:prefixL]; !bytes.Equal(prefix, expectedPrefix) { - return 0, fmt.Errorf("invalid prefix; expected: %X, got: %X", expectedPrefix, prefix) - } - proposalID := sdk.BigEndianToUint64(bz[prefixL:]) - - return proposalID, nil -} - // ConsumerValidatorKeyPrefix returns the key prefix for storing consumer validators func ConsumerValidatorKeyPrefix() byte { return mustGetKeyPrefix(ConsumerValidatorKeyName) @@ -657,8 +565,7 @@ func ConsumerValidatorKeyPrefix() byte { // ConsumerValidatorKey returns the key for storing consumer validators // for the given consumer chain `consumerId` and validator with `providerAddr` func ConsumerValidatorKey(consumerId string, providerAddr []byte) []byte { - prefix := ConsumerIdWithLenKey(ConsumerValidatorKeyPrefix(), consumerId) - return append(prefix, providerAddr...) + return StringIdAndConsAddrKey(ConsumerValidatorKeyPrefix(), consumerId, sdk.ConsAddress(providerAddr)) } // AllowlistKeyPrefix returns the key prefix for storing consumer chains allowlists @@ -668,10 +575,7 @@ func AllowlistKeyPrefix() byte { // AllowlistKey returns the key for storing consumer chains allowlists func AllowlistKey(consumerId string, providerAddr ProviderConsAddress) []byte { - return append( - ConsumerIdWithLenKey(AllowlistKeyPrefix(), consumerId), - providerAddr.ToSdkConsAddr().Bytes()..., - ) + return StringIdAndConsAddrKey(AllowlistKeyPrefix(), consumerId, providerAddr.ToSdkConsAddr()) } // DenylistKeyPrefix returns the key prefix for storing consumer chains denylists @@ -681,10 +585,7 @@ func DenylistKeyPrefix() byte { // DenylistKey returns the key for storing consumer chains denylists func DenylistKey(consumerId string, providerAddr ProviderConsAddress) []byte { - return append( - ConsumerIdWithLenKey(DenylistKeyPrefix(), consumerId), - providerAddr.ToSdkConsAddr().Bytes()..., - ) + return StringIdAndConsAddrKey(DenylistKeyPrefix(), consumerId, providerAddr.ToSdkConsAddr()) } // OptedInKeyPrefix returns the key prefix for storing whether a validator is opted in on a consumer chain. @@ -694,8 +595,7 @@ func OptedInKeyPrefix() byte { // OptedInKey returns the key used to store whether a validator is opted in on a consumer chain. func OptedInKey(consumerId string, providerAddr ProviderConsAddress) []byte { - prefix := ConsumerIdWithLenKey(OptedInKeyPrefix(), consumerId) - return append(prefix, providerAddr.ToSdkConsAddr().Bytes()...) + return StringIdAndConsAddrKey(OptedInKeyPrefix(), consumerId, providerAddr.ToSdkConsAddr()) } // ConsumerRewardsAllocationKey returns the key used to store the ICS rewards per consumer chain @@ -710,7 +610,7 @@ func ConsumerCommissionRateKeyPrefix() byte { // ConsumerCommissionRateKey returns the key used to store the commission rate per validator per consumer chain. func ConsumerCommissionRateKey(consumerId string, providerAddr ProviderConsAddress) []byte { - return ConsumerIdAndConsAddrKey( + return StringIdAndConsAddrKey( ConsumerCommissionRateKeyPrefix(), consumerId, providerAddr.ToSdkConsAddr(), @@ -718,7 +618,7 @@ func ConsumerCommissionRateKey(consumerId string, providerAddr ProviderConsAddre } func MinimumPowerInTopNKey(consumerId string) []byte { - return ConsumerIdWithLenKey(mustGetKeyPrefix(MinimumPowerInTopNKeyName), consumerId) + return StringIdWithLenKey(mustGetKeyPrefix(MinimumPowerInTopNKeyName), consumerId) } // ConsumerAddrsToPruneV2KeyPrefix returns the key prefix for storing the consumer validators @@ -732,7 +632,7 @@ func ConsumerAddrsToPruneV2KeyPrefix() byte { // ConsumerAddrsToPruneV2Key returns the key for storing the consumer validators // addresses that need to be pruned. func ConsumerAddrsToPruneV2Key(consumerId string, pruneTs time.Time) []byte { - return ConsumerIdAndTsKey(ConsumerAddrsToPruneV2KeyPrefix(), consumerId, pruneTs) + return StringIdAndTsKey(ConsumerAddrsToPruneV2KeyPrefix(), consumerId, pruneTs) } // LastProviderConsensusValsPrefix returns the key prefix for storing the last validator set sent to the consensus engine of the provider chain @@ -747,12 +647,12 @@ func ConsumerIdKey() []byte { // ConsumerIdToChainIdKey returns the key used to store the chain id of this consumer id func ConsumerIdToChainIdKey(consumerId string) []byte { - return ConsumerIdWithLenKey(mustGetKeyPrefix(ConsumerIdToChainIdKeyName), consumerId) + return StringIdWithLenKey(mustGetKeyPrefix(ConsumerIdToChainIdKeyName), consumerId) } // ConsumerIdToOwnerAddressKey returns the owner address of this consumer id func ConsumerIdToOwnerAddressKey(consumerId string) []byte { - return ConsumerIdWithLenKey(mustGetKeyPrefix(ConsumerIdToOwnerAddressKeyName), consumerId) + return StringIdWithLenKey(mustGetKeyPrefix(ConsumerIdToOwnerAddressKeyName), consumerId) } // ConsumerIdToMetadataKeyPrefix returns the key prefix for storing consumer metadata @@ -762,7 +662,7 @@ func ConsumerIdToMetadataKeyPrefix() byte { // ConsumerIdToMetadataKey returns the key used to store the metadata that corresponds to this consumer id func ConsumerIdToMetadataKey(consumerId string) []byte { - return ConsumerIdWithLenKey(ConsumerIdToMetadataKeyPrefix(), consumerId) + return StringIdWithLenKey(ConsumerIdToMetadataKeyPrefix(), consumerId) } // ConsumerIdToInitializationParametersKeyPrefix returns the key prefix for storing consumer initialization records @@ -772,22 +672,17 @@ func ConsumerIdToInitializationParametersKeyPrefix() byte { // ConsumerIdToInitializationParametersKey returns the key used to store the initialization record that corresponds to this consumer id func ConsumerIdToInitializationParametersKey(consumerId string) []byte { - return ConsumerIdWithLenKey(ConsumerIdToInitializationParametersKeyPrefix(), consumerId) + return StringIdWithLenKey(ConsumerIdToInitializationParametersKeyPrefix(), consumerId) } // ConsumerIdToPowerShapingParametersKey returns the key used to store the update record that corresponds to this consumer id func ConsumerIdToPowerShapingParametersKey(consumerId string) []byte { - return ConsumerIdWithLenKey(mustGetKeyPrefix(ConsumerIdToPowerShapingParameters), consumerId) + return StringIdWithLenKey(mustGetKeyPrefix(ConsumerIdToPowerShapingParameters), consumerId) } // ConsumerIdToPhaseKey returns the key used to store the phase that corresponds to this consumer id func ConsumerIdToPhaseKey(consumerId string) []byte { - return ConsumerIdWithLenKey(mustGetKeyPrefix(ConsumerIdToPhaseKeyName), consumerId) -} - -// ConsumerIdToStopTimeKey returns the key used to store the stop time that corresponds to a to-be-stopped chain with consumer id -func ConsumerIdToStopTimeKey(consumerId string) []byte { - return ConsumerIdWithLenKey(mustGetKeyPrefix(ConsumerIdToStopTimeKeyName), consumerId) + return StringIdWithLenKey(mustGetKeyPrefix(ConsumerIdToPhaseKeyName), consumerId) } // ConsumerIdToStopTimeKeyPrefix returns the key prefix for storing the stop times of consumer chains @@ -796,6 +691,11 @@ func ConsumerIdToStopTimeKeyPrefix() byte { return mustGetKeyPrefix(ConsumerIdToStopTimeKeyName) } +// ConsumerIdToStopTimeKey returns the key used to store the stop time that corresponds to a to-be-stopped chain with consumer id +func ConsumerIdToStopTimeKey(consumerId string) []byte { + return StringIdWithLenKey(ConsumerIdToStopTimeKeyPrefix(), consumerId) +} + // SpawnTimeToConsumerIdsKeyPrefix returns the key prefix for storing pending chains that are to be launched func SpawnTimeToConsumerIdsKeyPrefix() byte { return mustGetKeyPrefix(SpawnTimeToConsumerIdsKeyName) @@ -871,108 +771,98 @@ func ClientIdToConsumerIdKey(clientId string) []byte { // Generic helpers section // -// ConsumerIdAndTsKey returns the key with the following format: -// bytePrefix | len(consumerId) | consumerId | timestamp -func ConsumerIdAndTsKey(prefix byte, consumerId string, timestamp time.Time) []byte { - partialKey := ConsumerIdWithLenKey(prefix, consumerId) - timeBz := sdk.FormatTimeBytes(timestamp) +// StringIdAndTsKey returns the key with the following format: +// bytePrefix | len(stringId) | stringId | timestamp +func StringIdAndTsKey(prefix byte, stringId string, timestamp time.Time) []byte { return ccvtypes.AppendMany( - // Append the partialKey - partialKey, - // Append the time bytes - timeBz, + StringIdWithLenKey(prefix, stringId), + sdk.FormatTimeBytes(timestamp), ) } -// ParseConsumerIdAndTsKey returns the consumer id and time for a ConsumerIdIdAndTs key -func ParseConsumerIdAndTsKey(prefix byte, bz []byte) (string, time.Time, error) { +// ParseStringIdAndTsKey returns the string id and time for a StringIdAndTs key +func ParseStringIdAndTsKey(prefix byte, bz []byte) (string, time.Time, error) { expectedPrefix := []byte{prefix} prefixL := len(expectedPrefix) if prefix := bz[:prefixL]; !bytes.Equal(prefix, expectedPrefix) { return "", time.Time{}, fmt.Errorf("invalid prefix; expected: %X, got: %X", expectedPrefix, prefix) } - consumerIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) - consumerId := string(bz[prefixL+8 : prefixL+8+int(consumerIdL)]) - timestamp, err := sdk.ParseTimeBytes(bz[prefixL+8+int(consumerIdL):]) + stringIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) + stringId := string(bz[prefixL+8 : prefixL+8+int(stringIdL)]) + timestamp, err := sdk.ParseTimeBytes(bz[prefixL+8+int(stringIdL):]) if err != nil { return "", time.Time{}, err } - return consumerId, timestamp, nil + return stringId, timestamp, nil } -// ConsumerIdWithLenKey returns the key with the following format: -// bytePrefix | len(consumerId) | consumerId -func ConsumerIdWithLenKey(prefix byte, consumerId string) []byte { +// StringIdWithLenKey returns the key with the following format: +// bytePrefix | len(stringId) | stringId +func StringIdWithLenKey(prefix byte, stringId string) []byte { return ccvtypes.AppendMany( // Append the prefix []byte{prefix}, - // Append the consumer id length - sdk.Uint64ToBigEndian(uint64(len(consumerId))), - // Append the consumer id - []byte(consumerId), + // Append the string id length + sdk.Uint64ToBigEndian(uint64(len(stringId))), + // Append the string id + []byte(stringId), ) } -// ParseConsumerIdWithLenKey returns the consumer id ConsumerIdWithLen key -func ParseConsumerIdWithLenKey(prefix byte, bz []byte) (string, error) { +// ParseStringIdWithLenKey returns the stringId of a StringIdWithLen key +func ParseStringIdWithLenKey(prefix byte, bz []byte) (string, error) { expectedPrefix := []byte{prefix} prefixL := len(expectedPrefix) if prefix := bz[:prefixL]; !bytes.Equal(prefix, expectedPrefix) { return "", fmt.Errorf("invalid prefix; expected: %X, got: %X", expectedPrefix, prefix) } - consumerIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) - consumerId := string(bz[prefixL+8 : prefixL+8+int(consumerIdL)]) - return consumerId, nil + stringIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) + stringId := string(bz[prefixL+8 : prefixL+8+int(stringIdL)]) + return stringId, nil } -// ChainIdAndUintIdKey returns the key with the following format: -// bytePrefix | len(chainID) | chainID | uint64(ID) -func ChainIdAndUintIdKey(prefix byte, chainID string, uintId uint64) []byte { - partialKey := ConsumerIdWithLenKey(prefix, chainID) +// StringIdAndUintIdKey returns the key with the following format: +// bytePrefix | len(stringId) | stringId | uint64(ID) +func StringIdAndUintIdKey(prefix byte, stringId string, uintId uint64) []byte { return ccvtypes.AppendMany( - // Append the partialKey - partialKey, - // Append the uint id bytes + StringIdWithLenKey(prefix, stringId), sdk.Uint64ToBigEndian(uintId), ) } -// ParseChainIdAndUintIdKey returns the chain ID and uint ID for a ChainIdAndUintId key -func ParseChainIdAndUintIdKey(prefix byte, bz []byte) (string, uint64, error) { +// ParseStringIdAndUintIdKey returns the string ID and uint ID for a StringIdAndUintId key +func ParseStringIdAndUintIdKey(prefix byte, bz []byte) (string, uint64, error) { expectedPrefix := []byte{prefix} prefixL := len(expectedPrefix) if prefix := bz[:prefixL]; !bytes.Equal(prefix, expectedPrefix) { return "", 0, fmt.Errorf("invalid prefix; expected: %X, got: %X", expectedPrefix, prefix) } - chainIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) - chainID := string(bz[prefixL+8 : prefixL+8+int(chainIdL)]) - uintID := sdk.BigEndianToUint64(bz[prefixL+8+int(chainIdL):]) - return chainID, uintID, nil + stringIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) + stringId := string(bz[prefixL+8 : prefixL+8+int(stringIdL)]) + uintID := sdk.BigEndianToUint64(bz[prefixL+8+int(stringIdL):]) + return stringId, uintID, nil } -// ConsumerIdAndConsAddrKey returns the key with the following format: -// bytePrefix | len(consumerId) | consumerId | ConsAddress -func ConsumerIdAndConsAddrKey(prefix byte, consumerId string, addr sdk.ConsAddress) []byte { - partialKey := ConsumerIdWithLenKey(prefix, consumerId) +// StringIdAndConsAddrKey returns the key with the following format: +// bytePrefix | len(stringId) | stringId | ConsAddress +func StringIdAndConsAddrKey(prefix byte, stringId string, addr sdk.ConsAddress) []byte { return ccvtypes.AppendMany( - // Append the partialKey - partialKey, - // Append the addr bytes + StringIdWithLenKey(prefix, stringId), addr, ) } -// ParseChainIdAndConsAddrKey returns the chain ID and ConsAddress for a ConsumerIdAndConsAddrKey key -func ParseChainIdAndConsAddrKey(prefix byte, bz []byte) (string, sdk.ConsAddress, error) { +// ParseStringIdAndConsAddrKey returns the string ID and ConsAddress for a StringIdAndConsAddr key +func ParseStringIdAndConsAddrKey(prefix byte, bz []byte) (string, sdk.ConsAddress, error) { expectedPrefix := []byte{prefix} prefixL := len(expectedPrefix) if prefix := bz[:prefixL]; !bytes.Equal(prefix, expectedPrefix) { return "", nil, fmt.Errorf("invalid prefix; expected: %X, got: %X", expectedPrefix, prefix) } - chainIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) - chainID := string(bz[prefixL+8 : prefixL+8+int(chainIdL)]) - addr := bz[prefixL+8+int(chainIdL):] - return chainID, addr, nil + stringIdL := sdk.BigEndianToUint64(bz[prefixL : prefixL+8]) + stringId := string(bz[prefixL+8 : prefixL+8+int(stringIdL)]) + addr := bz[prefixL+8+int(stringIdL):] + return stringId, addr, nil } // diff --git a/x/ccv/provider/types/keys_test.go b/x/ccv/provider/types/keys_test.go index f3ecb4da6c..7f475e0b14 100644 --- a/x/ccv/provider/types/keys_test.go +++ b/x/ccv/provider/types/keys_test.go @@ -41,7 +41,7 @@ func TestPreserveBytePrefix(t *testing.T) { i++ require.Equal(t, byte(4), providertypes.SlashMeterReplenishTimeCandidateKey()[0]) i++ - require.Equal(t, byte(5), providertypes.ConsumerIdToChannelIdKey("chainID")[0]) + require.Equal(t, byte(5), providertypes.ConsumerIdToChannelIdKey("13")[0]) i++ require.Equal(t, byte(6), providertypes.ChannelIdToConsumerIdKeyPrefix()[0]) i++ @@ -49,9 +49,9 @@ func TestPreserveBytePrefix(t *testing.T) { i++ // reserve 8 as deprecated i++ - require.Equal(t, byte(9), providertypes.PendingCAPKeyPrefix()[0]) + // reserve 9 as deprecated i++ - require.Equal(t, byte(10), providertypes.PendingCRPKeyPrefix()[0]) + // reserve 10 as deprecated i++ // reserve 11 as deprecated i++ @@ -59,19 +59,19 @@ func TestPreserveBytePrefix(t *testing.T) { i++ require.Equal(t, byte(13), providertypes.ValsetUpdateBlockHeightKeyPrefix()[0]) i++ - require.Equal(t, byte(14), providertypes.ConsumerGenesisKey("chainID")[0]) + require.Equal(t, byte(14), providertypes.ConsumerGenesisKey("13")[0]) i++ - require.Equal(t, byte(15), providertypes.SlashAcksKey("chainID")[0]) + require.Equal(t, byte(15), providertypes.SlashAcksKey("13")[0]) i++ - require.Equal(t, byte(16), providertypes.InitChainHeightKey("chainID")[0]) + require.Equal(t, byte(16), providertypes.InitChainHeightKey("13")[0]) i++ - require.Equal(t, byte(17), providertypes.PendingVSCsKey("chainID")[0]) + require.Equal(t, byte(17), providertypes.PendingVSCsKey("13")[0]) i++ // reserve 18 as deprecated i++ - require.Equal(t, byte(19), providertypes.ThrottledPacketDataSizeKey("chainID")[0]) + // reserve 19 as deprecated i++ - require.Equal(t, byte(20), providertypes.ThrottledPacketDataKeyPrefix()) + // reserve 20 as deprecated i++ // DEPRECATED // require.Equal(t, uint8(21), providertypes.GlobalSlashEntryKeyPrefix()[0]) @@ -90,32 +90,32 @@ func TestPreserveBytePrefix(t *testing.T) { i++ // reserve 28 as deprecated i++ - require.Equal(t, byte(29), providertypes.EquivocationEvidenceMinHeightKey("chainID")[0]) + require.Equal(t, byte(29), providertypes.EquivocationEvidenceMinHeightKey("13")[0]) i++ - require.Equal(t, byte(30), providertypes.ProposedConsumerChainKeyPrefix()[0]) + // reserve 30 as deprecated i++ require.Equal(t, byte(31), providertypes.ConsumerValidatorKeyPrefix()) i++ require.Equal(t, byte(32), providertypes.OptedInKeyPrefix()) i++ // DEPRECATED - //require.Equal(t, byte(33), providertypes.TopNKey("chainID")[0]) + //require.Equal(t, byte(33), providertypes.TopNKey("13")[0]) i++ // DEPRECATED - //require.Equal(t, byte(34), providertypes.ValidatorsPowerCapKey("chainID")[0]) + //require.Equal(t, byte(34), providertypes.ValidatorsPowerCapKey("13")[0]) i++ // DEPRECATED - //require.Equal(t, byte(35), providertypes.ValidatorSetCapKey("chainID")[0]) + //require.Equal(t, byte(35), providertypes.ValidatorSetCapKey("13")[0]) i++ require.Equal(t, byte(36), providertypes.AllowlistKeyPrefix()) i++ require.Equal(t, byte(37), providertypes.DenylistKeyPrefix()) i++ - require.Equal(t, byte(38), providertypes.ConsumerRewardsAllocationKey("chainID")[0]) + require.Equal(t, byte(38), providertypes.ConsumerRewardsAllocationKey("13")[0]) i++ require.Equal(t, byte(39), providertypes.ConsumerCommissionRateKeyPrefix()) i++ - require.Equal(t, byte(40), providertypes.MinimumPowerInTopNKey("chainID")[0]) + require.Equal(t, byte(40), providertypes.MinimumPowerInTopNKey("13")[0]) i++ require.Equal(t, byte(41), providertypes.ConsumerAddrsToPruneV2KeyPrefix()) i++ @@ -123,17 +123,17 @@ func TestPreserveBytePrefix(t *testing.T) { i++ require.Equal(t, byte(43), providertypes.ConsumerIdKey()[0]) i++ - require.Equal(t, byte(44), providertypes.ConsumerIdToChainIdKey("consumerId")[0]) + require.Equal(t, byte(44), providertypes.ConsumerIdToChainIdKey("13")[0]) i++ - require.Equal(t, byte(45), providertypes.ConsumerIdToOwnerAddressKey("consumerId")[0]) + require.Equal(t, byte(45), providertypes.ConsumerIdToOwnerAddressKey("13")[0]) i++ require.Equal(t, byte(46), providertypes.ConsumerIdToMetadataKeyPrefix()) i++ require.Equal(t, byte(47), providertypes.ConsumerIdToInitializationParametersKeyPrefix()) i++ - require.Equal(t, byte(48), providertypes.ConsumerIdToPowerShapingParametersKey("consumerId")[0]) + require.Equal(t, byte(48), providertypes.ConsumerIdToPowerShapingParametersKey("13")[0]) i++ - require.Equal(t, byte(49), providertypes.ConsumerIdToPhaseKey("consumerId")[0]) + require.Equal(t, byte(49), providertypes.ConsumerIdToPhaseKey("13")[0]) i++ require.Equal(t, byte(50), providertypes.ConsumerIdToStopTimeKeyPrefix()) i++ @@ -180,41 +180,36 @@ func getAllFullyDefinedKeys() [][]byte { providertypes.ValidatorSetUpdateIdKey(), providertypes.SlashMeterKey(), providertypes.SlashMeterReplenishTimeCandidateKey(), - providertypes.ConsumerIdToChannelIdKey("chainID"), + providertypes.ConsumerIdToChannelIdKey("13"), providertypes.ChannelToConsumerIdKey("channelID"), - providertypes.ConsumerIdToClientIdKey("chainID"), - providertypes.PendingCAPKey(time.Time{}, "chainID"), - providertypes.PendingCRPKey(time.Time{}, "chainID"), + providertypes.ConsumerIdToClientIdKey("13"), providertypes.ValsetUpdateBlockHeightKey(7), - providertypes.ConsumerGenesisKey("chainID"), - providertypes.SlashAcksKey("chainID"), - providertypes.InitChainHeightKey("chainID"), - providertypes.PendingVSCsKey("chainID"), - providertypes.ThrottledPacketDataSizeKey("chainID"), - providertypes.ThrottledPacketDataKey("chainID", 88), - providertypes.ConsumerValidatorsKey("chainID", providertypes.NewProviderConsAddress([]byte{0x05})), - providertypes.ValidatorsByConsumerAddrKey("chainID", providertypes.NewConsumerConsAddress([]byte{0x05})), + providertypes.ConsumerGenesisKey("13"), + providertypes.SlashAcksKey("13"), + providertypes.InitChainHeightKey("13"), + providertypes.PendingVSCsKey("13"), + providertypes.ConsumerValidatorsKey("13", providertypes.NewProviderConsAddress([]byte{0x05})), + providertypes.ValidatorsByConsumerAddrKey("13", providertypes.NewConsumerConsAddress([]byte{0x05})), providertypes.SlashLogKey(providertypes.NewProviderConsAddress([]byte{0x05})), providertypes.ConsumerRewardDenomsKey("uatom"), - providertypes.EquivocationEvidenceMinHeightKey("chainID"), - providertypes.ProposedConsumerChainKey(1), - providertypes.ConsumerValidatorKey("chainID", providertypes.NewProviderConsAddress([]byte{0x05}).Address.Bytes()), - providertypes.AllowlistKey("chainID", providertypes.NewProviderConsAddress([]byte{0x05})), - providertypes.DenylistKey("chainID", providertypes.NewProviderConsAddress([]byte{0x05})), - providertypes.OptedInKey("chainID", providertypes.NewProviderConsAddress([]byte{0x05})), - providertypes.ConsumerRewardsAllocationKey("chainID"), - providertypes.ConsumerCommissionRateKey("chainID", providertypes.NewProviderConsAddress([]byte{0x05})), - providertypes.MinimumPowerInTopNKey("chainID"), - providertypes.ConsumerAddrsToPruneV2Key("chainID", time.Time{}), + providertypes.EquivocationEvidenceMinHeightKey("13"), + providertypes.ConsumerValidatorKey("13", providertypes.NewProviderConsAddress([]byte{0x05}).Address.Bytes()), + providertypes.AllowlistKey("13", providertypes.NewProviderConsAddress([]byte{0x05})), + providertypes.DenylistKey("13", providertypes.NewProviderConsAddress([]byte{0x05})), + providertypes.OptedInKey("13", providertypes.NewProviderConsAddress([]byte{0x05})), + providertypes.ConsumerRewardsAllocationKey("13"), + providertypes.ConsumerCommissionRateKey("13", providertypes.NewProviderConsAddress([]byte{0x05})), + providertypes.MinimumPowerInTopNKey("13"), + providertypes.ConsumerAddrsToPruneV2Key("13", time.Time{}), providerkeeper.GetValidatorKey(types.LastProviderConsensusValsPrefix(), providertypes.NewProviderConsAddress([]byte{0x05})), providertypes.ConsumerIdKey(), - providertypes.ConsumerIdToChainIdKey("consumerId"), - providertypes.ConsumerIdToOwnerAddressKey("consumerId"), - providertypes.ConsumerIdToMetadataKey("consumerId"), - providertypes.ConsumerIdToInitializationParametersKey("consumerId"), - providertypes.ConsumerIdToPowerShapingParametersKey("consumerId"), - providertypes.ConsumerIdToPhaseKey("consumerId"), - providertypes.ConsumerIdToStopTimeKey("consumerId"), + providertypes.ConsumerIdToChainIdKey("13"), + providertypes.ConsumerIdToOwnerAddressKey("13"), + providertypes.ConsumerIdToMetadataKey("13"), + providertypes.ConsumerIdToInitializationParametersKey("13"), + providertypes.ConsumerIdToPowerShapingParametersKey("13"), + providertypes.ConsumerIdToPhaseKey("13"), + providertypes.ConsumerIdToStopTimeKey("13"), providertypes.SpawnTimeToConsumerIdsKey(time.Time{}), providertypes.StopTimeToConsumerIdsKey(time.Time{}), providertypes.ProviderConsAddrToOptedInConsumerIdsKey(providertypes.NewProviderConsAddress([]byte{0x05})), @@ -222,86 +217,59 @@ func getAllFullyDefinedKeys() [][]byte { } } -// Tests the construction and parsing of ChainIdAndTs keys -func TestChainIdAndTsKeyAndParse(t *testing.T) { +// Tests the construction and parsing of StringIdAndTs keys +func TestStringIdAndTsKeyAndParse(t *testing.T) { tests := []struct { - prefix byte - chainID string - timestamp time.Time + prefix byte + consumerID string + timestamp time.Time }{ - {prefix: 0x01, chainID: "1", timestamp: time.Now()}, - {prefix: 0x02, chainID: "some other ID", timestamp: time.Date( + {prefix: 0x01, consumerID: "1", timestamp: time.Now()}, + {prefix: 0x02, consumerID: "111", timestamp: time.Date( 2003, 11, 17, 20, 34, 58, 651387237, time.UTC)}, - {prefix: 0x03, chainID: "some other other chain ID", timestamp: time.Now().Add(5000 * time.Hour)}, + {prefix: 0x03, consumerID: "2000", timestamp: time.Now().Add(5000 * time.Hour)}, } for _, test := range tests { - key := providertypes.ConsumerIdAndTsKey(test.prefix, test.chainID, test.timestamp) + key := providertypes.StringIdAndTsKey(test.prefix, test.consumerID, test.timestamp) require.NotEmpty(t, key) - // Expected bytes = prefix + chainID length + chainID + time bytes - expectedLen := 1 + 8 + len(test.chainID) + len(sdk.FormatTimeBytes(time.Time{})) + // Expected bytes = prefix + consumerID length + consumerID + time bytes + expectedLen := 1 + 8 + len(test.consumerID) + len(sdk.FormatTimeBytes(time.Time{})) require.Equal(t, expectedLen, len(key)) - parsedID, parsedTime, err := providertypes.ParseConsumerIdAndTsKey(test.prefix, key) - require.Equal(t, test.chainID, parsedID) + parsedID, parsedTime, err := providertypes.ParseStringIdAndTsKey(test.prefix, key) + require.Equal(t, test.consumerID, parsedID) require.Equal(t, test.timestamp.UTC(), parsedTime.UTC()) require.NoError(t, err) } } -// Tests the construction and parsing of ChainIdAndUintId keys -func TestChainIdAndUintIdAndParse(t *testing.T) { +// Tests the construction and parsing of StringIdAndUintId keys +func TestStringIdAndUintIdAndParse(t *testing.T) { tests := []struct { - prefix byte - chainID string - uintID uint64 + prefix byte + consumerID string + uintID uint64 }{ - {prefix: 0x01, chainID: "1", uintID: 1}, - {prefix: 0x02, chainID: "some other ID", uintID: 2}, - {prefix: 0x03, chainID: "some other other chain ID", uintID: 3}, + {prefix: 0x01, consumerID: "1", uintID: 1}, + {prefix: 0x02, consumerID: "13", uintID: 2}, + {prefix: 0x03, consumerID: "245", uintID: 3}, } for _, test := range tests { - key := providertypes.ChainIdAndUintIdKey(test.prefix, test.chainID, test.uintID) + key := providertypes.StringIdAndUintIdKey(test.prefix, test.consumerID, test.uintID) require.NotEmpty(t, key) - // Expected bytes = prefix + chainID length + chainID + vscId bytes - expectedLen := 1 + 8 + len(test.chainID) + 8 + // Expected bytes = prefix + consumerID length + consumerID + vscId bytes + expectedLen := 1 + 8 + len(test.consumerID) + 8 require.Equal(t, expectedLen, len(key)) - parsedChainID, parsedUintID, err := providertypes.ParseChainIdAndUintIdKey(test.prefix, key) - require.Equal(t, test.chainID, parsedChainID) + parsedChainID, parsedUintID, err := providertypes.ParseStringIdAndUintIdKey(test.prefix, key) + require.Equal(t, test.consumerID, parsedChainID) require.Equal(t, test.uintID, parsedUintID) require.NoError(t, err) } } -// Tests the construction and parsing of keys for throttled packet data -func TestThrottledPacketDataKeyAndParse(t *testing.T) { - tests := []struct { - consumerChainID string - ibcSeqNum uint64 - }{ - {consumerChainID: "some chain id", ibcSeqNum: 45}, - {consumerChainID: "some chain id that is longer", ibcSeqNum: 54038}, - {consumerChainID: "some chain id that is longer-er ", ibcSeqNum: 9999999999999999999}, - } - - for _, test := range tests { - key := providertypes.ThrottledPacketDataKey(test.consumerChainID, test.ibcSeqNum) - require.NotEmpty(t, key) - // This key should be of len: prefix + chainID length + chainID + ibcSeqNum - require.Equal(t, 1+8+len(test.consumerChainID)+8, len(key)) - parsedChainID, parsedSeqNum := providertypes.MustParseThrottledPacketDataKey(key) - require.Equal(t, test.consumerChainID, parsedChainID) - require.Equal(t, test.ibcSeqNum, parsedSeqNum) - } - - // Sanity check that two keys with different chain ids but same seq num are different - key1 := providertypes.ThrottledPacketDataKey("chain-7", 45) - key2 := providertypes.ThrottledPacketDataKey("chain-8", 45) - require.NotEqual(t, key1, key2) -} - -// Tests the construction and parsing of ChainIdAndConsAddr keys -func TestChainIdAndConsAddrAndParse(t *testing.T) { +// Tests the construction and parsing of StringIdAndConsAddr keys +func TestStringIdAndConsAddrAndParse(t *testing.T) { cIds := []*cryptoutil.CryptoIdentity{ cryptoutil.NewCryptoIdentityFromIntSeed(99998), cryptoutil.NewCryptoIdentityFromIntSeed(99999), @@ -312,23 +280,23 @@ func TestChainIdAndConsAddrAndParse(t *testing.T) { pubKey3 := cIds[2].TMCryptoPubKey() tests := []struct { - prefix byte - chainID string - addr sdk.ConsAddress + prefix byte + consumerId string + addr sdk.ConsAddress }{ - {prefix: 0x01, chainID: "1", addr: sdk.ConsAddress(pubKey1.Address())}, - {prefix: 0x02, chainID: "some other ID", addr: sdk.ConsAddress(pubKey2.Address())}, - {prefix: 0x03, chainID: "some other other chain ID", addr: sdk.ConsAddress(pubKey3.Address())}, + {prefix: 0x01, consumerId: "1", addr: sdk.ConsAddress(pubKey1.Address())}, + {prefix: 0x02, consumerId: "23", addr: sdk.ConsAddress(pubKey2.Address())}, + {prefix: 0x03, consumerId: "456", addr: sdk.ConsAddress(pubKey3.Address())}, } for _, test := range tests { - key := providertypes.ConsumerIdAndConsAddrKey(test.prefix, test.chainID, test.addr) + key := providertypes.StringIdAndConsAddrKey(test.prefix, test.consumerId, test.addr) require.NotEmpty(t, key) - // Expected bytes = prefix + chainID length + chainID + consAddr bytes - expectedLen := 1 + 8 + len(test.chainID) + len(test.addr) + // Expected bytes = prefix + consumerID length + consumerID + consAddr bytes + expectedLen := 1 + 8 + len(test.consumerId) + len(test.addr) require.Equal(t, expectedLen, len(key)) - parsedID, parsedConsAddr, err := providertypes.ParseChainIdAndConsAddrKey(test.prefix, key) - require.Equal(t, test.chainID, parsedID) + parsedID, parsedConsAddr, err := providertypes.ParseStringIdAndConsAddrKey(test.prefix, key) + require.Equal(t, test.consumerId, parsedID) require.Equal(t, test.addr, parsedConsAddr) require.NoError(t, err) } @@ -383,21 +351,3 @@ func TestKeysWithUint64Payload(t *testing.T) { } } } - -func TestParseProposedConsumerChainKey(t *testing.T) { - tests := []struct { - chainID string - proposalID uint64 - }{ - {chainID: "1", proposalID: 1}, - {chainID: "some other ID", proposalID: 12}, - {chainID: "some other other chain ID", proposalID: 123}, - } - - for _, test := range tests { - key := providertypes.ProposedConsumerChainKey(test.proposalID) - pID, err := providertypes.ParseProposedConsumerChainKey(key) - require.NoError(t, err) - require.Equal(t, pID, test.proposalID) - } -} diff --git a/x/ccv/provider/types/query.pb.go b/x/ccv/provider/types/query.pb.go index 568b8d34ae..5a1a2a4e15 100644 --- a/x/ccv/provider/types/query.pb.go +++ b/x/ccv/provider/types/query.pb.go @@ -236,174 +236,6 @@ func (m *QueryConsumerChainsResponse) GetChains() []*Chain { return nil } -type QueryConsumerChainStartProposalsRequest struct { -} - -func (m *QueryConsumerChainStartProposalsRequest) Reset() { - *m = QueryConsumerChainStartProposalsRequest{} -} -func (m *QueryConsumerChainStartProposalsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryConsumerChainStartProposalsRequest) ProtoMessage() {} -func (*QueryConsumerChainStartProposalsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{4} -} -func (m *QueryConsumerChainStartProposalsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryConsumerChainStartProposalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryConsumerChainStartProposalsRequest.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 *QueryConsumerChainStartProposalsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryConsumerChainStartProposalsRequest.Merge(m, src) -} -func (m *QueryConsumerChainStartProposalsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryConsumerChainStartProposalsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryConsumerChainStartProposalsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryConsumerChainStartProposalsRequest proto.InternalMessageInfo - -type QueryConsumerChainStartProposalsResponse struct { - Proposals *ConsumerAdditionProposals `protobuf:"bytes,1,opt,name=proposals,proto3" json:"proposals,omitempty"` -} - -func (m *QueryConsumerChainStartProposalsResponse) Reset() { - *m = QueryConsumerChainStartProposalsResponse{} -} -func (m *QueryConsumerChainStartProposalsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryConsumerChainStartProposalsResponse) ProtoMessage() {} -func (*QueryConsumerChainStartProposalsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{5} -} -func (m *QueryConsumerChainStartProposalsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryConsumerChainStartProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryConsumerChainStartProposalsResponse.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 *QueryConsumerChainStartProposalsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryConsumerChainStartProposalsResponse.Merge(m, src) -} -func (m *QueryConsumerChainStartProposalsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryConsumerChainStartProposalsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryConsumerChainStartProposalsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryConsumerChainStartProposalsResponse proto.InternalMessageInfo - -func (m *QueryConsumerChainStartProposalsResponse) GetProposals() *ConsumerAdditionProposals { - if m != nil { - return m.Proposals - } - return nil -} - -type QueryConsumerChainStopProposalsRequest struct { -} - -func (m *QueryConsumerChainStopProposalsRequest) Reset() { - *m = QueryConsumerChainStopProposalsRequest{} -} -func (m *QueryConsumerChainStopProposalsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryConsumerChainStopProposalsRequest) ProtoMessage() {} -func (*QueryConsumerChainStopProposalsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{6} -} -func (m *QueryConsumerChainStopProposalsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryConsumerChainStopProposalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryConsumerChainStopProposalsRequest.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 *QueryConsumerChainStopProposalsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryConsumerChainStopProposalsRequest.Merge(m, src) -} -func (m *QueryConsumerChainStopProposalsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryConsumerChainStopProposalsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryConsumerChainStopProposalsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryConsumerChainStopProposalsRequest proto.InternalMessageInfo - -type QueryConsumerChainStopProposalsResponse struct { - Proposals *ConsumerRemovalProposals `protobuf:"bytes,1,opt,name=proposals,proto3" json:"proposals,omitempty"` -} - -func (m *QueryConsumerChainStopProposalsResponse) Reset() { - *m = QueryConsumerChainStopProposalsResponse{} -} -func (m *QueryConsumerChainStopProposalsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryConsumerChainStopProposalsResponse) ProtoMessage() {} -func (*QueryConsumerChainStopProposalsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{7} -} -func (m *QueryConsumerChainStopProposalsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryConsumerChainStopProposalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryConsumerChainStopProposalsResponse.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 *QueryConsumerChainStopProposalsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryConsumerChainStopProposalsResponse.Merge(m, src) -} -func (m *QueryConsumerChainStopProposalsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryConsumerChainStopProposalsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryConsumerChainStopProposalsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryConsumerChainStopProposalsResponse proto.InternalMessageInfo - -func (m *QueryConsumerChainStopProposalsResponse) GetProposals() *ConsumerRemovalProposals { - if m != nil { - return m.Proposals - } - return nil -} - type Chain struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` @@ -436,7 +268,7 @@ func (m *Chain) Reset() { *m = Chain{} } func (m *Chain) String() string { return proto.CompactTextString(m) } func (*Chain) ProtoMessage() {} func (*Chain) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{8} + return fileDescriptor_422512d7b7586cd7, []int{4} } func (m *Chain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -562,7 +394,7 @@ func (m *QueryValidatorConsumerAddrRequest) Reset() { *m = QueryValidato func (m *QueryValidatorConsumerAddrRequest) String() string { return proto.CompactTextString(m) } func (*QueryValidatorConsumerAddrRequest) ProtoMessage() {} func (*QueryValidatorConsumerAddrRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{9} + return fileDescriptor_422512d7b7586cd7, []int{5} } func (m *QueryValidatorConsumerAddrRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -600,7 +432,7 @@ func (m *QueryValidatorConsumerAddrResponse) Reset() { *m = QueryValidat func (m *QueryValidatorConsumerAddrResponse) String() string { return proto.CompactTextString(m) } func (*QueryValidatorConsumerAddrResponse) ProtoMessage() {} func (*QueryValidatorConsumerAddrResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{10} + return fileDescriptor_422512d7b7586cd7, []int{6} } func (m *QueryValidatorConsumerAddrResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -649,7 +481,7 @@ func (m *QueryValidatorProviderAddrRequest) Reset() { *m = QueryValidato func (m *QueryValidatorProviderAddrRequest) String() string { return proto.CompactTextString(m) } func (*QueryValidatorProviderAddrRequest) ProtoMessage() {} func (*QueryValidatorProviderAddrRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{11} + return fileDescriptor_422512d7b7586cd7, []int{7} } func (m *QueryValidatorProviderAddrRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -687,7 +519,7 @@ func (m *QueryValidatorProviderAddrResponse) Reset() { *m = QueryValidat func (m *QueryValidatorProviderAddrResponse) String() string { return proto.CompactTextString(m) } func (*QueryValidatorProviderAddrResponse) ProtoMessage() {} func (*QueryValidatorProviderAddrResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{12} + return fileDescriptor_422512d7b7586cd7, []int{8} } func (m *QueryValidatorProviderAddrResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -730,7 +562,7 @@ func (m *QueryThrottleStateRequest) Reset() { *m = QueryThrottleStateReq func (m *QueryThrottleStateRequest) String() string { return proto.CompactTextString(m) } func (*QueryThrottleStateRequest) ProtoMessage() {} func (*QueryThrottleStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{13} + return fileDescriptor_422512d7b7586cd7, []int{9} } func (m *QueryThrottleStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -774,7 +606,7 @@ func (m *QueryThrottleStateResponse) Reset() { *m = QueryThrottleStateRe func (m *QueryThrottleStateResponse) String() string { return proto.CompactTextString(m) } func (*QueryThrottleStateResponse) ProtoMessage() {} func (*QueryThrottleStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{14} + return fileDescriptor_422512d7b7586cd7, []int{10} } func (m *QueryThrottleStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -835,7 +667,7 @@ func (m *QueryRegisteredConsumerRewardDenomsRequest) String() string { } func (*QueryRegisteredConsumerRewardDenomsRequest) ProtoMessage() {} func (*QueryRegisteredConsumerRewardDenomsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{15} + return fileDescriptor_422512d7b7586cd7, []int{11} } func (m *QueryRegisteredConsumerRewardDenomsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -876,7 +708,7 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) String() string { } func (*QueryRegisteredConsumerRewardDenomsResponse) ProtoMessage() {} func (*QueryRegisteredConsumerRewardDenomsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{16} + return fileDescriptor_422512d7b7586cd7, []int{12} } func (m *QueryRegisteredConsumerRewardDenomsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -912,148 +744,6 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) GetDenoms() []string { return nil } -type QueryProposedChainIDsRequest struct { -} - -func (m *QueryProposedChainIDsRequest) Reset() { *m = QueryProposedChainIDsRequest{} } -func (m *QueryProposedChainIDsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryProposedChainIDsRequest) ProtoMessage() {} -func (*QueryProposedChainIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{17} -} -func (m *QueryProposedChainIDsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryProposedChainIDsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryProposedChainIDsRequest.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 *QueryProposedChainIDsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryProposedChainIDsRequest.Merge(m, src) -} -func (m *QueryProposedChainIDsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryProposedChainIDsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryProposedChainIDsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryProposedChainIDsRequest proto.InternalMessageInfo - -type QueryProposedChainIDsResponse struct { - ProposedChains []ProposedChain `protobuf:"bytes,1,rep,name=proposedChains,proto3" json:"proposedChains"` -} - -func (m *QueryProposedChainIDsResponse) Reset() { *m = QueryProposedChainIDsResponse{} } -func (m *QueryProposedChainIDsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryProposedChainIDsResponse) ProtoMessage() {} -func (*QueryProposedChainIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{18} -} -func (m *QueryProposedChainIDsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryProposedChainIDsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryProposedChainIDsResponse.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 *QueryProposedChainIDsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryProposedChainIDsResponse.Merge(m, src) -} -func (m *QueryProposedChainIDsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryProposedChainIDsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryProposedChainIDsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryProposedChainIDsResponse proto.InternalMessageInfo - -func (m *QueryProposedChainIDsResponse) GetProposedChains() []ProposedChain { - if m != nil { - return m.ProposedChains - } - return nil -} - -type ProposedChain struct { - // [DEPRECATED] use `consumer_id` instead - ChainID string `protobuf:"bytes,1,opt,name=chainID,proto3" json:"chainID,omitempty"` // Deprecated: Do not use. - ProposalID uint64 `protobuf:"varint,2,opt,name=proposalID,proto3" json:"proposalID,omitempty"` - ConsumerId string `protobuf:"bytes,3,opt,name=consumer_id,json=consumerId,proto3" json:"consumer_id,omitempty"` -} - -func (m *ProposedChain) Reset() { *m = ProposedChain{} } -func (m *ProposedChain) String() string { return proto.CompactTextString(m) } -func (*ProposedChain) ProtoMessage() {} -func (*ProposedChain) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{19} -} -func (m *ProposedChain) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposedChain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposedChain.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 *ProposedChain) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposedChain.Merge(m, src) -} -func (m *ProposedChain) XXX_Size() int { - return m.Size() -} -func (m *ProposedChain) XXX_DiscardUnknown() { - xxx_messageInfo_ProposedChain.DiscardUnknown(m) -} - -var xxx_messageInfo_ProposedChain proto.InternalMessageInfo - -// Deprecated: Do not use. -func (m *ProposedChain) GetChainID() string { - if m != nil { - return m.ChainID - } - return "" -} - -func (m *ProposedChain) GetProposalID() uint64 { - if m != nil { - return m.ProposalID - } - return 0 -} - -func (m *ProposedChain) GetConsumerId() string { - if m != nil { - return m.ConsumerId - } - return "" -} - type QueryAllPairsValConAddrByConsumerChainIDRequest struct { // [DEPRECATED] use `consumer_id` instead ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` // Deprecated: Do not use. @@ -1069,7 +759,7 @@ func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) String() string { } func (*QueryAllPairsValConAddrByConsumerChainIDRequest) ProtoMessage() {} func (*QueryAllPairsValConAddrByConsumerChainIDRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{20} + return fileDescriptor_422512d7b7586cd7, []int{13} } func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1125,7 +815,7 @@ func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) String() string { } func (*QueryAllPairsValConAddrByConsumerChainIDResponse) ProtoMessage() {} func (*QueryAllPairsValConAddrByConsumerChainIDResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{21} + return fileDescriptor_422512d7b7586cd7, []int{14} } func (m *QueryAllPairsValConAddrByConsumerChainIDResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1173,7 +863,7 @@ func (m *PairValConAddrProviderAndConsumer) Reset() { *m = PairValConAdd func (m *PairValConAddrProviderAndConsumer) String() string { return proto.CompactTextString(m) } func (*PairValConAddrProviderAndConsumer) ProtoMessage() {} func (*PairValConAddrProviderAndConsumer) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{22} + return fileDescriptor_422512d7b7586cd7, []int{15} } func (m *PairValConAddrProviderAndConsumer) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1230,7 +920,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{23} + return fileDescriptor_422512d7b7586cd7, []int{16} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1267,7 +957,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{24} + return fileDescriptor_422512d7b7586cd7, []int{17} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1317,7 +1007,7 @@ func (m *QueryConsumerChainOptedInValidatorsRequest) String() string { } func (*QueryConsumerChainOptedInValidatorsRequest) ProtoMessage() {} func (*QueryConsumerChainOptedInValidatorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{25} + return fileDescriptor_422512d7b7586cd7, []int{18} } func (m *QueryConsumerChainOptedInValidatorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1374,7 +1064,7 @@ func (m *QueryConsumerChainOptedInValidatorsResponse) String() string { } func (*QueryConsumerChainOptedInValidatorsResponse) ProtoMessage() {} func (*QueryConsumerChainOptedInValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{26} + return fileDescriptor_422512d7b7586cd7, []int{19} } func (m *QueryConsumerChainOptedInValidatorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1420,7 +1110,7 @@ func (m *QueryConsumerValidatorsRequest) Reset() { *m = QueryConsumerVal func (m *QueryConsumerValidatorsRequest) String() string { return proto.CompactTextString(m) } func (*QueryConsumerValidatorsRequest) ProtoMessage() {} func (*QueryConsumerValidatorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{27} + return fileDescriptor_422512d7b7586cd7, []int{20} } func (m *QueryConsumerValidatorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1499,7 +1189,7 @@ func (m *QueryConsumerValidatorsValidator) Reset() { *m = QueryConsumerV func (m *QueryConsumerValidatorsValidator) String() string { return proto.CompactTextString(m) } func (*QueryConsumerValidatorsValidator) ProtoMessage() {} func (*QueryConsumerValidatorsValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{28} + return fileDescriptor_422512d7b7586cd7, []int{21} } func (m *QueryConsumerValidatorsValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1607,7 +1297,7 @@ func (m *QueryConsumerValidatorsResponse) Reset() { *m = QueryConsumerVa func (m *QueryConsumerValidatorsResponse) String() string { return proto.CompactTextString(m) } func (*QueryConsumerValidatorsResponse) ProtoMessage() {} func (*QueryConsumerValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{29} + return fileDescriptor_422512d7b7586cd7, []int{22} } func (m *QueryConsumerValidatorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1656,7 +1346,7 @@ func (m *QueryConsumerChainsValidatorHasToValidateRequest) String() string { } func (*QueryConsumerChainsValidatorHasToValidateRequest) ProtoMessage() {} func (*QueryConsumerChainsValidatorHasToValidateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{30} + return fileDescriptor_422512d7b7586cd7, []int{23} } func (m *QueryConsumerChainsValidatorHasToValidateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1704,7 +1394,7 @@ func (m *QueryConsumerChainsValidatorHasToValidateResponse) String() string { } func (*QueryConsumerChainsValidatorHasToValidateResponse) ProtoMessage() {} func (*QueryConsumerChainsValidatorHasToValidateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{31} + return fileDescriptor_422512d7b7586cd7, []int{24} } func (m *QueryConsumerChainsValidatorHasToValidateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1756,7 +1446,7 @@ func (m *QueryValidatorConsumerCommissionRateRequest) String() string { } func (*QueryValidatorConsumerCommissionRateRequest) ProtoMessage() {} func (*QueryValidatorConsumerCommissionRateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{32} + return fileDescriptor_422512d7b7586cd7, []int{25} } func (m *QueryValidatorConsumerCommissionRateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1820,7 +1510,7 @@ func (m *QueryValidatorConsumerCommissionRateResponse) String() string { } func (*QueryValidatorConsumerCommissionRateResponse) ProtoMessage() {} func (*QueryValidatorConsumerCommissionRateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{33} + return fileDescriptor_422512d7b7586cd7, []int{26} } func (m *QueryValidatorConsumerCommissionRateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1856,7 +1546,7 @@ func (m *QueryBlocksUntilNextEpochRequest) Reset() { *m = QueryBlocksUnt func (m *QueryBlocksUntilNextEpochRequest) String() string { return proto.CompactTextString(m) } func (*QueryBlocksUntilNextEpochRequest) ProtoMessage() {} func (*QueryBlocksUntilNextEpochRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{34} + return fileDescriptor_422512d7b7586cd7, []int{27} } func (m *QueryBlocksUntilNextEpochRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1894,7 +1584,7 @@ func (m *QueryBlocksUntilNextEpochResponse) Reset() { *m = QueryBlocksUn func (m *QueryBlocksUntilNextEpochResponse) String() string { return proto.CompactTextString(m) } func (*QueryBlocksUntilNextEpochResponse) ProtoMessage() {} func (*QueryBlocksUntilNextEpochResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{35} + return fileDescriptor_422512d7b7586cd7, []int{28} } func (m *QueryBlocksUntilNextEpochResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1940,7 +1630,7 @@ func (m *QueryConsumerIdFromClientIdRequest) Reset() { *m = QueryConsume func (m *QueryConsumerIdFromClientIdRequest) String() string { return proto.CompactTextString(m) } func (*QueryConsumerIdFromClientIdRequest) ProtoMessage() {} func (*QueryConsumerIdFromClientIdRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{36} + return fileDescriptor_422512d7b7586cd7, []int{29} } func (m *QueryConsumerIdFromClientIdRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1985,7 +1675,7 @@ func (m *QueryConsumerIdFromClientIdResponse) Reset() { *m = QueryConsum func (m *QueryConsumerIdFromClientIdResponse) String() string { return proto.CompactTextString(m) } func (*QueryConsumerIdFromClientIdResponse) ProtoMessage() {} func (*QueryConsumerIdFromClientIdResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{37} + return fileDescriptor_422512d7b7586cd7, []int{30} } func (m *QueryConsumerIdFromClientIdResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2029,7 +1719,7 @@ func (m *QueryConsumerChainRequest) Reset() { *m = QueryConsumerChainReq func (m *QueryConsumerChainRequest) String() string { return proto.CompactTextString(m) } func (*QueryConsumerChainRequest) ProtoMessage() {} func (*QueryConsumerChainRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{38} + return fileDescriptor_422512d7b7586cd7, []int{31} } func (m *QueryConsumerChainRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2078,7 +1768,7 @@ func (m *QueryConsumerChainResponse) Reset() { *m = QueryConsumerChainRe func (m *QueryConsumerChainResponse) String() string { return proto.CompactTextString(m) } func (*QueryConsumerChainResponse) ProtoMessage() {} func (*QueryConsumerChainResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_422512d7b7586cd7, []int{39} + return fileDescriptor_422512d7b7586cd7, []int{32} } func (m *QueryConsumerChainResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2154,10 +1844,6 @@ func init() { proto.RegisterType((*QueryConsumerGenesisResponse)(nil), "interchain_security.ccv.provider.v1.QueryConsumerGenesisResponse") proto.RegisterType((*QueryConsumerChainsRequest)(nil), "interchain_security.ccv.provider.v1.QueryConsumerChainsRequest") proto.RegisterType((*QueryConsumerChainsResponse)(nil), "interchain_security.ccv.provider.v1.QueryConsumerChainsResponse") - proto.RegisterType((*QueryConsumerChainStartProposalsRequest)(nil), "interchain_security.ccv.provider.v1.QueryConsumerChainStartProposalsRequest") - proto.RegisterType((*QueryConsumerChainStartProposalsResponse)(nil), "interchain_security.ccv.provider.v1.QueryConsumerChainStartProposalsResponse") - proto.RegisterType((*QueryConsumerChainStopProposalsRequest)(nil), "interchain_security.ccv.provider.v1.QueryConsumerChainStopProposalsRequest") - proto.RegisterType((*QueryConsumerChainStopProposalsResponse)(nil), "interchain_security.ccv.provider.v1.QueryConsumerChainStopProposalsResponse") proto.RegisterType((*Chain)(nil), "interchain_security.ccv.provider.v1.Chain") proto.RegisterType((*QueryValidatorConsumerAddrRequest)(nil), "interchain_security.ccv.provider.v1.QueryValidatorConsumerAddrRequest") proto.RegisterType((*QueryValidatorConsumerAddrResponse)(nil), "interchain_security.ccv.provider.v1.QueryValidatorConsumerAddrResponse") @@ -2167,9 +1853,6 @@ func init() { proto.RegisterType((*QueryThrottleStateResponse)(nil), "interchain_security.ccv.provider.v1.QueryThrottleStateResponse") proto.RegisterType((*QueryRegisteredConsumerRewardDenomsRequest)(nil), "interchain_security.ccv.provider.v1.QueryRegisteredConsumerRewardDenomsRequest") proto.RegisterType((*QueryRegisteredConsumerRewardDenomsResponse)(nil), "interchain_security.ccv.provider.v1.QueryRegisteredConsumerRewardDenomsResponse") - proto.RegisterType((*QueryProposedChainIDsRequest)(nil), "interchain_security.ccv.provider.v1.QueryProposedChainIDsRequest") - proto.RegisterType((*QueryProposedChainIDsResponse)(nil), "interchain_security.ccv.provider.v1.QueryProposedChainIDsResponse") - proto.RegisterType((*ProposedChain)(nil), "interchain_security.ccv.provider.v1.ProposedChain") proto.RegisterType((*QueryAllPairsValConAddrByConsumerChainIDRequest)(nil), "interchain_security.ccv.provider.v1.QueryAllPairsValConAddrByConsumerChainIDRequest") proto.RegisterType((*QueryAllPairsValConAddrByConsumerChainIDResponse)(nil), "interchain_security.ccv.provider.v1.QueryAllPairsValConAddrByConsumerChainIDResponse") proto.RegisterType((*PairValConAddrProviderAndConsumer)(nil), "interchain_security.ccv.provider.v1.PairValConAddrProviderAndConsumer") @@ -2197,175 +1880,159 @@ func init() { } var fileDescriptor_422512d7b7586cd7 = []byte{ - // 2676 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4b, 0x6c, 0xdc, 0xc6, - 0xf9, 0x17, 0xf5, 0xf2, 0x6a, 0x64, 0x29, 0xc9, 0x58, 0xb6, 0xd7, 0x2b, 0x59, 0x2b, 0xd3, 0xf1, - 0xff, 0x2f, 0xbf, 0x76, 0x25, 0x05, 0x6e, 0x62, 0x27, 0x7e, 0x68, 0x57, 0x96, 0xbd, 0xf0, 0x4b, - 0xa1, 0x64, 0xa7, 0x50, 0xea, 0xd2, 0x14, 0x39, 0x59, 0xb1, 0xe2, 0x92, 0x14, 0x67, 0xb4, 0xf6, - 0xd6, 0xf5, 0x21, 0x2d, 0x50, 0xb8, 0x3d, 0x14, 0x2e, 0x8a, 0xde, 0x83, 0x02, 0x05, 0x7a, 0xe8, - 0xa9, 0x08, 0x5a, 0xf4, 0x96, 0x63, 0x6e, 0x4d, 0x93, 0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 0xac, 0xa7, 0x9d, 0x7b, 0x5e, 0x02, 0xc3, 0x54, 0x17, - 0xce, 0x0a, 0x33, 0x03, 0xb3, 0xa3, 0x0b, 0xa7, 0x92, 0xe9, 0x77, 0xa7, 0x25, 0xbe, 0x52, 0x3c, - 0x09, 0xfe, 0xbf, 0x55, 0xc5, 0x2a, 0x51, 0x1c, 0xb2, 0xe2, 0x58, 0xb6, 0x85, 0x15, 0xc3, 0xf3, - 0x56, 0x7c, 0x2a, 0x80, 0xd9, 0xce, 0xb2, 0xdc, 0xb6, 0xaf, 0x81, 0x11, 0xdb, 0x1b, 0xe4, 0x3b, - 0x72, 0x29, 0x55, 0x78, 0x16, 0x35, 0x4d, 0x77, 0x0f, 0x62, 0x13, 0xba, 0x09, 0x28, 0xce, 0x82, - 0xff, 0x8b, 0xb3, 0xc4, 0xb2, 0x5b, 0x8c, 0xfe, 0xae, 0x10, 0xef, 0x60, 0x48, 0xd4, 0xcf, 0xa4, - 0x16, 0x9b, 0x2f, 0xa6, 0xb2, 0x59, 0x42, 0x35, 0xab, 0xae, 0x18, 0xb1, 0x26, 0x3f, 0x1d, 0x04, - 0x43, 0x54, 0x37, 0x3c, 0x12, 0x3d, 0x10, 0xcd, 0xc3, 0x30, 0x09, 0x46, 0x54, 0x43, 0x47, 0x26, - 0x69, 0x1e, 0x85, 0x0c, 0x1b, 0xa8, 0x68, 0xf0, 0x00, 0x18, 0x22, 0x96, 0x2d, 0xdf, 0xce, 0x0e, - 0xcc, 0x08, 0xb3, 0x63, 0xd2, 0x20, 0xb1, 0xec, 0xdb, 0xf0, 0x14, 0x80, 0x35, 0xdd, 0x94, 0x6d, - 0xeb, 0xa1, 0x7b, 0x7e, 0x4c, 0x99, 0x49, 0x0c, 0xce, 0x08, 0xb3, 0x03, 0xd2, 0x78, 0x4d, 0x37, - 0x57, 0xdc, 0x89, 0x8a, 0xb9, 0xe6, 0xca, 0xce, 0x81, 0x89, 0xba, 0x62, 0xe8, 0x9a, 0x42, 0x2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0x20, 0x1d, 0x72, - 0x51, 0x24, 0x0f, 0xa4, 0xec, 0x61, 0x88, 0x67, 0xc0, 0x29, 0xea, 0x92, 0x84, 0xaa, 0x3a, 0x26, - 0xc8, 0x41, 0x5a, 0xb3, 0x62, 0x3e, 0x54, 0x1c, 0x6d, 0x09, 0x99, 0x56, 0xcd, 0x2f, 0xd9, 0x57, - 0xc1, 0xe9, 0x44, 0xd2, 0x3c, 0x22, 0x87, 0xc0, 0xb0, 0x46, 0x47, 0xe8, 0x2d, 0x38, 0x22, 0xf1, - 0x2f, 0x71, 0x9a, 0xf7, 0x0d, 0xac, 0x1a, 0x23, 0x8d, 0x16, 0xdf, 0xca, 0x92, 0xaf, 0xe6, 0x43, - 0x01, 0x1c, 0x6d, 0x23, 0xc0, 0x91, 0x1f, 0x80, 0x71, 0x3b, 0x38, 0xe7, 0xdd, 0xb3, 0xc9, 0x0a, - 0x54, 0x08, 0x96, 0x17, 0x94, 0x08, 0x9e, 0x68, 0x82, 0xb1, 0x90, 0x18, 0x9c, 0x02, 0x3c, 0xc1, - 0x97, 0x5a, 0x73, 0x7e, 0x09, 0x4e, 0x03, 0xe0, 0x5d, 0x28, 0x95, 0x25, 0xba, 0xa1, 0x83, 0x52, - 0x60, 0xa4, 0x63, 0x52, 0x8b, 0xdb, 0xa0, 0x48, 0x5d, 0x5e, 0x34, 0x8c, 0x15, 0x45, 0x77, 0xf0, - 0x3d, 0xc5, 0x28, 0x5b, 0xa6, 0x9b, 0x97, 0xa5, 0xf0, 0x05, 0x59, 0x59, 0xda, 0xab, 0xf6, 0xed, - 0xa7, 0x02, 0x98, 0x4b, 0xae, 0x93, 0x47, 0x7e, 0x1b, 0xbc, 0x66, 0x2b, 0xba, 0xe3, 0xd6, 0x51, - 0xb7, 0xe7, 0xa5, 0x07, 0x8a, 0x07, 0x7f, 0x39, 0x59, 0xf0, 0x15, 0xdd, 0x69, 0x2a, 0xf2, 0x0f, - 0xac, 0xd9, 0x4c, 0xa5, 0x71, 0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- 0x33, 0xa0, 0xea, 0xac, 0xaf, 0xaa, 0x7e, 0xae, 0xf8, 0x28, 0xf2, 0x0c, 0x69, 0xd8, 0x08, 0x6f, - 0x0c, 0xd3, 0xff, 0xe5, 0x78, 0xe3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xb1, 0x32, 0xd1, - 0x57, 0x2b, 0x00, 0x00, + // 2428 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x14, 0xc9, + 0xf5, 0x77, 0xfb, 0x8b, 0x71, 0x19, 0xcc, 0x52, 0x18, 0x18, 0xc6, 0xe0, 0x31, 0xcd, 0x22, 0x79, + 0xf9, 0x98, 0xb6, 0xbd, 0xe2, 0xbf, 0x0b, 0xfb, 0x67, 0xc1, 0x33, 0x60, 0x18, 0x91, 0x05, 0x6f, + 0xdb, 0xb0, 0x91, 0x57, 0xa4, 0xb7, 0xdc, 0x5d, 0x3b, 0xae, 0xb8, 0xa7, 0xbb, 0xdd, 0x55, 0x33, + 0x30, 0x21, 0x5c, 0x92, 0x0b, 0xc9, 0x21, 0x22, 0x8a, 0x72, 0x5f, 0x45, 0x8a, 0x94, 0x43, 0x4e, + 0xd1, 0x2a, 0x51, 0x6e, 0x7b, 0xdc, 0x5b, 0x36, 0xbb, 0x97, 0x28, 0x51, 0x48, 0x04, 0x39, 0xe4, + 0x12, 0x29, 0xda, 0xe4, 0x90, 0x63, 0xd4, 0x55, 0xd5, 0x3d, 0xd3, 0x4d, 0xdb, 0xee, 0x99, 0xf1, + 0x21, 0x37, 0x77, 0xd5, 0x7b, 0xbf, 0xf7, 0x51, 0xaf, 0x5e, 0xbd, 0xf7, 0xc6, 0x40, 0x23, 0x0e, + 0xc3, 0xbe, 0xb9, 0x81, 0x88, 0x63, 0x50, 0x6c, 0x36, 0x7c, 0xc2, 0x5a, 0x9a, 0x69, 0x36,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, 0x6e, 0x52, 0xb8, + 0xda, 0x33, 0xbf, 0x34, 0x6d, 0x89, 0x9b, 0x76, 0x0d, 0xbe, 0xdb, 0x6d, 0x92, 0x8e, 0xdf, 0x83, + 0xf2, 0x07, 0x9f, 0xbf, 0x98, 0x56, 0xbe, 0x78, 0x31, 0xad, 0xfc, 0xf5, 0xc5, 0xb4, 0xf2, 0xec, + 0xe5, 0xf4, 0xc0, 0x17, 0x2f, 0xa7, 0x07, 0xfe, 0xf0, 0x72, 0x7a, 0x60, 0xed, 0x4a, 0x8d, 0xb0, + 0x8d, 0xc6, 0x7a, 0xc9, 0x74, 0xeb, 0xf2, 0x3f, 0x89, 0x3a, 0x44, 0x5d, 0x88, 0x44, 0x35, 0x2f, + 0x6a, 0x8f, 0x12, 0x95, 0x79, 0xcb, 0xc3, 0x74, 0x7d, 0x94, 0xff, 0x8c, 0xfb, 0xe6, 0x7f, 0x03, + 0x00, 0x00, 0xff, 0xff, 0x94, 0xed, 0x31, 0x2a, 0xe9, 0x25, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2386,10 +2053,6 @@ type QueryClient interface { // ConsumerChains queries active consumer chains supported by the provider // chain QueryConsumerChains(ctx context.Context, in *QueryConsumerChainsRequest, opts ...grpc.CallOption) (*QueryConsumerChainsResponse, error) - // QueryConsumerChainStarts queries consumer chain start proposals. - QueryConsumerChainStarts(ctx context.Context, in *QueryConsumerChainStartProposalsRequest, opts ...grpc.CallOption) (*QueryConsumerChainStartProposalsResponse, error) - // QueryConsumerChainStops queries consumer chain stop proposals. - QueryConsumerChainStops(ctx context.Context, in *QueryConsumerChainStopProposalsRequest, opts ...grpc.CallOption) (*QueryConsumerChainStopProposalsResponse, error) // QueryValidatorConsumerAddr queries the address // assigned by a validator for a consumer chain. QueryValidatorConsumerAddr(ctx context.Context, in *QueryValidatorConsumerAddrRequest, opts ...grpc.CallOption) (*QueryValidatorConsumerAddrResponse, error) @@ -2402,9 +2065,6 @@ type QueryClient interface { // QueryRegisteredConsumerRewardDenoms returns a list of consumer reward // denoms that are registered QueryRegisteredConsumerRewardDenoms(ctx context.Context, in *QueryRegisteredConsumerRewardDenomsRequest, opts ...grpc.CallOption) (*QueryRegisteredConsumerRewardDenomsResponse, error) - // QueryProposedConsumerChainIDs returns the chain IDs of the proposed consumer chain addition proposals - // that are still in the voting period - QueryProposedConsumerChainIDs(ctx context.Context, in *QueryProposedChainIDsRequest, opts ...grpc.CallOption) (*QueryProposedChainIDsResponse, error) // QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address // between provider and consumer chain QueryAllPairsValConAddrByConsumerChainID(ctx context.Context, in *QueryAllPairsValConAddrByConsumerChainIDRequest, opts ...grpc.CallOption) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) @@ -2460,24 +2120,6 @@ func (c *queryClient) QueryConsumerChains(ctx context.Context, in *QueryConsumer return out, nil } -func (c *queryClient) QueryConsumerChainStarts(ctx context.Context, in *QueryConsumerChainStartProposalsRequest, opts ...grpc.CallOption) (*QueryConsumerChainStartProposalsResponse, error) { - out := new(QueryConsumerChainStartProposalsResponse) - err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Query/QueryConsumerChainStarts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) QueryConsumerChainStops(ctx context.Context, in *QueryConsumerChainStopProposalsRequest, opts ...grpc.CallOption) (*QueryConsumerChainStopProposalsResponse, error) { - out := new(QueryConsumerChainStopProposalsResponse) - err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Query/QueryConsumerChainStops", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) QueryValidatorConsumerAddr(ctx context.Context, in *QueryValidatorConsumerAddrRequest, opts ...grpc.CallOption) (*QueryValidatorConsumerAddrResponse, error) { out := new(QueryValidatorConsumerAddrResponse) err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr", in, out, opts...) @@ -2514,15 +2156,6 @@ func (c *queryClient) QueryRegisteredConsumerRewardDenoms(ctx context.Context, i return out, nil } -func (c *queryClient) QueryProposedConsumerChainIDs(ctx context.Context, in *QueryProposedChainIDsRequest, opts ...grpc.CallOption) (*QueryProposedChainIDsResponse, error) { - out := new(QueryProposedChainIDsResponse) - err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Query/QueryProposedConsumerChainIDs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) QueryAllPairsValConAddrByConsumerChainID(ctx context.Context, in *QueryAllPairsValConAddrByConsumerChainIDRequest, opts ...grpc.CallOption) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) { out := new(QueryAllPairsValConAddrByConsumerChainIDResponse) err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Query/QueryAllPairsValConAddrByConsumerChainID", in, out, opts...) @@ -2612,10 +2245,6 @@ type QueryServer interface { // ConsumerChains queries active consumer chains supported by the provider // chain QueryConsumerChains(context.Context, *QueryConsumerChainsRequest) (*QueryConsumerChainsResponse, error) - // QueryConsumerChainStarts queries consumer chain start proposals. - QueryConsumerChainStarts(context.Context, *QueryConsumerChainStartProposalsRequest) (*QueryConsumerChainStartProposalsResponse, error) - // QueryConsumerChainStops queries consumer chain stop proposals. - QueryConsumerChainStops(context.Context, *QueryConsumerChainStopProposalsRequest) (*QueryConsumerChainStopProposalsResponse, error) // QueryValidatorConsumerAddr queries the address // assigned by a validator for a consumer chain. QueryValidatorConsumerAddr(context.Context, *QueryValidatorConsumerAddrRequest) (*QueryValidatorConsumerAddrResponse, error) @@ -2628,9 +2257,6 @@ type QueryServer interface { // QueryRegisteredConsumerRewardDenoms returns a list of consumer reward // denoms that are registered QueryRegisteredConsumerRewardDenoms(context.Context, *QueryRegisteredConsumerRewardDenomsRequest) (*QueryRegisteredConsumerRewardDenomsResponse, error) - // QueryProposedConsumerChainIDs returns the chain IDs of the proposed consumer chain addition proposals - // that are still in the voting period - QueryProposedConsumerChainIDs(context.Context, *QueryProposedChainIDsRequest) (*QueryProposedChainIDsResponse, error) // QueryAllPairsValConAddrByConsumerChainID returns a list of pair valconsensus address // between provider and consumer chain QueryAllPairsValConAddrByConsumerChainID(context.Context, *QueryAllPairsValConAddrByConsumerChainIDRequest) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) @@ -2670,12 +2296,6 @@ func (*UnimplementedQueryServer) QueryConsumerGenesis(ctx context.Context, req * func (*UnimplementedQueryServer) QueryConsumerChains(ctx context.Context, req *QueryConsumerChainsRequest) (*QueryConsumerChainsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryConsumerChains not implemented") } -func (*UnimplementedQueryServer) QueryConsumerChainStarts(ctx context.Context, req *QueryConsumerChainStartProposalsRequest) (*QueryConsumerChainStartProposalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryConsumerChainStarts not implemented") -} -func (*UnimplementedQueryServer) QueryConsumerChainStops(ctx context.Context, req *QueryConsumerChainStopProposalsRequest) (*QueryConsumerChainStopProposalsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryConsumerChainStops not implemented") -} func (*UnimplementedQueryServer) QueryValidatorConsumerAddr(ctx context.Context, req *QueryValidatorConsumerAddrRequest) (*QueryValidatorConsumerAddrResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryValidatorConsumerAddr not implemented") } @@ -2688,9 +2308,6 @@ func (*UnimplementedQueryServer) QueryThrottleState(ctx context.Context, req *Qu func (*UnimplementedQueryServer) QueryRegisteredConsumerRewardDenoms(ctx context.Context, req *QueryRegisteredConsumerRewardDenomsRequest) (*QueryRegisteredConsumerRewardDenomsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryRegisteredConsumerRewardDenoms not implemented") } -func (*UnimplementedQueryServer) QueryProposedConsumerChainIDs(ctx context.Context, req *QueryProposedChainIDsRequest) (*QueryProposedChainIDsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryProposedConsumerChainIDs not implemented") -} func (*UnimplementedQueryServer) QueryAllPairsValConAddrByConsumerChainID(ctx context.Context, req *QueryAllPairsValConAddrByConsumerChainIDRequest) (*QueryAllPairsValConAddrByConsumerChainIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryAllPairsValConAddrByConsumerChainID not implemented") } @@ -2759,42 +2376,6 @@ func _Query_QueryConsumerChains_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _Query_QueryConsumerChainStarts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryConsumerChainStartProposalsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).QueryConsumerChainStarts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/interchain_security.ccv.provider.v1.Query/QueryConsumerChainStarts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).QueryConsumerChainStarts(ctx, req.(*QueryConsumerChainStartProposalsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_QueryConsumerChainStops_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryConsumerChainStopProposalsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).QueryConsumerChainStops(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/interchain_security.ccv.provider.v1.Query/QueryConsumerChainStops", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).QueryConsumerChainStops(ctx, req.(*QueryConsumerChainStopProposalsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_QueryValidatorConsumerAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryValidatorConsumerAddrRequest) if err := dec(in); err != nil { @@ -2867,24 +2448,6 @@ func _Query_QueryRegisteredConsumerRewardDenoms_Handler(srv interface{}, ctx con return interceptor(ctx, in, info, handler) } -func _Query_QueryProposedConsumerChainIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryProposedChainIDsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).QueryProposedConsumerChainIDs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/interchain_security.ccv.provider.v1.Query/QueryProposedConsumerChainIDs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).QueryProposedConsumerChainIDs(ctx, req.(*QueryProposedChainIDsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_QueryAllPairsValConAddrByConsumerChainID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryAllPairsValConAddrByConsumerChainIDRequest) if err := dec(in); err != nil { @@ -3059,14 +2622,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryConsumerChains", Handler: _Query_QueryConsumerChains_Handler, }, - { - MethodName: "QueryConsumerChainStarts", - Handler: _Query_QueryConsumerChainStarts_Handler, - }, - { - MethodName: "QueryConsumerChainStops", - Handler: _Query_QueryConsumerChainStops_Handler, - }, { MethodName: "QueryValidatorConsumerAddr", Handler: _Query_QueryValidatorConsumerAddr_Handler, @@ -3083,10 +2638,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryRegisteredConsumerRewardDenoms", Handler: _Query_QueryRegisteredConsumerRewardDenoms_Handler, }, - { - MethodName: "QueryProposedConsumerChainIDs", - Handler: _Query_QueryProposedConsumerChainIDs_Handler, - }, { MethodName: "QueryAllPairsValConAddrByConsumerChainID", Handler: _Query_QueryAllPairsValConAddrByConsumerChainID_Handler, @@ -3268,122 +2819,6 @@ func (m *QueryConsumerChainsResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *QueryConsumerChainStartProposalsRequest) 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 *QueryConsumerChainStartProposalsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryConsumerChainStartProposalsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryConsumerChainStartProposalsResponse) 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 *QueryConsumerChainStartProposalsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryConsumerChainStartProposalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proposals != nil { - { - size, err := m.Proposals.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 *QueryConsumerChainStopProposalsRequest) 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 *QueryConsumerChainStopProposalsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryConsumerChainStopProposalsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryConsumerChainStopProposalsResponse) 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 *QueryConsumerChainStopProposalsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryConsumerChainStopProposalsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Proposals != nil { - { - size, err := m.Proposals.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 *Chain) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3680,12 +3115,12 @@ func (m *QueryThrottleStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l - n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.NextReplenishCandidate, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.NextReplenishCandidate):]) - if err5 != nil { - return 0, err5 + n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.NextReplenishCandidate, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.NextReplenishCandidate):]) + if err3 != nil { + return 0, err3 } - i -= n5 - i = encodeVarintQuery(dAtA, i, uint64(n5)) + i -= n3 + i = encodeVarintQuery(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x1a if m.SlashMeterAllowance != 0 { @@ -3756,108 +3191,6 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) MarshalToSizedBuffer(dAtA return len(dAtA) - i, nil } -func (m *QueryProposedChainIDsRequest) 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 *QueryProposedChainIDsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryProposedChainIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryProposedChainIDsResponse) 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 *QueryProposedChainIDsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryProposedChainIDsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProposedChains) > 0 { - for iNdEx := len(m.ProposedChains) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ProposedChains[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 (m *ProposedChain) 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 *ProposedChain) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposedChain) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ConsumerId) > 0 { - i -= len(m.ConsumerId) - copy(dAtA[i:], m.ConsumerId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ConsumerId))) - i-- - dAtA[i] = 0x1a - } - if m.ProposalID != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ProposalID)) - i-- - dAtA[i] = 0x10 - } - if len(m.ChainID) > 0 { - i -= len(m.ChainID) - copy(dAtA[i:], m.ChainID) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4746,63 +4079,19 @@ func (m *QueryConsumerChainsResponse) Size() (n int) { return n } -func (m *QueryConsumerChainStartProposalsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryConsumerChainStartProposalsResponse) Size() (n int) { +func (m *Chain) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Proposals != nil { - l = m.Proposals.Size() + l = len(m.ChainId) + if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - return n -} - -func (m *QueryConsumerChainStopProposalsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryConsumerChainStopProposalsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Proposals != nil { - l = m.Proposals.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *Chain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ClientId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + l = len(m.ClientId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) } if m.Top_N != 0 { n += 1 + sovQuery(uint64(m.Top_N)) @@ -4960,50 +4249,6 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) Size() (n int) { return n } -func (m *QueryProposedChainIDsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryProposedChainIDsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ProposedChains) > 0 { - for _, e := range m.ProposedChains { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *ProposedChain) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainID) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.ProposalID != 0 { - n += 1 + sovQuery(uint64(m.ProposalID)) - } - l = len(m.ConsumerId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func (m *QueryAllPairsValConAddrByConsumerChainIDRequest) Size() (n int) { if m == nil { return 0 @@ -5655,285 +4900,15 @@ func (m *QueryConsumerChainsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryConsumerChainsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryConsumerChainsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Chains", 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.Chains = append(m.Chains, &Chain{}) - if err := m.Chains[len(m.Chains)-1].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 *QueryConsumerChainStartProposalsRequest) 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: QueryConsumerChainStartProposalsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryConsumerChainStartProposalsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *QueryConsumerChainStartProposalsResponse) 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: QueryConsumerChainStartProposalsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryConsumerChainStartProposalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposals", 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.Proposals == nil { - m.Proposals = &ConsumerAdditionProposals{} - } - if err := m.Proposals.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 *QueryConsumerChainStopProposalsRequest) 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: QueryConsumerChainStopProposalsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryConsumerChainStopProposalsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *QueryConsumerChainStopProposalsResponse) 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: QueryConsumerChainStopProposalsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryConsumerChainsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryConsumerChainStopProposalsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryConsumerChainsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Chains", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5960,10 +4935,8 @@ func (m *QueryConsumerChainStopProposalsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Proposals == nil { - m.Proposals = &ConsumerRemovalProposals{} - } - if err := m.Proposals.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Chains = append(m.Chains, &Chain{}) + if err := m.Chains[len(m.Chains)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7092,273 +6065,6 @@ func (m *QueryRegisteredConsumerRewardDenomsResponse) Unmarshal(dAtA []byte) err } return nil } -func (m *QueryProposedChainIDsRequest) 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: QueryProposedChainIDsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProposedChainIDsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *QueryProposedChainIDsResponse) 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: QueryProposedChainIDsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryProposedChainIDsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposedChains", 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.ProposedChains = append(m.ProposedChains, ProposedChain{}) - if err := m.ProposedChains[len(m.ProposedChains)-1].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 *ProposedChain) 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: ProposedChain: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposedChain: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainID", 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.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType) - } - m.ProposalID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposalID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsumerId", 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.ConsumerId = 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 *QueryAllPairsValConAddrByConsumerChainIDRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ccv/provider/types/query.pb.gw.go b/x/ccv/provider/types/query.pb.gw.go index 80e0b6025d..543fc6e8bc 100644 --- a/x/ccv/provider/types/query.pb.gw.go +++ b/x/ccv/provider/types/query.pb.gw.go @@ -213,42 +213,6 @@ func local_request_Query_QueryConsumerChains_0(ctx context.Context, marshaler ru } -func request_Query_QueryConsumerChainStarts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryConsumerChainStartProposalsRequest - var metadata runtime.ServerMetadata - - msg, err := client.QueryConsumerChainStarts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_QueryConsumerChainStarts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryConsumerChainStartProposalsRequest - var metadata runtime.ServerMetadata - - msg, err := server.QueryConsumerChainStarts(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_QueryConsumerChainStops_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryConsumerChainStopProposalsRequest - var metadata runtime.ServerMetadata - - msg, err := client.QueryConsumerChainStops(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_QueryConsumerChainStops_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryConsumerChainStopProposalsRequest - var metadata runtime.ServerMetadata - - msg, err := server.QueryConsumerChainStops(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Query_QueryValidatorConsumerAddr_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -357,24 +321,6 @@ func local_request_Query_QueryRegisteredConsumerRewardDenoms_0(ctx context.Conte } -func request_Query_QueryProposedConsumerChainIDs_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryProposedChainIDsRequest - var metadata runtime.ServerMetadata - - msg, err := client.QueryProposedConsumerChainIDs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_QueryProposedConsumerChainIDs_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryProposedChainIDsRequest - var metadata runtime.ServerMetadata - - msg, err := server.QueryProposedConsumerChainIDs(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Query_QueryAllPairsValConAddrByConsumerChainID_0 = &utilities.DoubleArray{Encoding: map[string]int{"chain_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -1268,52 +1214,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_QueryConsumerChainStarts_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_QueryConsumerChainStarts_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_QueryConsumerChainStarts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_QueryConsumerChainStops_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_QueryConsumerChainStops_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_QueryConsumerChainStops_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_QueryValidatorConsumerAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1406,29 +1306,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_QueryProposedConsumerChainIDs_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_QueryProposedConsumerChainIDs_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_QueryProposedConsumerChainIDs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_QueryAllPairsValConAddrByConsumerChainID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1829,46 +1706,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_QueryConsumerChainStarts_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_QueryConsumerChainStarts_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_QueryConsumerChainStarts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_QueryConsumerChainStops_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_QueryConsumerChainStops_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_QueryConsumerChainStops_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_QueryValidatorConsumerAddr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1949,26 +1786,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_QueryProposedConsumerChainIDs_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_QueryProposedConsumerChainIDs_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_QueryProposedConsumerChainIDs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_QueryAllPairsValConAddrByConsumerChainID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -2239,10 +2056,6 @@ var ( pattern_Query_QueryConsumerChains_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "consumer_chains"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_QueryConsumerChainStarts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "consumer_chain_start_proposals"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_QueryConsumerChainStops_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "consumer_chain_stop_proposals"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_QueryValidatorConsumerAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "validator_consumer_addr"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QueryValidatorProviderAddr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "validator_provider_addr"}, "", runtime.AssumeColonVerbOpt(false))) @@ -2251,8 +2064,6 @@ var ( pattern_Query_QueryRegisteredConsumerRewardDenoms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "registered_consumer_reward_denoms"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_QueryProposedConsumerChainIDs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchain_security", "ccv", "provider", "proposed_consumer_chains"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_QueryAllPairsValConAddrByConsumerChainID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"interchain_security", "ccv", "provider", "chain_id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_QueryAllPairsValConAddrByConsumerChainID_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"interchain_security", "ccv", "provider", "consumer_id"}, "", runtime.AssumeColonVerbOpt(false))) @@ -2287,10 +2098,6 @@ var ( forward_Query_QueryConsumerChains_0 = runtime.ForwardResponseMessage - forward_Query_QueryConsumerChainStarts_0 = runtime.ForwardResponseMessage - - forward_Query_QueryConsumerChainStops_0 = runtime.ForwardResponseMessage - forward_Query_QueryValidatorConsumerAddr_0 = runtime.ForwardResponseMessage forward_Query_QueryValidatorProviderAddr_0 = runtime.ForwardResponseMessage @@ -2299,8 +2106,6 @@ var ( forward_Query_QueryRegisteredConsumerRewardDenoms_0 = runtime.ForwardResponseMessage - forward_Query_QueryProposedConsumerChainIDs_0 = runtime.ForwardResponseMessage - forward_Query_QueryAllPairsValConAddrByConsumerChainID_0 = runtime.ForwardResponseMessage forward_Query_QueryAllPairsValConAddrByConsumerChainID_1 = runtime.ForwardResponseMessage