EIP-7732 Boiler Plate

This commit is contained in:
Mark Mackey
2024-08-27 12:38:00 -05:00
parent c042dc14d7
commit 13130dfa4f
52 changed files with 891 additions and 153 deletions

View File

@@ -800,6 +800,8 @@ pub fn generate_genesis_header<E: EthSpec>(
*header.transactions_root_mut() = empty_transactions_root;
Some(header)
}
// TODO(EIP-7732): need to look into this
ForkName::EIP7732 => None,
}
}

View File

@@ -348,6 +348,9 @@ pub fn serve<E: EthSpec>(
SignedBlindedBeaconBlock::Electra(block) => {
block.message.body.execution_payload.tree_hash_root()
}
SignedBlindedBeaconBlock::EIP7732(_) => {
return Err(reject("invalid fork EIP7732"));
}
};
let payload = builder
.el
@@ -498,6 +501,9 @@ pub fn serve<E: EthSpec>(
// first to avoid polluting the execution block generator with invalid payload attributes
// NOTE: this was part of an effort to add payload attribute uniqueness checks,
// which was abandoned because it broke too many tests in subtle ways.
ForkName::EIP7732 => {
return Err(reject("invalid fork"));
}
ForkName::Bellatrix | ForkName::Capella => PayloadAttributes::new(
timestamp,
*prev_randao,
@@ -551,6 +557,9 @@ pub fn serve<E: EthSpec>(
) = payload_response.into();
match fork {
ForkName::EIP7732 => {
return Err(reject("invalid fork"));
}
ForkName::Electra => BuilderBid::Electra(BuilderBidElectra {
header: payload
.as_electra()
@@ -603,6 +612,9 @@ pub fn serve<E: EthSpec>(
Option<ExecutionRequests<E>>,
) = payload_response.into();
match fork {
ForkName::EIP7732 => {
return Err(reject("invalid fork"));
}
ForkName::Electra => BuilderBid::Electra(BuilderBidElectra {
header: payload
.as_electra()