Skip to content

Commit

Permalink
get to prune_paylods correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
chong-he committed Jan 13, 2025
1 parent b86434a commit 0a61483
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
3 changes: 0 additions & 3 deletions beacon_node/beacon_chain/src/chain_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/beacon_chain/src/historical_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
});
}

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)?;
Expand Down
2 changes: 0 additions & 2 deletions beacon_node/client/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ pub struct Config {
pub genesis_state_url: Option<String>,
pub genesis_state_url_timeout: Duration,
pub allow_insecure_genesis_sync: bool,
pub prune_payloads: bool,
}

impl Default for Config {
Expand Down Expand Up @@ -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,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/store/src/hot_cold_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
.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,
Expand Down

0 comments on commit 0a61483

Please sign in to comment.