Merge remote-tracking branch, resolve conflicts preserving FOCIL/Heze logic

- test_utils: Heze branch uses DataColumnSidecarGloas (shared format), keeps
  heze_enabled() check ahead of gloas_enabled() so Heze blocks are handled first
- genesis.rs: Keep both Gloas and Heze bid initialisation in genesis_block()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Eitan Seri-Levi
2026-04-30 10:04:04 +02:00
12 changed files with 33 additions and 180 deletions

View File

@@ -204,9 +204,10 @@ pub fn initialize_beacon_state_from_eth1<E: EthSpec>(
/// Create an unsigned genesis `BeaconBlock`.
///
/// For Gloas and later, the block's `signed_execution_payload_bid` is populated from the state's
/// `latest_execution_payload_bid` so that the body root is consistent with
/// `state.latest_block_header.body_root`.
/// Per spec, the genesis block body is empty (all default fields) except for Gloas and later,
/// where `body.signed_execution_payload_bid.message` is initialised from
/// `state.latest_execution_payload_bid` so that the first post-genesis proposer can
/// build on the correct execution layer head.
///
/// `state.latest_block_header.body_root` is set from this same block's body, so the
/// two must stay in sync.

View File

@@ -44,7 +44,7 @@ pub struct DataColumnsByRootIdentifier<E: EthSpec> {
pub type DataColumnSidecarList<E> = Vec<Arc<DataColumnSidecar<E>>>;
#[superstruct(
variants(Fulu, Gloas, Heze),
variants(Fulu, Gloas),
variant_attributes(
derive(
Debug,
@@ -95,9 +95,9 @@ pub struct DataColumnSidecar<E: EthSpec> {
/// An inclusion proof, proving the inclusion of `blob_kzg_commitments` in `BeaconBlockBody`.
#[superstruct(only(Fulu))]
pub kzg_commitments_inclusion_proof: FixedVector<Hash256, E::KzgCommitmentsInclusionProofDepth>,
#[superstruct(only(Gloas, Heze), partial_getter(rename = "slot_gloas"))]
#[superstruct(only(Gloas), partial_getter(rename = "slot_gloas"))]
pub slot: Slot,
#[superstruct(only(Gloas, Heze))]
#[superstruct(only(Gloas))]
pub beacon_block_root: Hash256,
}
@@ -106,7 +106,6 @@ impl<E: EthSpec> DataColumnSidecar<E> {
match self {
DataColumnSidecar::Fulu(column) => column.slot(),
DataColumnSidecar::Gloas(column) => column.slot,
DataColumnSidecar::Heze(column) => column.slot,
}
}
@@ -118,7 +117,6 @@ impl<E: EthSpec> DataColumnSidecar<E> {
match self {
DataColumnSidecar::Fulu(column) => column.block_root(),
DataColumnSidecar::Gloas(column) => column.beacon_block_root,
DataColumnSidecar::Heze(column) => column.beacon_block_root,
}
}
@@ -137,12 +135,9 @@ impl<E: EthSpec> DataColumnSidecar<E> {
ForkName::Fulu => Ok(DataColumnSidecar::Fulu(
DataColumnSidecarFulu::from_ssz_bytes(bytes)?,
)),
ForkName::Gloas => Ok(DataColumnSidecar::Gloas(
ForkName::Gloas | ForkName::Heze => Ok(DataColumnSidecar::Gloas(
DataColumnSidecarGloas::from_ssz_bytes(bytes)?,
)),
ForkName::Heze => Ok(DataColumnSidecar::Heze(
DataColumnSidecarHeze::from_ssz_bytes(bytes)?,
)),
}
}
@@ -315,33 +310,6 @@ impl<E: EthSpec> DataColumnSidecarGloas<E> {
}
}
impl<E: EthSpec> DataColumnSidecarHeze<E> {
pub fn min_size() -> usize {
// min size is one cell
Self {
index: 0,
column: VariableList::new(vec![Cell::<E>::default()]).unwrap(),
kzg_proofs: VariableList::new(vec![KzgProof::empty()]).unwrap(),
slot: Slot::new(0),
beacon_block_root: Hash256::ZERO,
}
.as_ssz_bytes()
.len()
}
pub fn max_size(max_blobs_per_block: usize) -> usize {
Self {
index: 0,
column: VariableList::new(vec![Cell::<E>::default(); max_blobs_per_block]).unwrap(),
kzg_proofs: VariableList::new(vec![KzgProof::empty(); max_blobs_per_block]).unwrap(),
slot: Slot::new(0),
beacon_block_root: Hash256::ZERO,
}
.as_ssz_bytes()
.len()
}
}
#[derive(Debug)]
pub enum DataColumnSidecarError {
ArithError(ArithError),

View File

@@ -14,7 +14,7 @@ pub use data_column_custody_group::{
};
pub use data_column_sidecar::{
Cell, ColumnIndex, DataColumn, DataColumnSidecar, DataColumnSidecarError,
DataColumnSidecarFulu, DataColumnSidecarGloas, DataColumnSidecarHeze, DataColumnSidecarList,
DataColumnSidecarFulu, DataColumnSidecarGloas, DataColumnSidecarList,
DataColumnsByRootIdentifier,
};
pub use data_column_subnet_id::{DataColumnSubnetId, all_data_column_sidecar_subnets_from_spec};