File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
beacon_node/beacon_chain/src Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ pub struct ChainConfig {
9494 /// The delay in milliseconds applied by the node between sending each blob or data column batch.
9595 /// This doesn't apply if the node is the block proposer.
9696 pub blob_publication_batch_interval : Duration ,
97+ /// When prune execution payloads is set to false, store full block information instead of blinded block.
98+ pub prune_payloads : bool ,
9799}
98100
99101impl Default for ChainConfig {
@@ -129,6 +131,7 @@ impl Default for ChainConfig {
129131 enable_sampling : false ,
130132 blob_publication_batches : 4 ,
131133 blob_publication_batch_interval : Duration :: from_millis ( 300 ) ,
134+ prune_payloads : true ,
132135 }
133136 }
134137}
Original file line number Diff line number Diff line change @@ -133,10 +133,19 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
133133 } ) ;
134134 }
135135
136- let blinded_block = block. clone_as_blinded ( ) ;
137- // Store block in the hot database without payload.
138- self . store
139- . blinded_block_as_kv_store_ops ( & block_root, & blinded_block, & mut hot_batch) ;
136+ if !self . config . prune_payloads {
137+ // If prune-payloads is set to false, store the block which includes the execution payload
138+ self . store
139+ . block_as_kv_store_ops ( & block_root, ( * block) . clone ( ) , & mut hot_batch) ?;
140+ } else {
141+ let blinded_block = block. clone_as_blinded ( ) ;
142+ // Store block in the hot database without payload.
143+ self . store . blinded_block_as_kv_store_ops (
144+ & block_root,
145+ & blinded_block,
146+ & mut hot_batch,
147+ ) ;
148+ }
140149 // Store the blobs too
141150 if let Some ( blobs) = maybe_blobs {
142151 new_oldest_blob_slot = Some ( block. slot ( ) ) ;
You can’t perform that action at this time.
0 commit comments