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

Sleep peer if can't get account range #5323

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

asdacap
Copy link
Contributor

@asdacap asdacap commented Feb 23, 2023

  • Sometimes, depending on your luck, a proportion of the snap account range response returns nothing, which get interpreted as ExpiredRootHash. Sometimes its a lot, but I can't reproduce it.
  • For geth, this happen if the state root is missing which will happen if we request too newer state root or geth is lagging behind.
  • No idea about besu.
  • In any case, I'd recommend just return NoProgress which should sleep the peer, which should cause the account range request to go to other peer, at least temporarily, which should help a bit with snap sync request if you get unlucky.

Screenshot from 2023-02-23 14-09-43

Changes

  • Slight cleanup on snap sync feed constructor.
  • Add a small clause to return NoProgress

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • Optimization

Testing

Requires testing

  • Yesx

If yes, did you write tests?

  • Yes

@LukaszRozmej
Copy link
Member

How much does it decreases re-pivoting?

@asdacap
Copy link
Contributor Author

asdacap commented Feb 23, 2023

No idea. I'm guessing it should decrease it. In any case, it will reliably re-pivot after 90-something block.

@LukaszRozmej LukaszRozmej merged commit 1208caa into master Feb 23, 2023
@LukaszRozmej LukaszRozmej deleted the perf/sleep-peer-with-no-range branch February 23, 2023 08:51
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