We need to tweak the way optimistic sync works. Right now, a VALID
block means all of its ancestors will also become VALID
blocks. This breaks with EIP-4844 when blob sidecars are introduced as an optimistcally imported block lacking its sidecar will be incorrectly promoted to VALID
. This makes It then becomes easy for an attacker to trick peers into treating actual invalid blocks with missing data as valid.
To fix this all we have to do is change the block used as a basis for the block status transition. When a block transitions from NOT_VALIDATED
to VALID
, identify the latest ancestor whereby all of its own ancestors satisfy data availability:
(using the same type definitions in the optimistic sync spec)
Starting from the block returned by the function we can safely transition it and all of its ancestors to the VALID
state.
For example:
In the diagram, B
is the only block missing data. We ignore both A
and B
to set C
and its ancestors as VALID
.