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(perf): Decrease the peer handshake timeout to 3 seconds, to speed up the initial sync #4212

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Apr 27, 2022

Motivation

In #4155, we want to speed up Zebra's initial sync.

One way to do that is to choose faster peers.

Solution

  • Decrease the peer handshake timeout to 3 seconds

Close #4155

Review

Anyone can review this PR.

If it makes the sync faster, we should merge it, and open a ticket for a longer-term solution.
If it doesn't make the sync faster, we should close it.

Reviewer Checklist

  • Code implements Specs and Designs
  • Tests for Expected Behaviour
  • Tests for Errors

Follow Up Work

  • open a ticket for a longer-term solution

@teor2345 teor2345 added C-enhancement Category: This is an improvement P-High 🔥 I-slow Problems with performance or responsiveness A-network Area: Network protocol updates or fixes lightwalletd any work associated with lightwalletd labels Apr 27, 2022
@teor2345 teor2345 self-assigned this Apr 27, 2022
@teor2345
Copy link
Contributor Author

I'm running a full sync test here:
https://github.com/ZcashFoundation/zebra/actions/runs/2230475345

The time to beat is 5h47m.

@teor2345 teor2345 marked this pull request as ready for review April 28, 2022 02:10
@teor2345 teor2345 requested a review from a team as a code owner April 28, 2022 02:10
@teor2345 teor2345 requested review from oxarbitrage and removed request for a team April 28, 2022 02:10
@teor2345
Copy link
Contributor Author

Full sync took 5h41m, which is about 4 minutes faster. So we should merge this temporary fix.

@teor2345
Copy link
Contributor Author

I opened #4226 for the long-term follow-up.

@teor2345 teor2345 changed the title change(perf): Decrease the peer handshake timeout to 3 seconds, to speed up the initial sync fix(perf): Decrease the peer handshake timeout to 3 seconds, to speed up the initial sync Apr 28, 2022
Copy link
Contributor

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

mergify bot added a commit that referenced this pull request Apr 28, 2022
@mergify mergify bot merged commit d38eb66 into main Apr 28, 2022
@mergify mergify bot deleted the shorter-handshake-timeout branch April 28, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes C-enhancement Category: This is an improvement I-slow Problems with performance or responsiveness lightwalletd any work associated with lightwalletd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Full synchronization test times out in CI
2 participants