mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 06:44:35 +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:
@@ -34,7 +34,7 @@ pub struct ForkInfo {
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize)]
|
||||
#[serde(bound = "T: EthSpec", rename_all = "snake_case")]
|
||||
pub enum Web3SignerObject<'a, T: EthSpec> {
|
||||
pub enum Web3SignerObject<'a, T: EthSpec, Payload: ExecPayload<T>> {
|
||||
AggregationSlot {
|
||||
slot: Slot,
|
||||
},
|
||||
@@ -42,7 +42,7 @@ pub enum Web3SignerObject<'a, T: EthSpec> {
|
||||
Attestation(&'a AttestationData),
|
||||
BeaconBlock {
|
||||
version: ForkName,
|
||||
block: &'a BeaconBlock<T>,
|
||||
block: &'a BeaconBlock<T, Payload>,
|
||||
},
|
||||
#[allow(dead_code)]
|
||||
Deposit {
|
||||
@@ -66,8 +66,8 @@ pub enum Web3SignerObject<'a, T: EthSpec> {
|
||||
ContributionAndProof(&'a ContributionAndProof<T>),
|
||||
}
|
||||
|
||||
impl<'a, T: EthSpec> Web3SignerObject<'a, T> {
|
||||
pub fn beacon_block(block: &'a BeaconBlock<T>) -> Result<Self, Error> {
|
||||
impl<'a, T: EthSpec, Payload: ExecPayload<T>> Web3SignerObject<'a, T, Payload> {
|
||||
pub fn beacon_block(block: &'a BeaconBlock<T, Payload>) -> Result<Self, Error> {
|
||||
let version = match block {
|
||||
BeaconBlock::Base(_) => ForkName::Phase0,
|
||||
BeaconBlock::Altair(_) => ForkName::Altair,
|
||||
@@ -99,7 +99,7 @@ impl<'a, T: EthSpec> Web3SignerObject<'a, T> {
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize)]
|
||||
#[serde(bound = "T: EthSpec")]
|
||||
pub struct SigningRequest<'a, T: EthSpec> {
|
||||
pub struct SigningRequest<'a, T: EthSpec, Payload: ExecPayload<T>> {
|
||||
#[serde(rename = "type")]
|
||||
pub message_type: MessageType,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@@ -107,7 +107,7 @@ pub struct SigningRequest<'a, T: EthSpec> {
|
||||
#[serde(rename = "signingRoot")]
|
||||
pub signing_root: Hash256,
|
||||
#[serde(flatten)]
|
||||
pub object: Web3SignerObject<'a, T>,
|
||||
pub object: Web3SignerObject<'a, T, Payload>,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user