Skip to content

Commit

Permalink
Update cosmos#264 - updates genesis and genesis tests (cosmos#382)
Browse files Browse the repository at this point in the history
* reformat consumer genesis test

* remove validator fill in of ExportAppStateAndValidators

* checkpoint, testing export genesis consumer

* test consumer export

* make pass the tests

* fix export height to valset update id in consumer

* pass the tests

* pass the tests

* * Update the provider and consumer export/init genesis with the new CCV states

* Improve consumer export genesis UT when channel is established or not

* Set the consumer ExportAppStateAndValidators to not return validators

* Add the new CCV states to the provider and consumer gensis proto files

* remove pendingVSCPackets

* remove references in create consumer chain proposal setters and getters

* fix unchecked errors

* fix iterator bug

* fix linter

* format provider genesis tests

* format consumer genesis tests

* clarify consumer keeper genesis

* remove unused test helpers

* Feat: update consumer init and export genesis
* Stop exporting client and consensus states in consumer genesis
* Add LastTransmissionBlockHeight to genesis proto

* Revert "Feat: update consumer init and export genesis"

This reverts commit eb59e50.

* * Add LastTransmissionBlockHeight to consumer genesis proto
* Set slashing states and LastTransmissionBlockHeight during consumer init genesis

* Update consumer init

* Update consumer genesis export

* fix last nits

* Fix consumer InitGenesis

* Update comments in genesis.proto

* format consumer genesis test

* update comments

* Update provider genesis comments

* fix small lint errs

* * Update consumer genesis validation
* Fix export genesis bug

* Document consumer genesis validation

* Document consumer genesis validation

* Update after cosmos#448 merge

* Update x/ccv/consumer/types/genesis.go

Co-authored-by: Marius Poke <[email protected]>

Co-authored-by: Jehan <[email protected]>
Co-authored-by: Shawn Marshall-Spitzbart <[email protected]>
Co-authored-by: Marius Poke <[email protected]>
  • Loading branch information
4 people authored Nov 18, 2022
1 parent 3362a1c commit 2466b26
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions proto/interchain_security/ccv/consumer/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,31 @@ import "tendermint/abci/types.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 completely new chain
string provider_channel_id = 3; // empty for a completely new chain
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 on restart.
// 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 on restart.
// 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 on restart.
// 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.
ConsumerPackets 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 ];
}

// MaturingVSCPacket defines the genesis information for the
Expand Down
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/provider/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ message GenesisState {

// consumer chain
message ConsumerState {
// ChannelID defines the chain ID for the consumer chain
// ChainID defines the chain ID for the consumer chain
string chain_id = 1;
// ChannelID defines the IBC channel ID for the consumer chain
string channel_id = 2;
Expand Down

0 comments on commit 2466b26

Please sign in to comment.