Skip to content

Commit 31985a6

Browse files
authored
docs: update onboarding guidelines (#2365)
* update revision height in docs * update onboarding guidelines
1 parent 31a1524 commit 31985a6

File tree

3 files changed

+55
-16
lines changed

3 files changed

+55
-16
lines changed

docs/docs/build/modules/02-provider.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ where `update-consumer-msg.json` contains:
16601660
"initialization_parameters":{
16611661
"initial_height":{
16621662
"revision_number": 1,
1663-
"revision_height": 0
1663+
"revision_height": 1
16641664
},
16651665
"genesis_hash": "",
16661666
"binary_hash": "",

docs/docs/consumer-development/onboarding.md

+52-13
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ title: Onboarding Checklist
44
---
55
# Consumer Onboarding Checklist
66

7-
The following checklists will aid in onboarding a new consumer chain to interchain security.
7+
The following checklists will aid in onboarding a new consumer chain to Interchain Security.
88

99
Additionally, you can check the [testnet repo](https://github.com/cosmos/testnets/blob/master/interchain-security/CONSUMER_LAUNCH_GUIDE.md) for a comprehensive guide on preparing and launching consumer chains.
1010

1111
## 1. Complete testing & integration
1212

1313
- [ ] test integration with gaia
14-
- [ ] test your protocol with supported relayer versions (minimum hermes 1.4.1)
14+
- [ ] test your protocol with supported relayer versions (minimum hermes 1.10.2)
1515
- [ ] reach out to the ICS team if you are facing issues
1616

1717
## 2. Create an Onboarding Repository
@@ -20,11 +20,10 @@ To help validators and other node runners onboard onto your chain, please prepar
2020

2121
This should include (at minimum):
2222

23-
- [ ] genesis.json without CCV data (before the proposal passes)
24-
- [ ] genesis.json with CCV data (after spawn time passes). Check if CCV data needs to be transformed (see [Transform Consumer Genesis](./consumer-genesis-transformation.md))
23+
- [ ] genesis.json without the consumer module genesis (before the spawn time passes). **Make sure the genesis time is within the trusting period (i.e., one day before launch time or shorter).**
24+
- [ ] genesis.json with the consumer module genesis (after the spawn time passes). Check if the consumer module genesis needs to be transformed (see [Transform Consumer Genesis](./consumer-genesis-transformation.md))
2525
- [ ] information about relevant seed/peer nodes you are running
2626
- [ ] relayer information (compatible versions)
27-
- [ ] copy of your governance proposal (as JSON)
2827
- [ ] a script showing how to start your chain and connect to peers (optional)
2928
- [ ] take feedback from other developers, validators and community regarding your onboarding repo and make improvements where applicable
3029

@@ -35,8 +34,8 @@ Example of such a repository can be found [here](https://github.com/hyphacoop/ic
3534
Before you start your chain, you need to submit a `MsgCreateConsumer` message that generates and returns back the
3635
`consumerId` that should be used in any upcoming interactions by the consumer chain or the validators that interact
3736
with your chain.
38-
Additionally, you need to decider whether your chain should be an Opt-In chain or a Top N chain (see [Partial Set Security](../features/partial-set-security.md))
39-
and act accordingly (see [Permissionless ICS](../features/permissionless.md).
37+
Additionally, you need to decide whether your chain should be an Opt-In chain or a Top N chain (see [Partial Set Security](../features/partial-set-security.md))
38+
and act accordingly (see [Permissionless ICS](../features/permissionless.md)).
4039

4140
If you create a Top N chain through, please consider allowing at least a day between your proposal passing and the chain spawn time.
4241
This will allow the validators, other node operators and the community to prepare for the chain launch.
@@ -57,9 +56,9 @@ Example of initialization parameters:
5756
// ConsumerInitializationParameters provided in MsgCreateConsumer or MsgUpdateConsumer
5857
{
5958
// Initial height of new consumer chain.
60-
// For a completely new chain, this will be {0,1}.
59+
// For a completely new chain, this will be {1,1}.
6160
"initial_height" : {
62-
"revision_height": 0,
61+
"revision_height": 1,
6362
"revision_number": 1,
6463
},
6564
// Hash of the consumer chain genesis state without the consumer CCV module genesis params.
@@ -120,9 +119,9 @@ Example of power-shaping parameters:
120119
"validator_set_cap": 0,
121120
// Corresponds to a list of provider consensus addresses of validators that are the ONLY ones that can validate
122121
// the consumer chain.
123-
"allowlist": ["cosmosvalcons1l9qq4m300z8c5ez86ak2mp8znftewkwgjlxh88"],
122+
"allowlist": ["cosmosvalcons..."],
124123
// Corresponds to a list of provider consensus addresses of validators that CANNOT validate the consumer chain.
125-
"denylist": [],
124+
"denylist": ["cosmosvalcons..."],
126125
// Corresponds to the minimal amount of (provider chain) stake required to validate on the consumer chain.
127126
"min_stake": 0,
128127
// Corresponds to whether inactive validators are allowed to validate the consumer chain.
@@ -138,13 +137,53 @@ Example of allowlisted reward denoms:
138137
}
139138
```
140139

140+
:::caution
141+
For opt-in consumer chains, make sure that at least one validator opts in before the spawn time elapses.
142+
Otherwise the launch process will be aborted and the spawn time needs to be updated by submitting a `MsgUpdateConsumer` message.
143+
:::
144+
141145
## 4. Launch
142146

143147
The consumer chain starts after at least 66.67% of its voting power comes online.
144148
Note that this means 66.67% of the voting power in the *consumer* validator set, which will be comprised of all validators that either opted in to the chain or are part of the top N% of the provider chain (and are thus automatically opted in).
145149
The consumer chain is considered interchain secured once the appropriate CCV channels are established and the first validator set update is propagated from the provider to the consumer
146150

147-
- [ ] provide a repo with onboarding instructions for validators (it should already be listed in the proposal)
148-
- [ ] genesis.json with ccv data populated (MUST contain the initial validator set)
151+
- [ ] provide a repo with onboarding instructions for validators
152+
- [ ] genesis.json with the consumer module section populated (MUST contain the initial validator set)
149153
- [ ] maintenance & emergency contact info (relevant discord, telegram, slack or other communication channels)
150154
- [ ] have a block explorer in place to track chain activity & health
155+
156+
### Establish CCV channel
157+
158+
Once the consumer chain is launched, the CCV channel needs to be established. The following instructions are setting both the connection and channel using Hermes:
159+
160+
```bash
161+
#!/bin/bash
162+
163+
# CONSUMER_CLIENT_ID is created on CONSUMER upon genesis
164+
CONSUMER_CLIENT_ID="<consumer-client-id>"
165+
CONSUMER_CHAIN_ID="<consumer-chain-id>"
166+
167+
# PROVIDER_CLIENT_ID is created on PROVIDER upon CONSUMER spawn time: gaiad q provider list-consumer-chains
168+
PROVIDER_CLIENT_ID="<provider-client-id>"
169+
PROVIDER_CHAIN_ID="<provider-chain-id>"
170+
171+
CONFIG=$1
172+
if [ -z "$CONFIG" ]; then
173+
CONFIG=$HOME/.hermes/config.toml
174+
fi
175+
if [ ! -f "$CONFIG" ]; then
176+
echo "no config file found at $CONFIG"
177+
exit 1
178+
fi
179+
180+
output=$(hermes --json --config $CONFIG create connection --a-chain $CONSUMER_CHAIN_ID --a-client $CONSUMER_CLIENT_ID --b-client $PROVIDER_CLIENT_ID | tee /dev/tty)
181+
json_output=$(echo "$output" | grep 'result')
182+
a_side_connection_id=$(echo "$json_output" | jq -r '.result.a_side.connection_id')
183+
output=$(hermes --json --config $CONFIG create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection $a_side_connection_id --channel-version 1 | tee /dev/tty)
184+
json_output=$(echo "$output" | grep 'result')
185+
echo "---- DONE ----"
186+
echo "$json_output" | jq
187+
188+
# hermes start
189+
```

x/ccv/provider/client/cli/tx.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ where create_consumer.json has the following structure:
234234
"initialization_parameters": {
235235
"initial_height": {
236236
"revision_number": 1,
237-
"revision_height": 0
237+
"revision_height": 1
238238
},
239239
"genesis_hash": "",
240240
"binary_hash": "",
@@ -332,7 +332,7 @@ where update_consumer.json has the following structure:
332332
"initialization_parameters": {
333333
"initial_height": {
334334
"revision_number": 1,
335-
"revision_height": 0
335+
"revision_height": 1
336336
},
337337
"genesis_hash": "",
338338
"binary_hash": "",

0 commit comments

Comments
 (0)