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

Enable the removal of a consumer chain from the provider #35

Closed
mpoke opened this issue Feb 7, 2022 · 2 comments · Fixed by #124
Closed

Enable the removal of a consumer chain from the provider #35

mpoke opened this issue Feb 7, 2022 · 2 comments · Fixed by #124
Assignees
Labels
type: feature-request New feature or request improvement

Comments

@mpoke
Copy link
Contributor

mpoke commented Feb 7, 2022

The provider chain should be able to remove a consumer chain, i.e., clean up the state and enable the completion of unbonding operations that were waiting for that consumer chain.

IMO this removal should be triggered by only two events,

  • either a governance proposal (on the provider) to stop providing security to a consumer chain
  • or the channel timeouts, which we assume it doesn’t, but we still need to do something when this assumption fails.

In my understanding, anyone (that knows the port and the channel ID) can send a ChannelCloseInit to the provider CCV module to close a CCV channel, right? The only way to implement some kind of access control is in OnChanCloseInit, right? I’m not sure though how to implement such access control, i.e., who can close a channel? Thus, I’d leave the logic inside OnChanCloseInit to abort any attempt to close the channel.

Instead, I suggest creating a handler of a new governance proposal (e.g., StopConsumerChainProposal) where we add all the cleanup logic. The same logic we add also in the OnTimeoutPacket handler on the provider.

What happens if the consumer chain’s channel end timeouts? This means that channel end moves to CLOSED. How will the provider find out about this? ACKs are no longer send back to the provider. Eventually the VSCPackets sent by the provider will timeout (since nobody will receive them). However, this requires for the timeout period to expire, which is very large to avoid timeouts :)

@mpoke
Copy link
Contributor Author

mpoke commented Mar 3, 2022

See also discussion on cosmos/ibc#669

@mpoke
Copy link
Contributor Author

mpoke commented Apr 27, 2022

The PR cosmos/ibc#707 specifies how safely remove a consumer chain.

@mpoke mpoke moved this from Todo to Next in Replicated Security Apr 30, 2022
@sainoe sainoe moved this from Next to In Progress in Replicated Security May 24, 2022
@mpoke mpoke moved this from In Progress to Waiting for review in Replicated Security Jun 6, 2022
@mpoke mpoke added the mvcc label Jun 8, 2022
Repository owner moved this from Waiting for review to Done in Replicated Security Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature-request New feature or request improvement
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants