diff --git a/docs/base-chain/node-operators/run-a-base-node.mdx b/docs/base-chain/node-operators/run-a-base-node.mdx index 44ba1b7e6..8c79ebd00 100644 --- a/docs/base-chain/node-operators/run-a-base-node.mdx +++ b/docs/base-chain/node-operators/run-a-base-node.mdx @@ -149,3 +149,36 @@ A successful response will include block data from the latest Flashblock. If Fla ### Available RPC Methods 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. + +## Enable Historical Proofs RPCs + +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. + +In order to run the historical proofs ExEx, you simply need to set this environment variable: + +```bash Terminal +RETH_HISTORICAL_PROOFS=true +``` + +When the node starts up for the first time, it will backfill existing state to the new proofs database in `/proofs`. This process can take a while (24-48 hours for mainnet). + +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. + + +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. + +By default, the ExEx saves 28 days of blocks, but you can customize this by setting `RETH_PROOFS_HISTORY_WINDOW=`. + + +### Improving Performance + +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. + +To fix this, you can run `base-consensus` in follow mode so it stays within 512 blocks of the proofs ExEx. + +```bash Terminal +BASE_NODE_SOURCE_L2_RPC= +BASE_NODE_PROOFS=true +``` + +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. diff --git a/docs/base-chain/node-operators/snapshots.mdx b/docs/base-chain/node-operators/snapshots.mdx index 956c38d6b..46669f537 100644 --- a/docs/base-chain/node-operators/snapshots.mdx +++ b/docs/base-chain/node-operators/snapshots.mdx @@ -61,3 +61,14 @@ These steps assume you are in the cloned `node` directory (the one containing `d Your node should begin syncing from the last block in the snapshot. 6. **Verify and Clean Up**: Monitor the node logs (`docker compose logs -f `) 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. + +## Proofs Snapshots + +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. + +| Network | Download Command (`wget …`) | +| ------- | --------------------------- | +| Testnet | `wget -c https://sepolia-reth-proofs-snapshots.base.org/$(curl https://sepolia-reth-proofs-snapshots.base.org/latest)` | +| Mainnet | `wget -c https://mainnet-reth-proofs-snapshots.base.org/$(curl https://mainnet-reth-proofs-snapshots.base.org/latest)` | + +The restore process is the same as above — follow the [Restoring from Snapshot](#restoring-from-snapshot) steps using this archive instead. diff --git a/docs/docs.json b/docs/docs.json index 326c27bde..63bbd0425 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -9,21 +9,14 @@ }, "favicon": "/logo/favicon.png", "contextual": { - "options": [ - "copy", - "view", - "claude", - "chatgpt" - ] + "options": ["copy", "view", "claude", "chatgpt"] }, "api": { "playground": { "display": "simple" }, "examples": { - "languages": [ - "javascript" - ] + "languages": ["javascript"] } }, "seo": { @@ -39,9 +32,7 @@ "groups": [ { "group": "Introduction", - "pages": [ - "get-started/base" - ] + "pages": ["get-started/base"] }, { "group": "Quickstart", @@ -255,9 +246,7 @@ "groups": [ { "group": "Introduction", - "pages": [ - "base-account/overview/what-is-base-account" - ] + "pages": ["base-account/overview/what-is-base-account"] }, { "group": "Quickstart", @@ -493,9 +482,7 @@ "groups": [ { "group": "Overview", - "pages": [ - "ai-agents/index" - ] + "pages": ["ai-agents/index"] }, { "group": "Quickstart", @@ -569,15 +556,11 @@ }, { "group": "Growth", - "pages": [ - "apps/growth/rewards" - ] + "pages": ["apps/growth/rewards"] }, { "group": "Notifications", - "pages": [ - "apps/technical-guides/base-notifications" - ] + "pages": ["apps/technical-guides/base-notifications"] }, { "group": "Builder Codes", @@ -595,9 +578,7 @@ "groups": [ { "group": "Getting Started", - "pages": [ - "onchainkit/migrate-from-onchainkit" - ] + "pages": ["onchainkit/migrate-from-onchainkit"] } ] } @@ -2940,4 +2921,4 @@ "measurementId": "G-TKCM02YFWN" } } -} \ No newline at end of file +}