optimistic-specs
optimistic-specs copied to clipboard
Add light sync mode to l2geth
Is your feature request related to a problem? Please describe.
It is takes hours to do a full sync with Kovan, and that number is likely to increase.
Describe the solution you'd like
Allow l2geth
to do a faster sync, either snap
or light
(https://pkg.go.dev/github.com/ethereum/[email protected]/eth/downloader#SyncMode)
We currently do not support snap
or light
syncing but will eventually. I'd imagine for the 1.0.0
release
Very likely that this will be supported in 1.0.0
. Keeping this issue open for posterity.
Transferring to specs repo. I assume this will be included as part of Bedrock, but the specs repo is the right place to have visibility on this request, otherwise this may be forgotten.
We plan to support snap
, but it will only be for the happy-case sync. If there are no L2 nodes to sync from (network issues, DoS, no connection or otherwise), you can still sync by deriving block-by-block from L1 data.
Also note that to trigger snap
sync in geth, we need to present a full block header of the point to sync towards to geth, not just a block-hash. When we get unsafe (i.e. via L2 p2p) block distribution we can add either gossip of undisputed headers, or some simple request-response type of protocol to retrieve this from other nodes.