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

[FEATURE]: Sync optimization #307

Open
1 task done
mvandeberg opened this issue Nov 12, 2024 · 0 comments · May be fixed by #312
Open
1 task done

[FEATURE]: Sync optimization #307

mvandeberg opened this issue Nov 12, 2024 · 0 comments · May be fixed by #312
Assignees
Labels
enhancement New feature or request

Comments

@mvandeberg
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

New feature

The sync code currently tries applying all reversible peer blocks. This is usually 60 blocks and the difference between the current node is likely only a block or two (if any).

Instead, the sync code (once the node is synced) perform a rough binary search to find the first block that differs from the peer and the current node. The search should be fast and does not need to be incredibly accurate. It should err on the side of applying blocks again rather than missing blocks. Any reduction is duplication is significant at this point.

Anything else?

No response

@mvandeberg mvandeberg added the enhancement New feature or request label Nov 12, 2024
mvandeberg added a commit that referenced this issue Nov 14, 2024
@mvandeberg mvandeberg linked a pull request Nov 18, 2024 that will close this issue
5 tasks
@mvandeberg mvandeberg self-assigned this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant