Skip to content

Commit c630c28

Browse files
authored
docs: update docs to capture Permissionless ICS (#2289)
init commit
1 parent 0d78295 commit c630c28

25 files changed

+43273
-748
lines changed

Diff for: docs/docs/adrs/adr-019-permissionless-ics.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ title: Permissionless ICS
1313
Accepted
1414

1515
## Context
16-
Currently, a consumer chain can join _Interchain Security_ (ICS) only through a [governance proposal](../features/proposals.md).
16+
Currently, a consumer chain can join _Interchain Security_ (ICS) only through a governance proposal.
1717
A governance proposal was needed before the introduction of [Partial Set Security](../features/partial-set-security.md) (PSS)
1818
because validators were required to validate a consumer chain. However, after the introduction of PSS, a consumer chain can
1919
be either _Top N_ or _Opt In_. If a chain is an Opt In chain, then no validator is required to validate this chain unless they choose to.
@@ -171,7 +171,7 @@ message MsgCreateConsumer {
171171
}
172172
```
173173

174-
Note that `metadata` is a required field, while the `initialization_parameterrs` and `power_shaping_parameters` are optional and can later be set using `MsgUpdateConsumer`.
174+
Note that `metadata` is a required field, while the `initialization_parameters` and `power_shaping_parameters` are optional and can later be set using `MsgUpdateConsumer`.
175175

176176
`metadata` is of the following type:
177177
```protobuf
@@ -341,7 +341,7 @@ The figures below depict some examples of some of the phases a consumer chain re
341341

342342

343343
### Additional Modifications
344-
We need to perform multiple migrations. All state needs to be reindex based on a `consumerId` instead of the `chainId`.
344+
We need to perform multiple migrations. All state needs to be reindexed based on a `consumerId` instead of the `chainId`.
345345
Because we only have two consumer chains (i.e., Neutron and Stride) at the moment, this is not going to be an expensive migration even if we have some live
346346
consumer chains that are being voted upon. Similarly, all the messages, queries, etc. would need to be changed to operate on a `consumerId` instead of a `chainId`.
347347

Diff for: docs/docs/consumer-development/changeover-procedure.md

+10-40
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ The relevant protocol specifications are available below:
1414

1515
Standalone to consumer changeover procedure can roughly be separated into 4 parts:
1616

17-
### 1. ConsumerAddition proposal submitted to the `provider` chain
18-
The proposal is equivalent to the "normal" ConsumerAddition proposal submitted by new consumer chains.
17+
### 1. `MsgCreateConsumer` submitted to the `provider` chain
18+
The `MsgCreateConsumer` is equivalent to the "normal" `MsgCreateConsumer` message submitted by new consumer chains.
1919

2020
However, here are the most important notes and differences between a new consumer chain and a standalone chain performing a changeover:
2121

@@ -77,7 +77,7 @@ If the parameter is not set, a new channel will be created.
7777
The standalone chain creates an upgrade proposal to include the `interchain-security/x/ccv/consumer` module.
7878

7979
:::caution
80-
The upgrade height in the proposal should correspond to a height that is after the `spawn_time` in the consumer addition proposal submitted to the `provider` chain.
80+
The upgrade height in the proposal should correspond to a height that is after the `spawn_time` in the `MsgCreateConsumer` submitted to the `provider` chain.
8181
:::
8282

8383
Otherwise, the upgrade is indistinguishable from a regular on-chain upgrade proposal.
@@ -137,9 +137,9 @@ This should include (at minimum):
137137

138138
Example of such a repository can be found [here](https://github.com/hyphacoop/ics-testnets/tree/main/game-of-chains-2022/sputnik).
139139

140-
## 3. Submit a ConsumerChainAddition Governance Proposal to the provider
140+
## 3. Submit a `MsgCreateConsumer` to the provider
141141

142-
Before you submit a `ConsumerChainAddition` proposal, please provide a `spawn_time` that is **before** the `upgrade_height` of the upgrade that will introduce the `ccv module` to your chain.
142+
Before you submit a `MsgCreateConsumer` message, please provide a `spawn_time` that is **before** the `upgrade_height` of the upgrade that will introduce the `ccv module` to your chain.
143143
:::danger
144144
If the `spawn_time` happens after your `upgrade_height` the provider will not be able to communicate the new validator set to be used after the changeover.
145145
:::
@@ -150,22 +150,11 @@ Additionally, reach out to the community via the [forum](https://forum.cosmos.ne
150150
- [ ] determine consumer chain parameters to be put in the proposal
151151
- [ ] take note to include a link to your onboarding repository
152152

153-
Example of a consumer chain addition proposal (compare with the [ConsumerAdditionProposal](./onboarding.md#3-submit-a-governance-proposal) in the ICS Provider Proposals section for chains that *launch* as consumers):
153+
Example of initialization parameters (compare with the [those](./onboarding.md#3-submit-msgcreateconsumer-and-msgupdateconsumer-messages) for chains that *launch* as consumers):
154154

155155
```js
156-
// ConsumerAdditionProposal is a governance proposal on the provider chain to spawn a new consumer chain or add a standalone chain.
157-
// If it passes, then a subset (i.e., depends on `top_N` and on the power shaping parameters) of validators on the provider chain are expected
158-
// to validate the consumer chain at spawn time. It is recommended that spawn time occurs after the proposal end time and that it is
159-
// scheduled to happen before the standalone chain upgrade that sill introduce the ccv module.
156+
// ConsumerInitializationParameters provided in MsgCreateConsumer or MsgUpdateConsumer
160157
{
161-
// Title of the proposal
162-
"title": "Changeover Standalone chain",
163-
// Description of the proposal
164-
// format the text as a .md file and include the file in your onboarding repository
165-
"description": ".md description of your chain and all other relevant information",
166-
// Proposed chain-id of the new consumer chain.
167-
// Must be unique from all other consumer chain ids of the executing provider chain.
168-
"chain_id": "standalone-1",
169158
// Initial height of new consumer chain.
170159
"initial_height" : {
171160
// must correspond to current revision number of standalone chain
@@ -175,7 +164,7 @@ Example of a consumer chain addition proposal (compare with the [ConsumerAdditio
175164
// must correspond to a height that is at least 1 block after the upgrade
176165
// that will add the `consumer` module to the standalone chain
177166
// e.g. "upgrade_height": 100 => "revision_height": 101
178-
"revision_number": 1,
167+
"revision_height": 101,
179168
},
180169
// Hash of the consumer chain genesis state without the consumer CCV module genesis params.
181170
// => not relevant for changeover procedure
@@ -212,30 +201,11 @@ Example of a consumer chain addition proposal (compare with the [ConsumerAdditio
212201
// it is most relevant for chains performing a standalone to consumer changeover
213202
// in order to maintain the existing ibc transfer channel
214203
"distribution_transmission_channel": "channel-123" // NOTE: use existing transfer channel if available
215-
// Corresponds to the percentage of validators that have to validate the chain under the Top N case.
216-
// For example, 53 corresponds to a Top 53% chain, meaning that the top 53% provider validators by voting power
217-
// have to validate the proposed consumer chain. top_N can either be 0 or any value in [50, 100].
218-
// A chain can join with top_N == 0 as an Opt In chain, or with top_N ∈ [50, 100] as a Top N chain.
219-
"top_N": 95,
220-
// Corresponds to the maximum power (percentage-wise) a validator can have on the consumer chain. For instance, if
221-
// `validators_power_cap` is set to 32, it means that no validator can have more than 32% of the voting power on the
222-
// consumer chain. Note that this might not be feasible. For example, think of a consumer chain with only
223-
// 5 validators and with `validators_power_cap` set to 10%. In such a scenario, at least one validator would need
224-
// to have more than 20% of the total voting power. Therefore, `validators_power_cap` operates on a best-effort basis.
225-
"validators_power_cap": 0,
226-
// Corresponds to the maximum number of validators that can validate a consumer chain.
227-
// Only applicable to Opt In chains. Setting `validator_set_cap` on a Top N chain is a no-op.
228-
"validator_set_cap": 0,
229-
// Corresponds to a list of provider consensus addresses of validators that are the ONLY ones that can validate
230-
// the consumer chain.
231-
"allowlist": [],
232-
// Corresponds to a list of provider consensus addresses of validators that CANNOT validate the consumer chain.
233-
"denylist": []
234204
}
235205
```
236206

237207
:::info
238-
As seen in the `ConsumerAdditionProposal` example above, the changeover procedure can be used together with [Partial Set Security](../adrs/adr-015-partial-set-security.md).
208+
The changeover procedure can be used together with [Partial Set Security](../adrs/adr-015-partial-set-security.md).
239209
This means, that a standalone chain can choose to only be validated by some of the validators of the provider chain by setting `top_N` appropriately, or by
240210
additionally setting a validators-power cap, validator-set cap, etc. by using the [power-shaping parameters](../features/power-shaping.md).
241211
:::
@@ -244,7 +214,7 @@ additionally setting a validators-power cap, validator-set cap, etc. by using th
244214

245215
This proposal should add the ccv `consumer` module to your chain.
246216

247-
- [ ] proposal `upgrade_height` must happen after `spawn_time` in the `ConsumerAdditionProposal`
217+
- [ ] proposal `upgrade_height` must happen after `spawn_time` in the `MsgCreateConsumer`
248218
- [ ] advise validators about the exact procedure for your chain and point them to your onboarding repository
249219

250220

Diff for: docs/docs/consumer-development/offboarding.md

+7-17
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,11 @@ title: Offboarding Checklist
44
---
55
# Consumer Offboarding
66

7-
To offboard a consumer chain simply submit a `ConsumerRemovalProposal` governance proposal listing a `stop_time`. After stop time passes, the provider chain will remove the chain from the ICS protocol (it will stop sending validator set updates).
7+
To offboard a consumer chain, the owner of the chain has to submit a `MsgRemoveConsumer` message with the chain's `consumerId`.
8+
If the chain is a Top N chain, the `MsgRemoveConsumer` has to be submitted through a governance proposal.
9+
Otherwise, the message can be submitted simply by the owner of the consumer chain.
810

9-
```js
10-
// ConsumerRemovalProposal is a governance proposal on the provider chain to remove (and stop) a consumer chain.
11-
// If it passes, all the consumer chain's state is removed from the provider chain. The outstanding unbonding
12-
// operation funds are released.
13-
{
14-
// the title of the proposal
15-
"title": "This was a great chain",
16-
"description": "Here is a .md formatted string specifying removal details",
17-
// the chain-id of the consumer chain to be stopped
18-
"chain_id": "consumerchain-1",
19-
// the time on the provider chain at which all validators are responsible to stop their consumer chain validator node
20-
"stop_time": "2023-03-07T12:40:00.000000Z",
21-
}
22-
```
23-
24-
More information will be listed in a future version of this document.
11+
When the `MsgRemoveConsumer` executes, the provider chain will stop the chain from the ICS protocol (it will stop
12+
sending validator set updates) and the chain is considered to be in the stopped phase.
13+
At this phase, validators cannot opt in, change keys, etc. and validators stop receiving rewards.
14+
After the chain is stopped, and an unbonding period of time passes, part of the state of the chain is deleted and the chain is considered deleted.

Diff for: docs/docs/consumer-development/onboarding.md

+24-21
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,32 @@ This should include (at minimum):
3030

3131
Example of such a repository can be found [here](https://github.com/hyphacoop/ics-testnets/tree/main/game-of-chains-2022/sputnik).
3232

33-
## 3. Submit a Governance Proposal
33+
## 3. Submit `MsgCreateConsumer` (and `MsgUpdateConsumer`) messages
3434

35-
Before you submit a `ConsumerChainAddition` proposal, please consider allowing at least a day between your proposal passing and the chain spawn time. This will allow the validators, other node operators and the community to prepare for the chain launch.
36-
If possible, please set your spawn time so people from different parts of the globe can be available in case of emergencies. Ideally, you should set your spawn time to be between 12:00 UTC and 20:00 UTC so most validator operators are available and ready to respond to any issues.
35+
Before you start your chain, you need to submit a `MsgCreateConsumer` message that generates and returns back the
36+
`consumerId` that should be used in any upcoming interactions by the consumer chain or the validators that interact
37+
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).
3740

38-
Additionally, reach out to the community via the [forum](https://forum.cosmos.network/) to formalize your intention to become an ICS consumer, gather community support and accept feedback from the community, validators and developers.
41+
If you create a Top N chain through, please consider allowing at least a day between your proposal passing and the chain spawn time.
42+
This will allow the validators, other node operators and the community to prepare for the chain launch.
43+
If possible, please set your spawn time so people from different parts of the globe can be available in case of emergencies.
44+
Ideally, you should set your spawn time to be between 12:00 UTC and 20:00 UTC so most validator operators are available and ready to respond to any issues.
45+
46+
Additionally, for a Top N chain, reach out to the community via the [forum](https://forum.cosmos.network/) to formalize your intention to become an ICS consumer,
47+
gather community support and accept feedback from the community, validators and developers.
3948

4049
- [ ] determine your chain's spawn time
41-
- [ ] determine consumer chain parameters to be put in the proposal
50+
- [ ] determine consumer chain parameters
4251
- [ ] take note to include a link to your onboarding repository
4352
- [ ] describe the purpose and benefits of running your chain
44-
- [ ] determine whether your chain should be an Opt-In chain or a Top N chain (see [Partial Set Security](../features/partial-set-security.md))
4553
- [ ] if desired, decide on power-shaping parameters (see [Power Shaping](../features/power-shaping.md))
4654

47-
Example of a consumer chain addition proposal.
48-
55+
Example of initialization parameters:
4956
```js
50-
// ConsumerAdditionProposal is a governance proposal on the provider chain to spawn a new consumer chain.
51-
// If it passes, if the top_N parameter is not equal to 0, the top N% of validators by voting power on the provider chain are expected to validate the consumer chain at spawn time.
52-
// Otherwise, only validators that opted in during the proposal period are expected to validate the consumer chain at spawn time.
53-
// It is recommended that spawn time occurs after the proposal end time.
57+
// ConsumerInitializationParameters provided in MsgCreateConsumer or MsgUpdateConsumer
5458
{
55-
// Title of the proposal
56-
"title": "Add consumer chain",
57-
// Description of the proposal
58-
// format the text as a .md file and include the file in your onboarding repository
59-
"description": ".md description of your chain and all other relevant information",
60-
// Proposed chain-id of the new consumer chain.
61-
// Must be unique from all other consumer chain ids of the executing provider chain.
62-
"chain_id": "newchain-1",
6359
// Initial height of new consumer chain.
6460
// For a completely new chain, this will be {0,1}.
6561
"initial_height" : {
@@ -100,7 +96,14 @@ Example of a consumer chain addition proposal.
10096
// Note that transfer_channel_id is the ID of the channel end on the consumer chain.
10197
// it is most relevant for chains performing a standalone to consumer changeover
10298
// in order to maintain the existing ibc transfer channel
103-
"distribution_transmission_channel": "channel-123",
99+
"distribution_transmission_channel": "channel-123"
100+
}
101+
```
102+
103+
Example of power-shaping parameters:
104+
```js
105+
// PowerShaping parameters provided in MsgCreateConsumer or MsgUpdateConsumer
106+
{
104107
// Corresponds to the percentage of validators that have to validate the chain under the Top N case.
105108
// For example, 53 corresponds to a Top 53% chain, meaning that the top 53% provider validators by voting power
106109
// have to validate the proposed consumer chain. top_N can either be 0 or any value in [50, 100].

Diff for: docs/docs/features/democracy-modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 4
33
---
44

55
# Democracy modules

Diff for: docs/docs/features/key-assignment.md

+7-17
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Note that key assignment is handled only by the provider chain - the consumer ch
1515

1616
## Rules
1717

18-
- A key can be assigned as soon as the consumer addition proposal is submitted to the provider.
18+
- A key can be assigned to any active (i.e., in the registered, initialized, or launched phase) chain.
1919
- Validator `A` cannot assign consumer key `K` to consumer chain `X` if there is already a validator `B` (`B!=A`) using `K` on the provider.
2020
- Validator `A` cannot assign consumer key `K` to consumer chain `X` if there is already a validator `B` using `K` on `X`.
2121
- A new validator on the provider cannot use a consensus key `K` if `K` is already used by any validator on any consumer chain.
@@ -42,35 +42,35 @@ consumerd tendermint show-validator # {"@type":"/cosmos.crypto.ed25519.PubKey","
4242
Then, make an `assign-consensus-key` transaction on the provider chain in order to inform the provider chain about the consensus key you will be using for a specific consumer chain.
4343

4444
```bash
45-
gaiad tx provider assign-consensus-key <consumer-chain-id> '<pubkey>' --from <tx-signer> --home <home_dir> --gas 900000 -b sync -y -o json
45+
gaiad tx provider assign-consensus-key <consumer-id> '<pubkey>' --from <tx-signer> --home <home_dir> --gas 900000 -b sync -y -o json
4646
```
4747

48-
- `consumer-chain-id` is the string identifier of the consumer chain, as assigned on the provider chain
48+
- `consumer-id` is the string identifier of the consumer chain, as assigned on the provider chain
4949
- `consumer-pub-key` has the following format `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"<key>"}`
5050

5151
Check that the key was assigned correctly by querying the provider:
5252

5353
```bash
54-
gaiad query provider validator-consumer-key <consumer-chain-id> cosmosvalcons1e....3xsj3ayzf4uv6
54+
gaiad query provider validator-consumer-key <consumer-id> cosmosvalcons1e....3xsj3ayzf4uv6
5555
```
5656

5757
You must use a `valcons` address. You can obtain it by querying your node on the provider `gaiad tendermint show-address`
5858

5959
OR
6060

6161
```bash
62-
gaiad query provider validator-provider-key <consumer-chain-id> consumervalcons1e....123asdnoaisdao
62+
gaiad query provider validator-provider-key <consumer-id> consumervalcons1e....123asdnoaisdao
6363
```
6464

6565
You must use a `valcons` address. You can obtain it by querying your node on the consumer `consumerd tendermint show-address`
6666

6767
OR
6868

6969
```bash
70-
gaiad query provider all-pairs-valconsensus-address <consumer-chain-id>
70+
gaiad query provider all-pairs-valconsensus-address <consumer-id>
7171
```
7272

73-
You just need to use the `chainId` of consumer to query all pairs valconsensus address with `consumer-pub-key` for each of pair
73+
You just need to use the `consumerId` of consumer to query all pairs valconsensus address with `consumer-pub-key` for each of pair
7474

7575
## Changing a key
7676

@@ -79,13 +79,3 @@ To change your key, simply repeat all of the steps listed above. Take note that
7979
## Removing a key
8080

8181
To remove a key, simply switch it back to the consensus key you have assigned on the provider chain by following steps in the `Adding a key` section and using your provider consensus key.
82-
83-
## Querying proposed consumer chains
84-
85-
To query the consumer addition proposals that are in the voting period, you can use the following command on the provider:
86-
87-
```bash
88-
gaiad query provider list-proposed-consumer-chains
89-
```
90-
91-
This query is valuable for staying informed about when keys can be assigned to newly proposed consumer chains.

0 commit comments

Comments
 (0)