Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICS28: Removing the only consumer chain #770

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions spec/app/ics-028-cross-chain-validation/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,13 @@ function StopConsumerChain(chainId: string, lockUnbonding: Bool) {
// remove chainId form all outstanding unbonding operations
foreach id IN vscToUnbondingOps[(chainId, _)] {
unbondingOps[id].unbondingChainIds.Remove(chainId)
// if the unbonding operation has unbonded on all consumer chains
if unbondingOps[id].unbondingChainIds.IsEmpty() {
// notify the Staking module that the unbonding can complete
stakingKeeper.UnbondingCanComplete(id)
// remove unbonding operation
unbondingOps.Remove(id)
}
}
// clean up vscToUnbondingOps mapping
vscToUnbondingOps.Remove((chainId, _))
Expand All @@ -912,6 +919,9 @@ function StopConsumerChain(chainId: string, lockUnbonding: Bool) {
- `downtimeSlashRequests[chainId]` is emptied.
- If `lockUnbonding == false`, then
- `chainId` is removed from all outstanding unbonding operations;
- if an outstanding unbonding operation has matured on all consumer chains,
- the `UnbondingCanComplete()` method of the Staking module is invoked;
- the unbonding operation is removed from `unbondingOps`.
- all the entries with `chainId` are removed from the `vscToUnbondingOps` mapping.
- **Error Condition**
- None
Expand Down