Skip to content

Commit

Permalink
Add --cache-last-block flag (#1614)
Browse files Browse the repository at this point in the history
* Add `--cache-last-block` flag 

Signed-off-by: Joan E <[email protected]>

* apply suggestion

Signed-off-by: Joan E <[email protected]>

---------

Signed-off-by: Joan E <[email protected]>
  • Loading branch information
joaniefromtheblock authored Jun 12, 2024
1 parent 0edd6e8 commit fd76777
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
Expand Up @@ -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>

The number of recent blocks to cache.
Using this option can improve the performance of several RPC calls including: [`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>
Expand Down

0 comments on commit fd76777

Please sign in to comment.