-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[Feat] Filter out lower-height peers from PeerResponse messages #3860
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
Merged
vicsn
merged 5 commits into
ProvableHQ:staging
from
ljedrz:feat/harden_peer_response_picks
Oct 7, 2025
Merged
[Feat] Filter out lower-height peers from PeerResponse messages #3860
vicsn
merged 5 commits into
ProvableHQ:staging
from
ljedrz:feat/harden_peer_response_picks
Oct 7, 2025
Conversation
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
vicsn
reviewed
Sep 17, 2025
raychu86
reviewed
Sep 17, 2025
raychu86
reviewed
Sep 17, 2025
vicsn
previously approved these changes
Sep 22, 2025
Collaborator
vicsn
left a comment
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! Looking forward to the other reviews, after which we can start testing to observe sparsely connected client connectivity
Signed-off-by: ljedrz <[email protected]>
176dab7 to
b0936b4
Compare
Collaborator
Author
kaimast
reviewed
Oct 3, 2025
Signed-off-by: ljedrz <[email protected]>
Signed-off-by: ljedrz <[email protected]>
ljedrz
commented
Oct 7, 2025
ljedrz
commented
Oct 7, 2025
ljedrz
commented
Oct 7, 2025
Signed-off-by: ljedrz <[email protected]>
vicsn
approved these changes
Oct 7, 2025
Collaborator
vicsn
left a comment
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!
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.
A follow-up to #3848, completing #3844.
This PR enhances the
PeerResponsemessages with optional peer heights, which are then used to filter out candidate peers which are lower than equal to our node in terms of their current block height.Edit: the most recent iteration adds a
last_height_seenfield to theCandidatePeer, and updates it whenever we receive aPeerResponse; we later use it in order to make sure that at least half of the peers we attempt to connect to (in case we have too few of them) are at a greater height than us.Closes #3844
CC #3580