-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Syncer: don't fetch 900 blocks each time #11530
Comments
Could you expand on this? I thought we relied on this guarantee.
This sounds like the right approach. Honestly, we can probably start at 2 epochs, most forks are very short. |
I think it's likely the case that you have the entire chain, but not necessarily so. Say that you're at height 100, and were "stuck" for some reason for 10 epochs. When you return, one peer gossips the tipset at height 109, while another gossips height 110. In this case, when processing 110 as
I agree. I'm going to start by optimizing what appear to be nearly 100% of calls to |
Do we not have a rule where we won't write tipset 108 to disk until we have tipset 109 written? |
As noted in the comment here, we always fetch 900 blocks from our peers when asked to syncFork. This is wasteful, and can cause us to fall out of sync / pressure our peers.
This isn't trivial to resolve, however. I propose the following optimizations:
incoming
is already built on a chain we have synced. If so, fetch nothing.incoming.Parents()
in your store is NOT sufficient evidence that we have the entire chain.incoming.Height() - known.Height() + 10
The text was updated successfully, but these errors were encountered: