@@ -29,13 +29,12 @@ use tree_hash::TreeHash;
2929use types:: consts:: gloas:: BUILDER_INDEX_SELF_BUILD ;
3030use types:: {
3131 Address , Attestation , AttestationElectra , AttesterSlashing , AttesterSlashingElectra ,
32- BeaconBlock , BeaconBlockBodyGloas , BeaconBlockBodyHeze , BeaconBlockGloas , BeaconBlockHeze ,
33- BeaconState , BeaconStateError , BuilderIndex , ChainSpec , Deposit , Eth1Data , EthSpec ,
34- ExecutionBlockHash , ExecutionPayloadBid , ExecutionPayloadEnvelope , ExecutionPayloadGloas ,
35- ExecutionRequestsGloas , FullPayload , Graffiti , Hash256 , PayloadAttestation , ProposerSlashing ,
36- RelativeEpoch , SignedBeaconBlock , SignedBlsToExecutionChange , SignedExecutionPayloadBid ,
37- SignedExecutionPayloadEnvelope , SignedVoluntaryExit , Slot , SyncAggregate , Withdrawal ,
38- Withdrawals ,
32+ BeaconBlock , BeaconBlockBodyGloas , BeaconBlockGloas , BeaconState , BeaconStateError ,
33+ BuilderIndex , ChainSpec , Deposit , Eth1Data , EthSpec , ExecutionBlockHash , ExecutionPayloadBid ,
34+ ExecutionPayloadEnvelope , ExecutionPayloadGloas , ExecutionRequestsGloas , FullPayload , Graffiti ,
35+ Hash256 , PayloadAttestation , ProposerSlashing , RelativeEpoch , SignedBeaconBlock ,
36+ SignedBlsToExecutionChange , SignedExecutionPayloadBid , SignedExecutionPayloadEnvelope ,
37+ SignedVoluntaryExit , Slot , SyncAggregate , Withdrawal , Withdrawals ,
3938} ;
4039
4140use crate :: pending_payload_envelopes:: PendingEnvelopeData ;
@@ -601,42 +600,13 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
601600 _phantom : PhantomData :: < FullPayload < T :: EthSpec > > ,
602601 } ,
603602 } ) ,
604- BeaconState :: Heze ( _) => BeaconBlock :: Heze ( BeaconBlockHeze {
605- slot,
606- proposer_index,
607- parent_root,
608- state_root : Hash256 :: ZERO ,
609- body : BeaconBlockBodyHeze {
610- randao_reveal,
611- eth1_data,
612- graffiti,
613- proposer_slashings : proposer_slashings
614- . try_into ( )
615- . map_err ( BlockProductionError :: SszTypesError ) ?,
616- attester_slashings : attester_slashings
617- . try_into ( )
618- . map_err ( BlockProductionError :: SszTypesError ) ?,
619- attestations : attestations
620- . try_into ( )
621- . map_err ( BlockProductionError :: SszTypesError ) ?,
622- deposits : deposits
623- . try_into ( )
624- . map_err ( BlockProductionError :: SszTypesError ) ?,
625- voluntary_exits : voluntary_exits
626- . try_into ( )
627- . map_err ( BlockProductionError :: SszTypesError ) ?,
628- sync_aggregate,
629- bls_to_execution_changes : bls_to_execution_changes
630- . try_into ( )
631- . map_err ( BlockProductionError :: SszTypesError ) ?,
632- parent_execution_requests,
633- signed_execution_payload_bid,
634- payload_attestations : payload_attestations
635- . try_into ( )
636- . map_err ( BlockProductionError :: SszTypesError ) ?,
637- _phantom : PhantomData :: < FullPayload < T :: EthSpec > > ,
638- } ,
639- } ) ,
603+ // TODO(heze): construct a `BeaconBlockHeze` here once Heze block production is
604+ // wired up end-to-end (get_payload, envelope handling, etc).
605+ BeaconState :: Heze ( _) => {
606+ return Err ( BlockProductionError :: InvalidBlockVariant (
607+ "Block production disabled for Heze" . to_owned ( ) ,
608+ ) ) ;
609+ }
640610 } ;
641611
642612 let signed_beacon_block = SignedBeaconBlock :: from_block (
0 commit comments