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

fix: boosting syncing process #482

Merged
merged 7 commits into from
May 28, 2023

Conversation

b00f
Copy link
Collaborator

@b00f b00f commented May 23, 2023

Description

This PR aims to enhance the syncing process by implementing the following changes:

  • Weighting peers in random selection based on their success rate.
  • Closing the session when a connection cannot be established.
  • The default session timeout decreased to 10 seconds.

These modifications are expected to improve the overall speed of the syncing process.

@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Merging #482 (708faed) into main (aa8b886) will increase coverage by 0.26%.
The diff coverage is 94.33%.

@@            Coverage Diff             @@
##             main     #482      +/-   ##
==========================================
+ Coverage   82.44%   82.71%   +0.26%     
==========================================
  Files         150      154       +4     
  Lines        7059     7255     +196     
==========================================
+ Hits         5820     6001     +181     
- Misses        945      968      +23     
+ Partials      294      286       -8     

sync/peerset/peer_set.go Outdated Show resolved Hide resolved
sync/sync.go Show resolved Hide resolved
@b00f b00f force-pushed the sync-random-weighted-peer branch 2 times, most recently from 636c535 to d12a962 Compare May 25, 2023 18:01
@b00f b00f force-pushed the sync-random-weighted-peer branch from d12a962 to e1eb7bb Compare May 25, 2023 18:02
sync/bundle/message/blocks_response.go Outdated Show resolved Hide resolved
sync/bundle/message/blocks_response_test.go Outdated Show resolved Hide resolved
sync/handler_blocks_response_test.go Outdated Show resolved Hide resolved
@b00f b00f force-pushed the sync-random-weighted-peer branch from 43b18a1 to 708faed Compare May 28, 2023 12:38
@themantre themantre enabled auto-merge (squash) May 28, 2023 12:39
@themantre themantre merged commit b087fe1 into pactus-project:main May 28, 2023
@b00f b00f deleted the sync-random-weighted-peer branch May 28, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants