Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

**WORK IN PROGRESS **(FKA Trie Log Pruning)instructions only work for besu version 24.3.0 onwards**

UPDATE: Since 24.6.0, this feature has been promoted to production ready and is enabled by default: `--bonsai-limit-trie-logs-enabled`

Step by Step Guide

IMPORTANT: we strongly recommend reading the rest of this documentation before running these commands because your node’s configuration may require changes to these commands…
(Targeting 24.1.2 release, but currently you must be on the besu main branch for this to work)

  1. Update besu config to add --Xbonsai-limit-trie-logs-enabled but don’t restart yet

  2. Stop besu

  3. (optional) Run:
    sudo /usr/local/bin/besu/bin/besu --data-storage-format=BONSAI --data-path=/var/lib/besu --sync-mode=X_SNAP storage x-trie-log prune

  4. Start besu (remembering to run sudo systemctl daemon-reload if you use a systemd service file as per CoinCashew and Somer)

  5. Look out for Limit trie logs enabled: retention: 512; prune window: 30000 in your besu config printout during startup

  6. Enjoy more GBs

...

From our testing, we estimate this will save users > 3 GB per week in database growth. Early testing indicates Besu’s overall database growth with this enabled is ~7 GB per week (thanks Yorick!) which is on par with geth. See here for more details about resource usage: https://eth-docker.net/Usage/ResourceUsage/#disk-ram-cpu-requirements

Why?

Some users noticed that resyncing Besu can free up disk space, especially for longer running nodes. This is despite --data-storage-format=BONSAI having “implicit pruning”. More on this reddit thread: https://www.reddit.com/r/ethstaker/comments/12xnxxi/clearing_up_besubonsai_confusion_on_state_growth/

...

https://github.com/hyperledger/besu/issues/5390
https://github.com/hyperledger/besu/pull/6026
https://github.com/hyperledger/besu/pull/6303