diff --git a/proto/interchain_security/ccv/provider/v1/provider.proto b/proto/interchain_security/ccv/provider/v1/provider.proto index c3efb11cac..6ba5c33c5e 100644 --- a/proto/interchain_security/ccv/provider/v1/provider.proto +++ b/proto/interchain_security/ccv/provider/v1/provider.proto @@ -18,15 +18,17 @@ import "cosmos_proto/cosmos.proto"; // // Note any type defined in this file is ONLY used internally to the provider CCV module. -// These schemas can change with proper consideration of compatibility or migration. -// +// These schemas can change with proper consideration of compatibility or migration. +// // ConsumerAdditionProposal is a governance proposal on the provider chain to // spawn a new consumer chain. If it passes, then all validators on the provider // chain are expected to validate the consumer chain at spawn time or get // slashed. It is recommended that spawn time occurs after the proposal end // time. +// Deprecated: Use MsgConsumerAddition instead message ConsumerAdditionProposal { + option deprecated = true; option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; @@ -92,7 +94,9 @@ message ConsumerAdditionProposal { // remove (and stop) a consumer chain. If it passes, all the consumer chain's // state is removed from the provider chain. The outstanding unbonding operation // funds are released. +// Deprecated: Use MsgConsumerRemoval instead message ConsumerRemovalProposal { + option deprecated = true; option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; // the title of the proposal @@ -109,7 +113,9 @@ message ConsumerRemovalProposal { // ChangeRewardDenomsProposal is a governance proposal on the provider chain to // mutate the set of denoms accepted by the provider as rewards. +// Deprecated: Use MsgChangeRewardDenoms instead message ChangeRewardDenomsProposal { + option deprecated = true; option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; // the title of the proposal @@ -182,7 +188,7 @@ message Params { } // SlashAcks contains cons addresses of consumer chain validators -// successfully slashed on the provider chain. +// successfully slashed on the provider chain. message SlashAcks { repeated string addresses = 1; } // ConsumerAdditionProposals holds pending governance proposals on the provider diff --git a/proto/interchain_security/ccv/provider/v1/tx.proto b/proto/interchain_security/ccv/provider/v1/tx.proto index e75cab6308..69ccee0a73 100644 --- a/proto/interchain_security/ccv/provider/v1/tx.proto +++ b/proto/interchain_security/ccv/provider/v1/tx.proto @@ -3,18 +3,31 @@ package interchain_security.ccv.provider.v1; option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/provider/types"; +import "amino/amino.proto"; import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; -import "google/protobuf/any.proto"; +import "ibc/core/client/v1/client.proto"; // Msg defines the Msg service. service Msg { option (cosmos.msg.v1.service) = true; rpc AssignConsumerKey(MsgAssignConsumerKey) - returns (MsgAssignConsumerKeyResponse); + returns (MsgAssignConsumerKeyResponse); + + rpc ConsumerAddition(MsgConsumerAddition) + returns (MsgConsumerAdditionResponse); + + rpc ConsumerRemoval(MsgConsumerRemoval) + returns (MsgConsumerRemovalResponse); + + rpc ChangeRewardDenoms(MsgChangeRewardDenoms) + returns (MsgChangeRewardDenomsResponse); } message MsgAssignConsumerKey { @@ -36,3 +49,115 @@ message MsgAssignConsumerKey { } message MsgAssignConsumerKeyResponse {} + + +// MsgConsumerAddition defines the message used to spawn a new consumer chain using a v1 governance proposal. +// If it passes, then all validators on the provider chain are expected to validate +// the consumer chain at spawn time or get slashed. +// It is recommended that spawn time occurs after the proposal end time. +// +// Note: this replaces ConsumerAdditionProposal which is deprecated and will be removed soon +message MsgConsumerAddition { + option (cosmos.msg.v1.signer) = "signer"; + + // the proposed chain-id of the new consumer chain, must be different from all + // other consumer chain ids of the executing provider chain. + string chain_id = 1; + // the proposed initial height of new consumer chain. + // For a completely new chain, this will be {0,1}. However, it may be + // different if this is a chain that is converting to a consumer chain. + ibc.core.client.v1.Height initial_height = 2 [ (gogoproto.nullable) = false ]; + // The hash of the consumer chain genesis state without the consumer CCV + // module genesis params. It is used for off-chain confirmation of + // genesis.json validity by validators and other parties. + bytes genesis_hash = 3; + // The hash of the consumer chain binary that should be run by validators on + // chain initialization. It is used for off-chain confirmation of binary + // validity by validators and other parties. + bytes binary_hash = 4; + // spawn time is the time on the provider chain at which the consumer chain + // genesis is finalized and all validators will be responsible for starting + // their consumer chain validator node. + google.protobuf.Timestamp spawn_time = 5 + [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; + + // Unbonding period for the consumer, + // which should be smaller than that of the provider in general. + google.protobuf.Duration unbonding_period = 6 + [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; + // Sent CCV related IBC packets will timeout after this duration + google.protobuf.Duration ccv_timeout_period = 7 + [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; + // Sent transfer related IBC packets will timeout after this duration + google.protobuf.Duration transfer_timeout_period = 8 + [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; + // The fraction of tokens allocated to the consumer redistribution address + // during distribution events. The fraction is a string representing a + // decimal number. For example "0.75" would represent 75%. + string consumer_redistribution_fraction = 9; + // BlocksPerDistributionTransmission is the number of blocks between + // ibc-token-transfers from the consumer chain to the provider chain. On + // sending transmission event, `consumer_redistribution_fraction` of the + // accumulated tokens are sent to the consumer redistribution address. + int64 blocks_per_distribution_transmission = 10; + // The number of historical info entries to persist in store. + // This param is a part of the cosmos sdk staking module. In the case of + // a ccv enabled consumer chain, the ccv module acts as the staking module. + int64 historical_entries = 11; + // The ID of a token transfer channel used for the Reward Distribution + // sub-protocol. If DistributionTransmissionChannel == "", a new transfer + // channel is created on top of the same connection as the CCV channel. + // Note that transfer_channel_id is the ID of the channel end on the consumer + // chain. it is most relevant for chains performing a sovereign to consumer + // changeover in order to maintan the existing ibc transfer channel + string distribution_transmission_channel = 12; + + // signer address + string signer = 13 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgConsumerAdditionResponse defines response type for MsgConsumerAddition messages +message MsgConsumerAdditionResponse {} + + +// MsgConsumerRemoval message contains a governance proposal on the provider chain to +// remove (and stop) a consumer chain. If it passes, all the consumer chain's +// state is removed from the provider chain. The outstanding unbonding operation +// funds are released. +// +// Note: this replaces ConsumerRemovalProposal which is deprecated and will be removed soon +message MsgConsumerRemoval { + option (cosmos.msg.v1.signer) = "signer"; + + // the chain-id of the consumer chain to be stopped + string chain_id = 1; + // the time on the provider chain at which all validators are responsible to + // stop their consumer chain validator node + google.protobuf.Timestamp stop_time = 2 + [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; + + // signer address + string signer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgConsumerRemovalResponse defines response type for MsgConsumerRemoval messages +message MsgConsumerRemovalResponse {} + +// ChangeRewardDenomsProposal is a governance proposal on the provider chain to +// mutate the set of denoms accepted by the provider as rewards. +// +// Note: this replaces ChangeRewardDenomsProposal which is deprecated and will be removed soon +message MsgChangeRewardDenoms { + option (cosmos.msg.v1.signer) = "signer"; + + // the list of consumer reward denoms to add + repeated string denoms_to_add = 1; + // the list of consumer reward denoms to remove + repeated string denoms_to_remove = 2; + // signer address + string signer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + +} + +// MsgChangeRewardDenomsResponse defines response type for MsgChangeRewardDenoms messages +message MsgChangeRewardDenomsResponse {} diff --git a/x/ccv/provider/client/cli/tx.go b/x/ccv/provider/client/cli/tx.go index 74ae6dd635..79bbdcdfd2 100644 --- a/x/ccv/provider/client/cli/tx.go +++ b/x/ccv/provider/client/cli/tx.go @@ -3,14 +3,12 @@ package cli import ( "fmt" - "github.com/spf13/cobra" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" + "github.com/spf13/cobra" ) // GetTxCmd returns the transaction commands for this module @@ -24,7 +22,6 @@ func GetTxCmd() *cobra.Command { } cmd.AddCommand(NewAssignConsumerKeyCmd()) - return cmd } diff --git a/x/ccv/provider/client/proposal_handler.go b/x/ccv/provider/client/legacy_proposal_handler.go similarity index 100% rename from x/ccv/provider/client/proposal_handler.go rename to x/ccv/provider/client/legacy_proposal_handler.go diff --git a/x/ccv/provider/client/proposals.go b/x/ccv/provider/client/legacy_proposals.go similarity index 100% rename from x/ccv/provider/client/proposals.go rename to x/ccv/provider/client/legacy_proposals.go diff --git a/x/ccv/provider/keeper/msg_server.go b/x/ccv/provider/keeper/msg_server.go index b68eb7f838..491e585f60 100644 --- a/x/ccv/provider/keeper/msg_server.go +++ b/x/ccv/provider/keeper/msg_server.go @@ -110,3 +110,49 @@ func (k msgServer) AssignConsumerKey(goCtx context.Context, msg *types.MsgAssign return &types.MsgAssignConsumerKeyResponse{}, nil } + +// ConsumerAddition defines a rpc handler method for MsgConsumerAddition +func (k msgServer) ConsumerAddition(goCtx context.Context, msg *types.MsgConsumerAddition) (*types.MsgConsumerAdditionResponse, error) { + if k.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(types.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + err := k.Keeper.HandleConsumerAdditionProposal(ctx, msg) + if err != nil { + return nil, errorsmod.Wrapf(err, "failed handling ConsumerAddition proposal") + } + return &types.MsgConsumerAdditionResponse{}, nil +} + +// ConsumerRemoval defines a rpc handler method for MsgConsumerRemoval +func (k msgServer) ConsumerRemoval( + goCtx context.Context, + msg *types.MsgConsumerRemoval) (*types.MsgConsumerRemovalResponse, error) { + if k.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(types.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + err := k.Keeper.HandleConsumerRemovalProposal(ctx, msg) + if err != nil { + return nil, errorsmod.Wrapf(err, "failed handling ConsumerAddition proposal") + } + + return &types.MsgConsumerRemovalResponse{}, nil +} + +// ChangeRewardDenoms defines a rpc handler method for MsgChangeRewardDenoms +func (k msgServer) ChangeRewardDenoms(goCtx context.Context, msg *types.MsgChangeRewardDenoms) (*types.MsgChangeRewardDenomsResponse, error) { + if k.GetAuthority() != msg.Signer { + return nil, errorsmod.Wrapf(types.ErrUnauthorized, "expected %s, got %s", k.GetAuthority(), msg.Signer) + } + + sdkCtx := sdk.UnwrapSDKContext(goCtx) + err := k.Keeper.HandleConsumerRewardDenomProposal(sdkCtx, msg) + if err != nil { + return nil, errorsmod.Wrapf(err, "failed handling Change Reward Denoms proposal") + } + + return &types.MsgChangeRewardDenomsResponse{}, nil +} diff --git a/x/ccv/provider/keeper/proposal.go b/x/ccv/provider/keeper/proposal.go index a1e1242e7a..8f90e14448 100644 --- a/x/ccv/provider/keeper/proposal.go +++ b/x/ccv/provider/keeper/proposal.go @@ -24,13 +24,57 @@ import ( ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) -// HandleConsumerAdditionProposal will receive the consumer chain's client state from the proposal. +// Wrapper for the new proposal message MsgConsumerAddition +// Will replace legacy handler HandleLegacyConsumerAdditionProposal +func (k Keeper) HandleConsumerAdditionProposal(ctx sdk.Context, proposal *types.MsgConsumerAddition) error { + p := types.ConsumerAdditionProposal{ + Title: "New ConsumerAddition Proposal", + ChainId: proposal.ChainId, + InitialHeight: proposal.InitialHeight, + GenesisHash: proposal.GenesisHash, + BinaryHash: proposal.BinaryHash, + SpawnTime: proposal.SpawnTime, + UnbondingPeriod: proposal.UnbondingPeriod, + CcvTimeoutPeriod: proposal.CcvTimeoutPeriod, + TransferTimeoutPeriod: proposal.TransferTimeoutPeriod, + ConsumerRedistributionFraction: proposal.ConsumerRedistributionFraction, + BlocksPerDistributionTransmission: proposal.BlocksPerDistributionTransmission, + HistoricalEntries: proposal.HistoricalEntries, + DistributionTransmissionChannel: proposal.DistributionTransmissionChannel, + } + return k.HandleLegacyConsumerAdditionProposal(ctx, &p) + +} + +// Wrapper for the new proposal message MsgConsumerRemoval +// Will replace legacy handler HandleLegacyConsumerRemovalProposal +func (k Keeper) HandleConsumerRemovalProposal(ctx sdk.Context, proposal *types.MsgConsumerRemoval) error { + p := types.ConsumerRemovalProposal{ + ChainId: proposal.ChainId, + StopTime: proposal.StopTime, + } + return k.HandleLegacyConsumerRemovalProposal(ctx, &p) + +} + +// Wrapper for the new proposal message MsgChangeRewardDenoms +// Will replace legacy handler HandleLegacyConsumerRewardDenomProposal +func (k Keeper) HandleConsumerRewardDenomProposal(ctx sdk.Context, proposal *types.MsgChangeRewardDenoms) error { + p := types.ChangeRewardDenomsProposal{ + Title: "New ChangeRewardDenomsProposal", + DenomsToAdd: proposal.DenomsToAdd, + DenomsToRemove: proposal.DenomsToRemove, + } + return k.HandleLegacyConsumerRewardDenomProposal(ctx, &p) +} + +// HandleLegacyConsumerAdditionProposal will receive the consumer chain's client state from the proposal. // If the client can be successfully created in a cached context, it stores the proposal as a pending proposal. // // Note: This method implements SpawnConsumerChainProposalHandler in spec. // See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-hcaprop1 // Spec tag: [CCV-PCF-HCAPROP.1] -func (k Keeper) HandleConsumerAdditionProposal(ctx sdk.Context, p *types.ConsumerAdditionProposal) error { +func (k Keeper) HandleLegacyConsumerAdditionProposal(ctx sdk.Context, p *types.ConsumerAdditionProposal) error { // verify the consumer addition proposal execution // in cached context and discard the cached writes if _, _, err := k.CreateConsumerClientInCachedCtx(ctx, *p); err != nil { @@ -123,13 +167,13 @@ func (k Keeper) CreateConsumerClient(ctx sdk.Context, prop *types.ConsumerAdditi return nil } -// HandleConsumerRemovalProposal stops a consumer chain and released the outstanding unbonding operations. +// HandleLegacyConsumerRemovalProposal 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) HandleConsumerRemovalProposal(ctx sdk.Context, p *types.ConsumerRemovalProposal) error { +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 { @@ -611,7 +655,7 @@ func (k Keeper) StopConsumerChainInCachedCtx(ctx sdk.Context, p types.ConsumerRe return } -func (k Keeper) HandleConsumerRewardDenomProposal(ctx sdk.Context, p *types.ChangeRewardDenomsProposal) error { +func (k Keeper) HandleLegacyConsumerRewardDenomProposal(ctx sdk.Context, p *types.ChangeRewardDenomsProposal) error { for _, denomToAdd := range p.DenomsToAdd { // Log error and move on if one of the denoms is already registered if k.ConsumerRewardDenomExists(ctx, denomToAdd) { diff --git a/x/ccv/provider/keeper/proposal_test.go b/x/ccv/provider/keeper/proposal_test.go index 5bf25c7e68..5899e058b1 100644 --- a/x/ccv/provider/keeper/proposal_test.go +++ b/x/ccv/provider/keeper/proposal_test.go @@ -29,10 +29,10 @@ import ( // Initialization sub-protocol related tests of proposal.go // -// Tests the HandleConsumerAdditionProposal method against the SpawnConsumerChainProposalHandler spec. +// Tests the HandleLegacyConsumerAdditionProposal method against the SpawnConsumerChainProposalHandler spec. // See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-hcaprop1 // Spec tag: [CCV-PCF-HCAPROP.1] -func TestHandleConsumerAdditionProposal(t *testing.T) { +func TestHandleLegacyConsumerAdditionProposal(t *testing.T) { type testCase struct { description string malleate func(ctx sdk.Context, k providerkeeper.Keeper, chainID string) @@ -113,7 +113,7 @@ func TestHandleConsumerAdditionProposal(t *testing.T) { tc.malleate(ctx, providerKeeper, tc.prop.ChainId) - err := providerKeeper.HandleConsumerAdditionProposal(ctx, tc.prop) + err := providerKeeper.HandleLegacyConsumerAdditionProposal(ctx, tc.prop) if tc.expAppendProp { require.NoError(t, err) @@ -371,11 +371,11 @@ func TestGetAllConsumerAdditionProps(t *testing.T) { // Consumer Chain Removal sub-protocol related tests of proposal.go // -// TestHandleConsumerRemovalProposal tests HandleConsumerRemovalProposal against its corresponding spec method. +// TestHandleLegacyConsumerRemovalProposal tests HandleLegacyConsumerRemovalProposal 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 TestHandleConsumerRemovalProposal(t *testing.T) { +func TestHandleLegacyConsumerRemovalProposal(t *testing.T) { type testCase struct { description string setupMocks func(ctx sdk.Context, k providerkeeper.Keeper, chainID string) @@ -479,7 +479,7 @@ func TestHandleConsumerRemovalProposal(t *testing.T) { tc.setupMocks(ctx, providerKeeper, tc.prop.ChainId) - err := providerKeeper.HandleConsumerRemovalProposal(ctx, tc.prop) + err := providerKeeper.HandleLegacyConsumerRemovalProposal(ctx, tc.prop) if tc.expAppendProp { require.NoError(t, err) @@ -505,7 +505,7 @@ func TestHandleConsumerRemovalProposal(t *testing.T) { } // Tests the StopConsumerChain method against the spec, -// with more granularity than what's covered in TestHandleConsumerRemovalProposal, or integration tests. +// 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 // Spec tag: [CCV-PCF-STCC.1] func TestStopConsumerChain(t *testing.T) { diff --git a/x/ccv/provider/proposal_handler.go b/x/ccv/provider/proposal_handler.go index ff230b69ce..8f2671e086 100644 --- a/x/ccv/provider/proposal_handler.go +++ b/x/ccv/provider/proposal_handler.go @@ -17,11 +17,11 @@ func NewProviderProposalHandler(k keeper.Keeper) govv1beta1.Handler { return func(ctx sdk.Context, content govv1beta1.Content) error { switch c := content.(type) { case *types.ConsumerAdditionProposal: - return k.HandleConsumerAdditionProposal(ctx, c) + return k.HandleLegacyConsumerAdditionProposal(ctx, c) case *types.ConsumerRemovalProposal: - return k.HandleConsumerRemovalProposal(ctx, c) + return k.HandleLegacyConsumerRemovalProposal(ctx, c) case *types.ChangeRewardDenomsProposal: - return k.HandleConsumerRewardDenomProposal(ctx, c) + return k.HandleLegacyConsumerRewardDenomProposal(ctx, c) default: return errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized ccv proposal content type: %T", c) } diff --git a/x/ccv/provider/types/codec.go b/x/ccv/provider/types/codec.go index a067dc4cb7..b33a390c5f 100644 --- a/x/ccv/provider/types/codec.go +++ b/x/ccv/provider/types/codec.go @@ -2,6 +2,7 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -11,6 +12,7 @@ import ( // RegisterLegacyAminoCodec registers the necessary x/ibc transfer interfaces and concrete types // on the provided LegacyAmino codec. These types are used for Amino JSON serialization. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + legacy.RegisterAminoMsg(cdc, &MsgConsumerAddition{}, "cosmos-sdk/MsgConsumerAddition") } // RegisterInterfaces registers the provider proposal structs to the interface registry @@ -26,6 +28,9 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgAssignConsumerKey{}, + &MsgConsumerAddition{}, + &MsgConsumerRemoval{}, + &MsgChangeRewardDenoms{}, ) registry.RegisterImplementations( (*govv1beta1.Content)(nil), diff --git a/x/ccv/provider/types/errors.go b/x/ccv/provider/types/errors.go index 5f29e78e69..e9b5f9a0cf 100644 --- a/x/ccv/provider/types/errors.go +++ b/x/ccv/provider/types/errors.go @@ -23,4 +23,5 @@ var ( ErrInvalidDepositorAddress = errorsmod.Register(ModuleName, 15, "invalid depositor address") ErrNoUnbondingTime = errorsmod.Register(ModuleName, 16, "provider unbonding time not found") ErrInvalidAddress = errorsmod.Register(ModuleName, 17, "invalid address") + ErrUnauthorized = errorsmod.Register(ModuleName, 18, "unauthorized") ) diff --git a/x/ccv/provider/types/proposal.go b/x/ccv/provider/types/legacy_proposal.go similarity index 99% rename from x/ccv/provider/types/proposal.go rename to x/ccv/provider/types/legacy_proposal.go index 5e0356e9e8..a7b96273b4 100644 --- a/x/ccv/provider/types/proposal.go +++ b/x/ccv/provider/types/legacy_proposal.go @@ -194,7 +194,7 @@ func (sccp *ConsumerRemovalProposal) ValidateBasic() error { } if sccp.StopTime.IsZero() { - return errorsmod.Wrap(ErrInvalidConsumerRemovalProp, "spawn time cannot be zero") + return errorsmod.Wrap(ErrInvalidConsumerRemovalProp, "stop time cannot be zero") } return nil } diff --git a/x/ccv/provider/types/proposal_test.go b/x/ccv/provider/types/legacy_proposal_test.go similarity index 100% rename from x/ccv/provider/types/proposal_test.go rename to x/ccv/provider/types/legacy_proposal_test.go diff --git a/x/ccv/provider/types/msg.go b/x/ccv/provider/types/msg.go index 57eaf84133..b4f52dccaa 100644 --- a/x/ccv/provider/types/msg.go +++ b/x/ccv/provider/types/msg.go @@ -2,9 +2,13 @@ package types import ( "encoding/json" + "fmt" "strings" + errorsmod "cosmossdk.io/errors" + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // provider message types @@ -12,7 +16,17 @@ const ( TypeMsgAssignConsumerKey = "assign_consumer_key" ) -var _ sdk.Msg = &MsgAssignConsumerKey{} +var ( + _ sdk.Msg = (*MsgAssignConsumerKey)(nil) + _ sdk.Msg = (*MsgConsumerAddition)(nil) + _ sdk.Msg = (*MsgConsumerRemoval)(nil) + _ sdk.Msg = (*MsgChangeRewardDenoms)(nil) + + _ sdk.HasValidateBasic = (*MsgAssignConsumerKey)(nil) + _ sdk.HasValidateBasic = (*MsgConsumerAddition)(nil) + _ sdk.HasValidateBasic = (*MsgConsumerRemoval)(nil) + _ sdk.HasValidateBasic = (*MsgChangeRewardDenoms)(nil) +) // NewMsgAssignConsumerKey creates a new MsgAssignConsumerKey instance. // Delegator address and validator address are the same. @@ -94,3 +108,118 @@ func ParseConsumerKeyFromJson(jsonStr string) (pkType, key string, err error) { } return pubKey.Type, pubKey.Key, nil } + +// GetSigners implements the sdk.Msg interface. It returns the address(es) that +// must sign over msg.GetSignBytes(). +// If the validator address is not same as delegator's, then the validator must +// sign the msg as well. +func (msg *MsgConsumerAddition) GetSigners() []sdk.AccAddress { + valAddr, err := sdk.ValAddressFromBech32(msg.Signer) + if err != nil { + // same behavior as in cosmos-sdk + panic(err) + } + return []sdk.AccAddress{valAddr.Bytes()} +} + +// ValidateBasic implements the sdk.Msg interface. +func (msg *MsgConsumerAddition) ValidateBasic() error { + if strings.TrimSpace(msg.ChainId) == "" { + return ErrBlankConsumerChainID + } + + if strings.TrimSpace(msg.ChainId) == "" { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "consumer chain id must not be blank") + } + + if msg.InitialHeight.IsZero() { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "initial height cannot be zero") + } + + if len(msg.GenesisHash) == 0 { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "genesis hash cannot be empty") + } + if len(msg.BinaryHash) == 0 { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "binary hash cannot be empty") + } + + if msg.SpawnTime.IsZero() { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "spawn time cannot be zero") + } + + if err := ccvtypes.ValidateStringFraction(msg.ConsumerRedistributionFraction); err != nil { + return errorsmod.Wrapf(ErrInvalidConsumerAdditionProposal, "consumer redistribution fraction is invalid: %s", err) + } + + if err := ccvtypes.ValidatePositiveInt64(msg.BlocksPerDistributionTransmission); err != nil { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "blocks per distribution transmission cannot be < 1") + } + + if err := ccvtypes.ValidateDistributionTransmissionChannel(msg.DistributionTransmissionChannel); err != nil { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "distribution transmission channel") + } + + if err := ccvtypes.ValidatePositiveInt64(msg.HistoricalEntries); err != nil { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "historical entries cannot be < 1") + } + + if err := ccvtypes.ValidateDuration(msg.CcvTimeoutPeriod); err != nil { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "ccv timeout period cannot be zero") + } + + if err := ccvtypes.ValidateDuration(msg.TransferTimeoutPeriod); err != nil { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "transfer timeout period cannot be zero") + } + + if err := ccvtypes.ValidateDuration(msg.UnbondingPeriod); err != nil { + return errorsmod.Wrap(ErrInvalidConsumerAdditionProposal, "unbonding period cannot be zero") + } + + return nil +} + +func (msg *MsgConsumerRemoval) ValidateBasic() error { + + if strings.TrimSpace(msg.ChainId) == "" { + return errorsmod.Wrap(ErrInvalidConsumerRemovalProp, "consumer chain id must not be blank") + } + + if msg.StopTime.IsZero() { + return errorsmod.Wrap(ErrInvalidConsumerRemovalProp, "spawn time cannot be zero") + } + return nil +} + +func (msg *MsgChangeRewardDenoms) ValidateBasic() error { + emptyDenomsToAdd := len(msg.DenomsToAdd) == 0 + emptyDenomsToRemove := len(msg.DenomsToRemove) == 0 + // Return error if both sets are empty or nil + if emptyDenomsToAdd && emptyDenomsToRemove { + return fmt.Errorf( + "invalid change reward denoms proposal: both denoms to add and denoms to remove are empty") + } + + // Return error if a denom is in both sets + for _, denomToAdd := range msg.DenomsToAdd { + for _, denomToRemove := range msg.DenomsToRemove { + if denomToAdd == denomToRemove { + return fmt.Errorf( + "invalid change reward denoms proposal: %s cannot be both added and removed", denomToAdd) + } + } + } + + // Return error if any denom is "invalid" + for _, denom := range msg.DenomsToAdd { + if !sdk.NewCoin(denom, math.NewInt(1)).IsValid() { + return fmt.Errorf("invalid change reward denoms proposal: %s is not a valid denom", denom) + } + } + for _, denom := range msg.DenomsToRemove { + if !sdk.NewCoin(denom, math.NewInt(1)).IsValid() { + return fmt.Errorf("invalid change reward denoms proposal: %s is not a valid denom", denom) + } + } + + return nil +} diff --git a/x/ccv/provider/types/provider.pb.go b/x/ccv/provider/types/provider.pb.go index b2884a2a42..b75f676fe8 100644 --- a/x/ccv/provider/types/provider.pb.go +++ b/x/ccv/provider/types/provider.pb.go @@ -40,6 +40,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // chain are expected to validate the consumer chain at spawn time or get // slashed. It is recommended that spawn time occurs after the proposal end // time. +// Deprecated: Use MsgConsumerAddition instead +// +// Deprecated: Do not use. type ConsumerAdditionProposal struct { // the title of the proposal Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -129,6 +132,9 @@ var xxx_messageInfo_ConsumerAdditionProposal proto.InternalMessageInfo // remove (and stop) a consumer chain. If it passes, all the consumer chain's // state is removed from the provider chain. The outstanding unbonding operation // funds are released. +// Deprecated: Use MsgConsumerRemoval instead +// +// Deprecated: Do not use. type ConsumerRemovalProposal struct { // the title of the proposal Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -204,6 +210,9 @@ func (m *ConsumerRemovalProposal) GetStopTime() time.Time { // ChangeRewardDenomsProposal is a governance proposal on the provider chain to // mutate the set of denoms accepted by the provider as rewards. +// Deprecated: Use MsgChangeRewardDenoms instead +// +// Deprecated: Do not use. type ChangeRewardDenomsProposal struct { // the title of the proposal Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -1353,115 +1362,115 @@ func init() { } var fileDescriptor_f22ec409a72b7b72 = []byte{ - // 1715 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x8a, 0x94, 0x2c, 0x3e, 0xea, 0xcb, 0x2b, 0x3b, 0xa6, 0x54, 0x95, 0x92, 0x37, 0xad, - 0xab, 0x22, 0xf0, 0x32, 0x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 0x2f, 0xfe, 0xfc, 0x48, 0x1f, 0x74, 0x5e, 0x8c, 0xff, 0x19, 0x23, 0x47, 0x09, 0x11, - 0xbd, 0x79, 0x3d, 0x15, 0x1e, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xb8, 0xb2, 0x71, 0xce, 0xbd, - 0x11, 0x00, 0x00, + // 1716 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x8a, 0x94, 0x2c, 0x3e, 0xea, 0x9f, 0x57, 0x76, 0x4c, 0xa9, 0x2a, 0x25, 0x6f, 0xda, + 0x54, 0x45, 0xe0, 0x65, 0x24, 0xa3, 0x40, 0x60, 0x34, 0x08, 0x24, 0x2a, 0x89, 0x15, 0x37, 0xb1, + 0xb2, 0x52, 0x65, 0xb4, 0x3d, 0x2c, 0x86, 0xb3, 0x63, 0x72, 0xa0, 0xdd, 0x9d, 0xcd, 0xcc, 0x70, + 0x6d, 0x5e, 0x7a, 0xee, 0x31, 0xbd, 0x05, 0x3d, 0xa5, 0xfd, 0x0c, 0xfd, 0x08, 0x3d, 0x04, 0x3d, + 0xa5, 0xb7, 0x9e, 0xd2, 0xc2, 0x3e, 0xf4, 0xd0, 0x0f, 0xd1, 0x62, 0x66, 0xf6, 0x1f, 0x29, 0xd1, + 0xa1, 0x11, 0xe4, 0xb6, 0xf3, 0xe6, 0xbd, 0xdf, 0xfb, 0xff, 0xde, 0x90, 0x70, 0x40, 0x63, 0x49, + 0x38, 0x1e, 0x20, 0x1a, 0xfb, 0x82, 0xe0, 0x21, 0xa7, 0x72, 0xd4, 0xc1, 0x38, 0xed, 0x24, 0x9c, + 0xa5, 0x34, 0x20, 0xbc, 0x93, 0xee, 0x17, 0xdf, 0x6e, 0xc2, 0x99, 0x64, 0xf6, 0x9b, 0xd7, 0xc8, + 0xb8, 0x18, 0xa7, 0x6e, 0xc1, 0x97, 0xee, 0x6f, 0xbd, 0x33, 0x0d, 0x38, 0xdd, 0xef, 0x88, 0x01, + 0xe2, 0x24, 0xf0, 0x31, 0x8b, 0xc5, 0x30, 0xca, 0x61, 0xb7, 0x7e, 0xfa, 0x0a, 0x89, 0x67, 0x94, + 0x93, 0x8c, 0xed, 0x56, 0x9f, 0xf5, 0x99, 0xfe, 0xec, 0xa8, 0xaf, 0x8c, 0xba, 0xd3, 0x67, 0xac, + 0x1f, 0x92, 0x8e, 0x3e, 0xf5, 0x86, 0x4f, 0x3b, 0x92, 0x46, 0x44, 0x48, 0x14, 0x25, 0x19, 0x43, + 0x7b, 0x92, 0x21, 0x18, 0x72, 0x24, 0x29, 0x8b, 0x73, 0x00, 0xda, 0xc3, 0x1d, 0xcc, 0x38, 0xe9, + 0xe0, 0x90, 0x92, 0x58, 0x2a, 0xad, 0xe6, 0x2b, 0x63, 0xe8, 0x28, 0x86, 0x90, 0xf6, 0x07, 0xd2, + 0x90, 0x45, 0x47, 0x92, 0x38, 0x20, 0x3c, 0xa2, 0x86, 0xb9, 0x3c, 0x65, 0x02, 0xdb, 0x95, 0x7b, + 0xcc, 0x47, 0x89, 0x64, 0x9d, 0x4b, 0x32, 0x12, 0xd9, 0xed, 0x5b, 0x98, 0x89, 0x88, 0x89, 0x0e, + 0x51, 0x11, 0x8b, 0x31, 0xe9, 0xa4, 0xfb, 0x3d, 0x22, 0xd1, 0x7e, 0x41, 0xc8, 0xed, 0xce, 0xf8, + 0x7a, 0x48, 0x94, 0x3c, 0x98, 0xd1, 0xdc, 0xee, 0x4d, 0x73, 0xef, 0x9b, 0x88, 0x98, 0x83, 0xb9, + 0x72, 0xfe, 0xb7, 0x08, 0xad, 0x6e, 0x16, 0xe3, 0xc3, 0x20, 0xa0, 0xca, 0xdb, 0x53, 0xce, 0x12, + 0x26, 0x50, 0x68, 0xdf, 0x82, 0x05, 0x49, 0x65, 0x48, 0x5a, 0xd6, 0xae, 0xb5, 0xd7, 0xf0, 0xcc, + 0xc1, 0xde, 0x85, 0x66, 0x40, 0x04, 0xe6, 0x34, 0x51, 0xcc, 0xad, 0x79, 0x7d, 0x57, 0x25, 0xd9, + 0x9b, 0xb0, 0x64, 0x52, 0x44, 0x83, 0x56, 0x4d, 0x5f, 0xdf, 0xd0, 0xe7, 0x93, 0xc0, 0xfe, 0x08, + 0x56, 0x69, 0x4c, 0x25, 0x45, 0xa1, 0x3f, 0x20, 0x2a, 0x50, 0xad, 0xfa, 0xae, 0xb5, 0xd7, 0x3c, + 0xd8, 0x72, 0x69, 0x0f, 0xbb, 0x2a, 0xb6, 0x6e, 0x16, 0xd1, 0x74, 0xdf, 0x7d, 0xa8, 0x39, 0x8e, + 0xea, 0x5f, 0x7f, 0xbb, 0x33, 0xe7, 0xad, 0x64, 0x72, 0x86, 0x68, 0xdf, 0x85, 0xe5, 0x3e, 0x89, + 0x89, 0xa0, 0xc2, 0x1f, 0x20, 0x31, 0x68, 0x2d, 0xec, 0x5a, 0x7b, 0xcb, 0x5e, 0x33, 0xa3, 0x3d, + 0x44, 0x62, 0x60, 0xef, 0x40, 0xb3, 0x47, 0x63, 0xc4, 0x47, 0x86, 0x63, 0x51, 0x73, 0x80, 0x21, + 0x69, 0x86, 0x2e, 0x80, 0x48, 0xd0, 0xb3, 0xd8, 0x57, 0x85, 0xd0, 0xba, 0x91, 0x19, 0x62, 0x8a, + 0xc0, 0xcd, 0x8b, 0xc0, 0x3d, 0xcf, 0xab, 0xe4, 0x68, 0x49, 0x19, 0xf2, 0xc5, 0xbf, 0x76, 0x2c, + 0xaf, 0xa1, 0xe5, 0xd4, 0x8d, 0xfd, 0x29, 0xac, 0x0f, 0xe3, 0x1e, 0x8b, 0x03, 0x1a, 0xf7, 0xfd, + 0x84, 0x70, 0xca, 0x82, 0xd6, 0x92, 0x86, 0xda, 0xbc, 0x02, 0x75, 0x9c, 0xd5, 0x93, 0x41, 0xfa, + 0x52, 0x21, 0xad, 0x15, 0x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, 0x94, 0x0f, 0x63, 0xf2, 0x2a, 0xed, 0x65, + 0xfb, 0xcd, 0x57, 0xdb, 0xef, 0x09, 0xac, 0x8e, 0x19, 0x25, 0xb2, 0x68, 0xbc, 0x33, 0x53, 0x8d, + 0x55, 0xa6, 0xab, 0xb7, 0x52, 0xf5, 0x43, 0x1c, 0x3d, 0xf9, 0xfa, 0x45, 0xdb, 0xfa, 0xe6, 0x45, + 0xdb, 0xfa, 0xf7, 0x8b, 0xb6, 0xf5, 0xc5, 0xcb, 0xf6, 0xdc, 0x37, 0x2f, 0xdb, 0x73, 0xff, 0x7c, + 0xd9, 0x9e, 0xfb, 0xed, 0x7b, 0x7d, 0x2a, 0x07, 0xc3, 0x9e, 0x8b, 0x59, 0x94, 0xfd, 0x70, 0xef, + 0x94, 0xba, 0xee, 0x15, 0x7f, 0x81, 0xa4, 0xf7, 0x3b, 0xcf, 0xc7, 0xff, 0x92, 0x91, 0xa3, 0x84, + 0x88, 0xde, 0xa2, 0x9e, 0x0a, 0xf7, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xb0, 0x54, 0x77, + 0xc3, 0x11, 0x00, 0x00, } func (m *ConsumerAdditionProposal) Marshal() (dAtA []byte, err error) { diff --git a/x/ccv/provider/types/tx.pb.go b/x/ccv/provider/types/tx.pb.go index 9e7a62b26d..168401053f 100644 --- a/x/ccv/provider/types/tx.pb.go +++ b/x/ccv/provider/types/tx.pb.go @@ -9,22 +9,29 @@ import ( _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + types "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + _ "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" + time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf +var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -114,9 +121,444 @@ func (m *MsgAssignConsumerKeyResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAssignConsumerKeyResponse proto.InternalMessageInfo +// MsgConsumerAddition defines the message used to spawn a new consumer chain using a v1 governance proposal. +// If it passes, then all validators on the provider chain are expected to validate +// the consumer chain at spawn time or get slashed. +// It is recommended that spawn time occurs after the proposal end time. +// +// Note: this replaces ConsumerAdditionProposal which is deprecated and will be removed soon +type MsgConsumerAddition struct { + // the proposed chain-id of the new consumer chain, must be different from all + // other consumer chain ids of the executing provider chain. + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // the proposed initial height of new consumer chain. + // For a completely new chain, this will be {0,1}. However, it may be + // different if this is a chain that is converting to a consumer chain. + InitialHeight types.Height `protobuf:"bytes,2,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height"` + // The hash of the consumer chain genesis state without the consumer CCV + // module genesis params. It is used for off-chain confirmation of + // genesis.json validity by validators and other parties. + GenesisHash []byte `protobuf:"bytes,3,opt,name=genesis_hash,json=genesisHash,proto3" json:"genesis_hash,omitempty"` + // The hash of the consumer chain binary that should be run by validators on + // chain initialization. It is used for off-chain confirmation of binary + // validity by validators and other parties. + BinaryHash []byte `protobuf:"bytes,4,opt,name=binary_hash,json=binaryHash,proto3" json:"binary_hash,omitempty"` + // spawn time is the time on the provider chain at which the consumer chain + // genesis is finalized and all validators will be responsible for starting + // their consumer chain validator node. + SpawnTime time.Time `protobuf:"bytes,5,opt,name=spawn_time,json=spawnTime,proto3,stdtime" json:"spawn_time"` + // Unbonding period for the consumer, + // which should be smaller than that of the provider in general. + UnbondingPeriod time.Duration `protobuf:"bytes,6,opt,name=unbonding_period,json=unbondingPeriod,proto3,stdduration" json:"unbonding_period"` + // Sent CCV related IBC packets will timeout after this duration + CcvTimeoutPeriod time.Duration `protobuf:"bytes,7,opt,name=ccv_timeout_period,json=ccvTimeoutPeriod,proto3,stdduration" json:"ccv_timeout_period"` + // Sent transfer related IBC packets will timeout after this duration + TransferTimeoutPeriod time.Duration `protobuf:"bytes,8,opt,name=transfer_timeout_period,json=transferTimeoutPeriod,proto3,stdduration" json:"transfer_timeout_period"` + // The fraction of tokens allocated to the consumer redistribution address + // during distribution events. The fraction is a string representing a + // decimal number. For example "0.75" would represent 75%. + ConsumerRedistributionFraction string `protobuf:"bytes,9,opt,name=consumer_redistribution_fraction,json=consumerRedistributionFraction,proto3" json:"consumer_redistribution_fraction,omitempty"` + // BlocksPerDistributionTransmission is the number of blocks between + // ibc-token-transfers from the consumer chain to the provider chain. On + // sending transmission event, `consumer_redistribution_fraction` of the + // accumulated tokens are sent to the consumer redistribution address. + BlocksPerDistributionTransmission int64 `protobuf:"varint,10,opt,name=blocks_per_distribution_transmission,json=blocksPerDistributionTransmission,proto3" json:"blocks_per_distribution_transmission,omitempty"` + // The number of historical info entries to persist in store. + // This param is a part of the cosmos sdk staking module. In the case of + // a ccv enabled consumer chain, the ccv module acts as the staking module. + HistoricalEntries int64 `protobuf:"varint,11,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty"` + // The ID of a token transfer channel used for the Reward Distribution + // sub-protocol. If DistributionTransmissionChannel == "", a new transfer + // channel is created on top of the same connection as the CCV channel. + // Note that transfer_channel_id is the ID of the channel end on the consumer + // chain. it is most relevant for chains performing a sovereign to consumer + // changeover in order to maintan the existing ibc transfer channel + DistributionTransmissionChannel string `protobuf:"bytes,12,opt,name=distribution_transmission_channel,json=distributionTransmissionChannel,proto3" json:"distribution_transmission_channel,omitempty"` + // signer address + Signer string `protobuf:"bytes,13,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgConsumerAddition) Reset() { *m = MsgConsumerAddition{} } +func (m *MsgConsumerAddition) String() string { return proto.CompactTextString(m) } +func (*MsgConsumerAddition) ProtoMessage() {} +func (*MsgConsumerAddition) Descriptor() ([]byte, []int) { + return fileDescriptor_43221a4391e9fbf4, []int{2} +} +func (m *MsgConsumerAddition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConsumerAddition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConsumerAddition.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 *MsgConsumerAddition) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConsumerAddition.Merge(m, src) +} +func (m *MsgConsumerAddition) XXX_Size() int { + return m.Size() +} +func (m *MsgConsumerAddition) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConsumerAddition.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConsumerAddition proto.InternalMessageInfo + +func (m *MsgConsumerAddition) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *MsgConsumerAddition) GetInitialHeight() types.Height { + if m != nil { + return m.InitialHeight + } + return types.Height{} +} + +func (m *MsgConsumerAddition) GetGenesisHash() []byte { + if m != nil { + return m.GenesisHash + } + return nil +} + +func (m *MsgConsumerAddition) GetBinaryHash() []byte { + if m != nil { + return m.BinaryHash + } + return nil +} + +func (m *MsgConsumerAddition) GetSpawnTime() time.Time { + if m != nil { + return m.SpawnTime + } + return time.Time{} +} + +func (m *MsgConsumerAddition) GetUnbondingPeriod() time.Duration { + if m != nil { + return m.UnbondingPeriod + } + return 0 +} + +func (m *MsgConsumerAddition) GetCcvTimeoutPeriod() time.Duration { + if m != nil { + return m.CcvTimeoutPeriod + } + return 0 +} + +func (m *MsgConsumerAddition) GetTransferTimeoutPeriod() time.Duration { + if m != nil { + return m.TransferTimeoutPeriod + } + return 0 +} + +func (m *MsgConsumerAddition) GetConsumerRedistributionFraction() string { + if m != nil { + return m.ConsumerRedistributionFraction + } + return "" +} + +func (m *MsgConsumerAddition) GetBlocksPerDistributionTransmission() int64 { + if m != nil { + return m.BlocksPerDistributionTransmission + } + return 0 +} + +func (m *MsgConsumerAddition) GetHistoricalEntries() int64 { + if m != nil { + return m.HistoricalEntries + } + return 0 +} + +func (m *MsgConsumerAddition) GetDistributionTransmissionChannel() string { + if m != nil { + return m.DistributionTransmissionChannel + } + return "" +} + +func (m *MsgConsumerAddition) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +// MsgConsumerAdditionResponse defines response type for MsgConsumerAddition messages +type MsgConsumerAdditionResponse struct { +} + +func (m *MsgConsumerAdditionResponse) Reset() { *m = MsgConsumerAdditionResponse{} } +func (m *MsgConsumerAdditionResponse) String() string { return proto.CompactTextString(m) } +func (*MsgConsumerAdditionResponse) ProtoMessage() {} +func (*MsgConsumerAdditionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43221a4391e9fbf4, []int{3} +} +func (m *MsgConsumerAdditionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConsumerAdditionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConsumerAdditionResponse.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 *MsgConsumerAdditionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConsumerAdditionResponse.Merge(m, src) +} +func (m *MsgConsumerAdditionResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgConsumerAdditionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConsumerAdditionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConsumerAdditionResponse proto.InternalMessageInfo + +// MsgConsumerRemoval message contains a governance proposal on the provider chain to +// remove (and stop) a consumer chain. If it passes, all the consumer chain's +// state is removed from the provider chain. The outstanding unbonding operation +// funds are released. +// +// Note: this replaces ConsumerRemovalProposal which is deprecated and will be removed soon +type MsgConsumerRemoval struct { + // the chain-id of the consumer chain to be stopped + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + // the time on the provider chain at which all validators are responsible to + // stop their consumer chain validator node + StopTime time.Time `protobuf:"bytes,2,opt,name=stop_time,json=stopTime,proto3,stdtime" json:"stop_time"` + // signer address + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgConsumerRemoval) Reset() { *m = MsgConsumerRemoval{} } +func (m *MsgConsumerRemoval) String() string { return proto.CompactTextString(m) } +func (*MsgConsumerRemoval) ProtoMessage() {} +func (*MsgConsumerRemoval) Descriptor() ([]byte, []int) { + return fileDescriptor_43221a4391e9fbf4, []int{4} +} +func (m *MsgConsumerRemoval) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConsumerRemoval) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConsumerRemoval.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 *MsgConsumerRemoval) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConsumerRemoval.Merge(m, src) +} +func (m *MsgConsumerRemoval) XXX_Size() int { + return m.Size() +} +func (m *MsgConsumerRemoval) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConsumerRemoval.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConsumerRemoval proto.InternalMessageInfo + +func (m *MsgConsumerRemoval) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *MsgConsumerRemoval) GetStopTime() time.Time { + if m != nil { + return m.StopTime + } + return time.Time{} +} + +func (m *MsgConsumerRemoval) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +// MsgConsumerRemovalResponse defines response type for MsgConsumerRemoval messages +type MsgConsumerRemovalResponse struct { +} + +func (m *MsgConsumerRemovalResponse) Reset() { *m = MsgConsumerRemovalResponse{} } +func (m *MsgConsumerRemovalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgConsumerRemovalResponse) ProtoMessage() {} +func (*MsgConsumerRemovalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43221a4391e9fbf4, []int{5} +} +func (m *MsgConsumerRemovalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgConsumerRemovalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgConsumerRemovalResponse.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 *MsgConsumerRemovalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConsumerRemovalResponse.Merge(m, src) +} +func (m *MsgConsumerRemovalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgConsumerRemovalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConsumerRemovalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgConsumerRemovalResponse proto.InternalMessageInfo + +// ChangeRewardDenomsProposal is a governance proposal on the provider chain to +// mutate the set of denoms accepted by the provider as rewards. +// +// Note: this replaces ChangeRewardDenomsProposal which is deprecated and will be removed soon +type MsgChangeRewardDenoms struct { + // the list of consumer reward denoms to add + DenomsToAdd []string `protobuf:"bytes,1,rep,name=denoms_to_add,json=denomsToAdd,proto3" json:"denoms_to_add,omitempty"` + // the list of consumer reward denoms to remove + DenomsToRemove []string `protobuf:"bytes,2,rep,name=denoms_to_remove,json=denomsToRemove,proto3" json:"denoms_to_remove,omitempty"` + // signer address + Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` +} + +func (m *MsgChangeRewardDenoms) Reset() { *m = MsgChangeRewardDenoms{} } +func (m *MsgChangeRewardDenoms) String() string { return proto.CompactTextString(m) } +func (*MsgChangeRewardDenoms) ProtoMessage() {} +func (*MsgChangeRewardDenoms) Descriptor() ([]byte, []int) { + return fileDescriptor_43221a4391e9fbf4, []int{6} +} +func (m *MsgChangeRewardDenoms) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgChangeRewardDenoms) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgChangeRewardDenoms.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 *MsgChangeRewardDenoms) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgChangeRewardDenoms.Merge(m, src) +} +func (m *MsgChangeRewardDenoms) XXX_Size() int { + return m.Size() +} +func (m *MsgChangeRewardDenoms) XXX_DiscardUnknown() { + xxx_messageInfo_MsgChangeRewardDenoms.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgChangeRewardDenoms proto.InternalMessageInfo + +func (m *MsgChangeRewardDenoms) GetDenomsToAdd() []string { + if m != nil { + return m.DenomsToAdd + } + return nil +} + +func (m *MsgChangeRewardDenoms) GetDenomsToRemove() []string { + if m != nil { + return m.DenomsToRemove + } + return nil +} + +func (m *MsgChangeRewardDenoms) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +// MsgChangeRewardDenomsResponse defines response type for MsgChangeRewardDenoms messages +type MsgChangeRewardDenomsResponse struct { +} + +func (m *MsgChangeRewardDenomsResponse) Reset() { *m = MsgChangeRewardDenomsResponse{} } +func (m *MsgChangeRewardDenomsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgChangeRewardDenomsResponse) ProtoMessage() {} +func (*MsgChangeRewardDenomsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_43221a4391e9fbf4, []int{7} +} +func (m *MsgChangeRewardDenomsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgChangeRewardDenomsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgChangeRewardDenomsResponse.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 *MsgChangeRewardDenomsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgChangeRewardDenomsResponse.Merge(m, src) +} +func (m *MsgChangeRewardDenomsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgChangeRewardDenomsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgChangeRewardDenomsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgChangeRewardDenomsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgAssignConsumerKey)(nil), "interchain_security.ccv.provider.v1.MsgAssignConsumerKey") proto.RegisterType((*MsgAssignConsumerKeyResponse)(nil), "interchain_security.ccv.provider.v1.MsgAssignConsumerKeyResponse") + proto.RegisterType((*MsgConsumerAddition)(nil), "interchain_security.ccv.provider.v1.MsgConsumerAddition") + proto.RegisterType((*MsgConsumerAdditionResponse)(nil), "interchain_security.ccv.provider.v1.MsgConsumerAdditionResponse") + proto.RegisterType((*MsgConsumerRemoval)(nil), "interchain_security.ccv.provider.v1.MsgConsumerRemoval") + proto.RegisterType((*MsgConsumerRemovalResponse)(nil), "interchain_security.ccv.provider.v1.MsgConsumerRemovalResponse") + proto.RegisterType((*MsgChangeRewardDenoms)(nil), "interchain_security.ccv.provider.v1.MsgChangeRewardDenoms") + proto.RegisterType((*MsgChangeRewardDenomsResponse)(nil), "interchain_security.ccv.provider.v1.MsgChangeRewardDenomsResponse") } func init() { @@ -124,34 +566,70 @@ func init() { } var fileDescriptor_43221a4391e9fbf4 = []byte{ - // 431 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x3f, 0x6f, 0xd4, 0x30, - 0x14, 0x8f, 0x29, 0x14, 0x30, 0x05, 0x89, 0x70, 0x12, 0x69, 0x54, 0xe5, 0x20, 0x2c, 0xa8, 0xa2, - 0x31, 0xa5, 0x03, 0xa2, 0x12, 0x43, 0xca, 0x84, 0x50, 0x97, 0x30, 0x20, 0xb1, 0x44, 0x39, 0xc7, - 0xb8, 0x16, 0x8d, 0x1d, 0xf9, 0x39, 0x51, 0xb3, 0x21, 0x26, 0x46, 0xf8, 0x06, 0xf7, 0x11, 0x3a, - 0xf0, 0x21, 0x18, 0x4f, 0x88, 0x81, 0x09, 0xa1, 0xbb, 0xe1, 0x98, 0xf9, 0x04, 0x28, 0x89, 0xc3, - 0x1f, 0x71, 0x03, 0x62, 0xf3, 0x7b, 0xef, 0xe7, 0xdf, 0x1f, 0xbd, 0x87, 0xef, 0x08, 0x69, 0x98, - 0xa6, 0x47, 0x99, 0x90, 0x29, 0x30, 0x5a, 0x69, 0x61, 0x1a, 0x42, 0x69, 0x4d, 0x4a, 0xad, 0x6a, - 0x91, 0x33, 0x4d, 0xea, 0x5d, 0x62, 0x4e, 0xa2, 0x52, 0x2b, 0xa3, 0xdc, 0x5b, 0x2b, 0xd0, 0x11, - 0xa5, 0x75, 0x34, 0xa0, 0xa3, 0x7a, 0xd7, 0xdf, 0xe2, 0x4a, 0xf1, 0x63, 0x46, 0xb2, 0x52, 0x90, - 0x4c, 0x4a, 0x65, 0x32, 0x23, 0x94, 0x84, 0x9e, 0xc2, 0x1f, 0x71, 0xc5, 0x55, 0xf7, 0x24, 0xed, - 0xcb, 0x76, 0x37, 0xa9, 0x82, 0x42, 0x41, 0xda, 0x0f, 0xfa, 0xc2, 0x8e, 0xae, 0xf7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b, 0x7f, 0xee, 0xd5, 0xf2, 0x74, 0x1b, 0x1d, 0x3c, 0xfb, 0x30, 0x0f, 0xd0, - 0x6c, 0x1e, 0xa0, 0xaf, 0xf3, 0x00, 0xbd, 0x5d, 0x04, 0xce, 0x6c, 0x11, 0x38, 0x9f, 0x17, 0x81, - 0xf3, 0xfc, 0x21, 0x17, 0xe6, 0xa8, 0x9a, 0x44, 0x54, 0x15, 0xf6, 0x00, 0xc8, 0x2f, 0xd1, 0x9d, - 0x9f, 0xb7, 0x59, 0xef, 0x91, 0x93, 0x3f, 0x0f, 0xd4, 0x34, 0x25, 0x83, 0xc9, 0x7a, 0xb7, 0xf9, - 0xbd, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x81, 0xdf, 0x33, 0x1e, 0xd1, 0x02, 0x00, 0x00, + // 995 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xf7, 0x36, 0x69, 0x9a, 0x8c, 0x93, 0x34, 0xd9, 0xa6, 0xea, 0xc6, 0xdf, 0xd4, 0x4e, 0xfc, + 0xe5, 0x10, 0x55, 0x64, 0x97, 0xb4, 0x87, 0x42, 0x24, 0x04, 0x4e, 0x02, 0x04, 0x50, 0xa0, 0x2c, + 0x91, 0x90, 0xe0, 0xb0, 0x1a, 0xcf, 0x4e, 0x76, 0x47, 0xf5, 0xce, 0x58, 0x33, 0xe3, 0x6d, 0x7d, + 0x43, 0x9c, 0x90, 0x90, 0x50, 0x91, 0x38, 0x70, 0xec, 0x81, 0x3f, 0xa0, 0x48, 0xfc, 0x11, 0x3d, + 0x56, 0x08, 0x01, 0xa7, 0x82, 0x92, 0x43, 0x39, 0xf3, 0x17, 0xa0, 0xf9, 0xb1, 0x8e, 0x63, 0xbb, + 0x95, 0x6b, 0x2e, 0xd1, 0xcc, 0x7c, 0x7e, 0xbc, 0xf7, 0x26, 0xef, 0x8d, 0x17, 0xbc, 0x4a, 0xa8, + 0xc4, 0x1c, 0xa5, 0x90, 0xd0, 0x48, 0x60, 0xd4, 0xe1, 0x44, 0x76, 0x03, 0x84, 0xf2, 0xa0, 0xcd, + 0x59, 0x4e, 0x62, 0xcc, 0x83, 0x7c, 0x3b, 0x90, 0xf7, 0xfd, 0x36, 0x67, 0x92, 0xb9, 0xff, 0x1f, + 0xc1, 0xf6, 0x11, 0xca, 0xfd, 0x82, 0xed, 0xe7, 0xdb, 0x95, 0x65, 0x98, 0x11, 0xca, 0x02, 0xfd, + 0xd7, 0xe8, 0x2a, 0x6b, 0x09, 0x63, 0x49, 0x0b, 0x07, 0xb0, 0x4d, 0x02, 0x48, 0x29, 0x93, 0x50, + 0x12, 0x46, 0x85, 0x45, 0x6b, 0x16, 0xd5, 0xbb, 0x66, 0xe7, 0x38, 0x90, 0x24, 0xc3, 0x42, 0xc2, + 0xac, 0x6d, 0x09, 0xd5, 0x41, 0x42, 0xdc, 0xe1, 0xda, 0xc1, 0xe2, 0xab, 0x83, 0x38, 0xa4, 0x5d, + 0x0b, 0xad, 0x24, 0x2c, 0x61, 0x7a, 0x19, 0xa8, 0x55, 0x21, 0x40, 0x4c, 0x64, 0x4c, 0x44, 0x06, + 0x30, 0x1b, 0x0b, 0x5d, 0x33, 0xbb, 0x20, 0x13, 0x89, 0x2a, 0x3d, 0x13, 0x49, 0x91, 0x25, 0x69, + 0xa2, 0x00, 0x31, 0x8e, 0x03, 0xd4, 0x22, 0x98, 0x4a, 0x85, 0x9a, 0x95, 0x21, 0xd4, 0x7f, 0x75, + 0xc0, 0xca, 0xa1, 0x48, 0x1a, 0x42, 0x90, 0x84, 0xee, 0x31, 0x2a, 0x3a, 0x19, 0xe6, 0x1f, 0xe2, + 0xae, 0xbb, 0x0a, 0x66, 0xcd, 0x95, 0x91, 0xd8, 0x73, 0xd6, 0x9d, 0xcd, 0xb9, 0xf0, 0x92, 0xde, + 0xbf, 0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, 0xc4, 0xfd, 0xce, 0x01, 0xcb, 0xc3, 0x3f, 0x07, 0x6f, 0xf8, 0x63, + 0xfc, 0x8a, 0xfa, 0xa3, 0xde, 0xdc, 0x4a, 0x63, 0x62, 0x69, 0x91, 0x9b, 0xfb, 0xad, 0x03, 0x96, + 0x86, 0xde, 0xea, 0xd7, 0xc7, 0xf5, 0x1d, 0x54, 0x56, 0xde, 0x9e, 0x54, 0xd9, 0x4b, 0xe8, 0x1b, + 0x07, 0x5c, 0x1e, 0xec, 0xe1, 0xdb, 0x2f, 0xeb, 0x6a, 0x85, 0x95, 0xb7, 0x26, 0x14, 0xf6, 0xb2, + 0xf9, 0xde, 0x01, 0xee, 0x88, 0xfe, 0xdb, 0x19, 0xdb, 0x77, 0x48, 0x5b, 0xd9, 0x9d, 0x5c, 0x5b, + 0xa4, 0x55, 0xb9, 0xf8, 0xe5, 0xb3, 0x47, 0x37, 0x9c, 0xdd, 0xcf, 0x1e, 0x9f, 0x54, 0x9d, 0x27, + 0x27, 0x55, 0xe7, 0xaf, 0x93, 0xaa, 0xf3, 0xe0, 0xb4, 0x5a, 0x7a, 0x72, 0x5a, 0x2d, 0xfd, 0x71, + 0x5a, 0x2d, 0x7d, 0xfe, 0x66, 0x42, 0x64, 0xda, 0x69, 0xfa, 0x88, 0x65, 0xf6, 0x7b, 0x26, 0x38, + 0x8b, 0xba, 0xd5, 0xfb, 0xb2, 0xcb, 0x6f, 0x05, 0xf7, 0xcf, 0x7f, 0xde, 0xc9, 0x6e, 0x1b, 0x8b, + 0xe6, 0x8c, 0x1e, 0xff, 0x5b, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x6a, 0x00, 0xc7, 0x0f, + 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -167,6 +645,9 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { AssignConsumerKey(ctx context.Context, in *MsgAssignConsumerKey, opts ...grpc.CallOption) (*MsgAssignConsumerKeyResponse, error) + ConsumerAddition(ctx context.Context, in *MsgConsumerAddition, opts ...grpc.CallOption) (*MsgConsumerAdditionResponse, error) + ConsumerRemoval(ctx context.Context, in *MsgConsumerRemoval, opts ...grpc.CallOption) (*MsgConsumerRemovalResponse, error) + ChangeRewardDenoms(ctx context.Context, in *MsgChangeRewardDenoms, opts ...grpc.CallOption) (*MsgChangeRewardDenomsResponse, error) } type msgClient struct { @@ -186,9 +667,39 @@ func (c *msgClient) AssignConsumerKey(ctx context.Context, in *MsgAssignConsumer return out, nil } +func (c *msgClient) ConsumerAddition(ctx context.Context, in *MsgConsumerAddition, opts ...grpc.CallOption) (*MsgConsumerAdditionResponse, error) { + out := new(MsgConsumerAdditionResponse) + err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Msg/ConsumerAddition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ConsumerRemoval(ctx context.Context, in *MsgConsumerRemoval, opts ...grpc.CallOption) (*MsgConsumerRemovalResponse, error) { + out := new(MsgConsumerRemovalResponse) + err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Msg/ConsumerRemoval", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ChangeRewardDenoms(ctx context.Context, in *MsgChangeRewardDenoms, opts ...grpc.CallOption) (*MsgChangeRewardDenomsResponse, error) { + out := new(MsgChangeRewardDenomsResponse) + err := c.cc.Invoke(ctx, "/interchain_security.ccv.provider.v1.Msg/ChangeRewardDenoms", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { AssignConsumerKey(context.Context, *MsgAssignConsumerKey) (*MsgAssignConsumerKeyResponse, error) + ConsumerAddition(context.Context, *MsgConsumerAddition) (*MsgConsumerAdditionResponse, error) + ConsumerRemoval(context.Context, *MsgConsumerRemoval) (*MsgConsumerRemovalResponse, error) + ChangeRewardDenoms(context.Context, *MsgChangeRewardDenoms) (*MsgChangeRewardDenomsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -198,6 +709,15 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) AssignConsumerKey(ctx context.Context, req *MsgAssignConsumerKey) (*MsgAssignConsumerKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AssignConsumerKey not implemented") } +func (*UnimplementedMsgServer) ConsumerAddition(ctx context.Context, req *MsgConsumerAddition) (*MsgConsumerAdditionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConsumerAddition not implemented") +} +func (*UnimplementedMsgServer) ConsumerRemoval(ctx context.Context, req *MsgConsumerRemoval) (*MsgConsumerRemovalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConsumerRemoval not implemented") +} +func (*UnimplementedMsgServer) ChangeRewardDenoms(ctx context.Context, req *MsgChangeRewardDenoms) (*MsgChangeRewardDenomsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChangeRewardDenoms not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -221,6 +741,60 @@ func _Msg_AssignConsumerKey_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_ConsumerAddition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgConsumerAddition) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ConsumerAddition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/interchain_security.ccv.provider.v1.Msg/ConsumerAddition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ConsumerAddition(ctx, req.(*MsgConsumerAddition)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ConsumerRemoval_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgConsumerRemoval) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ConsumerRemoval(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/interchain_security.ccv.provider.v1.Msg/ConsumerRemoval", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ConsumerRemoval(ctx, req.(*MsgConsumerRemoval)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ChangeRewardDenoms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgChangeRewardDenoms) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ChangeRewardDenoms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/interchain_security.ccv.provider.v1.Msg/ChangeRewardDenoms", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ChangeRewardDenoms(ctx, req.(*MsgChangeRewardDenoms)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "interchain_security.ccv.provider.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -229,7 +803,19 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "AssignConsumerKey", Handler: _Msg_AssignConsumerKey_Handler, }, - }, + { + MethodName: "ConsumerAddition", + Handler: _Msg_ConsumerAddition_Handler, + }, + { + MethodName: "ConsumerRemoval", + Handler: _Msg_ConsumerRemoval_Handler, + }, + { + MethodName: "ChangeRewardDenoms", + Handler: _Msg_ChangeRewardDenoms_Handler, + }, + }, Streams: []grpc.StreamDesc{}, Metadata: "interchain_security/ccv/provider/v1/tx.proto", } @@ -308,6 +894,285 @@ func (m *MsgAssignConsumerKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, e return len(dAtA) - i, nil } +func (m *MsgConsumerAddition) 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 *MsgConsumerAddition) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConsumerAddition) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x6a + } + if len(m.DistributionTransmissionChannel) > 0 { + i -= len(m.DistributionTransmissionChannel) + copy(dAtA[i:], m.DistributionTransmissionChannel) + i = encodeVarintTx(dAtA, i, uint64(len(m.DistributionTransmissionChannel))) + i-- + dAtA[i] = 0x62 + } + if m.HistoricalEntries != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.HistoricalEntries)) + i-- + dAtA[i] = 0x58 + } + if m.BlocksPerDistributionTransmission != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.BlocksPerDistributionTransmission)) + i-- + dAtA[i] = 0x50 + } + if len(m.ConsumerRedistributionFraction) > 0 { + i -= len(m.ConsumerRedistributionFraction) + copy(dAtA[i:], m.ConsumerRedistributionFraction) + i = encodeVarintTx(dAtA, i, uint64(len(m.ConsumerRedistributionFraction))) + i-- + dAtA[i] = 0x4a + } + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TransferTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TransferTimeoutPeriod):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintTx(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x42 + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.CcvTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CcvTimeoutPeriod):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintTx(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x3a + n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingPeriod):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintTx(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x32 + n4, err4 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SpawnTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SpawnTime):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintTx(dAtA, i, uint64(n4)) + i-- + dAtA[i] = 0x2a + if len(m.BinaryHash) > 0 { + i -= len(m.BinaryHash) + copy(dAtA[i:], m.BinaryHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.BinaryHash))) + i-- + dAtA[i] = 0x22 + } + if len(m.GenesisHash) > 0 { + i -= len(m.GenesisHash) + copy(dAtA[i:], m.GenesisHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.GenesisHash))) + i-- + dAtA[i] = 0x1a + } + { + size, err := m.InitialHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgConsumerAdditionResponse) 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 *MsgConsumerAdditionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConsumerAdditionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgConsumerRemoval) 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 *MsgConsumerRemoval) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConsumerRemoval) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x1a + } + n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StopTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StopTime):]) + if err6 != nil { + return 0, err6 + } + i -= n6 + i = encodeVarintTx(dAtA, i, uint64(n6)) + i-- + dAtA[i] = 0x12 + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgConsumerRemovalResponse) 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 *MsgConsumerRemovalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgConsumerRemovalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgChangeRewardDenoms) 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 *MsgChangeRewardDenoms) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgChangeRewardDenoms) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0x1a + } + if len(m.DenomsToRemove) > 0 { + for iNdEx := len(m.DenomsToRemove) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DenomsToRemove[iNdEx]) + copy(dAtA[i:], m.DenomsToRemove[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.DenomsToRemove[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.DenomsToAdd) > 0 { + for iNdEx := len(m.DenomsToAdd) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.DenomsToAdd[iNdEx]) + copy(dAtA[i:], m.DenomsToAdd[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.DenomsToAdd[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MsgChangeRewardDenomsResponse) 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 *MsgChangeRewardDenomsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgChangeRewardDenomsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -341,25 +1206,872 @@ func (m *MsgAssignConsumerKey) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - return n -} + return n +} + +func (m *MsgAssignConsumerKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgConsumerAddition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.InitialHeight.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.GenesisHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.BinaryHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SpawnTime) + n += 1 + l + sovTx(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingPeriod) + n += 1 + l + sovTx(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CcvTimeoutPeriod) + n += 1 + l + sovTx(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TransferTimeoutPeriod) + n += 1 + l + sovTx(uint64(l)) + l = len(m.ConsumerRedistributionFraction) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.BlocksPerDistributionTransmission != 0 { + n += 1 + sovTx(uint64(m.BlocksPerDistributionTransmission)) + } + if m.HistoricalEntries != 0 { + n += 1 + sovTx(uint64(m.HistoricalEntries)) + } + l = len(m.DistributionTransmissionChannel) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgConsumerAdditionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgConsumerRemoval) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StopTime) + n += 1 + l + sovTx(uint64(l)) + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgConsumerRemovalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgChangeRewardDenoms) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.DenomsToAdd) > 0 { + for _, s := range m.DenomsToAdd { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if len(m.DenomsToRemove) > 0 { + for _, s := range m.DenomsToRemove { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgChangeRewardDenomsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgAssignConsumerKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAssignConsumerKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAssignConsumerKey: 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProviderAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsumerKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsumerKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAssignConsumerKeyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAssignConsumerKeyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAssignConsumerKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgConsumerAddition) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgConsumerAddition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgConsumerAddition: 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InitialHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenesisHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GenesisHash = append(m.GenesisHash[:0], dAtA[iNdEx:postIndex]...) + if m.GenesisHash == nil { + m.GenesisHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BinaryHash = append(m.BinaryHash[:0], dAtA[iNdEx:postIndex]...) + if m.BinaryHash == nil { + m.BinaryHash = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpawnTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.SpawnTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.UnbondingPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CcvTimeoutPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.CcvTimeoutPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransferTimeoutPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.TransferTimeoutPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsumerRedistributionFraction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConsumerRedistributionFraction = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlocksPerDistributionTransmission", wireType) + } + m.BlocksPerDistributionTransmission = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlocksPerDistributionTransmission |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) + } + m.HistoricalEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistoricalEntries |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DistributionTransmissionChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DistributionTransmissionChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func (m *MsgAssignConsumerKeyResponse) Size() (n int) { - if m == nil { - return 0 + if iNdEx > l { + return io.ErrUnexpectedEOF } - var l int - _ = l - return n + return nil } +func (m *MsgConsumerAdditionResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgConsumerAdditionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgConsumerAdditionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *MsgAssignConsumerKey) Unmarshal(dAtA []byte) error { +func (m *MsgConsumerRemoval) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -382,10 +2094,10 @@ func (m *MsgAssignConsumerKey) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAssignConsumerKey: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConsumerRemoval: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAssignConsumerKey: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConsumerRemoval: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -422,7 +2134,40 @@ func (m *MsgAssignConsumerKey) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StopTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StopTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -450,11 +2195,111 @@ func (m *MsgAssignConsumerKey) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ProviderAddr = string(dAtA[iNdEx:postIndex]) + m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgConsumerRemovalResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgConsumerRemovalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgConsumerRemovalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgChangeRewardDenoms) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgChangeRewardDenoms: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgChangeRewardDenoms: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsumerKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DenomsToAdd", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -482,9 +2327,41 @@ func (m *MsgAssignConsumerKey) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ConsumerKey = string(dAtA[iNdEx:postIndex]) + m.DenomsToAdd = append(m.DenomsToAdd, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DenomsToRemove", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DenomsToRemove = append(m.DenomsToRemove, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) } @@ -537,7 +2414,7 @@ func (m *MsgAssignConsumerKey) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAssignConsumerKeyResponse) Unmarshal(dAtA []byte) error { +func (m *MsgChangeRewardDenomsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -560,10 +2437,10 @@ func (m *MsgAssignConsumerKeyResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAssignConsumerKeyResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgChangeRewardDenomsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAssignConsumerKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgChangeRewardDenomsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: