ronin
ronin copied to clipboard
consortium: enable snap sync on Ronin
- 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.