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

consortium: enable snap sync on Ronin #389

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

minh-bq
Copy link
Contributor

@minh-bq minh-bq commented Dec 25, 2023

  • consortium: avoid reading statedb in block header verification path

In snap sync, we only verify header without processing block transactions so the
statedb is not available. As a result, we need to avoid reading statedb in the
header verification path and must use the information from header instead.

This commit disables signer list verification in extra data of checkpoint block
header in consortium version 1 when snap/fast sync. In consortium version 2, at
the forked block, when getting the list of validators, we read this information
from header instead of contract, it is expected to behave the same as before.
This commit does not change the header verification process when full sync.

  • eth/protocols/snap: fix problems due to idle-but-busy peers

Mark the peer as idle only when it finish processing response packet

  • eth/protocols/snap: throttle trie heal requests when peers DoS us

Throttle the breadth expansion to prioritize depth expansion

  • eth/protocols/snap: sort trienode heal requests by path

Sort the heal requests by path to merge the storage trie requests from the same
account. This helps to reduce the bandwith.

  • eth/ethconfig: make full sync the default sync mode

Make full sync the default sync mode until we thoroughly test the snap sync.

@minh-bq minh-bq force-pushed the snap-sync branch 2 times, most recently from c1ed28e to d23228e Compare December 25, 2023 07:04
@minh-bq minh-bq marked this pull request as draft December 25, 2023 07:05
@minh-bq minh-bq changed the title consortium: avoid reading statedb in block header verification path consortium: enable snap sync on Ronin Apr 10, 2024
@minh-bq minh-bq marked this pull request as ready for review April 10, 2024 04:56
minh-bq and others added 5 commits May 21, 2024 11:45
In snap sync, we only verify header without processing block transactions so the
statedb is not available. As a result, we need to avoid reading statedb in the
header verification path and must use the information from header instead.

This commit disables signer list verification in extra data of checkpoint block
header in consortium version 1 when snap/fast sync. In consortium version 2, at
the forked block, when getting the list of validators, we read this information
from header instead of contract, it is expected to behave the same as before.
This commit does not change the header verification process when full sync.
…5666)

* eth/protocols/snap: throttle trie heal requests when peers DoS us

* eth/protocols/snap: lower heal throttle log to debug

Co-authored-by: Martin Holst Swende <martin@swende.se>

* eth/protocols/snap: fix comment

Co-authored-by: Martin Holst Swende <martin@swende.se>
* sort snap trienode heal requests

* eth/protocols/snap: remove debug code

* eth/protocols/snap: simplify sort, generate pathsets later

* eth/protocols/snap: review concern

* eth/protocols/snap: renamings

* eth/protocols/snap: add comments in Merge

* eth/protocols/snap: remove variable 'last' in Merge

* eth/protocols/snap: fix lint flaws in test

Co-authored-by: Felix Lange <fjl@twurst.com>
Make full sync the default sync mode until we thoroughly test the snap sync.
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.

None yet

3 participants