-
Notifications
You must be signed in to change notification settings - Fork 150
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
Consumer chain removal sub-protocol fails to remove some chains #513
Comments
Nice job, thanks! |
@danwt , a similar pattern can be found just below, when iterating over VSC send timestamps. There, only a first send timestamp is checked, again assuming that the first in the iteration is also the first chronologically. However, the assumption is probably justified there, because the key consists of the part which is fixed per-chain and the While this does not seem to be a problem, I am raising the issue here
|
Thanks for raising this. I will investigate soon. In the meantime I want to mention that we are aware of some problems with iterators
By now dc19c57 is quite old! Thanks for the thorough work! |
Another possibly related issue |
Surfaced from @informalsystems security feedback on Interchain Security at commit dc19c57
Problem
EndBlockCCR
removes chains which timed out. However, when iterating through all chains, it stops as soon as it finds one chain that did not time out, falsely assuming that the chains are ordered by their time of arrival <=> expiration time.Closing criteria
The bug is confirmed and fixed.
Problem details
Please describe the problem in all detail.
This part of the code might be wrong:
KVStorePrefixIterator
. This iterator iterates over keys in ascending order.chainID
as given in the proposal, thus, they do not encode the order of arrivalchainID
sI added a test illustrating the problem in my fork of the repo.
TODOs
The text was updated successfully, but these errors were encountered: