Skip to content

Commit b0164c9

Browse files
committed
feat: add historical proofs instructions
1 parent d959e2d commit b0164c9

File tree

3 files changed

+53
-28
lines changed

3 files changed

+53
-28
lines changed

docs/base-chain/node-operators/run-a-base-node.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,36 @@ A successful response will include block data from the latest Flashblock. If Fla
149149
### Available RPC Methods
150150

151151
Your Flashblocks-aware node supports all standard Ethereum JSON-RPC methods plus Flashblocks-specific methods and WebSocket subscriptions. See the [Flashblocks API Reference](/base-chain/api-reference/flashblocks-api/flashblocks-api-overview) for the full list, including code examples and parameter details.
152+
153+
## Enable Historical Proofs RPCs
154+
155+
To serve methods like `eth_getProof`, `debug_executionWitness` and `debug_executePayload` efficiently, you'll need to set up the historical proofs execution extension (ExEx). This ExEx manages a separate database with data required to serve these methods. This database can add hundreds of GB of additional storage and requires a machine with higher I/O throughput. Most people do not need these RPCs to be available.
156+
157+
In order to run the historical proofs ExEx, you simply need to set this environment variable:
158+
159+
```bash Terminal
160+
RETH_HISTORICAL_PROOFS=true
161+
```
162+
163+
When the node starts up for the first time, it will backfill existing state to the new proofs database in `<datadir>/proofs`. This process can take a while (24-48 hours for mainnet).
164+
165+
To skip the backfill, snapshots of the proofs database are available. See the [Snapshots](/base-chain/node-operators/snapshots#proofs-snapshots) page for download instructions.
166+
167+
<Note>
168+
The block at which the ExEx first starts will be the earliest block for which these RPCs are available. The flag `--rpc.eth-proof-window` is ignored when the proofs ExEx is enabled.
169+
170+
By default, the ExEx saves 28 days of blocks, but you can customize this by setting `RETH_PROOFS_HISTORY_WINDOW=<num_blocks>`.
171+
</Note>
172+
173+
### Improving Performance
174+
175+
The proofs ExEx performs best when it is within 1024 blocks of the chain tip. This means when syncing up to tip, performance can be degraded. During initial sync on Base Mainnet, the ExEx may fall too far behind to catch up on its own.
176+
177+
To fix this, you can run `base-consensus` in follow mode so it stays within 512 blocks of the proofs ExEx.
178+
179+
```bash Terminal
180+
BASE_NODE_SOURCE_L2_RPC=<trusted_rpc>
181+
BASE_NODE_PROOFS=true
182+
```
183+
184+
You can verify that the proofs ExEx is syncing efficiently by checking that the state root and execution durations are 0. The ExEx is not executing blocks in this case; instead it's just writing data from executed blocks to disk.

docs/base-chain/node-operators/snapshots.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,14 @@ These steps assume you are in the cloned `node` directory (the one containing `d
6161
Your node should begin syncing from the last block in the snapshot.
6262

6363
6. **Verify and Clean Up**: Monitor the node logs (`docker compose logs -f <service_name>`) or use the [sync monitoring](/base-chain/node-operators/run-a-base-node#syncing) command to ensure the node starts syncing from the snapshot's block height. Once confirmed, you can safely delete the downloaded snapshot archive (`.tar.gz` file) to free up disk space.
64+
65+
## Proofs Snapshots
66+
67+
If you are running the [historical proofs ExEx](/base-chain/node-operators/run-a-base-node#enable-historical-proofs-rpcs), snapshots of the proofs database are available to skip the 24-48 hour backfill.
68+
69+
| Network | Download Command (`wget …`) |
70+
| ------- | --------------------------- |
71+
| Testnet | `wget -c https://sepolia-reth-proofs-snapshots.base.org/$(curl https://sepolia-reth-proofs-snapshots.base.org/latest)` |
72+
| Mainnet | `wget -c https://mainnet-reth-proofs-snapshots.base.org/$(curl https://mainnet-reth-proofs-snapshots.base.org/latest)` |
73+
74+
The restore process is the same as above — follow the [Restoring from Snapshot](#restoring-from-snapshot) steps using this archive instead.

docs/docs.json

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,14 @@
99
},
1010
"favicon": "/logo/favicon.png",
1111
"contextual": {
12-
"options": [
13-
"copy",
14-
"view",
15-
"claude",
16-
"chatgpt"
17-
]
12+
"options": ["copy", "view", "claude", "chatgpt"]
1813
},
1914
"api": {
2015
"playground": {
2116
"display": "simple"
2217
},
2318
"examples": {
24-
"languages": [
25-
"javascript"
26-
]
19+
"languages": ["javascript"]
2720
}
2821
},
2922
"seo": {
@@ -39,9 +32,7 @@
3932
"groups": [
4033
{
4134
"group": "Introduction",
42-
"pages": [
43-
"get-started/base"
44-
]
35+
"pages": ["get-started/base"]
4536
},
4637
{
4738
"group": "Quickstart",
@@ -255,9 +246,7 @@
255246
"groups": [
256247
{
257248
"group": "Introduction",
258-
"pages": [
259-
"base-account/overview/what-is-base-account"
260-
]
249+
"pages": ["base-account/overview/what-is-base-account"]
261250
},
262251
{
263252
"group": "Quickstart",
@@ -493,9 +482,7 @@
493482
"groups": [
494483
{
495484
"group": "Overview",
496-
"pages": [
497-
"ai-agents/index"
498-
]
485+
"pages": ["ai-agents/index"]
499486
},
500487
{
501488
"group": "Quickstart",
@@ -569,15 +556,11 @@
569556
},
570557
{
571558
"group": "Growth",
572-
"pages": [
573-
"apps/growth/rewards"
574-
]
559+
"pages": ["apps/growth/rewards"]
575560
},
576561
{
577562
"group": "Notifications",
578-
"pages": [
579-
"apps/technical-guides/base-notifications"
580-
]
563+
"pages": ["apps/technical-guides/base-notifications"]
581564
},
582565
{
583566
"group": "Builder Codes",
@@ -595,9 +578,7 @@
595578
"groups": [
596579
{
597580
"group": "Getting Started",
598-
"pages": [
599-
"onchainkit/migrate-from-onchainkit"
600-
]
581+
"pages": ["onchainkit/migrate-from-onchainkit"]
601582
}
602583
]
603584
}
@@ -2940,4 +2921,4 @@
29402921
"measurementId": "G-TKCM02YFWN"
29412922
}
29422923
}
2943-
}
2924+
}

0 commit comments

Comments
 (0)