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

Optimizing syncing of sparse branches on stalled chain #6123

Closed
etan-status opened this issue Mar 22, 2024 · 1 comment
Closed

Optimizing syncing of sparse branches on stalled chain #6123

etan-status opened this issue Mar 22, 2024 · 1 comment

Comments

@etan-status
Copy link
Contributor

For situation such as current goerli, there are 2-3 long competing branches spanning hundreds of epochs, but with only very few blocks on each of them.

When sync manager discovers a new head of such a long branch, block verifier returns MissingParent. Sync manager then rewinds to an earlier epoch to attempt to obtain the parent. If it repeatedly fails to obtain the same block, the rewinds grow larger until it eventually finds it.

While this works well for a few epochs of being behind, it doesn't work well for larger gaps, as is happening on goerli on all of the branches. To better support discovery of such branches, we could ask the peer that gave us the new head (with MissingParent) to also give us the parent directly (with beaconBlocksByRoot) -- request_manager is suspended while sync manager is running, so it cannot help us with this task!

If the peer that gave us the head also gives us the parent (which it should), then we can provide that as a hint for the next rewind point and resume syncing by range once more.

@etan-status
Copy link
Contributor Author

Superseded by #6125

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

No branches or pull requests

1 participant