Skip to content

Commit a595f0f

Browse files
committed
update docs
1 parent f40acff commit a595f0f

2 files changed

Lines changed: 13 additions & 15 deletions

File tree

reth/README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
# Running a Reth Node
22

3-
This is a unified implementation of the Reth node setup that supports running both OP Reth and Base Reth with Flashblocks support.
3+
This is a unified implementation of the Reth node setup that switches between vanilla mode and Flashblocks mode based on configuration.
44

55
## Setup
66

77
- See hardware requirements mentioned in the master README
8-
- For Base Reth mode: Access to a Flashblocks websocket endpoint (for `RETH_FB_WEBSOCKET_URL`)
8+
- For Flashblocks mode: Access to a Flashblocks websocket endpoint (for `RETH_FB_WEBSOCKET_URL`)
99
- We provide public websocket endpoints for mainnet and devnet, included in `.env.mainnet` and `.env.sepolia`
1010

1111
## Node Type Selection
1212

13-
Use the `NODE_TYPE` environment variable to select the implementation:
13+
The node determines its mode based on the presence of the `RETH_FB_WEBSOCKET_URL` environment variable:
1414

15-
- `NODE_TYPE=vanilla` - OP Reth implementation (default)
16-
- `NODE_TYPE=base` - Base L2 Reth implementation with Flashblocks support
15+
- **Vanilla Mode** (default): When no `RETH_FB_WEBSOCKET_URL` is provided.
16+
- **Flashblocks Mode**: When `RETH_FB_WEBSOCKET_URL` is provided.
1717

1818
## Running the Node
1919

2020
The node follows the standard `docker-compose` workflow in the master README.
2121

2222
```bash
23-
# Run OP Reth node
23+
# To run Reth node with Flashblocks support, set RETH_FB_WEBSOCKET_URL in your .env file
2424
CLIENT=reth docker-compose up
25-
26-
# Run Base L2 Reth node with Flashblocks support
27-
NODE_TYPE=base CLIENT=reth docker-compose up
2825
```
2926

3027
## Testing Flashblocks RPC Methods
3128

32-
When running in Base mode (`NODE_TYPE=base`), you can query a pending block using the Flashblocks RPC:
29+
When running in Flashblocks mode (with `RETH_FB_WEBSOCKET_URL` configured), you can query a pending block using the Flashblocks RPC:
3330

3431
```bash
3532
curl -X POST \
@@ -42,4 +39,4 @@ curl -X POST \
4239
For a complete list of supported RPC methods, refer to:
4340

4441
- [Standard Ethereum JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/)
45-
- [Flashblocks RPC Methods](https://docs.base.org/chain/flashblocks#rpc-api) (Base mode only)
42+
- [Flashblocks RPC Methods](https://docs.base.org/chain/flashblocks#rpc-api) (Flashblocks mode only)

reth/reth-entrypoint

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@ METRICS_PORT="${METRICS_PORT:-6060}"
1010
DISCOVERY_PORT="${DISCOVERY_PORT:-30303}"
1111
P2P_PORT="${P2P_PORT:-30303}"
1212
ADDITIONAL_ARGS=""
13-
NODE_TYPE="${NODE_TYPE:-base}"
1413
BINARY="./base-reth-node"
1514

1615
if [[ -z "${RETH_CHAIN:-}" ]]; then
1716
echo "expected RETH_CHAIN to be set" 1>&2
1817
exit 1
1918
fi
2019

21-
# Add Flashblocks support for base mode
22-
if [[ "$NODE_TYPE" == "base" && -n "${RETH_FB_WEBSOCKET_URL:-}" ]]; then
20+
# Enable Flashblocks support if websocket URL is provided
21+
if [[ -n "${RETH_FB_WEBSOCKET_URL:-}" ]]; then
2322
ADDITIONAL_ARGS="--websocket-url=$RETH_FB_WEBSOCKET_URL"
2423
echo "Enabling Flashblocks support with endpoint: $RETH_FB_WEBSOCKET_URL"
24+
else
25+
echo "Running in vanilla node mode (no Flashblocks URL provided)"
2526
fi
2627

2728
# Add pruning for base
28-
if [[ "$NODE_TYPE" == "base" && "${RETH_PRUNING_ARGS+x}" = x ]]; then
29+
if [[ "${RETH_PRUNING_ARGS+x}" = x ]]; then
2930
echo "Adding pruning arguments: $RETH_PRUNING_ARGS"
3031
ADDITIONAL_ARGS="$ADDITIONAL_ARGS $RETH_PRUNING_ARGS"
3132
fi

0 commit comments

Comments
 (0)