-
Notifications
You must be signed in to change notification settings - Fork 122
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
Unbonding period on consumers is not enforced #733
Comments
This issue is solid, but I'll point out that the seemingly only way to enforce that a consumer chain's unbonding period is less than the provider's is to use interchain queries. We could give the consumer chain a notion of the provider's unbonding period, upon consumer genesis. But the provider's unbonding period is technically mutable, and the value stored on the consumer could become outdated. Interchain queries would be cool to use, but AFAIK they use their own module and wouldn't necessarily be trivial to add. Thoughts @mpoke? |
I think we can solve the issue by just add a warning message in case the Unbonding Period in the proposal is larger than the one on the provider. There is no security issue if it is larger (hence the SHOULD instead of MUST). It's just a recommendation for UX. As @smarshall-spitzbart pointed out, the provider cannot enforce the unbonding period on the consumers (without ICQ). |
@jtremback do you think we should reject proposals with the consumer unbonding larger than the provider unbonding at proposal time? |
Would be interested in working on this issue. |
Surfaced from @informalsystems audit on Interchain Security, at commit 463ec20
Problem
While the documentation says that unbonding period on consumer chains should be shorter than that on the provider chain, this is not enforced by the implementation.
Closing criteria
There is an automatic check in place that ensures that every spawned consumer chains has unbonding period smaller than that on the provider chain.
Problem details
In the file interchain-security/docs/params.md it is said that:
Also the ICS specification in the file ibc/spec/app/ics-028-cross-chain-validation/methods.md says, that the following postcondition should hold for the function
InitGenesis(gs: ConsumerGenesisState)
:with
ComputeConsumerUnbondingPeriod
beingBut the actual implementation of the above, done in function CreateConsumerClient(), does nothing more than copying the unbonding period from the consumer chain governance proposal:
Thus, nothing in the implementation really enforces the requirements stated in the specification, and the only enforcement mechanism for them is for voters on the governance proposal to check its parameters. While such a misconfiguration is unlikely to avoid detection, as consumer addition proposals will get lots of public attention, an automatic check should still be in place.
Problem Scenarios
A governance proposal could be passed with the unbonding period on the consumer chain larger than that on the provider chain. This will lead to all unbondings on the provider chain to be delayed for that period (e.g. to 5 weeks, instead of the current 3 weeks for Cosmos Hub).
Recommendation
Add enforcements mechanisms to the implementation, such that unbonding period on the consumer chains is smaller that that of the provider chain, as expected according to the specification.
TODOs
The text was updated successfully, but these errors were encountered: