Skip to content

Commit

Permalink
Remove Forest pruning and update notes around trace calls (#1559)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandratran authored Apr 5, 2024
1 parent 9187791 commit 911b412
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 218 deletions.
22 changes: 3 additions & 19 deletions docs/public-networks/concepts/data-storage-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,9 @@ In forest mode, each node in the trie is saved in a key-value store by hash. For

</p>

### Pruning

Pruning reduces the storage required by removing state trie nodes unreachable from [recent blocks](../../public-networks/reference/cli/options.md#pruning-blocks-retained).

Pruning is disabled by default, and can be enabled with the [`--pruning-enabled`](../../public-networks/reference/cli/options.md#pruning-enabled) command line option.

:::info

Using pruning with [private transactions](../../private-networks/concepts/privacy/private-transactions)
isn't supported.

:::

Pruning might increase block import times, but it doesn't affect the ability of nodes to stay in sync.

:::caution

Pruning is being deprecated for [Bonsai Tries](#bonsai-tries) and is currently not being updated.

:::warning
Forest pruning using the `--pruning-enabled` option is no longer supported.
We recommend using [Bonsai Tries](#bonsai-tries) to save disk space.
:::

## Forest of Tries vs. Bonsai Tries
Expand Down
18 changes: 10 additions & 8 deletions docs/public-networks/how-to/troubleshoot/trace-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ tags:

# Trace transactions

:::caution Forest pruning deprecation notice

Forest pruning (using the [`--pruning-enabled`](../../reference/cli/options.md#pruning-enabled) option) is deprecated and will be removed in a future release. We recommend using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries) as an alternative for saving disk space.

:::

To get detailed information about transaction processing, use the [`TRACE` API](../../reference/api/index.md#trace-methods). Enable the `TRACE` API using the [`--rpc-http-api`](../../reference/cli/options.md#rpc-http-api) or [`--rpc-ws-api`](../../reference/cli/options.md#rpc-ws-api) command line options.

The `TRACE` API has two sets of trace calls, [ad-hoc tracing APIs](#ad-hoc-tracing-apis) and [transaction-trace filtering APIs](#transaction-trace-filtering-apis).
Expand All @@ -23,7 +17,10 @@ The `TRACE` API has two sets of trace calls, [ad-hoc tracing APIs](#ad-hoc-traci

These APIs allow you to use the [`trace`, `vmTrace`, or `stateDiff`](../../reference/trace-types.md) diagnostic options when tracing calls or transactions.

To use the ad-hoc tracing APIs, the requested block or transaction must be within the number of [blocks retained](../../reference/cli/options.md#pruning-blocks-retained) with [pruning enabled](../../reference/cli/options.md#pruning-enabled) (by default, 1024).
When using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries) with the ad-hoc
tracing APIs, the requested block or transaction must be within the number of
[blocks retained](../../reference/cli/options.md#bonsai-historical-block-limit) (by default, 512
from the head of the chain).

The ad-hoc tracing APIs are:

Expand All @@ -36,7 +33,12 @@ The ad-hoc tracing APIs are:

These APIs allow you to filter and search by specific information such as the block, address, or transaction. These APIs only use the [`trace` type](../../reference/trace-types.md#trace).

To use the transaction-trace filtering APIs, your node must be an archive node (that is, synchronized without pruning or fast sync) or the requested block or transaction must be within the number of [blocks retained](../../reference/cli/options.md#pruning-blocks-retained) with [pruning enabled](../../reference/cli/options.md#pruning-enabled) (by default, 1024).
To use the transaction-trace filtering APIs, your node must be an
[archive node](../../get-started/connect/sync-node.md#run-an-archive-node), or the requested block
or transaction must be within the number of
[blocks retained](../../reference/cli/options.md#bonsai-historical-block-limit) when using
[Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries) (by default, 512 from the head
of the chain).

The transaction-trace filtering APIs are:

Expand Down
85 changes: 38 additions & 47 deletions docs/public-networks/reference/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ import TabItem from '@theme/TabItem';

:::

:::caution Forest pruning deprecation notice

Forest pruning (using the [`--pruning-enabled`](../cli/options.md#pruning-enable.md#pruning-enabled) option) is deprecated and will be removed in a future release. We recommend using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries) as an alternative for saving disk space.

:::

<Postman />

## `ADMIN` methods
Expand Down Expand Up @@ -6891,10 +6885,11 @@ The `TRACE` API methods are not enabled by default for JSON-RPC. To enable the `
Provides transaction processing of [type `trace`](../trace-types.md#trace) for the specified block.
:::tip
Your node must be an archive node (that is, synchronized without pruning or fast sync) or the requested block must be within the number of [blocks retained](../cli/options.md#pruning-blocks-retained) with [pruning enabled](../cli/options.md#pruning-enabled) (by default, 1024).
:::info note
Your node must be an [archive node](../../get-started/connect/sync-node.md#run-an-archive-node), or
the requested block must be within the number of
[blocks retained](../cli/options.md#bonsai-historical-block-limit) when using
[Bonsai](../../concepts/data-storage-formats.md#bonsai-tries) (by default, 512 from the head of the chain).
:::
#### Parameters
Expand Down Expand Up @@ -6999,10 +6994,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"i
Executes the given call and returns a number of possible traces for it.
:::info
The requested transaction must be contained in a block within the number of [blocks retained](../cli/options.md#pruning-blocks-retained) with [pruning enabled](../cli/options.md#pruning-enabled) (by default, 1024).
:::info note
When using [Bonsai](../../concepts/data-storage-formats.md#bonsai-tries), the requested block must
be within the number of [blocks retained](../cli/options.md#bonsai-historical-block-limit) (by
default, 512 from the head of the chain).
:::
#### Parameters
Expand Down Expand Up @@ -7097,10 +7092,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"trace_call","params":[{"from":"0
Performs multiple call traces on top of the same block. You can trace dependent transactions.
:::info
The requested block must be within the number of [blocks retained](../cli/options.md#pruning-blocks-retained) with [pruning enabled](../cli/options.md#pruning-enabled) (by default, 1024).
:::info note
When using [Bonsai](../../concepts/data-storage-formats.md#bonsai-tries), the requested block must
be within the number of [blocks retained](../cli/options.md#bonsai-historical-block-limit) (by
default, 512 from the head of the chain).
:::
#### Parameters
Expand Down Expand Up @@ -7200,10 +7195,11 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"trace_callMany","params":[[[{"fr
Returns traces matching the specified filter. The maximum number of blocks you can supply to `trace_filter` is 1000 by default. You can adjust this limit using the [`--rpc-max-trace-filter-range`](../cli/options.md#rpc-max-trace-filter-range) option.
:::info
Your node must be an archive node (synchronized without pruning or fast sync), or the requested block must be within the number of [blocks retained](../cli/options.md#pruning-blocks-retained) with [pruning enabled](../cli/options.md#pruning-enabled) (by default, 1024).
:::info note
Your node must be an [archive node](../../get-started/connect/sync-node.md#run-an-archive-node), or
the requested blocks must be within the number of
[blocks retained](../cli/options.md#bonsai-historical-block-limit) when using
[Bonsai](../../concepts/data-storage-formats.md#bonsai-tries) (by default, 512 from the head of the chain).
:::
#### Parameters
Expand Down Expand Up @@ -7301,12 +7297,13 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBl
### `trace_get`
Returns trace at given position.
:::info
Your node must be an archive node (that is, synchronized without pruning or fast sync) or the requested transaction must be contained in a block within the number of [blocks retained](../cli/options.md#pruning-blocks-retained) with [pruning enabled](../cli/options.md#pruning-enabled) (by default, 1024).
Returns a trace at the given position.
:::info note
Your node must be an [archive node](../../get-started/connect/sync-node.md#run-an-archive-node), or
the requested transaction must be contained in a block within the number of
[blocks retained](../cli/options.md#bonsai-historical-block-limit) when using
[Bonsai](../../concepts/data-storage-formats.md#bonsai-tries) (by default, 512 from the head of the chain).
:::
#### Parameters
Expand Down Expand Up @@ -7382,10 +7379,11 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"trace_get","params":["0x17104ac9
Traces a call to `eth_sendRawTransaction` without making the call, returning the traces.
:::info
The requested transaction must be contained in a block within the number of [blocks retained](../cli/options.md#pruning-blocks-retained) with [pruning enabled](../cli/options.md#pruning-enabled) (by default, 1024).
:::info note
When using [Bonsai](../../concepts/data-storage-formats.md#bonsai-tries), the requested transaction
must be contained in a block within the number of
[blocks retained](../cli/options.md#bonsai-historical-block-limit) (by default, 512 from the head of
the chain).
:::
#### Parameters
Expand Down Expand Up @@ -7454,18 +7452,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"trace_rawTransaction","params":[
Provides transaction processing tracing per block.
:::caution Forest pruning deprecation notice
Forest pruning (using the [`--pruning-enabled`](../cli/options.md#pruning-enabled) option) is deprecated and will be removed in a future release. We recommend using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries) as an alternative for saving disk space.
:::
:::info
When using [Bonsai](../../concepts/data-storage-formats.md#bonsai-tries), the requested block must be within the number of [blocks retained](../cli/options.md#bonsai-historical-block-limit) (by default, 512 from the head of the chain).
When using [Forest](../../concepts/data-storage-formats.md#forest-of-tries), the requested block must be within the number of [blocks retained](../cli/options.md#pruning-blocks-retained) with [pruning enabled](../cli/options.md#pruning-enabled) (by default, 1024 from head of the chain).
:::info note
When using [Bonsai](../../concepts/data-storage-formats.md#bonsai-tries), the requested block must
be within the number of [blocks retained](../cli/options.md#bonsai-historical-block-limit) (by
default, 512 from the head of the chain).
:::
#### Parameters
Expand Down Expand Up @@ -7586,10 +7576,11 @@ curl -X POST --data '{"jsonrpc": "2.0", "method": "trace_replayBlockTransactions
Provides transaction processing of [type `trace`](../trace-types.md#trace) for the specified transaction.
:::info
Your node must be an archive node (that is, synchronized without pruning or fast sync) or the requested transaction must be contained in a block within the number of [blocks retained](../cli/options.md#pruning-blocks-retained) with [pruning enabled](../cli/options.md#pruning-enabled) (by default, 1024).
:::info note
Your node must be an [archive node](../../get-started/connect/sync-node.md#run-an-archive-node), or
the requested transaction must be contained in a block within the number of
[blocks retained](../cli/options.md#bonsai-historical-block-limit) when using
[Bonsai](../../concepts/data-storage-formats.md#bonsai-tries) (by default, 512 from the head of the chain).
:::
#### Parameters
Expand Down
144 changes: 0 additions & 144 deletions docs/public-networks/reference/cli/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2759,150 +2759,6 @@ Possible values are:
- [`staker`](../../how-to/use-configuration-file/profile.md#staker-profile)
- [`enterprise` or `private`](../../how-to/use-configuration-file/profile.md#enterpriseprivate-profile) (aliases for the same profile)

### `pruning-block-confirmations`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
--pruning-block-confirmations=<INTEGER>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--pruning-block-confirmations=5
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_PRUNING_BLOCK_CONFIRMATIONS=5
```

</TabItem>

<TabItem value="Configuration file" label="Configuration file">

```bash
pruning-block-confirmations=5
```

</TabItem>

</Tabs>

The minimum number of confirmations on a block before marking of newly-stored or in-use state trie nodes that cannot be pruned. The default is 10.

:::info

Using pruning with [private transactions](../../../private-networks/concepts/privacy/index.md) is not supported.

:::

### `pruning-blocks-retained`

<Tabs>

<TabItem value="Syntax" label="Syntax" default>

```bash
--pruning-blocks-retained=<INTEGER>
```

</TabItem>

<TabItem value="Example" label="Example">

```bash
--pruning-blocks-retained=10000
```

</TabItem>

<TabItem value="Environment variable" label="Environment variable">

```bash
BESU_PRUNING_BLOCKS_RETAINED=10000
```

</TabItem>

<TabItem value="Configuration file" label="Configuration file">

```bash
pruning-blocks-retained=10000
```

</TabItem>

</Tabs>

The minimum number of recent blocks to keep the entire world state for. The default is 1024.

:::info

Using pruning with [private transactions](../../../private-networks/concepts/privacy/index.md) isn't supported.
:::
### `pruning-enabled`
<Tabs>
<TabItem value="Syntax" label="Syntax" default>
```bash
--pruning-enabled
```
</TabItem>
<TabItem value="Example" label="Example">
```bash
--pruning-enabled=true
```
</TabItem>
<TabItem value="Environment variable" label="Environment variable">
```bash
BESU_PRUNING_ENABLED=true
```
</TabItem>
<TabItem value="Configuration file" label="Configuration file">
```bash
pruning-enabled=true
```
</TabItem>
</Tabs>
Enables [pruning](../../concepts/data-storage-formats.md#pruning) to reduce storage required for the world state. The default is `false`.
:::info
Using pruning with [private transactions](../../../private-networks/concepts/privacy/index.md) isn't supported.

:::

:::caution

This option is deprecated and will be removed in a future release. We recommend using [Bonsai Tries](../../concepts/data-storage-formats.md#bonsai-tries) as an alternative for saving disk space.

:::

### `random-peer-priority-enabled`

<Tabs>
Expand Down

0 comments on commit 911b412

Please sign in to comment.