@@ -12,7 +12,7 @@ use test_random_derive::TestRandom;
12
12
use tree_hash:: TreeHash ;
13
13
use tree_hash_derive:: TreeHash ;
14
14
15
- use self :: indexed_attestation:: { IndexedAttestationBase , IndexedAttestationElectra } ;
15
+ use self :: indexed_attestation:: IndexedAttestationBase ;
16
16
17
17
/// A block of the `BeaconChain`.
18
18
#[ superstruct(
@@ -499,52 +499,6 @@ impl<E: EthSpec, Payload: AbstractExecPayload<E>> EmptyBlock for BeaconBlockBell
499
499
}
500
500
}
501
501
502
- impl < E : EthSpec , Payload : AbstractExecPayload < E > > BeaconBlockCapella < E , Payload > {
503
- /// Return a Capella block where the block has maximum size.
504
- pub fn full ( spec : & ChainSpec ) -> Self {
505
- let base_block: BeaconBlockBase < _ , Payload > = BeaconBlockBase :: full ( spec) ;
506
- let bls_to_execution_changes = vec ! [
507
- SignedBlsToExecutionChange {
508
- message: BlsToExecutionChange {
509
- validator_index: 0 ,
510
- from_bls_pubkey: PublicKeyBytes :: empty( ) ,
511
- to_execution_address: Address :: ZERO ,
512
- } ,
513
- signature: Signature :: empty( )
514
- } ;
515
- E :: max_bls_to_execution_changes( )
516
- ]
517
- . into ( ) ;
518
- let sync_aggregate = SyncAggregate {
519
- sync_committee_signature : AggregateSignature :: empty ( ) ,
520
- sync_committee_bits : BitVector :: default ( ) ,
521
- } ;
522
- BeaconBlockCapella {
523
- slot : spec. genesis_slot ,
524
- proposer_index : 0 ,
525
- parent_root : Hash256 :: zero ( ) ,
526
- state_root : Hash256 :: zero ( ) ,
527
- body : BeaconBlockBodyCapella {
528
- proposer_slashings : base_block. body . proposer_slashings ,
529
- attester_slashings : base_block. body . attester_slashings ,
530
- attestations : base_block. body . attestations ,
531
- deposits : base_block. body . deposits ,
532
- voluntary_exits : base_block. body . voluntary_exits ,
533
- bls_to_execution_changes,
534
- sync_aggregate,
535
- randao_reveal : Signature :: empty ( ) ,
536
- eth1_data : Eth1Data {
537
- deposit_root : Hash256 :: zero ( ) ,
538
- block_hash : Hash256 :: zero ( ) ,
539
- deposit_count : 0 ,
540
- } ,
541
- graffiti : Graffiti :: default ( ) ,
542
- execution_payload : Payload :: Capella :: default ( ) ,
543
- } ,
544
- }
545
- }
546
- }
547
-
548
502
impl < E : EthSpec , Payload : AbstractExecPayload < E > > EmptyBlock for BeaconBlockCapella < E , Payload > {
549
503
/// Returns an empty Capella block to be used during genesis.
550
504
fn empty ( spec : & ChainSpec ) -> Self {
@@ -604,79 +558,6 @@ impl<E: EthSpec, Payload: AbstractExecPayload<E>> EmptyBlock for BeaconBlockDene
604
558
}
605
559
}
606
560
607
- impl < E : EthSpec , Payload : AbstractExecPayload < E > > BeaconBlockElectra < E , Payload > {
608
- /// Return a Electra block where the block has maximum size.
609
- pub fn full ( spec : & ChainSpec ) -> Self {
610
- let base_block: BeaconBlockBase < _ , Payload > = BeaconBlockBase :: full ( spec) ;
611
- let indexed_attestation: IndexedAttestationElectra < E > = IndexedAttestationElectra {
612
- attesting_indices : VariableList :: new ( vec ! [ 0_u64 ; E :: MaxValidatorsPerSlot :: to_usize( ) ] )
613
- . unwrap ( ) ,
614
- data : AttestationData :: default ( ) ,
615
- signature : AggregateSignature :: empty ( ) ,
616
- } ;
617
- let attester_slashings = vec ! [
618
- AttesterSlashingElectra {
619
- attestation_1: indexed_attestation. clone( ) ,
620
- attestation_2: indexed_attestation,
621
- } ;
622
- E :: max_attester_slashings_electra( )
623
- ]
624
- . into ( ) ;
625
- let attestation = AttestationElectra {
626
- aggregation_bits : BitList :: with_capacity ( E :: MaxValidatorsPerSlot :: to_usize ( ) ) . unwrap ( ) ,
627
- data : AttestationData :: default ( ) ,
628
- signature : AggregateSignature :: empty ( ) ,
629
- committee_bits : BitVector :: new ( ) ,
630
- } ;
631
- let mut attestations_electra = vec ! [ ] ;
632
- for _ in 0 ..E :: MaxAttestationsElectra :: to_usize ( ) {
633
- attestations_electra. push ( attestation. clone ( ) ) ;
634
- }
635
-
636
- let bls_to_execution_changes = vec ! [
637
- SignedBlsToExecutionChange {
638
- message: BlsToExecutionChange {
639
- validator_index: 0 ,
640
- from_bls_pubkey: PublicKeyBytes :: empty( ) ,
641
- to_execution_address: Address :: ZERO ,
642
- } ,
643
- signature: Signature :: empty( )
644
- } ;
645
- E :: max_bls_to_execution_changes( )
646
- ]
647
- . into ( ) ;
648
- let sync_aggregate = SyncAggregate {
649
- sync_committee_signature : AggregateSignature :: empty ( ) ,
650
- sync_committee_bits : BitVector :: default ( ) ,
651
- } ;
652
- BeaconBlockElectra {
653
- slot : spec. genesis_slot ,
654
- proposer_index : 0 ,
655
- parent_root : Hash256 :: zero ( ) ,
656
- state_root : Hash256 :: zero ( ) ,
657
- body : BeaconBlockBodyElectra {
658
- proposer_slashings : base_block. body . proposer_slashings ,
659
- attester_slashings,
660
- attestations : attestations_electra. into ( ) ,
661
- deposits : base_block. body . deposits ,
662
- voluntary_exits : base_block. body . voluntary_exits ,
663
- bls_to_execution_changes,
664
- sync_aggregate,
665
- randao_reveal : Signature :: empty ( ) ,
666
- eth1_data : Eth1Data {
667
- deposit_root : Hash256 :: zero ( ) ,
668
- block_hash : Hash256 :: zero ( ) ,
669
- deposit_count : 0 ,
670
- } ,
671
- graffiti : Graffiti :: default ( ) ,
672
- execution_payload : Payload :: Electra :: default ( ) ,
673
- blob_kzg_commitments : VariableList :: empty ( ) ,
674
- execution_requests : ExecutionRequests :: default ( ) ,
675
- } ,
676
- }
677
- }
678
- }
679
-
680
561
impl < E : EthSpec , Payload : AbstractExecPayload < E > > EmptyBlock for BeaconBlockElectra < E , Payload > {
681
562
/// Returns an empty Electra block to be used during genesis.
682
563
fn empty ( spec : & ChainSpec ) -> Self {
@@ -708,79 +589,6 @@ impl<E: EthSpec, Payload: AbstractExecPayload<E>> EmptyBlock for BeaconBlockElec
708
589
}
709
590
}
710
591
711
- impl < E : EthSpec , Payload : AbstractExecPayload < E > > BeaconBlockFulu < E , Payload > {
712
- /// Return a Fulu block where the block has maximum size.
713
- pub fn full ( spec : & ChainSpec ) -> Self {
714
- let base_block: BeaconBlockBase < _ , Payload > = BeaconBlockBase :: full ( spec) ;
715
- let indexed_attestation: IndexedAttestationElectra < E > = IndexedAttestationElectra {
716
- attesting_indices : VariableList :: new ( vec ! [ 0_u64 ; E :: MaxValidatorsPerSlot :: to_usize( ) ] )
717
- . unwrap ( ) ,
718
- data : AttestationData :: default ( ) ,
719
- signature : AggregateSignature :: empty ( ) ,
720
- } ;
721
- let attester_slashings = vec ! [
722
- AttesterSlashingElectra {
723
- attestation_1: indexed_attestation. clone( ) ,
724
- attestation_2: indexed_attestation,
725
- } ;
726
- E :: max_attester_slashings_electra( )
727
- ]
728
- . into ( ) ;
729
- let attestation = AttestationElectra {
730
- aggregation_bits : BitList :: with_capacity ( E :: MaxValidatorsPerSlot :: to_usize ( ) ) . unwrap ( ) ,
731
- data : AttestationData :: default ( ) ,
732
- signature : AggregateSignature :: empty ( ) ,
733
- committee_bits : BitVector :: new ( ) ,
734
- } ;
735
- let mut attestations_electra = vec ! [ ] ;
736
- for _ in 0 ..E :: MaxAttestationsElectra :: to_usize ( ) {
737
- attestations_electra. push ( attestation. clone ( ) ) ;
738
- }
739
-
740
- let bls_to_execution_changes = vec ! [
741
- SignedBlsToExecutionChange {
742
- message: BlsToExecutionChange {
743
- validator_index: 0 ,
744
- from_bls_pubkey: PublicKeyBytes :: empty( ) ,
745
- to_execution_address: Address :: ZERO ,
746
- } ,
747
- signature: Signature :: empty( )
748
- } ;
749
- E :: max_bls_to_execution_changes( )
750
- ]
751
- . into ( ) ;
752
- let sync_aggregate = SyncAggregate {
753
- sync_committee_signature : AggregateSignature :: empty ( ) ,
754
- sync_committee_bits : BitVector :: default ( ) ,
755
- } ;
756
- BeaconBlockFulu {
757
- slot : spec. genesis_slot ,
758
- proposer_index : 0 ,
759
- parent_root : Hash256 :: zero ( ) ,
760
- state_root : Hash256 :: zero ( ) ,
761
- body : BeaconBlockBodyFulu {
762
- proposer_slashings : base_block. body . proposer_slashings ,
763
- attester_slashings,
764
- attestations : attestations_electra. into ( ) ,
765
- deposits : base_block. body . deposits ,
766
- voluntary_exits : base_block. body . voluntary_exits ,
767
- bls_to_execution_changes,
768
- sync_aggregate,
769
- randao_reveal : Signature :: empty ( ) ,
770
- eth1_data : Eth1Data {
771
- deposit_root : Hash256 :: zero ( ) ,
772
- block_hash : Hash256 :: zero ( ) ,
773
- deposit_count : 0 ,
774
- } ,
775
- graffiti : Graffiti :: default ( ) ,
776
- execution_payload : Payload :: Fulu :: default ( ) ,
777
- blob_kzg_commitments : VariableList :: empty ( ) ,
778
- execution_requests : ExecutionRequests :: default ( ) ,
779
- } ,
780
- }
781
- }
782
- }
783
-
784
592
impl < E : EthSpec , Payload : AbstractExecPayload < E > > EmptyBlock for BeaconBlockFulu < E , Payload > {
785
593
/// Returns an empty Fulu block to be used during genesis.
786
594
fn empty ( spec : & ChainSpec ) -> Self {
0 commit comments