go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

Geth should handle genesis block with default syncmode

Open quickchase opened this issue 2 years ago • 4 comments

System information

Geth version: v1.13.2

Expected behaviour

When running without specifying --syncmode=full (i.e. the default i.e. snap sync) geth should transition to full sync automatically for pre-genesis / genesis blocks.

Actual behaviour

Geth doesn't import the 1st block:

Ignoring payload while snap syncing number=1

Steps to reproduce the behaviour

Run geth without --syncmode=full on a new network

quickchase avatar Sep 28 '23 14:09 quickchase

I don't understand this issue. You are running with the default sync mode which is snap, and then you want to switch to a full sync? What are pre-genesis blocks?

MariusVanDerWijden avatar Oct 04 '23 11:10 MariusVanDerWijden

I started geth on Holesky before it launched, before the genesis block...

Geth failed to start syncing the chain at genesis until I manually changed the sync mode to full.

https://twitter.com/parithosh_j/status/1707387712502689958?t=aIsu1zYVUdVa9gdGrE52OQ&s=19

quickchase avatar Oct 04 '23 11:10 quickchase

Ahh I understand, so geth kinda errors on snap sync if the genesis time has not been reached yet

MariusVanDerWijden avatar Oct 04 '23 14:10 MariusVanDerWijden

Yes, correct, and if genesis time is reached while already running it will attempt to snap sync but be unable to do so.

Geth patiently waits for genesis, but doesn't go anywhere when genesis finally happenes.

quickchase avatar Oct 04 '23 18:10 quickchase