Skip to content

Refactor BlockProposalContents for Electra #6981

@michaelsproul

Description

@michaelsproul

There's a TODO here about refactoring BlockProposalContents to make it more explicit when the ExecutionRequests are set or not.

pub enum BlockProposalContents<E: EthSpec, Payload: AbstractExecPayload<E>> {
Payload {
payload: Payload,
block_value: Uint256,
},
PayloadAndBlobs {
payload: Payload,
block_value: Uint256,
kzg_commitments: KzgCommitments<E>,
/// `None` for blinded `PayloadAndBlobs`.
blobs_and_proofs: Option<(BlobsList<E>, KzgProofs<E>)>,
// TODO(electra): this should probably be a separate variant/superstruct
requests: Option<ExecutionRequests<E>>,
},
}

I agree we should refactor this so that it is more strongly typed and we avoid the combinatorial blowup of having multiple options.

See similar PR here:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions