eth/catalyst: import new payload if at genesis, regardless of sync status (#32673)

fixes #32672

This is kind of a band aid solution since it fixes the issue by
bypassing the snap sync expectations of an empty db and attempting to
import the new payload if we're at block 1. The next FCU will set the
status to synced.

Will continue looking to better understand how the above issue arises
and find a more thorough solution.

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
This commit is contained in:
lightclient 2026-05-27 04:57:13 -06:00 committed by GitHub
parent c782197d48
commit 1a2333650a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -911,7 +911,11 @@ func (api *ConsensusAPI) newPayload(ctx context.Context, params engine.Executabl
// into the database directly will conflict with the assumptions of snap sync
// that it has an empty db that it can fill itself.
if api.eth.Downloader().ConfigSyncMode() == ethconfig.SnapSync {
return api.delayPayloadImport(block), nil
// If the client is started at genesis of a test network with snap sync
// enabled, just try to import the block since there is nothing to sync.
if block.NumberU64() != 1 {
return api.delayPayloadImport(block), nil
}
}
if !api.eth.BlockChain().HasBlockAndState(block.ParentHash(), block.NumberU64()-1) {
api.remoteBlocks.put(block.Hash(), block.Header())