-
Notifications
You must be signed in to change notification settings - Fork 265
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
Handle splice with local/remote index mismatch #2757
Conversation
We assumed that once quiescent, the local and remote commitment index would be the same, but that's not true. Those two indices may diverge because of concurrent updates. We need to keep using the right index for each commitment during and after a splice, otherwise it leads to "invalid commit sig" errors.
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #2757 +/- ##
==========================================
+ Coverage 85.81% 85.87% +0.06%
==========================================
Files 216 216
Lines 18070 18070
Branches 732 751 +19
==========================================
+ Hits 15506 15517 +11
+ Misses 2564 2553 -11
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix and new test look good. I also confirmed the test fails without the fix.
In the process of testing I discovered a small bug in the |
Do you think testing with mismatched commit indexes would be useful for all of the quiescence splice tests? After some false starts, I modified Both changes are in branch https://github.com/remyers/eclair/tree/splice-remote-commit-index |
Very good catch, thanks! There was another bug as well (related to having mutiple
No, that would be overkill. That's a specific edge case we want to test once, it doesn't need to be the code path we use in all tests (especially since it's way less readable). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
We assumed that once quiescent, the local and remote commitment index would be the same, but that's not true. Those two indices may diverge because of concurrent updates. We need to keep using the right index for each commitment during and after a splice, otherwise it leads to "invalid commit sig" errors.