mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +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:
@@ -516,9 +516,11 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.default_value("true")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("prune-payloads-on-startup")
|
||||
.long("prune-payloads-on-startup")
|
||||
.help("Check for execution payloads to prune on start-up.")
|
||||
Arg::with_name("prune-payloads")
|
||||
.long("prune-payloads")
|
||||
.help("Prune execution payloads from Lighthouse's database. This saves space but \
|
||||
imposes load on the execution client, as payloads need to be \
|
||||
reconstructed and sent to syncing peers.")
|
||||
.takes_value(true)
|
||||
.default_value("true")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user