Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
insumity committed Oct 3, 2024
1 parent 47d7934 commit 47cc3a4
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 138 deletions.
12 changes: 9 additions & 3 deletions docs/docs/build/modules/02-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ message MsgChangeRewardDenoms {
`MsgCreateConsumer` enables a user to create a consumer chain.

Both the `chain_id` and `metadata` fields are mandatory.
Both the `initialization_parameters` and `power_shaping_parameters` fields are optional.
The `initialization_parameters`, `power_shaping_parameters`, and `allowlisted_reward_denoms` fields are optional.
The parameters not provided are set to their zero value.

The owner of the created consumer chain is the submitter of the message.
Expand Down Expand Up @@ -507,6 +507,9 @@ message MsgCreateConsumer {
ConsumerInitializationParameters initialization_parameters = 4;
PowerShapingParameters power_shaping_parameters = 5;
// allowlisted reward denoms by the consumer chain
AllowlistedRewardDenoms allowlisted_reward_denoms = 6;
}
```

Expand All @@ -516,7 +519,7 @@ message MsgCreateConsumer {

Note that only the `owner` (i.e., signer) and `consumer_id` fields are mandatory.
The others field are optional. Not providing one of them will leave the existing values unchanged.
Providing one of `metadata`, `initialization_parameters` or `power_shaping_parameters`,
Providing one of `metadata`, `initialization_parameters`, `power_shaping_parameters`, or `allowlisted_reward_denoms`
will update all the containing fields.
If one of the containing fields is missing, it will be set to its zero value.
For example, updating the `initialization_parameters` without specifying the `spawn_time`, will set the `spawn_time` to zero.
Expand All @@ -525,7 +528,7 @@ If the `initialization_parameters` field is set and `initialization_parameters.s
Updating the `spawn_time` from a positive value to zero will remove the consumer chain from the list of scheduled to launch chains.
If the consumer chain is already launched, updating the `initialization_parameters` is no longer possible.

If the `power_shaping_parameters` field is set and `power_shaping_parameters.top_N` is possitive, then the owner needs to be the gov module account address.
If the `power_shaping_parameters` field is set and `power_shaping_parameters.top_N` is positive, then the owner needs to be the gov module account address.

If the `new_owner_address` field is set to a value different than the gov module account address, then `top_N` needs to be zero.

Expand All @@ -550,6 +553,9 @@ message MsgUpdateConsumer {
// the power-shaping parameters of the consumer when updated
PowerShapingParameters power_shaping_parameters = 6;
// allowlisted reward denoms by the consumer chain
AllowlistedRewardDenoms allowlisted_reward_denoms = 7;
}
```

Expand Down
8 changes: 8 additions & 0 deletions docs/docs/consumer-development/onboarding.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ Example of power-shaping parameters:
}
```

Example of allowlisted reward denoms:
```js
// AllowlistedRewardDenoms provided in MsgCreateConsumer or MsgUpdateConsumer
{
"denoms": ["ibc/0025F8A87464A471E66B234C4F93AEC5B4DA3D42D7986451A059273426290DD5", "ibc/054892D6BB43AF8B93AAC28AA5FD7019D2C59A15DAFD6F45C1FA2BF9BDA22454"]
}
```

## 4. Launch

The consumer chain starts after at least 66.67% of its voting power comes online.
Expand Down
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/provider/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ message MsgCreateConsumer {
PowerShapingParameters power_shaping_parameters = 5;

// allowlisted reward denoms of the consumer
AllowlistedRewardDenoms allowlisted_reward_denoms = 7;
AllowlistedRewardDenoms allowlisted_reward_denoms = 6;
}

// MsgCreateConsumerResponse defines response type for MsgCreateConsumer
Expand Down
8 changes: 6 additions & 2 deletions x/ccv/provider/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ where create_consumer.json has the following structure:
"min_stake": "0",
"allow_inactive_vals": false
},
"allowlisted_reward_denoms": ["ibc/..", "ibc/..."]
"allowlisted_reward_denoms": {
"denoms": ["ibc/...", "ibc/..."]
}
}
Note that both 'chain_id' and 'metadata' are mandatory;
Expand Down Expand Up @@ -352,7 +354,9 @@ where update_consumer.json has the following structure:
"min_stake": "0",
"allow_inactive_vals": false
},
"allowlisted_reward_denoms": ["ibc/..", "ibc/..."]
"allowlisted_reward_denoms": {
"denoms": ["ibc/...", "ibc/..."]
}
}
Note that only 'consumer_id' is mandatory. The others are optional.
Expand Down
2 changes: 1 addition & 1 deletion x/ccv/provider/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 47cc3a4

Please sign in to comment.