ibc icon indicating copy to clipboard operation
ibc copied to clipboard

ICS28: Sovereign to consumer chain transition

Open mpoke opened this issue 3 years ago • 0 comments

Closes https://github.com/cosmos/ibc/issues/834

The protocol in a nutshell:

  • A sovereign chain sends a proposal with the following fields
    chainId: string // the ID of the chain
    spawnTime: Timestamp // the earliest time when the proposal can be handled 
    connId: Identifier // the ID of an existing connection end on the provider chain on top of which the CCV channel will be created
  • The provider only accepts proposal with chainIds not already in use
  • The provider validates connId
  • The provider creates a genesis state for the consumer CCV module with the following fields
      preCCV: true, // flag indicating that the consumer CCV module will start in a pre-CCV state, i.e., it doesn't provide valset updates to Tmint
      connId: connectionEnd.counterpartyConnectionIdentifier, // connection ID on the sovereign chain
      initialValSet: initialValSet, // the current validator set on the provider chain
  • The sovereign chain upgrades to add the consumer CCV module and initializing it using the genesis state queried from the provider
  • A relayer starts the channel opening handshake
  • On ACK, the sovereign chain calls the ReplaceValset method of the staking module which replaces the validator set with initialValSet from the genesis state.
  • Once the validator set in the header matches initialValSet (typically two heights later), the sovereign chain upgrades to a full consumer chain, i.e., preCCV = false and the staking module is replaced by the consumer CCV module (in other words, the pre-CCV state is over).

Note that the overview of the channel initialization protocol still needs to be updated.

mpoke avatar Sep 19 '22 12:09 mpoke