You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/adrs/adr-019-permissionless-ics.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ title: Permissionless ICS
13
13
Accepted
14
14
15
15
## 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.
17
17
A governance proposal was needed before the introduction of [Partial Set Security](../features/partial-set-security.md) (PSS)
18
18
because validators were required to validate a consumer chain. However, after the introduction of PSS, a consumer chain can
19
19
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 {
171
171
}
172
172
```
173
173
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`.
175
175
176
176
`metadata` is of the following type:
177
177
```protobuf
@@ -341,7 +341,7 @@ The figures below depict some examples of some of the phases a consumer chain re
341
341
342
342
343
343
### 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`.
345
345
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
346
346
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`.
Copy file name to clipboardExpand all lines: docs/docs/consumer-development/changeover-procedure.md
+10-40
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ The relevant protocol specifications are available below:
14
14
15
15
Standalone to consumer changeover procedure can roughly be separated into 4 parts:
16
16
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.
19
19
20
20
However, here are the most important notes and differences between a new consumer chain and a standalone chain performing a changeover:
21
21
@@ -77,7 +77,7 @@ If the parameter is not set, a new channel will be created.
77
77
The standalone chain creates an upgrade proposal to include the `interchain-security/x/ccv/consumer` module.
78
78
79
79
:::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.
81
81
:::
82
82
83
83
Otherwise, the upgrade is indistinguishable from a regular on-chain upgrade proposal.
@@ -137,9 +137,9 @@ This should include (at minimum):
137
137
138
138
Example of such a repository can be found [here](https://github.com/hyphacoop/ics-testnets/tree/main/game-of-chains-2022/sputnik).
139
139
140
-
## 3. Submit a ConsumerChainAddition Governance Proposal to the provider
140
+
## 3. Submit a `MsgCreateConsumer` to the provider
141
141
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.
143
143
:::danger
144
144
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.
145
145
:::
@@ -150,22 +150,11 @@ Additionally, reach out to the community via the [forum](https://forum.cosmos.ne
150
150
-[ ] determine consumer chain parameters to be put in the proposal
151
151
-[ ] take note to include a link to your onboarding repository
152
152
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):
154
154
155
155
```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
160
157
{
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",
169
158
// Initial height of new consumer chain.
170
159
"initial_height": {
171
160
// must correspond to current revision number of standalone chain
@@ -175,7 +164,7 @@ Example of a consumer chain addition proposal (compare with the [ConsumerAdditio
175
164
// must correspond to a height that is at least 1 block after the upgrade
176
165
// that will add the `consumer` module to the standalone chain
177
166
// e.g. "upgrade_height": 100 => "revision_height": 101
178
-
"revision_number":1,
167
+
"revision_height":101,
179
168
},
180
169
// Hash of the consumer chain genesis state without the consumer CCV module genesis params.
181
170
// => not relevant for changeover procedure
@@ -212,30 +201,11 @@ Example of a consumer chain addition proposal (compare with the [ConsumerAdditio
212
201
// it is most relevant for chains performing a standalone to consumer changeover
213
202
// in order to maintain the existing ibc transfer channel
214
203
"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": []
234
204
}
235
205
```
236
206
237
207
:::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).
239
209
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
240
210
additionally setting a validators-power cap, validator-set cap, etc. by using the [power-shaping parameters](../features/power-shaping.md).
241
211
:::
@@ -244,7 +214,7 @@ additionally setting a validators-power cap, validator-set cap, etc. by using th
244
214
245
215
This proposal should add the ccv `consumer` module to your chain.
246
216
247
-
-[ ] proposal `upgrade_height` must happen after `spawn_time` in the `ConsumerAdditionProposal`
217
+
-[ ] proposal `upgrade_height` must happen after `spawn_time` in the `MsgCreateConsumer`
248
218
-[ ] advise validators about the exact procedure for your chain and point them to your onboarding repository
Copy file name to clipboardExpand all lines: docs/docs/consumer-development/offboarding.md
+7-17
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,11 @@ title: Offboarding Checklist
4
4
---
5
5
# Consumer Offboarding
6
6
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.
8
10
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.
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).
37
40
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.
39
48
40
49
-[ ] determine your chain's spawn time
41
-
-[ ] determine consumer chain parameters to be put in the proposal
50
+
-[ ] determine consumer chain parameters
42
51
-[ ] take note to include a link to your onboarding repository
43
52
-[ ] 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))
45
53
-[ ] if desired, decide on power-shaping parameters (see [Power Shaping](../features/power-shaping.md))
46
54
47
-
Example of a consumer chain addition proposal.
48
-
55
+
Example of initialization parameters:
49
56
```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
54
58
{
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",
63
59
// Initial height of new consumer chain.
64
60
// For a completely new chain, this will be {0,1}.
65
61
"initial_height": {
@@ -100,7 +96,14 @@ Example of a consumer chain addition proposal.
100
96
// Note that transfer_channel_id is the ID of the channel end on the consumer chain.
101
97
// it is most relevant for chains performing a standalone to consumer changeover
102
98
// in order to maintain the existing ibc transfer channel
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.
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
74
74
75
75
## Changing a key
76
76
@@ -79,13 +79,3 @@ To change your key, simply repeat all of the steps listed above. Take note that
79
79
## Removing a key
80
80
81
81
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:
0 commit comments