Skip to content

Commit

Permalink
child -> consumer; parent -> provider
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Jan 25, 2022
1 parent dee8d30 commit db69640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The channel initialization consists of four phases:
>
> Note that at genesis, the validator set of the consumer chain matches the validator set of the provider chain.
- **Connection handshake**: A relayer is responsible for initiating the connection handshake (as defined in [ICS 3](../../core/ics-003-connection-semantics)).
- **Channel handshake**: A relayer is responsible for initiating the channel handshake (as defined in [ICS 4](../../core/ics-004-channel-and-packet-semantics)). The channel handshake must be initiated on the child chain. The handshake consists of four messages that need to be received for a channel built on top of the expected clients. We omit the `ChanOpenAck` message since it is not relevant for the overview.
- **Channel handshake**: A relayer is responsible for initiating the channel handshake (as defined in [ICS 4](../../core/ics-004-channel-and-packet-semantics)). The channel handshake must be initiated on the consumer chain. The handshake consists of four messages that need to be received for a channel built on top of the expected clients. We omit the `ChanOpenAck` message since it is not relevant for the overview.
- *OnChanOpenInit*: On receiving the *FIRST* `ChanOpenInit` message, the consumer CCV module sets the status of its end of the CCV channel to `INITIALIZING`.
- *OnChanOpenTry*: On receiving the *FIRST* `ChanOpenTry` message, the provider CCV module sets the status of its end of the CCV channel to `INITIALIZING`.
- *OnChanOpenConfirm*: On receiving the *FIRST* `ChanOpenConfirm` message, the provider CCV module sets the status of its end of the CCV channel to `VALIDATING`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function InitGenesis(state: ConsumerGenesisState) {
abortSystemUnless(err == nil)

// create client of the provider chain
clientId = clientKeeper.CreateClient(state.parentClientState, state.parentConsensusState)
clientId = clientKeeper.CreateClient(state.providerClientState, state.providerConsensusState)

// store the ID of the client of the provider chain
providerClient = clientId
Expand Down Expand Up @@ -660,7 +660,8 @@ function onChanCloseConfirm(
function onChanCloseInit(
portIdentifier: Identifier,
channelIdentifier: Identifier) {
// allow relayers to close duplicate OPEN channels, if the parent channel has already been established
// allow relayers to close duplicate OPEN channels,
// if the provider channel has already been established
if providerChannel == "" || providerChannel == channelIdentifier {
// user cannot close channel
abortTransactionUnless(FALSE)
Expand Down

0 comments on commit db69640

Please sign in to comment.