Skip to content

Commit 2cac4fc

Browse files
--history-expiry-prune is deprecated (#1970)
* `--history-expiry-prune` is deprecated Signed-off-by: Alexandra Carrillo <alexandra.carrillo@consensys.net> * typo Signed-off-by: Alexandra Carrillo <alexandra.carrillo@consensys.net> --------- Signed-off-by: Alexandra Carrillo <alexandra.carrillo@consensys.net>
1 parent 88b1cbd commit 2cac4fc

2 files changed

Lines changed: 20 additions & 5 deletions

File tree

docs/public-networks/how-to/pre-merge-history-expiry.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,33 @@ The fastest option for pruning pre-merge blocks is to perform an offline prune.
4444
On completion, you'll receive the `Pruning pre-merge blocks and transaction receipts completed` log message.
4545
It should only take a few minutes to complete but has been known to take up to two hours on occasion.
4646
47-
1. Add the [`--history-expiry-prune`](../reference/cli/options.md#history-expiry-prune)
48-
option and restart Besu to apply opinionated database garbage collection options to help free up space. You can tweak underlying
49-
garbage collection options separately if necessary.
47+
1. Add the following RocksDB garbage collection options and restart Besu to help free up space:
48+
49+
- `--Xplugin-rocksdb-blockchain-blob-garbage-collection-enabled`
50+
- `--Xplugin-rocksdb-blob-garbage-collection-age-cutoff=0.5`: The fraction of file age that makes a blob file eligible for garbage collection; `0.5` means only the oldest 50% of files are eligible.
51+
- `--Xplugin-rocksdb-blob-garbage-collection-force-threshold=0.1`: The fraction of garbage within an eligible blob file required to trigger compaction; `0.1` triggers garbage collection when at least 10% of an eligible file's content is garbage.
5052

5153
:::info
5254
In testing, we saw the space increased by up to 200GB before the space was finally reclaimed.
5355
We suggest waiting 24-48 hours for all the space to be reclaimed.
5456
:::
5557

56-
1. (Optional) Remove the `--history-expiry-prune` option and restart Besu. This will disable garbage collection which isn't necessary after pruning has reclaimed all the space.
58+
1. (Optional) Remove the RocksDB options and restart Besu. This will disable garbage collection which isn't necessary after pruning has reclaimed all the space.
5759
5860
## Online pruning
5961
62+
:::caution Deprecated
63+
64+
Online pruning using `--history-expiry-prune` is deprecated in Besu version 26.1.0 and will be removed in a future release.
65+
Use [offline pruning](#offline-pruning) or [sync without pre-merge blocks](#sync-without-pre-merge-blocks) instead.
66+
67+
:::
68+
6069
Online pruning allows you to prune the pre-merge blocks on a running Besu instance. It has the least
6170
downtime but may impact normal operations for lower spec users. Add the [`--history-expiry-prune`](../reference/cli/options.md#history-expiry-prune) option and restart your Besu node.
6271
6372
:::note
64-
The early access option `--Xpre-merge-pruning-quantity` can be used to specify how many blocks to prune
73+
The early access option `--Xpre-merge-pruning-quantity` can be used to specify how many blocks to prune
6574
for each new block added to the chain. For example, `--Xpre-merge-pruning-quantity=10`.
6675
During testing on a 4 CPU machine, we only noticed an impact to Besu when this was tuned to `1000`
6776
:::

docs/public-networks/reference/cli/options.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,6 +2023,12 @@ mechanisms, so that the reclaimed storage is compacted quickly, freeing disk spa
20232023

20242024
The default is `false`.
20252025

2026+
:::caution Deprecated
2027+
2028+
`--history-expiry-prune` is deprecated in Besu version 26.1.0 and will be removed in a future release.
2029+
2030+
:::
2031+
20262032
### `host-allowlist`
20272033

20282034
<Tabs>

0 commit comments

Comments
 (0)