mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Refined payload pruning (#3587)
## Proposed Changes Improve the payload pruning feature in several ways: - Payload pruning is now entirely optional. It is enabled by default but can be disabled with `--prune-payloads false`. The previous `--prune-payloads-on-startup` flag from #3565 is removed. - Initial payload pruning on startup now runs in a background thread. This thread will always load the split state, which is a small fraction of its total work (up to ~300ms) and then backtrack from that state. This pruning process ran in 2m5s on one Prater node with good I/O and 16m on a node with slower I/O. - To work with the optional payload pruning the database function `try_load_full_block` will now attempt to load execution payloads for finalized slots _if_ pruning is currently disabled. This gives users an opt-out for the extensive traffic between the CL and EL for reconstructing payloads. ## Additional Info If the `prune-payloads` flag is toggled on and off then the on-startup check may not see any payloads to delete and fail to clean them up. In this case the `lighthouse db prune_payloads` command should be used to force a manual sweep of the database.
This commit is contained in:
@@ -358,10 +358,8 @@ pub fn get_config<E: EthSpec>(
|
||||
.map_err(|_| "auto-compact-db takes a boolean".to_string())?;
|
||||
}
|
||||
|
||||
if let Some(prune_payloads_on_init) =
|
||||
clap_utils::parse_optional(cli_args, "prune-payloads-on-startup")?
|
||||
{
|
||||
client_config.store.prune_payloads_on_init = prune_payloads_on_init;
|
||||
if let Some(prune_payloads) = clap_utils::parse_optional(cli_args, "prune-payloads")? {
|
||||
client_config.store.prune_payloads = prune_payloads;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user