Skip to content

Commit

Permalink
Refactor mock builder (#6735)
Browse files Browse the repository at this point in the history
* 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 1f7b4a3.

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

* Remove unnecessary derive
  • Loading branch information
pawanjay176 authored Jan 21, 2025
1 parent 33c1648 commit c33307d
Show file tree
Hide file tree
Showing 3 changed files with 611 additions and 344 deletions.
5 changes: 2 additions & 3 deletions beacon_node/execution_layer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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,
Expand Down
Loading

0 comments on commit c33307d

Please sign in to comment.