@@ -683,6 +683,7 @@ pub struct GossipVerifiedBlock<T: BeaconChainTypes> {
683
683
pub block_root : Hash256 ,
684
684
parent : Option < PreProcessingSnapshot < T :: EthSpec > > ,
685
685
consensus_context : ConsensusContext < T :: EthSpec > ,
686
+ custody_columns_count : usize ,
686
687
}
687
688
688
689
/// A wrapper around a `SignedBeaconBlock` that indicates that all signatures (except the deposit
@@ -718,6 +719,7 @@ pub trait IntoGossipVerifiedBlock<T: BeaconChainTypes>: Sized {
718
719
fn into_gossip_verified_block (
719
720
self ,
720
721
chain : & BeaconChain < T > ,
722
+ custody_columns_count : usize ,
721
723
) -> Result < GossipVerifiedBlock < T > , BlockError > ;
722
724
fn inner_block ( & self ) -> Arc < SignedBeaconBlock < T :: EthSpec > > ;
723
725
}
@@ -726,6 +728,7 @@ impl<T: BeaconChainTypes> IntoGossipVerifiedBlock<T> for GossipVerifiedBlock<T>
726
728
fn into_gossip_verified_block (
727
729
self ,
728
730
_chain : & BeaconChain < T > ,
731
+ _custody_columns_count : usize ,
729
732
) -> Result < GossipVerifiedBlock < T > , BlockError > {
730
733
Ok ( self )
731
734
}
@@ -738,8 +741,9 @@ impl<T: BeaconChainTypes> IntoGossipVerifiedBlock<T> for Arc<SignedBeaconBlock<T
738
741
fn into_gossip_verified_block (
739
742
self ,
740
743
chain : & BeaconChain < T > ,
744
+ custody_columns_count : usize ,
741
745
) -> Result < GossipVerifiedBlock < T > , BlockError > {
742
- GossipVerifiedBlock :: new ( self , chain)
746
+ GossipVerifiedBlock :: new ( self , chain, custody_columns_count )
743
747
}
744
748
745
749
fn inner_block ( & self ) -> Arc < SignedBeaconBlock < T :: EthSpec > > {
@@ -808,6 +812,7 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
808
812
pub fn new (
809
813
block : Arc < SignedBeaconBlock < T :: EthSpec > > ,
810
814
chain : & BeaconChain < T > ,
815
+ custody_columns_count : usize ,
811
816
) -> Result < Self , BlockError > {
812
817
// If the block is valid for gossip we don't supply it to the slasher here because
813
818
// we assume it will be transformed into a fully verified block. We *do* need to supply
@@ -817,19 +822,22 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
817
822
// The `SignedBeaconBlock` and `SignedBeaconBlockHeader` have the same canonical root,
818
823
// but it's way quicker to calculate root of the header since the hash of the tree rooted
819
824
// at `BeaconBlockBody` is already computed in the header.
820
- Self :: new_without_slasher_checks ( block, & header, chain) . map_err ( |e| {
821
- process_block_slash_info :: < _ , BlockError > (
822
- chain,
823
- BlockSlashInfo :: from_early_error_block ( header, e) ,
824
- )
825
- } )
825
+ Self :: new_without_slasher_checks ( block, & header, chain, custody_columns_count) . map_err (
826
+ |e| {
827
+ process_block_slash_info :: < _ , BlockError > (
828
+ chain,
829
+ BlockSlashInfo :: from_early_error_block ( header, e) ,
830
+ )
831
+ } ,
832
+ )
826
833
}
827
834
828
835
/// As for new, but doesn't pass the block to the slasher.
829
836
fn new_without_slasher_checks (
830
837
block : Arc < SignedBeaconBlock < T :: EthSpec > > ,
831
838
block_header : & SignedBeaconBlockHeader ,
832
839
chain : & BeaconChain < T > ,
840
+ custody_columns_count : usize ,
833
841
) -> Result < Self , BlockError > {
834
842
// Ensure the block is the correct structure for the fork at `block.slot()`.
835
843
block
@@ -1036,6 +1044,7 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
1036
1044
block_root,
1037
1045
parent,
1038
1046
consensus_context,
1047
+ custody_columns_count,
1039
1048
} )
1040
1049
}
1041
1050
@@ -1183,6 +1192,7 @@ impl<T: BeaconChainTypes> SignatureVerifiedBlock<T> {
1183
1192
block : MaybeAvailableBlock :: AvailabilityPending {
1184
1193
block_root : from. block_root ,
1185
1194
block,
1195
+ custody_columns_count : from. custody_columns_count ,
1186
1196
} ,
1187
1197
block_root : from. block_root ,
1188
1198
parent : Some ( parent) ,
0 commit comments