optimistic-specs icon indicating copy to clipboard operation
optimistic-specs copied to clipboard

Add light sync mode to l2geth

Open qbzzt opened this issue 3 years ago • 4 comments

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)

qbzzt avatar Jul 23 '21 17:07 qbzzt

We currently do not support snap or light syncing but will eventually. I'd imagine for the 1.0.0 release

tynes avatar Oct 28 '21 23:10 tynes

Very likely that this will be supported in 1.0.0. Keeping this issue open for posterity.

smartcontracts avatar Nov 04 '21 19:11 smartcontracts

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.

smartcontracts avatar Mar 27 '22 00:03 smartcontracts

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.

protolambda avatar Mar 28 '22 09:03 protolambda