From 0a614833e8a82560454b230011c0ad43d871a8ba Mon Sep 17 00:00:00 2001 From: Tan Chee Keong Date: Mon, 13 Jan 2025 10:19:48 +0800 Subject: [PATCH] get to prune_paylods correctly --- beacon_node/beacon_chain/src/chain_config.rs | 3 --- beacon_node/beacon_chain/src/historical_blocks.rs | 2 +- beacon_node/client/src/config.rs | 2 -- beacon_node/store/src/hot_cold_store.rs | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/beacon_node/beacon_chain/src/chain_config.rs b/beacon_node/beacon_chain/src/chain_config.rs index 15c7c890372..b8a607c8864 100644 --- a/beacon_node/beacon_chain/src/chain_config.rs +++ b/beacon_node/beacon_chain/src/chain_config.rs @@ -94,8 +94,6 @@ pub struct ChainConfig { /// The delay in milliseconds applied by the node between sending each blob or data column batch. /// This doesn't apply if the node is the block proposer. pub blob_publication_batch_interval: Duration, - /// When prune execution payloads is set to false, store full block information instead of blinded block. - pub prune_payloads: bool, } impl Default for ChainConfig { @@ -131,7 +129,6 @@ impl Default for ChainConfig { enable_sampling: false, blob_publication_batches: 4, blob_publication_batch_interval: Duration::from_millis(300), - prune_payloads: true, } } } diff --git a/beacon_node/beacon_chain/src/historical_blocks.rs b/beacon_node/beacon_chain/src/historical_blocks.rs index cc2ca710ea5..1541ed5c2ad 100644 --- a/beacon_node/beacon_chain/src/historical_blocks.rs +++ b/beacon_node/beacon_chain/src/historical_blocks.rs @@ -133,7 +133,7 @@ impl BeaconChain { }); } - if !self.config.prune_payloads { + if !self.store.get_config().prune_payloads { // If prune-payloads is set to false, store the block which includes the execution payload self.store .block_as_kv_store_ops(&block_root, (*block).clone(), &mut hot_batch)?; diff --git a/beacon_node/client/src/config.rs b/beacon_node/client/src/config.rs index 034ea3759a6..becc781ed32 100644 --- a/beacon_node/client/src/config.rs +++ b/beacon_node/client/src/config.rs @@ -82,7 +82,6 @@ pub struct Config { pub genesis_state_url: Option, pub genesis_state_url_timeout: Duration, pub allow_insecure_genesis_sync: bool, - pub prune_payloads: bool, } impl Default for Config { @@ -116,7 +115,6 @@ impl Default for Config { // This default value should always be overwritten by the CLI default value. genesis_state_url_timeout: Duration::from_secs(60), allow_insecure_genesis_sync: false, - prune_payloads: true, } } } diff --git a/beacon_node/store/src/hot_cold_store.rs b/beacon_node/store/src/hot_cold_store.rs index c29305f9831..98f067af7e3 100644 --- a/beacon_node/store/src/hot_cold_store.rs +++ b/beacon_node/store/src/hot_cold_store.rs @@ -529,7 +529,7 @@ impl, Cold: ItemStore> HotColdDB .ok_or(Error::AddPayloadLogicError) } - /// Prepare a signed beacon block for storage in the datbase *without* its payload. + /// Prepare a signed beacon block for storage in the database *without* its payload. pub fn blinded_block_as_kv_store_ops( &self, key: &Hash256,