Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PROFILE ?= release

# List of all hard forks. This list is used to set env variables for several tests so that
# they run for different forks.
FORKS=phase0 altair bellatrix capella deneb electra fulu
FORKS=phase0 altair bellatrix capella deneb electra fulu gloas

# List of all recent hard forks. This list is used to set env variables for http_api tests
RECENT_FORKS=electra fulu
Expand Down
7 changes: 5 additions & 2 deletions beacon_node/beacon_chain/src/beacon_block_streamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use types::{
};
use types::{
ExecutionPayload, ExecutionPayloadBellatrix, ExecutionPayloadCapella, ExecutionPayloadElectra,
ExecutionPayloadFulu, ExecutionPayloadHeader,
ExecutionPayloadFulu, ExecutionPayloadGloas, ExecutionPayloadHeader,
};

#[derive(PartialEq)]
Expand Down Expand Up @@ -101,6 +101,7 @@ fn reconstruct_default_header_block<E: EthSpec>(
ForkName::Deneb => ExecutionPayloadDeneb::default().into(),
ForkName::Electra => ExecutionPayloadElectra::default().into(),
ForkName::Fulu => ExecutionPayloadFulu::default().into(),
ForkName::Gloas => ExecutionPayloadGloas::default().into(),
Copy link

@shane-moore shane-moore Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Comment below has no impact on this PR. just something we'll have to address in epbs branches, and noting here while reviewing since it's top of mind

When loading blinded blocks from the db, we run reconstruct_default_header_block to get a default ExecutionPayloadHeader. If we expect the db to store blinded blocks for Gloas, then this ForkName::Gloas => ExecutionPayloadGloas::default().into() variant will be hit for creating a default payload, but when we try let header_from_payload = ExecutionPayloadHeader::from(payload.to_ref()); right below it, ExecutionPayloadHeader is no longer supported in gloas, so it will fail.

I haven't thought enough about how the db will be refactored, but my intuition is that we will only store Full beacon blocks post-gloas, so we should be able to move Gloas into the variant:

 ForkName::Base | ForkName::Altair => {
            return Err(Error::PayloadReconstruction(format!(
                "Block with fork variant {} has execution payload",
                fork
            ))
            .into())

ForkName::Base | ForkName::Altair => {
return Err(Error::PayloadReconstruction(format!(
"Block with fork variant {} has execution payload",
Expand Down Expand Up @@ -715,14 +716,15 @@ mod tests {
}

#[tokio::test]
async fn check_all_blocks_from_altair_to_fulu() {
async fn check_all_blocks_from_altair_to_gloas() {
let slots_per_epoch = MinimalEthSpec::slots_per_epoch() as usize;
let num_epochs = 12;
let bellatrix_fork_epoch = 2usize;
let capella_fork_epoch = 4usize;
let deneb_fork_epoch = 6usize;
let electra_fork_epoch = 8usize;
let fulu_fork_epoch = 10usize;
let gloas_fork_epoch = 12usize;
let num_blocks_produced = num_epochs * slots_per_epoch;

let mut spec = test_spec::<MinimalEthSpec>();
Expand All @@ -732,6 +734,7 @@ mod tests {
spec.deneb_fork_epoch = Some(Epoch::new(deneb_fork_epoch as u64));
spec.electra_fork_epoch = Some(Epoch::new(electra_fork_epoch as u64));
spec.fulu_fork_epoch = Some(Epoch::new(fulu_fork_epoch as u64));
spec.gloas_fork_epoch = Some(Epoch::new(gloas_fork_epoch as u64));
let spec = Arc::new(spec);

let harness = get_harness(VALIDATOR_COUNT, spec.clone());
Expand Down
42 changes: 42 additions & 0 deletions beacon_node/beacon_chain/src/beacon_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5726,6 +5726,48 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
execution_payload_value,
)
}
BeaconState::Gloas(_) => {
let (
payload,
kzg_commitments,
maybe_blobs_and_proofs,
maybe_requests,
execution_payload_value,
) = block_contents
.ok_or(BlockProductionError::MissingExecutionPayload)?
.deconstruct();

(
BeaconBlock::Gloas(BeaconBlockGloas {
slot,
proposer_index,
parent_root,
state_root: Hash256::zero(),
body: BeaconBlockBodyGloas {
randao_reveal,
eth1_data,
graffiti,
proposer_slashings: proposer_slashings.into(),
attester_slashings: attester_slashings_electra.into(),
attestations: attestations_electra.into(),
deposits: deposits.into(),
voluntary_exits: voluntary_exits.into(),
sync_aggregate: sync_aggregate
.ok_or(BlockProductionError::MissingSyncAggregate)?,
execution_payload: payload
.try_into()
.map_err(|_| BlockProductionError::InvalidPayloadFork)?,
bls_to_execution_changes: bls_to_execution_changes.into(),
blob_kzg_commitments: kzg_commitments
.ok_or(BlockProductionError::InvalidPayloadFork)?,
execution_requests: maybe_requests
.ok_or(BlockProductionError::MissingExecutionRequests)?,
},
}),
maybe_blobs_and_proofs,
execution_payload_value,
)
}
};

let block = SignedBeaconBlock::from_block(
Expand Down
121 changes: 0 additions & 121 deletions beacon_node/beacon_chain/src/capella_readiness.rs

This file was deleted.

121 changes: 0 additions & 121 deletions beacon_node/beacon_chain/src/deneb_readiness.rs

This file was deleted.

Loading
Loading