From 2d6484a1f463392c951af7e64c6771dd6d0a9852 Mon Sep 17 00:00:00 2001 From: Simon Dudley Date: Fri, 21 Jun 2024 11:48:57 +0100 Subject: [PATCH 1/8] Add cli options for bonsai-limit-trie-logs-enabled and bonsai-trie-logs-pruning-window-size Signed-off-by: Simon Dudley --- docs/public-networks/reference/cli/options.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/docs/public-networks/reference/cli/options.md b/docs/public-networks/reference/cli/options.md index 038ee536cb2..914a2dc6f39 100644 --- a/docs/public-networks/reference/cli/options.md +++ b/docs/public-networks/reference/cli/options.md @@ -364,6 +364,86 @@ If you plan on querying historical blocks or state using the [JSON-RPC API](../a ::: +### `bonsai-limit-trie-logs-enabled` + + + + + +```bash +--bonsai-limit-trie-logs-enabled=[=] +``` + + + + + +```bash +--bonsai-limit-trie-logs-enabled=false +``` + + + + + +```bash +BESU_BONSAI_LIMIT_TRIE_LOGS_ENABLED=false +``` + + + + + +```bash +bonsai-limit-trie-logs-enabled=false +``` + + + + + +When using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries), limit the number of trie logs that are retained to the value of [`--bonsai-historical-block-limit`](#bonsai-historical-block-limit). The default is `true`, unless [`--sync-mode=FULL`](#sync-mode) in which case this option is disallowed and must be set to false. + +### `bonsai-trie-logs-pruning-window-size` + + + + + +```bash +--bonsai-trie-logs-pruning-window-size= +``` + + + + + +```bash +--bonsai-trie-logs-pruning-window-size=100000 +``` + + + + + +```bash +BESU_BONSAI_TRIE_LOGS_PRUNING_WINDOW_SIZE=100000 +``` + + + + + +```bash +bonsai-trie-logs-pruning-window-size=100000 +``` + + + + + +When using [`--bonsai-limit-trie-logs-enabled`](#bonsai-limit-trie-logs-enabled), the number of trie logs to prune during one pruning operation. A larger value may impact node performance. The default is `30000`. + ### `bootnodes` From a5443d1920c4a266ea24b4151c169550fcb8e30e Mon Sep 17 00:00:00 2001 From: Simon Dudley Date: Fri, 21 Jun 2024 12:09:58 +0100 Subject: [PATCH 2/8] Update how to page Signed-off-by: Simon Dudley --- .../public-networks/how-to/bonsai-limit-trie-logs.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/public-networks/how-to/bonsai-limit-trie-logs.md b/docs/public-networks/how-to/bonsai-limit-trie-logs.md index f1775d1031f..42227bb19bc 100644 --- a/docs/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/docs/public-networks/how-to/bonsai-limit-trie-logs.md @@ -9,7 +9,7 @@ tags: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -To decrease the database size when using the [Bonsai Trie](../concepts/data-storage-formats#bonsai-tries) data storage format, enable the early access feature `--Xbonsai-limit-trie-logs-enabled`. +Since Besu version 24.6.0, when using the [Bonsai Trie](../concepts/data-storage-formats#bonsai-tries) data storage format, [`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) is enabled by default, unless [`--sync-mode=FULL`](../reference/cli/options.md#sync-mode) in which case this option is disallowed and must be set to false. When enabled, this feature can reduce database growth by more than 3 GB each week on Mainnet. ## Limit and prune trie logs @@ -20,7 +20,7 @@ The following commands are examples. Before executing these example commands on ::: -1. Add the `--Xbonsai-limit-trie-logs-enabled` option to the [Besu configuration file](use-configuration-file). +1. Upgrade to Besu version 24.6.0 or add the `--Xbonsai-limit-trie-logs-enabled` option to the [Besu configuration file](use-configuration-file). :::note @@ -39,15 +39,15 @@ The following commands are examples. Before executing these example commands on ### Prune outdated trie logs -When you start Besu with `--Xbonsai-limit-trie-logs-enabled`, it continuously prunes the unnecessary trie log data, removing it one block at a time. +When you start Besu with `--bonsai-limit-trie-logs-enabled`, it continuously prunes the unnecessary trie log data, removing it one block at a time. This process begins after an initial reduction in the database size during startup. -Enabling `--Xbonsai-limit-trie-logs-enabled` on a long-running node does not immediately clear your backlog of trie logs in the same way resyncing does. +Enabling `--bonsai-limit-trie-logs-enabled` on a long-running node does not immediately clear your backlog of trie logs in the same way resyncing does. Instead of resyncing, you can run an offline command to immediately prune old trie logs. To run the offline command, you must shut down Besu for a minimal period. -If the `--Xbonsai-limit-trie-logs-enabled` option is enabled, you do not need to run the offline command again after initially running it. +If the `--bonsai-limit-trie-logs-enabled` option is enabled, you do not need to run the offline command again after initially running it. -For minimal downtime, we recommend running the offline command before restarting Besu with `--Xbonsai-limit-trie-logs-enabled`. +For minimal downtime, we recommend running the offline command before restarting Besu with `--bonsai-limit-trie-logs-enabled`. If you are following the guides by [Somer Esat](https://someresat.medium.com/guide-to-staking-on-ethereum-ubuntu-teku-f09ecd9ef2ee) or [CoinCashew](https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet/part-i-installation/step-3-installing-execution-client/besu), you have set the following options in your `besu.service` or `execution.service` systemd file: From 514905ec50e03cfa0ae48908f71eeb841c1e5977 Mon Sep 17 00:00:00 2001 From: Simon Dudley Date: Sun, 23 Jun 2024 16:58:16 +1000 Subject: [PATCH 3/8] Update docs/public-networks/how-to/bonsai-limit-trie-logs.md Co-authored-by: Joan E <153745173+joaniefromtheblock@users.noreply.github.com> Signed-off-by: Simon Dudley --- docs/public-networks/how-to/bonsai-limit-trie-logs.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/public-networks/how-to/bonsai-limit-trie-logs.md b/docs/public-networks/how-to/bonsai-limit-trie-logs.md index 42227bb19bc..ef594d6b438 100644 --- a/docs/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/docs/public-networks/how-to/bonsai-limit-trie-logs.md @@ -9,7 +9,11 @@ tags: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -Since Besu version 24.6.0, when using the [Bonsai Trie](../concepts/data-storage-formats#bonsai-tries) data storage format, [`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) is enabled by default, unless [`--sync-mode=FULL`](../reference/cli/options.md#sync-mode) in which case this option is disallowed and must be set to false. +When using the [Bonsai Trie](../concepts/data-storage-formats#bonsai-tries) data storage format, [`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) is enabled by default. + +::: note +If [`--sync-mode=FULL`](../reference/cli/options.md#sync-mode) is set, the `--bonsai-limit-trie-logs-enabled` option is disallowed and must be set to false. +::: When enabled, this feature can reduce database growth by more than 3 GB each week on Mainnet. ## Limit and prune trie logs From 5a9372992fa9ea60fb9592ea9f9e7b1a0ae384d2 Mon Sep 17 00:00:00 2001 From: Simon Dudley Date: Sun, 23 Jun 2024 08:19:25 +0100 Subject: [PATCH 4/8] Use note as prerequisite Signed-off-by: Simon Dudley --- .../how-to/bonsai-limit-trie-logs.md | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/public-networks/how-to/bonsai-limit-trie-logs.md b/docs/public-networks/how-to/bonsai-limit-trie-logs.md index ef594d6b438..8bfc9e17f5b 100644 --- a/docs/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/docs/public-networks/how-to/bonsai-limit-trie-logs.md @@ -10,29 +10,22 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; When using the [Bonsai Trie](../concepts/data-storage-formats#bonsai-tries) data storage format, [`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) is enabled by default. +When enabled, this feature can reduce database growth by more than 3 GB each week on Mainnet. -::: note +:::note If [`--sync-mode=FULL`](../reference/cli/options.md#sync-mode) is set, the `--bonsai-limit-trie-logs-enabled` option is disallowed and must be set to false. ::: -When enabled, this feature can reduce database growth by more than 3 GB each week on Mainnet. ## Limit and prune trie logs :::caution - The following commands are examples. Before executing these example commands on your node, modify them to apply to your node's configuration. - ::: -1. Upgrade to Besu version 24.6.0 or add the `--Xbonsai-limit-trie-logs-enabled` option to the [Besu configuration file](use-configuration-file). - - :::note - - If you are using a `systemd` service file, as recommended by [CoinCashew](https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet/part-i-installation/step-3-installing-execution-client/besu) - and [Somer Esat](https://someresat.medium.com/guide-to-staking-on-ethereum-ubuntu-teku-f09ecd9ef2ee), ensure you execute `sudo systemctl daemon-reload`. - - ::: - +:::note +Ensure you are using Besu version 24.6.0 or later. If you are using an older verison, upgrade or refer to the older version of the documentation. +::: + 1. Stop Besu. 1. (Optional) Run the Besu trie log prune command. Specify the Bonsai Trie data storage format and the data directory for your Besu database: ```bash From d8299f5faba3e4e5cd6d8c596b51ebc1ce279bf9 Mon Sep 17 00:00:00 2001 From: Simon Dudley Date: Sun, 23 Jun 2024 08:23:31 +0100 Subject: [PATCH 5/8] Adding pruning prerequisite Signed-off-by: Simon Dudley --- docs/public-networks/how-to/bonsai-limit-trie-logs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/public-networks/how-to/bonsai-limit-trie-logs.md b/docs/public-networks/how-to/bonsai-limit-trie-logs.md index 8bfc9e17f5b..7b1fe104d20 100644 --- a/docs/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/docs/public-networks/how-to/bonsai-limit-trie-logs.md @@ -18,6 +18,8 @@ If [`--sync-mode=FULL`](../reference/cli/options.md#sync-mode) is set, the `--bo ## Limit and prune trie logs +If you've been running Besu without `--bonsai-limit-trie-logs-enabled` then you may have a backlog of redundant trie logs. These can be pruned using the instructions below. + :::caution The following commands are examples. Before executing these example commands on your node, modify them to apply to your node's configuration. ::: From 96b655561cf31e09bb6b3e25e4b5c35126ca4c18 Mon Sep 17 00:00:00 2001 From: Simon Dudley Date: Sun, 23 Jun 2024 08:27:25 +0100 Subject: [PATCH 6/8] typo Signed-off-by: Simon Dudley --- docs/public-networks/how-to/bonsai-limit-trie-logs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/public-networks/how-to/bonsai-limit-trie-logs.md b/docs/public-networks/how-to/bonsai-limit-trie-logs.md index 7b1fe104d20..82507a9339e 100644 --- a/docs/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/docs/public-networks/how-to/bonsai-limit-trie-logs.md @@ -25,7 +25,7 @@ The following commands are examples. Before executing these example commands on ::: :::note -Ensure you are using Besu version 24.6.0 or later. If you are using an older verison, upgrade or refer to the older version of the documentation. +Ensure you are using Besu version 24.6.0 or later. If you are using an older version, upgrade or refer to the older version of the documentation. ::: 1. Stop Besu. From 16bab7b3c778f1af81765764fc8a3380d2437484 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Mon, 24 Jun 2024 09:33:21 -0700 Subject: [PATCH 7/8] edit and add to versioned docs Signed-off-by: Alexandra Tran --- .../how-to/bonsai-limit-trie-logs.md | 23 +++-- docs/public-networks/reference/cli/options.md | 17 +++- .../how-to/bonsai-limit-trie-logs.md | 32 ++++--- .../public-networks/reference/cli/options.md | 88 +++++++++++++++++++ 4 files changed, 138 insertions(+), 22 deletions(-) diff --git a/docs/public-networks/how-to/bonsai-limit-trie-logs.md b/docs/public-networks/how-to/bonsai-limit-trie-logs.md index 82507a9339e..ef0b0794657 100644 --- a/docs/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/docs/public-networks/how-to/bonsai-limit-trie-logs.md @@ -9,23 +9,32 @@ tags: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -When using the [Bonsai Trie](../concepts/data-storage-formats#bonsai-tries) data storage format, [`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) is enabled by default. +When using the [Bonsai Tries](../concepts/data-storage-formats#bonsai-tries) data storage format, +[`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) is +enabled by default. When enabled, this feature can reduce database growth by more than 3 GB each week on Mainnet. :::note -If [`--sync-mode=FULL`](../reference/cli/options.md#sync-mode) is set, the `--bonsai-limit-trie-logs-enabled` option is disallowed and must be set to false. +If [`--sync-mode=FULL`](../reference/cli/options.md#sync-mode) is set, the +[`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) +option is disallowed and must be set to `false`. ::: ## Limit and prune trie logs -If you've been running Besu without `--bonsai-limit-trie-logs-enabled` then you may have a backlog of redundant trie logs. These can be pruned using the instructions below. +If you're running Besu without +[`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled), +you might have a backlog of redundant trie logs. +You can prune these using the following instructions. -:::caution -The following commands are examples. Before executing these example commands on your node, modify them to apply to your node's configuration. +:::note +Ensure you are using Besu version 24.6.0 or later. +If you are using an older version, upgrade Besu or refer to the older version of the documentation. ::: -:::note -Ensure you are using Besu version 24.6.0 or later. If you are using an older version, upgrade or refer to the older version of the documentation. +:::caution +The following commands are examples. +Before executing these example commands on your node, modify them to apply to your node's configuration. ::: 1. Stop Besu. diff --git a/docs/public-networks/reference/cli/options.md b/docs/public-networks/reference/cli/options.md index 914a2dc6f39..dcad12fd72c 100644 --- a/docs/public-networks/reference/cli/options.md +++ b/docs/public-networks/reference/cli/options.md @@ -356,7 +356,10 @@ bonsai-historical-block-limit=256 -When using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries), the [maximum number of previous blocks](../../concepts/data-storage-formats.md#accessing-data) for which Bonsai can reconstruct a historical state. The default is 512. +When using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries), the +[maximum number of previous blocks](../../concepts/data-storage-formats.md#accessing-data) for which +Bonsai can reconstruct a historical state. +The default is `512`. :::note @@ -402,7 +405,12 @@ bonsai-limit-trie-logs-enabled=false -When using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries), limit the number of trie logs that are retained to the value of [`--bonsai-historical-block-limit`](#bonsai-historical-block-limit). The default is `true`, unless [`--sync-mode=FULL`](#sync-mode) in which case this option is disallowed and must be set to false. +Enables or disables limiting the number of +[Bonsai Trie](../../concepts/data-storage-formats.md#bonsai-tries) logs that are retained. +When enabled, this limit is set to the value of +[`--bonsai-historical-block-limit`](#bonsai-historical-block-limit). +The default is `true`, unless [`--sync-mode=FULL`](#sync-mode) is set, in which case this option is +disallowed and must be set to `false`. ### `bonsai-trie-logs-pruning-window-size` @@ -442,7 +450,10 @@ bonsai-trie-logs-pruning-window-size=100000 -When using [`--bonsai-limit-trie-logs-enabled`](#bonsai-limit-trie-logs-enabled), the number of trie logs to prune during one pruning operation. A larger value may impact node performance. The default is `30000`. +When using [`--bonsai-limit-trie-logs-enabled`](#bonsai-limit-trie-logs-enabled), the number of trie +logs to prune during one pruning operation. +A larger value might impact node performance. +The default is `30000`. ### `bootnodes` diff --git a/versioned_docs/version-24.6.0/public-networks/how-to/bonsai-limit-trie-logs.md b/versioned_docs/version-24.6.0/public-networks/how-to/bonsai-limit-trie-logs.md index f1775d1031f..5ee1d15bdce 100644 --- a/versioned_docs/version-24.6.0/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/versioned_docs/version-24.6.0/public-networks/how-to/bonsai-limit-trie-logs.md @@ -9,26 +9,34 @@ tags: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -To decrease the database size when using the [Bonsai Trie](../concepts/data-storage-formats#bonsai-tries) data storage format, enable the early access feature `--Xbonsai-limit-trie-logs-enabled`. +When using the [Bonsai Tries](../concepts/data-storage-formats#bonsai-tries) data storage format, +[`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) is +enabled by default. When enabled, this feature can reduce database growth by more than 3 GB each week on Mainnet. +:::note +If [`--sync-mode=FULL`](../reference/cli/options.md#sync-mode) is set, the +[`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled) +option is disallowed and must be set to `false`. +::: + ## Limit and prune trie logs -:::caution +If you're running Besu without +[`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled), +you might have a backlog of redundant trie logs. +You can prune these using the following instructions. -The following commands are examples. Before executing these example commands on your node, modify them to apply to your node's configuration. +:::note +Ensure you are using Besu version 24.6.0 or later. +If you are using an older version, upgrade Besu or refer to the older version of the documentation. +::: +:::caution +The following commands are examples. +Before executing these example commands on your node, modify them to apply to your node's configuration. ::: -1. Add the `--Xbonsai-limit-trie-logs-enabled` option to the [Besu configuration file](use-configuration-file). - - :::note - - If you are using a `systemd` service file, as recommended by [CoinCashew](https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet/part-i-installation/step-3-installing-execution-client/besu) - and [Somer Esat](https://someresat.medium.com/guide-to-staking-on-ethereum-ubuntu-teku-f09ecd9ef2ee), ensure you execute `sudo systemctl daemon-reload`. - - ::: - 1. Stop Besu. 1. (Optional) Run the Besu trie log prune command. Specify the Bonsai Trie data storage format and the data directory for your Besu database: ```bash diff --git a/versioned_docs/version-24.6.0/public-networks/reference/cli/options.md b/versioned_docs/version-24.6.0/public-networks/reference/cli/options.md index 038ee536cb2..8de9a3a625d 100644 --- a/versioned_docs/version-24.6.0/public-networks/reference/cli/options.md +++ b/versioned_docs/version-24.6.0/public-networks/reference/cli/options.md @@ -364,6 +364,94 @@ If you plan on querying historical blocks or state using the [JSON-RPC API](../a ::: +### `bonsai-limit-trie-logs-enabled` + + + + + +```bash +--bonsai-limit-trie-logs-enabled=[=] +``` + + + + + +```bash +--bonsai-limit-trie-logs-enabled=false +``` + + + + + +```bash +BESU_BONSAI_LIMIT_TRIE_LOGS_ENABLED=false +``` + + + + + +```bash +bonsai-limit-trie-logs-enabled=false +``` + + + + + +Enables or disables limiting the number of +[Bonsai Trie](../../concepts/data-storage-formats.md#bonsai-tries) logs that are retained. +When enabled, this limit is set to the value of +[`--bonsai-historical-block-limit`](#bonsai-historical-block-limit). +The default is `true`, unless [`--sync-mode=FULL`](#sync-mode) is set, in which case this option is +disallowed and must be set to `false`. + +### `bonsai-trie-logs-pruning-window-size` + + + + + +```bash +--bonsai-trie-logs-pruning-window-size= +``` + + + + + +```bash +--bonsai-trie-logs-pruning-window-size=100000 +``` + + + + + +```bash +BESU_BONSAI_TRIE_LOGS_PRUNING_WINDOW_SIZE=100000 +``` + + + + + +```bash +bonsai-trie-logs-pruning-window-size=100000 +``` + + + + + +When using [`--bonsai-limit-trie-logs-enabled`](#bonsai-limit-trie-logs-enabled), the number of trie +logs to prune during one pruning operation. +A larger value might impact node performance. +The default is `30000`. + ### `bootnodes` From 440ab5ef9bea3227e3f5e0616a4405248d532b74 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Mon, 24 Jun 2024 09:39:03 -0700 Subject: [PATCH 8/8] edits Signed-off-by: Alexandra Tran --- docs/public-networks/how-to/bonsai-limit-trie-logs.md | 4 +++- .../public-networks/how-to/bonsai-limit-trie-logs.md | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/public-networks/how-to/bonsai-limit-trie-logs.md b/docs/public-networks/how-to/bonsai-limit-trie-logs.md index ef0b0794657..08e4d3fdb16 100644 --- a/docs/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/docs/public-networks/how-to/bonsai-limit-trie-logs.md @@ -47,7 +47,9 @@ Before executing these example commands on your node, modify them to apply to yo ### Prune outdated trie logs -When you start Besu with `--bonsai-limit-trie-logs-enabled`, it continuously prunes the unnecessary trie log data, removing it one block at a time. +When you start Besu with +[`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled), it +continuously prunes the unnecessary trie log data, removing it one block at a time. This process begins after an initial reduction in the database size during startup. Enabling `--bonsai-limit-trie-logs-enabled` on a long-running node does not immediately clear your backlog of trie logs in the same way resyncing does. diff --git a/versioned_docs/version-24.6.0/public-networks/how-to/bonsai-limit-trie-logs.md b/versioned_docs/version-24.6.0/public-networks/how-to/bonsai-limit-trie-logs.md index 5ee1d15bdce..1133edff479 100644 --- a/versioned_docs/version-24.6.0/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/versioned_docs/version-24.6.0/public-networks/how-to/bonsai-limit-trie-logs.md @@ -47,15 +47,17 @@ Before executing these example commands on your node, modify them to apply to yo ### Prune outdated trie logs -When you start Besu with `--Xbonsai-limit-trie-logs-enabled`, it continuously prunes the unnecessary trie log data, removing it one block at a time. +When you start Besu with +[`--bonsai-limit-trie-logs-enabled`](../reference/cli/options.md#bonsai-limit-trie-logs-enabled), it +continuously prunes the unnecessary trie log data, removing it one block at a time. This process begins after an initial reduction in the database size during startup. -Enabling `--Xbonsai-limit-trie-logs-enabled` on a long-running node does not immediately clear your backlog of trie logs in the same way resyncing does. +Enabling `--bonsai-limit-trie-logs-enabled` on a long-running node does not immediately clear your backlog of trie logs in the same way resyncing does. Instead of resyncing, you can run an offline command to immediately prune old trie logs. To run the offline command, you must shut down Besu for a minimal period. -If the `--Xbonsai-limit-trie-logs-enabled` option is enabled, you do not need to run the offline command again after initially running it. +If the `--bonsai-limit-trie-logs-enabled` option is enabled, you do not need to run the offline command again after initially running it. -For minimal downtime, we recommend running the offline command before restarting Besu with `--Xbonsai-limit-trie-logs-enabled`. +For minimal downtime, we recommend running the offline command before restarting Besu with `--bonsai-limit-trie-logs-enabled`. If you are following the guides by [Somer Esat](https://someresat.medium.com/guide-to-staking-on-ethereum-ubuntu-teku-f09ecd9ef2ee) or [CoinCashew](https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet/part-i-installation/step-3-installing-execution-client/besu), you have set the following options in your `besu.service` or `execution.service` systemd file: