Repository navigation
Conversation
When answering a ResendRequest, numbers the store does not return (never stored, or pruned) were skipped silently: the counterparty kept waiting for them and could not resynchronise. They are now gap-filled like admin messages. The final SequenceReset-GapFill after trailing admin messages also named the last skipped number as NewSeqNo instead of the number after it, so the counterparty was told to expect a number it had just been told to skip. It now points past the requested range.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two issues when answering a ResendRequest:
Change
In
resend_messages:on_resend_requestalready clamps to the last sent number, plus one.Resent application messages and gap fills between them are unchanged.
Tests
Unit tests in
session/outbound.rs, using the existingFakeMessageStore:resend_gap_fills_numbers_missing_from_the_store: a store holding 2 and 4 of a 1..5 request produces GapFill 1→2, resend 2, GapFill 3→4, resend 4, GapFill 5→6.resend_trailing_gap_fill_points_past_the_requested_range: application 1, then heartbeats 2 and 3, produces resend 1 and GapFill 2→4.resend_with_nothing_stored_gap_fills_the_whole_range: an empty store answers 1..3 with GapFill 1→4.The existing integration test for admin gap fills keeps its expectations.
I could not build this workspace locally, so I am relying on CI for the compile, clippy and test run.
This contribution is offered under the project's MIT licence.