mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Kiln mev boost (#3062)
## Issue Addressed MEV boost compatibility ## Proposed Changes See #2987 ## Additional Info This is blocked on the stabilization of a couple specs, [here](https://github.com/ethereum/beacon-APIs/pull/194) and [here](https://github.com/flashbots/mev-boost/pull/20). Additional TODO's and outstanding questions - [ ] MEV boost JWT Auth - [ ] Will `builder_proposeBlindedBlock` return the revealed payload for the BN to propogate - [ ] Should we remove `private-tx-proposals` flag and communicate BN <> VC with blinded blocks by default once these endpoints enter the beacon-API's repo? This simplifies merge transition logic. Co-authored-by: realbigsean <seananderson33@gmail.com> Co-authored-by: realbigsean <sean@sigmaprime.io>
This commit is contained in:
@@ -17,8 +17,8 @@ use state_processing::per_block_processing::{
|
||||
use std::fmt::Debug;
|
||||
use std::path::Path;
|
||||
use types::{
|
||||
Attestation, AttesterSlashing, BeaconBlock, BeaconState, ChainSpec, Deposit, EthSpec,
|
||||
ExecutionPayload, ForkName, ProposerSlashing, SignedVoluntaryExit, SyncAggregate,
|
||||
Attestation, AttesterSlashing, BeaconBlock, BeaconState, ChainSpec, Deposit, EthSpec, ForkName,
|
||||
FullPayload, ProposerSlashing, SignedVoluntaryExit, SyncAggregate,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Default, Deserialize)]
|
||||
@@ -183,7 +183,12 @@ impl<E: EthSpec> Operation<E> for BeaconBlock<E> {
|
||||
spec: &ChainSpec,
|
||||
_: &Operations<E, Self>,
|
||||
) -> Result<(), BlockProcessingError> {
|
||||
process_block_header(state, self.to_ref(), VerifyBlockRoot::True, spec)?;
|
||||
process_block_header(
|
||||
state,
|
||||
self.to_ref().temporary_block_header(),
|
||||
VerifyBlockRoot::True,
|
||||
spec,
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -216,7 +221,7 @@ impl<E: EthSpec> Operation<E> for SyncAggregate<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: EthSpec> Operation<E> for ExecutionPayload<E> {
|
||||
impl<E: EthSpec> Operation<E> for FullPayload<E> {
|
||||
fn handler_name() -> String {
|
||||
"execution_payload".into()
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ type_name!(DepositData);
|
||||
type_name!(DepositMessage);
|
||||
type_name!(Eth1Data);
|
||||
type_name_generic!(ExecutionPayload);
|
||||
type_name_generic!(FullPayload, "ExecutionPayload");
|
||||
type_name_generic!(ExecutionPayloadHeader);
|
||||
type_name!(Fork);
|
||||
type_name!(ForkData);
|
||||
|
||||
@@ -72,8 +72,8 @@ fn operations_sync_aggregate() {
|
||||
|
||||
#[test]
|
||||
fn operations_execution_payload() {
|
||||
OperationsHandler::<MinimalEthSpec, ExecutionPayload<_>>::default().run();
|
||||
OperationsHandler::<MainnetEthSpec, ExecutionPayload<_>>::default().run();
|
||||
OperationsHandler::<MinimalEthSpec, FullPayload<_>>::default().run();
|
||||
OperationsHandler::<MainnetEthSpec, FullPayload<_>>::default().run();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -5,7 +5,8 @@ use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
|
||||
use task_executor::TaskExecutor;
|
||||
use tokio::time::sleep;
|
||||
use types::{
|
||||
Address, ChainSpec, EthSpec, ExecutionBlockHash, Hash256, MainnetEthSpec, Slot, Uint256,
|
||||
Address, ChainSpec, EthSpec, ExecutionBlockHash, FullPayload, Hash256, MainnetEthSpec, Slot,
|
||||
Uint256,
|
||||
};
|
||||
|
||||
const EXECUTION_ENGINE_START_TIMEOUT: Duration = Duration::from_secs(10);
|
||||
@@ -171,7 +172,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let valid_payload = self
|
||||
.ee_a
|
||||
.execution_layer
|
||||
.get_payload::<MainnetEthSpec>(
|
||||
.get_payload::<MainnetEthSpec, FullPayload<MainnetEthSpec>>(
|
||||
parent_hash,
|
||||
timestamp,
|
||||
prev_randao,
|
||||
@@ -179,7 +180,8 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
proposer_index,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
.unwrap()
|
||||
.execution_payload;
|
||||
|
||||
/*
|
||||
* Execution Engine A:
|
||||
@@ -262,7 +264,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let second_payload = self
|
||||
.ee_a
|
||||
.execution_layer
|
||||
.get_payload::<MainnetEthSpec>(
|
||||
.get_payload::<MainnetEthSpec, FullPayload<MainnetEthSpec>>(
|
||||
parent_hash,
|
||||
timestamp,
|
||||
prev_randao,
|
||||
@@ -270,7 +272,8 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
proposer_index,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
.unwrap()
|
||||
.execution_payload;
|
||||
|
||||
/*
|
||||
* Execution Engine A:
|
||||
|
||||
Reference in New Issue
Block a user