Closed
Description
I think our implementation of ForkVersionDeserialize
is wrong:
lighthouse/common/eth2/src/types.rs
Lines 2014 to 2033 in 091e292
We are relying on serde_json::from_value(value)
to produce a ExecutionPayloadAndBlobs<E>
without any fork hinting, so it is liable to deserialize the wrong variant (e.g. Deneb instead of Electra).
I think we should remove the Deserialize
impl for ExecutionPayloadAndBlobs<E>
, implement ForkVersionDeserialize
instead, and use that fork-aware deserialization here.