Skip to content

fCU call to unknown hash ignored #4246

@advaita-saha

Description

@advaita-saha

# If the head hash is unknown (was not given to us in a newPayload request),
# we cannot resolve the header, so not much to do. This could be extended in
# the future to resolve from the `eth` network, but it's an unexpected case
# that should be fixed, not papered over.
let header = chain.quarantine.getHeader(headHash).valueOr:
warn "Forkchoice requested unknown head",
hash = headHash.short
return simpleFCU(PayloadExecutionStatus.syncing)

In this code path, we can see that fCU call to blocks whose header is not with us, are ignored.

But the syncer already have interface which allows us to sync from just a blockHash

# Optional for pre-setting the sync target (e.g. for debugging)
if config.beaconSyncTarget.isSome():
syncerShouldRun = true
let
hex = config.beaconSyncTarget.unsafeGet
isFinal = config.beaconSyncTargetIsFinal
if not nimbus.beaconSyncRef.configTarget(hex, isFinal):
fatal "Error parsing hash32 argument for --debug-beacon-sync-target",
hash32=hex
quit QuitFailure

What needs to be done is unify the interface, such that only need the hash, and let the syncer handle the rest. Use that same interface inside the forkChoice api call, instead of handling this case separately

Metadata

Metadata

Assignees

No one assigned

    Labels

    ELSyncPrevents or affects sync with Ethereum networkenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions