diff --git a/app/consumer-democracy/app.go b/app/consumer-democracy/app.go index 09b13520ae..7d5646f1dc 100644 --- a/app/consumer-democracy/app.go +++ b/app/consumer-democracy/app.go @@ -79,7 +79,6 @@ import ( govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" - // add mint mint "github.com/cosmos/cosmos-sdk/x/mint" mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" @@ -112,7 +111,6 @@ import ( ccvdistr "github.com/cosmos/interchain-security/v3/x/ccv/democracy/distribution" ccvgov "github.com/cosmos/interchain-security/v3/x/ccv/democracy/governance" ccvstaking "github.com/cosmos/interchain-security/v3/x/ccv/democracy/staking" - ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) const ( @@ -713,7 +711,7 @@ func New( return fromVM, fmt.Errorf("failed to unmarshal genesis state: %w", err) } - consumerGenesis := ccvtypes.ConsumerGenesisState{} + consumerGenesis := consumertypes.GenesisState{} appCodec.MustUnmarshalJSON(appState[consumertypes.ModuleName], &consumerGenesis) consumerGenesis.PreCCV = true diff --git a/app/consumer/genesis.go b/app/consumer/genesis.go index 5bf0c1da80..27292feaa1 100644 --- a/app/consumer/genesis.go +++ b/app/consumer/genesis.go @@ -2,8 +2,20 @@ package app import ( "encoding/json" + "fmt" + "os" + "path/filepath" + "strings" + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/version" + + consumerTypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // The genesis state of the blockchain is represented here as a map of raw json @@ -15,7 +27,98 @@ import ( // object provided to it during init. type GenesisState map[string]json.RawMessage +// Migration of consumer genesis content as it is exported from a provider version v1,2,3 +// to a format readable by current consumer implementation. +func transform(jsonRaw []byte, ctx client.Context) (json.RawMessage, error) { + // v1,2,3 uses deprecated fields of GenesisState type + oldConsumerGenesis := consumerTypes.GenesisState{} + err := ctx.Codec.UnmarshalJSON(jsonRaw, &oldConsumerGenesis) + if err != nil { + return nil, fmt.Errorf("reading consumer genesis data failed: %s", err) + } + + // some sanity checks for v2 transformation + if len(oldConsumerGenesis.Provider.InitialValSet) > 0 { + return nil, fmt.Errorf("invalid source version. Unexpected element 'provider.initial_val_set'") + } + + if oldConsumerGenesis.Provider.ClientState != nil { + return nil, fmt.Errorf("invalid source version. Unexpected element 'provider.client_state'") + } + + if oldConsumerGenesis.Provider.ConsensusState != nil { + return nil, fmt.Errorf("invalid source version. Unexpected element 'provider.consensus_state'") + } + + // Version 2 of provider genesis data fills up deprecated fields + // ProviderClientState, ConsensusState and InitialValSet + newGenesis := types.ConsumerGenesisState{ + Params: oldConsumerGenesis.Params, + Provider: types.ProviderInfo{ + ClientState: oldConsumerGenesis.ProviderClientState, + ConsensusState: oldConsumerGenesis.ProviderConsensusState, + InitialValSet: oldConsumerGenesis.InitialValSet, + }, + } + + newJson, err := ctx.Codec.MarshalJSON(&newGenesis) + if err != nil { + return nil, fmt.Errorf("failed marshalling data to new type: %s", err) + } + return newJson, nil +} + +// Transform a consumer genesis json file exported from a given ccv provider version +// to a consumer genesis json format supported by current ccv consumer version. +// Result will be written to defined output. +func TransformConsumerGenesis(cmd *cobra.Command, args []string) error { + sourceFile := args[0] + + jsonRaw, err := os.ReadFile(filepath.Clean(sourceFile)) + if err != nil { + return err + } + + clientCtx := client.GetClientContextFromCmd(cmd) + newConsumerGenesis, err := transform(jsonRaw, clientCtx) + if err != nil { + return err + } + + bz, err := newConsumerGenesis.MarshalJSON() + if err != nil { + return fmt.Errorf("failed exporting new consumer genesis to JSON: %s", err) + } + + sortedBz, err := sdk.SortJSON(bz) + if err != nil { + return fmt.Errorf("failed sorting transformed consumer genesis JSON: %s", err) + } + + cmd.Println(string(sortedBz)) + return nil +} + // NewDefaultGenesisState generates the default state for the application. func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState { return ModuleBasics.DefaultGenesis(cdc) } + +// GetConsumerGenesisTransformCmd transforms Consumer Genesis JSON content exported from a +// provider version v1,v2 or v3 to a JSON format supported by this consumer version. +func GetConsumerGenesisTransformCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "transform [genesis-file]", + Short: "Transform CCV consumer genesis from an older provider version not supporting current format", + Long: strings.TrimSpace( + fmt.Sprintf(`Transform the consumer genesis file from a provider version v1,v2 or v3 to a version supported by this consumer. Result is printed to STDOUT. + +Example: +$ %s transform /path/to/ccv_consumer_genesis.json`, version.AppName), + ), + Args: cobra.ExactArgs(1), + RunE: TransformConsumerGenesis, + } + + return cmd +} diff --git a/app/consumer/genesis_test.go b/app/consumer/genesis_test.go new file mode 100644 index 0000000000..f23e4c58d1 --- /dev/null +++ b/app/consumer/genesis_test.go @@ -0,0 +1,213 @@ +package app_test + +import ( + "bytes" + "context" + "io/fs" + "os" + "path/filepath" + "testing" + "time" + + "github.com/spf13/cobra" + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/x/auth/types" + + app "github.com/cosmos/interchain-security/v3/app/consumer" + consumerTypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" +) + +// Testdata mapping consumer genesis exports to a provider module version as +// used by transformation function for consumer genesis content. +var consumerGenesisStates map[string]string = map[string]string{ + "v2": ` + { + "params": { + "enabled": true, + "blocks_per_distribution_transmission": "1500", + "distribution_transmission_channel": "", + "provider_fee_pool_addr_str": "", + "ccv_timeout_period": "2419200s", + "transfer_timeout_period": "3600s", + "consumer_redistribution_fraction": "0.75", + "historical_entries": "10000", + "unbonding_period": "1728000s", + "soft_opt_out_threshold": "", + "reward_denoms": [], + "provider_reward_denoms": [] + }, + "provider_client_id": "", + "provider_channel_id": "", + "new_chain": true, + "provider_client_state": { + "chain_id": "cosmoshub-4", + "trust_level": { + "numerator": "1", + "denominator": "3" + }, + "trusting_period": "1197504s", + "unbonding_period": "1814400s", + "max_clock_drift": "10s", + "frozen_height": { + "revision_number": "0", + "revision_height": "0" + }, + "latest_height": { + "revision_number": "4", + "revision_height": "15211521" + }, + "proof_specs": [ + { + "leaf_spec": { + "hash": "SHA256", + "prehash_key": "NO_HASH", + "prehash_value": "SHA256", + "length": "VAR_PROTO", + "prefix": "AA==" + }, + "inner_spec": { + "child_order": [ + 0, + 1 + ], + "child_size": 33, + "min_prefix_length": 4, + "max_prefix_length": 12, + "empty_child": null, + "hash": "SHA256" + }, + "max_depth": 0, + "min_depth": 0 + }, + { + "leaf_spec": { + "hash": "SHA256", + "prehash_key": "NO_HASH", + "prehash_value": "SHA256", + "length": "VAR_PROTO", + "prefix": "AA==" + }, + "inner_spec": { + "child_order": [ + 0, + 1 + ], + "child_size": 32, + "min_prefix_length": 1, + "max_prefix_length": 1, + "empty_child": null, + "hash": "SHA256" + }, + "max_depth": 0, + "min_depth": 0 + } + ], + "upgrade_path": [ + "upgrade", + "upgradedIBCState" + ], + "allow_update_after_expiry": true, + "allow_update_after_misbehaviour": true + }, + "provider_consensus_state": { + "timestamp": "2023-05-08T11:00:01.563901871Z", + "root": { + "hash": "qKVnVSXlsjDHC8ekKcy/0zSjzr3YekCurld9R4W07EI=" + }, + "next_validators_hash": "E08978F493101A3C5D459FB3087B8CFBA9E82D7A1FE1441E7D77E11AC0586BAC" + }, + "maturing_packets": [], + "initial_val_set": [ + { + "pub_key": { + "ed25519": "cOQZvh/h9ZioSeUMZB/1Vy1Xo5x2sjrVjlE/qHnYifM=" + }, + "power": "2345194" + }, + { + "pub_key": { + "ed25519": "vGSKfbQyKApvBhinpOOA0XQAdjxceihYNwtGskfZGyQ=" + }, + "power": "463811" + } + ], + "height_to_valset_update_id": [], + "outstanding_downtime_slashing": [], + "pending_consumer_packets": { + "list": [] + }, + "last_transmission_block_height": { + "height": "0" + }, + "preCCV": false + } + + `, +} + +func getClientCtx() client.Context { + encodingConfig := app.MakeTestEncodingConfig() + return client.Context{}. + WithCodec(encodingConfig.Codec). + WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). + WithLegacyAmino(encodingConfig.Amino). + WithInput(os.Stdin). + WithAccountRetriever(types.AccountRetriever{}) +} + +// Setup client context +func getGenesisTransformCmd() (*cobra.Command, error) { + cmd := app.GetConsumerGenesisTransformCmd() + clientCtx := getClientCtx() + ctx := context.WithValue(context.Background(), client.ClientContextKey, &clientCtx) + cmd.SetContext(ctx) + err := client.SetCmdClientContext(cmd, clientCtx) + return cmd, err +} + +// Check transformation of a version 2 ConsumerGenesis export to +// consumer genesis json format used by current consumer implementation. +func TestConsumerGenesisTransformationV2(t *testing.T) { + version := "v2" + filePath := filepath.Join(t.TempDir(), "oldConsumerGenesis.json") + + err := os.WriteFile( + filePath, + []byte(consumerGenesisStates[version]), + fs.FileMode(0o644)) + require.NoError(t, err) + defer os.Remove(filePath) + + cmd, err := getGenesisTransformCmd() + require.NoError(t, err, "Error setting up transformation command: %s", err) + cmd.SetArgs([]string{filePath}) + + output := new(bytes.Buffer) + cmd.SetOutput(output) + require.NoError(t, err) + _, err = cmd.ExecuteC() + require.NoError(t, err) + + consumerGenesis := consumerTypes.GenesisState{} + + bz := output.Bytes() + ctx := client.GetClientContextFromCmd(cmd) + err = ctx.Codec.UnmarshalJSON(bz, &consumerGenesis) + require.NoError(t, err, "Error unmarshalling transformed genesis state :%s", err) + + // Some basic sanity checks on the content. + require.Nil(t, consumerGenesis.ProviderClientState) + require.NotNil(t, consumerGenesis.Provider.ClientState) + require.Equal(t, "cosmoshub-4", consumerGenesis.Provider.ClientState.ChainId) + + require.Nil(t, consumerGenesis.ProviderConsensusState) + require.NotNil(t, consumerGenesis.Provider.ConsensusState) + require.Equal(t, time.Date(2023, time.May, 8, 11, 0, 1, 563901871, time.UTC), + consumerGenesis.Provider.ConsensusState.Timestamp) + + require.Empty(t, consumerGenesis.InitialValSet) + require.NotEmpty(t, consumerGenesis.Provider.InitialValSet) +} diff --git a/cmd/interchain-security-cd/cmd/root.go b/cmd/interchain-security-cd/cmd/root.go index 30c032bbea..f1a8445982 100644 --- a/cmd/interchain-security-cd/cmd/root.go +++ b/cmd/interchain-security-cd/cmd/root.go @@ -202,7 +202,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { // add keybase, auxiliary RPC, query, genesis, and tx child commands rootCmd.AddCommand( rpc.StatusCommand(), - genesisCommand(encodingConfig), + genesisCommand(encodingConfig, consumer.GetConsumerGenesisTransformCmd()), queryCommand(), txCommand(), keys.Commands(consumer.DefaultNodeHome), diff --git a/docs/docs/consumer-development/changeover-procedure.md b/docs/docs/consumer-development/changeover-procedure.md index 825a0bdae4..446f91775b 100644 --- a/docs/docs/consumer-development/changeover-procedure.md +++ b/docs/docs/consumer-development/changeover-procedure.md @@ -48,7 +48,7 @@ RevisionNumber: 0, RevisionHeight: 111 * `spawn_time` listed in the proposal MUST be before the `upgrade_height` listed in the the upgrade proposal on the standalone chain. :::caution -`spawn_time` must occur before the `upgrade_height` on the standalone chain is reached becasue the `provider` chain must generate the `ConsumerGenesis` that contains the **validator set** that will be used after the changeover. +`spawn_time` must occur before the `upgrade_height` on the standalone chain is reached because the `provider` chain must generate the `ConsumerGenesis` that contains the **validator set** that will be used after the changeover. ::: * `unbonding_period` must correspond to the value used on the standalone chain. Otherwise, the clients used for the ccv protocol may be incorrectly initialized. @@ -128,7 +128,7 @@ To help validators and other node runners onboard onto your chain, please prepar This should include (at minimum): -- [ ] genesis.json with CCV data (after spawn time passes) +- [ ] genesis.json with CCV data (after spawn time passes). Check if CCV data needs to be transformed (see [Transform Consumer Genesis](./consumer-genesis-transformation.md)) - [ ] information about relevant seed/peer nodes you are running - [ ] relayer information (compatible versions) - [ ] copy of your governance proposal (as JSON) diff --git a/docs/docs/consumer-development/consumer-genesis-transformation.md b/docs/docs/consumer-development/consumer-genesis-transformation.md new file mode 100644 index 0000000000..5a19e5c71d --- /dev/null +++ b/docs/docs/consumer-development/consumer-genesis-transformation.md @@ -0,0 +1,29 @@ +--- +sidebar_position: 6 +--- + +# Consumer Genesis Transformation + +Preparing a consumer chain for onboarding requires some information explaining how to run your chain. This includes a genesis file with CCV data where the CCV data is exported from the provider chain and added to the consumers genesis file (for more details check the documentaion on [Onboarding](./onboarding.md) and [Changeover](./changeover-procedure.md)). +In case that the provider chain is running an older version of the InterChainSecurity (ICS) module than the consumer chain the exported CCV data might need to be transformed to the format supported by the ICS implementation run on the consumer chain. This is the case if the cosumer chain runs version 4 of ICS or later and the provider is running version 3 or older of the ICS module. + +To transform such CCV data follow the instructions below + +## 1. Prerequisite +- Provider chain is running version 3 or older of the ICS provider module +- Consumer is running version 4 or later of the ICS consumer module. +- interchain-security-cd application complies to the version run on the consumer chain + +## 2. Export the CCV data +Export the CCV data from the provider chain as descibed in the [Onboarding](./onboarding.md) and [Changeover](./changeover-procedure.md)) your following. +As a result the CCV data will be stored in a file in JSON format. + +## 3. Transform CCV data +To transform the CCV data to the newer format run the following command. +``` +interchain-security-cd genesis transform [genesis-file] +``` +where 'genesis-file' is the path to the file containing the CCV data exported in [step 2](#2-export-the-ccv-data). +As a result the CCV data in the new format will be written to standard output. + +Use the new CCV data as described in the procedure you're following. \ No newline at end of file diff --git a/docs/docs/consumer-development/onboarding.md b/docs/docs/consumer-development/onboarding.md index c9b503ed66..893af0a3b1 100644 --- a/docs/docs/consumer-development/onboarding.md +++ b/docs/docs/consumer-development/onboarding.md @@ -21,7 +21,7 @@ To help validators and other node runners onboard onto your chain, please prepar This should include (at minimum): - [ ] genesis.json without CCV data (before the proposal passes) -- [ ] genesis.json with CCV data (after spawn time passes) +- [ ] genesis.json with CCV data (after spawn time passes). Check if CCV data needs to be transformed (see [Transform Consumer Genesis](./consumer-genesis-transformation.md)) - [ ] information about relevant seed/peer nodes you are running - [ ] relayer information (compatible versions) - [ ] copy of your governance proposal (as JSON) diff --git a/proto/interchain_security/ccv/consumer/v1/consumer.proto b/proto/interchain_security/ccv/consumer/v1/consumer.proto index 39d6eb29de..b386bc2e9a 100644 --- a/proto/interchain_security/ccv/consumer/v1/consumer.proto +++ b/proto/interchain_security/ccv/consumer/v1/consumer.proto @@ -1,27 +1,24 @@ syntax = "proto3"; package interchain_security.ccv.consumer.v1; -import "interchain_security/ccv/v1/wire.proto"; - option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"; import "google/protobuf/any.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; // -// Note any type defined in this file is ONLY used internally to the consumer CCV module. -// These schemas can change with proper consideration of compatibility or migration. -// +// Note any type defined in this file is ONLY used internally to the consumer +// CCV module. These schemas can change with proper consideration of +// compatibility or migration. -// CrossChainValidator defines the type used to store validator information internal -// to the consumer CCV module. Note one cross chain validator entry is persisted for -// each consumer validator, where incoming VSC packets update this data, which is eventually -// forwarded to comet for consumer chain consensus. +// CrossChainValidator defines the type used to store validator information +// internal to the consumer CCV module. Note one cross chain validator entry is +// persisted for each consumer validator, where incoming VSC packets update this +// data, which is eventually forwarded to comet for consumer chain consensus. // -// Note this type is only used internally to the consumer CCV module. +// Note this type is only used internally to the consumer CCV module. message CrossChainValidator { bytes address = 1; int64 power = 2; @@ -34,8 +31,8 @@ message CrossChainValidator { // A record storing the state of a slash packet sent to the provider chain // which may bounce back and forth until handled by the provider. -// -// Note this type is only used internally to the consumer CCV module. +// +// Note this type is only used internally to the consumer CCV module. message SlashRecord { bool waiting_on_reply = 1; google.protobuf.Timestamp send_time = 2 diff --git a/proto/interchain_security/ccv/consumer/v1/genesis.proto b/proto/interchain_security/ccv/consumer/v1/genesis.proto new file mode 100644 index 0000000000..bb33f34501 --- /dev/null +++ b/proto/interchain_security/ccv/consumer/v1/genesis.proto @@ -0,0 +1,92 @@ +syntax = "proto3"; + +package interchain_security.ccv.consumer.v1; + +option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"; + +import "interchain_security/ccv/v1/shared_consumer.proto"; +import "ibc/lightclients/tendermint/v1/tendermint.proto"; + +import "gogoproto/gogo.proto"; +import "interchain_security/ccv/v1/wire.proto"; +import "google/protobuf/timestamp.proto"; +import "tendermint/abci/types.proto"; + + + + +// GenesisState defines the CCV consumer genesis state +// +// Note: this type is only used on consumer side and references shared types with +// provider +message GenesisState { + // ConsumerParams is a shared type with provider module + interchain_security.ccv.v1.ConsumerParams params = 1 + [ (gogoproto.nullable) = false ]; + // Client ID of the provider. Empty for a new chain, filled in on restart. + string provider_client_id = 2; + // Channel ID of the provider. Empty for a new chain, filled in on restart. + string provider_channel_id = 3; + // true for new chain, false for chain restart. + bool new_chain = 4; + // !!! DEPRECATED !!! ProviderClientState is deprecated. Use provider.client_state instead + ibc.lightclients.tendermint.v1.ClientState provider_client_state = 5 [ deprecated = true]; + // !!! DEPRECATED !!! ProviderConsensusState is deprecated. Use provider.consensus_state instead + ibc.lightclients.tendermint.v1.ConsensusState provider_consensus_state = 6 [ deprecated = true]; + // MaturingPackets nil on new chain, filled in on restart. + repeated MaturingVSCPacket maturing_packets = 7 + [ (gogoproto.nullable) = false ]; + // !!! DEPRECATED !!!! InitialValset is deprecated. Use provider.initial_val_set instead + repeated .tendermint.abci.ValidatorUpdate initial_val_set = 8 [ (gogoproto.nullable) = false, deprecated = true ]; + // HeightToValsetUpdateId nil on new chain, filled in on restart. + repeated HeightToValsetUpdateID height_to_valset_update_id = 9 + [ (gogoproto.nullable) = false ]; + // OutstandingDowntimes nil on new chain, filled in on restart. + repeated OutstandingDowntime outstanding_downtime_slashing = 10 + [ (gogoproto.nullable) = false ]; + // PendingConsumerPackets nil on new chain, filled in on restart. + ConsumerPacketDataList pending_consumer_packets = 11 + [ (gogoproto.nullable) = false ]; + // LastTransmissionBlockHeight nil on new chain, filled in on restart. + LastTransmissionBlockHeight last_transmission_block_height = 12 + [ (gogoproto.nullable) = false ]; + // flag indicating whether the consumer CCV module starts in pre-CCV state + bool preCCV = 13; + interchain_security.ccv.v1.ProviderInfo provider = 14 + [ (gogoproto.nullable) = false ]; +} + +// HeightValsetUpdateID represents a mapping internal to the consumer CCV module +// which links a block height to each recv valset update id. +message HeightToValsetUpdateID { + uint64 height = 1; + uint64 valset_update_id = 2; +} + +// OutstandingDowntime defines the type used internally to the consumer CCV +// module and is used in order to not send multiple slashing requests for +// the same downtime infraction. +message OutstandingDowntime { string validator_consensus_address = 1; } + +// LastTransmissionBlockHeight is the last time validator holding +// pools were transmitted to the provider chain. This type is used internally +// to the consumer CCV modul. +message LastTransmissionBlockHeight { int64 height = 1; } + +// MaturingVSCPacket represents a vsc packet that is maturing internal to the +// consumer CCV module, where the consumer has not yet relayed a VSCMatured +// packet back to the provider. +message MaturingVSCPacket { + uint64 vscId = 1; + google.protobuf.Timestamp maturity_time = 2 + [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; +} + +// ConsumerPacketDataList is a list of consumer packet data packets. +// +// Note this type is used internally to the consumer CCV module +// for exporting / importing state in InitGenesis and ExportGenesis. +message ConsumerPacketDataList { + repeated interchain_security.ccv.v1.ConsumerPacketData list = 1 + [ (gogoproto.nullable) = false ]; +} diff --git a/proto/interchain_security/ccv/consumer/v1/query.proto b/proto/interchain_security/ccv/consumer/v1/query.proto index 636683b257..3c56aed7ea 100644 --- a/proto/interchain_security/ccv/consumer/v1/query.proto +++ b/proto/interchain_security/ccv/consumer/v1/query.proto @@ -26,7 +26,7 @@ service Query { option (google.api.http).get = "/interchain_security/ccv/consumer/provider-info"; } - // QueryThrottleState returns on-chain state relevant to throttled consumer packets + // QueryThrottleState returns on-chain state relevant to throttled consumer packets rpc QueryThrottleState(QueryThrottleStateRequest) returns (QueryThrottleStateResponse) { option (google.api.http).get = "/interchain_security/ccv/consumer/throttle_state"; } diff --git a/proto/interchain_security/ccv/provider/v1/genesis.proto b/proto/interchain_security/ccv/provider/v1/genesis.proto index 9cefe26ee0..2899c4e1f2 100644 --- a/proto/interchain_security/ccv/provider/v1/genesis.proto +++ b/proto/interchain_security/ccv/provider/v1/genesis.proto @@ -8,7 +8,6 @@ import "gogoproto/gogo.proto"; import "interchain_security/ccv/v1/shared_consumer.proto"; import "interchain_security/ccv/v1/wire.proto"; import "interchain_security/ccv/provider/v1/provider.proto"; -import "tendermint/crypto/keys.proto"; // GenesisState defines the CCV provider chain genesis state message GenesisState { diff --git a/proto/interchain_security/ccv/provider/v1/provider.proto b/proto/interchain_security/ccv/provider/v1/provider.proto index 922f6b1cbe..f085ba472d 100644 --- a/proto/interchain_security/ccv/provider/v1/provider.proto +++ b/proto/interchain_security/ccv/provider/v1/provider.proto @@ -4,7 +4,6 @@ package interchain_security.ccv.provider.v1; option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/provider/types"; -import "interchain_security/ccv/v1/shared_consumer.proto"; import "interchain_security/ccv/v1/wire.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; @@ -209,6 +208,7 @@ message ConsumerRemovalProposals { // AddressList contains a list of consensus addresses message AddressList { repeated bytes addresses = 1; } +// ChannelToChain is used to map a CCV channel ID to the consumer chainID message ChannelToChain { string channel_id = 1; string chain_id = 2; diff --git a/proto/interchain_security/ccv/provider/v1/tx.proto b/proto/interchain_security/ccv/provider/v1/tx.proto index 7d4cce685e..1fb97e4132 100644 --- a/proto/interchain_security/ccv/provider/v1/tx.proto +++ b/proto/interchain_security/ccv/provider/v1/tx.proto @@ -3,10 +3,7 @@ package interchain_security.ccv.provider.v1; option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/provider/types"; -import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/any.proto"; // Msg defines the Msg service. service Msg { diff --git a/proto/interchain_security/ccv/v1/shared_consumer.proto b/proto/interchain_security/ccv/v1/shared_consumer.proto index d22e090de8..149e8630c5 100644 --- a/proto/interchain_security/ccv/v1/shared_consumer.proto +++ b/proto/interchain_security/ccv/v1/shared_consumer.proto @@ -6,27 +6,26 @@ option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/types"; import "tendermint/abci/types.proto"; import "ibc/lightclients/tendermint/v1/tendermint.proto"; -import "ibc/core/channel/v1/channel.proto"; import "google/protobuf/duration.proto"; import "gogoproto/gogo.proto"; -import "interchain_security/ccv/v1/wire.proto"; -import "google/protobuf/timestamp.proto"; // -// Note any type defined in this file is referenced/persisted in both the consumer and provider CCV modules, -// but not sent over the wire. These schemas could change, only with careful consideration of effects! +// Note any type defined in this file is referenced/persisted in both the +// consumer and provider CCV modules, but not sent over the wire. These schemas +// could change, only with careful consideration of effects! // // ConsumerParams defines the parameters for CCV consumer module. -// +// // Note this type is referenced in both the consumer and provider CCV modules, -// and persisted on the provider, see MakeConsumerGenesis and SetConsumerGenesis. +// and persisted on the provider, see MakeConsumerGenesis and +// SetConsumerGenesis. // message ConsumerParams { // TODO: Remove enabled flag and find a better way to setup integration tests // See: https://github.com/cosmos/interchain-security/issues/339 bool enabled = 1; - + /////////////////////// // Distribution Params // Number of blocks between ibc-token-transfers from the consumer chain to @@ -34,7 +33,7 @@ message ConsumerParams { // the accumulated tokens are divided and sent consumer redistribution // address. int64 blocks_per_distribution_transmission = 2; - + // Channel, and provider-chain receiving address to send distribution token // transfers over. These parameters is auto-set during the consumer <-> // provider handshake procedure. @@ -43,36 +42,36 @@ message ConsumerParams { // Sent CCV related IBC packets will timeout after this duration google.protobuf.Duration ccv_timeout_period = 5 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; - + // Sent transfer related IBC packets will timeout after this duration google.protobuf.Duration transfer_timeout_period = 6 [ (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 = 7; - + // 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 = 8; - + // Unbonding period for the consumer, // which should be smaller than that of the provider in general. google.protobuf.Duration unbonding_period = 9 [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; - + // The threshold for the percentage of validators at the bottom of the set who // can opt out of running the consumer chain without being punished. For // example, a value of 0.05 means that the validators in the bottom 5% of the // set can opt out string soft_opt_out_threshold = 10; - + // Reward denoms. These are the denominations which are allowed to be sent to // the provider as rewards. repeated string reward_denoms = 11; - + // Provider-originated reward denoms. These are denoms coming from the // provider which are allowed to be used as rewards. e.g. "uatom" repeated string provider_reward_denoms = 12; @@ -82,76 +81,23 @@ message ConsumerParams { [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; } -// ConsumerGenesisState defines the CCV consumer chain genesis state. -// -// Note this type is referenced in both the consumer and provider CCV modules, -// and persisted on the provider, see MakeConsumerGenesis and SetConsumerGenesis. +// ConsumerGenesisState defines shared genesis information between provider and +// consumer message ConsumerGenesisState { - ConsumerParams params = 1 [ (gogoproto.nullable) = false ]; - string provider_client_id = 2; // empty for a new chain, filled in on restart. - string provider_channel_id = - 3; // empty for a new chain, filled in on restart. - bool new_chain = - 4; // true for new chain, false for chain restart. - // ProviderClientState filled in on new chain, nil on restart. - ibc.lightclients.tendermint.v1.ClientState provider_client_state = 5; - // ProviderConsensusState filled in on new chain, nil on restart. - ibc.lightclients.tendermint.v1.ConsensusState provider_consensus_state = 6; - // MaturingPackets nil on new chain, filled in on restart. - repeated MaturingVSCPacket - maturing_packets = 7 [ (gogoproto.nullable) = false ]; - // InitialValset filled in on new chain and on restart. - repeated .tendermint.abci.ValidatorUpdate initial_val_set = 8 - [ (gogoproto.nullable) = false ]; - // HeightToValsetUpdateId nil on new chain, filled in on restart. - repeated HeightToValsetUpdateID height_to_valset_update_id = 9 - [ (gogoproto.nullable) = false ]; - // OutstandingDowntimes nil on new chain, filled in on restart. - repeated OutstandingDowntime outstanding_downtime_slashing = 10 - [ (gogoproto.nullable) = false ]; - // PendingConsumerPackets nil on new chain, filled in on restart. - ConsumerPacketDataList pending_consumer_packets = - 11 [ (gogoproto.nullable) = false ]; - // LastTransmissionBlockHeight nil on new chain, filled in on restart. - LastTransmissionBlockHeight - last_transmission_block_height = 12 [ (gogoproto.nullable) = false ]; - bool preCCV = 13; // flag indicating whether the consumer CCV module starts in - // pre-CCV state -} - -// HeightValsetUpdateID represents a mapping internal to the consumer CCV module -// AND used in shared consumer genesis state, which links a block height to each recv valset update id. -message HeightToValsetUpdateID { - uint64 height = 1; - uint64 valset_update_id = 2; -} - -// OutstandingDowntime defines the type used internally to the consumer CCV module, -// AND used in shared consumer genesis state, in order to not send multiple slashing -// requests for the same downtime infraction. -message OutstandingDowntime { string validator_consensus_address = 1; } - -// LastTransmissionBlockHeight is the last time validator holding -// pools were transmitted to the provider chain. This type is used internally -// to the consumer CCV module AND used in shared consumer genesis state. -message LastTransmissionBlockHeight { int64 height = 1; } - -// MaturingVSCPacket represents a vsc packet that is maturing internal to the -// consumer CCV module, where the consumer has not yet relayed a VSCMatured packet -// back to the provider. This type is used internally to the consumer CCV module -// AND used in shared consumer genesis state. -message MaturingVSCPacket { - uint64 vscId = 1; - google.protobuf.Timestamp maturity_time = 2 - [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; + ConsumerParams params = 1 [ (gogoproto.nullable) = false ]; + ProviderInfo provider = 2 [ (gogoproto.nullable) = false ]; + // true for new chain, false for chain restart. + bool new_chain = 3; // TODO:Check if this is really needed } -// ConsumerPacketDataList is a list of consumer packet data packets. -// -// Note this type is is used internally to the consumer CCV module -// for exporting / importing state in InitGenesis and ExportGenesis, -// AND included in the consumer genesis type (reffed by provider and consumer modules), -// hence this is a shared type. -message ConsumerPacketDataList { - repeated interchain_security.ccv.v1.ConsumerPacketData list = 1 [ (gogoproto.nullable) = false ]; +// ProviderInfo defines all information a consumer needs from a provider +// Shared data type between provider and consumer +message ProviderInfo { + // ProviderClientState filled in on new chain, nil on restart. + ibc.lightclients.tendermint.v1.ClientState client_state = 1; + // ProviderConsensusState filled in on new chain, nil on restart. + ibc.lightclients.tendermint.v1.ConsensusState consensus_state = 2; + // InitialValset filled in on new chain and on restart. + repeated .tendermint.abci.ValidatorUpdate initial_val_set = 3 + [ (gogoproto.nullable) = false ]; } diff --git a/tests/difference/core/driver/setup.go b/tests/difference/core/driver/setup.go index c34355b521..cf9d5e470d 100644 --- a/tests/difference/core/driver/setup.go +++ b/tests/difference/core/driver/setup.go @@ -207,7 +207,7 @@ func (b *Builder) getAppBytesAndSenders( bondDenom := sdk.DefaultBondDenom genesisStaking := stakingtypes.GenesisState{} - genesisConsumer := ccv.ConsumerGenesisState{} + genesisConsumer := consumertypes.GenesisState{} if genesis[stakingtypes.ModuleName] != nil { // If staking module genesis already exists @@ -217,7 +217,7 @@ func (b *Builder) getAppBytesAndSenders( if genesis[consumertypes.ModuleName] != nil { app.AppCodec().MustUnmarshalJSON(genesis[consumertypes.ModuleName], &genesisConsumer) - genesisConsumer.InitialValSet = initValPowers + genesisConsumer.Provider.InitialValSet = initValPowers genesisConsumer.Params.Enabled = true genesis[consumertypes.ModuleName] = app.AppCodec().MustMarshalJSON(&genesisConsumer) } @@ -522,7 +522,7 @@ func (b *Builder) createConsumersLocalClientGenesis() *ibctmtypes.ClientState { ) } -func (b *Builder) createConsumerGenesis(client *ibctmtypes.ClientState) *ccv.ConsumerGenesisState { +func (b *Builder) createConsumerGenesis(client *ibctmtypes.ClientState) *consumertypes.GenesisState { providerConsState := b.provider().LastHeader.ConsensusState() valUpdates := tmtypes.TM2PB.ValidatorUpdates(b.provider().Vals) @@ -541,7 +541,7 @@ func (b *Builder) createConsumerGenesis(client *ibctmtypes.ClientState) *ccv.Con []string{}, ccv.DefaultRetryDelayPeriod, ) - return ccv.NewInitialConsumerGenesisState(client, providerConsState, valUpdates, params) + return consumertypes.NewInitialGenesisState(client, providerConsState, valUpdates, params) } // The state of the data returned is equivalent to the state of two chains diff --git a/tests/integration/setup.go b/tests/integration/setup.go index 8db75519c0..eee8fb1a22 100644 --- a/tests/integration/setup.go +++ b/tests/integration/setup.go @@ -23,6 +23,7 @@ import ( icstestingutils "github.com/cosmos/interchain-security/v3/testutil/ibc_testing" testutil "github.com/cosmos/interchain-security/v3/testutil/integration" "github.com/cosmos/interchain-security/v3/testutil/simibc" + consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -147,8 +148,12 @@ func (suite *CCVTestSuite) SetupTest() { chainID, ) suite.Require().True(found, "consumer genesis not found") - - initConsumerChain(suite, chainID, &consumerGenesisState) + genesisState := consumertypes.GenesisState{ + Params: consumerGenesisState.Params, + Provider: consumerGenesisState.Provider, + NewChain: consumerGenesisState.NewChain, + } + initConsumerChain(suite, chainID, &genesisState) } // try updating all clients @@ -182,7 +187,7 @@ func (s *CCVTestSuite) getSentPacket(chain *ibctesting.TestChain, sequence uint6 func initConsumerChain( s *CCVTestSuite, chainID string, - genesisState *ccv.ConsumerGenesisState, + genesisState *consumertypes.GenesisState, ) { providerKeeper := s.providerApp.GetProviderKeeper() bundle := s.consumerBundles[chainID] @@ -199,8 +204,8 @@ func initConsumerChain( if genesisState.NewChain { consumerEndpointClientState, consumerEndpointConsState := s.GetConsumerEndpointClientAndConsState(*bundle) - s.Require().Equal(genesisState.ProviderClientState, consumerEndpointClientState) - s.Require().Equal(genesisState.ProviderConsensusState, consumerEndpointConsState) + s.Require().Equal(genesisState.Provider.ClientState, consumerEndpointClientState) + s.Require().Equal(genesisState.Provider.ConsensusState, consumerEndpointConsState) } // create path for the CCV channel diff --git a/testutil/ibc_testing/generic_setup.go b/testutil/ibc_testing/generic_setup.go index e9d959b665..4b108e8120 100644 --- a/testutil/ibc_testing/generic_setup.go +++ b/testutil/ibc_testing/generic_setup.go @@ -145,7 +145,7 @@ func AddConsumer[Tp testutil.ProviderApp, Tc testutil.ConsumerApp]( // use InitialValSet as the valset on the consumer var valz []*tmtypes.Validator - for _, update := range consumerGenesisState.InitialValSet { + for _, update := range consumerGenesisState.Provider.InitialValSet { // tmPubKey update.PubKey tmPubKey, err := tmencoding.PubKeyFromProto(update.PubKey) s.Require().NoError(err) @@ -158,7 +158,7 @@ func AddConsumer[Tp testutil.ProviderApp, Tc testutil.ConsumerApp]( } // create and instantiate consumer chain - ibctesting.DefaultTestingAppInit = appIniter(consumerGenesisState.InitialValSet) + ibctesting.DefaultTestingAppInit = appIniter(consumerGenesisState.Provider.InitialValSet) testChain := ibctesting.NewTestChainWithValSet(s.T(), coordinator, chainID, tmtypes.NewValidatorSet(valz), providerChain.Signers) coordinator.Chains[chainID] = testChain diff --git a/testutil/ibc_testing/specific_setup.go b/testutil/ibc_testing/specific_setup.go index 1c5529e22a..d0b2ac7bb8 100644 --- a/testutil/ibc_testing/specific_setup.go +++ b/testutil/ibc_testing/specific_setup.go @@ -53,7 +53,7 @@ func ConsumerAppIniter(initValPowers []types.ValidatorUpdate) AppIniter { // Feed consumer genesis with provider validators var consumerGenesis ccvtypes.ConsumerGenesisState encoding.Codec.MustUnmarshalJSON(genesisState[consumertypes.ModuleName], &consumerGenesis) - consumerGenesis.InitialValSet = initValPowers + consumerGenesis.Provider.InitialValSet = initValPowers consumerGenesis.Params.Enabled = true genesisState[consumertypes.ModuleName] = encoding.Codec.MustMarshalJSON(&consumerGenesis) @@ -71,7 +71,7 @@ func DemocracyConsumerAppIniter(initValPowers []types.ValidatorUpdate) AppIniter // TODO See if useful for democracy var consumerGenesis ccvtypes.ConsumerGenesisState encoding.Codec.MustUnmarshalJSON(genesisState[consumertypes.ModuleName], &consumerGenesis) - consumerGenesis.InitialValSet = initValPowers + consumerGenesis.Provider.InitialValSet = initValPowers consumerGenesis.Params.Enabled = true genesisState[consumertypes.ModuleName] = encoding.Codec.MustMarshalJSON(&consumerGenesis) diff --git a/x/ccv/consumer/keeper/distribution.go b/x/ccv/consumer/keeper/distribution.go index 92171244ad..c0a98d0a21 100644 --- a/x/ccv/consumer/keeper/distribution.go +++ b/x/ccv/consumer/keeper/distribution.go @@ -42,7 +42,7 @@ func (k Keeper) EndBlockRD(ctx sdk.Context) { } // Update LastTransmissionBlockHeight - newLtbh := ccv.LastTransmissionBlockHeight{ + newLtbh := types.LastTransmissionBlockHeight{ Height: ctx.BlockHeight(), } k.SetLastTransmissionBlockHeight(ctx, newLtbh) @@ -202,10 +202,10 @@ func (k Keeper) AllowedRewardDenoms(ctx sdk.Context) []string { return rewardDenoms } -func (k Keeper) GetLastTransmissionBlockHeight(ctx sdk.Context) ccv.LastTransmissionBlockHeight { +func (k Keeper) GetLastTransmissionBlockHeight(ctx sdk.Context) types.LastTransmissionBlockHeight { store := ctx.KVStore(k.storeKey) bz := store.Get(types.LastDistributionTransmissionKey()) - ltbh := ccv.LastTransmissionBlockHeight{} + ltbh := types.LastTransmissionBlockHeight{} if bz != nil { if err := ltbh.Unmarshal(bz); err != nil { panic(fmt.Errorf("failed to unmarshal LastTransmissionBlockHeight: %w", err)) @@ -214,7 +214,7 @@ func (k Keeper) GetLastTransmissionBlockHeight(ctx sdk.Context) ccv.LastTransmis return ltbh } -func (k Keeper) SetLastTransmissionBlockHeight(ctx sdk.Context, ltbh ccv.LastTransmissionBlockHeight) { +func (k Keeper) SetLastTransmissionBlockHeight(ctx sdk.Context, ltbh types.LastTransmissionBlockHeight) { store := ctx.KVStore(k.storeKey) bz, err := ltbh.Marshal() if err != nil { diff --git a/x/ccv/consumer/keeper/genesis.go b/x/ccv/consumer/keeper/genesis.go index f20d8849dc..0edcb57d7f 100644 --- a/x/ccv/consumer/keeper/genesis.go +++ b/x/ccv/consumer/keeper/genesis.go @@ -7,6 +7,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" + "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -16,7 +17,7 @@ import ( // 1. A client to the provider was never created, i.e. a new consumer chain is started for the first time. // 2. A consumer chain restarts after a client to the provider was created, but the CCV channel handshake is still in progress // 3. A consumer chain restarts after the CCV channel handshake was completed. -func (k Keeper) InitGenesis(ctx sdk.Context, state *ccv.ConsumerGenesisState) []abci.ValidatorUpdate { +func (k Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState) []abci.ValidatorUpdate { // PreCCV is true during the process of a standalone to consumer changeover. // At the PreCCV point in the process, the standalone chain has just been upgraded to include // the consumer ccv module, but the standalone staking keeper is still managing the validator set. @@ -26,7 +27,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, state *ccv.ConsumerGenesisState) [] if state.PreCCV { k.SetPreCCVTrue(ctx) k.MarkAsPrevStandaloneChain(ctx) - k.SetInitialValSet(ctx, state.InitialValSet) + k.SetInitialValSet(ctx, state.Provider.InitialValSet) } k.SetInitGenesisHeight(ctx, ctx.BlockHeight()) // Usually 0, but not the case for changeover chains @@ -55,7 +56,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, state *ccv.ConsumerGenesisState) [] // start a new chain if state.NewChain { // create the provider client in InitGenesis for new consumer chain. CCV Handshake must be established with this client id. - clientID, err := k.clientKeeper.CreateClient(ctx, state.ProviderClientState, state.ProviderConsensusState) + clientID, err := k.clientKeeper.CreateClient(ctx, state.Provider.ClientState, state.Provider.ConsensusState) if err != nil { // If the client creation fails, the chain MUST NOT start panic(err) @@ -110,15 +111,15 @@ func (k Keeper) InitGenesis(ctx sdk.Context, state *ccv.ConsumerGenesisState) [] } // populate cross chain validators states with initial valset - k.ApplyCCValidatorChanges(ctx, state.InitialValSet) - return state.InitialValSet + k.ApplyCCValidatorChanges(ctx, state.Provider.InitialValSet) + return state.Provider.InitialValSet } // ExportGenesis returns the CCV consumer module's exported genesis -func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *ccv.ConsumerGenesisState) { +func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *types.GenesisState) { params := k.GetConsumerParams(ctx) if !params.Enabled { - return ccv.DefaultConsumerGenesisState() + return types.DefaultGenesisState() } // export the current validator set @@ -126,7 +127,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *ccv.ConsumerGenesisStat // export pending packets using the depreciated ConsumerPacketDataList type pendingPackets := k.GetPendingPackets(ctx) - pendingPacketsDepreciated := ccv.ConsumerPacketDataList{} + pendingPacketsDepreciated := types.ConsumerPacketDataList{} pendingPacketsDepreciated.List = append(pendingPacketsDepreciated.List, pendingPackets...) // export all the states created after a provider channel got established @@ -137,7 +138,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *ccv.ConsumerGenesisStat panic("provider client does not exist although provider channel does exist") } - genesis = ccv.NewRestartConsumerGenesisState( + genesis = types.NewRestartGenesisState( clientID, channelID, k.GetAllPacketMaturityTimes(ctx), @@ -153,11 +154,11 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *ccv.ConsumerGenesisStat // if provider clientID and channelID don't exist on the consumer chain, // then CCV protocol is disabled for this chain return a default genesis state if !ok { - return ccv.DefaultConsumerGenesisState() + return types.DefaultGenesisState() } // export client states and pending slashing requests into a new chain genesis - genesis = ccv.NewRestartConsumerGenesisState( + genesis = types.NewRestartGenesisState( clientID, "", nil, @@ -165,7 +166,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *ccv.ConsumerGenesisStat k.GetAllHeightToValsetUpdateIDs(ctx), pendingPacketsDepreciated, nil, - ccv.LastTransmissionBlockHeight{}, + types.LastTransmissionBlockHeight{}, params, ) } diff --git a/x/ccv/consumer/keeper/genesis_test.go b/x/ccv/consumer/keeper/genesis_test.go index a07388a6cb..93e856d6ef 100644 --- a/x/ccv/consumer/keeper/genesis_test.go +++ b/x/ccv/consumer/keeper/genesis_test.go @@ -61,13 +61,13 @@ func TestInitGenesis(t *testing.T) { []string{"upgrade", "upgradedIBCState"}, ) - matPackets := []ccv.MaturingVSCPacket{ + matPackets := []consumertypes.MaturingVSCPacket{ { VscId: 1, MaturityTime: time.Now().UTC(), }, } - pendingDataPackets := ccv.ConsumerPacketDataList{ + pendingDataPackets := consumertypes.ConsumerPacketDataList{ List: []ccv.ConsumerPacketData{ { Type: ccv.SlashPacket, @@ -84,11 +84,11 @@ func TestInitGenesis(t *testing.T) { }, } // mock height to valset update ID values - defaultHeightValsetUpdateIDs := []ccv.HeightToValsetUpdateID{ + defaultHeightValsetUpdateIDs := []consumertypes.HeightToValsetUpdateID{ {ValsetUpdateId: vscID, Height: blockHeight}, } updatedHeightValsetUpdateIDs := append(defaultHeightValsetUpdateIDs, - ccv.HeightToValsetUpdateID{ValsetUpdateId: vscID + 1, Height: blockHeight + 1}, + consumertypes.HeightToValsetUpdateID{ValsetUpdateId: vscID + 1, Height: blockHeight + 1}, ) // create default parameters for a new chain @@ -100,8 +100,8 @@ func TestInitGenesis(t *testing.T) { testCases := []struct { name string malleate func(sdk.Context, testkeeper.MockedKeepers) - genesis *ccv.ConsumerGenesisState - assertStates func(sdk.Context, consumerkeeper.Keeper, *ccv.ConsumerGenesisState) + genesis *consumertypes.GenesisState + assertStates func(sdk.Context, consumerkeeper.Keeper, *consumertypes.GenesisState) }{ { "start a new chain", @@ -112,13 +112,13 @@ func TestInitGenesis(t *testing.T) { testkeeper.ExpectGetCapabilityMock(ctx, mocks, 1), ) }, - ccv.NewInitialConsumerGenesisState( + consumertypes.NewInitialGenesisState( provClientState, provConsState, valset, params, ), - func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *ccv.ConsumerGenesisState) { + func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *consumertypes.GenesisState) { assertConsumerPortIsBound(t, ctx, &ck) assertProviderClientID(t, ctx, &ck, provClientID) @@ -134,7 +134,7 @@ func TestInitGenesis(t *testing.T) { testkeeper.ExpectGetCapabilityMock(ctx, mocks, 2), ) }, - ccv.NewRestartConsumerGenesisState( + consumertypes.NewRestartGenesisState( provClientID, "", matPackets, @@ -142,10 +142,10 @@ func TestInitGenesis(t *testing.T) { defaultHeightValsetUpdateIDs, pendingDataPackets, nil, - ccv.LastTransmissionBlockHeight{}, + consumertypes.LastTransmissionBlockHeight{}, params, ), - func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *ccv.ConsumerGenesisState) { + func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *consumertypes.GenesisState) { assertConsumerPortIsBound(t, ctx, &ck) obtainedPendingPackets := ck.GetPendingPackets(ctx) @@ -170,20 +170,20 @@ func TestInitGenesis(t *testing.T) { ) }, // create a genesis for a restarted chain - ccv.NewRestartConsumerGenesisState( + consumertypes.NewRestartGenesisState( provClientID, provChannelID, matPackets, valset, updatedHeightValsetUpdateIDs, pendingDataPackets, - []ccv.OutstandingDowntime{ + []consumertypes.OutstandingDowntime{ {ValidatorConsensusAddress: sdk.ConsAddress(validator.Bytes()).String()}, }, - ccv.LastTransmissionBlockHeight{Height: int64(100)}, + consumertypes.LastTransmissionBlockHeight{Height: int64(100)}, params, ), - func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *ccv.ConsumerGenesisState) { + func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *consumertypes.GenesisState) { assertConsumerPortIsBound(t, ctx, &ck) gotChannelID, ok := ck.GetProviderChannel(ctx) @@ -239,7 +239,7 @@ func TestExportGenesis(t *testing.T) { vscID := uint64(0) blockHeight := uint64(0) - matPackets := []ccv.MaturingVSCPacket{ + matPackets := []consumertypes.MaturingVSCPacket{ { VscId: 1, MaturityTime: time.Now().UTC(), @@ -255,7 +255,7 @@ func TestExportGenesis(t *testing.T) { valset := []abci.ValidatorUpdate{tmtypes.TM2PB.ValidatorUpdate(validator)} // create pending consumer packets - consPackets := ccv.ConsumerPacketDataList{ + consPackets := consumertypes.ConsumerPacketDataList{ List: []ccv.ConsumerPacketData{ { Type: ccv.SlashPacket, @@ -272,13 +272,13 @@ func TestExportGenesis(t *testing.T) { }, } // mock height to valset update ID values - defaultHeightValsetUpdateIDs := []ccv.HeightToValsetUpdateID{ + defaultHeightValsetUpdateIDs := []consumertypes.HeightToValsetUpdateID{ {ValsetUpdateId: vscID, Height: blockHeight}, } updatedHeightValsetUpdateIDs := append(defaultHeightValsetUpdateIDs, - ccv.HeightToValsetUpdateID{ValsetUpdateId: vscID + 1, Height: blockHeight + 1}, + consumertypes.HeightToValsetUpdateID{ValsetUpdateId: vscID + 1, Height: blockHeight + 1}, ) - ltbh := ccv.LastTransmissionBlockHeight{Height: int64(1000)} + ltbh := consumertypes.LastTransmissionBlockHeight{Height: int64(1000)} // create default parameters for a new chain params := ccv.DefaultParams() params.Enabled = true @@ -289,7 +289,7 @@ func TestExportGenesis(t *testing.T) { testCases := []struct { name string malleate func(sdk.Context, consumerkeeper.Keeper, testkeeper.MockedKeepers) - expGenesis *ccv.ConsumerGenesisState + expGenesis *consumertypes.GenesisState }{ { "export a chain without an established CCV channel", @@ -307,7 +307,7 @@ func TestExportGenesis(t *testing.T) { ck.SetHeightValsetUpdateID(ctx, defaultHeightValsetUpdateIDs[0].Height, defaultHeightValsetUpdateIDs[0].ValsetUpdateId) }, - ccv.NewRestartConsumerGenesisState( + consumertypes.NewRestartGenesisState( provClientID, "", nil, @@ -315,7 +315,7 @@ func TestExportGenesis(t *testing.T) { defaultHeightValsetUpdateIDs, consPackets, nil, - ccv.LastTransmissionBlockHeight{}, + consumertypes.LastTransmissionBlockHeight{}, params, ), }, @@ -343,14 +343,14 @@ func TestExportGenesis(t *testing.T) { ck.SetOutstandingDowntime(ctx, sdk.ConsAddress(validator.Address.Bytes())) ck.SetLastTransmissionBlockHeight(ctx, ltbh) }, - ccv.NewRestartConsumerGenesisState( + consumertypes.NewRestartGenesisState( provClientID, provChannelID, matPackets, valset, updatedHeightValsetUpdateIDs, consPackets, - []ccv.OutstandingDowntime{ + []consumertypes.OutstandingDowntime{ {ValidatorConsensusAddress: sdk.ConsAddress(validator.Address.Bytes()).String()}, }, ltbh, @@ -394,7 +394,7 @@ func assertProviderClientID(t *testing.T, ctx sdk.Context, ck *consumerkeeper.Ke } // assert that the given input match the height to valset update ID mappings in the store -func assertHeightValsetUpdateIDs(t *testing.T, ctx sdk.Context, ck *consumerkeeper.Keeper, heighValsetUpdateIDs []ccv.HeightToValsetUpdateID) { +func assertHeightValsetUpdateIDs(t *testing.T, ctx sdk.Context, ck *consumerkeeper.Keeper, heighValsetUpdateIDs []consumertypes.HeightToValsetUpdateID) { t.Helper() ctr := 0 diff --git a/x/ccv/consumer/keeper/keeper.go b/x/ccv/consumer/keeper/keeper.go index b84f3d1864..0d0ac988ad 100644 --- a/x/ccv/consumer/keeper/keeper.go +++ b/x/ccv/consumer/keeper/keeper.go @@ -309,8 +309,8 @@ func (k Keeper) DeletePreCCV(ctx sdk.Context) { func (k Keeper) SetInitialValSet(ctx sdk.Context, initialValSet []tmtypes.ValidatorUpdate) { store := ctx.KVStore(k.storeKey) - initialValSetState := ccv.ConsumerGenesisState{ - InitialValSet: initialValSet, + initialValSetState := types.GenesisState{ + Provider: ccv.ProviderInfo{InitialValSet: initialValSet}, } bz := k.cdc.MustMarshal(&initialValSetState) store.Set(types.InitialValSetKey(), bz) @@ -318,11 +318,11 @@ func (k Keeper) SetInitialValSet(ctx sdk.Context, initialValSet []tmtypes.Valida func (k Keeper) GetInitialValSet(ctx sdk.Context) []tmtypes.ValidatorUpdate { store := ctx.KVStore(k.storeKey) - initialValSet := ccv.ConsumerGenesisState{} + initialValSet := types.GenesisState{} bz := store.Get(types.InitialValSetKey()) if bz != nil { k.cdc.MustUnmarshal(bz, &initialValSet) - return initialValSet.InitialValSet + return initialValSet.Provider.InitialValSet } return []tmtypes.ValidatorUpdate{} } @@ -336,14 +336,14 @@ func (k Keeper) GetLastStandaloneValidators(ctx sdk.Context) []stakingtypes.Vali // GetElapsedPacketMaturityTimes returns a slice of already elapsed PacketMaturityTimes, sorted by maturity times, // i.e., the slice contains the IDs of the matured VSCPackets. -func (k Keeper) GetElapsedPacketMaturityTimes(ctx sdk.Context) (maturingVSCPackets []ccv.MaturingVSCPacket) { +func (k Keeper) GetElapsedPacketMaturityTimes(ctx sdk.Context) (maturingVSCPackets []types.MaturingVSCPacket) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, []byte{types.PacketMaturityTimeBytePrefix}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - var maturingVSCPacket ccv.MaturingVSCPacket + var maturingVSCPacket types.MaturingVSCPacket if err := maturingVSCPacket.Unmarshal(iterator.Value()); err != nil { // An error here would indicate something is very wrong, // the MaturingVSCPackets are assumed to be correctly serialized in SetPacketMaturityTime. @@ -368,13 +368,13 @@ func (k Keeper) GetElapsedPacketMaturityTimes(ctx sdk.Context) (maturingVSCPacke // PacketMaturityTimeBytePrefix | maturityTime.UnixNano() | vscID // Thus, the returned array is in ascending order of maturityTimes. // If two entries have the same maturityTime, then they are ordered by vscID. -func (k Keeper) GetAllPacketMaturityTimes(ctx sdk.Context) (maturingVSCPackets []ccv.MaturingVSCPacket) { +func (k Keeper) GetAllPacketMaturityTimes(ctx sdk.Context) (maturingVSCPackets []types.MaturingVSCPacket) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, []byte{types.PacketMaturityTimeBytePrefix}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - var maturingVSCPacket ccv.MaturingVSCPacket + var maturingVSCPacket types.MaturingVSCPacket if err := maturingVSCPacket.Unmarshal(iterator.Value()); err != nil { // An error here would indicate something is very wrong, // the MaturingVSCPackets are assumed to be correctly serialized in SetPacketMaturityTime. @@ -389,7 +389,7 @@ func (k Keeper) GetAllPacketMaturityTimes(ctx sdk.Context) (maturingVSCPackets [ // SetPacketMaturityTime sets the maturity time for a given received VSC packet id func (k Keeper) SetPacketMaturityTime(ctx sdk.Context, vscId uint64, maturityTime time.Time) { store := ctx.KVStore(k.storeKey) - maturingVSCPacket := ccv.MaturingVSCPacket{ + maturingVSCPacket := types.MaturingVSCPacket{ VscId: vscId, MaturityTime: maturityTime, } @@ -469,7 +469,7 @@ func (k Keeper) DeleteHeightValsetUpdateID(ctx sdk.Context, height uint64) { // Note that the block height to vscID mapping is stored under keys with the following format: // HeightValsetUpdateIDBytePrefix | height // Thus, the returned array is in ascending order of heights. -func (k Keeper) GetAllHeightToValsetUpdateIDs(ctx sdk.Context) (heightToValsetUpdateIDs []ccv.HeightToValsetUpdateID) { +func (k Keeper) GetAllHeightToValsetUpdateIDs(ctx sdk.Context) (heightToValsetUpdateIDs []types.HeightToValsetUpdateID) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, []byte{types.HeightValsetUpdateIDBytePrefix}) @@ -478,7 +478,7 @@ func (k Keeper) GetAllHeightToValsetUpdateIDs(ctx sdk.Context) (heightToValsetUp height := binary.BigEndian.Uint64(iterator.Key()[1:]) vscID := binary.BigEndian.Uint64(iterator.Value()) - heightToValsetUpdateIDs = append(heightToValsetUpdateIDs, ccv.HeightToValsetUpdateID{ + heightToValsetUpdateIDs = append(heightToValsetUpdateIDs, types.HeightToValsetUpdateID{ Height: height, ValsetUpdateId: vscID, }) @@ -515,7 +515,7 @@ func (k Keeper) DeleteOutstandingDowntime(ctx sdk.Context, consAddress string) { // Note that the outstanding downtime flags are stored under keys with the following format: // OutstandingDowntimeBytePrefix | consAddress // Thus, the returned array is in ascending order of consAddresses. -func (k Keeper) GetAllOutstandingDowntimes(ctx sdk.Context) (downtimes []ccv.OutstandingDowntime) { +func (k Keeper) GetAllOutstandingDowntimes(ctx sdk.Context) (downtimes []types.OutstandingDowntime) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, []byte{types.OutstandingDowntimeBytePrefix}) @@ -524,7 +524,7 @@ func (k Keeper) GetAllOutstandingDowntimes(ctx sdk.Context) (downtimes []ccv.Out addrBytes := iterator.Key()[1:] addr := sdk.ConsAddress(addrBytes).String() - downtimes = append(downtimes, ccv.OutstandingDowntime{ + downtimes = append(downtimes, types.OutstandingDowntime{ ValidatorConsensusAddress: addr, }) } diff --git a/x/ccv/consumer/keeper/keeper_test.go b/x/ccv/consumer/keeper/keeper_test.go index 4b536a071a..06fdeae082 100644 --- a/x/ccv/consumer/keeper/keeper_test.go +++ b/x/ccv/consumer/keeper/keeper_test.go @@ -201,7 +201,7 @@ func TestPacketMaturityTime(t *testing.T) { defer ctrl.Finish() now := time.Now().UTC() - packets := []ccv.MaturingVSCPacket{ + packets := []types.MaturingVSCPacket{ { VscId: 2, MaturityTime: now, @@ -220,9 +220,9 @@ func TestPacketMaturityTime(t *testing.T) { }, } // sort by MaturityTime and not by VscId - expectedGetAllOrder := []ccv.MaturingVSCPacket{packets[2], packets[1], packets[0], packets[3]} + expectedGetAllOrder := []types.MaturingVSCPacket{packets[2], packets[1], packets[0], packets[3]} // only packets with MaturityTime before or equal to now - expectedGetElapsedOrder := []ccv.MaturingVSCPacket{packets[2], packets[1], packets[0]} + expectedGetElapsedOrder := []types.MaturingVSCPacket{packets[2], packets[1], packets[0]} // test SetPacketMaturityTime for _, packet := range packets { @@ -502,7 +502,7 @@ func TestGetAllHeightToValsetUpdateIDs(t *testing.T) { ck, ctx, ctrl, _ := testkeeper.GetConsumerKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() - cases := []ccv.HeightToValsetUpdateID{ + cases := []types.HeightToValsetUpdateID{ { ValsetUpdateId: 2, Height: 22, @@ -549,9 +549,9 @@ func TestGetAllOutstandingDowntimes(t *testing.T) { sdk.ConsAddress([]byte("consAddress4")), sdk.ConsAddress([]byte("consAddress3")), } - expectedGetAllOrder := []ccv.OutstandingDowntime{} + expectedGetAllOrder := []types.OutstandingDowntime{} for _, addr := range addresses { - expectedGetAllOrder = append(expectedGetAllOrder, ccv.OutstandingDowntime{ValidatorConsensusAddress: addr.String()}) + expectedGetAllOrder = append(expectedGetAllOrder, types.OutstandingDowntime{ValidatorConsensusAddress: addr.String()}) } // sorting by ConsAddress sort.Slice(expectedGetAllOrder, func(i, j int) bool { diff --git a/x/ccv/consumer/keeper/migration.go b/x/ccv/consumer/keeper/migration.go index 5d5d913b9b..e63960fdb1 100644 --- a/x/ccv/consumer/keeper/migration.go +++ b/x/ccv/consumer/keeper/migration.go @@ -7,7 +7,6 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" - ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // Migrator is a struct for handling in-place store migrations. @@ -32,7 +31,7 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error { // Note an equivalent migration is not required for providers. func (k Keeper) MigrateConsumerPacketData(ctx sdk.Context) error { // deserialize packet data from old format - var depreciatedType ccvtypes.ConsumerPacketDataList + var depreciatedType consumertypes.ConsumerPacketDataList store := ctx.KVStore(k.storeKey) bz := store.Get([]byte{consumertypes.PendingDataPacketsBytePrefix}) if bz == nil { @@ -64,7 +63,7 @@ func PendingDataPacketsKeyOnlyForTesting() []byte { // Note: a better test of the old functionality would be to directly reference the old ICS version, // including the version of ccv.ConsumerPacketDataList has a list of ccv.ConsumerPacketData without indexes. -func (k Keeper) SetPendingPacketsOnlyForTesting(ctx sdk.Context, packets ccvtypes.ConsumerPacketDataList) { +func (k Keeper) SetPendingPacketsOnlyForTesting(ctx sdk.Context, packets consumertypes.ConsumerPacketDataList) { store := ctx.KVStore(k.storeKey) bz, err := packets.Marshal() if err != nil { diff --git a/x/ccv/consumer/keeper/migration_test.go b/x/ccv/consumer/keeper/migration_test.go index 7cb87665f0..359e394f31 100644 --- a/x/ccv/consumer/keeper/migration_test.go +++ b/x/ccv/consumer/keeper/migration_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" testutil "github.com/cosmos/interchain-security/v3/testutil/keeper" + "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -14,7 +15,7 @@ func TestMigrateConsumerPacketData(t *testing.T) { defer ctrl.Finish() // Set some pending data packets in the old format - packets := ccvtypes.ConsumerPacketDataList{ + packets := types.ConsumerPacketDataList{ List: []ccvtypes.ConsumerPacketData{ { Type: ccvtypes.SlashPacket, diff --git a/x/ccv/consumer/module.go b/x/ccv/consumer/module.go index ba38b01d73..f063075211 100644 --- a/x/ccv/consumer/module.go +++ b/x/ccv/consumer/module.go @@ -57,7 +57,7 @@ func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // ValidateGenesis performs genesis state validation for the ibc consumer module. func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - var data ccvtypes.ConsumerGenesisState + var data consumertypes.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", consumertypes.ModuleName, err) } @@ -117,7 +117,7 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { // InitGenesis performs genesis initialization for the consumer module. It returns // no validator updates. func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate { - var genesisState ccvtypes.ConsumerGenesisState + var genesisState consumertypes.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) return am.keeper.InitGenesis(ctx, &genesisState) } diff --git a/x/ccv/consumer/types/consumer.pb.go b/x/ccv/consumer/types/consumer.pb.go index c6c09166a5..93a3c32a83 100644 --- a/x/ccv/consumer/types/consumer.pb.go +++ b/x/ccv/consumer/types/consumer.pb.go @@ -10,8 +10,6 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "github.com/cosmos/interchain-security/v3/x/ccv/types" - _ "google.golang.org/protobuf/types/known/durationpb" _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" @@ -31,10 +29,10 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// CrossChainValidator defines the type used to store validator information internal -// to the consumer CCV module. Note one cross chain validator entry is persisted for -// each consumer validator, where incoming VSC packets update this data, which is eventually -// forwarded to comet for consumer chain consensus. +// CrossChainValidator defines the type used to store validator information +// internal to the consumer CCV module. Note one cross chain validator entry is +// persisted for each consumer validator, where incoming VSC packets update this +// data, which is eventually forwarded to comet for consumer chain consensus. // // Note this type is only used internally to the consumer CCV module. type CrossChainValidator struct { @@ -164,34 +162,33 @@ func init() { } var fileDescriptor_5b27a82b276e7f93 = []byte{ - // 432 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xcb, 0x8e, 0xd3, 0x30, - 0x14, 0xad, 0x19, 0x31, 0x94, 0x14, 0x21, 0x14, 0x2a, 0x51, 0xba, 0x48, 0xab, 0x22, 0xa4, 0x6e, - 0xc6, 0x56, 0xdb, 0x1d, 0x12, 0x8b, 0xe9, 0x2c, 0x59, 0x80, 0x02, 0x02, 0x89, 0x4d, 0xe4, 0x38, - 0x26, 0xb5, 0x48, 0x7c, 0x23, 0x3f, 0x52, 0xcc, 0x57, 0xcc, 0x67, 0xf0, 0x01, 0x7c, 0xc4, 0x88, - 0xd5, 0x2c, 0x59, 0x0d, 0xa8, 0xfd, 0x03, 0xbe, 0x00, 0xe5, 0x55, 0xc4, 0xc0, 0xec, 0xee, 0xf1, - 0xf1, 0x39, 0x3e, 0xf7, 0xfa, 0x7a, 0x4b, 0x21, 0x0d, 0x57, 0x6c, 0x43, 0x85, 0x8c, 0x34, 0x67, - 0x56, 0x09, 0xe3, 0x08, 0x63, 0x25, 0x61, 0x20, 0xb5, 0xcd, 0xb9, 0x22, 0xe5, 0xe2, 0x50, 0xe3, - 0x42, 0x81, 0x01, 0xff, 0xc9, 0x7f, 0x34, 0x98, 0xb1, 0x12, 0x1f, 0xee, 0x95, 0x8b, 0xf1, 0xd3, - 0x9b, 0x8c, 0xcb, 0x05, 0xd9, 0x0a, 0xc5, 0x1b, 0xaf, 0xf1, 0xe3, 0x14, 0x20, 0xcd, 0x38, 0xa9, - 0x51, 0x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2f, 0x65, 0x58, 0x9d, 0xfa, 0xa7, 0xde, 0x5d, 0xcd, - 0x65, 0x12, 0x55, 0xbd, 0xd7, 0xa9, 0x07, 0xcb, 0xf1, 0x3f, 0xf1, 0xde, 0x74, 0x83, 0x59, 0xf7, - 0x2f, 0xae, 0x26, 0xbd, 0xf3, 0x1f, 0x13, 0x14, 0xf6, 0x2b, 0x59, 0x45, 0xac, 0xdf, 0x5d, 0xec, - 0x02, 0x74, 0xb9, 0x0b, 0xd0, 0xcf, 0x5d, 0x80, 0xce, 0xf7, 0x41, 0xef, 0x72, 0x1f, 0xf4, 0xbe, - 0xef, 0x83, 0xde, 0xfb, 0xe7, 0xa9, 0x30, 0x1b, 0x1b, 0x63, 0x06, 0x79, 0xfb, 0x35, 0xe4, 0xcf, - 0x1a, 0x9c, 0x1c, 0xd6, 0xa0, 0x5c, 0x91, 0x4f, 0x7f, 0x2f, 0x99, 0x71, 0x05, 0xd7, 0xf1, 0x71, - 0x1d, 0x60, 0xf5, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x5c, 0xdb, 0x0f, 0x5e, 0x95, 0x02, 0x00, 0x00, + // 413 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcd, 0x8e, 0xd3, 0x30, + 0x10, 0xc7, 0x6b, 0x56, 0x2c, 0xc5, 0x45, 0x08, 0x85, 0x4a, 0x74, 0x7b, 0x48, 0xab, 0x70, 0xc9, + 0x65, 0x6d, 0x6d, 0x7b, 0x43, 0xe2, 0xb0, 0xdd, 0x23, 0x07, 0x50, 0x40, 0x20, 0x71, 0x89, 0x1c, + 0xc7, 0xa4, 0x16, 0x89, 0x27, 0xb2, 0x9d, 0x2c, 0xe6, 0x29, 0xf6, 0x31, 0x78, 0x00, 0x1e, 0x62, + 0xc5, 0x69, 0x8f, 0x9c, 0x0a, 0x6a, 0xdf, 0x80, 0x27, 0x40, 0xf9, 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x71, 0xa7, 0x0b, 0xbe, 0x7d, 0x3d, 0x1d, 0xf7, 0xec, 0x5c, 0xbb, 0xd2, 0x02, 0x79, 0x55, 0x25, + 0x2f, 0x84, 0x8b, 0xfa, 0xc2, 0xc1, 0x67, 0x3c, 0x7a, 0x9d, 0x33, 0xb3, 0x8e, 0x04, 0x07, 0x9d, + 0x7a, 0x21, 0x7e, 0x74, 0xc9, 0xa4, 0x95, 0x2a, 0x8b, 0x41, 0xc5, 0x5a, 0x94, 0xb9, 0x6b, 0x51, + 0x87, 0xd1, 0xc3, 0x3e, 0xfe, 0x52, 0x45, 0x4d, 0xd4, 0x3b, 0xc7, 0xf7, 0x8d, 0x50, 0x69, 0xdc, + 0xcc, 0xde, 0x52, 0x8f, 0x16, 0xd3, 0xff, 0xf0, 0xde, 0xec, 0x17, 0xb3, 0x1a, 0x5e, 0x6f, 0x66, + 0x83, 0xab, 0x1f, 0x33, 0x14, 0x0d, 0x1b, 0x59, 0x93, 0x58, 0xbd, 0xbb, 0xde, 0xfa, 0xe8, 0x66, + 0xeb, 0xa3, 0x9f, 0x5b, 0x1f, 0x5d, 0xed, 0xfc, 0xc1, 0xcd, 0xce, 0x1f, 0x7c, 0xdf, 0xf9, 0x83, + 0xf7, 0xcf, 0x33, 0x69, 0xd7, 0x55, 0x42, 0x38, 0x14, 0xfd, 0xea, 0xe9, 0x9f, 0x4f, 0x3e, 0x3d, + 0x1c, 0x46, 0xbd, 0xa4, 0x9f, 0xfe, 0xbe, 0x0e, 0xeb, 0x4a, 0x61, 0x92, 0xe3, 0x16, 0x60, 0xf9, + 0x3b, 0x00, 0x00, 0xff, 0xff, 0x43, 0xb2, 0x00, 0x6a, 0x4e, 0x02, 0x00, 0x00, } func (m *CrossChainValidator) Marshal() (dAtA []byte, err error) { diff --git a/x/ccv/consumer/types/genesis.go b/x/ccv/consumer/types/genesis.go new file mode 100644 index 0000000000..0aac48e8f5 --- /dev/null +++ b/x/ccv/consumer/types/genesis.go @@ -0,0 +1,173 @@ +package types + +import ( + ibctmtypes "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + + errorsmod "cosmossdk.io/errors" + + abci "github.com/cometbft/cometbft/abci/types" + + ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" +) + +// NewRestartGenesisState returns a consumer GenesisState that has already been established. +func NewRestartGenesisState( + clientID, channelID string, + maturingPackets []MaturingVSCPacket, + initValSet []abci.ValidatorUpdate, + heightToValsetUpdateIDs []HeightToValsetUpdateID, + pendingConsumerPackets ConsumerPacketDataList, + outstandingDowntimes []OutstandingDowntime, + lastTransBlockHeight LastTransmissionBlockHeight, + params ccv.ConsumerParams, +) *GenesisState { + return &GenesisState{ + NewChain: false, + Params: params, + Provider: ccv.ProviderInfo{ + InitialValSet: initValSet, + }, + MaturingPackets: maturingPackets, + HeightToValsetUpdateId: heightToValsetUpdateIDs, + PendingConsumerPackets: pendingConsumerPackets, + OutstandingDowntimeSlashing: outstandingDowntimes, + LastTransmissionBlockHeight: lastTransBlockHeight, + ProviderClientId: clientID, + ProviderChannelId: channelID, + } +} + +// DefaultGenesisState returns a default disabled consumer chain genesis state. This allows the module to be hooked up to app without getting use +// unless explicitly specified in genesis. +func DefaultGenesisState() *GenesisState { + return &GenesisState{ + Params: ccv.DefaultParams(), + } +} + +// NewInitialGenesisState returns a GenesisState for a completely new consumer chain. +func NewInitialGenesisState(cs *ibctmtypes.ClientState, consState *ibctmtypes.ConsensusState, + initValSet []abci.ValidatorUpdate, params ccv.ConsumerParams, +) *GenesisState { + return &GenesisState{ + NewChain: true, + Params: params, + Provider: ccv.ProviderInfo{ + ClientState: cs, + ConsensusState: consState, + InitialValSet: initValSet, + }, + } +} + +// Validate performs basic genesis state validation returning an error upon any failure. +// +// The three cases where a consumer chain starts/restarts +// expect the following optional and mandatory genesis states: +// +// 1. New chain starts: +// - Params, InitialValset, provider client state, provider consensus state // mandatory +// +// 2. Chain restarts with CCV handshake still in progress: +// - Params, InitialValset, ProviderID, HeightToValidatorSetUpdateID // mandatory +// - PendingConsumerPacket // optional +// +// 3. Chain restarts with CCV handshake completed: +// - Params, InitialValset, ProviderID, channelID, HeightToValidatorSetUpdateID // mandatory +// - MaturingVSCPackets, OutstandingDowntime, PendingConsumerPacket, LastTransmissionBlockHeight // optional +// + +func (gs GenesisState) Validate() error { + if !gs.Params.Enabled { + return nil + } + if len(gs.Provider.InitialValSet) == 0 { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "initial validator set is empty") + } + if err := gs.Params.Validate(); err != nil { + return err + } + + if gs.NewChain { + if gs.Provider.ClientState == nil { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider client state cannot be nil for new chain") + } + if err := gs.Provider.ClientState.Validate(); err != nil { + return errorsmod.Wrapf(ccv.ErrInvalidGenesis, "provider client state invalid for new chain %s", err.Error()) + } + if gs.Provider.ConsensusState == nil { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider consensus state cannot be nil for new chain") + } + if err := gs.Provider.ConsensusState.ValidateBasic(); err != nil { + return errorsmod.Wrapf(ccv.ErrInvalidGenesis, "provider consensus state invalid for new chain %s", err.Error()) + } + if gs.ProviderClientId != "" { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider client id cannot be set for new chain. It must be established on handshake") + } + if gs.ProviderChannelId != "" { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider channel id cannot be set for new chain. It must be established on handshake") + } + if len(gs.MaturingPackets) != 0 { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "maturing packets must be empty for new chain") + } + if len(gs.PendingConsumerPackets.List) != 0 { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "pending consumer packets must be empty for new chain") + } + if gs.LastTransmissionBlockHeight.Height != 0 { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "last transmission block height must be empty for new chain") + } + } else { + // NOTE: For restart genesis, we will verify initial validator set in InitGenesis. + if gs.ProviderClientId == "" { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider client id must be set for a restarting consumer genesis state") + } + // handshake is still in progress + handshakeInProgress := gs.ProviderChannelId == "" + if handshakeInProgress { + if len(gs.MaturingPackets) != 0 { + return errorsmod.Wrap( + ccv.ErrInvalidGenesis, "maturing packets must be empty when handshake isn't completed") + } + if len(gs.OutstandingDowntimeSlashing) != 0 { + return errorsmod.Wrap( + ccv.ErrInvalidGenesis, "outstanding downtime must be empty when handshake isn't completed") + } + if gs.LastTransmissionBlockHeight.Height != 0 { + return errorsmod.Wrap( + ccv.ErrInvalidGenesis, "last transmission block height must be zero when handshake isn't completed") + } + if len(gs.PendingConsumerPackets.List) != 0 { + for _, packet := range gs.PendingConsumerPackets.List { + if packet.Type == ccv.VscMaturedPacket { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "pending maturing packets must be empty when handshake isn't completed") + } + } + } + } + /* if gs.HeightToValsetUpdateId == nil { + return errorsmod.Wrap( + ccv.ErrInvalidGenesis, + "empty height to validator set update id mapping", + ) + } */ + if gs.Provider.ClientState != nil || gs.Provider.ConsensusState != nil { + return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider client state and consensus state must be nil for a restarting genesis state") + } + for _, mat := range gs.MaturingPackets { + if err := mat.Validate(); err != nil { + return errorsmod.Wrap(err, "invalid unbonding sequences") + } + } + } + return nil +} + +func (mat MaturingVSCPacket) Validate() error { + if mat.MaturityTime.IsZero() { + return errorsmod.Wrap(ccv.ErrInvalidVSCMaturedTime, "cannot have 0 maturity time") + } + if mat.VscId == 0 { + return errorsmod.Wrap(ccv.ErrInvalidVSCMaturedId, "cannot have 0 maturity time") + } + return nil +} diff --git a/x/ccv/consumer/types/genesis.pb.go b/x/ccv/consumer/types/genesis.pb.go new file mode 100644 index 0000000000..66f3544a6c --- /dev/null +++ b/x/ccv/consumer/types/genesis.pb.go @@ -0,0 +1,2018 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: interchain_security/ccv/consumer/v1/genesis.proto + +package types + +import ( + fmt "fmt" + types1 "github.com/cometbft/cometbft/abci/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _07_tendermint "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + types "github.com/cosmos/interchain-security/v3/x/ccv/types" + _ "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. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the CCV consumer genesis state +// +// Note: this type is only used on consumer side and references shared types with +// provider +type GenesisState struct { + // ConsumerParams is a shared type with provider module + Params types.ConsumerParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // Client ID of the provider. Empty for a new chain, filled in on restart. + ProviderClientId string `protobuf:"bytes,2,opt,name=provider_client_id,json=providerClientId,proto3" json:"provider_client_id,omitempty"` + // Channel ID of the provider. Empty for a new chain, filled in on restart. + ProviderChannelId string `protobuf:"bytes,3,opt,name=provider_channel_id,json=providerChannelId,proto3" json:"provider_channel_id,omitempty"` + // true for new chain, false for chain restart. + NewChain bool `protobuf:"varint,4,opt,name=new_chain,json=newChain,proto3" json:"new_chain,omitempty"` + // !!! DEPRECATED !!! ProviderClientState is deprecated. Use provider.client_state instead + ProviderClientState *_07_tendermint.ClientState `protobuf:"bytes,5,opt,name=provider_client_state,json=providerClientState,proto3" json:"provider_client_state,omitempty"` // Deprecated: Do not use. + // !!! DEPRECATED !!! ProviderConsensusState is deprecated. Use provider.consensus_state instead + ProviderConsensusState *_07_tendermint.ConsensusState `protobuf:"bytes,6,opt,name=provider_consensus_state,json=providerConsensusState,proto3" json:"provider_consensus_state,omitempty"` // Deprecated: Do not use. + // MaturingPackets nil on new chain, filled in on restart. + MaturingPackets []MaturingVSCPacket `protobuf:"bytes,7,rep,name=maturing_packets,json=maturingPackets,proto3" json:"maturing_packets"` + // !!! DEPRECATED !!!! InitialValset is deprecated. Use provider.initial_val_set instead + InitialValSet []types1.ValidatorUpdate `protobuf:"bytes,8,rep,name=initial_val_set,json=initialValSet,proto3" json:"initial_val_set"` // Deprecated: Do not use. + // HeightToValsetUpdateId nil on new chain, filled in on restart. + HeightToValsetUpdateId []HeightToValsetUpdateID `protobuf:"bytes,9,rep,name=height_to_valset_update_id,json=heightToValsetUpdateId,proto3" json:"height_to_valset_update_id"` + // OutstandingDowntimes nil on new chain, filled in on restart. + OutstandingDowntimeSlashing []OutstandingDowntime `protobuf:"bytes,10,rep,name=outstanding_downtime_slashing,json=outstandingDowntimeSlashing,proto3" json:"outstanding_downtime_slashing"` + // PendingConsumerPackets nil on new chain, filled in on restart. + PendingConsumerPackets ConsumerPacketDataList `protobuf:"bytes,11,opt,name=pending_consumer_packets,json=pendingConsumerPackets,proto3" json:"pending_consumer_packets"` + // LastTransmissionBlockHeight nil on new chain, filled in on restart. + LastTransmissionBlockHeight LastTransmissionBlockHeight `protobuf:"bytes,12,opt,name=last_transmission_block_height,json=lastTransmissionBlockHeight,proto3" json:"last_transmission_block_height"` + // flag indicating whether the consumer CCV module starts in pre-CCV state + PreCCV bool `protobuf:"varint,13,opt,name=preCCV,proto3" json:"preCCV,omitempty"` + Provider types.ProviderInfo `protobuf:"bytes,14,opt,name=provider,proto3" json:"provider"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_2db73a6057a27482, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() types.ConsumerParams { + if m != nil { + return m.Params + } + return types.ConsumerParams{} +} + +func (m *GenesisState) GetProviderClientId() string { + if m != nil { + return m.ProviderClientId + } + return "" +} + +func (m *GenesisState) GetProviderChannelId() string { + if m != nil { + return m.ProviderChannelId + } + return "" +} + +func (m *GenesisState) GetNewChain() bool { + if m != nil { + return m.NewChain + } + return false +} + +// Deprecated: Do not use. +func (m *GenesisState) GetProviderClientState() *_07_tendermint.ClientState { + if m != nil { + return m.ProviderClientState + } + return nil +} + +// Deprecated: Do not use. +func (m *GenesisState) GetProviderConsensusState() *_07_tendermint.ConsensusState { + if m != nil { + return m.ProviderConsensusState + } + return nil +} + +func (m *GenesisState) GetMaturingPackets() []MaturingVSCPacket { + if m != nil { + return m.MaturingPackets + } + return nil +} + +// Deprecated: Do not use. +func (m *GenesisState) GetInitialValSet() []types1.ValidatorUpdate { + if m != nil { + return m.InitialValSet + } + return nil +} + +func (m *GenesisState) GetHeightToValsetUpdateId() []HeightToValsetUpdateID { + if m != nil { + return m.HeightToValsetUpdateId + } + return nil +} + +func (m *GenesisState) GetOutstandingDowntimeSlashing() []OutstandingDowntime { + if m != nil { + return m.OutstandingDowntimeSlashing + } + return nil +} + +func (m *GenesisState) GetPendingConsumerPackets() ConsumerPacketDataList { + if m != nil { + return m.PendingConsumerPackets + } + return ConsumerPacketDataList{} +} + +func (m *GenesisState) GetLastTransmissionBlockHeight() LastTransmissionBlockHeight { + if m != nil { + return m.LastTransmissionBlockHeight + } + return LastTransmissionBlockHeight{} +} + +func (m *GenesisState) GetPreCCV() bool { + if m != nil { + return m.PreCCV + } + return false +} + +func (m *GenesisState) GetProvider() types.ProviderInfo { + if m != nil { + return m.Provider + } + return types.ProviderInfo{} +} + +// HeightValsetUpdateID represents a mapping internal to the consumer CCV module +// which links a block height to each recv valset update id. +type HeightToValsetUpdateID struct { + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + ValsetUpdateId uint64 `protobuf:"varint,2,opt,name=valset_update_id,json=valsetUpdateId,proto3" json:"valset_update_id,omitempty"` +} + +func (m *HeightToValsetUpdateID) Reset() { *m = HeightToValsetUpdateID{} } +func (m *HeightToValsetUpdateID) String() string { return proto.CompactTextString(m) } +func (*HeightToValsetUpdateID) ProtoMessage() {} +func (*HeightToValsetUpdateID) Descriptor() ([]byte, []int) { + return fileDescriptor_2db73a6057a27482, []int{1} +} +func (m *HeightToValsetUpdateID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeightToValsetUpdateID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeightToValsetUpdateID.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 *HeightToValsetUpdateID) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeightToValsetUpdateID.Merge(m, src) +} +func (m *HeightToValsetUpdateID) XXX_Size() int { + return m.Size() +} +func (m *HeightToValsetUpdateID) XXX_DiscardUnknown() { + xxx_messageInfo_HeightToValsetUpdateID.DiscardUnknown(m) +} + +var xxx_messageInfo_HeightToValsetUpdateID proto.InternalMessageInfo + +func (m *HeightToValsetUpdateID) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *HeightToValsetUpdateID) GetValsetUpdateId() uint64 { + if m != nil { + return m.ValsetUpdateId + } + return 0 +} + +// OutstandingDowntime defines the type used internally to the consumer CCV +// module and is used in order to not send multiple slashing requests for +// the same downtime infraction. +type OutstandingDowntime struct { + ValidatorConsensusAddress string `protobuf:"bytes,1,opt,name=validator_consensus_address,json=validatorConsensusAddress,proto3" json:"validator_consensus_address,omitempty"` +} + +func (m *OutstandingDowntime) Reset() { *m = OutstandingDowntime{} } +func (m *OutstandingDowntime) String() string { return proto.CompactTextString(m) } +func (*OutstandingDowntime) ProtoMessage() {} +func (*OutstandingDowntime) Descriptor() ([]byte, []int) { + return fileDescriptor_2db73a6057a27482, []int{2} +} +func (m *OutstandingDowntime) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OutstandingDowntime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OutstandingDowntime.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 *OutstandingDowntime) XXX_Merge(src proto.Message) { + xxx_messageInfo_OutstandingDowntime.Merge(m, src) +} +func (m *OutstandingDowntime) XXX_Size() int { + return m.Size() +} +func (m *OutstandingDowntime) XXX_DiscardUnknown() { + xxx_messageInfo_OutstandingDowntime.DiscardUnknown(m) +} + +var xxx_messageInfo_OutstandingDowntime proto.InternalMessageInfo + +func (m *OutstandingDowntime) GetValidatorConsensusAddress() string { + if m != nil { + return m.ValidatorConsensusAddress + } + return "" +} + +// LastTransmissionBlockHeight is the last time validator holding +// pools were transmitted to the provider chain. This type is used internally +// to the consumer CCV modul. +type LastTransmissionBlockHeight struct { + Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +} + +func (m *LastTransmissionBlockHeight) Reset() { *m = LastTransmissionBlockHeight{} } +func (m *LastTransmissionBlockHeight) String() string { return proto.CompactTextString(m) } +func (*LastTransmissionBlockHeight) ProtoMessage() {} +func (*LastTransmissionBlockHeight) Descriptor() ([]byte, []int) { + return fileDescriptor_2db73a6057a27482, []int{3} +} +func (m *LastTransmissionBlockHeight) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LastTransmissionBlockHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LastTransmissionBlockHeight.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 *LastTransmissionBlockHeight) XXX_Merge(src proto.Message) { + xxx_messageInfo_LastTransmissionBlockHeight.Merge(m, src) +} +func (m *LastTransmissionBlockHeight) XXX_Size() int { + return m.Size() +} +func (m *LastTransmissionBlockHeight) XXX_DiscardUnknown() { + xxx_messageInfo_LastTransmissionBlockHeight.DiscardUnknown(m) +} + +var xxx_messageInfo_LastTransmissionBlockHeight proto.InternalMessageInfo + +func (m *LastTransmissionBlockHeight) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + +// MaturingVSCPacket represents a vsc packet that is maturing internal to the +// consumer CCV module, where the consumer has not yet relayed a VSCMatured +// packet back to the provider. +type MaturingVSCPacket struct { + VscId uint64 `protobuf:"varint,1,opt,name=vscId,proto3" json:"vscId,omitempty"` + MaturityTime time.Time `protobuf:"bytes,2,opt,name=maturity_time,json=maturityTime,proto3,stdtime" json:"maturity_time"` +} + +func (m *MaturingVSCPacket) Reset() { *m = MaturingVSCPacket{} } +func (m *MaturingVSCPacket) String() string { return proto.CompactTextString(m) } +func (*MaturingVSCPacket) ProtoMessage() {} +func (*MaturingVSCPacket) Descriptor() ([]byte, []int) { + return fileDescriptor_2db73a6057a27482, []int{4} +} +func (m *MaturingVSCPacket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MaturingVSCPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MaturingVSCPacket.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 *MaturingVSCPacket) XXX_Merge(src proto.Message) { + xxx_messageInfo_MaturingVSCPacket.Merge(m, src) +} +func (m *MaturingVSCPacket) XXX_Size() int { + return m.Size() +} +func (m *MaturingVSCPacket) XXX_DiscardUnknown() { + xxx_messageInfo_MaturingVSCPacket.DiscardUnknown(m) +} + +var xxx_messageInfo_MaturingVSCPacket proto.InternalMessageInfo + +func (m *MaturingVSCPacket) GetVscId() uint64 { + if m != nil { + return m.VscId + } + return 0 +} + +func (m *MaturingVSCPacket) GetMaturityTime() time.Time { + if m != nil { + return m.MaturityTime + } + return time.Time{} +} + +// ConsumerPacketDataList is a list of consumer packet data packets. +// +// Note this type is used internally to the consumer CCV module +// for exporting / importing state in InitGenesis and ExportGenesis. +type ConsumerPacketDataList struct { + List []types.ConsumerPacketData `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` +} + +func (m *ConsumerPacketDataList) Reset() { *m = ConsumerPacketDataList{} } +func (m *ConsumerPacketDataList) String() string { return proto.CompactTextString(m) } +func (*ConsumerPacketDataList) ProtoMessage() {} +func (*ConsumerPacketDataList) Descriptor() ([]byte, []int) { + return fileDescriptor_2db73a6057a27482, []int{5} +} +func (m *ConsumerPacketDataList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsumerPacketDataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsumerPacketDataList.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 *ConsumerPacketDataList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsumerPacketDataList.Merge(m, src) +} +func (m *ConsumerPacketDataList) XXX_Size() int { + return m.Size() +} +func (m *ConsumerPacketDataList) XXX_DiscardUnknown() { + xxx_messageInfo_ConsumerPacketDataList.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsumerPacketDataList proto.InternalMessageInfo + +func (m *ConsumerPacketDataList) GetList() []types.ConsumerPacketData { + if m != nil { + return m.List + } + return nil +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "interchain_security.ccv.consumer.v1.GenesisState") + proto.RegisterType((*HeightToValsetUpdateID)(nil), "interchain_security.ccv.consumer.v1.HeightToValsetUpdateID") + proto.RegisterType((*OutstandingDowntime)(nil), "interchain_security.ccv.consumer.v1.OutstandingDowntime") + proto.RegisterType((*LastTransmissionBlockHeight)(nil), "interchain_security.ccv.consumer.v1.LastTransmissionBlockHeight") + proto.RegisterType((*MaturingVSCPacket)(nil), "interchain_security.ccv.consumer.v1.MaturingVSCPacket") + proto.RegisterType((*ConsumerPacketDataList)(nil), "interchain_security.ccv.consumer.v1.ConsumerPacketDataList") +} + +func init() { + proto.RegisterFile("interchain_security/ccv/consumer/v1/genesis.proto", fileDescriptor_2db73a6057a27482) +} + +var fileDescriptor_2db73a6057a27482 = []byte{ + // 912 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xcf, 0x6f, 0x23, 0x35, + 0x14, 0xee, 0xb4, 0xdd, 0x90, 0xb8, 0xed, 0x6e, 0xd7, 0x5d, 0xa2, 0xa1, 0x11, 0x69, 0x14, 0x84, + 0x14, 0xf1, 0xc3, 0x43, 0xba, 0x02, 0x21, 0x21, 0x10, 0x24, 0x95, 0x68, 0x50, 0x11, 0x55, 0xda, + 0x0d, 0xd2, 0x5e, 0x46, 0x8e, 0xc7, 0x3b, 0xb1, 0x76, 0xc6, 0x1e, 0x8d, 0x9d, 0x09, 0x15, 0xe2, + 0xc2, 0x95, 0xcb, 0xfe, 0x59, 0x7b, 0xdc, 0x03, 0x07, 0x4e, 0x80, 0xda, 0x7f, 0x04, 0xd9, 0xe3, + 0x99, 0x24, 0x34, 0xed, 0xe6, 0x16, 0xcf, 0x7b, 0xef, 0xfb, 0xde, 0xfb, 0xde, 0x7b, 0x76, 0x40, + 0x97, 0x71, 0x45, 0x53, 0x32, 0xc1, 0x8c, 0xfb, 0x92, 0x92, 0x69, 0xca, 0xd4, 0x95, 0x47, 0x48, + 0xe6, 0x11, 0xc1, 0xe5, 0x34, 0xa6, 0xa9, 0x97, 0x75, 0xbd, 0x90, 0x72, 0x2a, 0x99, 0x44, 0x49, + 0x2a, 0x94, 0x80, 0x1f, 0xac, 0x08, 0x41, 0x84, 0x64, 0xa8, 0x08, 0x41, 0x59, 0xf7, 0xf0, 0xb3, + 0xbb, 0x70, 0xb3, 0xae, 0x27, 0x27, 0x38, 0xa5, 0x81, 0x5f, 0xba, 0x1b, 0xd8, 0x43, 0x8f, 0x8d, + 0x89, 0x17, 0xb1, 0x70, 0xa2, 0x48, 0xc4, 0x28, 0x57, 0xd2, 0x53, 0x94, 0x07, 0x34, 0x8d, 0x19, + 0x57, 0x3a, 0x6a, 0x7e, 0xb2, 0x01, 0x4f, 0x42, 0x11, 0x0a, 0xf3, 0xd3, 0xd3, 0xbf, 0xec, 0xd7, + 0x0f, 0xef, 0x21, 0x9e, 0xb1, 0x94, 0x5a, 0xb7, 0xa3, 0x50, 0x88, 0x30, 0xa2, 0x9e, 0x39, 0x8d, + 0xa7, 0x2f, 0x3c, 0xc5, 0x62, 0x2a, 0x15, 0x8e, 0x13, 0xeb, 0xd0, 0x58, 0x60, 0xc7, 0x63, 0xc2, + 0x3c, 0x75, 0x95, 0x50, 0x2b, 0x41, 0xfb, 0xcf, 0x1a, 0xd8, 0xfd, 0x3e, 0x17, 0xe5, 0x42, 0x61, + 0x45, 0xe1, 0x29, 0xa8, 0x24, 0x38, 0xc5, 0xb1, 0x74, 0x9d, 0x96, 0xd3, 0xd9, 0x39, 0xfe, 0x08, + 0xdd, 0x25, 0x52, 0xd6, 0x45, 0x7d, 0x5b, 0xf8, 0xb9, 0x89, 0xe8, 0x6d, 0xbf, 0xfe, 0xfb, 0x68, + 0x63, 0x68, 0xe3, 0xe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xab, 0x86, 0xa7, 0xb5, 0x98, 0xbc, 0x1e, + 0x24, 0x34, 0xc2, 0x11, 0x0b, 0xb0, 0x12, 0xe9, 0xb3, 0x24, 0xd0, 0xf9, 0x57, 0x34, 0xa2, 0xeb, + 0x0c, 0xf7, 0x2c, 0xc0, 0x08, 0x47, 0x17, 0x54, 0xc1, 0xdf, 0xc0, 0xe1, 0x84, 0x6a, 0x11, 0x7c, + 0x25, 0x34, 0xa6, 0xa4, 0xca, 0x9f, 0x9a, 0x08, 0xdd, 0xe1, 0x9a, 0x01, 0xff, 0x6a, 0xad, 0x22, + 0x4e, 0x0d, 0xcc, 0xa5, 0x18, 0x19, 0x90, 0x9c, 0x75, 0x70, 0x62, 0x2b, 0xa9, 0x4f, 0x56, 0x59, + 0x03, 0xf8, 0xbb, 0x03, 0xde, 0x17, 0x53, 0x25, 0x15, 0xe6, 0x81, 0x56, 0x2f, 0x10, 0x33, 0xae, + 0x77, 0xc4, 0x97, 0x11, 0x96, 0x13, 0xc6, 0x43, 0x17, 0x98, 0x14, 0xbe, 0x5c, 0x2b, 0x85, 0x9f, + 0xe6, 0x48, 0x27, 0x16, 0xc8, 0xf2, 0x37, 0xc4, 0x6d, 0xd3, 0x85, 0xa5, 0x80, 0xbf, 0x02, 0x37, + 0xa1, 0x39, 0x7f, 0x81, 0x56, 0xb6, 0x71, 0xc7, 0x0c, 0xcb, 0x7a, 0x0a, 0xcc, 0x37, 0x4e, 0xc7, + 0x9e, 0x60, 0x85, 0xcf, 0x98, 0x2c, 0x7a, 0x59, 0xb7, 0x14, 0xcb, 0x4e, 0x12, 0xfe, 0xe1, 0x80, + 0x66, 0x84, 0xa5, 0xf2, 0x55, 0x8a, 0xb9, 0x8c, 0x99, 0x94, 0x4c, 0x70, 0x7f, 0x1c, 0x09, 0xf2, + 0xd2, 0xcf, 0x45, 0x73, 0x77, 0x4d, 0x0e, 0xdf, 0xae, 0x95, 0xc3, 0x19, 0x96, 0xea, 0x72, 0x01, + 0xa9, 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76, 0xc4, 0xa4, 0xce, 0x72, 0x2b, 0xbf, 0x01, 0xd7, 0x79, 0x3d, + 0x0a, 0x04, 0xdb, 0x47, 0x83, 0xd0, 0xfb, 0xf9, 0xf5, 0x75, 0xd3, 0x79, 0x73, 0xdd, 0x74, 0xfe, + 0xbd, 0x6e, 0x3a, 0xaf, 0x6e, 0x9a, 0x1b, 0x6f, 0x6e, 0x9a, 0x1b, 0x7f, 0xdd, 0x34, 0x37, 0x9e, + 0x7f, 0x1d, 0x32, 0x35, 0x99, 0x8e, 0x11, 0x11, 0xb1, 0x47, 0x84, 0x8c, 0x85, 0xf4, 0xe6, 0x34, + 0x9f, 0x96, 0x6f, 0x65, 0xf6, 0xd4, 0xfb, 0x65, 0xf9, 0x1f, 0x80, 0x79, 0xf9, 0xc6, 0x15, 0x53, + 0xe8, 0xd3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x08, 0x63, 0x8d, 0x32, 0x08, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Provider.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + if m.PreCCV { + i-- + if m.PreCCV { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x68 + } + { + size, err := m.LastTransmissionBlockHeight.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size, err := m.PendingConsumerPackets.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + if len(m.OutstandingDowntimeSlashing) > 0 { + for iNdEx := len(m.OutstandingDowntimeSlashing) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OutstandingDowntimeSlashing[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.HeightToValsetUpdateId) > 0 { + for iNdEx := len(m.HeightToValsetUpdateId) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.HeightToValsetUpdateId[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.InitialValSet) > 0 { + for iNdEx := len(m.InitialValSet) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.InitialValSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.MaturingPackets) > 0 { + for iNdEx := len(m.MaturingPackets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.MaturingPackets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if m.ProviderConsensusState != nil { + { + size, err := m.ProviderConsensusState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.ProviderClientState != nil { + { + size, err := m.ProviderClientState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.NewChain { + i-- + if m.NewChain { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.ProviderChannelId) > 0 { + i -= len(m.ProviderChannelId) + copy(dAtA[i:], m.ProviderChannelId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ProviderChannelId))) + i-- + dAtA[i] = 0x1a + } + if len(m.ProviderClientId) > 0 { + i -= len(m.ProviderClientId) + copy(dAtA[i:], m.ProviderClientId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ProviderClientId))) + i-- + dAtA[i] = 0x12 + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *HeightToValsetUpdateID) 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 *HeightToValsetUpdateID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HeightToValsetUpdateID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ValsetUpdateId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.ValsetUpdateId)) + i-- + dAtA[i] = 0x10 + } + if m.Height != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *OutstandingDowntime) 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 *OutstandingDowntime) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OutstandingDowntime) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ValidatorConsensusAddress) > 0 { + i -= len(m.ValidatorConsensusAddress) + copy(dAtA[i:], m.ValidatorConsensusAddress) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ValidatorConsensusAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *LastTransmissionBlockHeight) 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 *LastTransmissionBlockHeight) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LastTransmissionBlockHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MaturingVSCPacket) 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 *MaturingVSCPacket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MaturingVSCPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.MaturityTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.MaturityTime):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintGenesis(dAtA, i, uint64(n7)) + i-- + dAtA[i] = 0x12 + if m.VscId != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.VscId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ConsumerPacketDataList) 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 *ConsumerPacketDataList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsumerPacketDataList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.List) > 0 { + for iNdEx := len(m.List) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.List[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = len(m.ProviderClientId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.ProviderChannelId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.NewChain { + n += 2 + } + if m.ProviderClientState != nil { + l = m.ProviderClientState.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if m.ProviderConsensusState != nil { + l = m.ProviderConsensusState.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.MaturingPackets) > 0 { + for _, e := range m.MaturingPackets { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.InitialValSet) > 0 { + for _, e := range m.InitialValSet { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.HeightToValsetUpdateId) > 0 { + for _, e := range m.HeightToValsetUpdateId { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.OutstandingDowntimeSlashing) > 0 { + for _, e := range m.OutstandingDowntimeSlashing { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + l = m.PendingConsumerPackets.Size() + n += 1 + l + sovGenesis(uint64(l)) + l = m.LastTransmissionBlockHeight.Size() + n += 1 + l + sovGenesis(uint64(l)) + if m.PreCCV { + n += 2 + } + l = m.Provider.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *HeightToValsetUpdateID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovGenesis(uint64(m.Height)) + } + if m.ValsetUpdateId != 0 { + n += 1 + sovGenesis(uint64(m.ValsetUpdateId)) + } + return n +} + +func (m *OutstandingDowntime) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorConsensusAddress) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *LastTransmissionBlockHeight) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovGenesis(uint64(m.Height)) + } + return n +} + +func (m *MaturingVSCPacket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.VscId != 0 { + n += 1 + sovGenesis(uint64(m.VscId)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.MaturityTime) + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *ConsumerPacketDataList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.List) > 0 { + for _, e := range m.List { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderClientId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProviderClientId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderChannelId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProviderChannelId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NewChain", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.NewChain = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderClientState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProviderClientState == nil { + m.ProviderClientState = &_07_tendermint.ClientState{} + } + if err := m.ProviderClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderConsensusState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProviderConsensusState == nil { + m.ProviderConsensusState = &_07_tendermint.ConsensusState{} + } + if err := m.ProviderConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaturingPackets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaturingPackets = append(m.MaturingPackets, MaturingVSCPacket{}) + if err := m.MaturingPackets[len(m.MaturingPackets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InitialValSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InitialValSet = append(m.InitialValSet, types1.ValidatorUpdate{}) + if err := m.InitialValSet[len(m.InitialValSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightToValsetUpdateId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HeightToValsetUpdateId = append(m.HeightToValsetUpdateId, HeightToValsetUpdateID{}) + if err := m.HeightToValsetUpdateId[len(m.HeightToValsetUpdateId)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutstandingDowntimeSlashing", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OutstandingDowntimeSlashing = append(m.OutstandingDowntimeSlashing, OutstandingDowntime{}) + if err := m.OutstandingDowntimeSlashing[len(m.OutstandingDowntimeSlashing)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingConsumerPackets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PendingConsumerPackets.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransmissionBlockHeight", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransmissionBlockHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PreCCV", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.PreCCV = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Provider.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HeightToValsetUpdateID) 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 ErrIntOverflowGenesis + } + 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: HeightToValsetUpdateID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HeightToValsetUpdateID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValsetUpdateId", wireType) + } + m.ValsetUpdateId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValsetUpdateId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OutstandingDowntime) 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 ErrIntOverflowGenesis + } + 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: OutstandingDowntime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OutstandingDowntime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorConsensusAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorConsensusAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LastTransmissionBlockHeight) 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 ErrIntOverflowGenesis + } + 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: LastTransmissionBlockHeight: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LastTransmissionBlockHeight: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MaturingVSCPacket) 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 ErrIntOverflowGenesis + } + 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: MaturingVSCPacket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MaturingVSCPacket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VscId", wireType) + } + m.VscId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VscId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaturityTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.MaturityTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConsumerPacketDataList) 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 ErrIntOverflowGenesis + } + 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: ConsumerPacketDataList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsumerPacketDataList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field List", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.List = append(m.List, types.ConsumerPacketData{}) + if err := m.List[len(m.List)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ccv/consumer/types/genesis_test.go b/x/ccv/consumer/types/genesis_test.go index f3a13e7070..d8a8296762 100644 --- a/x/ccv/consumer/types/genesis_test.go +++ b/x/ccv/consumer/types/genesis_test.go @@ -16,7 +16,8 @@ import ( tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/interchain-security/v3/testutil/crypto" - types "github.com/cosmos/interchain-security/v3/x/ccv/types" + "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) const ( @@ -47,52 +48,54 @@ func TestValidateInitialGenesisState(t *testing.T) { cs := ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath) consensusState := ibctmtypes.NewConsensusState(time.Now(), commitmenttypes.NewMerkleRoot([]byte("apphash")), valHash) - params := types.DefaultParams() + params := ccv.DefaultParams() params.Enabled = true cases := []struct { name string - gs *types.ConsumerGenesisState + gs *types.GenesisState expError bool }{ { "valid new consumer genesis state", - types.NewInitialConsumerGenesisState(cs, consensusState, valUpdates, params), + types.NewInitialGenesisState(cs, consensusState, valUpdates, params), false, }, { "invalid new consumer genesis state: nil client state", - types.NewInitialConsumerGenesisState(nil, consensusState, valUpdates, params), + types.NewInitialGenesisState(nil, consensusState, valUpdates, params), true, }, { "invalid new consumer genesis state: invalid client state", - types.NewInitialConsumerGenesisState(&ibctmtypes.ClientState{ChainId: "badClientState"}, + types.NewInitialGenesisState(&ibctmtypes.ClientState{ChainId: "badClientState"}, consensusState, valUpdates, params), true, }, { "invalid new consumer genesis state: nil consensus state", - types.NewInitialConsumerGenesisState(cs, nil, valUpdates, params), + types.NewInitialGenesisState(cs, nil, valUpdates, params), true, }, { "invalid new consumer genesis state: invalid consensus state", - types.NewInitialConsumerGenesisState(cs, &ibctmtypes.ConsensusState{Timestamp: time.Now()}, + types.NewInitialGenesisState(cs, &ibctmtypes.ConsensusState{Timestamp: time.Now()}, valUpdates, params), true, }, { "invalid new consumer genesis state: client id not empty", - &types.ConsumerGenesisState{ - Params: params, - ProviderClientId: "ccvclient", - ProviderChannelId: "", - NewChain: true, - ProviderClientState: cs, - ProviderConsensusState: consensusState, + &types.GenesisState{ + Params: params, + ProviderClientId: "ccvclient", + ProviderChannelId: "", + NewChain: true, + Provider: ccv.ProviderInfo{ + ClientState: cs, + ConsensusState: consensusState, + InitialValSet: valUpdates, + }, MaturingPackets: nil, - InitialValSet: valUpdates, HeightToValsetUpdateId: nil, OutstandingDowntimeSlashing: nil, PendingConsumerPackets: types.ConsumerPacketDataList{}, @@ -103,15 +106,17 @@ func TestValidateInitialGenesisState(t *testing.T) { }, { "invalid new consumer genesis state: channel id not empty", - &types.ConsumerGenesisState{ - Params: params, - ProviderClientId: "", - ProviderChannelId: "ccvchannel", - NewChain: true, - ProviderClientState: cs, - ProviderConsensusState: consensusState, + &types.GenesisState{ + Params: params, + ProviderClientId: "", + ProviderChannelId: "ccvchannel", + NewChain: true, + Provider: ccv.ProviderInfo{ + ClientState: cs, + ConsensusState: consensusState, + InitialValSet: valUpdates, + }, MaturingPackets: nil, - InitialValSet: valUpdates, HeightToValsetUpdateId: nil, OutstandingDowntimeSlashing: nil, PendingConsumerPackets: types.ConsumerPacketDataList{}, @@ -122,15 +127,17 @@ func TestValidateInitialGenesisState(t *testing.T) { }, { "invalid new consumer genesis state: non-empty unbonding sequences", - &types.ConsumerGenesisState{ - Params: params, - ProviderClientId: "", - ProviderChannelId: "", - NewChain: true, - ProviderClientState: cs, - ProviderConsensusState: consensusState, + &types.GenesisState{ + Params: params, + ProviderClientId: "", + ProviderChannelId: "", + NewChain: true, + Provider: ccv.ProviderInfo{ + ClientState: cs, + ConsensusState: consensusState, + InitialValSet: valUpdates, + }, MaturingPackets: []types.MaturingVSCPacket{{}}, - InitialValSet: valUpdates, HeightToValsetUpdateId: nil, OutstandingDowntimeSlashing: nil, PendingConsumerPackets: types.ConsumerPacketDataList{}, @@ -141,15 +148,17 @@ func TestValidateInitialGenesisState(t *testing.T) { }, { "invalid new consumer genesis state: non-empty last transmission packet", - &types.ConsumerGenesisState{ - Params: params, - ProviderClientId: "", - ProviderChannelId: "", - NewChain: true, - ProviderClientState: cs, - ProviderConsensusState: consensusState, + &types.GenesisState{ + Params: params, + ProviderClientId: "", + ProviderChannelId: "", + NewChain: true, + Provider: ccv.ProviderInfo{ + ClientState: cs, + ConsensusState: consensusState, + InitialValSet: valUpdates, + }, MaturingPackets: nil, - InitialValSet: valUpdates, HeightToValsetUpdateId: nil, OutstandingDowntimeSlashing: nil, PendingConsumerPackets: types.ConsumerPacketDataList{}, @@ -160,18 +169,20 @@ func TestValidateInitialGenesisState(t *testing.T) { }, { "invalid new consumer genesis state: non-empty pending consumer packets", - &types.ConsumerGenesisState{ - Params: params, - ProviderClientId: "", - ProviderChannelId: "", - NewChain: true, - ProviderClientState: cs, - ProviderConsensusState: consensusState, + &types.GenesisState{ + Params: params, + ProviderClientId: "", + ProviderChannelId: "", + NewChain: true, + Provider: ccv.ProviderInfo{ + ClientState: cs, + ConsensusState: consensusState, + InitialValSet: valUpdates, + }, MaturingPackets: nil, - InitialValSet: valUpdates, HeightToValsetUpdateId: nil, OutstandingDowntimeSlashing: nil, - PendingConsumerPackets: types.ConsumerPacketDataList{List: []types.ConsumerPacketData{{}}}, + PendingConsumerPackets: types.ConsumerPacketDataList{List: []ccv.ConsumerPacketData{{}}}, LastTransmissionBlockHeight: types.LastTransmissionBlockHeight{}, PreCCV: false, }, @@ -179,12 +190,12 @@ func TestValidateInitialGenesisState(t *testing.T) { }, { "invalid new consumer genesis state: nil initial validator set", - types.NewInitialConsumerGenesisState(cs, consensusState, nil, params), + types.NewInitialGenesisState(cs, consensusState, nil, params), true, }, { "invalid new consumer genesis state: invalid consensus state validator set hash", - types.NewInitialConsumerGenesisState( + types.NewInitialGenesisState( cs, ibctmtypes.NewConsensusState( time.Now(), commitmenttypes.NewMerkleRoot([]byte("apphash")), []byte("wrong_length_hash")), valUpdates, params), @@ -192,7 +203,7 @@ func TestValidateInitialGenesisState(t *testing.T) { }, { "invalid new consumer genesis state: initial validator set does not match validator set hash", - types.NewInitialConsumerGenesisState( + types.NewInitialGenesisState( cs, ibctmtypes.NewConsensusState( time.Now(), commitmenttypes.NewMerkleRoot([]byte("apphash")), []byte("9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08")), valUpdates, params), @@ -200,7 +211,7 @@ func TestValidateInitialGenesisState(t *testing.T) { }, { "invalid new consumer genesis state: initial validator set does not match validator set hash", - types.NewInitialConsumerGenesisState( + types.NewInitialGenesisState( cs, ibctmtypes.NewConsensusState( time.Now(), commitmenttypes.NewMerkleRoot([]byte("apphash")), []byte("9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08")), valUpdates, params), @@ -208,41 +219,41 @@ func TestValidateInitialGenesisState(t *testing.T) { }, { "invalid new consumer genesis state: invalid params - ccvTimeoutPeriod", - types.NewInitialConsumerGenesisState(cs, consensusState, valUpdates, - types.NewParams( + types.NewInitialGenesisState(cs, consensusState, valUpdates, + ccv.NewParams( true, - types.DefaultBlocksPerDistributionTransmission, + ccv.DefaultBlocksPerDistributionTransmission, "", "", 0, // CCV timeout period cannot be 0 - types.DefaultTransferTimeoutPeriod, - types.DefaultConsumerRedistributeFrac, - types.DefaultHistoricalEntries, - types.DefaultConsumerUnbondingPeriod, - types.DefaultSoftOptOutThreshold, + ccv.DefaultTransferTimeoutPeriod, + ccv.DefaultConsumerRedistributeFrac, + ccv.DefaultHistoricalEntries, + ccv.DefaultConsumerUnbondingPeriod, + ccv.DefaultSoftOptOutThreshold, []string{}, []string{}, - types.DefaultRetryDelayPeriod, + ccv.DefaultRetryDelayPeriod, )), true, }, { "invalid new consumer genesis state: invalid params - distributionTransmissionChannel", - types.NewInitialConsumerGenesisState(cs, consensusState, valUpdates, - types.NewParams( + types.NewInitialGenesisState(cs, consensusState, valUpdates, + ccv.NewParams( true, - types.DefaultBlocksPerDistributionTransmission, + ccv.DefaultBlocksPerDistributionTransmission, "badchannel/", "", - types.DefaultCCVTimeoutPeriod, - types.DefaultTransferTimeoutPeriod, - types.DefaultConsumerRedistributeFrac, - types.DefaultHistoricalEntries, - types.DefaultConsumerUnbondingPeriod, - types.DefaultSoftOptOutThreshold, + ccv.DefaultCCVTimeoutPeriod, + ccv.DefaultTransferTimeoutPeriod, + ccv.DefaultConsumerRedistributeFrac, + ccv.DefaultHistoricalEntries, + ccv.DefaultConsumerUnbondingPeriod, + ccv.DefaultSoftOptOutThreshold, []string{}, []string{}, - types.DefaultRetryDelayPeriod, + ccv.DefaultRetryDelayPeriod, )), true, }, @@ -271,17 +282,17 @@ func TestValidateRestartConsumerGenesisState(t *testing.T) { valHash := valSet.Hash() valUpdates := tmtypes.TM2PB.ValidatorUpdates(valSet) - matConsumerPacket := types.ConsumerPacketData{ - Type: types.VscMaturedPacket, - Data: &types.ConsumerPacketData_VscMaturedPacketData{ - VscMaturedPacketData: types.NewVSCMaturedPacketData(1), + matConsumerPacket := ccv.ConsumerPacketData{ + Type: ccv.VscMaturedPacket, + Data: &ccv.ConsumerPacketData_VscMaturedPacketData{ + VscMaturedPacketData: ccv.NewVSCMaturedPacketData(1), }, } - slashConsumerPacket := types.ConsumerPacketData{ - Type: types.SlashPacket, - Data: &types.ConsumerPacketData_SlashPacketData{ - SlashPacketData: types.NewSlashPacketData( + slashConsumerPacket := ccv.ConsumerPacketData{ + Type: ccv.SlashPacket, + Data: &ccv.ConsumerPacketData_SlashPacketData{ + SlashPacketData: ccv.NewSlashPacketData( abci.Validator{Address: pubKey.Address(), Power: int64(1)}, 1, stakingtypes.Infraction_INFRACTION_DOWNTIME), @@ -296,30 +307,30 @@ func TestValidateRestartConsumerGenesisState(t *testing.T) { cs := ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath) consensusState := ibctmtypes.NewConsensusState(time.Now(), commitmenttypes.NewMerkleRoot([]byte("apphash")), valHash) - params := types.DefaultParams() + params := ccv.DefaultParams() params.Enabled = true cases := []struct { name string - gs *types.ConsumerGenesisState + gs *types.GenesisState expError bool }{ { "valid restart consumer genesis state: empty maturing packets", - types.NewRestartConsumerGenesisState("ccvclient", "ccvchannel", nil, valUpdates, heightToValsetUpdateID, - types.ConsumerPacketDataList{List: []types.ConsumerPacketData{matConsumerPacket, slashConsumerPacket}}, + types.NewRestartGenesisState("ccvclient", "ccvchannel", nil, valUpdates, heightToValsetUpdateID, + types.ConsumerPacketDataList{List: []ccv.ConsumerPacketData{matConsumerPacket, slashConsumerPacket}}, nil, types.LastTransmissionBlockHeight{Height: 100}, params), false, }, { "valid restart consumer genesis state: handshake in progress ", - types.NewRestartConsumerGenesisState("ccvclient", "", nil, valUpdates, heightToValsetUpdateID, - types.ConsumerPacketDataList{List: []types.ConsumerPacketData{slashConsumerPacket}}, nil, types.LastTransmissionBlockHeight{}, params), + types.NewRestartGenesisState("ccvclient", "", nil, valUpdates, heightToValsetUpdateID, + types.ConsumerPacketDataList{List: []ccv.ConsumerPacketData{slashConsumerPacket}}, nil, types.LastTransmissionBlockHeight{}, params), false, }, { "valid restart consumer genesis state: maturing packets", - types.NewRestartConsumerGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ + types.NewRestartGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ {VscId: 1, MaturityTime: time.Now().UTC()}, {VscId: 3, MaturityTime: time.Now().UTC()}, {VscId: 5, MaturityTime: time.Now().UTC()}, @@ -330,34 +341,36 @@ func TestValidateRestartConsumerGenesisState(t *testing.T) { }, { "invalid restart consumer genesis state: provider id is empty", - types.NewRestartConsumerGenesisState("", "ccvchannel", nil, valUpdates, heightToValsetUpdateID, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), + types.NewRestartGenesisState("", "ccvchannel", nil, valUpdates, heightToValsetUpdateID, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), true, }, { "invalid restart consumer genesis state: maturing packet vscId is invalid", - types.NewRestartConsumerGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ + types.NewRestartGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ {VscId: 0, MaturityTime: time.Now().UTC()}, }, valUpdates, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), true, }, { "invalid restart consumer genesis state: maturing packet time is invalid", - types.NewRestartConsumerGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ + types.NewRestartGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ {VscId: 1, MaturityTime: time.Time{}}, }, valUpdates, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), true, }, { "invalid restart consumer genesis: client state defined", - &types.ConsumerGenesisState{ - Params: params, - ProviderClientId: "ccvclient", - ProviderChannelId: "ccvchannel", - NewChain: false, - ProviderClientState: cs, - ProviderConsensusState: nil, + &types.GenesisState{ + Params: params, + ProviderClientId: "ccvclient", + ProviderChannelId: "ccvchannel", + NewChain: false, + Provider: ccv.ProviderInfo{ + ClientState: cs, + ConsensusState: nil, + InitialValSet: valUpdates, + }, MaturingPackets: nil, - InitialValSet: valUpdates, HeightToValsetUpdateId: nil, OutstandingDowntimeSlashing: nil, PendingConsumerPackets: types.ConsumerPacketDataList{}, @@ -368,15 +381,17 @@ func TestValidateRestartConsumerGenesisState(t *testing.T) { }, { "invalid restart consumer genesis: consensus state defined", - &types.ConsumerGenesisState{ - Params: params, - ProviderClientId: "ccvclient", - ProviderChannelId: "ccvchannel", - NewChain: false, - ProviderClientState: nil, - ProviderConsensusState: consensusState, + &types.GenesisState{ + Params: params, + ProviderClientId: "ccvclient", + ProviderChannelId: "ccvchannel", + NewChain: false, + Provider: ccv.ProviderInfo{ + ClientState: nil, + ConsensusState: consensusState, + InitialValSet: valUpdates, + }, MaturingPackets: nil, - InitialValSet: valUpdates, HeightToValsetUpdateId: nil, OutstandingDowntimeSlashing: nil, PendingConsumerPackets: types.ConsumerPacketDataList{}, @@ -387,42 +402,42 @@ func TestValidateRestartConsumerGenesisState(t *testing.T) { }, { "invalid restart consumer genesis state: nil initial validator set", - types.NewRestartConsumerGenesisState("ccvclient", "ccvchannel", nil, nil, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), + types.NewRestartGenesisState("ccvclient", "ccvchannel", nil, nil, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), true, }, { "invalid restart consumer genesis state: nil height to validator set id mapping", - types.NewRestartConsumerGenesisState("ccvclient", "", + types.NewRestartGenesisState("ccvclient", "", []types.MaturingVSCPacket{{VscId: 1, MaturityTime: time.Time{}}}, valUpdates, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), true, }, { "invalid restart consumer genesis state: maturing packet defined when handshake is still in progress", - types.NewRestartConsumerGenesisState("ccvclient", "", + types.NewRestartGenesisState("ccvclient", "", []types.MaturingVSCPacket{{VscId: 1, MaturityTime: time.Time{}}}, valUpdates, heightToValsetUpdateID, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), true, }, { "invalid restart consumer genesis state: outstanding downtime defined when handshake is still in progress", - types.NewRestartConsumerGenesisState("ccvclient", "", + types.NewRestartGenesisState("ccvclient", "", nil, valUpdates, heightToValsetUpdateID, types.ConsumerPacketDataList{}, []types.OutstandingDowntime{{ValidatorConsensusAddress: "cosmosvalconsxxx"}}, types.LastTransmissionBlockHeight{}, params), true, }, { "invalid restart consumer genesis state: last transmission block height defined when handshake is still in progress", - types.NewRestartConsumerGenesisState("ccvclient", "", + types.NewRestartGenesisState("ccvclient", "", nil, valUpdates, heightToValsetUpdateID, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{Height: int64(1)}, params), true, }, { "invalid restart consumer genesis state: pending maturing packets defined when handshake is still in progress", - types.NewRestartConsumerGenesisState("ccvclient", "", + types.NewRestartGenesisState("ccvclient", "", nil, valUpdates, heightToValsetUpdateID, types.ConsumerPacketDataList{ - List: []types.ConsumerPacketData{ + List: []ccv.ConsumerPacketData{ { - Type: types.VscMaturedPacket, - Data: &types.ConsumerPacketData_VscMaturedPacketData{VscMaturedPacketData: types.NewVSCMaturedPacketData(1)}, + Type: ccv.VscMaturedPacket, + Data: &ccv.ConsumerPacketData_VscMaturedPacketData{VscMaturedPacketData: ccv.NewVSCMaturedPacketData(1)}, }, }, }, nil, types.LastTransmissionBlockHeight{Height: int64(1)}, params), @@ -430,21 +445,21 @@ func TestValidateRestartConsumerGenesisState(t *testing.T) { }, { "invalid restart consumer genesis state: invalid params", - types.NewRestartConsumerGenesisState("ccvclient", "ccvchannel", nil, valUpdates, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, - types.NewParams( + types.NewRestartGenesisState("ccvclient", "ccvchannel", nil, valUpdates, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, + ccv.NewParams( true, - types.DefaultBlocksPerDistributionTransmission, + ccv.DefaultBlocksPerDistributionTransmission, "", "", 0, // CCV timeout period cannot be 0 - types.DefaultTransferTimeoutPeriod, - types.DefaultConsumerRedistributeFrac, - types.DefaultHistoricalEntries, - types.DefaultConsumerUnbondingPeriod, - types.DefaultSoftOptOutThreshold, + ccv.DefaultTransferTimeoutPeriod, + ccv.DefaultConsumerRedistributeFrac, + ccv.DefaultHistoricalEntries, + ccv.DefaultConsumerUnbondingPeriod, + ccv.DefaultSoftOptOutThreshold, []string{}, []string{}, - types.DefaultRetryDelayPeriod, + ccv.DefaultRetryDelayPeriod, )), true, }, diff --git a/x/ccv/provider/keeper/proposal_test.go b/x/ccv/provider/keeper/proposal_test.go index 0992b14553..568b2c30e0 100644 --- a/x/ccv/provider/keeper/proposal_test.go +++ b/x/ccv/provider/keeper/proposal_test.go @@ -818,72 +818,73 @@ func TestMakeConsumerGenesis(t *testing.T) { "retry_delay_period": 3600000000000 }, "new_chain": true, - "provider_client_state": { - "chain_id": "testchain1", - "trust_level": { - "numerator": 1, - "denominator": 3 - }, - "trusting_period": 1197504000000000, - "unbonding_period": 1814400000000000, - "max_clock_drift": 10000000000, - "frozen_height": {}, - "latest_height": { - "revision_height": 5 - }, - "proof_specs": [ - { - "leaf_spec": { - "hash": 1, - "prehash_value": 1, - "length": 1, - "prefix": "AA==" + "provider" : { + "client_state": { + "chain_id": "testchain1", + "trust_level": { + "numerator": 1, + "denominator": 3 + }, + "trusting_period": 1197504000000000, + "unbonding_period": 1814400000000000, + "max_clock_drift": 10000000000, + "frozen_height": {}, + "latest_height": { + "revision_height": 5 + }, + "proof_specs": [ + { + "leaf_spec": { + "hash": 1, + "prehash_value": 1, + "length": 1, + "prefix": "AA==" + }, + "inner_spec": { + "child_order": [0, 1], + "child_size": 33, + "min_prefix_length": 4, + "max_prefix_length": 12, + "hash": 1 + } }, - "inner_spec": { - "child_order": [0, 1], - "child_size": 33, - "min_prefix_length": 4, - "max_prefix_length": 12, - "hash": 1 + { + "leaf_spec": { + "hash": 1, + "prehash_value": 1, + "length": 1, + "prefix": "AA==" + }, + "inner_spec": { + "child_order": [0, 1], + "child_size": 32, + "min_prefix_length": 1, + "max_prefix_length": 1, + "hash": 1 + } } + ], + "upgrade_path": ["upgrade", "upgradedIBCState"], + "allow_update_after_expiry": true, + "allow_update_after_misbehaviour": true + }, + "consensus_state": { + "timestamp": "2020-01-02T00:00:10Z", + "root": { + "hash": "LpGpeyQVLUo9HpdsgJr12NP2eCICspcULiWa5u9udOA=" }, + "next_validators_hash": "E30CE736441FB9101FADDAF7E578ABBE6DFDB67207112350A9A904D554E1F5BE" + }, + "initial_val_set": [ { - "leaf_spec": { - "hash": 1, - "prehash_value": 1, - "length": 1, - "prefix": "AA==" + "pub_key": { + "type": "tendermint/PubKeyEd25519", + "value": "dcASx5/LIKZqagJWN0frOlFtcvz91frYmj/zmoZRWro=" }, - "inner_spec": { - "child_order": [0, 1], - "child_size": 32, - "min_prefix_length": 1, - "max_prefix_length": 1, - "hash": 1 - } + "power": 1 } - ], - "upgrade_path": ["upgrade", "upgradedIBCState"], - "allow_update_after_expiry": true, - "allow_update_after_misbehaviour": true - }, - "provider_consensus_state": { - "timestamp": "2020-01-02T00:00:10Z", - "root": { - "hash": "LpGpeyQVLUo9HpdsgJr12NP2eCICspcULiWa5u9udOA=" - }, - "next_validators_hash": "E30CE736441FB9101FADDAF7E578ABBE6DFDB67207112350A9A904D554E1F5BE" - }, - "unbonding_sequences": null, - "initial_val_set": [ - { - "pub_key": { - "type": "tendermint/PubKeyEd25519", - "value": "dcASx5/LIKZqagJWN0frOlFtcvz91frYmj/zmoZRWro=" - }, - "power": 1 - } - ] + ] + } }` var expectedGenesis ccvtypes.ConsumerGenesisState @@ -891,10 +892,10 @@ func TestMakeConsumerGenesis(t *testing.T) { require.NoError(t, err) // Zeroing out different fields that are challenging to mock - actualGenesis.InitialValSet = []abci.ValidatorUpdate{} - expectedGenesis.InitialValSet = []abci.ValidatorUpdate{} - actualGenesis.ProviderConsensusState = &ibctmtypes.ConsensusState{} - expectedGenesis.ProviderConsensusState = &ibctmtypes.ConsensusState{} + actualGenesis.Provider.InitialValSet = []abci.ValidatorUpdate{} + expectedGenesis.Provider.InitialValSet = []abci.ValidatorUpdate{} + actualGenesis.Provider.ConsensusState = &ibctmtypes.ConsensusState{} + expectedGenesis.Provider.ConsensusState = &ibctmtypes.ConsensusState{} require.Equal(t, expectedGenesis, actualGenesis, "consumer chain genesis created incorrectly") } diff --git a/x/ccv/provider/types/genesis.pb.go b/x/ccv/provider/types/genesis.pb.go index e08947ea5e..a7e06b7b09 100644 --- a/x/ccv/provider/types/genesis.pb.go +++ b/x/ccv/provider/types/genesis.pb.go @@ -5,7 +5,6 @@ package types import ( fmt "fmt" - _ "github.com/cometbft/cometbft/proto/tendermint/crypto" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" types "github.com/cosmos/interchain-security/v3/x/ccv/types" @@ -353,65 +352,64 @@ func init() { } var fileDescriptor_48411d9c7900d48e = []byte{ - // 925 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x6e, 0xdb, 0x36, - 0x14, 0x8e, 0x12, 0x37, 0x8d, 0x99, 0x9f, 0x65, 0x5c, 0xe6, 0x2a, 0x49, 0xe7, 0x06, 0x1e, 0x0a, - 0x04, 0xd8, 0x66, 0x35, 0xe9, 0x2e, 0xba, 0x9f, 0x5e, 0x34, 0xed, 0xb0, 0x19, 0xc3, 0x30, 0xc3, - 0x49, 0x33, 0xa0, 0xbb, 0x20, 0x68, 0x92, 0xb0, 0xd9, 0x48, 0xa4, 0x40, 0x52, 0x4a, 0x8c, 0x61, - 0x40, 0x87, 0xed, 0x01, 0xf6, 0x58, 0xbd, 0xcc, 0xe5, 0xae, 0x8a, 0x21, 0x79, 0x83, 0x3d, 0xc1, - 0x20, 0x8a, 0x52, 0xe5, 0xcc, 0x2e, 0xec, 0x5d, 0xd9, 0x3a, 0x1f, 0xcf, 0xf7, 0x9d, 0xc3, 0x43, - 0x9e, 0x43, 0x70, 0xc0, 0x85, 0x61, 0x8a, 0x0c, 0x31, 0x17, 0x48, 0x33, 0x92, 0x28, 0x6e, 0x46, - 0x01, 0x21, 0x69, 0x10, 0x2b, 0x99, 0x72, 0xca, 0x54, 0x90, 0x1e, 0x04, 0x03, 0x26, 0x98, 0xe6, - 0xba, 0x1d, 0x2b, 0x69, 0x24, 0xfc, 0x78, 0x82, 0x4b, 0x9b, 0x90, 0xb4, 0x5d, 0xb8, 0xb4, 0xd3, - 0x83, 0x9d, 0xad, 0x81, 0x1c, 0x48, 0xbb, 0x3e, 0xc8, 0xfe, 0xe5, 0xae, 0x3b, 0x0f, 0xa6, 0xa9, - 0xa5, 0x07, 0x81, 0x1e, 0x62, 0xc5, 0x28, 0x22, 0x52, 0xe8, 0x24, 0x62, 0xca, 0x79, 0xdc, 0x7f, - 0x87, 0xc7, 0x39, 0x57, 0xcc, 0x2d, 0x3b, 0x9c, 0x25, 0x8d, 0x32, 0xbe, 0x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xff, 0x3f, 0x6e, 0x42, 0x2b, 0xac, 0x09, 0x00, 0x00, + // 908 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0x1b, 0x37, + 0x10, 0xf6, 0xda, 0x8e, 0x63, 0xd1, 0x3f, 0x75, 0x59, 0x57, 0x59, 0xdb, 0xad, 0x62, 0xa8, 0x08, + 0x60, 0xa0, 0xad, 0x14, 0x3b, 0x3d, 0xa4, 0x3f, 0x39, 0xc4, 0x49, 0xd1, 0x0a, 0x45, 0x51, 0x41, + 0x76, 0x5c, 0x20, 0x3d, 0x10, 0x14, 0x49, 0x48, 0x8c, 0x25, 0x72, 0xc1, 0xe1, 0xae, 0x2d, 0x14, + 0x05, 0x52, 0xb4, 0x0f, 0xd0, 0xc7, 0xca, 0xd1, 0xc7, 0x9e, 0x82, 0xc2, 0x7e, 0x83, 0x3e, 0x41, + 0xb1, 0x5c, 0xee, 0x66, 0xe5, 0xca, 0x81, 0x94, 0x93, 0x2d, 0x7e, 0x9c, 0xef, 0xfb, 0x86, 0x43, + 0xce, 0x2c, 0xda, 0x97, 0xca, 0x0a, 0xc3, 0xfa, 0x54, 0x2a, 0x02, 0x82, 0xc5, 0x46, 0xda, 0x51, + 0x93, 0xb1, 0xa4, 0x19, 0x19, 0x9d, 0x48, 0x2e, 0x4c, 0x33, 0xd9, 0x6f, 0xf6, 0x84, 0x12, 0x20, + 0xa1, 0x11, 0x19, 0x6d, 0x35, 0xfe, 0x64, 0x42, 0x48, 0x83, 0xb1, 0xa4, 0x91, 0x87, 0x34, 0x92, + 0xfd, 0xed, 0xcd, 0x9e, 0xee, 0x69, 0xb7, 0xbf, 0x99, 0xfe, 0x97, 0x85, 0x6e, 0xdf, 0xbf, 0x49, + 0x2d, 0xd9, 0x6f, 0x42, 0x9f, 0x1a, 0xc1, 0x09, 0xd3, 0x0a, 0xe2, 0xa1, 0x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, 0xff, 0x9e, 0xfb, 0x60, 0xd0, 0x8e, 0x09, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/ccv/provider/types/provider.pb.go b/x/ccv/provider/types/provider.pb.go index c064c7da6a..22bc700a2f 100644 --- a/x/ccv/provider/types/provider.pb.go +++ b/x/ccv/provider/types/provider.pb.go @@ -723,6 +723,7 @@ func (m *AddressList) GetAddresses() [][]byte { return nil } +// ChannelToChain is used to map a CCV channel ID to the consumer chainID type ChannelToChain struct { ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -1410,114 +1411,113 @@ func init() { } var fileDescriptor_f22ec409a72b7b72 = []byte{ - // 1702 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x73, 0xdb, 0xc6, - 0x15, 0x17, 0x44, 0x4a, 0x16, 0x1f, 0xf5, 0x65, 0x48, 0x89, 0x29, 0x57, 0xa5, 0x64, 0xa4, 0x49, - 0xd5, 0xc9, 0x04, 0x8c, 0xe4, 0xe9, 0x4c, 0xc6, 0xd3, 0x4c, 0x46, 0xa2, 0x9c, 0x58, 0x56, 0x13, - 0x2b, 0x90, 0x2a, 0x4f, 0xdb, 0x03, 0x66, 0xb9, 0x58, 0x93, 0x3b, 0x02, 0xb1, 0xf0, 0xee, 0x02, - 0x0e, 0x2f, 0x3d, 0xf7, 0x98, 0xde, 0x32, 0xed, 0x25, 0xed, 0x3f, 0xd0, 0x73, 0xff, 0x83, 0x1c, - 0x73, 0xec, 0x29, 0xe9, 0xd8, 0xc7, 0xfe, 0x13, 0x9d, 0x5d, 0x2c, 0x3e, 0x48, 0x7d, 0x94, 0x1e, - 0xb7, 0x37, 0xe0, 0xed, 0x7b, 0xbf, 0xf7, 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 0xfc, 0xa1, 0x12, 0xdb, 0xc1, 0xa8, - 0xc2, 0x7d, 0xfc, 0xbf, 0xc4, 0x56, 0xb8, 0xad, 0xc6, 0x86, 0xab, 0xf6, 0x97, 0x2e, 0x50, 0xbb, - 0x7c, 0x01, 0xe7, 0xaf, 0x16, 0xac, 0x57, 0xbd, 0x8a, 0x33, 0x76, 0xc2, 0x93, 0x88, 0xdc, 0xe4, - 0xbd, 0x1c, 0xbf, 0xd9, 0xea, 0xf8, 0x3d, 0x85, 0xe5, 0xb1, 0xa0, 0x84, 0xc9, 0xc6, 0x87, 0x53, - 0xf5, 0x58, 0x85, 0x5d, 0xbd, 0xa5, 0xea, 0x3d, 0xc4, 0xc1, 0xd3, 0xef, 0x5e, 0xb6, 0xad, 0xef, - 0x5f, 0xb6, 0xad, 0x7f, 0xbd, 0x6c, 0x5b, 0x5f, 0xbf, 0x6a, 0xcf, 0x7c, 0xff, 0xaa, 0x3d, 0xf3, - 0xcf, 0x57, 0xed, 0x99, 0xdf, 0x7d, 0xdc, 0xa7, 0x72, 0x90, 0xf4, 0x5c, 0xcc, 0x86, 0x1d, 0xf3, - 0xb3, 0xbe, 0xf4, 0xf5, 0x41, 0xf1, 0x9f, 0x47, 0x7a, 0xbf, 0xf3, 0xd5, 0xf8, 0x7f, 0x30, 0x72, - 0x14, 0x13, 0xd1, 0x9b, 0xd7, 0xac, 0x70, 0xff, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x13, - 0xf6, 0x7a, 0xb4, 0x11, 0x00, 0x00, + // 1690 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x72, 0x1b, 0xc7, + 0x11, 0xe6, 0x12, 0x20, 0x45, 0x34, 0xf8, 0xa7, 0x25, 0x6d, 0x81, 0x0a, 0x03, 0x52, 0xeb, 0xd8, + 0x61, 0xca, 0xe5, 0x45, 0x48, 0x55, 0xaa, 0x5c, 0xaa, 0xb8, 0x5c, 0x24, 0x28, 0x5b, 0x14, 0x63, + 0x8b, 0x5e, 0x32, 0x54, 0x25, 0x39, 0x6c, 0x0d, 0x66, 0x47, 0xc0, 0x14, 0x77, 0x77, 0x56, 0x33, + 0xb3, 0x2b, 0xe3, 0x92, 0x73, 0x8e, 0xce, 0xcd, 0x95, 0x5c, 0x9c, 0xbc, 0x40, 0xce, 0x79, 0x03, + 0x1f, 0x7d, 0xcc, 0xc9, 0x4e, 0x51, 0xc7, 0xbc, 0x44, 0x6a, 0x66, 0xff, 0x41, 0x52, 0x81, 0x4a, + 0xf1, 0x6d, 0xb6, 0xa7, 0xfb, 0xeb, 0x9e, 0xe9, 0xee, 0xaf, 0x07, 0x80, 0x3d, 0x1a, 0x4a, 0xc2, + 0xf1, 0x08, 0xd1, 0xd0, 0x15, 0x04, 0xc7, 0x9c, 0xca, 0x71, 0x0f, 0xe3, 0xa4, 0x17, 0x71, 0x96, + 0x50, 0x8f, 0xf0, 0x5e, 0xb2, 0x5b, 0xac, 0xed, 0x88, 0x33, 0xc9, 0xcc, 0x77, 0xae, 0xb1, 0xb1, + 0x31, 0x4e, 0xec, 0x42, 0x2f, 0xd9, 0xbd, 0xfb, 0xee, 0x4d, 0xc0, 0xc9, 0x6e, 0xef, 0x05, 0xe5, + 0x24, 0xc5, 0xba, 0xbb, 0x3e, 0x64, 0x43, 0xa6, 0x97, 0x3d, 0xb5, 0xca, 0xa4, 0x5b, 0x43, 0xc6, + 0x86, 0x3e, 0xe9, 0xe9, 0xaf, 0x41, 0xfc, 0xac, 0x27, 0x69, 0x40, 0x84, 0x44, 0x41, 0x94, 0x29, + 0x74, 0x27, 0x15, 0xbc, 0x98, 0x23, 0x49, 0x59, 0x98, 0x03, 0xd0, 0x01, 0xee, 0x61, 0xc6, 0x49, + 0x0f, 0xfb, 0x94, 0x84, 0x52, 0x79, 0x4d, 0x57, 0x99, 0x42, 0x4f, 0x29, 0xf8, 0x74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, 0xe4, 0x96, 0x34, 0x97, 0x6f, 0xe7, 0xfb, 0x29, + 0x2b, 0x15, 0x9c, 0x72, 0x3d, 0x9b, 0x36, 0xde, 0x84, 0x4d, 0x4f, 0x61, 0x4d, 0x8d, 0xa2, 0x49, + 0xcc, 0xe6, 0xf4, 0x98, 0xb7, 0x95, 0x7d, 0x1d, 0xf4, 0x0b, 0x30, 0x13, 0x81, 0x27, 0x31, 0xe7, + 0x5e, 0x23, 0xce, 0x44, 0xe0, 0x3a, 0xa4, 0x07, 0x9b, 0x42, 0x15, 0x9f, 0x1b, 0x10, 0xa9, 0xb9, + 0x39, 0xf2, 0x49, 0x48, 0xc5, 0x28, 0x07, 0x9f, 0x9f, 0x1e, 0x7c, 0x43, 0x03, 0x7d, 0xa6, 0x70, + 0x9c, 0x1c, 0x26, 0xf3, 0xd2, 0x87, 0xee, 0xf5, 0x5e, 0x8a, 0x04, 0xdd, 0xd2, 0x09, 0xfa, 0xc9, + 0x35, 0x10, 0x45, 0x96, 0x04, 0xbc, 0x57, 0x99, 0x21, 0xaa, 0xab, 0x5d, 0xdd, 0x50, 0x2e, 0x27, + 0x43, 0x45, 0xb4, 0x28, 0x1d, 0x27, 0x84, 0x14, 0x73, 0x30, 0x63, 0x0e, 0xf5, 0xac, 0x29, 0x58, + 0xa3, 0xcf, 0x68, 0x98, 0x3d, 0x16, 0xac, 0x72, 0xd4, 0x14, 0x1c, 0xe1, 0x54, 0xb0, 0x3e, 0x21, + 0xe4, 0x71, 0x73, 0x61, 0x61, 0xb5, 0x65, 0xfd, 0x02, 0x5a, 0xba, 0x45, 0xf7, 0xf1, 0x85, 0x30, + 0x37, 0xa1, 0xa5, 0x6a, 0x9d, 0x08, 0x41, 0x44, 0xc7, 0xd0, 0x9d, 0x5d, 0x0a, 0x2c, 0x09, 0x1b, + 0x37, 0x3d, 0x95, 0x84, 0xf9, 0x14, 0x6e, 0x45, 0x44, 0xcf, 0x71, 0x6d, 0xd8, 0xde, 0xfb, 0xc8,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ff, 0x95, 0xc6, 0x06, 0x3d, 0x82, 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 c5bebf0cd5..80487a06c9 100644 --- a/x/ccv/provider/types/tx.pb.go +++ b/x/ccv/provider/types/tx.pb.go @@ -6,12 +6,9 @@ package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -121,31 +118,28 @@ func init() { } var fileDescriptor_43221a4391e9fbf4 = []byte{ - // 375 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x3d, 0x4f, 0xeb, 0x30, - 0x14, 0x8d, 0x5f, 0xa5, 0xf7, 0xfa, 0xfc, 0xfa, 0x9e, 0xf4, 0xa2, 0x0e, 0x6d, 0x55, 0xa5, 0x10, - 0x16, 0x06, 0x88, 0x55, 0x3a, 0x20, 0x2a, 0x31, 0xb4, 0x4c, 0x08, 0x75, 0xe9, 0x82, 0xc4, 0x12, - 0xa5, 0x8e, 0x71, 0x2d, 0x1a, 0x3b, 0xb2, 0x9d, 0xa8, 0xf9, 0x07, 0x8c, 0x30, 0x21, 0xb6, 0xfe, - 0x1c, 0xc6, 0x8e, 0x4c, 0x08, 0xb5, 0x0b, 0x33, 0xbf, 0x00, 0x35, 0x1f, 0x54, 0x88, 0x0e, 0x88, - 0xed, 0xde, 0x7b, 0x8e, 0xcf, 0x39, 0xf2, 0xbd, 0x70, 0x8f, 0x71, 0x4d, 0x24, 0x1e, 0x7b, 0x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 0xa8, 0x50, 0x70, 0x45, 0x0e, 0xee, 0x01, 0x2c, 0x0d, 0x14, - 0x35, 0x6f, 0x01, 0xfc, 0xff, 0x39, 0xfe, 0x91, 0xf3, 0x85, 0x7f, 0x76, 0x36, 0x19, 0x34, 0x7a, - 0xdf, 0x7e, 0x5a, 0x64, 0xeb, 0x9f, 0x3f, 0x2c, 0x2c, 0x30, 0x5f, 0x58, 0xe0, 0x79, 0x61, 0x81, - 0x9b, 0xa5, 0x65, 0xcc, 0x97, 0x96, 0xf1, 0xb8, 0xb4, 0x8c, 0x8b, 0x63, 0xca, 0xf4, 0x38, 0x1a, - 0x39, 0x58, 0x04, 0xf9, 0x8e, 0xd0, 0xda, 0x6d, 0xff, 0xfd, 0x7c, 0xe2, 0x0e, 0x9a, 0x7e, 0xbc, - 0x21, 0x9d, 0x84, 0x44, 0x8d, 0x7e, 0xa6, 0x5b, 0xeb, 0xbc, 0x05, 0x00, 0x00, 0xff, 0xff, 0x92, - 0xca, 0xcf, 0xe2, 0x74, 0x02, 0x00, 0x00, + // 328 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xc9, 0xcc, 0x2b, 0x49, + 0x2d, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0x8b, 0x2f, 0x4e, 0x4d, 0x2e, 0x2d, 0xca, 0x2c, 0xa9, 0xd4, + 0x4f, 0x4e, 0x2e, 0xd3, 0x2f, 0x28, 0xca, 0x2f, 0xcb, 0x4c, 0x49, 0x2d, 0xd2, 0x2f, 0x33, 0xd4, + 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x52, 0xc6, 0xa2, 0x5a, 0x2f, 0x39, 0xb9, + 0x4c, 0x0f, 0xa6, 0x5a, 0xaf, 0xcc, 0x50, 0x4a, 0x24, 0x3d, 0x3f, 0x3d, 0x1f, 0xac, 0x5e, 0x1f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x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, + 0xca, 0x36, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x39, 0xbf, 0x38, + 0x37, 0xbf, 0x58, 0x1f, 0x61, 0x9b, 0x2e, 0x3c, 0xaa, 0xcb, 0x8c, 0xf5, 0x2b, 0x50, 0xe3, 0xbb, + 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x6b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xb3, 0xd9, 0x75, 0xa5, 0x20, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ccv/types/genesis.go b/x/ccv/types/genesis.go index 5aae1ed9b5..4189c2ec51 100644 --- a/x/ccv/types/genesis.go +++ b/x/ccv/types/genesis.go @@ -13,36 +13,13 @@ func NewInitialConsumerGenesisState(cs *ibctmtypes.ClientState, consState *ibctm initValSet []abci.ValidatorUpdate, params ConsumerParams, ) *ConsumerGenesisState { return &ConsumerGenesisState{ - Params: params, - NewChain: true, - ProviderClientState: cs, - ProviderConsensusState: consState, - InitialValSet: initValSet, - } -} - -// NewRestartConsumerGenesisState returns a ConsumerGenesisState that has already been established. -func NewRestartConsumerGenesisState( - clientID, channelID string, - maturingPackets []MaturingVSCPacket, - initValSet []abci.ValidatorUpdate, - heightToValsetUpdateIDs []HeightToValsetUpdateID, - pendingConsumerPackets ConsumerPacketDataList, - outstandingDowntimes []OutstandingDowntime, - lastTransBlockHeight LastTransmissionBlockHeight, - params ConsumerParams, -) *ConsumerGenesisState { - return &ConsumerGenesisState{ - Params: params, - ProviderClientId: clientID, - ProviderChannelId: channelID, - MaturingPackets: maturingPackets, - NewChain: false, - InitialValSet: initValSet, - HeightToValsetUpdateId: heightToValsetUpdateIDs, - PendingConsumerPackets: pendingConsumerPackets, - OutstandingDowntimeSlashing: outstandingDowntimes, - LastTransmissionBlockHeight: lastTransBlockHeight, + NewChain: true, + Params: params, + Provider: ProviderInfo{ + ClientState: cs, + ConsensusState: consState, + InitialValSet: initValSet, + }, } } @@ -54,28 +31,11 @@ func DefaultConsumerGenesisState() *ConsumerGenesisState { } } -// Validate performs basic genesis state validation returning an error upon any failure. -// -// The three cases where a consumer chain starts/restarts -// expect the following optional and mandatory genesis states: -// -// 1. New chain starts: -// - Params, InitialValset, provider client state, provider consensus state // mandatory -// -// 2. Chain restarts with CCV handshake still in progress: -// - Params, InitialValset, ProviderID, HeightToValidatorSetUpdateID // mandatory -// - PendingConsumerPacket // optional -// -// 3. Chain restarts with CCV handshake completed: -// - Params, InitialValset, ProviderID, channelID, HeightToValidatorSetUpdateID // mandatory -// - MaturingVSCPackets, OutstandingDowntime, PendingConsumerPacket, LastTransmissionBlockHeight // optional -// - func (gs ConsumerGenesisState) Validate() error { if !gs.Params.Enabled { return nil } - if len(gs.InitialValSet) == 0 { + if len(gs.Provider.InitialValSet) == 0 { return errorsmod.Wrap(ErrInvalidGenesis, "initial validator set is empty") } if err := gs.Params.Validate(); err != nil { @@ -83,85 +43,20 @@ func (gs ConsumerGenesisState) Validate() error { } if gs.NewChain { - if gs.ProviderClientState == nil { + if gs.Provider.ClientState == nil { return errorsmod.Wrap(ErrInvalidGenesis, "provider client state cannot be nil for new chain") } - if err := gs.ProviderClientState.Validate(); err != nil { + if err := gs.Provider.ClientState.Validate(); err != nil { return errorsmod.Wrapf(ErrInvalidGenesis, "provider client state invalid for new chain %s", err.Error()) } - if gs.ProviderConsensusState == nil { + if gs.Provider.ConsensusState == nil { return errorsmod.Wrap(ErrInvalidGenesis, "provider consensus state cannot be nil for new chain") } - if err := gs.ProviderConsensusState.ValidateBasic(); err != nil { + if err := gs.Provider.ConsensusState.ValidateBasic(); err != nil { return errorsmod.Wrapf(ErrInvalidGenesis, "provider consensus state invalid for new chain %s", err.Error()) } - if gs.ProviderClientId != "" { - return errorsmod.Wrap(ErrInvalidGenesis, "provider client id cannot be set for new chain. It must be established on handshake") - } - if gs.ProviderChannelId != "" { - return errorsmod.Wrap(ErrInvalidGenesis, "provider channel id cannot be set for new chain. It must be established on handshake") - } - if len(gs.MaturingPackets) != 0 { - return errorsmod.Wrap(ErrInvalidGenesis, "maturing packets must be empty for new chain") - } - if len(gs.PendingConsumerPackets.List) != 0 { - return errorsmod.Wrap(ErrInvalidGenesis, "pending consumer packets must be empty for new chain") - } - if gs.LastTransmissionBlockHeight.Height != 0 { - return errorsmod.Wrap(ErrInvalidGenesis, "last transmission block height must be empty for new chain") - } - } else { - // NOTE: For restart genesis, we will verify initial validator set in InitGenesis. - if gs.ProviderClientId == "" { - return errorsmod.Wrap(ErrInvalidGenesis, "provider client id must be set for a restarting consumer genesis state") - } - // handshake is still in progress - handshakeInProgress := gs.ProviderChannelId == "" - if handshakeInProgress { - if len(gs.MaturingPackets) != 0 { - return errorsmod.Wrap( - ErrInvalidGenesis, "maturing packets must be empty when handshake isn't completed") - } - if len(gs.OutstandingDowntimeSlashing) != 0 { - return errorsmod.Wrap( - ErrInvalidGenesis, "outstanding downtime must be empty when handshake isn't completed") - } - if gs.LastTransmissionBlockHeight.Height != 0 { - return errorsmod.Wrap( - ErrInvalidGenesis, "last transmission block height must be zero when handshake isn't completed") - } - if len(gs.PendingConsumerPackets.List) != 0 { - for _, packet := range gs.PendingConsumerPackets.List { - if packet.Type == VscMaturedPacket { - return errorsmod.Wrap(ErrInvalidGenesis, "pending maturing packets must be empty when handshake isn't completed") - } - } - } - } - if gs.HeightToValsetUpdateId == nil { - return errorsmod.Wrap( - ErrInvalidGenesis, - "empty height to validator set update id mapping", - ) - } - if gs.ProviderClientState != nil || gs.ProviderConsensusState != nil { - return errorsmod.Wrap(ErrInvalidGenesis, "provider client state and consensus state must be nil for a restarting genesis state") - } - for _, mat := range gs.MaturingPackets { - if err := mat.Validate(); err != nil { - return errorsmod.Wrap(err, "invalid unbonding sequences") - } - } - } - return nil -} - -func (mat MaturingVSCPacket) Validate() error { - if mat.MaturityTime.IsZero() { - return errorsmod.Wrap(ErrInvalidVSCMaturedTime, "cannot have 0 maturity time") - } - if mat.VscId == 0 { - return errorsmod.Wrap(ErrInvalidVSCMaturedId, "cannot have 0 maturity time") + } else if gs.Provider.ClientState != nil || gs.Provider.ConsensusState != nil { + return errorsmod.Wrap(ErrInvalidGenesis, "provider client state and consensus state must be nil for a restarting genesis state") } return nil } diff --git a/x/ccv/types/shared_consumer.pb.go b/x/ccv/types/shared_consumer.pb.go index e979c70f4b..699f9ac52d 100644 --- a/x/ccv/types/shared_consumer.pb.go +++ b/x/ccv/types/shared_consumer.pb.go @@ -9,10 +9,8 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" _07_tendermint "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" _ "google.golang.org/protobuf/types/known/durationpb" - _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" @@ -34,7 +32,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // ConsumerParams defines the parameters for CCV consumer module. // // Note this type is referenced in both the consumer and provider CCV modules, -// and persisted on the provider, see MakeConsumerGenesis and SetConsumerGenesis. +// and persisted on the provider, see MakeConsumerGenesis and +// SetConsumerGenesis. type ConsumerParams struct { // TODO: Remove enabled flag and find a better way to setup integration tests // See: https://github.com/cosmos/interchain-security/issues/339 @@ -205,32 +204,13 @@ func (m *ConsumerParams) GetRetryDelayPeriod() time.Duration { return 0 } -// ConsumerGenesisState defines the CCV consumer chain genesis state. -// -// Note this type is referenced in both the consumer and provider CCV modules, -// and persisted on the provider, see MakeConsumerGenesis and SetConsumerGenesis. +// ConsumerGenesisState defines shared genesis information between provider and +// consumer type ConsumerGenesisState struct { - Params ConsumerParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - ProviderClientId string `protobuf:"bytes,2,opt,name=provider_client_id,json=providerClientId,proto3" json:"provider_client_id,omitempty"` - ProviderChannelId string `protobuf:"bytes,3,opt,name=provider_channel_id,json=providerChannelId,proto3" json:"provider_channel_id,omitempty"` - NewChain bool `protobuf:"varint,4,opt,name=new_chain,json=newChain,proto3" json:"new_chain,omitempty"` - // ProviderClientState filled in on new chain, nil on restart. - ProviderClientState *_07_tendermint.ClientState `protobuf:"bytes,5,opt,name=provider_client_state,json=providerClientState,proto3" json:"provider_client_state,omitempty"` - // ProviderConsensusState filled in on new chain, nil on restart. - ProviderConsensusState *_07_tendermint.ConsensusState `protobuf:"bytes,6,opt,name=provider_consensus_state,json=providerConsensusState,proto3" json:"provider_consensus_state,omitempty"` - // MaturingPackets nil on new chain, filled in on restart. - MaturingPackets []MaturingVSCPacket `protobuf:"bytes,7,rep,name=maturing_packets,json=maturingPackets,proto3" json:"maturing_packets"` - // InitialValset filled in on new chain and on restart. - InitialValSet []types.ValidatorUpdate `protobuf:"bytes,8,rep,name=initial_val_set,json=initialValSet,proto3" json:"initial_val_set"` - // HeightToValsetUpdateId nil on new chain, filled in on restart. - HeightToValsetUpdateId []HeightToValsetUpdateID `protobuf:"bytes,9,rep,name=height_to_valset_update_id,json=heightToValsetUpdateId,proto3" json:"height_to_valset_update_id"` - // OutstandingDowntimes nil on new chain, filled in on restart. - OutstandingDowntimeSlashing []OutstandingDowntime `protobuf:"bytes,10,rep,name=outstanding_downtime_slashing,json=outstandingDowntimeSlashing,proto3" json:"outstanding_downtime_slashing"` - // PendingConsumerPackets nil on new chain, filled in on restart. - PendingConsumerPackets ConsumerPacketDataList `protobuf:"bytes,11,opt,name=pending_consumer_packets,json=pendingConsumerPackets,proto3" json:"pending_consumer_packets"` - // LastTransmissionBlockHeight nil on new chain, filled in on restart. - LastTransmissionBlockHeight LastTransmissionBlockHeight `protobuf:"bytes,12,opt,name=last_transmission_block_height,json=lastTransmissionBlockHeight,proto3" json:"last_transmission_block_height"` - PreCCV bool `protobuf:"varint,13,opt,name=preCCV,proto3" json:"preCCV,omitempty"` + Params ConsumerParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Provider ProviderInfo `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider"` + // true for new chain, false for chain restart. + NewChain bool `protobuf:"varint,3,opt,name=new_chain,json=newChain,proto3" json:"new_chain,omitempty"` } func (m *ConsumerGenesisState) Reset() { *m = ConsumerGenesisState{} } @@ -273,18 +253,11 @@ func (m *ConsumerGenesisState) GetParams() ConsumerParams { return ConsumerParams{} } -func (m *ConsumerGenesisState) GetProviderClientId() string { - if m != nil { - return m.ProviderClientId - } - return "" -} - -func (m *ConsumerGenesisState) GetProviderChannelId() string { +func (m *ConsumerGenesisState) GetProvider() ProviderInfo { if m != nil { - return m.ProviderChannelId + return m.Provider } - return "" + return ProviderInfo{} } func (m *ConsumerGenesisState) GetNewChain() bool { @@ -294,238 +267,29 @@ func (m *ConsumerGenesisState) GetNewChain() bool { return false } -func (m *ConsumerGenesisState) GetProviderClientState() *_07_tendermint.ClientState { - if m != nil { - return m.ProviderClientState - } - return nil -} - -func (m *ConsumerGenesisState) GetProviderConsensusState() *_07_tendermint.ConsensusState { - if m != nil { - return m.ProviderConsensusState - } - return nil -} - -func (m *ConsumerGenesisState) GetMaturingPackets() []MaturingVSCPacket { - if m != nil { - return m.MaturingPackets - } - return nil -} - -func (m *ConsumerGenesisState) GetInitialValSet() []types.ValidatorUpdate { - if m != nil { - return m.InitialValSet - } - return nil -} - -func (m *ConsumerGenesisState) GetHeightToValsetUpdateId() []HeightToValsetUpdateID { - if m != nil { - return m.HeightToValsetUpdateId - } - return nil -} - -func (m *ConsumerGenesisState) GetOutstandingDowntimeSlashing() []OutstandingDowntime { - if m != nil { - return m.OutstandingDowntimeSlashing - } - return nil -} - -func (m *ConsumerGenesisState) GetPendingConsumerPackets() ConsumerPacketDataList { - if m != nil { - return m.PendingConsumerPackets - } - return ConsumerPacketDataList{} -} - -func (m *ConsumerGenesisState) GetLastTransmissionBlockHeight() LastTransmissionBlockHeight { - if m != nil { - return m.LastTransmissionBlockHeight - } - return LastTransmissionBlockHeight{} -} - -func (m *ConsumerGenesisState) GetPreCCV() bool { - if m != nil { - return m.PreCCV - } - return false -} - -// HeightValsetUpdateID represents a mapping internal to the consumer CCV module -// AND used in shared consumer genesis state, which links a block height to each recv valset update id. -type HeightToValsetUpdateID struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - ValsetUpdateId uint64 `protobuf:"varint,2,opt,name=valset_update_id,json=valsetUpdateId,proto3" json:"valset_update_id,omitempty"` +// ProviderInfo defines all information a consumer needs from a provider +// Shared data type between provider and consumer +type ProviderInfo struct { + // ProviderClientState filled in on new chain, nil on restart. + ClientState *_07_tendermint.ClientState `protobuf:"bytes,1,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"` + // ProviderConsensusState filled in on new chain, nil on restart. + ConsensusState *_07_tendermint.ConsensusState `protobuf:"bytes,2,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"` + // InitialValset filled in on new chain and on restart. + InitialValSet []types.ValidatorUpdate `protobuf:"bytes,3,rep,name=initial_val_set,json=initialValSet,proto3" json:"initial_val_set"` } -func (m *HeightToValsetUpdateID) Reset() { *m = HeightToValsetUpdateID{} } -func (m *HeightToValsetUpdateID) String() string { return proto.CompactTextString(m) } -func (*HeightToValsetUpdateID) ProtoMessage() {} -func (*HeightToValsetUpdateID) Descriptor() ([]byte, []int) { +func (m *ProviderInfo) Reset() { *m = ProviderInfo{} } +func (m *ProviderInfo) String() string { return proto.CompactTextString(m) } +func (*ProviderInfo) ProtoMessage() {} +func (*ProviderInfo) Descriptor() ([]byte, []int) { return fileDescriptor_d0a8be0efc64dfbc, []int{2} } -func (m *HeightToValsetUpdateID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HeightToValsetUpdateID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HeightToValsetUpdateID.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 *HeightToValsetUpdateID) XXX_Merge(src proto.Message) { - xxx_messageInfo_HeightToValsetUpdateID.Merge(m, src) -} -func (m *HeightToValsetUpdateID) XXX_Size() int { - return m.Size() -} -func (m *HeightToValsetUpdateID) XXX_DiscardUnknown() { - xxx_messageInfo_HeightToValsetUpdateID.DiscardUnknown(m) -} - -var xxx_messageInfo_HeightToValsetUpdateID proto.InternalMessageInfo - -func (m *HeightToValsetUpdateID) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *HeightToValsetUpdateID) GetValsetUpdateId() uint64 { - if m != nil { - return m.ValsetUpdateId - } - return 0 -} - -// OutstandingDowntime defines the type used internally to the consumer CCV module, -// AND used in shared consumer genesis state, in order to not send multiple slashing -// requests for the same downtime infraction. -type OutstandingDowntime struct { - ValidatorConsensusAddress string `protobuf:"bytes,1,opt,name=validator_consensus_address,json=validatorConsensusAddress,proto3" json:"validator_consensus_address,omitempty"` -} - -func (m *OutstandingDowntime) Reset() { *m = OutstandingDowntime{} } -func (m *OutstandingDowntime) String() string { return proto.CompactTextString(m) } -func (*OutstandingDowntime) ProtoMessage() {} -func (*OutstandingDowntime) Descriptor() ([]byte, []int) { - return fileDescriptor_d0a8be0efc64dfbc, []int{3} -} -func (m *OutstandingDowntime) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OutstandingDowntime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OutstandingDowntime.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 *OutstandingDowntime) XXX_Merge(src proto.Message) { - xxx_messageInfo_OutstandingDowntime.Merge(m, src) -} -func (m *OutstandingDowntime) XXX_Size() int { - return m.Size() -} -func (m *OutstandingDowntime) XXX_DiscardUnknown() { - xxx_messageInfo_OutstandingDowntime.DiscardUnknown(m) -} - -var xxx_messageInfo_OutstandingDowntime proto.InternalMessageInfo - -func (m *OutstandingDowntime) GetValidatorConsensusAddress() string { - if m != nil { - return m.ValidatorConsensusAddress - } - return "" -} - -// LastTransmissionBlockHeight is the last time validator holding -// pools were transmitted to the provider chain. This type is used internally -// to the consumer CCV module AND used in shared consumer genesis state. -type LastTransmissionBlockHeight struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *LastTransmissionBlockHeight) Reset() { *m = LastTransmissionBlockHeight{} } -func (m *LastTransmissionBlockHeight) String() string { return proto.CompactTextString(m) } -func (*LastTransmissionBlockHeight) ProtoMessage() {} -func (*LastTransmissionBlockHeight) Descriptor() ([]byte, []int) { - return fileDescriptor_d0a8be0efc64dfbc, []int{4} -} -func (m *LastTransmissionBlockHeight) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LastTransmissionBlockHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LastTransmissionBlockHeight.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 *LastTransmissionBlockHeight) XXX_Merge(src proto.Message) { - xxx_messageInfo_LastTransmissionBlockHeight.Merge(m, src) -} -func (m *LastTransmissionBlockHeight) XXX_Size() int { - return m.Size() -} -func (m *LastTransmissionBlockHeight) XXX_DiscardUnknown() { - xxx_messageInfo_LastTransmissionBlockHeight.DiscardUnknown(m) -} - -var xxx_messageInfo_LastTransmissionBlockHeight proto.InternalMessageInfo - -func (m *LastTransmissionBlockHeight) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -// MaturingVSCPacket represents a vsc packet that is maturing internal to the -// consumer CCV module, where the consumer has not yet relayed a VSCMatured packet -// back to the provider. This type is used internally to the consumer CCV module -// AND used in shared consumer genesis state. -type MaturingVSCPacket struct { - VscId uint64 `protobuf:"varint,1,opt,name=vscId,proto3" json:"vscId,omitempty"` - MaturityTime time.Time `protobuf:"bytes,2,opt,name=maturity_time,json=maturityTime,proto3,stdtime" json:"maturity_time"` -} - -func (m *MaturingVSCPacket) Reset() { *m = MaturingVSCPacket{} } -func (m *MaturingVSCPacket) String() string { return proto.CompactTextString(m) } -func (*MaturingVSCPacket) ProtoMessage() {} -func (*MaturingVSCPacket) Descriptor() ([]byte, []int) { - return fileDescriptor_d0a8be0efc64dfbc, []int{5} -} -func (m *MaturingVSCPacket) XXX_Unmarshal(b []byte) error { +func (m *ProviderInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MaturingVSCPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ProviderInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MaturingVSCPacket.Marshal(b, m, deterministic) + return xxx_messageInfo_ProviderInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -535,78 +299,35 @@ func (m *MaturingVSCPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *MaturingVSCPacket) XXX_Merge(src proto.Message) { - xxx_messageInfo_MaturingVSCPacket.Merge(m, src) +func (m *ProviderInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProviderInfo.Merge(m, src) } -func (m *MaturingVSCPacket) XXX_Size() int { +func (m *ProviderInfo) XXX_Size() int { return m.Size() } -func (m *MaturingVSCPacket) XXX_DiscardUnknown() { - xxx_messageInfo_MaturingVSCPacket.DiscardUnknown(m) +func (m *ProviderInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ProviderInfo.DiscardUnknown(m) } -var xxx_messageInfo_MaturingVSCPacket proto.InternalMessageInfo +var xxx_messageInfo_ProviderInfo proto.InternalMessageInfo -func (m *MaturingVSCPacket) GetVscId() uint64 { +func (m *ProviderInfo) GetClientState() *_07_tendermint.ClientState { if m != nil { - return m.VscId + return m.ClientState } - return 0 + return nil } -func (m *MaturingVSCPacket) GetMaturityTime() time.Time { +func (m *ProviderInfo) GetConsensusState() *_07_tendermint.ConsensusState { if m != nil { - return m.MaturityTime - } - return time.Time{} -} - -// ConsumerPacketDataList is a list of consumer packet data packets. -// -// Note this type is is used internally to the consumer CCV module -// for exporting / importing state in InitGenesis and ExportGenesis, -// AND included in the consumer genesis type (reffed by provider and consumer modules), -// hence this is a shared type. -type ConsumerPacketDataList struct { - List []ConsumerPacketData `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` -} - -func (m *ConsumerPacketDataList) Reset() { *m = ConsumerPacketDataList{} } -func (m *ConsumerPacketDataList) String() string { return proto.CompactTextString(m) } -func (*ConsumerPacketDataList) ProtoMessage() {} -func (*ConsumerPacketDataList) Descriptor() ([]byte, []int) { - return fileDescriptor_d0a8be0efc64dfbc, []int{6} -} -func (m *ConsumerPacketDataList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsumerPacketDataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsumerPacketDataList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + return m.ConsensusState } + return nil } -func (m *ConsumerPacketDataList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsumerPacketDataList.Merge(m, src) -} -func (m *ConsumerPacketDataList) XXX_Size() int { - return m.Size() -} -func (m *ConsumerPacketDataList) XXX_DiscardUnknown() { - xxx_messageInfo_ConsumerPacketDataList.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsumerPacketDataList proto.InternalMessageInfo -func (m *ConsumerPacketDataList) GetList() []ConsumerPacketData { +func (m *ProviderInfo) GetInitialValSet() []types.ValidatorUpdate { if m != nil { - return m.List + return m.InitialValSet } return nil } @@ -614,11 +335,7 @@ func (m *ConsumerPacketDataList) GetList() []ConsumerPacketData { func init() { proto.RegisterType((*ConsumerParams)(nil), "interchain_security.ccv.v1.ConsumerParams") proto.RegisterType((*ConsumerGenesisState)(nil), "interchain_security.ccv.v1.ConsumerGenesisState") - proto.RegisterType((*HeightToValsetUpdateID)(nil), "interchain_security.ccv.v1.HeightToValsetUpdateID") - proto.RegisterType((*OutstandingDowntime)(nil), "interchain_security.ccv.v1.OutstandingDowntime") - proto.RegisterType((*LastTransmissionBlockHeight)(nil), "interchain_security.ccv.v1.LastTransmissionBlockHeight") - proto.RegisterType((*MaturingVSCPacket)(nil), "interchain_security.ccv.v1.MaturingVSCPacket") - proto.RegisterType((*ConsumerPacketDataList)(nil), "interchain_security.ccv.v1.ConsumerPacketDataList") + proto.RegisterType((*ProviderInfo)(nil), "interchain_security.ccv.v1.ProviderInfo") } func init() { @@ -626,83 +343,58 @@ func init() { } var fileDescriptor_d0a8be0efc64dfbc = []byte{ - // 1203 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x4d, 0x73, 0x13, 0x37, - 0x18, 0x8e, 0x49, 0x08, 0xb6, 0x92, 0x40, 0x50, 0x82, 0xbb, 0x24, 0x53, 0xc7, 0xb8, 0xed, 0x8c, - 0xa7, 0x2d, 0xbb, 0x25, 0xd0, 0xe9, 0x4c, 0x0f, 0x9d, 0x21, 0x76, 0x69, 0xd2, 0xa1, 0x24, 0x6c, - 0x42, 0x0e, 0x74, 0xa6, 0x1a, 0x59, 0x52, 0x6c, 0x0d, 0x6b, 0xc9, 0x23, 0x69, 0x37, 0xcd, 0xb5, - 0xbf, 0x80, 0x63, 0x7f, 0x12, 0x47, 0x8e, 0x9c, 0x4a, 0x07, 0xfe, 0x48, 0x47, 0x1f, 0xeb, 0xd8, - 0xe4, 0xa3, 0x70, 0x5b, 0xe9, 0x7d, 0x9e, 0xf7, 0xfb, 0x7d, 0xb5, 0xe0, 0x3b, 0x2e, 0x0c, 0x53, - 0x64, 0x80, 0xb9, 0x40, 0x9a, 0x91, 0x5c, 0x71, 0x73, 0x92, 0x10, 0x52, 0x24, 0xc5, 0xbd, 0x44, - 0x0f, 0xb0, 0x62, 0x14, 0x11, 0x29, 0x74, 0x3e, 0x64, 0x2a, 0x1e, 0x29, 0x69, 0x24, 0x5c, 0x3b, - 0x87, 0x11, 0x13, 0x52, 0xc4, 0xc5, 0xbd, 0xb5, 0x75, 0xc3, 0x04, 0x65, 0x6a, 0xc8, 0x85, 0x49, - 0x70, 0x8f, 0xf0, 0xc4, 0x9c, 0x8c, 0x98, 0xf6, 0xc4, 0xb5, 0x84, 0xf7, 0x48, 0x92, 0xf1, 0xfe, - 0xc0, 0x90, 0x8c, 0x33, 0x61, 0x74, 0x32, 0x81, 0x2e, 0xee, 0x4d, 0x9c, 0x02, 0xe1, 0x8e, 0x25, - 0x10, 0xa9, 0x58, 0x42, 0x06, 0x58, 0x08, 0x96, 0x59, 0x54, 0xf8, 0x0c, 0x90, 0x46, 0x5f, 0xca, - 0x7e, 0xc6, 0x12, 0x77, 0xea, 0xe5, 0x47, 0x09, 0xcd, 0x15, 0x36, 0x5c, 0x8a, 0x20, 0x5f, 0xed, - 0xcb, 0xbe, 0x74, 0x9f, 0x89, 0xfd, 0x0a, 0xb7, 0x5f, 0x5d, 0x12, 0xf4, 0x31, 0x57, 0x2c, 0xc0, - 0x36, 0x3e, 0x54, 0x6e, 0xf8, 0x90, 0x69, 0x83, 0x87, 0x23, 0x0f, 0x68, 0xbd, 0x9d, 0x07, 0xd7, - 0x3b, 0x21, 0x3b, 0x7b, 0x58, 0xe1, 0xa1, 0x86, 0x11, 0xb8, 0xc6, 0x04, 0xee, 0x65, 0x8c, 0x46, - 0x95, 0x66, 0xa5, 0x5d, 0x4d, 0xcb, 0x23, 0xdc, 0x05, 0x5f, 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xa7, 0xaf, 0xb8, 0x9f, 0xfc, 0xe9, 0xfe, 0xfc, 0xdc, 0x8f, 0x6a, - 0x6f, 0xde, 0xc5, 0x77, 0xff, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x49, 0x54, 0x31, 0x16, - 0x0b, 0x00, 0x00, + // 812 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x41, 0x73, 0xdc, 0x34, + 0x14, 0x8e, 0xbb, 0x25, 0xdd, 0x68, 0x93, 0xa6, 0x88, 0x50, 0x4c, 0x3a, 0xb3, 0x71, 0x03, 0x87, + 0x1d, 0x98, 0xda, 0x24, 0xe9, 0x89, 0x1b, 0x49, 0x28, 0xa5, 0x87, 0x64, 0xeb, 0x84, 0x32, 0x03, + 0x07, 0x8d, 0x2c, 0xbd, 0x5d, 0x6b, 0xb0, 0x25, 0x8f, 0x24, 0x3b, 0xe4, 0x17, 0x70, 0xe5, 0xc8, + 0x4f, 0x2a, 0xb7, 0x1e, 0x39, 0x51, 0x26, 0xf9, 0x23, 0x8c, 0x65, 0x3b, 0xf1, 0x32, 0x04, 0xd2, + 0x9b, 0x9e, 0xde, 0xf7, 0x7d, 0xf6, 0xf7, 0xa4, 0xf7, 0x84, 0xbe, 0x10, 0xd2, 0x82, 0x66, 0x29, + 0x15, 0x92, 0x18, 0x60, 0xa5, 0x16, 0xf6, 0x3c, 0x62, 0xac, 0x8a, 0xaa, 0x9d, 0xc8, 0xa4, 0x54, + 0x03, 0x27, 0x4c, 0x49, 0x53, 0xe6, 0xa0, 0xc3, 0x42, 0x2b, 0xab, 0xf0, 0xe6, 0xbf, 0x30, 0x42, + 0xc6, 0xaa, 0xb0, 0xda, 0xd9, 0x7c, 0x64, 0x41, 0x72, 0xd0, 0xb9, 0x90, 0x36, 0xa2, 0x09, 0x13, + 0x91, 0x3d, 0x2f, 0xc0, 0x34, 0xc4, 0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x42, 0x0a, 0x2b, 0x68, 0x46, 0x2a, 0x9a, 0x11, + 0x03, 0xd6, 0x1f, 0x04, 0x83, 0xc9, 0x68, 0x37, 0xe8, 0xeb, 0xd4, 0x53, 0x38, 0x7c, 0x45, 0x33, + 0xc1, 0xa9, 0x55, 0xfa, 0xbb, 0x82, 0x53, 0x0b, 0x6d, 0x85, 0xd6, 0x5a, 0xfa, 0x2b, 0x9a, 0x9d, + 0x80, 0xdd, 0x3f, 0x7a, 0x7d, 0x31, 0xf6, 0xde, 0x5c, 0x8c, 0xbd, 0xbf, 0x2e, 0xc6, 0xde, 0xaf, + 0x97, 0xe3, 0xa5, 0x37, 0x97, 0xe3, 0xa5, 0x3f, 0x2e, 0xc7, 0x4b, 0x3f, 0x3c, 0x9d, 0x0b, 0x9b, + 0x96, 0x49, 0xc8, 0x54, 0x1e, 0x31, 0x65, 0x72, 0x65, 0xa2, 0xeb, 0xb3, 0x78, 0x72, 0xf5, 0x6a, + 0x54, 0x7b, 0xd1, 0xcf, 0xee, 0xe9, 0x70, 0x43, 0x3f, 0x59, 0x76, 0x97, 0x6a, 0xef, 0xef, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x5c, 0xb4, 0xca, 0xd3, 0x62, 0x06, 0x00, 0x00, } func (m *ConsumerParams) Marshal() (dAtA []byte, err error) { @@ -846,18 +538,18 @@ func (m *ConsumerGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.PreCCV { + if m.NewChain { i-- - if m.PreCCV { + if m.NewChain { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x68 + dAtA[i] = 0x18 } { - size, err := m.LastTransmissionBlockHeight.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Provider.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -865,9 +557,9 @@ func (m *ConsumerGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x62 + dAtA[i] = 0x12 { - size, err := m.PendingConsumerPackets.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -875,35 +567,30 @@ func (m *ConsumerGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x5a - if len(m.OutstandingDowntimeSlashing) > 0 { - for iNdEx := len(m.OutstandingDowntimeSlashing) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OutstandingDowntimeSlashing[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - } - if len(m.HeightToValsetUpdateId) > 0 { - for iNdEx := len(m.HeightToValsetUpdateId) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.HeightToValsetUpdateId[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ProviderInfo) 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 *ProviderInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProviderInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if len(m.InitialValSet) > 0 { for iNdEx := len(m.InitialValSet) - 1; iNdEx >= 0; iNdEx-- { { @@ -915,26 +602,12 @@ func (m *ConsumerGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x42 - } - } - if len(m.MaturingPackets) > 0 { - for iNdEx := len(m.MaturingPackets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.MaturingPackets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a + dAtA[i] = 0x1a } } - if m.ProviderConsensusState != nil { + if m.ConsensusState != nil { { - size, err := m.ProviderConsensusState.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ConsensusState.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -942,11 +615,11 @@ func (m *ConsumerGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x12 } - if m.ProviderClientState != nil { + if m.ClientState != nil { { - size, err := m.ProviderClientState.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -954,205 +627,7 @@ func (m *ConsumerGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a - } - if m.NewChain { - i-- - if m.NewChain { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.ProviderChannelId) > 0 { - i -= len(m.ProviderChannelId) - copy(dAtA[i:], m.ProviderChannelId) - i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.ProviderChannelId))) - i-- - dAtA[i] = 0x1a - } - if len(m.ProviderClientId) > 0 { - i -= len(m.ProviderClientId) - copy(dAtA[i:], m.ProviderClientId) - i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.ProviderClientId))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *HeightToValsetUpdateID) 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 *HeightToValsetUpdateID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HeightToValsetUpdateID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValsetUpdateId != 0 { - i = encodeVarintSharedConsumer(dAtA, i, uint64(m.ValsetUpdateId)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintSharedConsumer(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *OutstandingDowntime) 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 *OutstandingDowntime) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OutstandingDowntime) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorConsensusAddress) > 0 { - i -= len(m.ValidatorConsensusAddress) - copy(dAtA[i:], m.ValidatorConsensusAddress) - i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.ValidatorConsensusAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LastTransmissionBlockHeight) 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 *LastTransmissionBlockHeight) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LastTransmissionBlockHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSharedConsumer(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MaturingVSCPacket) 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 *MaturingVSCPacket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MaturingVSCPacket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n10, err10 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.MaturityTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.MaturityTime):]) - if err10 != nil { - return 0, err10 - } - i -= n10 - i = encodeVarintSharedConsumer(dAtA, i, uint64(n10)) - i-- - dAtA[i] = 0x12 - if m.VscId != 0 { - i = encodeVarintSharedConsumer(dAtA, i, uint64(m.VscId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ConsumerPacketDataList) 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 *ConsumerPacketDataList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsumerPacketDataList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.List) > 0 { - for iNdEx := len(m.List) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.List[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSharedConsumer(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1230,121 +705,30 @@ func (m *ConsumerGenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovSharedConsumer(uint64(l)) - l = len(m.ProviderClientId) - if l > 0 { - n += 1 + l + sovSharedConsumer(uint64(l)) - } - l = len(m.ProviderChannelId) - if l > 0 { - n += 1 + l + sovSharedConsumer(uint64(l)) - } - if m.NewChain { - n += 2 - } - if m.ProviderClientState != nil { - l = m.ProviderClientState.Size() - n += 1 + l + sovSharedConsumer(uint64(l)) - } - if m.ProviderConsensusState != nil { - l = m.ProviderConsensusState.Size() - n += 1 + l + sovSharedConsumer(uint64(l)) - } - if len(m.MaturingPackets) > 0 { - for _, e := range m.MaturingPackets { - l = e.Size() - n += 1 + l + sovSharedConsumer(uint64(l)) - } - } - if len(m.InitialValSet) > 0 { - for _, e := range m.InitialValSet { - l = e.Size() - n += 1 + l + sovSharedConsumer(uint64(l)) - } - } - if len(m.HeightToValsetUpdateId) > 0 { - for _, e := range m.HeightToValsetUpdateId { - l = e.Size() - n += 1 + l + sovSharedConsumer(uint64(l)) - } - } - if len(m.OutstandingDowntimeSlashing) > 0 { - for _, e := range m.OutstandingDowntimeSlashing { - l = e.Size() - n += 1 + l + sovSharedConsumer(uint64(l)) - } - } - l = m.PendingConsumerPackets.Size() - n += 1 + l + sovSharedConsumer(uint64(l)) - l = m.LastTransmissionBlockHeight.Size() + l = m.Provider.Size() n += 1 + l + sovSharedConsumer(uint64(l)) - if m.PreCCV { + if m.NewChain { n += 2 } return n } -func (m *HeightToValsetUpdateID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSharedConsumer(uint64(m.Height)) - } - if m.ValsetUpdateId != 0 { - n += 1 + sovSharedConsumer(uint64(m.ValsetUpdateId)) - } - return n -} - -func (m *OutstandingDowntime) Size() (n int) { +func (m *ProviderInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.ValidatorConsensusAddress) - if l > 0 { + if m.ClientState != nil { + l = m.ClientState.Size() n += 1 + l + sovSharedConsumer(uint64(l)) } - return n -} - -func (m *LastTransmissionBlockHeight) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSharedConsumer(uint64(m.Height)) - } - return n -} - -func (m *MaturingVSCPacket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VscId != 0 { - n += 1 + sovSharedConsumer(uint64(m.VscId)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.MaturityTime) - n += 1 + l + sovSharedConsumer(uint64(l)) - return n -} - -func (m *ConsumerPacketDataList) Size() (n int) { - if m == nil { - return 0 + if m.ConsensusState != nil { + l = m.ConsensusState.Size() + n += 1 + l + sovSharedConsumer(uint64(l)) } - var l int - _ = l - if len(m.List) > 0 { - for _, e := range m.List { + if len(m.InitialValSet) > 0 { + for _, e := range m.InitialValSet { l = e.Size() n += 1 + l + sovSharedConsumer(uint64(l)) } @@ -1676,445 +1060,7 @@ func (m *ConsumerParams) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RewardDenoms", wireType) } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - 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 ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenoms = append(m.RewardDenoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderRewardDenoms", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - 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 ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderRewardDenoms = append(m.ProviderRewardDenoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryDelayPeriod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.RetryDelayPeriod, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSharedConsumer(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSharedConsumer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConsumerGenesisState) 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 ErrIntOverflowSharedConsumer - } - 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: ConsumerGenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsumerGenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - 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 ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - 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 ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NewChain", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NewChain = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderClientState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProviderClientState == nil { - m.ProviderClientState = &_07_tendermint.ClientState{} - } - if err := m.ProviderClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderConsensusState", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProviderConsensusState == nil { - m.ProviderConsensusState = &_07_tendermint.ConsensusState{} - } - if err := m.ProviderConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaturingPackets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaturingPackets = append(m.MaturingPackets, MaturingVSCPacket{}) - if err := m.MaturingPackets[len(m.MaturingPackets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialValSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InitialValSet = append(m.InitialValSet, types.ValidatorUpdate{}) - if err := m.InitialValSet[len(m.InitialValSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightToValsetUpdateId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSharedConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSharedConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HeightToValsetUpdateId = append(m.HeightToValsetUpdateId, HeightToValsetUpdateID{}) - if err := m.HeightToValsetUpdateId[len(m.HeightToValsetUpdateId)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutstandingDowntimeSlashing", wireType) - } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSharedConsumer @@ -2124,31 +1070,29 @@ func (m *ConsumerGenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSharedConsumer } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSharedConsumer } if postIndex > l { return io.ErrUnexpectedEOF } - m.OutstandingDowntimeSlashing = append(m.OutstandingDowntimeSlashing, OutstandingDowntime{}) - if err := m.OutstandingDowntimeSlashing[len(m.OutstandingDowntimeSlashing)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.RewardDenoms = append(m.RewardDenoms, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 11: + case 12: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PendingConsumerPackets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProviderRewardDenoms", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSharedConsumer @@ -2158,28 +1102,27 @@ func (m *ConsumerGenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthSharedConsumer } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSharedConsumer } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.PendingConsumerPackets.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ProviderRewardDenoms = append(m.ProviderRewardDenoms, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 12: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransmissionBlockHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RetryDelayPeriod", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2206,30 +1149,10 @@ func (m *ConsumerGenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.LastTransmissionBlockHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.RetryDelayPeriod, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreCCV", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PreCCV = bool(v != 0) default: iNdEx = preIndex skippy, err := skipSharedConsumer(dAtA[iNdEx:]) @@ -2251,7 +1174,7 @@ func (m *ConsumerGenesisState) Unmarshal(dAtA []byte) error { } return nil } -func (m *HeightToValsetUpdateID) Unmarshal(dAtA []byte) error { +func (m *ConsumerGenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2274,36 +1197,17 @@ func (m *HeightToValsetUpdateID) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HeightToValsetUpdateID: wiretype end group for non-group") + return fmt.Errorf("proto: ConsumerGenesisState: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HeightToValsetUpdateID: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConsumerGenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSharedConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValsetUpdateId", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } - m.ValsetUpdateId = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSharedConsumer @@ -2313,66 +1217,30 @@ func (m *HeightToValsetUpdateID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ValsetUpdateId |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - default: - iNdEx = preIndex - skippy, err := skipSharedConsumer(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { + if msglen < 0 { return ErrInvalidLengthSharedConsumer } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OutstandingDowntime) 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 ErrIntOverflowSharedConsumer + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSharedConsumer } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OutstandingDowntime: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OutstandingDowntime: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorConsensusAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSharedConsumer @@ -2382,79 +1250,30 @@ func (m *OutstandingDowntime) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthSharedConsumer } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSharedConsumer } if postIndex > l { return io.ErrUnexpectedEOF } - m.ValidatorConsensusAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSharedConsumer(dAtA[iNdEx:]) - if err != nil { + if err := m.Provider.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSharedConsumer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LastTransmissionBlockHeight) 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 ErrIntOverflowSharedConsumer - } - 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: LastTransmissionBlockHeight: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LastTransmissionBlockHeight: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewChain", wireType) } - m.Height = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSharedConsumer @@ -2464,11 +1283,12 @@ func (m *LastTransmissionBlockHeight) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.NewChain = bool(v != 0) default: iNdEx = preIndex skippy, err := skipSharedConsumer(dAtA[iNdEx:]) @@ -2490,7 +1310,7 @@ func (m *LastTransmissionBlockHeight) Unmarshal(dAtA []byte) error { } return nil } -func (m *MaturingVSCPacket) Unmarshal(dAtA []byte) error { +func (m *ProviderInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2513,17 +1333,17 @@ func (m *MaturingVSCPacket) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MaturingVSCPacket: wiretype end group for non-group") + return fmt.Errorf("proto: ProviderInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MaturingVSCPacket: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ProviderInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VscId", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType) } - m.VscId = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSharedConsumer @@ -2533,14 +1353,31 @@ func (m *MaturingVSCPacket) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VscId |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthSharedConsumer + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSharedConsumer + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ClientState == nil { + m.ClientState = &_07_tendermint.ClientState{} + } + if err := m.ClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaturityTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2567,63 +1404,16 @@ func (m *MaturingVSCPacket) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.MaturityTime, dAtA[iNdEx:postIndex]); err != nil { - return err + if m.ConsensusState == nil { + m.ConsensusState = &_07_tendermint.ConsensusState{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSharedConsumer(dAtA[iNdEx:]) - if err != nil { + if err := m.ConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSharedConsumer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConsumerPacketDataList) 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 ErrIntOverflowSharedConsumer - } - 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: ConsumerPacketDataList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsumerPacketDataList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field List", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InitialValSet", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2650,8 +1440,8 @@ func (m *ConsumerPacketDataList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.List = append(m.List, ConsumerPacketData{}) - if err := m.List[len(m.List)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.InitialValSet = append(m.InitialValSet, types.ValidatorUpdate{}) + if err := m.InitialValSet[len(m.InitialValSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex