Skip to content

Avoid applying fork choice during snap-sync #5547

@MegaRedHand

Description

@MegaRedHand

We're currently calling apply_fork_choice in our forkChoiceUpdate handler during a snap-sync. We should instead return a "SYNCING" early.

We already had this functionality, but it was commented out in #5196:

/* Revert #4985
if context.syncer.sync_mode() == SyncMode::Snap {
// Don't trigger a sync if the block is already canonical
if context
.storage
.is_canonical_sync(fork_choice_state.head_block_hash)?
{
// Disable snapsync mode so we can process incoming payloads
context.syncer.disable_snap();
} else {
context
.syncer
.sync_to_head(fork_choice_state.head_block_hash);
return Ok((None, PayloadStatus::syncing().into()));
}
} */

Metadata

Metadata

Assignees

No one assigned

    Labels

    L1Ethereum clientengine-apiCommunication between Consensus and Execution

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions