feat: Add version to BeaconEngineMessage FCU (#12089)

Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
This commit is contained in:
0xOsiris
2024-10-28 05:00:36 -07:00
committed by GitHub
parent 1b0f625f1d
commit 0d07d27f3c
14 changed files with 107 additions and 33 deletions

View File

@ -324,22 +324,23 @@ where
}
/// The version of Engine API message.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)]
pub enum EngineApiMessageVersion {
/// Version 1
V1,
V1 = 1,
/// Version 2
///
/// Added in the Shanghai hardfork.
V2,
V2 = 2,
/// Version 3
///
/// Added in the Cancun hardfork.
V3,
#[default]
V3 = 3,
/// Version 4
///
/// Added in the Prague hardfork.
V4,
V4 = 4,
}
/// Determines how we should choose the payload to return.

View File

@ -84,7 +84,7 @@ pub trait PayloadBuilderAttributes: Send + Sync + std::fmt::Debug {
/// Creates a new payload builder for the given parent block and the attributes.
///
/// Derives the unique [`PayloadId`] for the given parent and attributes
/// Derives the unique [`PayloadId`] for the given parent, attributes and version.
fn try_new(
parent: B256,
rpc_payload_attributes: Self::RpcPayloadAttributes,