Refactor mock builder (#6735)

* Update builder api for electra

* Refactor mock builder to separate functionality

* Return a higher payload value for builder by default

* Add additional methods

* Cleanup

* Add a flag for always returning a max bid

* Add logs for debugging

* Take builder secret key as an argument

* Merge branch 'unstable' into refactor-mock-builder

* Change return type for submit_blinded_blocks

* Merge branch 'unstable' into refactor-mock-builder

* Respect gas_limit from validator registration

* Revert "Respect gas_limit from validator registration"

This reverts commit 1f7b4a327e.

* Merge branch 'unstable' into refactor-mock-builder

* Remove unnecessary derive
This commit is contained in:
Pawan Dhananjay
2025-01-21 12:23:21 -08:00
committed by GitHub
parent 33c1648022
commit c33307d702
3 changed files with 611 additions and 344 deletions

View File

@@ -121,8 +121,7 @@ impl<E: EthSpec> TryFrom<BuilderBid<E>> for ProvenancedPayload<BlockProposalCont
block_value: builder_bid.value,
kzg_commitments: builder_bid.blob_kzg_commitments,
blobs_and_proofs: None,
// TODO(electra): update this with builder api returning the requests
requests: None,
requests: Some(builder_bid.execution_requests),
},
BuilderBid::Fulu(builder_bid) => BlockProposalContents::PayloadAndBlobs {
payload: ExecutionPayloadHeader::Fulu(builder_bid.header).into(),
@@ -330,7 +329,7 @@ impl<E: EthSpec, Payload: AbstractExecPayload<E>> BlockProposalContents<E, Paylo
// This just groups together a bunch of parameters that commonly
// get passed around together in calls to get_payload.
#[derive(Clone, Copy)]
#[derive(Clone, Copy, Debug)]
pub struct PayloadParameters<'a> {
pub parent_hash: ExecutionBlockHash,
pub parent_gas_limit: u64,

File diff suppressed because it is too large Load Diff