Ignore unknown block root events for processing blocks #5682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Addressed
From testing on v5.2.0 of Sepolia and Gnosis there is a very large volume of
UnknownBlockHashFromAttestation
and one single block lookup created every slot.UnknownBlockHashFromAttestation
errors are triggered if the block is not on fork-choice, but we may have the block stuck somewhere in the processing pipeline.Proposed Changes
This PR attempts to prevent
UnknownBlockHashFromAttestation
events for blocks that are not yet on fork-choice but we are processing.Caveats
If a single peer imports the block before we receive it and sends us an attestation we will still have the problem of constant lookups for blocks that arrive anyway. Not sure if this is an issue at all, but worth to think about it.
We have an ample collection of places a block may be stuck into:
ReqResp lookups only check the da_checker (from #5681) while other codepaths check more places. Might be worth it to consolidate their usage a bit to have more consistency.