Skip to content

Gloas: remove duplicated parent_execution_requests from BeaconBlockBody #5185

@raulk

Description

@raulk

Deferred payload execution introduced in #5094 made the parent execution requests a required input to the STF. The spec change extended slot N's BeaconBlockBody with the full execution requests of slot N-1, copied from that slot's ExecutionPayloadEnvelope.

But because the BeaconBlockBody data structure is shared between the STF and the gossip layer, this had the side effect of duplicating the execution request bytes in the critical path.

That cost would be unavoidable if the two payloads were independent, but they are not. To process slot N's BeaconBlockBody, the client must have received and validated the parent BeaconBlock and the ExecutionPayloadEnvelope. If not, the gossip validation rules produce a ValidationIgnore outcome, and the client will enqueue the parent for retrieval first.

So in all circumstances, when the client is in good standing to submit a BeaconBlockBody to the STF, it will have the parent execution requests in its possession. Therefore, instead of propagating the data twice, the client can just fill the field in.

This implies decoupling the wire-level and consensus representations of BeaconBlockBody. There are two solutions possible:

  1. Zeroing out the duplicate field in the BeaconBlockBody on the publish path, then having the client fill in the blanks in the receive path.
  2. Introducing a GossipBeaconBlockBody data structure, identical to BeaconBlockBody modulo the parent_execution_requests.

In either case, the wire format is canonicalized to the STF version for consensus, storage, and Req/Resp.

(1) is the quick but more unsafe solution; (2) is a bit more pedantic, but typesafe and stricter decoupling. From polling Core Devs, it seems like (2) is the preferred path.

I initially thought we'd need a commitment to the parent execution requests, but it doesn't seem to be necessary because the BeaconBlock links to the parent's BeaconBlock, which commits to the ExecutionPayloadBid, which in turn commits to the execution_requests_root. So the cryptographic link already exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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