-
Notifications
You must be signed in to change notification settings - Fork 580
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
Generate distinct Channel/Connection identifiers when running tests #4062
Comments
we currently make assumptions about channel/connection ids in the tests so maybe not do this for all tests atm. |
Definitely like this one, even if we just did a channel id different since we usually do either chain A port/channel ID or counterparty port/channel ID. |
Maybe this is too hacky, but sounds simple to me: before the connection and channel handshakes complete, on one of the chains we write in the |
Since the channelIDs are generated dynamically in core ibc and we parse them from events in our test, it sounds like @crodriguezvega 's solution seems reasonable to me. A little hacky but I think it is worth it to eliminate this class of error. |
added this to next iteration, both Carlos and Colin pointed out occurrences of this, best to take it on sooner rather than later. |
Summary
Subtle bugs can slip through when we use the same channel/connection (client?) identifiers since many of the verification functions expect those to verify the given proofs. These will work in our testing environment but would fail in the most common real-life case where identifiers are unique.
Case in point: #4052. A similar bug was also found in UpgradeCancel after forcing distinct identifiers for channels.
One possible hacky solution is forcing a channel/connection init in the coordinators functions before actually setting up the connection/channel (hack inspiration #4052 (comment)). This was we ensure distinct connection/channel identifiers for our internal tests.
For Admin Use
The text was updated successfully, but these errors were encountered: