Engine api changes

This commit is contained in:
Eitan Seri-Levi
2026-04-30 11:51:23 +02:00
parent 4d97dd774d
commit 9a5feb67c6
12 changed files with 232 additions and 18 deletions

View File

@@ -806,6 +806,30 @@ impl<E: EthSpec> ExecutionBlockGenerator<E> {
}),
_ => unreachable!(),
},
PayloadAttributes::V5(pa) => match self.get_fork_at_timestamp(pa.timestamp) {
ForkName::Heze => ExecutionPayload::Heze(ExecutionPayloadHeze {
parent_hash: head_block_hash,
fee_recipient: pa.suggested_fee_recipient,
receipts_root: Hash256::repeat_byte(42),
state_root: Hash256::repeat_byte(43),
logs_bloom: vec![0; 256].try_into().unwrap(),
prev_randao: pa.prev_randao,
block_number: parent.block_number() + 1,
gas_limit: DEFAULT_GAS_LIMIT,
gas_used: GAS_USED,
timestamp: pa.timestamp,
extra_data: "block gen was here".as_bytes().to_vec().try_into().unwrap(),
base_fee_per_gas: Uint256::from(1u64),
block_hash: ExecutionBlockHash::zero(),
transactions: vec![].try_into().unwrap(),
withdrawals: pa.withdrawals.clone().try_into().unwrap(),
blob_gas_used: 0,
excess_blob_gas: 0,
block_access_list: VariableList::empty(),
slot_number: pa.slot_number.into(),
}),
_ => unreachable!(),
},
};
// Store execution requests for this payload if configured.

View File

@@ -948,6 +948,7 @@ impl<E: EthSpec> MockBuilder<E> {
expected_withdrawals,
None,
None,
None,
),
ForkName::Deneb | ForkName::Electra | ForkName::Fulu => PayloadAttributes::new(
timestamp,
@@ -956,6 +957,7 @@ impl<E: EthSpec> MockBuilder<E> {
expected_withdrawals,
Some(head_block_root),
None,
None,
),
ForkName::Gloas | ForkName::Heze => PayloadAttributes::new(
timestamp,
@@ -964,6 +966,7 @@ impl<E: EthSpec> MockBuilder<E> {
expected_withdrawals,
Some(head_block_root),
Some(slot.as_u64()),
None,
),
ForkName::Base | ForkName::Altair => {
return Err("invalid fork".to_string());

View File

@@ -108,6 +108,7 @@ impl<E: EthSpec> MockExecutionLayer<E> {
None,
None,
None,
None,
);
// Insert a proposer to ensure the fork choice updated command works.
@@ -149,6 +150,7 @@ impl<E: EthSpec> MockExecutionLayer<E> {
None,
None,
None,
None,
);
let payload_parameters = PayloadParameters {
@@ -202,6 +204,7 @@ impl<E: EthSpec> MockExecutionLayer<E> {
None,
None,
None,
None,
);
let payload_parameters = PayloadParameters {

View File

@@ -61,6 +61,8 @@ pub const DEFAULT_ENGINE_CAPABILITIES: EngineCapabilities = EngineCapabilities {
get_blobs_v2: true,
get_inclusion_list_v1: true,
get_blobs_v3: true,
forkchoice_updated_v5: true,
is_inclusion_list_satisfied_v1: true,
};
pub static DEFAULT_CLIENT_VERSION: LazyLock<JsonClientVersionV1> =