Skip to content

Commit dc6402b

Browse files
author
Dark-Brain07
committed
docs(geth): enhance README with troubleshooting section and fix formatting
- Fix markdown code block formatting (replace escaped backticks) - Add comprehensive troubleshooting section covering: - Slow sync performance issues - High memory usage solutions - Peer connection troubleshooting - Engine API authentication errors - Add peer connectivity configuration documentation - Add state scheme configuration section - Add unprotected transactions configuration - Add link to op-geth documentation
1 parent 15d5790 commit dc6402b

File tree

1 file changed

+80
-19
lines changed

1 file changed

+80
-19
lines changed

geth/README.md

Lines changed: 80 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,46 @@ This is an implementation of the op-geth (optimism-geth) node setup for running
1414

1515
## Configuration
1616

17-
The Geth client is configured through environment variables in .env.mainnet or .env.sepolia. Key settings include:
17+
The Geth client is configured through environment variables in `.env.mainnet` or `.env.sepolia`. Key settings include:
1818

1919
### Cache Settings
2020

2121
Optimize cache allocation based on your available RAM:
2222

2323
| Setting | Default | Description |
2424
|---------|---------|-------------|
25-
| GETH_CACHE | 20480 | Total cache allocation in MB (20GB default) |
26-
| GETH_CACHE_DATABASE | 20 | Percentage allocated to database cache |
27-
| GETH_CACHE_GC | 12 | Percentage allocated to garbage collection |
28-
| GETH_CACHE_SNAPSHOT | 24 | Percentage allocated to snapshot cache |
29-
| GETH_CACHE_TRIE | 44 | Percentage allocated to trie cache |
25+
| `GETH_CACHE` | 20480 | Total cache allocation in MB (20GB default) |
26+
| `GETH_CACHE_DATABASE` | 20 | Percentage allocated to database cache |
27+
| `GETH_CACHE_GC` | 12 | Percentage allocated to garbage collection |
28+
| `GETH_CACHE_SNAPSHOT` | 24 | Percentage allocated to snapshot cache |
29+
| `GETH_CACHE_TRIE` | 44 | Percentage allocated to trie cache |
3030

3131
### Sync Modes
3232

3333
| Mode | Environment Variable | Description |
3434
|------|---------------------|-------------|
35-
| Full Sync | OP_GETH_SYNCMODE=full | Download and verify all blocks (default) |
36-
| Snap Sync | OP_GETH_SYNCMODE=snap | Faster initial sync (experimental) |
35+
| Full Sync | `OP_GETH_SYNCMODE=full` | Download and verify all blocks (default) |
36+
| Snap Sync | `OP_GETH_SYNCMODE=snap` | Faster initial sync (experimental) |
3737

3838
### Network Modes
3939

4040
| Mode | Environment Variable | Description |
4141
|------|---------------------|-------------|
42-
| Full | OP_GETH_GCMODE=full | Standard full node operation |
43-
| Archive | OP_GETH_GCMODE=archive | Retain all historical states |
42+
| Full | `OP_GETH_GCMODE=full` | Standard full node operation |
43+
| Archive | `OP_GETH_GCMODE=archive` | Retain all historical states |
4444

4545
## Running the Node
4646

47-
The node follows the standard docker-compose workflow in the master README:
47+
The node follows the standard `docker-compose` workflow in the master README:
4848

49-
\\\ash
49+
```bash
5050
# Run Geth node (default when no CLIENT is specified)
5151
docker-compose up
5252

5353
# Or explicitly specify Geth
5454
CLIENT=geth docker-compose up
55-
\\\`n
55+
```
56+
5657
## Exposed Ports
5758

5859
| Port | Protocol | Description |
@@ -67,25 +68,85 @@ CLIENT=geth docker-compose up
6768

6869
### EthStats Monitoring
6970

70-
Enable node monitoring by uncommenting in your .env file:
71+
Enable node monitoring by uncommenting in your `.env` file:
7172

72-
\\\ash
73+
```bash
7374
OP_GETH_ETH_STATS=nodename:secret@host:port
74-
\\\`n
75+
```
76+
7577
### Snap Sync (Experimental)
7678

7779
For faster initial sync, enable snap sync by uncommenting the bootnode configuration and setting sync mode:
7880

79-
\\\ash
81+
```bash
8082
OP_GETH_SYNCMODE=snap
8183
OP_GETH_BOOTNODES=enode://...
82-
\\\`n
84+
```
85+
8386
> [!WARNING]
8487
> Snap sync is experimental and may lead to syncing issues. Use with caution in production environments.
8588
89+
### Peer Connectivity
90+
91+
To improve peer connectivity, you can configure your external IP address in the `geth-entrypoint` script and ensure port 30303 is open on your firewall:
92+
93+
```bash
94+
HOST_IP="your.external.ip.address"
95+
```
96+
97+
### State Scheme Configuration
98+
99+
Configure the state storage scheme:
100+
101+
```bash
102+
OP_GETH_STATE_SCHEME=hash # or 'path' for path-based storage
103+
```
104+
105+
### Unprotected Transactions
106+
107+
Allow unprotected (non-EIP-155) transactions if needed:
108+
109+
```bash
110+
OP_GETH_ALLOW_UNPROTECTED_TXS=true
111+
```
112+
113+
## Troubleshooting
114+
115+
### Common Issues
116+
117+
#### Slow Sync Performance
118+
119+
If experiencing slow sync performance:
120+
- Verify network bandwidth is sufficient (recommend 100+ Mbps)
121+
- Consider using snap sync with bootnodes for initial sync
122+
- Check L1 RPC rate limits and connection stability
123+
- Ensure NVMe storage is properly configured
124+
125+
#### High Memory Usage
126+
127+
Geth may consume significant memory during operation:
128+
- Adjust cache settings based on available RAM
129+
- Reduce `GETH_CACHE` value if experiencing OOM errors
130+
- Monitor with `--metrics` endpoint on port 6060
131+
132+
#### Peer Connection Issues
133+
134+
If the node has difficulty finding peers:
135+
- Ensure port 30303 (TCP/UDP) is open
136+
- Configure `HOST_IP` with your external IP address
137+
- Check that bootnodes are reachable
138+
139+
#### Engine API Authentication Errors
140+
141+
If seeing JWT authentication errors:
142+
- Verify `OP_NODE_L2_ENGINE_AUTH` is correctly set
143+
- Ensure the JWT secret matches between op-node and geth
144+
- Check file permissions on the JWT secret file
145+
86146
## Additional RPC Methods
87147

88148
For a complete list of supported RPC methods, refer to:
89149

90150
- [Standard Ethereum JSON-RPC](https://ethereum.org/en/developers/docs/apis/json-rpc/)
91-
- [Geth RPC Documentation](https://geth.ethereum.org/docs/rpc/server)
151+
- [Geth RPC Documentation](https://geth.ethereum.org/docs/rpc/server)
152+
- [op-geth Documentation](https://github.com/ethereum-optimism/op-geth)

0 commit comments

Comments
 (0)