Payload builder version

This commit is contained in:
Eitan Seri-Levi
2026-06-21 17:57:16 +03:00
parent e35a96cc1c
commit affdfb0d13
10 changed files with 49 additions and 9 deletions

View File

@@ -29,6 +29,9 @@ pub mod gloas {
pub const BUILDER_INDEX_SELF_BUILD: u64 = u64::MAX;
pub const BUILDER_INDEX_FLAG: u64 = 1 << 40;
/// Version for an execution payload builder.
pub const PAYLOAD_BUILDER_VERSION: u8 = 0;
// Fork choice constants
pub type PayloadStatus = u8;
pub const PAYLOAD_STATUS_EMPTY: PayloadStatus = 0;

View File

@@ -2061,6 +2061,7 @@ impl<E: EthSpec> BeaconState<E> {
pub fn add_builder_to_registry(
&mut self,
pubkey: PublicKeyBytes,
version: u8,
withdrawal_credentials: Hash256,
amount: u64,
slot: Slot,
@@ -2072,10 +2073,6 @@ impl<E: EthSpec> BeaconState<E> {
let builder_index = self.get_index_for_new_builder()?;
let builders = self.builders_mut()?;
let version = *withdrawal_credentials
.as_slice()
.first()
.ok_or(BeaconStateError::WithdrawalCredentialMissingVersion)?;
let execution_address = withdrawal_credentials
.as_slice()
.get(12..)