Skip to content
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

Prioritize peers that support V2 RPCs in the sync loop #53

Merged
merged 1 commit into from
May 23, 2024

Conversation

peterjan
Copy link
Member

@peterjan peterjan commented May 22, 2024

This PR prioritizes peers that support V2 RPCs so we can make use of MaxSendBlocks more often, v1 peers use MaxCatchUpBlocks which was set to 10 so we sync in batches of only 10 blocks. I kept the 3-peer-cutoff even though I'm not sure why we have that, cc @lukechampine could you explain why that's necessary (or better)?

@peterjan peterjan requested a review from lukechampine May 22, 2024 14:02
@peterjan peterjan self-assigned this May 22, 2024
@lukechampine
Copy link
Member

tbh I don't remember exactly why I added that. One reason is that syncing can take a while, so your peer set will likely change by the time you're done. But even then, I don't see much downside to trying all of them.

@lukechampine lukechampine merged commit 08757a7 into master May 23, 2024
9 checks passed
@lukechampine lukechampine deleted the pj/prioritize-v2-peers branch May 23, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants