Skip to content

Commit

Permalink
Add --cache-last-block flag
Browse files Browse the repository at this point in the history
Signed-off-by: Joan E <153745173+joaniefromtheblock@users.noreply.github.com>
joaniekube authored Jun 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 9ba1451 commit 024a6eb
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/public-networks/reference/cli/options.md
Original file line number Diff line number Diff line change
@@ -408,6 +408,48 @@ When connecting to Mainnet or public testnets, the default is a predefined list

In private networks defined using [`--genesis-file`](#genesis-file) or when using [`--network=dev`](#network), the default is an empty list of bootnodes.

### `cache-last-blocks`

<Tabs>

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

```bash
--cache-last-blocks=<INTEGER>
```

</TabItem>

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

```bash
--cache-last-blocks=2048
```

</TabItem>

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

```bash
CACHE_LAST_BLOCKS=2048
```

</TabItem>

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

```bash
cache-last-blocks=2048
```

</TabItem>

</Tabs>

Configures the number of recent blocks to cache, significantly improving the performance of several RPC calls.
This caching significantly improves the performance of several RPC calls, particularly [`eth_getBlockByNumber`](../api/index.md#eth_getBlockByNumber), [`eth_getBlockByHash`](../api/index.md#eth_getBlockByHash), [`eth_getTransactionReceipt`](../api/index.md#getTransactionReceipt), and especially [`eth_feeHistory`](../api/index.md#eth_feeHistory).
The default is `0`.

### `color-enabled`

<Tabs>

0 comments on commit 024a6eb

Please sign in to comment.