diff --git a/app/consumer-democracy/app.go b/app/consumer-democracy/app.go index 063c5bf427..fee730d752 100644 --- a/app/consumer-democracy/app.go +++ b/app/consumer-democracy/app.go @@ -112,6 +112,7 @@ 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 ( @@ -712,7 +713,7 @@ func New( return fromVM, fmt.Errorf("failed to unmarshal genesis state: %w", err) } - consumerGenesis := consumertypes.GenesisState{} + consumerGenesis := ccvtypes.GenesisState{} appCodec.MustUnmarshalJSON(appState[consumertypes.ModuleName], &consumerGenesis) consumerGenesis.PreCCV = true diff --git a/docs/docs/adrs/adr-011-improving-test-confidence.md b/docs/docs/adrs/adr-011-improving-test-confidence.md new file mode 100644 index 0000000000..8ba0e6e5a1 --- /dev/null +++ b/docs/docs/adrs/adr-011-improving-test-confidence.md @@ -0,0 +1,202 @@ +--- +sidebar_position: 12 +title: ADR Template +--- +# ADR 11: Improving testing and increasing confidence + +## Changelog +* 2023-08-11: Proposed, first draft of ADR. + +## Status + +Proposed + +## Context + +Testing, QA, and maintenance of interchain-security libraries is an ever-evolving area of software engineering we have to keep incrementally improving. The purpose of the QA process is to catch bugs as early as possible. In an ideal development workflow a bug should never reach production. A bug found in the specification stage is a lot cheaper to resolve than a bug discovered in production (or even in testnet). Ideally, all bugs should be found during the CI execution, and we hope that no bugs will ever even reach the testnet (although nothing can replace actual system stress test under load interacting with users). + +During development and testnet operation the following types of bugs were the most commonly found: +- improper iterator usage +- unbounded array access/iteration +- improper input handling and validation +- improper cached context usage +- non-determinism check (improper use of maps in go, relying on random values) +- KV store management and/or how keys are defined +- deserialization issues arising from consumer/provider versioning mismatch + +Such bugs can be discovered earlier with better tooling. Some of these bugs can induce increases in block times, chain halts, state corruption, or introduce an attack surface which is difficult to remove if other systems have started depending on that behavior. + +#### Current state of testing +Our testing suites consist of multiple parts, each with their own trade-offs and benefits with regards to code coverage, complexity and confidence they provide. + +### Unit testing +Unit testing is employed mostly for testing single-module functionality. It is the first step in testing and often the most practical. While highly important, unit tests often **test a single piece of code** and don't test relationships between different moving parts, this makes them less valuable when dealing with multi-module interactions. + +Unit tests often employ mocks to abstract parts of the system that are not under test. Mocks are not equivalent to actual models and should not be treated as such. + +Out of all the approaches used, unit testing has the most tools available and the coverage can simply be displayed as % of code lines tested. Although this is a very nice and very easy to understand metric, it does not speak about the quality of the test coverage. + +Since distributed systems testing is a lot more involved, unit tests are oftentimes not sufficient to cover complex interactions. Unit tests are still necessary and helpful, but in cases where unit tests are not helpful e2e or integration tests should be favored. + +### Integration testing +With integration testing we **test the multi-module interactions** while isolating them from the remainder of the system. +Integration tests can uncover bugs that are often missed by unit tests. + +It is very difficult to gauge the actual test coverage imparted by integration tests and the available tooling is limited. +In interchain-security we employ the `ibc-go/testing` framework to test interactions in-memory. + +At present, integration testing does not involve the consensus layer - it is only concerned with application level state and logic. + +### End-to-end testing +In our context end-to-end testing comprises of tests that use the actual application binaries in an isolated environment (e.g. docker container). During test execution the inputs are meant to simulate actual user interaction, either by submitting transactions/queries using the command line or using gRPC/REST APIs and checking for state changes after an action has been performed. With this testing strategy we also include the consensus layer in all of our runs. This is the closest we can get to testing user interactions without starting a full testnet. + +End-to-end testing strategies vary between different teams and projects and we strive to unify our approach to the best of our ability (at least for ICS and gaia). + +The available tooling does not give us significant (or relevant) line of code coverage information since most of the tools are geared towards analyzing unit tests and simple code branch evaluation. + +We aim to adapt our best practices by learning from other similar systems and projects such as cosmos-sdk, ibc-go and CometBFT. + + +## Decision + +### 1. Connect specifications to code and tooling +Oftentimes, specifications are disconnected from the development and QA processes. This gives rise to problems where the specification does not reflect the actual state of the system and vice-versa. +Usually specifications are just text files that are rarely used and go unmaintained after a while, resulting in consistency issues and misleading instructions/expectations about system behavior. + +#### Decision context and hypothesis +Specifications written in a dedicated and executable specification language are easier to maintain than the ones written entirely in text. +Additionally, we can create models based on the specification OR make the model equivalent to a specification. + +Models do not care about the intricacies of implementation and neither do specifications. Since both models and specifications care about concisely and accurately describing a system (such as a finite state machine), we see a benefit of adding model based tools (such as [quint](https://github.com/informalsystems/quint)) to our testing and development workflows. + +#### Main benefit +MBT tooling can be used to generate test traces that can be executed by multiple different testing setups. + +### 2. Improve e2e tooling + +#### Matrix tests +Instead of only running tests against current `main` branch we should adopt an approach where we also: +- **run regression tests against different released software versions** (`ICS v1 vs v2 vs v3`) +- **run non-determinism tests to uncover issues quickly** + +Matrix tests can be implemented using [CometMock](https://github.com/informalsystems/CometMock) and refactoring our current e2e CI setup. + +#### Introducing e2e regression testing + +This e2e test suite would execute using a cronjob in our CI (nightly, multiple times a day etc.) + +Briefly, the same set of traces is run against different **maintained** versions of the software and the `main` branch. +This would allow us to discover potential issues during development instead of in a testnet scenarios. + +The most valuable issues that can be discovered in this way are **state breaking changes**, **regressions** and **version incompatibilities**. + +The setup is illustrated by the image below. +![e2e matrix tests](../../figures/matrix_e2e_tests.png) + +This table explains which versions are tested against each other for the same set of test traces: +* ✅ marks a passing test +* ❌ marks a failing test + +| **USES: ICS v1 PROVIDER** | **start chain** | **add key** | **delegate** | **undelegate** | **redelegate** | **downtime** | **equivocation** | **stop chain** | +|---------------------------------|-----------------|-------------|--------------|----------------|----------------|--------------|------------------|----------------| +| **v1 consumer (sdk45,ibc4.3)** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| **v2 consumer (sdk45, ibc4.4)** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| **v3 consumer (sdk47, ibc7)** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| **main consumer** | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | +| **neutron** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| **stride** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | + + +#### Introducing e2e CometMock tests + +CometMock is a mock implementation of the [CometBFT](https://github.com/cometbft/cometbft) consensus engine. It supports most operations performed by CometBFT while also being lightweight and relatively easy to use. + +CometMock tests allow more nuanced control of test scenarios because CometMock can "fool" the blockchain app into thinking that a certain number of blocks had passed. +**This allows us to test very nuanced scenarios, difficult edge cases and long-running operations (such as unbonding operations).** + +Examples of tests made easier with CometMock are listed below: +- regression tests +- non-determinism tests +- upgrade tests +- state-breaking changes + +With CometMock, the **matrix test** approach can also be used. The image below illustrates a CometMock setup that can be used to discover non-deterministic behavior and state-breaking changes. +![e2e matrix tests](../../figures/cometmock_matrix_test.png) + +This table explains which versions are tested against each other for the same set of test traces: +* ✅ marks a passing test +* ❌ marks a failing test + +| **SCENARIO** | **start chain** | **add key** | **delegate** | **undelegate** | **redelegate** | **downtime** | **equivocation** | **stop chain** | +|---------------------------------|-----------------|-------------|--------------|----------------|----------------|--------------|------------------|----------------| +| **v3 provi + v3 consu** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| **main provi + main consu** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| **commit provi + commit consu** | ✅ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | + + +Briefly; multiple versions of the application are run against the same CometMock instance and any deviations in app behavior would result in `app hash` errors (the apps would be in different states after performing the same set of actions). + +### 3. Introduce innovative testing approaches + +When discussing e2e testing, some very important patterns emerge - especially if test traces are used instead of ad-hoc tests written by hand. + +We see a unique opportunity to clearly identify concerns and modularize the testing architecture. + +The e2e testing frameworks can be split into a **pipeline consisting of 3 parts: model, driver and harness**. + +#### Model + +Model is the part of the system that can emulate the behavior of the system under test. +Ideally, it is very close to the specification and is written in a specification language such as quint, TLA+ or similar. +One of the purposes of the model is that it can be used to generate test traces. + + +#### Driver + +The purpose of the driver is to accept test traces (generated by the model or written by hand), process them and provide inputs to the next part of the pipeline. + +Basically, the driver sits between the model and the actual infrastructure on which the test traces are being executed on. + +#### Harness + +Harness is the infrastructure layer of the pipeline that accepts inputs from the driver. + +There can be multiple harnesses as long as they can perform four things: +* bootstrap a test execution environment (local, docker, k8s…) +* accept inputs from drivers +* perform the action specified by the driver +* report results after performing actions + + +## Consequences + +The procedure outlined in this ADR is not an all-or-nothing approach. Concepts introduced here do not rely on each other, so this ADR may only be applied partially without negative impact on test coverage and code confidence. + +### Positive + +1. introduction of maintainable MBT solutions +* improvement over the current "difftest" setup that relies on an opinionated typescript model and go driver + +2. increased code coverage and confidence +* using CometMock allows us to run more tests in less time +* adding matrix e2e tests allows us to quickly pinpoint differences between code versions + + +### Negative +It might be easier to forgo the MBT tooling and instead focus on pure property based testing + +- [PBT proof of concept](https://github.com/cosmos/interchain-security/pull/667) +- [property based testing in go](https://github.com/flyingmutant/rapid) + +The solutions are potentially expensive if we increase usage of the CI pipeline - this is fixed by running "expensive" tests using a cronjob, instead of running them on every commit. + +### Neutral +The process of changing development and testing process is not something that can be thought of and delivered quickly. Luckily, the changes can be rolled out incrementally without impacting existing workflows. + +## References + +> Are there any relevant PR comments, issues that led up to this, or articles referenced for why we made the given design choice? If so link them here! + +* https://github.com/cosmos/gaia/issues/2427 +* https://github.com/cosmos/gaia/issues/2420 +* [ibc-go e2e tests](https://github.com/cosmos/ibc-go/tree/main/e2e) diff --git a/docs/figures/cometmock_matrix_test.png b/docs/figures/cometmock_matrix_test.png new file mode 100644 index 0000000000..740005aed1 Binary files /dev/null and b/docs/figures/cometmock_matrix_test.png differ diff --git a/docs/figures/matrix_e2e_tests.png b/docs/figures/matrix_e2e_tests.png new file mode 100644 index 0000000000..4c94db81a3 Binary files /dev/null and b/docs/figures/matrix_e2e_tests.png differ diff --git a/legacy_ibc_testing/testing/app.go b/legacy_ibc_testing/testing/app.go index da861481a7..ff3c146a4a 100644 --- a/legacy_ibc_testing/testing/app.go +++ b/legacy_ibc_testing/testing/app.go @@ -29,6 +29,7 @@ import ( "github.com/cosmos/interchain-security/v3/legacy_ibc_testing/core" "github.com/cosmos/interchain-security/v3/legacy_ibc_testing/simapp" consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) /* @@ -111,7 +112,7 @@ func SetupWithGenesisValSet(t *testing.T, appIniter AppIniter, valSet *tmtypes.V // set validators and delegations var ( stakingGenesis stakingtypes.GenesisState - consumerGenesis consumertypes.GenesisState + consumerGenesis ccvtypes.GenesisState bondDenom string ) if genesisState[stakingtypes.ModuleName] != nil { diff --git a/proto/interchain_security/ccv/consumer/v1/consumer.proto b/proto/interchain_security/ccv/consumer/v1/consumer.proto index 2b4b6f88c3..39d6eb29de 100644 --- a/proto/interchain_security/ccv/consumer/v1/consumer.proto +++ b/proto/interchain_security/ccv/consumer/v1/consumer.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package interchain_security.ccv.consumer.v1; -import "interchain_security/ccv/v1/ccv.proto"; +import "interchain_security/ccv/v1/wire.proto"; option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"; @@ -11,68 +11,17 @@ import "cosmos_proto/cosmos.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -// Params defines the parameters for CCV consumer module -message Params { - // 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 - // the provider chain. Note that at this transmission event a fraction of - // 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. - string distribution_transmission_channel = 3; - string provider_fee_pool_addr_str = 4; - // 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; -} - -// LastTransmissionBlockHeight is the last time validator holding -// pools were transmitted to the provider chain -message LastTransmissionBlockHeight { int64 height = 1; } - -// CrossChainValidator defines the validators for CCV consumer module +// +// 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. +// +// Note this type is only used internally to the consumer CCV module. message CrossChainValidator { bytes address = 1; int64 power = 2; @@ -83,17 +32,12 @@ message CrossChainValidator { ]; } -// MaturingVSCPacket contains the maturing time of a received VSCPacket -message MaturingVSCPacket { - uint64 vscId = 1; - google.protobuf.Timestamp maturity_time = 2 - [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; -} - // 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. message SlashRecord { bool waiting_on_reply = 1; google.protobuf.Timestamp send_time = 2 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; -} \ No newline at end of file +} diff --git a/proto/interchain_security/ccv/consumer/v1/genesis.proto b/proto/interchain_security/ccv/consumer/v1/genesis.proto deleted file mode 100644 index 3511f3f349..0000000000 --- a/proto/interchain_security/ccv/consumer/v1/genesis.proto +++ /dev/null @@ -1,58 +0,0 @@ -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/ccv.proto"; -import "interchain_security/ccv/consumer/v1/consumer.proto"; -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"; - -// GenesisState defines the CCV consumer chain genesis state -message GenesisState { - Params 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 GenesisState, 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 interchain_security.ccv.consumer.v1.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. - interchain_security.ccv.v1.ConsumerPacketDataList pending_consumer_packets = - 11 [ (gogoproto.nullable) = false ]; - // LastTransmissionBlockHeight nil on new chain, filled in on restart. - interchain_security.ccv.consumer.v1.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 defines the genesis information for the mapping -// of each block height to a valset update id -message HeightToValsetUpdateID { - uint64 height = 1; - uint64 valset_update_id = 2; -} - -// OutstandingDowntime defines the genesis information for each validator -// flagged with an outstanding downtime slashing. -message OutstandingDowntime { string validator_consensus_address = 1; } diff --git a/proto/interchain_security/ccv/consumer/v1/query.proto b/proto/interchain_security/ccv/consumer/v1/query.proto index 43a7b0bccc..ff2a5901fe 100644 --- a/proto/interchain_security/ccv/consumer/v1/query.proto +++ b/proto/interchain_security/ccv/consumer/v1/query.proto @@ -1,6 +1,7 @@ syntax = "proto3"; package interchain_security.ccv.consumer.v1; +import "interchain_security/ccv/v1/shared_consumer.proto"; option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"; import "gogoproto/gogo.proto"; @@ -54,7 +55,7 @@ message QueryParamsRequest {} // QueryParamsResponse is response type for the Query/Params RPC method. message QueryParamsResponse { // params holds all the parameters of this module. - Params params = 1 [ (gogoproto.nullable) = false ]; + interchain_security.ccv.v1.Params params = 1 [ (gogoproto.nullable) = false ]; } message QueryProviderInfoRequest {} diff --git a/proto/interchain_security/ccv/provider/v1/genesis.proto b/proto/interchain_security/ccv/provider/v1/genesis.proto index 1bc412262c..22da5c4200 100644 --- a/proto/interchain_security/ccv/provider/v1/genesis.proto +++ b/proto/interchain_security/ccv/provider/v1/genesis.proto @@ -5,10 +5,9 @@ package interchain_security.ccv.provider.v1; option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/provider/types"; import "gogoproto/gogo.proto"; -import "interchain_security/ccv/v1/ccv.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 "interchain_security/ccv/consumer/v1/consumer.proto"; -import "interchain_security/ccv/consumer/v1/genesis.proto"; import "tendermint/crypto/keys.proto"; // GenesisState defines the CCV provider chain genesis state @@ -24,7 +23,7 @@ message GenesisState { repeated interchain_security.ccv.provider.v1.UnbondingOp unbonding_ops = 3 [ (gogoproto.nullable) = false ]; // empty for a new chain - interchain_security.ccv.v1.MaturedUnbondingOps mature_unbonding_ops = 4; + interchain_security.ccv.provider.v1.MaturedUnbondingOps mature_unbonding_ops = 4; // empty for a new chain repeated ValsetUpdateIdToHeight valset_update_id_to_height = 5 [ (gogoproto.nullable) = false ]; @@ -52,7 +51,9 @@ message GenesisState { [ (gogoproto.nullable) = false ]; } -// consumer chain +// The provider CCV module's knowledge of consumer state. +// +// Note this type is only used internally to the provider CCV module. message ConsumerState { // ChainID defines the chain ID for the consumer chain string chain_id = 1; @@ -63,7 +64,7 @@ message ConsumerState { // InitalHeight defines the initial block height for the consumer chain uint64 initial_height = 4; // ConsumerGenesis defines the initial consumer chain genesis states - interchain_security.ccv.consumer.v1.GenesisState consumer_genesis = 5 + interchain_security.ccv.v1.GenesisState consumer_genesis = 5 [ (gogoproto.nullable) = false ]; // PendingValsetChanges defines the pending validator set changes for the // consumer chain diff --git a/proto/interchain_security/ccv/provider/v1/provider.proto b/proto/interchain_security/ccv/provider/v1/provider.proto index 3c41e01c89..9423e1f924 100644 --- a/proto/interchain_security/ccv/provider/v1/provider.proto +++ b/proto/interchain_security/ccv/provider/v1/provider.proto @@ -4,6 +4,8 @@ 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"; import "google/protobuf/duration.proto"; @@ -13,6 +15,11 @@ import "tendermint/crypto/keys.proto"; import "cosmos/evidence/v1beta1/evidence.proto"; import "cosmos/base/v1beta1/coin.proto"; +// +// Note any type defined in this file is ONLY used internally to the provider CCV module. +// These schemas can change with proper consideration of compatibility or migration. +// + // ConsumerAdditionProposal is a governance proposal on the provider chain to // spawn a new consumer chain. If it passes, then all validators on the provider // chain are expected to validate the consumer chain at spawn time or get @@ -96,6 +103,10 @@ message ConsumerRemovalProposal { [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; } +// EquivocationProposal is a governance proposal on the provider chain to +// punish a validator for equivocation on a consumer chain. +// +// This type is only used internally to the consumer CCV module. message EquivocationProposal { // the title of the proposal string title = 1; @@ -164,13 +175,8 @@ message Params { [ (gogoproto.nullable) = false ]; } -message HandshakeMetadata { - string provider_fee_pool_addr = 1; - string version = 2; -} - // SlashAcks contains cons addresses of consumer chain validators -// successfully slashed on the provider chain +// successfully slashed on the provider chain. message SlashAcks { repeated string addresses = 1; } // ConsumerAdditionProposals holds pending governance proposals on the provider @@ -221,6 +227,16 @@ message VscSendTimestamp { [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; } +// ValidatorSetChangePackets is a pb list of ccv.ValidatorSetChangePacketData. +message ValidatorSetChangePackets { + repeated interchain_security.ccv.v1.ValidatorSetChangePacketData list = 1 + [ (gogoproto.nullable) = false ]; +} + +// MaturedUnbondingOps defines a list of ids corresponding to ids of matured +// unbonding operations. +message MaturedUnbondingOps { repeated uint64 ids = 1; } + // ExportedVscSendTimestamps is VscSendTimestamp with chainID info for exporting to genesis message ExportedVscSendTimestamp { string chain_id = 1; diff --git a/proto/interchain_security/ccv/provider/v1/query.proto b/proto/interchain_security/ccv/provider/v1/query.proto index c96f8a8cf0..6e3dd0d3d7 100644 --- a/proto/interchain_security/ccv/provider/v1/query.proto +++ b/proto/interchain_security/ccv/provider/v1/query.proto @@ -6,9 +6,9 @@ option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/provider/typ import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -import "interchain_security/ccv/v1/ccv.proto"; -import "interchain_security/ccv/consumer/v1/genesis.proto"; import "interchain_security/ccv/provider/v1/provider.proto"; +import "interchain_security/ccv/v1/shared_consumer.proto"; +import "interchain_security/ccv/v1/wire.proto"; service Query { // ConsumerGenesis queries the genesis state needed to start a consumer chain @@ -85,7 +85,7 @@ service Query { message QueryConsumerGenesisRequest { string chain_id = 1; } message QueryConsumerGenesisResponse { - interchain_security.ccv.consumer.v1.GenesisState genesis_state = 1 + interchain_security.ccv.v1.GenesisState genesis_state = 1 [ (gogoproto.nullable) = false ]; } diff --git a/proto/interchain_security/ccv/v1/shared_consumer.proto b/proto/interchain_security/ccv/v1/shared_consumer.proto new file mode 100644 index 0000000000..825a84e346 --- /dev/null +++ b/proto/interchain_security/ccv/v1/shared_consumer.proto @@ -0,0 +1,156 @@ +syntax = "proto3"; + +package interchain_security.ccv.v1; + +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! +// + +// Params 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. +// +// TODO: Rename to ConsumerParams. See https://github.com/cosmos/interchain-security/issues/1206 +message Params { + // 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 + // the provider chain. Note that at this transmission event a fraction of + // 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. + string distribution_transmission_channel = 3; + string provider_fee_pool_addr_str = 4; + // 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; +} + +// GenesisState 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. +// +// TODO: Rename to ConsumerGenesisState. See https://github.com/cosmos/interchain-security/issues/1206 +message GenesisState { + Params 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 GenesisState, 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 ]; +} + +// 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 ]; +} diff --git a/proto/interchain_security/ccv/v1/ccv.proto b/proto/interchain_security/ccv/v1/wire.proto similarity index 83% rename from proto/interchain_security/ccv/v1/ccv.proto rename to proto/interchain_security/ccv/v1/wire.proto index adf8f418de..57dcbc8847 100644 --- a/proto/interchain_security/ccv/v1/ccv.proto +++ b/proto/interchain_security/ccv/v1/wire.proto @@ -9,6 +9,12 @@ import "cosmos/staking/v1beta1/staking.proto"; import "gogoproto/gogo.proto"; import "tendermint/abci/types.proto"; +// +// Note any type defined in this file is used by both the consumer and provider +// AND SENT OVER THE WIRE via a ccv channel. Ideally these schemas should never change, or at least +// be backwards compatible if ever changed. +// + // This packet is sent from provider chain to consumer chain if the validator // set for consumer chain changes (due to new bonding/unbonding messages or // slashing events) A VSCMatured packet from consumer chain will be sent @@ -25,12 +31,6 @@ message ValidatorSetChangePacketData { repeated string slash_acks = 3; } -// List of ccv.ValidatorSetChangePacketData. -message ValidatorSetChangePackets { - repeated ValidatorSetChangePacketData list = 1 - [ (gogoproto.nullable) = false ]; -} - // This packet is sent from the consumer chain to the provider chain // to notify that a VSC packet reached maturity on the consumer chain. message VSCMaturedPacketData { @@ -52,11 +52,7 @@ message SlashPacketData { cosmos.staking.v1beta1.Infraction infraction = 3; } -// MaturedUnbondingOps defines a list of ids corresponding to ids of matured -// unbonding operations. -message MaturedUnbondingOps { repeated uint64 ids = 1; } - -// ConsumerPacketData contains a consumer packet data, type tag, and index for storage. +// ConsumerPacketData contains a consumer packet data and a type tag message ConsumerPacketData { ConsumerPacketDataType type = 1; @@ -66,13 +62,6 @@ message ConsumerPacketData { } } - -// ConsumerPacketDataList is a list of consumer packet data packets. -// NOTE: It is only used for exporting / importing state in InitGenesis and ExportGenesis. -message ConsumerPacketDataList { - repeated ConsumerPacketData list = 1 [ (gogoproto.nullable) = false ]; -} - // ConsumerPacketType indicates interchain security specific packet types. enum ConsumerPacketDataType { option (gogoproto.goproto_enum_prefix) = false; @@ -88,6 +77,12 @@ enum ConsumerPacketDataType { [ (gogoproto.enumvalue_customname) = "VscMaturedPacket" ]; } +// Note this type is used during IBC handshake methods for both the consumer and provider +message HandshakeMetadata { + string provider_fee_pool_addr = 1; + string version = 2; +} + // ConsumerPacketData contains a consumer packet data and a type tag // that is compatible with ICS v1 and v2 over the wire. It is not used for internal storage. message ConsumerPacketDataV1 { @@ -113,7 +108,7 @@ message SlashPacketDataV1 { } // InfractionType indicates the infraction type a validator commited. -// NOTE: ccv.InfractionType to maintain compatibility between ICS versions +// Note ccv.InfractionType to maintain compatibility between ICS versions // using different versions of the cosmos-sdk and ibc-go modules. enum InfractionType { option (gogoproto.goproto_enum_prefix) = false; diff --git a/tests/difference/core/driver/setup.go b/tests/difference/core/driver/setup.go index fb5bf6a611..9ca6d00b9f 100644 --- a/tests/difference/core/driver/setup.go +++ b/tests/difference/core/driver/setup.go @@ -206,7 +206,7 @@ func (b *Builder) getAppBytesAndSenders( bondDenom := sdk.DefaultBondDenom genesisStaking := stakingtypes.GenesisState{} - genesisConsumer := consumertypes.GenesisState{} + genesisConsumer := ccv.GenesisState{} if genesis[stakingtypes.ModuleName] != nil { // If staking module genesis already exists @@ -520,25 +520,25 @@ func (b *Builder) createConsumersLocalClientGenesis() *ibctmtypes.ClientState { ) } -func (b *Builder) createConsumerGenesis(client *ibctmtypes.ClientState) *consumertypes.GenesisState { +func (b *Builder) createConsumerGenesis(client *ibctmtypes.ClientState) *ccv.GenesisState { providerConsState := b.provider().LastHeader.ConsensusState() valUpdates := tmtypes.TM2PB.ValidatorUpdates(b.provider().Vals) - params := consumertypes.NewParams( + params := ccv.NewParams( true, 1000, // ignore distribution "", // ignore distribution "", // ignore distribution ccv.DefaultCCVTimeoutPeriod, - consumertypes.DefaultTransferTimeoutPeriod, - consumertypes.DefaultConsumerRedistributeFrac, - consumertypes.DefaultHistoricalEntries, + ccv.DefaultTransferTimeoutPeriod, + ccv.DefaultConsumerRedistributeFrac, + ccv.DefaultHistoricalEntries, b.initState.UnbondingC, "0", // disable soft opt-out []string{}, []string{}, ) - return consumertypes.NewInitialGenesisState(client, providerConsState, valUpdates, params) + return ccv.NewInitialGenesisState(client, providerConsState, valUpdates, params) } // The state of the data returned is equivalent to the state of two chains diff --git a/tests/e2e/actions.go b/tests/e2e/actions.go index e5ac465aa0..d7fba4a358 100644 --- a/tests/e2e/actions.go +++ b/tests/e2e/actions.go @@ -17,9 +17,9 @@ import ( evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types" - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" "github.com/cosmos/interchain-security/v3/x/ccv/provider/client" "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) type SendTokensAction struct { @@ -235,7 +235,7 @@ func (tr TestRun) submitConsumerAdditionProposal( verbose bool, ) { spawnTime := tr.containerConfig.now.Add(time.Duration(action.spawnTime) * time.Millisecond) - params := consumertypes.DefaultParams() + params := ccvtypes.DefaultParams() prop := client.ConsumerAdditionProposalJSON{ Title: "Propose the addition of a new chain", Summary: "Gonna be a great chain", diff --git a/tests/integration/distribution.go b/tests/integration/distribution.go index a896a6f22b..5d5c50220a 100644 --- a/tests/integration/distribution.go +++ b/tests/integration/distribution.go @@ -34,7 +34,7 @@ func (s *CCVTestSuite) TestRewardsDistribution() { // reward for the provider chain will be sent after each 2 blocks consumerParams := s.consumerApp.GetSubspace(consumertypes.ModuleName) - consumerParams.Set(s.consumerCtx(), consumertypes.KeyBlocksPerDistributionTransmission, int64(2)) + consumerParams.Set(s.consumerCtx(), ccv.KeyBlocksPerDistributionTransmission, int64(2)) s.consumerChain.NextBlock() consumerAccountKeeper := s.consumerApp.GetTestAccountKeeper() @@ -166,7 +166,7 @@ func (s *CCVTestSuite) TestSendRewardsRetries() { // reward for the provider chain will be sent after each 1000 blocks consumerParams := s.consumerApp.GetSubspace(consumertypes.ModuleName) - consumerParams.Set(s.consumerCtx(), consumertypes.KeyBlocksPerDistributionTransmission, int64(1000)) + consumerParams.Set(s.consumerCtx(), ccv.KeyBlocksPerDistributionTransmission, int64(1000)) // fill fee pool fees := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))) @@ -296,7 +296,7 @@ func (s *CCVTestSuite) TestEndBlockRD() { // reward for the provider chain will be sent after each 1000 blocks consumerParams := s.consumerApp.GetSubspace(consumertypes.ModuleName) - consumerParams.Set(s.consumerCtx(), consumertypes.KeyBlocksPerDistributionTransmission, int64(1000)) + consumerParams.Set(s.consumerCtx(), ccv.KeyBlocksPerDistributionTransmission, int64(1000)) // fill fee pool fees := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))) diff --git a/tests/integration/normal_operations.go b/tests/integration/normal_operations.go index b676689e89..cd8e07f323 100644 --- a/tests/integration/normal_operations.go +++ b/tests/integration/normal_operations.go @@ -6,6 +6,7 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // Tests the tracking of historical info in the context of new blocks being committed @@ -73,7 +74,7 @@ func (k CCVTestSuite) TestHistoricalInfo() { //nolint:govet // this is a test so expLen: 0, }, { - height: initHeight + consumertypes.DefaultHistoricalEntries + 2, + height: initHeight + ccvtypes.DefaultHistoricalEntries + 2, found: true, expLen: initValsetLen + 2, }, diff --git a/tests/integration/setup.go b/tests/integration/setup.go index a18ff551e4..61cb8a96c9 100644 --- a/tests/integration/setup.go +++ b/tests/integration/setup.go @@ -16,7 +16,6 @@ import ( ibctesting "github.com/cosmos/interchain-security/v3/legacy_ibc_testing/testing" icstestingutils "github.com/cosmos/interchain-security/v3/testutil/ibc_testing" testutil "github.com/cosmos/interchain-security/v3/testutil/integration" - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -152,7 +151,7 @@ func (suite *CCVTestSuite) SetupTest() { func initConsumerChain( s *CCVTestSuite, chainID string, - genesisState *consumertypes.GenesisState, + genesisState *ccv.GenesisState, ) { providerKeeper := s.providerApp.GetProviderKeeper() bundle := s.consumerBundles[chainID] diff --git a/testutil/keeper/unit_test_helpers.go b/testutil/keeper/unit_test_helpers.go index 10eb7dad48..77b4df9c10 100644 --- a/testutil/keeper/unit_test_helpers.go +++ b/testutil/keeper/unit_test_helpers.go @@ -265,13 +265,13 @@ func GetTestConsumerAdditionProp() *providertypes.ConsumerAdditionProposal { []byte("gen_hash"), []byte("bin_hash"), time.Now(), - consumertypes.DefaultConsumerRedistributeFrac, - consumertypes.DefaultBlocksPerDistributionTransmission, + types.DefaultConsumerRedistributeFrac, + types.DefaultBlocksPerDistributionTransmission, "", - consumertypes.DefaultHistoricalEntries, + types.DefaultHistoricalEntries, types.DefaultCCVTimeoutPeriod, - consumertypes.DefaultTransferTimeoutPeriod, - consumertypes.DefaultConsumerUnbondingPeriod, + types.DefaultTransferTimeoutPeriod, + types.DefaultConsumerUnbondingPeriod, ).(*providertypes.ConsumerAdditionProposal) return prop diff --git a/x/ccv/consumer/ibc_module.go b/x/ccv/consumer/ibc_module.go index 74c4cff27c..93b8096092 100644 --- a/x/ccv/consumer/ibc_module.go +++ b/x/ccv/consumer/ibc_module.go @@ -18,7 +18,6 @@ import ( "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper" consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" - providertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -127,7 +126,7 @@ func (am AppModule) OnChanOpenAck( "provider channel: %s already established", providerChannel) } - var md providertypes.HandshakeMetadata + var md types.HandshakeMetadata if err := (&md).Unmarshal([]byte(counterpartyMetadata)); err != nil { return errorsmod.Wrapf(types.ErrInvalidHandshakeMetadata, "error unmarshalling ibc-ack metadata: \n%v; \nmetadata: %v", err, counterpartyMetadata) diff --git a/x/ccv/consumer/ibc_module_test.go b/x/ccv/consumer/ibc_module_test.go index a451625230..25cbac58a2 100644 --- a/x/ccv/consumer/ibc_module_test.go +++ b/x/ccv/consumer/ibc_module_test.go @@ -16,7 +16,6 @@ import ( testkeeper "github.com/cosmos/interchain-security/v3/testutil/keeper" "github.com/cosmos/interchain-security/v3/x/ccv/consumer" consumerkeeper "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper" - providertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -262,7 +261,7 @@ func TestOnChanOpenAck(t *testing.T) { { "invalid: mismatched serialized version", func(keeper *consumerkeeper.Keeper, params *params, mocks testkeeper.MockedKeepers) { - md := providertypes.HandshakeMetadata{ + md := ccv.HandshakeMetadata{ ProviderFeePoolAddr: "", // dummy address used Version: "bunkVersion", } @@ -288,7 +287,7 @@ func TestOnChanOpenAck(t *testing.T) { counterpartyChannelID: "providerCCVChannelID", } - metadata := providertypes.HandshakeMetadata{ + metadata := ccv.HandshakeMetadata{ ProviderFeePoolAddr: "someAcct", Version: ccv.Version, } diff --git a/x/ccv/consumer/keeper/distribution.go b/x/ccv/consumer/keeper/distribution.go index 48f1c5a1eb..5fe416ea2b 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 := types.LastTransmissionBlockHeight{ + newLtbh := ccv.LastTransmissionBlockHeight{ Height: ctx.BlockHeight(), } k.SetLastTransmissionBlockHeight(ctx, newLtbh) @@ -190,10 +190,10 @@ func (k Keeper) AllowedRewardDenoms(ctx sdk.Context) []string { return rewardDenoms } -func (k Keeper) GetLastTransmissionBlockHeight(ctx sdk.Context) types.LastTransmissionBlockHeight { +func (k Keeper) GetLastTransmissionBlockHeight(ctx sdk.Context) ccv.LastTransmissionBlockHeight { store := ctx.KVStore(k.storeKey) bz := store.Get(types.LastDistributionTransmissionKey()) - ltbh := types.LastTransmissionBlockHeight{} + ltbh := ccv.LastTransmissionBlockHeight{} if bz != nil { if err := ltbh.Unmarshal(bz); err != nil { panic(fmt.Errorf("failed to unmarshal LastTransmissionBlockHeight: %w", err)) @@ -202,7 +202,7 @@ func (k Keeper) GetLastTransmissionBlockHeight(ctx sdk.Context) types.LastTransm return ltbh } -func (k Keeper) SetLastTransmissionBlockHeight(ctx sdk.Context, ltbh types.LastTransmissionBlockHeight) { +func (k Keeper) SetLastTransmissionBlockHeight(ctx sdk.Context, ltbh ccv.LastTransmissionBlockHeight) { store := ctx.KVStore(k.storeKey) bz, err := ltbh.Marshal() if err != nil { diff --git a/x/ccv/consumer/keeper/distribution_test.go b/x/ccv/consumer/keeper/distribution_test.go index 71df5fd93d..4a611f2d1e 100644 --- a/x/ccv/consumer/keeper/distribution_test.go +++ b/x/ccv/consumer/keeper/distribution_test.go @@ -12,6 +12,7 @@ import ( testkeeper "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" ) // TestGetEstimatedNextFeeDistribution tests next fee distribution parameters. @@ -25,7 +26,7 @@ func TestGetEstimatedNextFeeDistribution(t *testing.T) { mockAccountKeeper := mocks.MockAccountKeeper mockBankKeeper := mocks.MockBankKeeper consumerKeeper := testkeeper.NewInMemConsumerKeeper(keeperParams, mocks) - consumerKeeper.SetParams(ctx, types.DefaultParams()) + consumerKeeper.SetParams(ctx, ccvtypes.DefaultParams()) // Setup mock account balance fracParam := consumerKeeper.GetConsumerRedistributionFrac(ctx) @@ -76,7 +77,7 @@ func TestAllowedRewardDenoms(t *testing.T) { defer ctrl.Finish() mocks := testkeeper.NewMockedKeepers(ctrl) consumerKeeper := testkeeper.NewInMemConsumerKeeper(keeperParams, mocks) - params := types.DefaultParams() + params := ccvtypes.DefaultParams() params.RewardDenoms = []string{"ustake"} params.ProviderRewardDenoms = []string{"uatom"} consumerKeeper.SetParams(ctx, params) diff --git a/x/ccv/consumer/keeper/genesis.go b/x/ccv/consumer/keeper/genesis.go index a55184fd27..2ac38f650c 100644 --- a/x/ccv/consumer/keeper/genesis.go +++ b/x/ccv/consumer/keeper/genesis.go @@ -7,7 +7,6 @@ import ( abci "github.com/cometbft/cometbft/abci/types" - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -17,7 +16,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 *consumertypes.GenesisState) []abci.ValidatorUpdate { +func (k Keeper) InitGenesis(ctx sdk.Context, state *ccv.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. @@ -116,10 +115,10 @@ func (k Keeper) InitGenesis(ctx sdk.Context, state *consumertypes.GenesisState) } // ExportGenesis returns the CCV consumer module's exported genesis -func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *consumertypes.GenesisState) { +func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *ccv.GenesisState) { params := k.GetConsumerParams(ctx) if !params.Enabled { - return consumertypes.DefaultGenesisState() + return ccv.DefaultGenesisState() } // export the current validator set @@ -138,7 +137,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *consumertypes.GenesisSt panic("provider client does not exist although provider channel does exist") } - genesis = consumertypes.NewRestartGenesisState( + genesis = ccv.NewRestartGenesisState( clientID, channelID, k.GetAllPacketMaturityTimes(ctx), @@ -154,11 +153,11 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *consumertypes.GenesisSt // 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 consumertypes.DefaultGenesisState() + return ccv.DefaultGenesisState() } // export client states and pending slashing requests into a new chain genesis - genesis = consumertypes.NewRestartGenesisState( + genesis = ccv.NewRestartGenesisState( clientID, "", nil, @@ -166,7 +165,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) (genesis *consumertypes.GenesisSt k.GetAllHeightToValsetUpdateIDs(ctx), pendingPacketsDepreciated, nil, - consumertypes.LastTransmissionBlockHeight{}, + ccv.LastTransmissionBlockHeight{}, params, ) } diff --git a/x/ccv/consumer/keeper/genesis_test.go b/x/ccv/consumer/keeper/genesis_test.go index 649505da0c..9cb489b3c0 100644 --- a/x/ccv/consumer/keeper/genesis_test.go +++ b/x/ccv/consumer/keeper/genesis_test.go @@ -61,7 +61,7 @@ func TestInitGenesis(t *testing.T) { []string{"upgrade", "upgradedIBCState"}, ) - matPackets := []consumertypes.MaturingVSCPacket{ + matPackets := []ccv.MaturingVSCPacket{ { VscId: 1, MaturityTime: time.Now().UTC(), @@ -84,15 +84,15 @@ func TestInitGenesis(t *testing.T) { }, } // mock height to valset update ID values - defaultHeightValsetUpdateIDs := []consumertypes.HeightToValsetUpdateID{ + defaultHeightValsetUpdateIDs := []ccv.HeightToValsetUpdateID{ {ValsetUpdateId: vscID, Height: blockHeight}, } updatedHeightValsetUpdateIDs := append(defaultHeightValsetUpdateIDs, - consumertypes.HeightToValsetUpdateID{ValsetUpdateId: vscID + 1, Height: blockHeight + 1}, + ccv.HeightToValsetUpdateID{ValsetUpdateId: vscID + 1, Height: blockHeight + 1}, ) // create default parameters for a new chain - params := consumertypes.DefaultParams() + params := ccv.DefaultParams() params.Enabled = true // define three test cases which respectively create a genesis struct, use it to call InitGenesis @@ -100,8 +100,8 @@ func TestInitGenesis(t *testing.T) { testCases := []struct { name string malleate func(sdk.Context, testkeeper.MockedKeepers) - genesis *consumertypes.GenesisState - assertStates func(sdk.Context, consumerkeeper.Keeper, *consumertypes.GenesisState) + genesis *ccv.GenesisState + assertStates func(sdk.Context, consumerkeeper.Keeper, *ccv.GenesisState) }{ { "start a new chain", @@ -112,13 +112,13 @@ func TestInitGenesis(t *testing.T) { testkeeper.ExpectGetCapabilityMock(ctx, mocks, 1), ) }, - consumertypes.NewInitialGenesisState( + ccv.NewInitialGenesisState( provClientState, provConsState, valset, params, ), - func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *consumertypes.GenesisState) { + func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *ccv.GenesisState) { assertConsumerPortIsBound(t, ctx, &ck) assertProviderClientID(t, ctx, &ck, provClientID) @@ -134,7 +134,7 @@ func TestInitGenesis(t *testing.T) { testkeeper.ExpectGetCapabilityMock(ctx, mocks, 2), ) }, - consumertypes.NewRestartGenesisState( + ccv.NewRestartGenesisState( provClientID, "", matPackets, @@ -142,10 +142,10 @@ func TestInitGenesis(t *testing.T) { defaultHeightValsetUpdateIDs, pendingDataPackets, nil, - consumertypes.LastTransmissionBlockHeight{}, + ccv.LastTransmissionBlockHeight{}, params, ), - func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *consumertypes.GenesisState) { + func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *ccv.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 - consumertypes.NewRestartGenesisState( + ccv.NewRestartGenesisState( provClientID, provChannelID, matPackets, valset, updatedHeightValsetUpdateIDs, pendingDataPackets, - []consumertypes.OutstandingDowntime{ + []ccv.OutstandingDowntime{ {ValidatorConsensusAddress: sdk.ConsAddress(validator.Bytes()).String()}, }, - consumertypes.LastTransmissionBlockHeight{Height: int64(100)}, + ccv.LastTransmissionBlockHeight{Height: int64(100)}, params, ), - func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *consumertypes.GenesisState) { + func(ctx sdk.Context, ck consumerkeeper.Keeper, gs *ccv.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 := []consumertypes.MaturingVSCPacket{ + matPackets := []ccv.MaturingVSCPacket{ { VscId: 1, MaturityTime: time.Now().UTC(), @@ -272,15 +272,15 @@ func TestExportGenesis(t *testing.T) { }, } // mock height to valset update ID values - defaultHeightValsetUpdateIDs := []consumertypes.HeightToValsetUpdateID{ + defaultHeightValsetUpdateIDs := []ccv.HeightToValsetUpdateID{ {ValsetUpdateId: vscID, Height: blockHeight}, } updatedHeightValsetUpdateIDs := append(defaultHeightValsetUpdateIDs, - consumertypes.HeightToValsetUpdateID{ValsetUpdateId: vscID + 1, Height: blockHeight + 1}, + ccv.HeightToValsetUpdateID{ValsetUpdateId: vscID + 1, Height: blockHeight + 1}, ) - ltbh := consumertypes.LastTransmissionBlockHeight{Height: int64(1000)} + ltbh := ccv.LastTransmissionBlockHeight{Height: int64(1000)} // create default parameters for a new chain - params := consumertypes.DefaultParams() + params := ccv.DefaultParams() params.Enabled = true // define two test cases which respectively populate the consumer chain store @@ -289,7 +289,7 @@ func TestExportGenesis(t *testing.T) { testCases := []struct { name string malleate func(sdk.Context, consumerkeeper.Keeper, testkeeper.MockedKeepers) - expGenesis *consumertypes.GenesisState + expGenesis *ccv.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) }, - consumertypes.NewRestartGenesisState( + ccv.NewRestartGenesisState( provClientID, "", nil, @@ -315,7 +315,7 @@ func TestExportGenesis(t *testing.T) { defaultHeightValsetUpdateIDs, consPackets, nil, - consumertypes.LastTransmissionBlockHeight{}, + ccv.LastTransmissionBlockHeight{}, params, ), }, @@ -343,14 +343,14 @@ func TestExportGenesis(t *testing.T) { ck.SetOutstandingDowntime(ctx, sdk.ConsAddress(validator.Address.Bytes())) ck.SetLastTransmissionBlockHeight(ctx, ltbh) }, - consumertypes.NewRestartGenesisState( + ccv.NewRestartGenesisState( provClientID, provChannelID, matPackets, valset, updatedHeightValsetUpdateIDs, consPackets, - []consumertypes.OutstandingDowntime{ + []ccv.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 []consumertypes.HeightToValsetUpdateID) { +func assertHeightValsetUpdateIDs(t *testing.T, ctx sdk.Context, ck *consumerkeeper.Keeper, heighValsetUpdateIDs []ccv.HeightToValsetUpdateID) { t.Helper() ctr := 0 diff --git a/x/ccv/consumer/keeper/keeper.go b/x/ccv/consumer/keeper/keeper.go index 94d5c790fd..2d3e78e0f8 100644 --- a/x/ccv/consumer/keeper/keeper.go +++ b/x/ccv/consumer/keeper/keeper.go @@ -64,7 +64,7 @@ func NewKeeper( ) Keeper { // set KeyTable if it has not already been set if !paramSpace.HasKeyTable() { - paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) + paramSpace = paramSpace.WithKeyTable(ccv.ParamKeyTable()) } k := Keeper{ @@ -309,7 +309,7 @@ func (k Keeper) DeletePreCCV(ctx sdk.Context) { func (k Keeper) SetInitialValSet(ctx sdk.Context, initialValSet []tmtypes.ValidatorUpdate) { store := ctx.KVStore(k.storeKey) - initialValSetState := types.GenesisState{ + initialValSetState := ccv.GenesisState{ InitialValSet: initialValSet, } bz := k.cdc.MustMarshal(&initialValSetState) @@ -318,7 +318,7 @@ 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 := types.GenesisState{} + initialValSet := ccv.GenesisState{} bz := store.Get(types.InitialValSetKey()) if bz != nil { k.cdc.MustUnmarshal(bz, &initialValSet) @@ -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 []types.MaturingVSCPacket) { +func (k Keeper) GetElapsedPacketMaturityTimes(ctx sdk.Context) (maturingVSCPackets []ccv.MaturingVSCPacket) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, []byte{types.PacketMaturityTimeBytePrefix}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - var maturingVSCPacket types.MaturingVSCPacket + var maturingVSCPacket ccv.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 []types.MaturingVSCPacket) { +func (k Keeper) GetAllPacketMaturityTimes(ctx sdk.Context) (maturingVSCPackets []ccv.MaturingVSCPacket) { store := ctx.KVStore(k.storeKey) iterator := sdk.KVStorePrefixIterator(store, []byte{types.PacketMaturityTimeBytePrefix}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - var maturingVSCPacket types.MaturingVSCPacket + var maturingVSCPacket ccv.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 := types.MaturingVSCPacket{ + maturingVSCPacket := ccv.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 []types.HeightToValsetUpdateID) { +func (k Keeper) GetAllHeightToValsetUpdateIDs(ctx sdk.Context) (heightToValsetUpdateIDs []ccv.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, types.HeightToValsetUpdateID{ + heightToValsetUpdateIDs = append(heightToValsetUpdateIDs, ccv.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 []types.OutstandingDowntime) { +func (k Keeper) GetAllOutstandingDowntimes(ctx sdk.Context) (downtimes []ccv.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 []types.O addrBytes := iterator.Key()[1:] addr := sdk.ConsAddress(addrBytes).String() - downtimes = append(downtimes, types.OutstandingDowntime{ + downtimes = append(downtimes, ccv.OutstandingDowntime{ ValidatorConsensusAddress: addr, }) } diff --git a/x/ccv/consumer/keeper/keeper_test.go b/x/ccv/consumer/keeper/keeper_test.go index 06fdeae082..4b536a071a 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 := []types.MaturingVSCPacket{ + packets := []ccv.MaturingVSCPacket{ { VscId: 2, MaturityTime: now, @@ -220,9 +220,9 @@ func TestPacketMaturityTime(t *testing.T) { }, } // sort by MaturityTime and not by VscId - expectedGetAllOrder := []types.MaturingVSCPacket{packets[2], packets[1], packets[0], packets[3]} + expectedGetAllOrder := []ccv.MaturingVSCPacket{packets[2], packets[1], packets[0], packets[3]} // only packets with MaturityTime before or equal to now - expectedGetElapsedOrder := []types.MaturingVSCPacket{packets[2], packets[1], packets[0]} + expectedGetElapsedOrder := []ccv.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 := []types.HeightToValsetUpdateID{ + cases := []ccv.HeightToValsetUpdateID{ { ValsetUpdateId: 2, Height: 22, @@ -549,9 +549,9 @@ func TestGetAllOutstandingDowntimes(t *testing.T) { sdk.ConsAddress([]byte("consAddress4")), sdk.ConsAddress([]byte("consAddress3")), } - expectedGetAllOrder := []types.OutstandingDowntime{} + expectedGetAllOrder := []ccv.OutstandingDowntime{} for _, addr := range addresses { - expectedGetAllOrder = append(expectedGetAllOrder, types.OutstandingDowntime{ValidatorConsensusAddress: addr.String()}) + expectedGetAllOrder = append(expectedGetAllOrder, ccv.OutstandingDowntime{ValidatorConsensusAddress: addr.String()}) } // sorting by ConsAddress sort.Slice(expectedGetAllOrder, func(i, j int) bool { diff --git a/x/ccv/consumer/keeper/params.go b/x/ccv/consumer/keeper/params.go index ccffd96ee5..770edf229e 100644 --- a/x/ccv/consumer/keeper/params.go +++ b/x/ccv/consumer/keeper/params.go @@ -6,14 +6,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // GetParams returns the params for the consumer ccv module // NOTE: it is different from the GetParams method which is required to implement StakingKeeper interface -func (k Keeper) GetConsumerParams(ctx sdk.Context) types.Params { - return types.NewParams( +func (k Keeper) GetConsumerParams(ctx sdk.Context) ccvtypes.Params { + return ccvtypes.NewParams( k.GetEnabled(ctx), k.GetBlocksPerDistributionTransmission(ctx), k.GetDistributionTransmissionChannel(ctx), @@ -30,7 +29,7 @@ func (k Keeper) GetConsumerParams(ctx sdk.Context) types.Params { } // SetParams sets the paramset for the consumer module -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { +func (k Keeper) SetParams(ctx sdk.Context, params ccvtypes.Params) { k.paramStore.SetParamSet(ctx, ¶ms) } @@ -45,38 +44,38 @@ func (k Keeper) GetParams(ctx sdk.Context) stakingtypes.Params { // GetEnabled returns the enabled flag for the consumer module func (k Keeper) GetEnabled(ctx sdk.Context) bool { var enabled bool - k.paramStore.Get(ctx, types.KeyEnabled, &enabled) + k.paramStore.Get(ctx, ccvtypes.KeyEnabled, &enabled) return enabled } func (k Keeper) GetBlocksPerDistributionTransmission(ctx sdk.Context) int64 { var bpdt int64 - k.paramStore.Get(ctx, types.KeyBlocksPerDistributionTransmission, &bpdt) + k.paramStore.Get(ctx, ccvtypes.KeyBlocksPerDistributionTransmission, &bpdt) return bpdt } func (k Keeper) SetBlocksPerDistributionTransmission(ctx sdk.Context, bpdt int64) { - k.paramStore.Set(ctx, types.KeyBlocksPerDistributionTransmission, bpdt) + k.paramStore.Set(ctx, ccvtypes.KeyBlocksPerDistributionTransmission, bpdt) } func (k Keeper) GetDistributionTransmissionChannel(ctx sdk.Context) string { var s string - k.paramStore.Get(ctx, types.KeyDistributionTransmissionChannel, &s) + k.paramStore.Get(ctx, ccvtypes.KeyDistributionTransmissionChannel, &s) return s } func (k Keeper) SetDistributionTransmissionChannel(ctx sdk.Context, channel string) { - k.paramStore.Set(ctx, types.KeyDistributionTransmissionChannel, channel) + k.paramStore.Set(ctx, ccvtypes.KeyDistributionTransmissionChannel, channel) } func (k Keeper) GetProviderFeePoolAddrStr(ctx sdk.Context) string { var s string - k.paramStore.Get(ctx, types.KeyProviderFeePoolAddrStr, &s) + k.paramStore.Get(ctx, ccvtypes.KeyProviderFeePoolAddrStr, &s) return s } func (k Keeper) SetProviderFeePoolAddrStr(ctx sdk.Context, addr string) { - k.paramStore.Set(ctx, types.KeyProviderFeePoolAddrStr, addr) + k.paramStore.Set(ctx, ccvtypes.KeyProviderFeePoolAddrStr, addr) } // GetCCVTimeoutPeriod returns the timeout period for sent ccv related ibc packets @@ -89,7 +88,7 @@ func (k Keeper) GetCCVTimeoutPeriod(ctx sdk.Context) time.Duration { // GetTransferTimeoutPeriod returns the timeout period for sent transfer related ibc packets func (k Keeper) GetTransferTimeoutPeriod(ctx sdk.Context) time.Duration { var p time.Duration - k.paramStore.Get(ctx, types.KeyTransferTimeoutPeriod, &p) + k.paramStore.Get(ctx, ccvtypes.KeyTransferTimeoutPeriod, &p) return p } @@ -98,25 +97,25 @@ func (k Keeper) GetTransferTimeoutPeriod(ctx sdk.Context) time.Duration { // decimal number. For example "0.75" would represent 75%. func (k Keeper) GetConsumerRedistributionFrac(ctx sdk.Context) string { var str string - k.paramStore.Get(ctx, types.KeyConsumerRedistributionFrac, &str) + k.paramStore.Get(ctx, ccvtypes.KeyConsumerRedistributionFrac, &str) return str } // GetHistoricalEntries returns the number of historical info entries to persist in store func (k Keeper) GetHistoricalEntries(ctx sdk.Context) int64 { var n int64 - k.paramStore.Get(ctx, types.KeyHistoricalEntries, &n) + k.paramStore.Get(ctx, ccvtypes.KeyHistoricalEntries, &n) return n } // Only used to set an unbonding period in diff tests func (k Keeper) SetUnbondingPeriod(ctx sdk.Context, period time.Duration) { - k.paramStore.Set(ctx, types.KeyConsumerUnbondingPeriod, period) + k.paramStore.Set(ctx, ccvtypes.KeyConsumerUnbondingPeriod, period) } func (k Keeper) GetUnbondingPeriod(ctx sdk.Context) time.Duration { var period time.Duration - k.paramStore.Get(ctx, types.KeyConsumerUnbondingPeriod, &period) + k.paramStore.Get(ctx, ccvtypes.KeyConsumerUnbondingPeriod, &period) return period } @@ -124,18 +123,18 @@ func (k Keeper) GetUnbondingPeriod(ctx sdk.Context) time.Duration { // that can opt out of running the consumer chain func (k Keeper) GetSoftOptOutThreshold(ctx sdk.Context) string { var str string - k.paramStore.Get(ctx, types.KeySoftOptOutThreshold, &str) + k.paramStore.Get(ctx, ccvtypes.KeySoftOptOutThreshold, &str) return str } func (k Keeper) GetRewardDenoms(ctx sdk.Context) []string { var denoms []string - k.paramStore.Get(ctx, types.KeyRewardDenoms, &denoms) + k.paramStore.Get(ctx, ccvtypes.KeyRewardDenoms, &denoms) return denoms } func (k Keeper) GetProviderRewardDenoms(ctx sdk.Context) []string { var denoms []string - k.paramStore.Get(ctx, types.KeyProviderRewardDenoms, &denoms) + k.paramStore.Get(ctx, ccvtypes.KeyProviderRewardDenoms, &denoms) return denoms } diff --git a/x/ccv/consumer/keeper/params_test.go b/x/ccv/consumer/keeper/params_test.go index ac6b112aa8..49b1816520 100644 --- a/x/ccv/consumer/keeper/params_test.go +++ b/x/ccv/consumer/keeper/params_test.go @@ -7,7 +7,6 @@ import ( "github.com/stretchr/testify/require" testkeeper "github.com/cosmos/interchain-security/v3/testutil/keeper" - "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -15,21 +14,21 @@ import ( func TestParams(t *testing.T) { consumerKeeper, ctx, ctrl, _ := testkeeper.GetConsumerKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() - consumerKeeper.SetParams(ctx, types.DefaultParams()) + consumerKeeper.SetParams(ctx, ccv.DefaultParams()) var rewardDenoms []string var provideRewardDenoms []string - expParams := types.NewParams( + expParams := ccv.NewParams( false, 1000, "", "", ccv.DefaultCCVTimeoutPeriod, - types.DefaultTransferTimeoutPeriod, - types.DefaultConsumerRedistributeFrac, - types.DefaultHistoricalEntries, - types.DefaultConsumerUnbondingPeriod, - types.DefaultSoftOptOutThreshold, + ccv.DefaultTransferTimeoutPeriod, + ccv.DefaultConsumerRedistributeFrac, + ccv.DefaultHistoricalEntries, + ccv.DefaultConsumerUnbondingPeriod, + ccv.DefaultSoftOptOutThreshold, rewardDenoms, provideRewardDenoms, ) // these are the default params, IBC suite independently sets enabled=true @@ -37,7 +36,7 @@ func TestParams(t *testing.T) { params := consumerKeeper.GetConsumerParams(ctx) require.Equal(t, expParams, params) - newParams := types.NewParams(false, 1000, + newParams := ccv.NewParams(false, 1000, "channel-2", "cosmos19pe9pg5dv9k5fzgzmsrgnw9rl9asf7ddwhu7lm", 7*24*time.Hour, 25*time.Hour, "0.5", 500, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}) consumerKeeper.SetParams(ctx, newParams) diff --git a/x/ccv/consumer/keeper/relay_test.go b/x/ccv/consumer/keeper/relay_test.go index 09cf987fc0..d681a2fdc4 100644 --- a/x/ccv/consumer/keeper/relay_test.go +++ b/x/ccv/consumer/keeper/relay_test.go @@ -123,7 +123,7 @@ func TestOnRecvVSCPacket(t *testing.T) { consumerKeeper.SetProviderChannel(ctx, consumerCCVChannelID) // Set module params with custom unbonding period - moduleParams := consumertypes.DefaultParams() + moduleParams := types.DefaultParams() moduleParams.UnbondingPeriod = 100 * time.Hour consumerKeeper.SetParams(ctx, moduleParams) @@ -172,7 +172,7 @@ func TestOnRecvVSCPacketDuplicateUpdates(t *testing.T) { consumerKeeper, ctx, ctrl, _ := testkeeper.GetConsumerKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() consumerKeeper.SetProviderChannel(ctx, consumerCCVChannelID) - consumerKeeper.SetParams(ctx, consumertypes.DefaultParams()) + consumerKeeper.SetParams(ctx, types.DefaultParams()) // Construct packet/data with duplicate val updates for the same pub key cId := crypto.NewCryptoIdentityFromIntSeed(43278947) @@ -218,7 +218,7 @@ func TestSendPacketsFailure(t *testing.T) { consumerKeeper, ctx, ctrl, mocks := testkeeper.GetConsumerKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() consumerKeeper.SetProviderChannel(ctx, "consumerCCVChannelID") - consumerKeeper.SetParams(ctx, consumertypes.DefaultParams()) + consumerKeeper.SetParams(ctx, types.DefaultParams()) // Set some pending packets consumerKeeper.AppendPendingPacket(ctx, types.VscMaturedPacket, &types.ConsumerPacketData_VscMaturedPacketData{}) @@ -240,7 +240,7 @@ func TestSendPackets(t *testing.T) { // Keeper setup consumerKeeper, ctx, ctrl, mocks := testkeeper.GetConsumerKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) consumerKeeper.SetProviderChannel(ctx, "consumerCCVChannelID") - consumerKeeper.SetParams(ctx, consumertypes.DefaultParams()) + consumerKeeper.SetParams(ctx, types.DefaultParams()) // No slash record should exist _, found := consumerKeeper.GetSlashRecord(ctx) @@ -471,7 +471,7 @@ func TestSendPacketsDeletion(t *testing.T) { consumerKeeper, ctx, ctrl, mocks := testkeeper.GetConsumerKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() consumerKeeper.SetProviderChannel(ctx, "consumerCCVChannelID") - consumerKeeper.SetParams(ctx, consumertypes.DefaultParams()) + consumerKeeper.SetParams(ctx, types.DefaultParams()) // Queue two pending packets, vsc matured first consumerKeeper.AppendPendingPacket(ctx, types.VscMaturedPacket, &types.ConsumerPacketData_VscMaturedPacketData{ diff --git a/x/ccv/consumer/keeper/soft_opt_out_test.go b/x/ccv/consumer/keeper/soft_opt_out_test.go index c99d418ca6..6f2ee8ad4f 100644 --- a/x/ccv/consumer/keeper/soft_opt_out_test.go +++ b/x/ccv/consumer/keeper/soft_opt_out_test.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/interchain-security/v3/testutil/crypto" testkeeper "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" ) // Tests that UpdateSmallestNonOptOutPower updates the smallest validator power that cannot soft opt out. @@ -102,7 +102,7 @@ func TestUpdateSmallestNonOptOutPower(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { consumerKeeper, ctx, ctrl, _ := testkeeper.GetConsumerKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) - moduleParams := types.DefaultParams() + moduleParams := ccvtypes.DefaultParams() moduleParams.SoftOptOutThreshold = tc.optOutThresh consumerKeeper.SetParams(ctx, moduleParams) defer ctrl.Finish() diff --git a/x/ccv/consumer/module.go b/x/ccv/consumer/module.go index fe9b18a945..a9f4a4fc7e 100644 --- a/x/ccv/consumer/module.go +++ b/x/ccv/consumer/module.go @@ -22,6 +22,7 @@ import ( "github.com/cosmos/interchain-security/v3/x/ccv/consumer/client/cli" "github.com/cosmos/interchain-security/v3/x/ccv/consumer/keeper" consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) var ( @@ -51,12 +52,12 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry) // DefaultGenesis returns default genesis state as raw bytes for the ibc // consumer module. func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(consumertypes.DefaultGenesisState()) + return cdc.MustMarshalJSON(ccvtypes.DefaultGenesisState()) } // 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 consumertypes.GenesisState + var data ccvtypes.GenesisState if err := cdc.UnmarshalJSON(bz, &data); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", consumertypes.ModuleName, err) } @@ -111,7 +112,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 consumertypes.GenesisState + var genesisState ccvtypes.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 b16b561b7b..c6c09166a5 100644 --- a/x/ccv/consumer/types/consumer.pb.go +++ b/x/ccv/consumer/types/consumer.pb.go @@ -31,215 +31,12 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Params defines the parameters for CCV consumer module -type Params struct { - // TODO: Remove enabled flag and find a better way to setup integration tests - // See: https://github.com/cosmos/interchain-security/issues/339 - Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - /////////////////////// - // Distribution Params - // Number of blocks between ibc-token-transfers from the consumer chain to - // the provider chain. Note that at this transmission event a fraction of - // the accumulated tokens are divided and sent consumer redistribution - // address. - BlocksPerDistributionTransmission int64 `protobuf:"varint,2,opt,name=blocks_per_distribution_transmission,json=blocksPerDistributionTransmission,proto3" json:"blocks_per_distribution_transmission,omitempty"` - // Channel, and provider-chain receiving address to send distribution token - // transfers over. These parameters is auto-set during the consumer <-> - // provider handshake procedure. - DistributionTransmissionChannel string `protobuf:"bytes,3,opt,name=distribution_transmission_channel,json=distributionTransmissionChannel,proto3" json:"distribution_transmission_channel,omitempty"` - ProviderFeePoolAddrStr string `protobuf:"bytes,4,opt,name=provider_fee_pool_addr_str,json=providerFeePoolAddrStr,proto3" json:"provider_fee_pool_addr_str,omitempty"` - // Sent CCV related IBC packets will timeout after this duration - CcvTimeoutPeriod time.Duration `protobuf:"bytes,5,opt,name=ccv_timeout_period,json=ccvTimeoutPeriod,proto3,stdduration" json:"ccv_timeout_period"` - // Sent transfer related IBC packets will timeout after this duration - TransferTimeoutPeriod time.Duration `protobuf:"bytes,6,opt,name=transfer_timeout_period,json=transferTimeoutPeriod,proto3,stdduration" json:"transfer_timeout_period"` - // The fraction of tokens allocated to the consumer redistribution address - // during distribution events. The fraction is a string representing a - // decimal number. For example "0.75" would represent 75%. - ConsumerRedistributionFraction string `protobuf:"bytes,7,opt,name=consumer_redistribution_fraction,json=consumerRedistributionFraction,proto3" json:"consumer_redistribution_fraction,omitempty"` - // The number of historical info entries to persist in store. - // This param is a part of the cosmos sdk staking module. In the case of - // a ccv enabled consumer chain, the ccv module acts as the staking module. - HistoricalEntries int64 `protobuf:"varint,8,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty"` - // Unbonding period for the consumer, - // which should be smaller than that of the provider in general. - UnbondingPeriod time.Duration `protobuf:"bytes,9,opt,name=unbonding_period,json=unbondingPeriod,proto3,stdduration" json:"unbonding_period"` - // 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 - SoftOptOutThreshold string `protobuf:"bytes,10,opt,name=soft_opt_out_threshold,json=softOptOutThreshold,proto3" json:"soft_opt_out_threshold,omitempty"` - // Reward denoms. These are the denominations which are allowed to be sent to - // the provider as rewards. - RewardDenoms []string `protobuf:"bytes,11,rep,name=reward_denoms,json=rewardDenoms,proto3" json:"reward_denoms,omitempty"` - // Provider-originated reward denoms. These are denoms coming from the - // provider which are allowed to be used as rewards. e.g. "uatom" - ProviderRewardDenoms []string `protobuf:"bytes,12,rep,name=provider_reward_denoms,json=providerRewardDenoms,proto3" json:"provider_reward_denoms,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_5b27a82b276e7f93, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetEnabled() bool { - if m != nil { - return m.Enabled - } - return false -} - -func (m *Params) GetBlocksPerDistributionTransmission() int64 { - if m != nil { - return m.BlocksPerDistributionTransmission - } - return 0 -} - -func (m *Params) GetDistributionTransmissionChannel() string { - if m != nil { - return m.DistributionTransmissionChannel - } - return "" -} - -func (m *Params) GetProviderFeePoolAddrStr() string { - if m != nil { - return m.ProviderFeePoolAddrStr - } - return "" -} - -func (m *Params) GetCcvTimeoutPeriod() time.Duration { - if m != nil { - return m.CcvTimeoutPeriod - } - return 0 -} - -func (m *Params) GetTransferTimeoutPeriod() time.Duration { - if m != nil { - return m.TransferTimeoutPeriod - } - return 0 -} - -func (m *Params) GetConsumerRedistributionFraction() string { - if m != nil { - return m.ConsumerRedistributionFraction - } - return "" -} - -func (m *Params) GetHistoricalEntries() int64 { - if m != nil { - return m.HistoricalEntries - } - return 0 -} - -func (m *Params) GetUnbondingPeriod() time.Duration { - if m != nil { - return m.UnbondingPeriod - } - return 0 -} - -func (m *Params) GetSoftOptOutThreshold() string { - if m != nil { - return m.SoftOptOutThreshold - } - return "" -} - -func (m *Params) GetRewardDenoms() []string { - if m != nil { - return m.RewardDenoms - } - return nil -} - -func (m *Params) GetProviderRewardDenoms() []string { - if m != nil { - return m.ProviderRewardDenoms - } - return nil -} - -// LastTransmissionBlockHeight is the last time validator holding -// pools were transmitted to the provider chain -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_5b27a82b276e7f93, []int{1} -} -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 -} - -// CrossChainValidator defines the validators for CCV consumer module +// 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 { Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` @@ -251,7 +48,7 @@ func (m *CrossChainValidator) Reset() { *m = CrossChainValidator{} } func (m *CrossChainValidator) String() string { return proto.CompactTextString(m) } func (*CrossChainValidator) ProtoMessage() {} func (*CrossChainValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_5b27a82b276e7f93, []int{2} + return fileDescriptor_5b27a82b276e7f93, []int{0} } func (m *CrossChainValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -301,61 +98,10 @@ func (m *CrossChainValidator) GetPubkey() *types.Any { return nil } -// MaturingVSCPacket contains the maturing time of a received VSCPacket -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_5b27a82b276e7f93, []int{3} -} -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{} -} - // 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. type SlashRecord struct { WaitingOnReply bool `protobuf:"varint,1,opt,name=waiting_on_reply,json=waitingOnReply,proto3" json:"waiting_on_reply,omitempty"` SendTime time.Time `protobuf:"bytes,2,opt,name=send_time,json=sendTime,proto3,stdtime" json:"send_time"` @@ -365,7 +111,7 @@ func (m *SlashRecord) Reset() { *m = SlashRecord{} } func (m *SlashRecord) String() string { return proto.CompactTextString(m) } func (*SlashRecord) ProtoMessage() {} func (*SlashRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_5b27a82b276e7f93, []int{4} + return fileDescriptor_5b27a82b276e7f93, []int{1} } func (m *SlashRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -409,10 +155,7 @@ func (m *SlashRecord) GetSendTime() time.Time { } func init() { - proto.RegisterType((*Params)(nil), "interchain_security.ccv.consumer.v1.Params") - proto.RegisterType((*LastTransmissionBlockHeight)(nil), "interchain_security.ccv.consumer.v1.LastTransmissionBlockHeight") proto.RegisterType((*CrossChainValidator)(nil), "interchain_security.ccv.consumer.v1.CrossChainValidator") - proto.RegisterType((*MaturingVSCPacket)(nil), "interchain_security.ccv.consumer.v1.MaturingVSCPacket") proto.RegisterType((*SlashRecord)(nil), "interchain_security.ccv.consumer.v1.SlashRecord") } @@ -421,201 +164,34 @@ func init() { } var fileDescriptor_5b27a82b276e7f93 = []byte{ - // 836 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcf, 0x6e, 0xdb, 0x36, - 0x18, 0x8f, 0x96, 0xd6, 0x4d, 0xe8, 0x74, 0x4b, 0x59, 0x2f, 0x55, 0x33, 0xc0, 0x76, 0xdd, 0x1e, - 0x7c, 0x89, 0x8d, 0x26, 0xdb, 0xa5, 0xc0, 0x0e, 0xf9, 0xb3, 0xa2, 0xdd, 0xbf, 0x78, 0x4a, 0xd0, - 0x01, 0xdb, 0x81, 0xa0, 0xa8, 0xcf, 0x16, 0x11, 0x89, 0x14, 0x48, 0x4a, 0x99, 0x76, 0xde, 0x03, - 0xf4, 0xb8, 0x47, 0xd8, 0x03, 0xec, 0x21, 0x8a, 0x9d, 0x7a, 0xdc, 0xa9, 0x1b, 0x92, 0x37, 0xd8, - 0x13, 0x0c, 0xa4, 0x24, 0xd7, 0x4e, 0x17, 0xa0, 0xbb, 0xf1, 0xe3, 0xef, 0x8f, 0xf8, 0x7d, 0xfc, - 0xf8, 0x09, 0xed, 0x72, 0x61, 0x40, 0xb1, 0x98, 0x72, 0x41, 0x34, 0xb0, 0x5c, 0x71, 0x53, 0x8e, - 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d0, 0x76, 0xa6, 0x64, 0xc1, 0x23, 0x50, 0x64, 0x0a, - 0x40, 0x32, 0x29, 0x13, 0x42, 0xa3, 0x48, 0x11, 0x6d, 0x94, 0x7f, 0xc3, 0x99, 0x6c, 0x35, 0x8c, - 0xa7, 0x00, 0x13, 0x29, 0x93, 0xfd, 0x28, 0x52, 0x27, 0x46, 0xe1, 0xef, 0x10, 0x66, 0xac, 0x20, - 0xb6, 0x28, 0x32, 0x37, 0x36, 0x3b, 0x2e, 0x23, 0xff, 0x66, 0xdf, 0x1b, 0xb6, 0x77, 0xef, 0x8f, - 0xaa, 0xda, 0x8d, 0x9a, 0xda, 0x8d, 0x8e, 0xea, 0xda, 0x1e, 0xac, 0xbd, 0x7a, 0xd3, 0x5b, 0xf9, - 0xf5, 0xaf, 0x9e, 0x17, 0x6c, 0x32, 0x56, 0x9c, 0x56, 0xea, 0x89, 0x13, 0xe3, 0x1f, 0xd1, 0x3d, - 0x97, 0xcd, 0x14, 0xd4, 0x55, 0xdf, 0xd6, 0xfb, 0xfb, 0x7e, 0xdc, 0x78, 0x2c, 0x9b, 0x3f, 0x43, - 0xfd, 0xa6, 0xdf, 0x88, 0x82, 0xa5, 0x12, 0x4e, 0x15, 0x65, 0x76, 0xe1, 0xdf, 0x72, 0x19, 0x77, - 0x1b, 0x5e, 0xb0, 0x44, 0x7b, 0x5a, 0xb3, 0xf0, 0x0e, 0xc2, 0x31, 0xd7, 0x46, 0x2a, 0xce, 0x68, - 0x42, 0x40, 0x18, 0xc5, 0x41, 0xfb, 0x6b, 0xee, 0x02, 0xef, 0xbc, 0x45, 0xbe, 0xa8, 0x00, 0xfc, - 0x2d, 0xda, 0xcc, 0x45, 0x28, 0x45, 0xc4, 0xc5, 0xac, 0x49, 0x67, 0xfd, 0xfd, 0xd3, 0xf9, 0x68, - 0x2e, 0xae, 0x13, 0xd9, 0x43, 0x5b, 0x5a, 0x4e, 0x0d, 0x91, 0x99, 0x21, 0xb6, 0x42, 0x26, 0x56,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, 0xdf, 0x50, 0x93, 0x2b, 0x2e, 0x66, 0x2f, 0x4e, 0x0e, 0x27, - 0x94, 0x9d, 0x81, 0xb1, 0xa7, 0x29, 0x34, 0x7b, 0x5e, 0x3d, 0xf8, 0x1b, 0x41, 0x15, 0xe0, 0xe7, - 0xe8, 0x76, 0xea, 0xa8, 0xa6, 0x74, 0x2d, 0xec, 0xce, 0xda, 0xde, 0xdd, 0x7e, 0xe7, 0x50, 0xa7, - 0xcd, 0x30, 0xa9, 0xae, 0xfa, 0xa5, 0xbd, 0xea, 0x8d, 0x46, 0x6a, 0xc1, 0xc1, 0xcf, 0xa8, 0x7d, - 0x92, 0x50, 0x1d, 0x07, 0xc0, 0xa4, 0x8a, 0xf0, 0x10, 0x6d, 0x9e, 0x53, 0x6e, 0x6c, 0x13, 0x49, - 0x41, 0x14, 0x64, 0x49, 0x59, 0xcf, 0x9a, 0x0f, 0xeb, 0xfd, 0x63, 0x11, 0xd8, 0x5d, 0xbc, 0x8f, - 0xd6, 0x35, 0x88, 0xe8, 0xff, 0x7f, 0x7f, 0xcd, 0xca, 0x2c, 0x70, 0xf0, 0xfd, 0xab, 0x8b, 0xae, - 0xf7, 0xfa, 0xa2, 0xeb, 0xfd, 0x7d, 0xd1, 0xf5, 0x5e, 0x5e, 0x76, 0x57, 0x5e, 0x5f, 0x76, 0x57, - 0xfe, 0xbc, 0xec, 0xae, 0xfc, 0xf0, 0xf9, 0x8c, 0x9b, 0x38, 0x0f, 0x47, 0x4c, 0xa6, 0xf5, 0x38, - 0x1d, 0xbf, 0x9d, 0xdc, 0x3b, 0xf3, 0xc9, 0x5d, 0xec, 0x8d, 0x7f, 0x5a, 0xfe, 0x2f, 0x98, 0x32, - 0x03, 0x1d, 0xb6, 0xdc, 0x01, 0xf6, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x61, 0xb7, 0xcd, 0x97, - 0x48, 0x06, 0x00, 0x00, -} - -func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ProviderRewardDenoms) > 0 { - for iNdEx := len(m.ProviderRewardDenoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ProviderRewardDenoms[iNdEx]) - copy(dAtA[i:], m.ProviderRewardDenoms[iNdEx]) - i = encodeVarintConsumer(dAtA, i, uint64(len(m.ProviderRewardDenoms[iNdEx]))) - i-- - dAtA[i] = 0x62 - } - } - if len(m.RewardDenoms) > 0 { - for iNdEx := len(m.RewardDenoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RewardDenoms[iNdEx]) - copy(dAtA[i:], m.RewardDenoms[iNdEx]) - i = encodeVarintConsumer(dAtA, i, uint64(len(m.RewardDenoms[iNdEx]))) - i-- - dAtA[i] = 0x5a - } - } - if len(m.SoftOptOutThreshold) > 0 { - i -= len(m.SoftOptOutThreshold) - copy(dAtA[i:], m.SoftOptOutThreshold) - i = encodeVarintConsumer(dAtA, i, uint64(len(m.SoftOptOutThreshold))) - i-- - dAtA[i] = 0x52 - } - n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingPeriod):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintConsumer(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x4a - if m.HistoricalEntries != 0 { - i = encodeVarintConsumer(dAtA, i, uint64(m.HistoricalEntries)) - i-- - dAtA[i] = 0x40 - } - if len(m.ConsumerRedistributionFraction) > 0 { - i -= len(m.ConsumerRedistributionFraction) - copy(dAtA[i:], m.ConsumerRedistributionFraction) - i = encodeVarintConsumer(dAtA, i, uint64(len(m.ConsumerRedistributionFraction))) - i-- - dAtA[i] = 0x3a - } - n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TransferTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TransferTimeoutPeriod):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintConsumer(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x32 - n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.CcvTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CcvTimeoutPeriod):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintConsumer(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x2a - if len(m.ProviderFeePoolAddrStr) > 0 { - i -= len(m.ProviderFeePoolAddrStr) - copy(dAtA[i:], m.ProviderFeePoolAddrStr) - i = encodeVarintConsumer(dAtA, i, uint64(len(m.ProviderFeePoolAddrStr))) - i-- - dAtA[i] = 0x22 - } - if len(m.DistributionTransmissionChannel) > 0 { - i -= len(m.DistributionTransmissionChannel) - copy(dAtA[i:], m.DistributionTransmissionChannel) - i = encodeVarintConsumer(dAtA, i, uint64(len(m.DistributionTransmissionChannel))) - i-- - dAtA[i] = 0x1a - } - if m.BlocksPerDistributionTransmission != 0 { - i = encodeVarintConsumer(dAtA, i, uint64(m.BlocksPerDistributionTransmission)) - i-- - dAtA[i] = 0x10 - } - if m.Enabled { - i-- - if m.Enabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - 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 = encodeVarintConsumer(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + // 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, 0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x2f, 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, } func (m *CrossChainValidator) Marshal() (dAtA []byte, err error) { @@ -665,42 +241,6 @@ func (m *CrossChainValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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 - n5, err5 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.MaturityTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.MaturityTime):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintConsumer(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x12 - if m.VscId != 0 { - i = encodeVarintConsumer(dAtA, i, uint64(m.VscId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *SlashRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -721,12 +261,12 @@ func (m *SlashRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SendTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SendTime):]) - if err6 != nil { - return 0, err6 + n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.SendTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.SendTime):]) + if err2 != nil { + return 0, err2 } - i -= n6 - i = encodeVarintConsumer(dAtA, i, uint64(n6)) + i -= n2 + i = encodeVarintConsumer(dAtA, i, uint64(n2)) i-- dAtA[i] = 0x12 if m.WaitingOnReply { @@ -753,82 +293,18 @@ func encodeVarintConsumer(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Params) Size() (n int) { +func (m *CrossChainValidator) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Enabled { - n += 2 - } - if m.BlocksPerDistributionTransmission != 0 { - n += 1 + sovConsumer(uint64(m.BlocksPerDistributionTransmission)) - } - l = len(m.DistributionTransmissionChannel) + l = len(m.Address) if l > 0 { n += 1 + l + sovConsumer(uint64(l)) } - l = len(m.ProviderFeePoolAddrStr) - if l > 0 { - n += 1 + l + sovConsumer(uint64(l)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CcvTimeoutPeriod) - n += 1 + l + sovConsumer(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TransferTimeoutPeriod) - n += 1 + l + sovConsumer(uint64(l)) - l = len(m.ConsumerRedistributionFraction) - if l > 0 { - n += 1 + l + sovConsumer(uint64(l)) - } - if m.HistoricalEntries != 0 { - n += 1 + sovConsumer(uint64(m.HistoricalEntries)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingPeriod) - n += 1 + l + sovConsumer(uint64(l)) - l = len(m.SoftOptOutThreshold) - if l > 0 { - n += 1 + l + sovConsumer(uint64(l)) - } - if len(m.RewardDenoms) > 0 { - for _, s := range m.RewardDenoms { - l = len(s) - n += 1 + l + sovConsumer(uint64(l)) - } - } - if len(m.ProviderRewardDenoms) > 0 { - for _, s := range m.ProviderRewardDenoms { - l = len(s) - n += 1 + l + sovConsumer(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 + sovConsumer(uint64(m.Height)) - } - return n -} - -func (m *CrossChainValidator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovConsumer(uint64(l)) - } - if m.Power != 0 { - n += 1 + sovConsumer(uint64(m.Power)) + if m.Power != 0 { + n += 1 + sovConsumer(uint64(m.Power)) } if m.Pubkey != nil { l = m.Pubkey.Size() @@ -837,20 +313,6 @@ func (m *CrossChainValidator) Size() (n int) { return n } -func (m *MaturingVSCPacket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VscId != 0 { - n += 1 + sovConsumer(uint64(m.VscId)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.MaturityTime) - n += 1 + l + sovConsumer(uint64(l)) - return n -} - func (m *SlashRecord) Size() (n int) { if m == nil { return 0 @@ -871,7 +333,7 @@ func sovConsumer(x uint64) (n int) { func sozConsumer(x uint64) (n int) { return sovConsumer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Params) Unmarshal(dAtA []byte) error { +func (m *CrossChainValidator) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -894,153 +356,17 @@ func (m *Params) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") + return fmt.Errorf("proto: CrossChainValidator: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CrossChainValidator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Enabled = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlocksPerDistributionTransmission", wireType) - } - m.BlocksPerDistributionTransmission = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlocksPerDistributionTransmission |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DistributionTransmissionChannel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - 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 ErrInvalidLengthConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DistributionTransmissionChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderFeePoolAddrStr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - 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 ErrInvalidLengthConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderFeePoolAddrStr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CcvTimeoutPeriod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.CcvTimeoutPeriod, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransferTimeoutPeriod", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConsumer @@ -1050,62 +376,31 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthConsumer } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthConsumer } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.TransferTimeoutPeriod, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsumerRedistributionFraction", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - 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 ErrInvalidLengthConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} } - m.ConsumerRedistributionFraction = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) } - m.HistoricalEntries = 0 + m.Power = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConsumer @@ -1115,14 +410,14 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.HistoricalEntries |= int64(b&0x7F) << shift + m.Power |= int64(b&0x7F) << shift if b < 0x80 { break } } - case 9: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingPeriod", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1149,309 +444,8 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.UnbondingPeriod, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SoftOptOutThreshold", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - 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 ErrInvalidLengthConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SoftOptOutThreshold = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - 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 ErrIntOverflowConsumer - } - 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 ErrInvalidLengthConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - 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 ErrIntOverflowConsumer - } - 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 ErrInvalidLengthConsumer - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderRewardDenoms = append(m.ProviderRewardDenoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsumer(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsumer - } - 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 ErrIntOverflowConsumer - } - 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 ErrIntOverflowConsumer - } - 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 := skipConsumer(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsumer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CrossChainValidator) 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 ErrIntOverflowConsumer - } - 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: CrossChainValidator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CrossChainValidator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthConsumer - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - m.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Power |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pubkey == nil { - m.Pubkey = &types.Any{} + if m.Pubkey == nil { + m.Pubkey = &types.Any{} } if err := m.Pubkey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -1478,108 +472,6 @@ func (m *CrossChainValidator) Unmarshal(dAtA []byte) error { } 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 ErrIntOverflowConsumer - } - 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 ErrIntOverflowConsumer - } - 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 ErrIntOverflowConsumer - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsumer - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsumer - } - 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 := skipConsumer(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsumer - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *SlashRecord) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ccv/consumer/types/genesis.pb.go b/x/ccv/consumer/types/genesis.pb.go deleted file mode 100644 index 7a503f0e77..0000000000 --- a/x/ccv/consumer/types/genesis.pb.go +++ /dev/null @@ -1,1394 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: interchain_security/ccv/consumer/v1/genesis.proto - -package types - -import ( - fmt "fmt" - types "github.com/cometbft/cometbft/abci/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - _ "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - _07_tendermint "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" - types1 "github.com/cosmos/interchain-security/v3/x/ccv/types" - _ "google.golang.org/protobuf/types/known/durationpb" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the CCV consumer chain genesis state -type GenesisState struct { - Params Params `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 types1.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"` -} - -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() Params { - if m != nil { - return m.Params - } - return Params{} -} - -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 -} - -func (m *GenesisState) GetProviderClientState() *_07_tendermint.ClientState { - if m != nil { - return m.ProviderClientState - } - return nil -} - -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 -} - -func (m *GenesisState) GetInitialValSet() []types.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() types1.ConsumerPacketDataList { - if m != nil { - return m.PendingConsumerPackets - } - return types1.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 -} - -// HeightValsetUpdateID defines the genesis information for the mapping -// of each block height to a 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 genesis information for each validator -// flagged with an outstanding downtime slashing. -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 "" -} - -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") -} - -func init() { - proto.RegisterFile("interchain_security/ccv/consumer/v1/genesis.proto", fileDescriptor_2db73a6057a27482) -} - -var fileDescriptor_2db73a6057a27482 = []byte{ - // 786 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4b, 0x8f, 0xe3, 0x34, - 0x1c, 0x6f, 0x76, 0x87, 0xd2, 0x7a, 0x76, 0xd9, 0xc1, 0x03, 0x55, 0x68, 0x45, 0x28, 0x03, 0x87, - 0x4a, 0x40, 0xac, 0x76, 0x25, 0x84, 0x84, 0x40, 0x30, 0x1d, 0x09, 0x2a, 0x2d, 0xb0, 0x6a, 0x77, - 0x8b, 0xb4, 0x97, 0xc8, 0x75, 0x4c, 0x62, 0x6d, 0x62, 0x47, 0xb6, 0x93, 0x61, 0x0f, 0x5c, 0xb8, - 0x72, 0xe1, 0x63, 0xed, 0x71, 0x8f, 0x9c, 0x10, 0x9a, 0xf9, 0x0e, 0x9c, 0x51, 0x6c, 0xa7, 0x0f, - 0xa6, 0xa3, 0xed, 0x29, 0x71, 0xfe, 0xbf, 0xc7, 0xff, 0xe1, 0xd8, 0x60, 0xcc, 0xb8, 0xa6, 0x92, - 0xa4, 0x98, 0xf1, 0x48, 0x51, 0x52, 0x4a, 0xa6, 0x5f, 0x20, 0x42, 0x2a, 0x44, 0x04, 0x57, 0x65, - 0x4e, 0x25, 0xaa, 0xc6, 0x28, 0xa1, 0x9c, 0x2a, 0xa6, 0xc2, 0x42, 0x0a, 0x2d, 0xe0, 0x47, 0x7b, - 0x28, 0x21, 0x21, 0x55, 0xd8, 0x50, 0xc2, 0x6a, 0xdc, 0xff, 0xf8, 0x36, 0xdd, 0x6a, 0x5c, 0x3f, - 0xac, 0x54, 0x7f, 0x72, 0x88, 0xfb, 0x5a, 0xd6, 0x72, 0x06, 0x9a, 0xf2, 0x98, 0xca, 0x9c, 0x71, - 0x8d, 0xf0, 0x8a, 0x30, 0xa4, 0x5f, 0x14, 0xd4, 0xe5, 0xd6, 0x47, 0x6c, 0x45, 0x50, 0xc6, 0x92, - 0x54, 0x93, 0x8c, 0x51, 0xae, 0x15, 0xda, 0x42, 0x57, 0xe3, 0xad, 0x95, 0x23, 0x7c, 0x58, 0x13, - 0x88, 0x90, 0x14, 0x91, 0x14, 0x73, 0x4e, 0x33, 0xe3, 0x68, 0x5f, 0x1d, 0x24, 0x48, 0x84, 0x48, - 0x32, 0x8a, 0xcc, 0x6a, 0x55, 0xfe, 0x82, 0xe2, 0x52, 0x62, 0xcd, 0x04, 0x77, 0xf1, 0x77, 0x12, - 0x91, 0x08, 0xf3, 0x8a, 0xea, 0x37, 0xfb, 0xf5, 0xec, 0xdf, 0x0e, 0xb8, 0xf7, 0x9d, 0xed, 0xdb, - 0x42, 0x63, 0x4d, 0xe1, 0x0c, 0xb4, 0x0b, 0x2c, 0x71, 0xae, 0x7c, 0x6f, 0xe8, 0x8d, 0x8e, 0x27, - 0x9f, 0x84, 0x07, 0xf4, 0x31, 0x7c, 0x6c, 0x28, 0xe7, 0x47, 0x2f, 0xff, 0xfe, 0xa0, 0x35, 0x77, - 0x02, 0xf0, 0x53, 0x00, 0x0b, 0x29, 0x2a, 0x16, 0x53, 0x19, 0xd9, 0x3a, 0x23, 0x16, 0xfb, 0x77, - 0x86, 0xde, 0xa8, 0x3b, 0x3f, 0x69, 0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7, 0x5a, 0x33, 0x5c, 0x9a, 0xf5, 0x09, 0x74, 0x34, 0x77, 0x2b, 0x38, 0x02, 0x27, 0x37, - 0x76, 0xd1, 0x1d, 0x83, 0x78, 0xab, 0xda, 0x19, 0xfd, 0xd9, 0x53, 0x70, 0xba, 0x67, 0x5e, 0xf0, - 0x6b, 0x30, 0xa8, 0x9a, 0x8d, 0xbb, 0xf5, 0xd3, 0xe2, 0x38, 0x96, 0x54, 0xd9, 0xf3, 0xae, 0x3b, - 0x7f, 0x6f, 0x0d, 0x59, 0xff, 0x87, 0xdf, 0x5a, 0xc0, 0xf9, 0xcf, 0x2f, 0xaf, 0x02, 0xef, 0xd5, - 0x55, 0xe0, 0xfd, 0x73, 0x15, 0x78, 0x7f, 0x5e, 0x07, 0xad, 0x57, 0xd7, 0x41, 0xeb, 0xaf, 0xeb, - 0xa0, 0xf5, 0xec, 0xab, 0x84, 0xe9, 0xb4, 0x5c, 0x85, 0x44, 0xe4, 0x88, 0x08, 0x95, 0x0b, 0x85, - 0x36, 0xad, 0xfd, 0x6c, 0x7d, 0x65, 0x54, 0x0f, 0xd1, 0xaf, 0xbb, 0xf7, 0x86, 0xb9, 0x14, 0x56, - 0x6d, 0x73, 0x16, 0x3f, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xd4, 0xcb, 0xc1, 0xe6, 0x06, - 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 - 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 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 - } - 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 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, 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 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) - 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 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 2f4b2fa504..453a3aab20 100644 --- a/x/ccv/consumer/types/genesis_test.go +++ b/x/ccv/consumer/types/genesis_test.go @@ -16,8 +16,7 @@ import ( tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/interchain-security/v3/testutil/crypto" - "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" - ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" + types "github.com/cosmos/interchain-security/v3/x/ccv/types" ) const ( @@ -86,95 +85,95 @@ func TestValidateInitialGenesisState(t *testing.T) { { "invalid new consumer genesis state: client id not empty", &types.GenesisState{ - params, - "ccvclient", - "", - true, - cs, - consensusState, - nil, - valUpdates, - nil, - nil, - ccv.ConsumerPacketDataList{}, - types.LastTransmissionBlockHeight{}, - false, + Params: params, + ProviderClientId: "ccvclient", + ProviderChannelId: "", + NewChain: true, + ProviderClientState: cs, + ProviderConsensusState: consensusState, + MaturingPackets: nil, + InitialValSet: valUpdates, + HeightToValsetUpdateId: nil, + OutstandingDowntimeSlashing: nil, + PendingConsumerPackets: types.ConsumerPacketDataList{}, + LastTransmissionBlockHeight: types.LastTransmissionBlockHeight{}, + PreCCV: false, }, true, }, { "invalid new consumer genesis state: channel id not empty", &types.GenesisState{ - params, - "", - "ccvchannel", - true, - cs, - consensusState, - nil, - valUpdates, - nil, - nil, - ccv.ConsumerPacketDataList{}, - types.LastTransmissionBlockHeight{}, - false, + Params: params, + ProviderClientId: "", + ProviderChannelId: "ccvchannel", + NewChain: true, + ProviderClientState: cs, + ProviderConsensusState: consensusState, + MaturingPackets: nil, + InitialValSet: valUpdates, + HeightToValsetUpdateId: nil, + OutstandingDowntimeSlashing: nil, + PendingConsumerPackets: types.ConsumerPacketDataList{}, + LastTransmissionBlockHeight: types.LastTransmissionBlockHeight{}, + PreCCV: false, }, true, }, { "invalid new consumer genesis state: non-empty unbonding sequences", &types.GenesisState{ - params, - "", - "", - true, - cs, - consensusState, - []types.MaturingVSCPacket{{}}, - valUpdates, - nil, - nil, - ccv.ConsumerPacketDataList{}, - types.LastTransmissionBlockHeight{}, - false, + Params: params, + ProviderClientId: "", + ProviderChannelId: "", + NewChain: true, + ProviderClientState: cs, + ProviderConsensusState: consensusState, + MaturingPackets: []types.MaturingVSCPacket{{}}, + InitialValSet: valUpdates, + HeightToValsetUpdateId: nil, + OutstandingDowntimeSlashing: nil, + PendingConsumerPackets: types.ConsumerPacketDataList{}, + LastTransmissionBlockHeight: types.LastTransmissionBlockHeight{}, + PreCCV: false, }, true, }, { "invalid new consumer genesis state: non-empty last transmission packet", &types.GenesisState{ - params, - "", - "", - true, - cs, - consensusState, - nil, - valUpdates, - nil, - nil, - ccv.ConsumerPacketDataList{}, - types.LastTransmissionBlockHeight{Height: 1}, - false, + Params: params, + ProviderClientId: "", + ProviderChannelId: "", + NewChain: true, + ProviderClientState: cs, + ProviderConsensusState: consensusState, + MaturingPackets: nil, + InitialValSet: valUpdates, + HeightToValsetUpdateId: nil, + OutstandingDowntimeSlashing: nil, + PendingConsumerPackets: types.ConsumerPacketDataList{}, + LastTransmissionBlockHeight: types.LastTransmissionBlockHeight{Height: 1}, + PreCCV: false, }, true, }, { "invalid new consumer genesis state: non-empty pending consumer packets", &types.GenesisState{ - params, - "", - "", - true, - cs, - consensusState, - nil, - valUpdates, - nil, - nil, - ccv.ConsumerPacketDataList{List: []ccv.ConsumerPacketData{{}}}, - types.LastTransmissionBlockHeight{}, - false, + Params: params, + ProviderClientId: "", + ProviderChannelId: "", + NewChain: true, + ProviderClientState: cs, + ProviderConsensusState: consensusState, + MaturingPackets: nil, + InitialValSet: valUpdates, + HeightToValsetUpdateId: nil, + OutstandingDowntimeSlashing: nil, + PendingConsumerPackets: types.ConsumerPacketDataList{List: []types.ConsumerPacketData{{}}}, + LastTransmissionBlockHeight: types.LastTransmissionBlockHeight{}, + PreCCV: false, }, true, }, @@ -234,7 +233,7 @@ func TestValidateInitialGenesisState(t *testing.T) { types.DefaultBlocksPerDistributionTransmission, "badchannel/", "", - ccv.DefaultCCVTimeoutPeriod, + types.DefaultCCVTimeoutPeriod, types.DefaultTransferTimeoutPeriod, types.DefaultConsumerRedistributeFrac, types.DefaultHistoricalEntries, @@ -270,17 +269,17 @@ func TestValidateRestartGenesisState(t *testing.T) { valHash := valSet.Hash() valUpdates := tmtypes.TM2PB.ValidatorUpdates(valSet) - matConsumerPacket := ccv.ConsumerPacketData{ - Type: ccv.VscMaturedPacket, - Data: &ccv.ConsumerPacketData_VscMaturedPacketData{ - VscMaturedPacketData: ccv.NewVSCMaturedPacketData(1), + matConsumerPacket := types.ConsumerPacketData{ + Type: types.VscMaturedPacket, + Data: &types.ConsumerPacketData_VscMaturedPacketData{ + VscMaturedPacketData: types.NewVSCMaturedPacketData(1), }, } - slashConsumerPacket := ccv.ConsumerPacketData{ - Type: ccv.SlashPacket, - Data: &ccv.ConsumerPacketData_SlashPacketData{ - SlashPacketData: ccv.NewSlashPacketData( + slashConsumerPacket := types.ConsumerPacketData{ + Type: types.SlashPacket, + Data: &types.ConsumerPacketData_SlashPacketData{ + SlashPacketData: types.NewSlashPacketData( abci.Validator{Address: pubKey.Address(), Power: int64(1)}, 1, stakingtypes.Infraction_INFRACTION_DOWNTIME), @@ -306,122 +305,122 @@ func TestValidateRestartGenesisState(t *testing.T) { { "valid restart consumer genesis state: empty maturing packets", types.NewRestartGenesisState("ccvclient", "ccvchannel", nil, valUpdates, heightToValsetUpdateID, - ccv.ConsumerPacketDataList{List: []ccv.ConsumerPacketData{matConsumerPacket, slashConsumerPacket}}, + types.ConsumerPacketDataList{List: []types.ConsumerPacketData{matConsumerPacket, slashConsumerPacket}}, nil, types.LastTransmissionBlockHeight{Height: 100}, params), false, }, { "valid restart consumer genesis state: handshake in progress ", types.NewRestartGenesisState("ccvclient", "", nil, valUpdates, heightToValsetUpdateID, - ccv.ConsumerPacketDataList{List: []ccv.ConsumerPacketData{slashConsumerPacket}}, nil, types.LastTransmissionBlockHeight{}, params), + types.ConsumerPacketDataList{List: []types.ConsumerPacketData{slashConsumerPacket}}, nil, types.LastTransmissionBlockHeight{}, params), false, }, { "valid restart consumer genesis state: maturing packets", types.NewRestartGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ - {1, time.Now().UTC()}, - {3, time.Now().UTC()}, - {5, time.Now().UTC()}, - }, valUpdates, heightToValsetUpdateID, ccv.ConsumerPacketDataList{}, + {VscId: 1, MaturityTime: time.Now().UTC()}, + {VscId: 3, MaturityTime: time.Now().UTC()}, + {VscId: 5, MaturityTime: time.Now().UTC()}, + }, valUpdates, heightToValsetUpdateID, types.ConsumerPacketDataList{}, []types.OutstandingDowntime{{ValidatorConsensusAddress: sdk.ConsAddress(validator.Address.Bytes()).String()}}, types.LastTransmissionBlockHeight{}, params), false, }, { "invalid restart consumer genesis state: provider id is empty", - types.NewRestartGenesisState("", "ccvchannel", nil, valUpdates, heightToValsetUpdateID, ccv.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.NewRestartGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ - {0, time.Now().UTC()}, - }, valUpdates, nil, ccv.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), + {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.NewRestartGenesisState("ccvclient", "ccvchannel", []types.MaturingVSCPacket{ - {1, time.Time{}}, - }, valUpdates, nil, ccv.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), + {VscId: 1, MaturityTime: time.Time{}}, + }, valUpdates, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), true, }, { "invalid restart consumer genesis: client state defined", &types.GenesisState{ - params, - "ccvclient", - "ccvchannel", - false, - cs, - nil, - nil, - valUpdates, - nil, - nil, - ccv.ConsumerPacketDataList{}, - types.LastTransmissionBlockHeight{}, - false, + Params: params, + ProviderClientId: "ccvclient", + ProviderChannelId: "ccvchannel", + NewChain: false, + ProviderClientState: cs, + ProviderConsensusState: nil, + MaturingPackets: nil, + InitialValSet: valUpdates, + HeightToValsetUpdateId: nil, + OutstandingDowntimeSlashing: nil, + PendingConsumerPackets: types.ConsumerPacketDataList{}, + LastTransmissionBlockHeight: types.LastTransmissionBlockHeight{}, + PreCCV: false, }, true, }, { "invalid restart consumer genesis: consensus state defined", &types.GenesisState{ - params, - "ccvclient", - "ccvchannel", - false, - nil, - consensusState, - nil, - valUpdates, - nil, - nil, - ccv.ConsumerPacketDataList{}, - types.LastTransmissionBlockHeight{}, - false, + Params: params, + ProviderClientId: "ccvclient", + ProviderChannelId: "ccvchannel", + NewChain: false, + ProviderClientState: nil, + ProviderConsensusState: consensusState, + MaturingPackets: nil, + InitialValSet: valUpdates, + HeightToValsetUpdateId: nil, + OutstandingDowntimeSlashing: nil, + PendingConsumerPackets: types.ConsumerPacketDataList{}, + LastTransmissionBlockHeight: types.LastTransmissionBlockHeight{}, + PreCCV: false, }, true, }, { "invalid restart consumer genesis state: nil initial validator set", - types.NewRestartGenesisState("ccvclient", "ccvchannel", nil, nil, nil, ccv.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.NewRestartGenesisState("ccvclient", "", - []types.MaturingVSCPacket{{1, time.Time{}}}, valUpdates, nil, ccv.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), + []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.NewRestartGenesisState("ccvclient", "", - []types.MaturingVSCPacket{{1, time.Time{}}}, valUpdates, heightToValsetUpdateID, ccv.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, params), + []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.NewRestartGenesisState("ccvclient", "", - nil, valUpdates, heightToValsetUpdateID, ccv.ConsumerPacketDataList{}, []types.OutstandingDowntime{{ValidatorConsensusAddress: "cosmosvalconsxxx"}}, + 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.NewRestartGenesisState("ccvclient", "", - nil, valUpdates, heightToValsetUpdateID, ccv.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{Height: int64(1)}, params), + 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.NewRestartGenesisState("ccvclient", "", - nil, valUpdates, heightToValsetUpdateID, ccv.ConsumerPacketDataList{ - List: []ccv.ConsumerPacketData{ + nil, valUpdates, heightToValsetUpdateID, types.ConsumerPacketDataList{ + List: []types.ConsumerPacketData{ { - Type: ccv.VscMaturedPacket, - Data: &ccv.ConsumerPacketData_VscMaturedPacketData{VscMaturedPacketData: ccv.NewVSCMaturedPacketData(1)}, + Type: types.VscMaturedPacket, + Data: &types.ConsumerPacketData_VscMaturedPacketData{VscMaturedPacketData: types.NewVSCMaturedPacketData(1)}, }, }, }, nil, types.LastTransmissionBlockHeight{Height: int64(1)}, params), @@ -429,7 +428,7 @@ func TestValidateRestartGenesisState(t *testing.T) { }, { "invalid restart consumer genesis state: invalid params", - types.NewRestartGenesisState("ccvclient", "ccvchannel", nil, valUpdates, nil, ccv.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, + types.NewRestartGenesisState("ccvclient", "ccvchannel", nil, valUpdates, nil, types.ConsumerPacketDataList{}, nil, types.LastTransmissionBlockHeight{}, types.NewParams( true, types.DefaultBlocksPerDistributionTransmission, diff --git a/x/ccv/consumer/types/params_test.go b/x/ccv/consumer/types/params_test.go index 531f7e39f2..1690fc9f81 100644 --- a/x/ccv/consumer/types/params_test.go +++ b/x/ccv/consumer/types/params_test.go @@ -6,76 +6,76 @@ import ( "github.com/stretchr/testify/require" - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" + ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // Tests the validation of consumer params that happens at genesis func TestValidateParams(t *testing.T) { testCases := []struct { name string - params consumertypes.Params + params ccvtypes.Params expPass bool }{ - {"default params", consumertypes.DefaultParams(), true}, + {"default params", ccvtypes.DefaultParams(), true}, { "custom valid params", - consumertypes.NewParams(true, 5, "", "", 1004, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), true, + ccvtypes.NewParams(true, 5, "", "", 1004, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), true, }, { "custom invalid params, block per dist transmission", - consumertypes.NewParams(true, -5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, -5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, dist transmission channel", - consumertypes.NewParams(true, 5, "badchannel/", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "badchannel/", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, provider fee pool addr string", - consumertypes.NewParams(true, 5, "", "imabadaddress", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "", "imabadaddress", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, ccv timeout", - consumertypes.NewParams(true, 5, "", "", -5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "", "", -5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, transfer timeout", - consumertypes.NewParams(true, 5, "", "", 1004, -7, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "", "", 1004, -7, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, consumer redist fraction is negative", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "-0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "-0.5", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, consumer redist fraction is over 1", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "1.2", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "1.2", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, bad consumer redist fraction ", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "notFrac", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "notFrac", 1000, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, negative num historical entries", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "0.5", -100, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "0.5", -100, 24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, negative unbonding period", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, -24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, -24*21*time.Hour, "0.05", []string{"untrn"}, []string{"uatom"}), false, }, { "custom invalid params, invalid soft opt out threshold", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "-0.05", []string{"u"}, []string{}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "-0.05", []string{"u"}, []string{}), false, }, { "custom invalid params, invalid soft opt out threshold", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.5", []string{"u"}, []string{}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.5", []string{"u"}, []string{}), false, }, { "custom invalid params, invalid reward denom", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"u"}, []string{}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{"u"}, []string{}), false, }, { "custom invalid params, invalid provider reward denom", - consumertypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{}, []string{"a"}), false, + ccvtypes.NewParams(true, 5, "", "", 5, 1005, "0.5", 1000, 24*21*time.Hour, "0.05", []string{}, []string{"a"}), false, }, } diff --git a/x/ccv/consumer/types/query.pb.go b/x/ccv/consumer/types/query.pb.go index effe4757ef..5ed38da3f8 100644 --- a/x/ccv/consumer/types/query.pb.go +++ b/x/ccv/consumer/types/query.pb.go @@ -9,6 +9,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" + types "github.com/cosmos/interchain-security/v3/x/ccv/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -252,7 +253,7 @@ var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo // QueryParamsResponse is response type for the Query/Params RPC method. type QueryParamsResponse struct { // params holds all the parameters of this module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } @@ -288,11 +289,11 @@ func (m *QueryParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo -func (m *QueryParamsResponse) GetParams() Params { +func (m *QueryParamsResponse) GetParams() types.Params { if m != nil { return m.Params } - return Params{} + return types.Params{} } type QueryProviderInfoRequest struct { @@ -467,49 +468,50 @@ func init() { } var fileDescriptor_f627751d3cc10225 = []byte{ - // 672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x41, 0x6b, 0x13, 0x4f, - 0x14, 0xcf, 0xa6, 0x4d, 0xdb, 0xbc, 0xfe, 0xff, 0x07, 0xc7, 0x08, 0xeb, 0x5a, 0xd6, 0xb2, 0x0a, - 0x46, 0x25, 0xbb, 0xb6, 0x3d, 0x54, 0x0f, 0x55, 0xb1, 0xb1, 0x18, 0x50, 0xa9, 0x8b, 0x20, 0x78, - 0xa9, 0xd3, 0xe9, 0x34, 0x19, 0x48, 0x66, 0xd2, 0x9d, 0xd9, 0xd0, 0xde, 0x44, 0xf1, 0x2a, 0x82, - 0xdf, 0xc4, 0x2f, 0xe0, 0xb5, 0xe0, 0xa5, 0xe0, 0xc5, 0x93, 0x48, 0xeb, 0x87, 0xf0, 0x28, 0x3b, - 0x3b, 0x9b, 0x6e, 0x68, 0x69, 0xb7, 0xea, 0x6d, 0xe7, 0xfd, 0xde, 0xfb, 0xbd, 0xdf, 0x7b, 0xf3, - 0xde, 0x2c, 0x04, 0x8c, 0x2b, 0x1a, 0x91, 0x0e, 0x66, 0x7c, 0x4d, 0x52, 0x12, 0x47, 0x4c, 0xed, - 0x04, 0x84, 0x0c, 0x02, 0x22, 0xb8, 0x8c, 0x7b, 0x34, 0x0a, 0x06, 0x73, 0xc1, 0x56, 0x4c, 0xa3, - 0x1d, 0xbf, 0x1f, 0x09, 0x25, 0xd0, 0x95, 0x63, 0x02, 0x7c, 0x42, 0x06, 0x7e, 0x16, 0xe0, 0x0f, - 0xe6, 0x9c, 0x5a, 0x5b, 0xb4, 0x85, 0xf6, 0x0f, 0x92, 0xaf, 0x34, 0xd4, 0x99, 0x69, 0x0b, 0x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 0x02, 0xff, 0x24, 0x5e, 0xcd, 0xe6, 0xd5, 0x00, 0x69, 0x05, 0xab, - 0x38, 0xc2, 0x3d, 0x99, 0x09, 0x7b, 0x05, 0xe7, 0x47, 0xac, 0x46, 0x42, 0x0b, 0x26, 0xfa, 0xda, - 0x62, 0x44, 0xdc, 0x2c, 0x24, 0x22, 0x25, 0x79, 0x30, 0xbe, 0xfb, 0xfd, 0x72, 0x29, 0x34, 0x04, - 0x9e, 0x03, 0x76, 0x9a, 0xc1, 0xb4, 0xb5, 0xc5, 0x37, 0x45, 0x96, 0xfd, 0xb3, 0x05, 0x17, 0x8f, - 0x01, 0x8d, 0x88, 0x55, 0x98, 0xca, 0xd8, 0x8d, 0x0c, 0xbf, 0x90, 0x8c, 0xe5, 0x04, 0x4e, 0x98, - 0x8c, 0x92, 0x21, 0x4b, 0xc2, 0xd8, 0xcf, 0xee, 0xbb, 0xfc, 0x37, 0x8c, 0x19, 0x8b, 0xf7, 0xd6, - 0x82, 0xea, 0x10, 0x45, 0x36, 0x4c, 0x6a, 0xa6, 0x56, 0x53, 0x0b, 0xae, 0x86, 0xd9, 0x11, 0x39, - 0x30, 0x45, 0xba, 0x8c, 0x72, 0xd5, 0x6a, 0xea, 0xcc, 0xd5, 0x70, 0x78, 0x46, 0x1e, 0xfc, 0x47, - 0x04, 0xe7, 0x54, 0xcf, 0x6a, 0xab, 0xa9, 0x87, 0xbe, 0x1a, 0x8e, 0xd8, 0xd0, 0x0c, 0x54, 0x49, - 0x07, 0x73, 0x4e, 0xbb, 0xad, 0xa6, 0x19, 0xf5, 0x43, 0xc3, 0xfc, 0xbb, 0x0a, 0x54, 0x74, 0x1f, - 0xd1, 0x2f, 0xcb, 0xb4, 0xfb, 0x98, 0x81, 0x40, 0x8f, 0x0b, 0x15, 0x5b, 0x70, 0xa6, 0x9d, 0x27, - 0xff, 0x88, 0x2d, 0xbd, 0x6d, 0xef, 0xde, 0x9b, 0xaf, 0x3f, 0x3f, 0x96, 0xef, 0xa0, 0xc5, 0xd3, - 0x5f, 0xc9, 0xe4, 0x39, 0x68, 0x6c, 0x52, 0xda, 0xc8, 0x2f, 0x3b, 0xfa, 0x64, 0xc1, 0x74, 0x6e, - 0x96, 0xd1, 0x62, 0x71, 0x7d, 0x23, 0x3b, 0xe1, 0xdc, 0x3e, 0x7b, 0xa0, 0xa9, 0xe1, 0x96, 0xae, - 0xe1, 0x06, 0xaa, 0x9f, 0x5e, 0x43, 0xba, 0x1d, 0xe8, 0x8b, 0x05, 0xe7, 0x8e, 0x6c, 0x00, 0x5a, - 0x3a, 0x83, 0x82, 0xa3, 0x6b, 0xe5, 0xdc, 0xfd, 0xd3, 0x70, 0x53, 0xc6, 0xa2, 0x2e, 0x63, 0x0e, - 0x05, 0x05, 0xca, 0x30, 0xf1, 0x0d, 0x96, 0x6c, 0xc7, 0x8b, 0xdd, 0x7d, 0xd7, 0xda, 0xdb, 0x77, - 0xad, 0x1f, 0xfb, 0xae, 0xf5, 0xe1, 0xc0, 0x2d, 0xed, 0x1d, 0xb8, 0xa5, 0x6f, 0x07, 0x6e, 0xe9, - 0xe5, 0x52, 0x9b, 0xa9, 0x4e, 0xbc, 0xee, 0x13, 0xd1, 0x0b, 0x88, 0x90, 0x3d, 0x21, 0x73, 0xdc, - 0x8d, 0x21, 0xf7, 0x60, 0x21, 0xd8, 0x1e, 0x4d, 0xa0, 0x76, 0xfa, 0x54, 0xae, 0x4f, 0xe8, 0x5f, - 0xd0, 0xc2, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x78, 0x73, 0x9f, 0x0e, 0x42, 0x07, 0x00, 0x00, + // 686 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6b, 0x13, 0x41, + 0x14, 0xcf, 0xa6, 0x4d, 0xdb, 0x4c, 0xf5, 0xe0, 0x18, 0x21, 0xae, 0x65, 0x2d, 0xab, 0x60, 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 0x7e, 0x0d, 0xc9, 0x76, 0xc0, 0xaf, 0x16, 0xb8, 0x72, 0x6c, 0x03, 0xe0, 0xd2, 0x05, + 0x14, 0x1c, 0x5f, 0x2b, 0xfb, 0xe1, 0xdf, 0x86, 0x9b, 0x32, 0x16, 0x75, 0x19, 0x0d, 0xe8, 0xe7, + 0x28, 0xc3, 0xc4, 0xd7, 0x69, 0xbc, 0x1d, 0xeb, 0x7b, 0x07, 0x8e, 0xb5, 0x7f, 0xe0, 0x58, 0x3f, + 0x0f, 0x1c, 0xeb, 0xe3, 0xa1, 0x53, 0xd8, 0x3f, 0x74, 0x0a, 0xdf, 0x0f, 0x9d, 0xc2, 0xeb, 0xa5, + 0x0e, 0x55, 0xdd, 0x70, 0xd3, 0xc3, 0xbc, 0xef, 0x63, 0x2e, 0xfb, 0x5c, 0x66, 0xb8, 0xeb, 0x43, + 0xee, 0x68, 0xc1, 0xdf, 0x19, 0x4d, 0xa0, 0x76, 0x07, 0x44, 0x6e, 0x4e, 0xe8, 0x3f, 0xcf, 0xc2, + 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x69, 0x59, 0x43, 0x6b, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/ccv/provider/ibc_module.go b/x/ccv/provider/ibc_module.go index efe113f895..a19fd7e5bb 100644 --- a/x/ccv/provider/ibc_module.go +++ b/x/ccv/provider/ibc_module.go @@ -83,7 +83,7 @@ func (am AppModule) OnChanOpenTry( return "", err } - md := providertypes.HandshakeMetadata{ + md := ccv.HandshakeMetadata{ // NOTE that the fee pool collector address string provided to the // the consumer chain must be excluded from the blocked addresses // blacklist or all all ibc-transfers from the consumer chain to the diff --git a/x/ccv/provider/ibc_module_test.go b/x/ccv/provider/ibc_module_test.go index 8b7c3f985c..571bed0471 100644 --- a/x/ccv/provider/ibc_module_test.go +++ b/x/ccv/provider/ibc_module_test.go @@ -168,7 +168,7 @@ func TestOnChanOpenTry(t *testing.T) { if tc.expPass { require.NoError(t, err) - md := &providertypes.HandshakeMetadata{} + md := &ccv.HandshakeMetadata{} err = md.Unmarshal([]byte(metadata)) require.NoError(t, err) require.Equal(t, moduleAcct.BaseAccount.Address, md.ProviderFeePoolAddr, diff --git a/x/ccv/provider/keeper/genesis.go b/x/ccv/provider/keeper/genesis.go index f201e6de50..e86035170c 100644 --- a/x/ccv/provider/keeper/genesis.go +++ b/x/ccv/provider/keeper/genesis.go @@ -158,7 +158,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { k.GetAllValsetUpdateBlockHeights(ctx), consumerStates, k.GetAllUnbondingOps(ctx), - &ccv.MaturedUnbondingOps{Ids: k.GetMaturedUnbondingOps(ctx)}, + &types.MaturedUnbondingOps{Ids: k.GetMaturedUnbondingOps(ctx)}, k.GetAllPendingConsumerAdditionProps(ctx), k.GetAllPendingConsumerRemovalProps(ctx), params, diff --git a/x/ccv/provider/keeper/genesis_test.go b/x/ccv/provider/keeper/genesis_test.go index 01a3845651..8b101a1ce9 100644 --- a/x/ccv/provider/keeper/genesis_test.go +++ b/x/ccv/provider/keeper/genesis_test.go @@ -13,7 +13,6 @@ import ( "github.com/cosmos/interchain-security/v3/testutil/crypto" testkeeper "github.com/cosmos/interchain-security/v3/testutil/keeper" - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" "github.com/cosmos/interchain-security/v3/x/ccv/provider/keeper" providertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" @@ -72,7 +71,7 @@ func TestInitAndExportGenesis(t *testing.T) { expClientID, "channel", initHeight, - *consumertypes.DefaultGenesisState(), + *ccv.DefaultGenesisState(), []providertypes.VscUnbondingOps{ {VscId: vscID, UnbondingOpIds: ubdIndex}, }, @@ -84,7 +83,7 @@ func TestInitAndExportGenesis(t *testing.T) { expClientID, "", 0, - *consumertypes.DefaultGenesisState(), + *ccv.DefaultGenesisState(), nil, []ccv.ValidatorSetChangePacketData{{ValsetUpdateId: vscID}}, nil, @@ -94,7 +93,7 @@ func TestInitAndExportGenesis(t *testing.T) { Id: vscID, UnbondingConsumerChains: []string{cChainIDs[0]}, }}, - &ccv.MaturedUnbondingOps{Ids: ubdIndex}, + &providertypes.MaturedUnbondingOps{Ids: ubdIndex}, []providertypes.ConsumerAdditionProposal{{ ChainId: cChainIDs[0], SpawnTime: oneHourFromNow, @@ -219,7 +218,7 @@ func assertConsumerChainStates(t *testing.T, ctx sdk.Context, pk keeper.Keeper, chainID := cs.ChainId gen, found := pk.GetConsumerGenesis(ctx, chainID) require.True(t, found) - require.Equal(t, *consumertypes.DefaultGenesisState(), gen) + require.Equal(t, *ccv.DefaultGenesisState(), gen) clientID, found := pk.GetConsumerClientId(ctx, chainID) require.True(t, found) diff --git a/x/ccv/provider/keeper/keeper.go b/x/ccv/provider/keeper/keeper.go index 73785f1c17..bebef70c56 100644 --- a/x/ccv/provider/keeper/keeper.go +++ b/x/ccv/provider/keeper/keeper.go @@ -251,7 +251,7 @@ func (k Keeper) GetAllChannelToChains(ctx sdk.Context) (channels []types.Channel return channels } -func (k Keeper) SetConsumerGenesis(ctx sdk.Context, chainID string, gen consumertypes.GenesisState) error { +func (k Keeper) SetConsumerGenesis(ctx sdk.Context, chainID string, gen ccv.GenesisState) error { store := ctx.KVStore(k.storeKey) bz, err := gen.Marshal() if err != nil { @@ -262,14 +262,14 @@ func (k Keeper) SetConsumerGenesis(ctx sdk.Context, chainID string, gen consumer return nil } -func (k Keeper) GetConsumerGenesis(ctx sdk.Context, chainID string) (consumertypes.GenesisState, bool) { +func (k Keeper) GetConsumerGenesis(ctx sdk.Context, chainID string) (ccv.GenesisState, bool) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.ConsumerGenesisKey(chainID)) if bz == nil { - return consumertypes.GenesisState{}, false + return ccv.GenesisState{}, false } - var data consumertypes.GenesisState + var data ccv.GenesisState if err := data.Unmarshal(bz); err != nil { // An error here would indicate something is very wrong, // the ConsumerGenesis is assumed to be correctly serialized in SetConsumerGenesis. @@ -575,7 +575,7 @@ func (k Keeper) GetMaturedUnbondingOps(ctx sdk.Context) (ids []uint64) { return nil } - var ops ccv.MaturedUnbondingOps + var ops types.MaturedUnbondingOps if err := ops.Unmarshal(bz); err != nil { // An error here would indicate something is very wrong, // the MaturedUnbondingOps are assumed to be correctly serialized in AppendMaturedUnbondingOps. @@ -590,7 +590,7 @@ func (k Keeper) AppendMaturedUnbondingOps(ctx sdk.Context, ids []uint64) { return } existingIds := k.GetMaturedUnbondingOps(ctx) - maturedOps := ccv.MaturedUnbondingOps{ + maturedOps := types.MaturedUnbondingOps{ Ids: append(existingIds, ids...), } @@ -814,7 +814,7 @@ func (k Keeper) DeleteInitChainHeight(ctx sdk.Context, chainID string) { // GetPendingVSCPackets returns the list of pending ValidatorSetChange packets stored under chain ID func (k Keeper) GetPendingVSCPackets(ctx sdk.Context, chainID string) []ccv.ValidatorSetChangePacketData { - var packets ccv.ValidatorSetChangePackets + var packets types.ValidatorSetChangePackets store := ctx.KVStore(k.storeKey) bz := store.Get(types.PendingVSCsKey(chainID)) @@ -835,7 +835,7 @@ func (k Keeper) AppendPendingVSCPackets(ctx sdk.Context, chainID string, newPack pds := append(k.GetPendingVSCPackets(ctx, chainID), newPackets...) store := ctx.KVStore(k.storeKey) - packets := ccv.ValidatorSetChangePackets{List: pds} + packets := types.ValidatorSetChangePackets{List: pds} buf, err := packets.Marshal() if err != nil { // An error here would indicate something is very wrong, diff --git a/x/ccv/provider/keeper/proposal.go b/x/ccv/provider/keeper/proposal.go index 2460f2bb7c..80ed8af54d 100644 --- a/x/ccv/provider/keeper/proposal.go +++ b/x/ccv/provider/keeper/proposal.go @@ -19,7 +19,6 @@ import ( abci "github.com/cometbft/cometbft/abci/types" tmtypes "github.com/cometbft/cometbft/types" - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -224,7 +223,7 @@ func (k Keeper) StopConsumerChain(ctx sdk.Context, chainID string, closeChan boo func (k Keeper) MakeConsumerGenesis( ctx sdk.Context, prop *types.ConsumerAdditionProposal, -) (gen consumertypes.GenesisState, nextValidatorsHash []byte, err error) { +) (gen ccv.GenesisState, nextValidatorsHash []byte, err error) { chainID := prop.ChainId providerUnbondingPeriod := k.stakingKeeper.UnbondingTime(ctx) height := clienttypes.GetSelfHeight(ctx) @@ -287,7 +286,7 @@ func (k Keeper) MakeConsumerGenesis( } hash := tmtypes.NewValidatorSet(updatesAsValSet).Hash() - consumerGenesisParams := consumertypes.NewParams( + consumerGenesisParams := ccv.NewParams( true, prop.BlocksPerDistributionTransmission, prop.DistributionTransmissionChannel, @@ -302,7 +301,7 @@ func (k Keeper) MakeConsumerGenesis( []string{}, ) - gen = *consumertypes.NewInitialGenesisState( + gen = *ccv.NewInitialGenesisState( clientState, consState.(*ibctmtypes.ConsensusState), initialUpdatesWithConsumerKeys, diff --git a/x/ccv/provider/keeper/proposal_test.go b/x/ccv/provider/keeper/proposal_test.go index 41f838a1ae..f49b6d3b11 100644 --- a/x/ccv/provider/keeper/proposal_test.go +++ b/x/ccv/provider/keeper/proposal_test.go @@ -19,7 +19,6 @@ import ( abci "github.com/cometbft/cometbft/abci/types" testkeeper "github.com/cosmos/interchain-security/v3/testutil/keeper" - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" providerkeeper "github.com/cosmos/interchain-security/v3/x/ccv/provider/keeper" providertypes "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" @@ -885,7 +884,7 @@ func TestMakeConsumerGenesis(t *testing.T) { ] }` - var expectedGenesis consumertypes.GenesisState + var expectedGenesis ccvtypes.GenesisState err = json.Unmarshal([]byte(jsonString), &expectedGenesis) // ignores tabs, newlines and spaces require.NoError(t, err) diff --git a/x/ccv/provider/types/consumer.go b/x/ccv/provider/types/consumer.go index 1a13123e88..b9eefc3b45 100644 --- a/x/ccv/provider/types/consumer.go +++ b/x/ccv/provider/types/consumer.go @@ -1,7 +1,6 @@ package types import ( - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -10,7 +9,7 @@ func NewConsumerStates( clientID, channelID string, initialHeight uint64, - genesis consumertypes.GenesisState, + genesis ccv.GenesisState, unbondingOpsIndexes []VscUnbondingOps, pendingValsetChanges []ccv.ValidatorSetChangePacketData, slashDowntimeAck []string, diff --git a/x/ccv/provider/types/genesis.go b/x/ccv/provider/types/genesis.go index 2118f3143e..4718de40c1 100644 --- a/x/ccv/provider/types/genesis.go +++ b/x/ccv/provider/types/genesis.go @@ -17,7 +17,7 @@ func NewGenesisState( vscIdToHeights []ValsetUpdateIdToHeight, consumerStates []ConsumerState, unbondingOps []UnbondingOp, - matureUbdOps *ccv.MaturedUnbondingOps, + matureUbdOps *MaturedUnbondingOps, additionProposals []ConsumerAdditionProposal, removalProposals []ConsumerRemovalProposal, params Params, diff --git a/x/ccv/provider/types/genesis.pb.go b/x/ccv/provider/types/genesis.pb.go index ddd7d478b6..fa952b9b13 100644 --- a/x/ccv/provider/types/genesis.pb.go +++ b/x/ccv/provider/types/genesis.pb.go @@ -8,7 +8,6 @@ import ( _ "github.com/cometbft/cometbft/proto/tendermint/crypto" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - types1 "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" types "github.com/cosmos/interchain-security/v3/x/ccv/types" io "io" math "math" @@ -35,7 +34,7 @@ type GenesisState struct { // empty for a new chain UnbondingOps []UnbondingOp `protobuf:"bytes,3,rep,name=unbonding_ops,json=unbondingOps,proto3" json:"unbonding_ops"` // empty for a new chain - MatureUnbondingOps *types.MaturedUnbondingOps `protobuf:"bytes,4,opt,name=mature_unbonding_ops,json=matureUnbondingOps,proto3" json:"mature_unbonding_ops,omitempty"` + MatureUnbondingOps *MaturedUnbondingOps `protobuf:"bytes,4,opt,name=mature_unbonding_ops,json=matureUnbondingOps,proto3" json:"mature_unbonding_ops,omitempty"` // empty for a new chain ValsetUpdateIdToHeight []ValsetUpdateIdToHeight `protobuf:"bytes,5,rep,name=valset_update_id_to_height,json=valsetUpdateIdToHeight,proto3" json:"valset_update_id_to_height"` // empty for a new chain @@ -107,7 +106,7 @@ func (m *GenesisState) GetUnbondingOps() []UnbondingOp { return nil } -func (m *GenesisState) GetMatureUnbondingOps() *types.MaturedUnbondingOps { +func (m *GenesisState) GetMatureUnbondingOps() *MaturedUnbondingOps { if m != nil { return m.MatureUnbondingOps } @@ -177,7 +176,9 @@ func (m *GenesisState) GetExportedVscSendTimestamps() []ExportedVscSendTimestamp return nil } -// consumer chain +// The provider CCV module's knowledge of consumer state. +// +// Note this type is only used internally to the provider CCV module. type ConsumerState struct { // ChainID defines the chain ID for the consumer chain ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -188,7 +189,7 @@ type ConsumerState struct { // InitalHeight defines the initial block height for the consumer chain InitialHeight uint64 `protobuf:"varint,4,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` // ConsumerGenesis defines the initial consumer chain genesis states - ConsumerGenesis types1.GenesisState `protobuf:"bytes,5,opt,name=consumer_genesis,json=consumerGenesis,proto3" json:"consumer_genesis"` + ConsumerGenesis types.GenesisState `protobuf:"bytes,5,opt,name=consumer_genesis,json=consumerGenesis,proto3" json:"consumer_genesis"` // PendingValsetChanges defines the pending validator set changes for the // consumer chain PendingValsetChanges []types.ValidatorSetChangePacketData `protobuf:"bytes,6,rep,name=pending_valset_changes,json=pendingValsetChanges,proto3" json:"pending_valset_changes"` @@ -259,11 +260,11 @@ func (m *ConsumerState) GetInitialHeight() uint64 { return 0 } -func (m *ConsumerState) GetConsumerGenesis() types1.GenesisState { +func (m *ConsumerState) GetConsumerGenesis() types.GenesisState { if m != nil { return m.ConsumerGenesis } - return types1.GenesisState{} + return types.GenesisState{} } func (m *ConsumerState) GetPendingValsetChanges() []types.ValidatorSetChangePacketData { @@ -352,66 +353,66 @@ func init() { } var fileDescriptor_48411d9c7900d48e = []byte{ - // 930 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x6e, 0x23, 0x35, - 0x14, 0xee, 0xb4, 0xd9, 0x6e, 0xe3, 0xfe, 0x50, 0x4c, 0xc9, 0x4e, 0xd3, 0x25, 0x5b, 0x05, 0x90, - 0x2a, 0x01, 0x33, 0xa4, 0xcb, 0x05, 0x7f, 0x7b, 0xb1, 0xdd, 0x45, 0x10, 0x21, 0x44, 0x94, 0x76, - 0x8b, 0xb4, 0x5c, 0x58, 0x8e, 0x6d, 0x25, 0xa6, 0x33, 0xf6, 0x68, 0xec, 0x99, 0x6d, 0x84, 0x90, - 0x58, 0xc1, 0x03, 0xf0, 0x56, 0xec, 0xe5, 0x5e, 0x72, 0xb5, 0x42, 0xed, 0x1b, 0xf0, 0x04, 0x68, - 0x3c, 0x9e, 0xe9, 0x24, 0x24, 0x90, 0x70, 0x95, 0xcc, 0xf9, 0x7c, 0xbe, 0xef, 0x1c, 0x1f, 0xfb, - 0x1c, 0x83, 0x0e, 0x17, 0x9a, 0xc5, 0x64, 0x84, 0xb9, 0x40, 0x8a, 0x91, 0x24, 0xe6, 0x7a, 0xec, - 0x13, 0x92, 0xfa, 0x51, 0x2c, 0x53, 0x4e, 0x59, 0xec, 0xa7, 0x1d, 0x7f, 0xc8, 0x04, 0x53, 0x5c, - 0x79, 0x51, 0x2c, 0xb5, 0x84, 0x6f, 0xcf, 0x70, 0xf1, 0x08, 0x49, 0xbd, 0xc2, 0xc5, 0x4b, 0x3b, - 0xcd, 0xbd, 0xa1, 0x1c, 0x4a, 0xb3, 0xde, 0xcf, 0xfe, 0xe5, 0xae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 0x18, 0x72, 0x3d, 0x4a, 0x06, 0x1e, 0x91, 0xa1, 0x4f, 0xa4, 0x0a, 0xa5, 0xf2, 0x6f, 0xb2, - 0xfa, 0xa0, 0x7c, 0xa6, 0xa4, 0xf7, 0xfd, 0xcb, 0xc9, 0x37, 0x91, 0x1e, 0x47, 0x4c, 0x0d, 0xd6, - 0xcd, 0x4b, 0xe4, 0xfe, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xe2, 0xfe, 0x45, 0xd8, 0x09, - 0x00, 0x00, + // 929 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0x1b, 0x37, + 0x17, 0xf5, 0xd8, 0x8e, 0x63, 0xd1, 0x3f, 0x9f, 0x3f, 0xd6, 0x55, 0xc6, 0x76, 0xaa, 0x18, 0x2a, + 0x02, 0x08, 0x68, 0xab, 0x89, 0x9c, 0x2e, 0xd2, 0x9f, 0x2c, 0xe2, 0xa4, 0x68, 0x85, 0xa2, 0xa8, + 0x20, 0x3b, 0x2e, 0x9a, 0x2e, 0x08, 0x8a, 0x24, 0x24, 0xc6, 0x33, 0xe4, 0x80, 0xe4, 0x8c, 0x2d, + 0x14, 0x05, 0x5a, 0xb4, 0x0f, 0xd0, 0xc7, 0xca, 0xd2, 0xcb, 0xae, 0x82, 0xc2, 0x7e, 0x83, 0xae, + 0xba, 0x2c, 0x86, 0xc3, 0x99, 0x8c, 0x5c, 0x39, 0x90, 0xba, 0xb2, 0xc5, 0xc3, 0x7b, 0xce, 0xb9, + 0xbc, 0xe4, 0xbd, 0x03, 0x3a, 0x5c, 0x18, 0xa6, 0xc8, 0x08, 0x73, 0x81, 0x34, 0x23, 0x89, 0xe2, + 0x66, 0x1c, 0x10, 0x92, 0x06, 0xb1, 0x92, 0x29, 0xa7, 0x4c, 0x05, 0x69, 0x27, 0x18, 0x32, 0xc1, + 0x34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xde, 0xc5, 0x65, 0xc3, 0xfb, 0xf3, 0xb2, + 0xe1, 0xfd, 0x7e, 0xd5, 0x58, 0xb8, 0xb8, 0x6a, 0x2c, 0xfc, 0x71, 0xd5, 0x58, 0x78, 0xf1, 0x78, + 0xc8, 0xcd, 0x28, 0x19, 0xb4, 0x89, 0x8c, 0x02, 0x22, 0x75, 0x24, 0x75, 0xf0, 0x26, 0xab, 0x8f, + 0xca, 0xef, 0x94, 0xf4, 0x61, 0x70, 0x3e, 0xf9, 0xb1, 0x62, 0xc6, 0x31, 0xd3, 0x83, 0x15, 0xfb, + 0x25, 0xf2, 0xf0, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0xce, 0xb9, 0x61, 0xa4, 0x09, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -1033,7 +1034,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.MatureUnbondingOps == nil { - m.MatureUnbondingOps = &types.MaturedUnbondingOps{} + m.MatureUnbondingOps = &MaturedUnbondingOps{} } if err := m.MatureUnbondingOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/ccv/provider/types/genesis_test.go b/x/ccv/provider/types/genesis_test.go index c4b5002f07..aba1a72e0e 100644 --- a/x/ccv/provider/types/genesis_test.go +++ b/x/ccv/provider/types/genesis_test.go @@ -15,7 +15,6 @@ import ( tmtypes "github.com/cometbft/cometbft/types" "github.com/cosmos/interchain-security/v3/testutil/crypto" - consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" "github.com/cosmos/interchain-security/v3/x/ccv/provider/types" ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) @@ -453,7 +452,7 @@ func TestValidateGenesisState(t *testing.T) { nil, []types.ConsumerState{{ ChainId: "chainid", ChannelId: "channel-0", ClientId: "client-id", - ConsumerGenesis: consumertypes.GenesisState{}, + ConsumerGenesis: ccv.GenesisState{}, }}, nil, nil, @@ -758,7 +757,7 @@ func TestValidateGenesisState(t *testing.T) { } } -func getInitialConsumerGenesis(t *testing.T, chainID string) consumertypes.GenesisState { +func getInitialConsumerGenesis(t *testing.T, chainID string) ccv.GenesisState { t.Helper() // generate validator public key cId := crypto.NewCryptoIdentityFromIntSeed(239668) @@ -781,7 +780,7 @@ func getInitialConsumerGenesis(t *testing.T, chainID string) consumertypes.Genes []string{"upgrade", "upgradedIBCState"}) consensusState := ibctmtypes.NewConsensusState(time.Now(), commitmenttypes.NewMerkleRoot([]byte("apphash")), valHash) - params := consumertypes.DefaultParams() + params := ccv.DefaultParams() params.Enabled = true - return *consumertypes.NewInitialGenesisState(cs, consensusState, valUpdates, params) + return *ccv.NewInitialGenesisState(cs, consensusState, valUpdates, params) } diff --git a/x/ccv/provider/types/params.go b/x/ccv/provider/types/params.go index 515d8954ec..afb46694a3 100644 --- a/x/ccv/provider/types/params.go +++ b/x/ccv/provider/types/params.go @@ -11,7 +11,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" 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" ) @@ -178,13 +177,13 @@ func ValidateTemplateClient(i interface{}) error { // populate zeroed fields with valid fields copiedClient.ChainId = "chainid" - trustPeriod, err := ccvtypes.CalculateTrustPeriod(consumertypes.DefaultConsumerUnbondingPeriod, DefaultTrustingPeriodFraction) + trustPeriod, err := ccvtypes.CalculateTrustPeriod(ccvtypes.DefaultConsumerUnbondingPeriod, DefaultTrustingPeriodFraction) if err != nil { return fmt.Errorf("invalid TrustPeriodFraction: %T", err) } copiedClient.TrustingPeriod = trustPeriod - copiedClient.UnbondingPeriod = consumertypes.DefaultConsumerUnbondingPeriod + copiedClient.UnbondingPeriod = ccvtypes.DefaultConsumerUnbondingPeriod copiedClient.LatestHeight = clienttypes.NewHeight(0, 1) if err := copiedClient.Validate(); err != nil { diff --git a/x/ccv/provider/types/provider.pb.go b/x/ccv/provider/types/provider.pb.go index 30dba16cdc..398010307c 100644 --- a/x/ccv/provider/types/provider.pb.go +++ b/x/ccv/provider/types/provider.pb.go @@ -13,6 +13,7 @@ import ( github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" types "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" _07_tendermint "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + types3 "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" @@ -200,6 +201,10 @@ func (m *ConsumerRemovalProposal) GetStopTime() time.Time { return time.Time{} } +// EquivocationProposal is a governance proposal on the provider chain to +// punish a validator for equivocation on a consumer chain. +// +// This type is only used internally to the consumer CCV module. type EquivocationProposal struct { // the title of the proposal Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` @@ -469,60 +474,8 @@ func (m *Params) GetConsumerRewardDenomRegistrationFee() types2.Coin { return types2.Coin{} } -type HandshakeMetadata struct { - ProviderFeePoolAddr string `protobuf:"bytes,1,opt,name=provider_fee_pool_addr,json=providerFeePoolAddr,proto3" json:"provider_fee_pool_addr,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` -} - -func (m *HandshakeMetadata) Reset() { *m = HandshakeMetadata{} } -func (m *HandshakeMetadata) String() string { return proto.CompactTextString(m) } -func (*HandshakeMetadata) ProtoMessage() {} -func (*HandshakeMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{5} -} -func (m *HandshakeMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HandshakeMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HandshakeMetadata.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 *HandshakeMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandshakeMetadata.Merge(m, src) -} -func (m *HandshakeMetadata) XXX_Size() int { - return m.Size() -} -func (m *HandshakeMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_HandshakeMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_HandshakeMetadata proto.InternalMessageInfo - -func (m *HandshakeMetadata) GetProviderFeePoolAddr() string { - if m != nil { - return m.ProviderFeePoolAddr - } - return "" -} - -func (m *HandshakeMetadata) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - // SlashAcks contains cons addresses of consumer chain validators -// successfully slashed on the provider chain +// successfully slashed on the provider chain. type SlashAcks struct { Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` } @@ -531,7 +484,7 @@ func (m *SlashAcks) Reset() { *m = SlashAcks{} } func (m *SlashAcks) String() string { return proto.CompactTextString(m) } func (*SlashAcks) ProtoMessage() {} func (*SlashAcks) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{6} + return fileDescriptor_f22ec409a72b7b72, []int{5} } func (m *SlashAcks) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -578,7 +531,7 @@ func (m *ConsumerAdditionProposals) Reset() { *m = ConsumerAdditionPropo func (m *ConsumerAdditionProposals) String() string { return proto.CompactTextString(m) } func (*ConsumerAdditionProposals) ProtoMessage() {} func (*ConsumerAdditionProposals) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{7} + return fileDescriptor_f22ec409a72b7b72, []int{6} } func (m *ConsumerAdditionProposals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -625,7 +578,7 @@ func (m *ConsumerRemovalProposals) Reset() { *m = ConsumerRemovalProposa func (m *ConsumerRemovalProposals) String() string { return proto.CompactTextString(m) } func (*ConsumerRemovalProposals) ProtoMessage() {} func (*ConsumerRemovalProposals) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{8} + return fileDescriptor_f22ec409a72b7b72, []int{7} } func (m *ConsumerRemovalProposals) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -670,7 +623,7 @@ func (m *AddressList) Reset() { *m = AddressList{} } func (m *AddressList) String() string { return proto.CompactTextString(m) } func (*AddressList) ProtoMessage() {} func (*AddressList) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{9} + return fileDescriptor_f22ec409a72b7b72, []int{8} } func (m *AddressList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -715,7 +668,7 @@ func (m *ChannelToChain) Reset() { *m = ChannelToChain{} } func (m *ChannelToChain) String() string { return proto.CompactTextString(m) } func (*ChannelToChain) ProtoMessage() {} func (*ChannelToChain) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{10} + return fileDescriptor_f22ec409a72b7b72, []int{9} } func (m *ChannelToChain) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -769,7 +722,7 @@ func (m *VscUnbondingOps) Reset() { *m = VscUnbondingOps{} } func (m *VscUnbondingOps) String() string { return proto.CompactTextString(m) } func (*VscUnbondingOps) ProtoMessage() {} func (*VscUnbondingOps) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{11} + return fileDescriptor_f22ec409a72b7b72, []int{10} } func (m *VscUnbondingOps) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -824,7 +777,7 @@ func (m *UnbondingOp) Reset() { *m = UnbondingOp{} } func (m *UnbondingOp) String() string { return proto.CompactTextString(m) } func (*UnbondingOp) ProtoMessage() {} func (*UnbondingOp) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{12} + return fileDescriptor_f22ec409a72b7b72, []int{11} } func (m *UnbondingOp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -876,7 +829,7 @@ func (m *InitTimeoutTimestamp) Reset() { *m = InitTimeoutTimestamp{} } func (m *InitTimeoutTimestamp) String() string { return proto.CompactTextString(m) } func (*InitTimeoutTimestamp) ProtoMessage() {} func (*InitTimeoutTimestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{13} + return fileDescriptor_f22ec409a72b7b72, []int{12} } func (m *InitTimeoutTimestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -928,7 +881,7 @@ func (m *VscSendTimestamp) Reset() { *m = VscSendTimestamp{} } func (m *VscSendTimestamp) String() string { return proto.CompactTextString(m) } func (*VscSendTimestamp) ProtoMessage() {} func (*VscSendTimestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{14} + return fileDescriptor_f22ec409a72b7b72, []int{13} } func (m *VscSendTimestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -971,6 +924,97 @@ func (m *VscSendTimestamp) GetTimestamp() time.Time { return time.Time{} } +// ValidatorSetChangePackets is a pb list of ccv.ValidatorSetChangePacketData. +type ValidatorSetChangePackets struct { + List []types3.ValidatorSetChangePacketData `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` +} + +func (m *ValidatorSetChangePackets) Reset() { *m = ValidatorSetChangePackets{} } +func (m *ValidatorSetChangePackets) String() string { return proto.CompactTextString(m) } +func (*ValidatorSetChangePackets) ProtoMessage() {} +func (*ValidatorSetChangePackets) Descriptor() ([]byte, []int) { + return fileDescriptor_f22ec409a72b7b72, []int{14} +} +func (m *ValidatorSetChangePackets) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorSetChangePackets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorSetChangePackets.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 *ValidatorSetChangePackets) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorSetChangePackets.Merge(m, src) +} +func (m *ValidatorSetChangePackets) XXX_Size() int { + return m.Size() +} +func (m *ValidatorSetChangePackets) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorSetChangePackets.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorSetChangePackets proto.InternalMessageInfo + +func (m *ValidatorSetChangePackets) GetList() []types3.ValidatorSetChangePacketData { + if m != nil { + return m.List + } + return nil +} + +// MaturedUnbondingOps defines a list of ids corresponding to ids of matured +// unbonding operations. +type MaturedUnbondingOps struct { + Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` +} + +func (m *MaturedUnbondingOps) Reset() { *m = MaturedUnbondingOps{} } +func (m *MaturedUnbondingOps) String() string { return proto.CompactTextString(m) } +func (*MaturedUnbondingOps) ProtoMessage() {} +func (*MaturedUnbondingOps) Descriptor() ([]byte, []int) { + return fileDescriptor_f22ec409a72b7b72, []int{15} +} +func (m *MaturedUnbondingOps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MaturedUnbondingOps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MaturedUnbondingOps.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 *MaturedUnbondingOps) XXX_Merge(src proto.Message) { + xxx_messageInfo_MaturedUnbondingOps.Merge(m, src) +} +func (m *MaturedUnbondingOps) XXX_Size() int { + return m.Size() +} +func (m *MaturedUnbondingOps) XXX_DiscardUnknown() { + xxx_messageInfo_MaturedUnbondingOps.DiscardUnknown(m) +} + +var xxx_messageInfo_MaturedUnbondingOps proto.InternalMessageInfo + +func (m *MaturedUnbondingOps) GetIds() []uint64 { + if m != nil { + return m.Ids + } + return nil +} + // ExportedVscSendTimestamps is VscSendTimestamp with chainID info for exporting to genesis type ExportedVscSendTimestamp struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -981,7 +1025,7 @@ func (m *ExportedVscSendTimestamp) Reset() { *m = ExportedVscSendTimesta func (m *ExportedVscSendTimestamp) String() string { return proto.CompactTextString(m) } func (*ExportedVscSendTimestamp) ProtoMessage() {} func (*ExportedVscSendTimestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{15} + return fileDescriptor_f22ec409a72b7b72, []int{16} } func (m *ExportedVscSendTimestamp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1034,7 +1078,7 @@ func (m *KeyAssignmentReplacement) Reset() { *m = KeyAssignmentReplaceme func (m *KeyAssignmentReplacement) String() string { return proto.CompactTextString(m) } func (*KeyAssignmentReplacement) ProtoMessage() {} func (*KeyAssignmentReplacement) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{16} + return fileDescriptor_f22ec409a72b7b72, []int{17} } func (m *KeyAssignmentReplacement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1097,7 +1141,7 @@ func (m *ValidatorConsumerPubKey) Reset() { *m = ValidatorConsumerPubKey func (m *ValidatorConsumerPubKey) String() string { return proto.CompactTextString(m) } func (*ValidatorConsumerPubKey) ProtoMessage() {} func (*ValidatorConsumerPubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{17} + return fileDescriptor_f22ec409a72b7b72, []int{18} } func (m *ValidatorConsumerPubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1160,7 +1204,7 @@ func (m *ValidatorByConsumerAddr) Reset() { *m = ValidatorByConsumerAddr func (m *ValidatorByConsumerAddr) String() string { return proto.CompactTextString(m) } func (*ValidatorByConsumerAddr) ProtoMessage() {} func (*ValidatorByConsumerAddr) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{18} + return fileDescriptor_f22ec409a72b7b72, []int{19} } func (m *ValidatorByConsumerAddr) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1222,7 +1266,7 @@ func (m *ConsumerAddrsToPrune) Reset() { *m = ConsumerAddrsToPrune{} } func (m *ConsumerAddrsToPrune) String() string { return proto.CompactTextString(m) } func (*ConsumerAddrsToPrune) ProtoMessage() {} func (*ConsumerAddrsToPrune) Descriptor() ([]byte, []int) { - return fileDescriptor_f22ec409a72b7b72, []int{19} + return fileDescriptor_f22ec409a72b7b72, []int{20} } func (m *ConsumerAddrsToPrune) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1278,7 +1322,6 @@ func init() { proto.RegisterType((*EquivocationProposal)(nil), "interchain_security.ccv.provider.v1.EquivocationProposal") proto.RegisterType((*GlobalSlashEntry)(nil), "interchain_security.ccv.provider.v1.GlobalSlashEntry") proto.RegisterType((*Params)(nil), "interchain_security.ccv.provider.v1.Params") - proto.RegisterType((*HandshakeMetadata)(nil), "interchain_security.ccv.provider.v1.HandshakeMetadata") proto.RegisterType((*SlashAcks)(nil), "interchain_security.ccv.provider.v1.SlashAcks") proto.RegisterType((*ConsumerAdditionProposals)(nil), "interchain_security.ccv.provider.v1.ConsumerAdditionProposals") proto.RegisterType((*ConsumerRemovalProposals)(nil), "interchain_security.ccv.provider.v1.ConsumerRemovalProposals") @@ -1288,6 +1331,8 @@ func init() { proto.RegisterType((*UnbondingOp)(nil), "interchain_security.ccv.provider.v1.UnbondingOp") proto.RegisterType((*InitTimeoutTimestamp)(nil), "interchain_security.ccv.provider.v1.InitTimeoutTimestamp") proto.RegisterType((*VscSendTimestamp)(nil), "interchain_security.ccv.provider.v1.VscSendTimestamp") + proto.RegisterType((*ValidatorSetChangePackets)(nil), "interchain_security.ccv.provider.v1.ValidatorSetChangePackets") + proto.RegisterType((*MaturedUnbondingOps)(nil), "interchain_security.ccv.provider.v1.MaturedUnbondingOps") proto.RegisterType((*ExportedVscSendTimestamp)(nil), "interchain_security.ccv.provider.v1.ExportedVscSendTimestamp") proto.RegisterType((*KeyAssignmentReplacement)(nil), "interchain_security.ccv.provider.v1.KeyAssignmentReplacement") proto.RegisterType((*ValidatorConsumerPubKey)(nil), "interchain_security.ccv.provider.v1.ValidatorConsumerPubKey") @@ -1300,110 +1345,112 @@ func init() { } var fileDescriptor_f22ec409a72b7b72 = []byte{ - // 1645 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4d, 0x73, 0x1b, 0xc7, - 0xd1, 0xe6, 0x12, 0xfc, 0xc2, 0x80, 0x1f, 0xe2, 0x92, 0xb2, 0x96, 0x7a, 0xf9, 0x82, 0xd0, 0x3a, - 0x71, 0x31, 0xe5, 0xf2, 0x22, 0xa4, 0x2a, 0x55, 0x29, 0x55, 0x5c, 0x2e, 0x12, 0x92, 0x2c, 0x9a, - 0xb1, 0x05, 0x2f, 0x19, 0xaa, 0x92, 0x1c, 0xb6, 0x66, 0x67, 0x5b, 0xc0, 0x14, 0x77, 0x77, 0x56, - 0x33, 0x83, 0x95, 0x70, 0xc9, 0x39, 0x47, 0xe7, 0xe6, 0x4a, 0x2e, 0x4e, 0xfe, 0x40, 0xfe, 0x86, - 0x8f, 0x3e, 0xe6, 0x64, 0xa7, 0xa4, 0x43, 0x0e, 0xf9, 0x13, 0xa9, 0x99, 0xfd, 0x04, 0x48, 0x2a, - 0x50, 0x25, 0xb9, 0xed, 0xf4, 0x74, 0x3f, 0xdd, 0x3d, 0xd3, 0xfd, 0xf4, 0x00, 0xe8, 0x90, 0xc6, - 0x12, 0x38, 0x19, 0x62, 0x1a, 0x7b, 0x02, 0xc8, 0x88, 0x53, 0x39, 0xee, 0x12, 0x92, 0x76, 0x13, - 0xce, 0x52, 0x1a, 0x00, 0xef, 0xa6, 0x07, 0xe5, 0xb7, 0x93, 0x70, 0x26, 0x99, 0xf9, 0xfe, 0x35, - 0x36, 0x0e, 0x21, 0xa9, 0x53, 0xea, 0xa5, 0x07, 0x77, 0xb7, 0x07, 0x6c, 0xc0, 0xb4, 0x7e, 0x57, - 0x7d, 0x65, 0xa6, 0x77, 0xf7, 0x06, 0x8c, 0x0d, 0x42, 0xe8, 0xea, 0x95, 0x3f, 0x7a, 0xde, 0x95, - 0x34, 0x02, 0x21, 0x71, 0x94, 0xe4, 0x0a, 0xed, 0x69, 0x85, 0x60, 0xc4, 0xb1, 0xa4, 0x2c, 0x2e, - 0x00, 0xa8, 0x4f, 0xba, 0x84, 0x71, 0xe8, 0x92, 0x90, 0x42, 0x2c, 0x55, 0x78, 0xd9, 0x57, 0xae, - 0xd0, 0x55, 0x0a, 0x21, 0x1d, 0x0c, 0x65, 0x26, 0x16, 0x5d, 0x09, 0x71, 0x00, 0x3c, 0xa2, 0x99, - 0x72, 0xb5, 0xca, 0x0d, 0x76, 0x6b, 0xfb, 0x84, 0x8f, 0x13, 0xc9, 0xba, 0x97, 0x30, 0x16, 0xf9, - 0xee, 0x07, 0x84, 0x89, 0x88, 0x89, 0x2e, 0xa8, 0xc4, 0x62, 0x02, 0xdd, 0xf4, 0xc0, 0x07, 0x89, - 0x0f, 0x4a, 0x41, 0x11, 0x77, 0xae, 0xe7, 0x63, 0x51, 0xe9, 0x10, 0x46, 0xf3, 0xb8, 0xed, 0x1f, - 0x96, 0x90, 0xd5, 0x63, 0xb1, 0x18, 0x45, 0xc0, 0x8f, 0x82, 0x80, 0xaa, 0x94, 0xfa, 0x9c, 0x25, - 0x4c, 0xe0, 0xd0, 0xdc, 0x46, 0x8b, 0x92, 0xca, 0x10, 0x2c, 0xa3, 0x63, 0xec, 0x37, 0xdd, 0x6c, - 0x61, 0x76, 0x50, 0x2b, 0x00, 0x41, 0x38, 0x4d, 0x94, 0xb2, 0x35, 0xaf, 0xf7, 0xea, 0x22, 0x73, - 0x07, 0xad, 0x64, 0xb7, 0x40, 0x03, 0xab, 0xa1, 0xb7, 0x97, 0xf5, 0xfa, 0x24, 0x30, 0x3f, 0x45, - 0xeb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 0x39, 0x09, 0xcc, - 0xfd, 0xfa, 0x1b, 0x8b, 0x25, 0x1e, 0x0d, 0x84, 0x35, 0xdf, 0x69, 0xec, 0x2f, 0xb8, 0xeb, 0xa3, - 0xca, 0xfc, 0x24, 0x10, 0xf6, 0xaf, 0x51, 0xab, 0x06, 0x68, 0xae, 0xa3, 0xf9, 0x12, 0x6b, 0x9e, - 0x06, 0xe6, 0x03, 0xb4, 0x53, 0x01, 0x4d, 0xd2, 0x7d, 0x86, 0xd8, 0x74, 0xef, 0x94, 0x0a, 0x13, - 0x8c, 0x2f, 0xec, 0xa7, 0x68, 0xfb, 0xa4, 0x22, 0x97, 0x72, 0x98, 0x4c, 0x64, 0x68, 0x4c, 0x0e, - 0xe3, 0x5d, 0xd4, 0x2c, 0x7f, 0x48, 0xe8, 0xec, 0x17, 0xdc, 0x4a, 0x60, 0x47, 0xe8, 0xd6, 0x85, - 0x20, 0x67, 0x10, 0x07, 0x15, 0xd8, 0x0d, 0x07, 0x70, 0x3c, 0x0d, 0x34, 0xf3, 0x43, 0xb5, 0x72, - 0xf7, 0x17, 0x03, 0x59, 0x8f, 0x5e, 0x25, 0x8c, 0x4b, 0x08, 0xae, 0xf8, 0x7d, 0x4b, 0x12, 0x97, - 0x68, 0x4b, 0x85, 0x24, 0x20, 0x0e, 0xbc, 0x12, 0x2d, 0x3b, 0xad, 0xd6, 0xe1, 0xcf, 0x66, 0xaa, - 0xc1, 0x69, 0x77, 0x39, 0x2d, 0x6c, 0xa6, 0x53, 0x72, 0x61, 0xff, 0xc1, 0x40, 0xd6, 0x29, 0x8c, - 0x8f, 0x84, 0xa0, 0x83, 0x38, 0x82, 0x58, 0x2a, 0x46, 0xc3, 0x04, 0xd4, 0xa7, 0xf9, 0x3e, 0x5a, - 0x2b, 0xd9, 0xa0, 0x24, 0x81, 0x55, 0x77, 0xb5, 0x10, 0xea, 0xee, 0x7f, 0x80, 0x50, 0xc2, 0x21, - 0xf5, 0x88, 0x77, 0x09, 0xe3, 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, 0x5f, 0x1f, 0x95, 0x7f, 0x3c, 0xa4, - 0xf7, 0xbb, 0xaf, 0x26, 0xff, 0x7d, 0x90, 0xe3, 0x04, 0x84, 0xbf, 0xa4, 0x7b, 0xef, 0xfe, 0xbf, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x34, 0xfa, 0x5d, 0xae, 0x10, 0x00, 0x00, + // 1674 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x8a, 0x94, 0x2c, 0x3e, 0xea, 0x9f, 0x57, 0x72, 0x4c, 0xb9, 0x2a, 0x45, 0x6f, 0x9a, + 0x54, 0x45, 0x90, 0x65, 0x24, 0xa3, 0x40, 0x60, 0x34, 0x08, 0x24, 0xca, 0x89, 0x15, 0x35, 0xb1, + 0xb2, 0x52, 0x65, 0xb4, 0x3d, 0x2c, 0x86, 0xb3, 0x63, 0x72, 0xa0, 0xdd, 0x9d, 0xf5, 0xcc, 0xec, + 0xda, 0xbc, 0xf4, 0xdc, 0x63, 0x7a, 0x0b, 0xda, 0x4b, 0xda, 0x2f, 0xd0, 0xaf, 0x91, 0x63, 0x8e, + 0x3d, 0x25, 0x85, 0x7d, 0xe8, 0xa1, 0x5f, 0xa2, 0x98, 0xd9, 0xbf, 0xa4, 0x44, 0x95, 0x46, 0x9b, + 0xdb, 0xec, 0x9b, 0xf7, 0x7e, 0xef, 0xff, 0x7b, 0x43, 0xc2, 0x3e, 0x0d, 0x25, 0xe1, 0x78, 0x88, + 0x68, 0xe8, 0x0a, 0x82, 0x63, 0x4e, 0xe5, 0xa8, 0x8b, 0x71, 0xd2, 0x8d, 0x38, 0x4b, 0xa8, 0x47, + 0x78, 0x37, 0xd9, 0x2b, 0xce, 0x76, 0xc4, 0x99, 0x64, 0xe6, 0xdb, 0xd7, 0xc8, 0xd8, 0x18, 0x27, + 0x76, 0xc1, 0x97, 0xec, 0xdd, 0xfb, 0x60, 0x1a, 0x70, 0xb2, 0xd7, 0x15, 0x43, 0xc4, 0x89, 0xe7, + 0x62, 0x16, 0x8a, 0x38, 0xc8, 0x61, 0xef, 0xbd, 0x73, 0x83, 0xc4, 0x0b, 0xca, 0x49, 0xc6, 0xb6, + 0x39, 0x60, 0x03, 0xa6, 0x8f, 0x5d, 0x75, 0xca, 0xa8, 0x3b, 0x03, 0xc6, 0x06, 0x3e, 0xe9, 0xea, + 0xaf, 0x7e, 0xfc, 0xac, 0x2b, 0x69, 0x40, 0x84, 0x44, 0x41, 0x94, 0x31, 0xb4, 0x27, 0x19, 0xbc, + 0x98, 0x23, 0x49, 0x59, 0x98, 0x03, 0xd0, 0x3e, 0xee, 0x62, 0xc6, 0x49, 0x17, 0xfb, 0x94, 0x84, + 0x52, 0x69, 0x4d, 0x4f, 0x19, 0x43, 0x57, 0x31, 0xf8, 0x74, 0x30, 0x94, 0x29, 0x59, 0x74, 0x25, + 0x09, 0x3d, 0xc2, 0x03, 0x9a, 0x32, 0x97, 0x5f, 0x99, 0xc0, 0x76, 0xe5, 0x1e, 0xf3, 0x51, 0x24, + 0x59, 0xf7, 0x92, 0x8c, 0x44, 0x76, 0xfb, 0x2e, 0x66, 0x22, 0x60, 0xa2, 0x4b, 0x54, 0xc4, 0x42, + 0x4c, 0xba, 0xc9, 0x5e, 0x9f, 0x48, 0xb4, 0x57, 0x10, 0x72, 0xbb, 0x33, 0xbe, 0x3e, 0x12, 0x25, + 0x0f, 0x66, 0x34, 0xb3, 0xdb, 0xfa, 0x61, 0x11, 0x5a, 0xbd, 0x2c, 0x90, 0x07, 0x9e, 0x47, 0x95, + 0x4b, 0xa7, 0x9c, 0x45, 0x4c, 0x20, 0xdf, 0xdc, 0x84, 0x05, 0x49, 0xa5, 0x4f, 0x5a, 0x46, 0xc7, + 0xd8, 0x6d, 0x38, 0xe9, 0x87, 0xd9, 0x81, 0xa6, 0x47, 0x04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xfa, 0x2d, 0x34, 0x2b, 0x80, 0xe6, 0x2a, 0xcc, + 0x17, 0x58, 0xf3, 0xd4, 0x33, 0x1f, 0xc2, 0x56, 0x09, 0x34, 0x3e, 0x8a, 0x53, 0xc4, 0x86, 0x73, + 0xb7, 0x60, 0x18, 0x9b, 0xc6, 0xc2, 0x7a, 0x02, 0x9b, 0xc7, 0x65, 0xe3, 0x17, 0x83, 0x7e, 0xcc, + 0x43, 0x63, 0x7c, 0x51, 0x6e, 0x43, 0xa3, 0x78, 0xe4, 0x6b, 0xef, 0xeb, 0x4e, 0x49, 0xb0, 0x02, + 0x58, 0xbf, 0x10, 0xf8, 0x8c, 0x84, 0x5e, 0x09, 0x36, 0x25, 0x00, 0x87, 0x93, 0x40, 0x33, 0x3f, + 0x22, 0x4b, 0x75, 0x0c, 0xb6, 0x2e, 0x90, 0x4f, 0x3d, 0x24, 0x19, 0x3f, 0x23, 0x52, 0xa5, 0x71, + 0x40, 0xf2, 0x76, 0x74, 0xa0, 0xee, 0x53, 0x21, 0xb3, 0xca, 0xfa, 0x70, 0x6a, 0x65, 0x25, 0x7b, + 0xf6, 0x34, 0x90, 0x23, 0x24, 0x51, 0xd6, 0x8b, 0x1a, 0xcb, 0xfa, 0x39, 0x6c, 0x7c, 0x8e, 0x64, + 0xcc, 0x89, 0x37, 0x96, 0xe3, 0x75, 0xa8, 0xa9, 0xfc, 0x19, 0x3a, 0x7f, 0xea, 0x68, 0xfd, 0xcd, + 0x80, 0xd6, 0xa3, 0x97, 0x11, 0xe3, 0x92, 0x78, 0x57, 0x22, 0x72, 0x43, 0x78, 0x2f, 0x61, 0x43, + 0x05, 0x4b, 0x90, 0xd0, 0x73, 0x0b, 0x3f, 0xd3, 0x3c, 0x36, 0xf7, 0x7f, 0x39, 0x53, 0x77, 0x4c, + 0xaa, 0xcb, 0x1c, 0xb8, 0x9d, 0x4c, 0xd0, 0x85, 0xf5, 0x27, 0x03, 0x5a, 0x27, 0x64, 0x74, 0x20, + 0x04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7f, 0xbe, 0x6a, 0x1b, 0x5f, 0xbd, 0x6e, 0xcf, 0x7d, + 0xf7, 0xba, 0x3d, 0xf7, 0x8f, 0xd7, 0xed, 0xb9, 0xdf, 0x7d, 0x34, 0xa0, 0x72, 0x18, 0xf7, 0x6d, + 0xcc, 0x82, 0x6e, 0xf6, 0xfb, 0xba, 0xd4, 0xf5, 0x7e, 0xf1, 0xe7, 0x43, 0xf2, 0xa0, 0xfb, 0x72, + 0xfc, 0xcf, 0x10, 0x39, 0x8a, 0x88, 0xe8, 0x2f, 0xea, 0xa9, 0xf0, 0xe0, 0x3f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xcb, 0x43, 0xd2, 0x10, 0x3d, 0x11, 0x00, 0x00, } func (m *ConsumerAdditionProposal) Marshal() (dAtA []byte, err error) { @@ -1779,43 +1826,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *HandshakeMetadata) 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 *HandshakeMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HandshakeMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintProvider(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.ProviderFeePoolAddr) > 0 { - i -= len(m.ProviderFeePoolAddr) - copy(dAtA[i:], m.ProviderFeePoolAddr) - i = encodeVarintProvider(dAtA, i, uint64(len(m.ProviderFeePoolAddr))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *SlashAcks) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2145,6 +2155,84 @@ func (m *VscSendTimestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ValidatorSetChangePackets) 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 *ValidatorSetChangePackets) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorSetChangePackets) 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 = encodeVarintProvider(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *MaturedUnbondingOps) 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 *MaturedUnbondingOps) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MaturedUnbondingOps) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Ids) > 0 { + dAtA18 := make([]byte, len(m.Ids)*10) + var j17 int + for _, num := range m.Ids { + for num >= 1<<7 { + dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j17++ + } + dAtA18[j17] = uint8(num) + j17++ + } + i -= j17 + copy(dAtA[i:], dAtA18[:j17]) + i = encodeVarintProvider(dAtA, i, uint64(j17)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ExportedVscSendTimestamp) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2542,23 +2630,6 @@ func (m *Params) Size() (n int) { return n } -func (m *HandshakeMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProviderFeePoolAddr) - if l > 0 { - n += 1 + l + sovProvider(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovProvider(uint64(l)) - } - return n -} - func (m *SlashAcks) Size() (n int) { if m == nil { return 0 @@ -2703,6 +2774,37 @@ func (m *VscSendTimestamp) Size() (n int) { return n } +func (m *ValidatorSetChangePackets) 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 + sovProvider(uint64(l)) + } + } + return n +} + +func (m *MaturedUnbondingOps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Ids) > 0 { + l = 0 + for _, e := range m.Ids { + l += sovProvider(uint64(e)) + } + n += 1 + sovProvider(uint64(l)) + l + } + return n +} + func (m *ExportedVscSendTimestamp) Size() (n int) { if m == nil { return 0 @@ -4120,7 +4222,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } -func (m *HandshakeMetadata) Unmarshal(dAtA []byte) error { +func (m *SlashAcks) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4143,15 +4245,15 @@ func (m *HandshakeMetadata) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HandshakeMetadata: wiretype end group for non-group") + return fmt.Errorf("proto: SlashAcks: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HandshakeMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SlashAcks: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderFeePoolAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4179,127 +4281,13 @@ func (m *HandshakeMetadata) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ProviderFeePoolAddr = string(dAtA[iNdEx:postIndex]) + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProvider - } - 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 ErrInvalidLengthProvider - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProvider - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProvider(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProvider - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SlashAcks) 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 ErrIntOverflowProvider - } - 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: SlashAcks: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SlashAcks: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProvider - } - 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 ErrInvalidLengthProvider - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProvider - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProvider(dAtA[iNdEx:]) - if err != nil { - return err + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthProvider @@ -5129,6 +5117,216 @@ func (m *VscSendTimestamp) Unmarshal(dAtA []byte) error { } return nil } +func (m *ValidatorSetChangePackets) 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 ErrIntOverflowProvider + } + 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: ValidatorSetChangePackets: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorSetChangePackets: 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 ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.List = append(m.List, types3.ValidatorSetChangePacketData{}) + if err := m.List[len(m.List)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MaturedUnbondingOps) 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 ErrIntOverflowProvider + } + 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: MaturedUnbondingOps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MaturedUnbondingOps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Ids = append(m.Ids, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthProvider + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthProvider + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Ids) == 0 { + m.Ids = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Ids = append(m.Ids, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipProvider(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProvider + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ExportedVscSendTimestamp) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/ccv/provider/types/query.pb.go b/x/ccv/provider/types/query.pb.go index 97dbba3649..b88879545a 100644 --- a/x/ccv/provider/types/query.pb.go +++ b/x/ccv/provider/types/query.pb.go @@ -10,8 +10,7 @@ import ( grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - types "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types" - types1 "github.com/cosmos/interchain-security/v3/x/ccv/types" + types "github.com/cosmos/interchain-security/v3/x/ccv/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -814,8 +813,8 @@ func (m *QueryThrottledConsumerPacketDataResponse) GetPacketDataInstances() []Th // A query wrapper type for the global entry and data relevant to a throttled // slash packet. type ThrottledSlashPacket struct { - GlobalEntry GlobalSlashEntry `protobuf:"bytes,1,opt,name=global_entry,json=globalEntry,proto3" json:"global_entry"` - Data types1.SlashPacketData `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` + GlobalEntry GlobalSlashEntry `protobuf:"bytes,1,opt,name=global_entry,json=globalEntry,proto3" json:"global_entry"` + Data types.SlashPacketData `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` } func (m *ThrottledSlashPacket) Reset() { *m = ThrottledSlashPacket{} } @@ -858,11 +857,11 @@ func (m *ThrottledSlashPacket) GetGlobalEntry() GlobalSlashEntry { return GlobalSlashEntry{} } -func (m *ThrottledSlashPacket) GetData() types1.SlashPacketData { +func (m *ThrottledSlashPacket) GetData() types.SlashPacketData { if m != nil { return m.Data } - return types1.SlashPacketData{} + return types.SlashPacketData{} } // ThrottledPacketDataWrapper contains either SlashPacketData or @@ -914,10 +913,10 @@ type isThrottledPacketDataWrapper_Data interface { } type ThrottledPacketDataWrapper_SlashPacket struct { - SlashPacket *types1.SlashPacketData `protobuf:"bytes,1,opt,name=slash_packet,json=slashPacket,proto3,oneof" json:"slash_packet,omitempty"` + SlashPacket *types.SlashPacketData `protobuf:"bytes,1,opt,name=slash_packet,json=slashPacket,proto3,oneof" json:"slash_packet,omitempty"` } type ThrottledPacketDataWrapper_VscMaturedPacket struct { - VscMaturedPacket *types1.VSCMaturedPacketData `protobuf:"bytes,2,opt,name=vsc_matured_packet,json=vscMaturedPacket,proto3,oneof" json:"vsc_matured_packet,omitempty"` + VscMaturedPacket *types.VSCMaturedPacketData `protobuf:"bytes,2,opt,name=vsc_matured_packet,json=vscMaturedPacket,proto3,oneof" json:"vsc_matured_packet,omitempty"` } func (*ThrottledPacketDataWrapper_SlashPacket) isThrottledPacketDataWrapper_Data() {} @@ -930,14 +929,14 @@ func (m *ThrottledPacketDataWrapper) GetData() isThrottledPacketDataWrapper_Data return nil } -func (m *ThrottledPacketDataWrapper) GetSlashPacket() *types1.SlashPacketData { +func (m *ThrottledPacketDataWrapper) GetSlashPacket() *types.SlashPacketData { if x, ok := m.GetData().(*ThrottledPacketDataWrapper_SlashPacket); ok { return x.SlashPacket } return nil } -func (m *ThrottledPacketDataWrapper) GetVscMaturedPacket() *types1.VSCMaturedPacketData { +func (m *ThrottledPacketDataWrapper) GetVscMaturedPacket() *types.VSCMaturedPacketData { if x, ok := m.GetData().(*ThrottledPacketDataWrapper_VscMaturedPacket); ok { return x.VscMaturedPacket } @@ -1069,90 +1068,90 @@ func init() { } var fileDescriptor_422512d7b7586cd7 = []byte{ - // 1322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0xdc, 0x44, - 0x18, 0x5d, 0x6f, 0xd2, 0x34, 0x99, 0x14, 0x5a, 0xa6, 0xa5, 0x6c, 0xdd, 0x6a, 0xb7, 0xb8, 0x08, - 0xd2, 0x16, 0xec, 0xee, 0x56, 0x48, 0x4d, 0x20, 0xdd, 0xec, 0x26, 0x21, 0x8d, 0xda, 0xa8, 0xc1, - 0xa9, 0x5a, 0x09, 0x50, 0xcd, 0xc4, 0x1e, 0x36, 0x16, 0x5e, 0x8f, 0xeb, 0x99, 0x75, 0x1a, 0x7e, - 0x1c, 0x00, 0x09, 0x7a, 0xac, 0x84, 0xb8, 0x71, 0xe8, 0x89, 0xff, 0x82, 0x7b, 0x6f, 0x54, 0xf4, - 0xd2, 0x53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x0b, 0xce, 0x0e, 0x4a, 0x59, 0xc3, 0xdc, 0x61, 0x83, 0x33, - 0xdf, 0x30, 0x77, 0x58, 0x8a, 0xe8, 0xa7, 0x54, 0xb9, 0xf6, 0xf7, 0xe1, 0xdc, 0x60, 0xed, 0x1e, - 0x76, 0x2d, 0xdb, 0xad, 0xb5, 0xe6, 0x58, 0x24, 0x56, 0xf8, 0x53, 0x16, 0x9c, 0x4b, 0xf1, 0x3a, - 0x87, 0x37, 0xd3, 0x53, 0x4f, 0x15, 0x23, 0xe4, 0xf5, 0x83, 0x03, 0x14, 0x76, 0x5c, 0xe7, 0x76, - 0x2c, 0xc3, 0xc5, 0xc1, 0x76, 0xf8, 0x4d, 0xc4, 0x96, 0x23, 0x3e, 0xc7, 0x34, 0xa2, 0x78, 0x52, - 0xbd, 0xf3, 0x78, 0x37, 0x2f, 0x3d, 0xd9, 0xcd, 0x4b, 0x7f, 0xee, 0xe6, 0xa5, 0x87, 0x7b, 0xf9, - 0xcc, 0x93, 0xbd, 0x7c, 0xe6, 0xd9, 0x5e, 0x3e, 0xf3, 0xd1, 0x7c, 0xcd, 0x66, 0x5b, 0x8d, 0x4d, - 0xd5, 0x24, 0x75, 0xcd, 0x24, 0xb4, 0x4e, 0x68, 0x5b, 0xbf, 0x77, 0x9a, 0xfd, 0x82, 0xcb, 0xda, - 0xfd, 0x7d, 0xf3, 0xb7, 0xe3, 0x61, 0xba, 0x39, 0xc1, 0xbf, 0x56, 0x2e, 0xff, 0x1f, 0x00, 0x00, - 0xff, 0xff, 0xbf, 0xd4, 0x24, 0xd7, 0x42, 0x13, 0x00, 0x00, + // 1323 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x1f, 0xf5, 0x3a, 0x69, 0x9a, 0x4c, 0xfa, 0xfd, 0xb6, 0x4c, 0x4b, 0x71, 0xb7, 0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 0x6c, 0x96, 0x9b, 0x10, 0x16, 0x94, 0x46, 0xb3, 0xa0, + 0xc3, 0xe6, 0x2e, 0x45, 0x41, 0x80, 0xa9, 0x7c, 0x75, 0x24, 0x75, 0xd0, 0x7e, 0x51, 0xc0, 0xb1, + 0x24, 0xf3, 0xe0, 0x3d, 0x70, 0xa8, 0xe6, 0x91, 0x0d, 0xe4, 0x59, 0xd8, 0xe7, 0x74, 0x4b, 0x5e, + 0x68, 0xef, 0xa6, 0xa2, 0xb2, 0x22, 0x0a, 0x05, 0xda, 0x72, 0x58, 0x2c, 0x09, 0xcc, 0x46, 0x80, + 0x62, 0x09, 0x2e, 0x83, 0x49, 0x07, 0x71, 0x24, 0x5c, 0x98, 0x2d, 0x9e, 0x1f, 0xf4, 0x1a, 0xec, + 0xa2, 0x15, 0x92, 0x97, 0x68, 0xa2, 0x5c, 0x7b, 0xae, 0x00, 0x75, 0x6f, 0xe5, 0x70, 0x1d, 0x1c, + 0x8a, 0x46, 0x3c, 0xd2, 0x2e, 0x55, 0x8c, 0xd2, 0xed, 0x7a, 0xc6, 0x8c, 0x8e, 0x91, 0xf4, 0xe5, + 0x53, 0x00, 0x5b, 0xcc, 0xb6, 0x1a, 0x88, 0x37, 0xc3, 0x98, 0x21, 0x71, 0x23, 0x15, 0x17, 0x06, + 0xe1, 0xde, 0xa9, 0x2e, 0xae, 0x45, 0x45, 0x3d, 0xe0, 0x47, 0x5a, 0xcc, 0xee, 0x59, 0xaf, 0x4c, + 0x45, 0xce, 0x68, 0x6f, 0x83, 0x73, 0x62, 0xdc, 0x4c, 0x5c, 0x73, 0x19, 0xc7, 0xb4, 0x33, 0x6f, + 0x26, 0xde, 0x44, 0xd4, 0x59, 0xc2, 0x3e, 0x69, 0xb4, 0xdf, 0x54, 0xcb, 0xe0, 0x7c, 0xaa, 0xdd, + 0x72, 0x3e, 0x8f, 0x83, 0x29, 0x47, 0xac, 0x88, 0x97, 0xff, 0x8c, 0x29, 0xff, 0x15, 0x7f, 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 0xbe, 0x56, 0x2e, 0xfe, 0x17, 0x00, + 0x00, 0xff, 0xff, 0x84, 0xab, 0xda, 0x7b, 0x39, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4291,7 +4290,7 @@ func (m *ThrottledPacketDataWrapper) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &types1.SlashPacketData{} + v := &types.SlashPacketData{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4326,7 +4325,7 @@ func (m *ThrottledPacketDataWrapper) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - v := &types1.VSCMaturedPacketData{} + v := &types.VSCMaturedPacketData{} if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/ccv/consumer/types/genesis.go b/x/ccv/types/genesis.go similarity index 67% rename from x/ccv/consumer/types/genesis.go rename to x/ccv/types/genesis.go index 3a8769939b..ff18480ecb 100644 --- a/x/ccv/consumer/types/genesis.go +++ b/x/ccv/types/genesis.go @@ -6,8 +6,6 @@ import ( errorsmod "cosmossdk.io/errors" abci "github.com/cometbft/cometbft/abci/types" - - ccv "github.com/cosmos/interchain-security/v3/x/ccv/types" ) // NewInitialGenesisState returns a consumer GenesisState for a completely new consumer chain. @@ -29,7 +27,7 @@ func NewRestartGenesisState( maturingPackets []MaturingVSCPacket, initValSet []abci.ValidatorUpdate, heightToValsetUpdateIDs []HeightToValsetUpdateID, - pendingConsumerPackets ccv.ConsumerPacketDataList, + pendingConsumerPackets ConsumerPacketDataList, outstandingDowntimes []OutstandingDowntime, lastTransBlockHeight LastTransmissionBlockHeight, params Params, @@ -78,7 +76,7 @@ func (gs GenesisState) Validate() error { return nil } if len(gs.InitialValSet) == 0 { - return errorsmod.Wrap(ccv.ErrInvalidGenesis, "initial validator set is empty") + return errorsmod.Wrap(ErrInvalidGenesis, "initial validator set is empty") } if err := gs.Params.Validate(); err != nil { return err @@ -86,68 +84,68 @@ func (gs GenesisState) Validate() error { if gs.NewChain { if gs.ProviderClientState == nil { - return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider client state cannot be nil for new chain") + return errorsmod.Wrap(ErrInvalidGenesis, "provider client state cannot be nil for new chain") } if err := gs.ProviderClientState.Validate(); err != nil { - return errorsmod.Wrapf(ccv.ErrInvalidGenesis, "provider client state invalid for new chain %s", err.Error()) + return errorsmod.Wrapf(ErrInvalidGenesis, "provider client state invalid for new chain %s", err.Error()) } if gs.ProviderConsensusState == nil { - return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider consensus state cannot be nil for new chain") + return errorsmod.Wrap(ErrInvalidGenesis, "provider consensus state cannot be nil for new chain") } if err := gs.ProviderConsensusState.ValidateBasic(); err != nil { - return errorsmod.Wrapf(ccv.ErrInvalidGenesis, "provider consensus state invalid for new chain %s", err.Error()) + return errorsmod.Wrapf(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") + 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(ccv.ErrInvalidGenesis, "provider channel id cannot be set for new chain. It must be established on handshake") + 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(ccv.ErrInvalidGenesis, "maturing packets must be empty for new chain") + return errorsmod.Wrap(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") + return errorsmod.Wrap(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") + 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(ccv.ErrInvalidGenesis, "provider client id must be set for a restarting consumer genesis state") + 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( - ccv.ErrInvalidGenesis, "maturing packets must be empty when handshake isn't completed") + 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") + 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") + 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 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( - ccv.ErrInvalidGenesis, + ErrInvalidGenesis, "empty height to validator set update id mapping", ) } if gs.ProviderClientState != nil || gs.ProviderConsensusState != nil { - return errorsmod.Wrap(ccv.ErrInvalidGenesis, "provider client state and consensus state must be nil for a restarting genesis state") + 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 { @@ -160,10 +158,10 @@ func (gs GenesisState) Validate() error { func (mat MaturingVSCPacket) Validate() error { if mat.MaturityTime.IsZero() { - return errorsmod.Wrap(ccv.ErrInvalidVSCMaturedTime, "cannot have 0 maturity time") + return errorsmod.Wrap(ErrInvalidVSCMaturedTime, "cannot have 0 maturity time") } if mat.VscId == 0 { - return errorsmod.Wrap(ccv.ErrInvalidVSCMaturedId, "cannot have 0 maturity time") + return errorsmod.Wrap(ErrInvalidVSCMaturedId, "cannot have 0 maturity time") } return nil } diff --git a/x/ccv/consumer/types/params.go b/x/ccv/types/params.go similarity index 83% rename from x/ccv/consumer/types/params.go rename to x/ccv/types/params.go index a9b4e61285..e8ea0a8765 100644 --- a/x/ccv/consumer/types/params.go +++ b/x/ccv/types/params.go @@ -7,8 +7,6 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - - ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types" ) const ( @@ -95,7 +93,7 @@ func DefaultParams() Params { DefaultBlocksPerDistributionTransmission, "", "", - ccvtypes.DefaultCCVTimeoutPeriod, + DefaultCCVTimeoutPeriod, DefaultTransferTimeoutPeriod, DefaultConsumerRedistributeFrac, DefaultHistoricalEntries, @@ -108,31 +106,31 @@ func DefaultParams() Params { // Validate all ccv-consumer module parameters func (p Params) Validate() error { - if err := ccvtypes.ValidateBool(p.Enabled); err != nil { + if err := ValidateBool(p.Enabled); err != nil { return err } - if err := ccvtypes.ValidatePositiveInt64(p.BlocksPerDistributionTransmission); err != nil { + if err := ValidatePositiveInt64(p.BlocksPerDistributionTransmission); err != nil { return err } - if err := ccvtypes.ValidateDistributionTransmissionChannel(p.DistributionTransmissionChannel); err != nil { + if err := ValidateDistributionTransmissionChannel(p.DistributionTransmissionChannel); err != nil { return err } if err := ValidateProviderFeePoolAddrStr(p.ProviderFeePoolAddrStr); err != nil { return err } - if err := ccvtypes.ValidateDuration(p.CcvTimeoutPeriod); err != nil { + if err := ValidateDuration(p.CcvTimeoutPeriod); err != nil { return err } - if err := ccvtypes.ValidateDuration(p.TransferTimeoutPeriod); err != nil { + if err := ValidateDuration(p.TransferTimeoutPeriod); err != nil { return err } - if err := ccvtypes.ValidateStringFraction(p.ConsumerRedistributionFraction); err != nil { + if err := ValidateStringFraction(p.ConsumerRedistributionFraction); err != nil { return err } - if err := ccvtypes.ValidatePositiveInt64(p.HistoricalEntries); err != nil { + if err := ValidatePositiveInt64(p.HistoricalEntries); err != nil { return err } - if err := ccvtypes.ValidateDuration(p.UnbondingPeriod); err != nil { + if err := ValidateDuration(p.UnbondingPeriod); err != nil { return err } if err := ValidateSoftOptOutThreshold(p.SoftOptOutThreshold); err != nil { @@ -150,23 +148,23 @@ func (p Params) Validate() error { // ParamSetPairs implements params.ParamSet func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(KeyEnabled, p.Enabled, ccvtypes.ValidateBool), + paramtypes.NewParamSetPair(KeyEnabled, p.Enabled, ValidateBool), paramtypes.NewParamSetPair(KeyBlocksPerDistributionTransmission, - p.BlocksPerDistributionTransmission, ccvtypes.ValidatePositiveInt64), + p.BlocksPerDistributionTransmission, ValidatePositiveInt64), paramtypes.NewParamSetPair(KeyDistributionTransmissionChannel, - p.DistributionTransmissionChannel, ccvtypes.ValidateDistributionTransmissionChannel), + p.DistributionTransmissionChannel, ValidateDistributionTransmissionChannel), paramtypes.NewParamSetPair(KeyProviderFeePoolAddrStr, p.ProviderFeePoolAddrStr, ValidateProviderFeePoolAddrStr), - paramtypes.NewParamSetPair(ccvtypes.KeyCCVTimeoutPeriod, - p.CcvTimeoutPeriod, ccvtypes.ValidateDuration), + paramtypes.NewParamSetPair(KeyCCVTimeoutPeriod, + p.CcvTimeoutPeriod, ValidateDuration), paramtypes.NewParamSetPair(KeyTransferTimeoutPeriod, - p.TransferTimeoutPeriod, ccvtypes.ValidateDuration), + p.TransferTimeoutPeriod, ValidateDuration), paramtypes.NewParamSetPair(KeyConsumerRedistributionFrac, - p.ConsumerRedistributionFraction, ccvtypes.ValidateStringFraction), + p.ConsumerRedistributionFraction, ValidateStringFraction), paramtypes.NewParamSetPair(KeyHistoricalEntries, - p.HistoricalEntries, ccvtypes.ValidatePositiveInt64), + p.HistoricalEntries, ValidatePositiveInt64), paramtypes.NewParamSetPair(KeyConsumerUnbondingPeriod, - p.UnbondingPeriod, ccvtypes.ValidateDuration), + p.UnbondingPeriod, ValidateDuration), paramtypes.NewParamSetPair(KeySoftOptOutThreshold, p.SoftOptOutThreshold, ValidateSoftOptOutThreshold), paramtypes.NewParamSetPair(KeyRewardDenoms, @@ -182,7 +180,7 @@ func ValidateProviderFeePoolAddrStr(i interface{}) error { return nil } // Otherwise validate as usual for a bech32 address - return ccvtypes.ValidateBech32(i) + return ValidateBech32(i) } func ValidateSoftOptOutThreshold(i interface{}) error { diff --git a/x/ccv/types/shared_consumer.pb.go b/x/ccv/types/shared_consumer.pb.go new file mode 100644 index 0000000000..4cf8860269 --- /dev/null +++ b/x/ccv/types/shared_consumer.pb.go @@ -0,0 +1,2712 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: interchain_security/ccv/v1/shared_consumer.proto + +package types + +import ( + fmt "fmt" + types "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" + _ "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" + 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 + +// Params 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. +// +// TODO: Rename to ConsumerParams. See https://github.com/cosmos/interchain-security/issues/1206 +type Params struct { + // TODO: Remove enabled flag and find a better way to setup integration tests + // See: https://github.com/cosmos/interchain-security/issues/339 + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + /////////////////////// + // Distribution Params + // Number of blocks between ibc-token-transfers from the consumer chain to + // the provider chain. Note that at this transmission event a fraction of + // the accumulated tokens are divided and sent consumer redistribution + // address. + BlocksPerDistributionTransmission int64 `protobuf:"varint,2,opt,name=blocks_per_distribution_transmission,json=blocksPerDistributionTransmission,proto3" json:"blocks_per_distribution_transmission,omitempty"` + // Channel, and provider-chain receiving address to send distribution token + // transfers over. These parameters is auto-set during the consumer <-> + // provider handshake procedure. + DistributionTransmissionChannel string `protobuf:"bytes,3,opt,name=distribution_transmission_channel,json=distributionTransmissionChannel,proto3" json:"distribution_transmission_channel,omitempty"` + ProviderFeePoolAddrStr string `protobuf:"bytes,4,opt,name=provider_fee_pool_addr_str,json=providerFeePoolAddrStr,proto3" json:"provider_fee_pool_addr_str,omitempty"` + // Sent CCV related IBC packets will timeout after this duration + CcvTimeoutPeriod time.Duration `protobuf:"bytes,5,opt,name=ccv_timeout_period,json=ccvTimeoutPeriod,proto3,stdduration" json:"ccv_timeout_period"` + // Sent transfer related IBC packets will timeout after this duration + TransferTimeoutPeriod time.Duration `protobuf:"bytes,6,opt,name=transfer_timeout_period,json=transferTimeoutPeriod,proto3,stdduration" json:"transfer_timeout_period"` + // The fraction of tokens allocated to the consumer redistribution address + // during distribution events. The fraction is a string representing a + // decimal number. For example "0.75" would represent 75%. + ConsumerRedistributionFraction string `protobuf:"bytes,7,opt,name=consumer_redistribution_fraction,json=consumerRedistributionFraction,proto3" json:"consumer_redistribution_fraction,omitempty"` + // The number of historical info entries to persist in store. + // This param is a part of the cosmos sdk staking module. In the case of + // a ccv enabled consumer chain, the ccv module acts as the staking module. + HistoricalEntries int64 `protobuf:"varint,8,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty"` + // Unbonding period for the consumer, + // which should be smaller than that of the provider in general. + UnbondingPeriod time.Duration `protobuf:"bytes,9,opt,name=unbonding_period,json=unbondingPeriod,proto3,stdduration" json:"unbonding_period"` + // 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 + SoftOptOutThreshold string `protobuf:"bytes,10,opt,name=soft_opt_out_threshold,json=softOptOutThreshold,proto3" json:"soft_opt_out_threshold,omitempty"` + // Reward denoms. These are the denominations which are allowed to be sent to + // the provider as rewards. + RewardDenoms []string `protobuf:"bytes,11,rep,name=reward_denoms,json=rewardDenoms,proto3" json:"reward_denoms,omitempty"` + // Provider-originated reward denoms. These are denoms coming from the + // provider which are allowed to be used as rewards. e.g. "uatom" + ProviderRewardDenoms []string `protobuf:"bytes,12,rep,name=provider_reward_denoms,json=providerRewardDenoms,proto3" json:"provider_reward_denoms,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_d0a8be0efc64dfbc, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +func (m *Params) GetBlocksPerDistributionTransmission() int64 { + if m != nil { + return m.BlocksPerDistributionTransmission + } + return 0 +} + +func (m *Params) GetDistributionTransmissionChannel() string { + if m != nil { + return m.DistributionTransmissionChannel + } + return "" +} + +func (m *Params) GetProviderFeePoolAddrStr() string { + if m != nil { + return m.ProviderFeePoolAddrStr + } + return "" +} + +func (m *Params) GetCcvTimeoutPeriod() time.Duration { + if m != nil { + return m.CcvTimeoutPeriod + } + return 0 +} + +func (m *Params) GetTransferTimeoutPeriod() time.Duration { + if m != nil { + return m.TransferTimeoutPeriod + } + return 0 +} + +func (m *Params) GetConsumerRedistributionFraction() string { + if m != nil { + return m.ConsumerRedistributionFraction + } + return "" +} + +func (m *Params) GetHistoricalEntries() int64 { + if m != nil { + return m.HistoricalEntries + } + return 0 +} + +func (m *Params) GetUnbondingPeriod() time.Duration { + if m != nil { + return m.UnbondingPeriod + } + return 0 +} + +func (m *Params) GetSoftOptOutThreshold() string { + if m != nil { + return m.SoftOptOutThreshold + } + return "" +} + +func (m *Params) GetRewardDenoms() []string { + if m != nil { + return m.RewardDenoms + } + return nil +} + +func (m *Params) GetProviderRewardDenoms() []string { + if m != nil { + return m.ProviderRewardDenoms + } + return nil +} + +// GenesisState 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. +// +// TODO: Rename to ConsumerGenesisState. See https://github.com/cosmos/interchain-security/issues/1206 +type GenesisState struct { + Params Params `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"` +} + +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_d0a8be0efc64dfbc, []int{1} +} +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() Params { + if m != nil { + return m.Params + } + return Params{} +} + +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 +} + +func (m *GenesisState) GetProviderClientState() *_07_tendermint.ClientState { + if m != nil { + return m.ProviderClientState + } + return nil +} + +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 +} + +func (m *GenesisState) GetInitialValSet() []types.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 +} + +// 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"` +} + +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_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 { + 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 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 + } +} +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 { + if m != nil { + return m.List + } + return nil +} + +func init() { + proto.RegisterType((*Params)(nil), "interchain_security.ccv.v1.Params") + proto.RegisterType((*GenesisState)(nil), "interchain_security.ccv.v1.GenesisState") + 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") +} + +func init() { + proto.RegisterFile("interchain_security/ccv/v1/shared_consumer.proto", fileDescriptor_d0a8be0efc64dfbc) +} + +var fileDescriptor_d0a8be0efc64dfbc = []byte{ + // 1178 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0x8e, 0x9b, 0x34, 0xb5, 0x27, 0x09, 0x4d, 0x27, 0xad, 0xd9, 0x26, 0xc2, 0x71, 0x0d, 0x48, + 0x96, 0xa0, 0xbb, 0x24, 0x2d, 0x42, 0xe2, 0x80, 0x68, 0x6c, 0x4a, 0x83, 0x4a, 0x13, 0x36, 0x69, + 0x0e, 0x45, 0x62, 0x34, 0x9e, 0x99, 0xd8, 0xa3, 0xae, 0x67, 0xac, 0x99, 0xd9, 0x0d, 0xb9, 0x22, + 0x7e, 0x40, 0x8f, 0xfc, 0xa4, 0x1e, 0x7b, 0xe4, 0x04, 0xa8, 0xfd, 0x23, 0x68, 0x3e, 0xd6, 0xb1, + 0xf3, 0x61, 0xca, 0x6d, 0x67, 0xde, 0xe7, 0x79, 0xbf, 0xdf, 0x79, 0x17, 0x7c, 0xc1, 0x85, 0x61, + 0x8a, 0x0c, 0x30, 0x17, 0x48, 0x33, 0x92, 0x2b, 0x6e, 0x4e, 0x13, 0x42, 0x8a, 0xa4, 0xd8, 0x4a, + 0xf4, 0x00, 0x2b, 0x46, 0x11, 0x91, 0x42, 0xe7, 0x43, 0xa6, 0xe2, 0x91, 0x92, 0x46, 0xc2, 0xf5, + 0x4b, 0x18, 0x31, 0x21, 0x45, 0x5c, 0x6c, 0xad, 0x6f, 0x18, 0x26, 0x28, 0x53, 0x43, 0x2e, 0x4c, + 0x82, 0x7b, 0x84, 0x27, 0xe6, 0x74, 0xc4, 0xb4, 0x27, 0xae, 0x27, 0xbc, 0x47, 0x92, 0x8c, 0xf7, + 0x07, 0x86, 0x64, 0x9c, 0x09, 0xa3, 0x93, 0x09, 0x74, 0xb1, 0x35, 0x71, 0x0a, 0x84, 0x7b, 0x96, + 0x40, 0xa4, 0x62, 0x09, 0x19, 0x60, 0x21, 0x58, 0x66, 0x51, 0xe1, 0x33, 0x40, 0x1a, 0x7d, 0x29, + 0xfb, 0x19, 0x4b, 0xdc, 0xa9, 0x97, 0x1f, 0x27, 0x34, 0x57, 0xd8, 0x70, 0x29, 0x82, 0xfc, 0x76, + 0x5f, 0xf6, 0xa5, 0xfb, 0x4c, 0xec, 0x57, 0xb8, 0xfd, 0x74, 0x46, 0xd0, 0x27, 0x5c, 0xb1, 0x00, + 0xdb, 0x3c, 0xaf, 0xdc, 0xf0, 0x21, 0xd3, 0x06, 0x0f, 0x47, 0x1e, 0x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, 0x33, 0xf7, 0xc7, 0x7f, 0x62, 0xc5, 0x83, + 0xe4, 0x57, 0xf7, 0x3b, 0xe6, 0xfe, 0x1e, 0x7b, 0x8b, 0x2e, 0xbe, 0x07, 0xff, 0x06, 0x00, 0x00, + 0xff, 0xff, 0xd1, 0x28, 0xd8, 0xb6, 0xab, 0x0a, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ProviderRewardDenoms) > 0 { + for iNdEx := len(m.ProviderRewardDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ProviderRewardDenoms[iNdEx]) + copy(dAtA[i:], m.ProviderRewardDenoms[iNdEx]) + i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.ProviderRewardDenoms[iNdEx]))) + i-- + dAtA[i] = 0x62 + } + } + if len(m.RewardDenoms) > 0 { + for iNdEx := len(m.RewardDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RewardDenoms[iNdEx]) + copy(dAtA[i:], m.RewardDenoms[iNdEx]) + i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.RewardDenoms[iNdEx]))) + i-- + dAtA[i] = 0x5a + } + } + if len(m.SoftOptOutThreshold) > 0 { + i -= len(m.SoftOptOutThreshold) + copy(dAtA[i:], m.SoftOptOutThreshold) + i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.SoftOptOutThreshold))) + i-- + dAtA[i] = 0x52 + } + n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingPeriod):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintSharedConsumer(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x4a + if m.HistoricalEntries != 0 { + i = encodeVarintSharedConsumer(dAtA, i, uint64(m.HistoricalEntries)) + i-- + dAtA[i] = 0x40 + } + if len(m.ConsumerRedistributionFraction) > 0 { + i -= len(m.ConsumerRedistributionFraction) + copy(dAtA[i:], m.ConsumerRedistributionFraction) + i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.ConsumerRedistributionFraction))) + i-- + dAtA[i] = 0x3a + } + n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TransferTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TransferTimeoutPeriod):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintSharedConsumer(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x32 + n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.CcvTimeoutPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CcvTimeoutPeriod):]) + if err3 != nil { + return 0, err3 + } + i -= n3 + i = encodeVarintSharedConsumer(dAtA, i, uint64(n3)) + i-- + dAtA[i] = 0x2a + if len(m.ProviderFeePoolAddrStr) > 0 { + i -= len(m.ProviderFeePoolAddrStr) + copy(dAtA[i:], m.ProviderFeePoolAddrStr) + i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.ProviderFeePoolAddrStr))) + i-- + dAtA[i] = 0x22 + } + if len(m.DistributionTransmissionChannel) > 0 { + i -= len(m.DistributionTransmissionChannel) + copy(dAtA[i:], m.DistributionTransmissionChannel) + i = encodeVarintSharedConsumer(dAtA, i, uint64(len(m.DistributionTransmissionChannel))) + i-- + dAtA[i] = 0x1a + } + if m.BlocksPerDistributionTransmission != 0 { + i = encodeVarintSharedConsumer(dAtA, i, uint64(m.BlocksPerDistributionTransmission)) + i-- + dAtA[i] = 0x10 + } + if m.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +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 + 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 = encodeVarintSharedConsumer(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + { + size, err := m.PendingConsumerPackets.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + 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 + } + } + 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 = 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 + } + } + if m.ProviderConsensusState != nil { + { + size, err := m.ProviderConsensusState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSharedConsumer(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 = 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 + n9, err9 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.MaturityTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.MaturityTime):]) + if err9 != nil { + return 0, err9 + } + i -= n9 + i = encodeVarintSharedConsumer(dAtA, i, uint64(n9)) + 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 + } + } + return len(dAtA) - i, nil +} + +func encodeVarintSharedConsumer(dAtA []byte, offset int, v uint64) int { + offset -= sovSharedConsumer(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Enabled { + n += 2 + } + if m.BlocksPerDistributionTransmission != 0 { + n += 1 + sovSharedConsumer(uint64(m.BlocksPerDistributionTransmission)) + } + l = len(m.DistributionTransmissionChannel) + if l > 0 { + n += 1 + l + sovSharedConsumer(uint64(l)) + } + l = len(m.ProviderFeePoolAddrStr) + if l > 0 { + n += 1 + l + sovSharedConsumer(uint64(l)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CcvTimeoutPeriod) + n += 1 + l + sovSharedConsumer(uint64(l)) + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TransferTimeoutPeriod) + n += 1 + l + sovSharedConsumer(uint64(l)) + l = len(m.ConsumerRedistributionFraction) + if l > 0 { + n += 1 + l + sovSharedConsumer(uint64(l)) + } + if m.HistoricalEntries != 0 { + n += 1 + sovSharedConsumer(uint64(m.HistoricalEntries)) + } + l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingPeriod) + n += 1 + l + sovSharedConsumer(uint64(l)) + l = len(m.SoftOptOutThreshold) + if l > 0 { + n += 1 + l + sovSharedConsumer(uint64(l)) + } + if len(m.RewardDenoms) > 0 { + for _, s := range m.RewardDenoms { + l = len(s) + n += 1 + l + sovSharedConsumer(uint64(l)) + } + } + if len(m.ProviderRewardDenoms) > 0 { + for _, s := range m.ProviderRewardDenoms { + l = len(s) + n += 1 + l + sovSharedConsumer(uint64(l)) + } + } + return n +} + +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l 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() + n += 1 + l + sovSharedConsumer(uint64(l)) + if m.PreCCV { + 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) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ValidatorConsensusAddress) + if l > 0 { + 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 + } + var l int + _ = l + if len(m.List) > 0 { + for _, e := range m.List { + l = e.Size() + n += 1 + l + sovSharedConsumer(uint64(l)) + } + } + return n +} + +func sovSharedConsumer(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSharedConsumer(x uint64) (n int) { + return sovSharedConsumer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enabled", 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.Enabled = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlocksPerDistributionTransmission", wireType) + } + m.BlocksPerDistributionTransmission = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSharedConsumer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlocksPerDistributionTransmission |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DistributionTransmissionChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.DistributionTransmissionChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderFeePoolAddrStr", 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.ProviderFeePoolAddrStr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CcvTimeoutPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.CcvTimeoutPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TransferTimeoutPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.TransferTimeoutPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsumerRedistributionFraction", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.ConsumerRedistributionFraction = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) + } + m.HistoricalEntries = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSharedConsumer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HistoricalEntries |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnbondingPeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 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.UnbondingPeriod, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SoftOptOutThreshold", 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.SoftOptOutThreshold = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + 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 + 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 *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 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: 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 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 + 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.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 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.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 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.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 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:]) + 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 *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 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: 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 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) + } + m.ValsetUpdateId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSharedConsumer + } + 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 := 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 *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 + } + 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 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.ValidatorConsensusAddress = string(dAtA[iNdEx:postIndex]) + 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 *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: + 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 |= int64(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 { + return ErrInvalidLengthSharedConsumer + } + 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 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: 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 ErrIntOverflowSharedConsumer + } + 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 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.StdTimeUnmarshal(&m.MaturityTime, 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 *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: + 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 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.List = append(m.List, ConsumerPacketData{}) + if err := m.List[len(m.List)-1].Unmarshal(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 skipSharedConsumer(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, ErrIntOverflowSharedConsumer + } + 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, ErrIntOverflowSharedConsumer + } + 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, ErrIntOverflowSharedConsumer + } + 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, ErrInvalidLengthSharedConsumer + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSharedConsumer + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSharedConsumer + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSharedConsumer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSharedConsumer = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSharedConsumer = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/ccv/types/ccv.go b/x/ccv/types/wire.go similarity index 100% rename from x/ccv/types/ccv.go rename to x/ccv/types/wire.go diff --git a/x/ccv/types/ccv.pb.go b/x/ccv/types/wire.pb.go similarity index 66% rename from x/ccv/types/ccv.pb.go rename to x/ccv/types/wire.pb.go index aa0f7da10e..82768cf805 100644 --- a/x/ccv/types/ccv.pb.go +++ b/x/ccv/types/wire.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: interchain_security/ccv/v1/ccv.proto +// source: interchain_security/ccv/v1/wire.proto package types @@ -54,11 +54,11 @@ func (x ConsumerPacketDataType) String() string { } func (ConsumerPacketDataType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{0} + return fileDescriptor_8fd0dc67df6b10ed, []int{0} } // InfractionType indicates the infraction type a validator commited. -// NOTE: ccv.InfractionType to maintain compatibility between ICS versions +// Note ccv.InfractionType to maintain compatibility between ICS versions // using different versions of the cosmos-sdk and ibc-go modules. type InfractionType int32 @@ -88,7 +88,7 @@ func (x InfractionType) String() string { } func (InfractionType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{1} + return fileDescriptor_8fd0dc67df6b10ed, []int{1} } // This packet is sent from provider chain to consumer chain if the validator @@ -108,7 +108,7 @@ func (m *ValidatorSetChangePacketData) Reset() { *m = ValidatorSetChange func (m *ValidatorSetChangePacketData) String() string { return proto.CompactTextString(m) } func (*ValidatorSetChangePacketData) ProtoMessage() {} func (*ValidatorSetChangePacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{0} + return fileDescriptor_8fd0dc67df6b10ed, []int{0} } func (m *ValidatorSetChangePacketData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -158,51 +158,6 @@ func (m *ValidatorSetChangePacketData) GetSlashAcks() []string { return nil } -// List of ccv.ValidatorSetChangePacketData. -type ValidatorSetChangePackets struct { - List []ValidatorSetChangePacketData `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` -} - -func (m *ValidatorSetChangePackets) Reset() { *m = ValidatorSetChangePackets{} } -func (m *ValidatorSetChangePackets) String() string { return proto.CompactTextString(m) } -func (*ValidatorSetChangePackets) ProtoMessage() {} -func (*ValidatorSetChangePackets) Descriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{1} -} -func (m *ValidatorSetChangePackets) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorSetChangePackets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorSetChangePackets.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 *ValidatorSetChangePackets) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorSetChangePackets.Merge(m, src) -} -func (m *ValidatorSetChangePackets) XXX_Size() int { - return m.Size() -} -func (m *ValidatorSetChangePackets) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorSetChangePackets.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorSetChangePackets proto.InternalMessageInfo - -func (m *ValidatorSetChangePackets) GetList() []ValidatorSetChangePacketData { - if m != nil { - return m.List - } - return nil -} - // This packet is sent from the consumer chain to the provider chain // to notify that a VSC packet reached maturity on the consumer chain. type VSCMaturedPacketData struct { @@ -214,7 +169,7 @@ func (m *VSCMaturedPacketData) Reset() { *m = VSCMaturedPacketData{} } func (m *VSCMaturedPacketData) String() string { return proto.CompactTextString(m) } func (*VSCMaturedPacketData) ProtoMessage() {} func (*VSCMaturedPacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{2} + return fileDescriptor_8fd0dc67df6b10ed, []int{1} } func (m *VSCMaturedPacketData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -265,7 +220,7 @@ func (m *SlashPacketData) Reset() { *m = SlashPacketData{} } func (m *SlashPacketData) String() string { return proto.CompactTextString(m) } func (*SlashPacketData) ProtoMessage() {} func (*SlashPacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{3} + return fileDescriptor_8fd0dc67df6b10ed, []int{2} } func (m *SlashPacketData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -315,53 +270,7 @@ func (m *SlashPacketData) GetInfraction() types1.Infraction { return types1.Infraction_INFRACTION_UNSPECIFIED } -// MaturedUnbondingOps defines a list of ids corresponding to ids of matured -// unbonding operations. -type MaturedUnbondingOps struct { - Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` -} - -func (m *MaturedUnbondingOps) Reset() { *m = MaturedUnbondingOps{} } -func (m *MaturedUnbondingOps) String() string { return proto.CompactTextString(m) } -func (*MaturedUnbondingOps) ProtoMessage() {} -func (*MaturedUnbondingOps) Descriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{4} -} -func (m *MaturedUnbondingOps) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MaturedUnbondingOps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MaturedUnbondingOps.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 *MaturedUnbondingOps) XXX_Merge(src proto.Message) { - xxx_messageInfo_MaturedUnbondingOps.Merge(m, src) -} -func (m *MaturedUnbondingOps) XXX_Size() int { - return m.Size() -} -func (m *MaturedUnbondingOps) XXX_DiscardUnknown() { - xxx_messageInfo_MaturedUnbondingOps.DiscardUnknown(m) -} - -var xxx_messageInfo_MaturedUnbondingOps proto.InternalMessageInfo - -func (m *MaturedUnbondingOps) GetIds() []uint64 { - if m != nil { - return m.Ids - } - return nil -} - -// ConsumerPacketData contains a consumer packet data, type tag, and index for storage. +// ConsumerPacketData contains a consumer packet data and a type tag type ConsumerPacketData struct { Type ConsumerPacketDataType `protobuf:"varint,1,opt,name=type,proto3,enum=interchain_security.ccv.v1.ConsumerPacketDataType" json:"type,omitempty"` // Types that are valid to be assigned to Data: @@ -374,7 +283,7 @@ func (m *ConsumerPacketData) Reset() { *m = ConsumerPacketData{} } func (m *ConsumerPacketData) String() string { return proto.CompactTextString(m) } func (*ConsumerPacketData) ProtoMessage() {} func (*ConsumerPacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{5} + return fileDescriptor_8fd0dc67df6b10ed, []int{3} } func (m *ConsumerPacketData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -455,24 +364,24 @@ func (*ConsumerPacketData) XXX_OneofWrappers() []interface{} { } } -// ConsumerPacketDataList is a list of consumer packet data packets. -// NOTE: It is only used for exporting / importing state in InitGenesis and ExportGenesis. -type ConsumerPacketDataList struct { - List []ConsumerPacketData `protobuf:"bytes,1,rep,name=list,proto3" json:"list"` +// Note this type is used during IBC handshake methods for both the consumer and provider +type HandshakeMetadata struct { + ProviderFeePoolAddr string `protobuf:"bytes,1,opt,name=provider_fee_pool_addr,json=providerFeePoolAddr,proto3" json:"provider_fee_pool_addr,omitempty"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` } -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_68bd5f3242e6f29c, []int{6} +func (m *HandshakeMetadata) Reset() { *m = HandshakeMetadata{} } +func (m *HandshakeMetadata) String() string { return proto.CompactTextString(m) } +func (*HandshakeMetadata) ProtoMessage() {} +func (*HandshakeMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_8fd0dc67df6b10ed, []int{4} } -func (m *ConsumerPacketDataList) XXX_Unmarshal(b []byte) error { +func (m *HandshakeMetadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ConsumerPacketDataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *HandshakeMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ConsumerPacketDataList.Marshal(b, m, deterministic) + return xxx_messageInfo_HandshakeMetadata.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -482,23 +391,30 @@ func (m *ConsumerPacketDataList) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *ConsumerPacketDataList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsumerPacketDataList.Merge(m, src) +func (m *HandshakeMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_HandshakeMetadata.Merge(m, src) } -func (m *ConsumerPacketDataList) XXX_Size() int { +func (m *HandshakeMetadata) XXX_Size() int { return m.Size() } -func (m *ConsumerPacketDataList) XXX_DiscardUnknown() { - xxx_messageInfo_ConsumerPacketDataList.DiscardUnknown(m) +func (m *HandshakeMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_HandshakeMetadata.DiscardUnknown(m) } -var xxx_messageInfo_ConsumerPacketDataList proto.InternalMessageInfo +var xxx_messageInfo_HandshakeMetadata proto.InternalMessageInfo -func (m *ConsumerPacketDataList) GetList() []ConsumerPacketData { +func (m *HandshakeMetadata) GetProviderFeePoolAddr() string { if m != nil { - return m.List + return m.ProviderFeePoolAddr } - return nil + return "" +} + +func (m *HandshakeMetadata) GetVersion() string { + if m != nil { + return m.Version + } + return "" } // ConsumerPacketData contains a consumer packet data and a type tag @@ -515,7 +431,7 @@ func (m *ConsumerPacketDataV1) Reset() { *m = ConsumerPacketDataV1{} } func (m *ConsumerPacketDataV1) String() string { return proto.CompactTextString(m) } func (*ConsumerPacketDataV1) ProtoMessage() {} func (*ConsumerPacketDataV1) Descriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{7} + return fileDescriptor_8fd0dc67df6b10ed, []int{5} } func (m *ConsumerPacketDataV1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +526,7 @@ func (m *SlashPacketDataV1) Reset() { *m = SlashPacketDataV1{} } func (m *SlashPacketDataV1) String() string { return proto.CompactTextString(m) } func (*SlashPacketDataV1) ProtoMessage() {} func (*SlashPacketDataV1) Descriptor() ([]byte, []int) { - return fileDescriptor_68bd5f3242e6f29c, []int{8} + return fileDescriptor_8fd0dc67df6b10ed, []int{6} } func (m *SlashPacketDataV1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -664,75 +580,73 @@ func init() { proto.RegisterEnum("interchain_security.ccv.v1.ConsumerPacketDataType", ConsumerPacketDataType_name, ConsumerPacketDataType_value) proto.RegisterEnum("interchain_security.ccv.v1.InfractionType", InfractionType_name, InfractionType_value) proto.RegisterType((*ValidatorSetChangePacketData)(nil), "interchain_security.ccv.v1.ValidatorSetChangePacketData") - proto.RegisterType((*ValidatorSetChangePackets)(nil), "interchain_security.ccv.v1.ValidatorSetChangePackets") proto.RegisterType((*VSCMaturedPacketData)(nil), "interchain_security.ccv.v1.VSCMaturedPacketData") proto.RegisterType((*SlashPacketData)(nil), "interchain_security.ccv.v1.SlashPacketData") - proto.RegisterType((*MaturedUnbondingOps)(nil), "interchain_security.ccv.v1.MaturedUnbondingOps") proto.RegisterType((*ConsumerPacketData)(nil), "interchain_security.ccv.v1.ConsumerPacketData") - proto.RegisterType((*ConsumerPacketDataList)(nil), "interchain_security.ccv.v1.ConsumerPacketDataList") + proto.RegisterType((*HandshakeMetadata)(nil), "interchain_security.ccv.v1.HandshakeMetadata") proto.RegisterType((*ConsumerPacketDataV1)(nil), "interchain_security.ccv.v1.ConsumerPacketDataV1") proto.RegisterType((*SlashPacketDataV1)(nil), "interchain_security.ccv.v1.SlashPacketDataV1") } func init() { - proto.RegisterFile("interchain_security/ccv/v1/ccv.proto", fileDescriptor_68bd5f3242e6f29c) -} - -var fileDescriptor_68bd5f3242e6f29c = []byte{ - // 836 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6e, 0xe2, 0x46, - 0x1c, 0xb6, 0x01, 0xad, 0x9a, 0xa1, 0x22, 0xce, 0x2c, 0xad, 0x58, 0x6f, 0xcb, 0x5a, 0xd6, 0x4a, - 0x45, 0xa9, 0xd6, 0x2e, 0x64, 0x0f, 0x55, 0x7b, 0x69, 0x00, 0xa7, 0x71, 0x9b, 0x90, 0xc8, 0x06, - 0x56, 0xdb, 0x8b, 0x35, 0xd8, 0x13, 0x32,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 0xde, 0xdf, 0x17, 0xb9, 0x1f, 0x5e, 0x76, 0x09, 0xbb, 0x1e, 0x76, 0x14, 0xdb, 0xeb, 0xab, 0xb3, - 0x2b, 0xc1, 0x32, 0xd2, 0x17, 0x8b, 0xbb, 0x45, 0x70, 0xa4, 0xfe, 0x14, 0x5d, 0x30, 0xa2, 0x4f, - 0x7d, 0xe7, 0x51, 0xf4, 0xad, 0x3f, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xbf, 0xfc, 0xd2, - 0x88, 0x08, 0x00, 0x00, + proto.RegisterFile("interchain_security/ccv/v1/wire.proto", fileDescriptor_8fd0dc67df6b10ed) +} + +var fileDescriptor_8fd0dc67df6b10ed = []byte{ + // 833 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcd, 0x6e, 0xe3, 0x54, + 0x14, 0xb6, 0xd3, 0x6a, 0xa0, 0x37, 0x28, 0x75, 0x3d, 0x61, 0x64, 0x3c, 0x90, 0xb1, 0x2c, 0x90, + 0xa2, 0xa2, 0xb1, 0x49, 0x3a, 0x2b, 0xd8, 0x90, 0x1f, 0x97, 0x1a, 0xa6, 0x69, 0x64, 0x27, 0x19, + 0x0d, 0x1b, 0xeb, 0xc6, 0xbe, 0x4d, 0xae, 0x92, 0xf8, 0x5a, 0xbe, 0x37, 0x1e, 0xf2, 0x06, 0x28, + 0x2b, 0x5e, 0x20, 0x2b, 0xc4, 0x62, 0x1e, 0x83, 0xdd, 0x2c, 0x47, 0x62, 0x33, 0x1b, 0x46, 0xa8, + 0x7d, 0x03, 0x9e, 0x00, 0xd9, 0xf9, 0x6d, 0xe2, 0x56, 0xaa, 0x84, 0x04, 0x3b, 0xfb, 0xdc, 0xf3, + 0x7d, 0xf7, 0x9c, 0xef, 0x3b, 0x57, 0x07, 0x7c, 0x81, 0x7d, 0x86, 0x42, 0xb7, 0x0f, 0xb1, 0xef, + 0x50, 0xe4, 0x8e, 0x43, 0xcc, 0x26, 0xba, 0xeb, 0x46, 0x7a, 0x54, 0xd2, 0x5f, 0xe1, 0x10, 0x69, + 0x41, 0x48, 0x18, 0x11, 0xe5, 0x94, 0x34, 0xcd, 0x75, 0x23, 0x2d, 0x2a, 0xc9, 0x9f, 0xbb, 0x84, + 0x8e, 0x08, 0xd5, 0x29, 0x83, 0x03, 0xec, 0xf7, 0xf4, 0xa8, 0xd4, 0x45, 0x0c, 0x96, 0x96, 0xff, + 0x73, 0x06, 0x39, 0xdf, 0x23, 0x3d, 0x92, 0x7c, 0xea, 0xf1, 0xd7, 0x22, 0xfa, 0x98, 0x21, 0xdf, + 0x43, 0xe1, 0x08, 0xfb, 0x4c, 0x87, 0x5d, 0x17, 0xeb, 0x6c, 0x12, 0x20, 0x3a, 0x3f, 0x54, 0xdf, + 0xf1, 0xe0, 0xd3, 0x0e, 0x1c, 0x62, 0x0f, 0x32, 0x12, 0xda, 0x88, 0xd5, 0xfa, 0xd0, 0xef, 0xa1, + 0x26, 0x74, 0x07, 0x88, 0xd5, 0x21, 0x83, 0x22, 0x01, 0x47, 0xd1, 0xf2, 0xdc, 0x19, 0x07, 0x1e, + 0x64, 0x88, 0x4a, 0xbc, 0xb2, 0x57, 0xcc, 0x96, 0x15, 0x6d, 0xcd, 0xac, 0xc5, 0xcc, 0xda, 0x8a, + 0xa9, 0x9d, 0x24, 0x56, 0x95, 0x37, 0xef, 0x9f, 0x70, 0x7f, 0xbf, 0x7f, 0x22, 0x4d, 0xe0, 0x68, + 0xf8, 0xb5, 0xba, 0x43, 0xa4, 0x5a, 0x42, 0x74, 0x13, 0x42, 0xc5, 0x22, 0x88, 0x63, 0x14, 0xb1, + 0x45, 0x92, 0x83, 0x3d, 0x29, 0xa3, 0xf0, 0xc5, 0x7d, 0x2b, 0x37, 0x8f, 0xcf, 0x13, 0x4d, 0x4f, + 0xfc, 0x0c, 0x00, 0x3a, 0x84, 0xb4, 0xef, 0x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xb1, 0x6b, 0x42, 0x46, 0xce, 0x4f, 0x67, 0x8a, 0xd0, 0xd9, 0x72, 0x4a, 0xde, + 0xff, 0xf9, 0xd7, 0x02, 0x77, 0xfc, 0x9a, 0x07, 0xb9, 0x9b, 0x2d, 0x8a, 0xcf, 0xc0, 0x63, 0xb3, + 0x71, 0x6a, 0x55, 0x6a, 0x2d, 0xf3, 0xa2, 0x91, 0x56, 0xf6, 0xc3, 0xe9, 0x4c, 0x39, 0x5c, 0x83, + 0x8c, 0x51, 0xc0, 0x26, 0xa2, 0xbe, 0x8b, 0xaa, 0x5f, 0xb4, 0xab, 0xcf, 0x0d, 0xc7, 0x36, 0xbf, + 0x6b, 0x08, 0xbc, 0x9c, 0x9b, 0xce, 0x14, 0x50, 0x27, 0xe3, 0xee, 0x10, 0xd9, 0xb8, 0xe7, 0x8b, + 0xc7, 0x40, 0xda, 0x05, 0xbc, 0x68, 0xb4, 0xcc, 0x73, 0x43, 0xc8, 0xc8, 0x1f, 0x4d, 0x67, 0xca, + 0x87, 0x75, 0xf2, 0xca, 0x67, 0x78, 0x84, 0xe6, 0xb5, 0x56, 0x1b, 0x6f, 0xae, 0x0a, 0xfc, 0xdb, + 0xab, 0x02, 0xff, 0xd7, 0x55, 0x81, 0xff, 0xe5, 0xba, 0xc0, 0xbd, 0xbd, 0x2e, 0x70, 0xef, 0xae, + 0x0b, 0xdc, 0x8f, 0xcf, 0x7a, 0x98, 0xf5, 0xc7, 0x5d, 0xcd, 0x25, 0x23, 0x7d, 0xb1, 0x78, 0xd7, + 0x96, 0x3e, 0x5d, 0xad, 0xf0, 0xe8, 0x44, 0xff, 0x29, 0xd9, 0xe3, 0xc9, 0x42, 0xed, 0x3e, 0x48, + 0x36, 0xea, 0xc9, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x17, 0x85, 0x90, 0x57, 0xef, 0x07, 0x00, + 0x00, } func (m *ValidatorSetChangePacketData) Marshal() (dAtA []byte, err error) { @@ -759,13 +673,13 @@ func (m *ValidatorSetChangePacketData) MarshalToSizedBuffer(dAtA []byte) (int, e for iNdEx := len(m.SlashAcks) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.SlashAcks[iNdEx]) copy(dAtA[i:], m.SlashAcks[iNdEx]) - i = encodeVarintCcv(dAtA, i, uint64(len(m.SlashAcks[iNdEx]))) + i = encodeVarintWire(dAtA, i, uint64(len(m.SlashAcks[iNdEx]))) i-- dAtA[i] = 0x1a } } if m.ValsetUpdateId != 0 { - i = encodeVarintCcv(dAtA, i, uint64(m.ValsetUpdateId)) + i = encodeVarintWire(dAtA, i, uint64(m.ValsetUpdateId)) i-- dAtA[i] = 0x10 } @@ -777,44 +691,7 @@ func (m *ValidatorSetChangePacketData) MarshalToSizedBuffer(dAtA []byte) (int, e return 0, err } i -= size - i = encodeVarintCcv(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ValidatorSetChangePackets) 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 *ValidatorSetChangePackets) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorSetChangePackets) 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 = encodeVarintCcv(dAtA, i, uint64(size)) + i = encodeVarintWire(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -844,7 +721,7 @@ func (m *VSCMaturedPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.ValsetUpdateId != 0 { - i = encodeVarintCcv(dAtA, i, uint64(m.ValsetUpdateId)) + i = encodeVarintWire(dAtA, i, uint64(m.ValsetUpdateId)) i-- dAtA[i] = 0x8 } @@ -872,12 +749,12 @@ func (m *SlashPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.Infraction != 0 { - i = encodeVarintCcv(dAtA, i, uint64(m.Infraction)) + i = encodeVarintWire(dAtA, i, uint64(m.Infraction)) i-- dAtA[i] = 0x18 } if m.ValsetUpdateId != 0 { - i = encodeVarintCcv(dAtA, i, uint64(m.ValsetUpdateId)) + i = encodeVarintWire(dAtA, i, uint64(m.ValsetUpdateId)) i-- dAtA[i] = 0x10 } @@ -887,54 +764,13 @@ func (m *SlashPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintCcv(dAtA, i, uint64(size)) + i = encodeVarintWire(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *MaturedUnbondingOps) 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 *MaturedUnbondingOps) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MaturedUnbondingOps) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ids) > 0 { - dAtA3 := make([]byte, len(m.Ids)*10) - var j2 int - for _, num := range m.Ids { - for num >= 1<<7 { - dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j2++ - } - dAtA3[j2] = uint8(num) - j2++ - } - i -= j2 - copy(dAtA[i:], dAtA3[:j2]) - i = encodeVarintCcv(dAtA, i, uint64(j2)) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *ConsumerPacketData) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -965,7 +801,7 @@ func (m *ConsumerPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } if m.Type != 0 { - i = encodeVarintCcv(dAtA, i, uint64(m.Type)) + i = encodeVarintWire(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x8 } @@ -986,7 +822,7 @@ func (m *ConsumerPacketData_SlashPacketData) MarshalToSizedBuffer(dAtA []byte) ( return 0, err } i -= size - i = encodeVarintCcv(dAtA, i, uint64(size)) + i = encodeVarintWire(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -1007,14 +843,14 @@ func (m *ConsumerPacketData_VscMaturedPacketData) MarshalToSizedBuffer(dAtA []by return 0, err } i -= size - i = encodeVarintCcv(dAtA, i, uint64(size)) + i = encodeVarintWire(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } return len(dAtA) - i, nil } -func (m *ConsumerPacketDataList) Marshal() (dAtA []byte, err error) { +func (m *HandshakeMetadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1024,29 +860,29 @@ func (m *ConsumerPacketDataList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ConsumerPacketDataList) MarshalTo(dAtA []byte) (int, error) { +func (m *HandshakeMetadata) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConsumerPacketDataList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *HandshakeMetadata) 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 = encodeVarintCcv(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintWire(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.ProviderFeePoolAddr) > 0 { + i -= len(m.ProviderFeePoolAddr) + copy(dAtA[i:], m.ProviderFeePoolAddr) + i = encodeVarintWire(dAtA, i, uint64(len(m.ProviderFeePoolAddr))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1081,7 +917,7 @@ func (m *ConsumerPacketDataV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { } } if m.Type != 0 { - i = encodeVarintCcv(dAtA, i, uint64(m.Type)) + i = encodeVarintWire(dAtA, i, uint64(m.Type)) i-- dAtA[i] = 0x8 } @@ -1102,7 +938,7 @@ func (m *ConsumerPacketDataV1_SlashPacketData) MarshalToSizedBuffer(dAtA []byte) return 0, err } i -= size - i = encodeVarintCcv(dAtA, i, uint64(size)) + i = encodeVarintWire(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -1123,7 +959,7 @@ func (m *ConsumerPacketDataV1_VscMaturedPacketData) MarshalToSizedBuffer(dAtA [] return 0, err } i -= size - i = encodeVarintCcv(dAtA, i, uint64(size)) + i = encodeVarintWire(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -1151,12 +987,12 @@ func (m *SlashPacketDataV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.Infraction != 0 { - i = encodeVarintCcv(dAtA, i, uint64(m.Infraction)) + i = encodeVarintWire(dAtA, i, uint64(m.Infraction)) i-- dAtA[i] = 0x18 } if m.ValsetUpdateId != 0 { - i = encodeVarintCcv(dAtA, i, uint64(m.ValsetUpdateId)) + i = encodeVarintWire(dAtA, i, uint64(m.ValsetUpdateId)) i-- dAtA[i] = 0x10 } @@ -1166,15 +1002,15 @@ func (m *SlashPacketDataV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintCcv(dAtA, i, uint64(size)) + i = encodeVarintWire(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func encodeVarintCcv(dAtA []byte, offset int, v uint64) int { - offset -= sovCcv(v) +func encodeVarintWire(dAtA []byte, offset int, v uint64) int { + offset -= sovWire(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -1193,31 +1029,16 @@ func (m *ValidatorSetChangePacketData) Size() (n int) { if len(m.ValidatorUpdates) > 0 { for _, e := range m.ValidatorUpdates { l = e.Size() - n += 1 + l + sovCcv(uint64(l)) + n += 1 + l + sovWire(uint64(l)) } } if m.ValsetUpdateId != 0 { - n += 1 + sovCcv(uint64(m.ValsetUpdateId)) + n += 1 + sovWire(uint64(m.ValsetUpdateId)) } if len(m.SlashAcks) > 0 { for _, s := range m.SlashAcks { l = len(s) - n += 1 + l + sovCcv(uint64(l)) - } - } - return n -} - -func (m *ValidatorSetChangePackets) 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 + sovCcv(uint64(l)) + n += 1 + l + sovWire(uint64(l)) } } return n @@ -1230,7 +1051,7 @@ func (m *VSCMaturedPacketData) Size() (n int) { var l int _ = l if m.ValsetUpdateId != 0 { - n += 1 + sovCcv(uint64(m.ValsetUpdateId)) + n += 1 + sovWire(uint64(m.ValsetUpdateId)) } return n } @@ -1242,28 +1063,12 @@ func (m *SlashPacketData) Size() (n int) { var l int _ = l l = m.Validator.Size() - n += 1 + l + sovCcv(uint64(l)) + n += 1 + l + sovWire(uint64(l)) if m.ValsetUpdateId != 0 { - n += 1 + sovCcv(uint64(m.ValsetUpdateId)) + n += 1 + sovWire(uint64(m.ValsetUpdateId)) } if m.Infraction != 0 { - n += 1 + sovCcv(uint64(m.Infraction)) - } - return n -} - -func (m *MaturedUnbondingOps) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Ids) > 0 { - l = 0 - for _, e := range m.Ids { - l += sovCcv(uint64(e)) - } - n += 1 + sovCcv(uint64(l)) + l + n += 1 + sovWire(uint64(m.Infraction)) } return n } @@ -1275,7 +1080,7 @@ func (m *ConsumerPacketData) Size() (n int) { var l int _ = l if m.Type != 0 { - n += 1 + sovCcv(uint64(m.Type)) + n += 1 + sovWire(uint64(m.Type)) } if m.Data != nil { n += m.Data.Size() @@ -1291,7 +1096,7 @@ func (m *ConsumerPacketData_SlashPacketData) Size() (n int) { _ = l if m.SlashPacketData != nil { l = m.SlashPacketData.Size() - n += 1 + l + sovCcv(uint64(l)) + n += 1 + l + sovWire(uint64(l)) } return n } @@ -1303,21 +1108,23 @@ func (m *ConsumerPacketData_VscMaturedPacketData) Size() (n int) { _ = l if m.VscMaturedPacketData != nil { l = m.VscMaturedPacketData.Size() - n += 1 + l + sovCcv(uint64(l)) + n += 1 + l + sovWire(uint64(l)) } return n } -func (m *ConsumerPacketDataList) Size() (n int) { +func (m *HandshakeMetadata) 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 + sovCcv(uint64(l)) - } + l = len(m.ProviderFeePoolAddr) + if l > 0 { + n += 1 + l + sovWire(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovWire(uint64(l)) } return n } @@ -1329,7 +1136,7 @@ func (m *ConsumerPacketDataV1) Size() (n int) { var l int _ = l if m.Type != 0 { - n += 1 + sovCcv(uint64(m.Type)) + n += 1 + sovWire(uint64(m.Type)) } if m.Data != nil { n += m.Data.Size() @@ -1345,7 +1152,7 @@ func (m *ConsumerPacketDataV1_SlashPacketData) Size() (n int) { _ = l if m.SlashPacketData != nil { l = m.SlashPacketData.Size() - n += 1 + l + sovCcv(uint64(l)) + n += 1 + l + sovWire(uint64(l)) } return n } @@ -1357,7 +1164,7 @@ func (m *ConsumerPacketDataV1_VscMaturedPacketData) Size() (n int) { _ = l if m.VscMaturedPacketData != nil { l = m.VscMaturedPacketData.Size() - n += 1 + l + sovCcv(uint64(l)) + n += 1 + l + sovWire(uint64(l)) } return n } @@ -1368,21 +1175,21 @@ func (m *SlashPacketDataV1) Size() (n int) { var l int _ = l l = m.Validator.Size() - n += 1 + l + sovCcv(uint64(l)) + n += 1 + l + sovWire(uint64(l)) if m.ValsetUpdateId != 0 { - n += 1 + sovCcv(uint64(m.ValsetUpdateId)) + n += 1 + sovWire(uint64(m.ValsetUpdateId)) } if m.Infraction != 0 { - n += 1 + sovCcv(uint64(m.Infraction)) + n += 1 + sovWire(uint64(m.Infraction)) } return n } -func sovCcv(x uint64) (n int) { +func sovWire(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozCcv(x uint64) (n int) { - return sovCcv(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozWire(x uint64) (n int) { + return sovWire(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *ValidatorSetChangePacketData) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -1392,7 +1199,7 @@ func (m *ValidatorSetChangePacketData) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1420,7 +1227,7 @@ func (m *ValidatorSetChangePacketData) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1433,11 +1240,11 @@ func (m *ValidatorSetChangePacketData) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if postIndex > l { return io.ErrUnexpectedEOF @@ -1454,7 +1261,7 @@ func (m *ValidatorSetChangePacketData) Unmarshal(dAtA []byte) error { m.ValsetUpdateId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1473,7 +1280,7 @@ func (m *ValidatorSetChangePacketData) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1487,11 +1294,11 @@ func (m *ValidatorSetChangePacketData) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if postIndex > l { return io.ErrUnexpectedEOF @@ -1500,96 +1307,12 @@ func (m *ValidatorSetChangePacketData) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) + skippy, err := skipWire(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorSetChangePackets) 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 ErrIntOverflowCcv - } - 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: ValidatorSetChangePackets: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorSetChangePackets: 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 ErrIntOverflowCcv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCcv - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCcv - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.List = append(m.List, ValidatorSetChangePacketData{}) - if err := m.List[len(m.List)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1611,7 +1334,7 @@ func (m *VSCMaturedPacketData) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1639,7 +1362,7 @@ func (m *VSCMaturedPacketData) Unmarshal(dAtA []byte) error { m.ValsetUpdateId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1653,12 +1376,12 @@ func (m *VSCMaturedPacketData) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) + skippy, err := skipWire(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1680,7 +1403,7 @@ func (m *SlashPacketData) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1708,7 +1431,7 @@ func (m *SlashPacketData) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1721,11 +1444,11 @@ func (m *SlashPacketData) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if postIndex > l { return io.ErrUnexpectedEOF @@ -1741,7 +1464,7 @@ func (m *SlashPacketData) Unmarshal(dAtA []byte) error { m.ValsetUpdateId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1760,7 +1483,7 @@ func (m *SlashPacketData) Unmarshal(dAtA []byte) error { m.Infraction = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1774,138 +1497,12 @@ func (m *SlashPacketData) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MaturedUnbondingOps) 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 ErrIntOverflowCcv - } - 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: MaturedUnbondingOps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MaturedUnbondingOps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCcv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ids = append(m.Ids, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCcv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthCcv - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthCcv - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Ids) == 0 { - m.Ids = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCcv - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ids = append(m.Ids, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) + skippy, err := skipWire(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1927,7 +1524,7 @@ func (m *ConsumerPacketData) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1955,7 +1552,7 @@ func (m *ConsumerPacketData) Unmarshal(dAtA []byte) error { m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1974,7 +1571,7 @@ func (m *ConsumerPacketData) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1987,11 +1584,11 @@ func (m *ConsumerPacketData) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if postIndex > l { return io.ErrUnexpectedEOF @@ -2009,7 +1606,7 @@ func (m *ConsumerPacketData) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2022,11 +1619,11 @@ func (m *ConsumerPacketData) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if postIndex > l { return io.ErrUnexpectedEOF @@ -2039,12 +1636,12 @@ func (m *ConsumerPacketData) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) + skippy, err := skipWire(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2058,7 +1655,7 @@ func (m *ConsumerPacketData) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConsumerPacketDataList) Unmarshal(dAtA []byte) error { +func (m *HandshakeMetadata) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2066,7 +1663,7 @@ func (m *ConsumerPacketDataList) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2081,54 +1678,84 @@ func (m *ConsumerPacketDataList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConsumerPacketDataList: wiretype end group for non-group") + return fmt.Errorf("proto: HandshakeMetadata: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConsumerPacketDataList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HandshakeMetadata: 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) + return fmt.Errorf("proto: wrong wireType = %d for field ProviderFeePoolAddr", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthCcv + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthWire } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } 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 { - return err + m.ProviderFeePoolAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWire + } + 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 ErrInvalidLengthWire + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthWire + } + if postIndex > l { + return io.ErrUnexpectedEOF } + m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) + skippy, err := skipWire(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2150,7 +1777,7 @@ func (m *ConsumerPacketDataV1) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2178,7 +1805,7 @@ func (m *ConsumerPacketDataV1) Unmarshal(dAtA []byte) error { m.Type = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2197,7 +1824,7 @@ func (m *ConsumerPacketDataV1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2210,11 +1837,11 @@ func (m *ConsumerPacketDataV1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if postIndex > l { return io.ErrUnexpectedEOF @@ -2232,7 +1859,7 @@ func (m *ConsumerPacketDataV1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2245,11 +1872,11 @@ func (m *ConsumerPacketDataV1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if postIndex > l { return io.ErrUnexpectedEOF @@ -2262,12 +1889,12 @@ func (m *ConsumerPacketDataV1) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) + skippy, err := skipWire(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2289,7 +1916,7 @@ func (m *SlashPacketDataV1) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2317,7 +1944,7 @@ func (m *SlashPacketDataV1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2330,11 +1957,11 @@ func (m *SlashPacketDataV1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if postIndex > l { return io.ErrUnexpectedEOF @@ -2350,7 +1977,7 @@ func (m *SlashPacketDataV1) Unmarshal(dAtA []byte) error { m.ValsetUpdateId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2369,7 +1996,7 @@ func (m *SlashPacketDataV1) Unmarshal(dAtA []byte) error { m.Infraction = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowCcv + return ErrIntOverflowWire } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2383,12 +2010,12 @@ func (m *SlashPacketDataV1) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipCcv(dAtA[iNdEx:]) + skippy, err := skipWire(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCcv + return ErrInvalidLengthWire } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2402,7 +2029,7 @@ func (m *SlashPacketDataV1) Unmarshal(dAtA []byte) error { } return nil } -func skipCcv(dAtA []byte) (n int, err error) { +func skipWire(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -2410,7 +2037,7 @@ func skipCcv(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowCcv + return 0, ErrIntOverflowWire } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -2427,7 +2054,7 @@ func skipCcv(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowCcv + return 0, ErrIntOverflowWire } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -2443,7 +2070,7 @@ func skipCcv(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowCcv + return 0, ErrIntOverflowWire } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -2456,14 +2083,14 @@ func skipCcv(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthCcv + return 0, ErrInvalidLengthWire } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCcv + return 0, ErrUnexpectedEndOfGroupWire } depth-- case 5: @@ -2472,7 +2099,7 @@ func skipCcv(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthCcv + return 0, ErrInvalidLengthWire } if depth == 0 { return iNdEx, nil @@ -2482,7 +2109,7 @@ func skipCcv(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthCcv = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCcv = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCcv = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthWire = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWire = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupWire = fmt.Errorf("proto: unexpected end of group") ) diff --git a/x/ccv/types/ccv_test.go b/x/ccv/types/wire_test.go similarity index 100% rename from x/ccv/types/ccv_test.go rename to x/ccv/types/wire_test.go