Consumer chain removal sub-protocol fails to remove some chains #513
Labels
source: audit
To indicate an issue found during an audit.
type: bug
Issues that need priority attention -- something isn't working
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: