updates per pr review second wave

This commit is contained in:
shane-moore
2025-08-18 13:46:01 -07:00
committed by Mark Mackey
parent a3563289c1
commit 5e562555b0
7 changed files with 7 additions and 8 deletions

View File

@@ -684,6 +684,7 @@ impl<E: EthSpec, Payload: AbstractExecPayload<E>> EmptyBlock for BeaconBlockGloa
/// TODO(EIP-7732) Mark's branch had the following implementation but not sure if it's needed so will just add header below for reference
// impl<E: EthSpec, Payload: AbstractExecPayload<E>> BeaconBlockEIP7732<E, Payload> {
// TODO(EIP-7732) Look into whether we can remove this in the future since no blinded blocks post-gloas
impl<E: EthSpec> From<BeaconBlockGloas<E, BlindedPayload<E>>>
for BeaconBlockGloas<E, FullPayload<E>>
{

View File

@@ -170,7 +170,6 @@ impl<'a, E: EthSpec, Payload: AbstractExecPayload<E>> BeaconBlockBodyRef<'a, E,
Self::Deneb(body) => Ok(Payload::Ref::from(&body.execution_payload)),
Self::Electra(body) => Ok(Payload::Ref::from(&body.execution_payload)),
Self::Fulu(body) => Ok(Payload::Ref::from(&body.execution_payload)),
// TODO(eip-7732): idk if this is right there's no more execution payload
Self::Gloas(_) => Err(Error::IncorrectStateVariant),
}
}
@@ -229,6 +228,7 @@ impl<'a, E: EthSpec, Payload: AbstractExecPayload<E>> BeaconBlockBodyRef<'a, E,
/// Produces the proof of inclusion for a `KzgCommitment` in `self.blob_kzg_commitments`
/// at `index` using an existing proof for the `blob_kzg_commitments` field.
/// TODO(EIP7732) Investigate calling functions since this will no longer work for glas since no block_kzg_commitments in the body anymore
pub fn complete_kzg_commitment_merkle_proof(
&self,
index: usize,
@@ -240,7 +240,6 @@ impl<'a, E: EthSpec, Payload: AbstractExecPayload<E>> BeaconBlockBodyRef<'a, E,
| Self::Bellatrix(_)
| Self::Capella(_)
| Self::Gloas(_) => Err(Error::IncorrectStateVariant),
// TODO(eip-7732): Mark's impl had the Self::EIP-7732 variant below, but I think it should produce error instead since no self.blob_kzg_commitments in BeaconState for gloas
Self::Deneb(_) | Self::Electra(_) | Self::Fulu(_) => {
// We compute the branches by generating 2 merkle trees:
// 1. Merkle tree for the `blob_kzg_commitments` List object
@@ -521,6 +520,7 @@ impl<E: EthSpec> From<BeaconBlockBodyAltair<E, BlindedPayload<E>>>
}
// Post-Fulu block bodies without payloads can be converted into block bodies with payloads
// TODO(EIP-7732) Look into whether we can remove this in the future since no blinded blocks post-gloas
impl<E: EthSpec> From<BeaconBlockBodyGloas<E, BlindedPayload<E>>>
for BeaconBlockBodyGloas<E, FullPayload<E>>
{

View File

@@ -1091,7 +1091,7 @@ impl<E: EthSpec> BeaconState<E> {
BeaconState::Fulu(state) => Ok(ExecutionPayloadHeaderRef::Fulu(
&state.latest_execution_payload_header,
)),
// FIXME(EIP-7732): this is only to make the code compile, needs to be written later
// TODO(EIP-7732): investigate calling functions
BeaconState::Gloas(_) => Err(Error::IncorrectStateVariant),
}
}
@@ -1116,7 +1116,7 @@ impl<E: EthSpec> BeaconState<E> {
BeaconState::Fulu(state) => Ok(ExecutionPayloadHeaderRefMut::Fulu(
&mut state.latest_execution_payload_header,
)),
// FIXME(EIP-7732): this is only to make the code compile, needs to be written later
// TODO(EIP-7732): investigate calling functions
BeaconState::Gloas(_) => Err(Error::IncorrectStateVariant),
}
}
@@ -1854,7 +1854,6 @@ impl<E: EthSpec> BeaconState<E> {
| BeaconState::Altair(_)
| BeaconState::Bellatrix(_)
| BeaconState::Capella(_) => self.get_validator_churn_limit(spec)?,
// FIXME(EIP-7732): check this
BeaconState::Deneb(_)
| BeaconState::Electra(_)
| BeaconState::Fulu(_)

View File

@@ -512,7 +512,6 @@ impl<'de, E: EthSpec> ContextDeserialize<'de, ForkName> for ExecutionPayloadHead
Self::Fulu(Deserialize::deserialize(deserializer).map_err(convert_err)?)
}
// FIXME(EIP7732): Check this
ForkName::Base | ForkName::Altair | ForkName::Gloas => {
return Err(serde::de::Error::custom(format!(
"ExecutionPayloadHeader failed to deserialize: unsupported fork '{}'",

View File

@@ -649,6 +649,7 @@ impl<E: EthSpec> SignedBeaconBlockFulu<E, BlindedPayload<E>> {
}
// We can convert gloas blocks without payloads into blocks "with" payloads.
// TODO(EIP-7732) Look into whether we can remove this in the future since no blinded blocks post-gloas
impl<E: EthSpec> From<SignedBeaconBlockGloas<E, BlindedPayload<E>>>
for SignedBeaconBlockGloas<E, FullPayload<E>>
{