fix(network): increase state concurrency and syncer lookahead #3455
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.
Motivation
On my machine, the syncer can get 4000-6000 blocks ahead of the state. This causes the sync downloader to hit its lookahead limit, and return an error.
This bug happens a lot on testnet, and occasionally on mainnet.
These logs and stalls make it hard to test the other code I'm working on. (And they are a usability issue.)
Solution
This is a temporary quick fix to #3438, but it doesn't close that ticket.
With these changes, my testnet instance syncs in 1 hour, and my mainnet instance syncs in 6 hours. This fix significantly reduces the number of syncer stalls on both networks.
Review
@jvff can review this PR.
I am looking for a quick review to make sure these temporary changes don't break anything.
I expect we will make more changes when we actually schedule #3438 in a sprint.
Reviewer Checklist
Follow Up Work