Compare commits
417 Commits
32b09c75f4
...
issue-593
| Author | SHA1 | Date | |
|---|---|---|---|
| 288d9dcbdf | |||
| 9fa0917326 | |||
| e97a63832d | |||
| 1743d869a8 | |||
| fc4ce97aee | |||
| 5533fcc5e3 | |||
| f843c4eb99 | |||
| a27fbfd5d6 | |||
| 0a711cf868 | |||
| fa5bfd2e97 | |||
| b929939205 | |||
| 75326c3528 | |||
| 5693ddd469 | |||
| 8c30d2c7fa | |||
| 41e2f83926 | |||
| 3fa32c9f94 | |||
| 3500ebefbb | |||
| ee3fbd39e4 | |||
| eb1b37d5c0 | |||
| ba03444493 | |||
| 915192acc5 | |||
| fd27c9633b | |||
|
|
52b1201388 | ||
| dd8ce689e4 | |||
| 9bf8fb51ab | |||
| afafaea429 | |||
| d7ff81b9aa | |||
| 14dfd52da5 | |||
|
|
0785ee5482 | ||
| c28bab03e2 | |||
| cd216609bc | |||
| cf35b08a4e | |||
| fb0ba537ec | |||
| 120c070a1e | |||
| d2c2de7341 | |||
| d9d8920752 | |||
| 1758c921d7 | |||
| f7b585307e | |||
| 39df507eee | |||
| 9e666ca476 | |||
| f713744bb8 | |||
| 377d3af961 | |||
|
|
a54459e55f | ||
| 25b0ab049c | |||
| 8471404897 | |||
| 39d2fa93e2 | |||
| fb3dc6214c | |||
| 9fc368f405 | |||
| 6ce0fc2346 | |||
| 7ce0428db4 | |||
| b72cf641a9 | |||
| 5891d050f9 | |||
| 196744cf4f | |||
| 4dd902e9af | |||
| a7e9d4a65d | |||
|
|
8c46b66bdc | ||
| ee21a0245e | |||
| 65695472f1 | |||
| bda550eef6 | |||
| 59ff415fdb | |||
| efcb1f451a | |||
| ee13d0dd23 | |||
| 6d8920d659 | |||
|
|
5076c90a12 | ||
| bcdd950eb6 | |||
| a17a21b55f | |||
| aefcd41a88 | |||
| 9ee59cf9fa | |||
| 9ad7565f97 | |||
|
|
30e866802a | ||
| c56542ade0 | |||
| e9ed1c0cd3 | |||
| a3a78cb3be | |||
| 7d00f3a1ce | |||
| 6bb0b19f45 | |||
| 6ddb18dbc5 | |||
| 27d0ea0d28 | |||
| 1944662053 | |||
| fc03d6ddf6 | |||
| 4ea0bed344 | |||
| f4b42ff530 | |||
| 9921391cfa | |||
| cd7f05997b | |||
| 5fda0b60bc | |||
| fe94f3b605 | |||
| 9ce0e14cd6 | |||
| 941a0aa691 | |||
| d48713cb15 | |||
| a5081013f3 | |||
| 6d65582af4 | |||
| 2761625c15 | |||
| 1134a3774a | |||
| df6c17f5cc | |||
| 577ac5d7f2 | |||
| 677a98d9bd | |||
| fd283122f5 | |||
| 95f9da1e73 | |||
| fbd498aaa2 | |||
| ad56365253 | |||
| c07fb81a56 | |||
| 576530e68f | |||
| b4922e7fd3 | |||
| 48683cabba | |||
| 814afc05af | |||
| 68d77df969 | |||
| 0df57827f2 | |||
| e8dafa1383 | |||
| fc0bd40523 | |||
| 55433a4822 | |||
| 0c67fe451b | |||
| 71345092f9 | |||
| 78c78f5079 | |||
| 9566a6d23f | |||
| 2adce4cf5a | |||
| f4ce85bbcd | |||
| 535f51bda2 | |||
| fa3f96382c | |||
| 237ec1d2e1 | |||
| 110c3483cd | |||
| 0838787aa8 | |||
| be54c7d7cd | |||
| ec702984f1 | |||
| a032f3c9d6 | |||
| e68c802d7c | |||
| 450c9d7874 | |||
| 1afe87fe12 | |||
| b24c0f12dd | |||
| baf26b234f | |||
| 57b5757a85 | |||
| 6c110c08ed | |||
| b9efcfe34d | |||
| 3caa4ab873 | |||
| a9e8fba794 | |||
| 345538954d | |||
| f39e09dac0 | |||
| 3c4492179c | |||
| 2249352c20 | |||
| 16057e4875 | |||
| 36b8243a03 | |||
| 10deed7819 | |||
| 31309aaac3 | |||
| be1f8d33b9 | |||
| 4209d46ba7 | |||
| ff49dc92f5 | |||
| db59f360ca | |||
| 44783dfb16 | |||
| 84d119219c | |||
| 97d2cfe4aa | |||
| 9958d4e50d | |||
| c4a61bf35c | |||
| cb556f9df8 | |||
| 405f36d02f | |||
| 714e8ba07a | |||
| f5f475cdb1 | |||
| 4b0ce9ca69 | |||
| 83328a5ab5 | |||
|
|
12e5ff8ee1 | ||
|
|
87af562f1f | ||
|
|
6ec861bd60 | ||
|
|
e69a2b1202 | ||
| 2375dc3ef7 | |||
| c0416b4ae6 | |||
|
|
5fd86bdf28 | ||
|
|
1f7dd60483 | ||
| e9024c5c17 | |||
| 2e08acbe07 | |||
| ef88539ae6 | |||
| 241c52848b | |||
| eeb894d783 | |||
|
|
df8aeaefd1 | ||
|
|
86d0f53569 | ||
|
|
2a194909da | ||
|
|
4b03b4cdbc | ||
|
|
07e198c87d | ||
|
|
aa5ffb63b6 | ||
|
|
1aef140a9a | ||
|
|
eccae5039f | ||
|
|
0792d26756 | ||
|
|
6a4a30b55a | ||
|
|
d49e3814d5 | ||
|
|
91ef991773 | ||
|
|
d369f62c44 | ||
|
|
1390b47bb8 | ||
|
|
19739b5c34 | ||
|
|
49a3b5c8b7 | ||
|
|
bb3b54934d | ||
|
|
d5f755629f | ||
|
|
6e97a5e6f7 | ||
|
|
3b7b662564 | ||
|
|
3792c9a130 | ||
|
|
8d87ebb982 | ||
|
|
5b99762bd6 | ||
|
|
4bd8db226e | ||
|
|
b7c3683981 | ||
|
|
db7e8edb98 | ||
|
|
3f018e20d8 | ||
|
|
3247bfe5b1 | ||
|
|
e30ec1d62f | ||
|
|
19c01590d9 | ||
|
|
0f632a91f7 | ||
|
|
cffead2093 | ||
|
|
37cd50fbfb | ||
|
|
d2c140bc28 | ||
|
|
4fa3ab857b | ||
|
|
a2f4f86dbf | ||
|
|
3d8b2e26b9 | ||
|
|
1ad017b27c | ||
|
|
27e15523cd | ||
|
|
69c306da55 | ||
|
|
2ee964883f | ||
|
|
a233937bb9 | ||
|
|
f973ab6002 | ||
|
|
7505df8747 | ||
|
|
967b4bab25 | ||
|
|
486bf0b81a | ||
|
|
e6eb416f11 | ||
|
|
2c77800c94 | ||
|
|
d37af5387c | ||
|
|
0d593e6eb2 | ||
|
|
ed094dbe11 | ||
|
|
1bb1e3c8c3 | ||
|
|
b53a6a41b5 | ||
|
|
5fb687d6a3 | ||
|
|
9a2aedaf51 | ||
|
|
2efbc1d1b1 | ||
|
|
f6392cfe1c | ||
|
|
96e2c184eb | ||
|
|
d86bceec3b | ||
| 6daffd04df | |||
| e2b76be395 | |||
| 20aeedbc9c | |||
| 459e90e187 | |||
| 0c8b4089fc | |||
| e8a4d65c52 | |||
| a7ee7448d8 | |||
| 2e08603b67 | |||
| 76c441e2bb | |||
| 31de6192df | |||
| 705e79626c | |||
| 9d734b2825 | |||
| 55614918e4 | |||
| 0f0859844b | |||
|
|
0dc8aa8358 | ||
| 5e53cc33a0 | |||
| 8e3656a3f8 | |||
| dc8c73c264 | |||
| 3b97b1bc55 | |||
| 67c08fe6c9 | |||
| 7dc379dd05 | |||
| bbb6205cb4 | |||
| 53697cb40d | |||
| abb3c4b189 | |||
| bc95c7e1a6 | |||
| 4a62c8b243 | |||
| 97a3ce1db4 | |||
| f921cf4028 | |||
| 065c31dbb5 | |||
| f75470e2c1 | |||
| e8cc23ae26 | |||
| 5af2b5ace8 | |||
| e51d99c433 | |||
| c03cc74943 | |||
| 737ffdac32 | |||
| d0291932bc | |||
| 926a993129 | |||
| e232e6d625 | |||
|
|
1a3a607eda | ||
|
|
89cf3ab255 | ||
| fa05752e57 | |||
| 3606ba0f2b | |||
| cbf548df5b | |||
| 6a14b7abd4 | |||
| 3c591608f1 | |||
| b569c87930 | |||
| 42f845fa40 | |||
| 2c34c9e376 | |||
| 4e8fadb56a | |||
| 4f6c2b5fcd | |||
| aa5386cc0b | |||
| f51e0d4910 | |||
| 7fb3f08498 | |||
| ed051c2b46 | |||
| d5bfffecda | |||
| 21813cbdd0 | |||
| dcbbcf5cde | |||
| ec9d966f2f | |||
| a5210206a1 | |||
| 847c68a676 | |||
| ea1a05b49f | |||
| 4756813b30 | |||
| a455b28e04 | |||
| 58b4cf8aa1 | |||
| f1c0fab51c | |||
| 3546d79e75 | |||
|
|
c42f0e0f25 | ||
|
|
3db32fd356 | ||
|
|
4afa6d9854 | ||
|
|
44adaf52dd | ||
| 3bffde93d3 | |||
| 15eabc9e62 | |||
| 4aa653b29a | |||
| b05c8d41bc | |||
| dc65000d4b | |||
| 9fc1e2d95b | |||
| 0bbd716acf | |||
| 60b8cd5048 | |||
| 1cf7bd5651 | |||
| 9310b078e0 | |||
| ce20a16c79 | |||
| 9fd3047e18 | |||
|
|
5e106aea33 | ||
|
|
f2ac6cab05 | ||
| f3b40c9ef8 | |||
| dc977d47be | |||
| 5e040bcd4a | |||
| 71d48d0493 | |||
| 9abe6409ac | |||
| 2f84138733 | |||
| 40c457c370 | |||
| a955c5cd92 | |||
| 5dbea9f017 | |||
| 74e21ccf73 | |||
| e06da27b3e | |||
| c8017d9ea9 | |||
| e90198a831 | |||
| 4e307bcde5 | |||
| 44e7127a37 | |||
| 518c2ede2e | |||
|
|
12e197fffa | ||
|
|
1416f91636 | ||
| 69d178d79b | |||
| 63fd119d55 | |||
| 641c1d8fa1 | |||
| 4b24f7969f | |||
| 2f65975bcd | |||
| 400ea86d29 | |||
| 206109c2a3 | |||
| b74d521064 | |||
| 02976155d5 | |||
| a583d9cf8c | |||
|
|
22b4ecd042 | ||
|
|
4ae053438c | ||
|
|
0031e43550 | ||
| 7ef8301ccf | |||
| c8f96a3a39 | |||
| 413ca7ccd4 | |||
| f92f80abd0 | |||
| 67731beed0 | |||
| 9ce4b5cd0a | |||
| 433bb6f341 | |||
| 0aa4ad0aa2 | |||
| 1c033cf699 | |||
| 9c9523a031 | |||
|
|
158dc903df | ||
|
|
b7ec2ff084 | ||
| 6d97078f70 | |||
|
|
a30f2cbfe9 | ||
| 72c96bc8f9 | |||
| 1ba4ad97c5 | |||
| feffc2ab0a | |||
| f6f9d92171 | |||
|
|
e70f42196d | ||
| aa3ac10893 | |||
| 8094518094 | |||
| 124d19dbb6 | |||
| 6cb5b12ab0 | |||
| a09b33b7a0 | |||
| c35fdd0f15 | |||
| d814146f13 | |||
|
|
39648446a5 | ||
|
|
42d9d64dfa | ||
|
|
2ac216bdfe | ||
|
|
bf2f75d1cd | ||
|
|
376b1a750f | ||
|
|
eafbb2e2c3 | ||
|
|
10f429e743 | ||
|
|
a6e7348b40 | ||
|
|
3c20aac136 | ||
|
|
3c68c92ecc | ||
| 56d7772909 | |||
| 3517b98ef5 | |||
| 6bd7b35ae0 | |||
| 5687d74a62 | |||
| beacca7986 | |||
| 737a8e24a7 | |||
| 336adb68e6 | |||
| 1022f44959 | |||
| f174b0cc61 | |||
| 65919f6c01 | |||
| 73d376f589 | |||
| c6d33fde72 | |||
| 08e537ee71 | |||
| 6915a759d1 | |||
| a7661930be | |||
| 749ff64f8f | |||
| b7fe145fa5 | |||
| bd6083231f | |||
| 0a880c3f3f | |||
| 1987f07cf8 | |||
| a0f098de79 | |||
| 6fb1d76b13 | |||
| e136b0fc52 | |||
| 607dbe7020 | |||
| c2582b0b76 | |||
| ec2fb6c883 | |||
| d28342683c | |||
| 52d7ec6d40 | |||
| 6917005776 | |||
| 63b720f1e9 | |||
| db681b5a74 | |||
| 42a91a5bac | |||
| 8dfdaf3548 | |||
| 98e1c88293 | |||
| 5c0fb760cc | |||
| 004476216e | |||
| eee0a4092d | |||
| 662ecbfe5c |
729
CURSOR.md
Normal file
729
CURSOR.md
Normal file
@@ -0,0 +1,729 @@
|
|||||||
|
# VIBE.md — ethereum-rpc-docker Operations & Debugging Guide
|
||||||
|
|
||||||
|
You are an LLM agent or operator **running or debugging blockchain RPC nodes** from this
|
||||||
|
repository. This file is your **primary reference** for all operational tasks.
|
||||||
|
|
||||||
|
This repo contains Docker Compose configurations for blockchain RPC nodes plus operational
|
||||||
|
scripts for managing them. Everything you need to run, monitor, debug, and fix nodes is here.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. WHEN A NODE IS FAULTY — Start Here
|
||||||
|
|
||||||
|
### Immediate Triage (30 seconds)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Is the container running?
|
||||||
|
./show-running.sh
|
||||||
|
|
||||||
|
# 2. Check overall status of all configured nodes
|
||||||
|
./show-status.sh
|
||||||
|
|
||||||
|
# 3. If you know the config name, check its specific status
|
||||||
|
./sync-status.sh <config-name>
|
||||||
|
|
||||||
|
# 4. Check logs for the faulty node
|
||||||
|
./logs.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**If the container isn't running**, go to [§3. Container Lifecycle Issues](#3-container-lifecycle-issues)
|
||||||
|
|
||||||
|
**If the container is running but not synced**, go to [§4. Sync Issues](#4-sync-issues)
|
||||||
|
|
||||||
|
**If the container is running and synced but RPC fails**, go to [§5. RPC/Connectivity Issues](#5-rpcconnectivity-issues)
|
||||||
|
|
||||||
|
**If you see errors in logs but aren't sure what they mean**, go to [§6. Log Interpretation](#6-log-interpretation)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Repository Overview
|
||||||
|
|
||||||
|
### What This Repo Contains
|
||||||
|
|
||||||
|
```
|
||||||
|
rpc/
|
||||||
|
├── *.yml # Docker Compose files for node configurations
|
||||||
|
├── *.sh # Operational scripts (YOUR PRIMARY TOOLS)
|
||||||
|
├── scripts/ # Additional helper scripts (CometBFT support)
|
||||||
|
├── <network>/ # Network directories (e.g., ethereum/, op/, arb/)
|
||||||
|
│ ├── *.yml # Compose files for specific chains
|
||||||
|
│ └── <chain>/ # Chain-specific assets
|
||||||
|
│ ├── genesis.json # Custom genesis files
|
||||||
|
│ ├── rollup.json # Rollup configurations (OP Stack)
|
||||||
|
│ └── *.Dockerfile # Custom build files
|
||||||
|
├── README.md # User documentation
|
||||||
|
└── VIBE.md # THIS FILE — operations guide
|
||||||
|
```
|
||||||
|
|
||||||
|
### Key Concepts
|
||||||
|
|
||||||
|
- **Config name**: The compose filename WITHOUT `.yml` (e.g., `ethereum-mainnet-geth-pruned`)
|
||||||
|
- **Service name**: Derived from config name, used in `docker compose` commands
|
||||||
|
- **Short name**: Used in URL paths, container labels. Format: `{network}-{chain}[-{client}][-{db_type}]`
|
||||||
|
- **Volume names**: Docker volumes follow the full config name pattern
|
||||||
|
|
||||||
|
### Supported Networks
|
||||||
|
|
||||||
|
**Layer 1**: Ethereum, Polygon, BSC, Avalanche, Gnosis, Fantom, Core, Berachain, Ronin, Viction, Fuse, Tron, ThunderCore, Goat, AlephZero, Haqq, Taiko, Rootstock, Dogecoin, Litecoin, Bitcoin, Bitcoin-Cash, Ripple, Solana, Tron
|
||||||
|
|
||||||
|
**Layer 2 (OP Stack)**: Optimism, Base, Zora, Mode, Blast, Fraxtal, Bob, Boba, Worldchain, Metal, Ink, Lisk, SNAX, Celo
|
||||||
|
|
||||||
|
**Layer 2 (Arbitrum)**: Arbitrum One, Arbitrum Nova, Everclear, Playblock, Real, Connext, OpenCampusCodex
|
||||||
|
|
||||||
|
**Other L2s**: Linea, Scroll, zkSync Era, Metis, Moonbeam, Starknet, zkEVM, Immutable zkEVM, Polygon zkEVM
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Essential Scripts Reference
|
||||||
|
|
||||||
|
### Status & Monitoring Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `show-status.sh` | `[config-name]` | Lists ALL configured nodes with sync status, block height, health |
|
||||||
|
| `show-running.sh` | | Lists currently running containers |
|
||||||
|
| `sync-status.sh` | `<config-name>` | Detailed sync status for one config |
|
||||||
|
| `latest.sh` | `<config-name>` | Latest block number + hash |
|
||||||
|
| `logs.sh` | `<config-name>` | Tail logs from all containers in a config |
|
||||||
|
| `show-db-size.sh` | | Disk usage of ALL Docker volumes, sorted by size |
|
||||||
|
| `show-ram.sh` | `<config-name>` | Memory usage of containers |
|
||||||
|
| `show-cpu.sh` | | CPU usage display |
|
||||||
|
| `peer-count.sh` | | P2P peer count for all running nodes |
|
||||||
|
| `time-since-last-block.sh` | `<config-name>` | How long since last block was processed |
|
||||||
|
| `ping.sh` | `<container-name>` | Test network connectivity from container |
|
||||||
|
| `show-errors.sh` | | Show error counts/logs across containers |
|
||||||
|
| `show-size.sh` | | Show size of containers/volumes |
|
||||||
|
| `show-file-size.sh` | | Show static file sizes |
|
||||||
|
| `show-static-file-size.sh` | | Show static file sizes (alternative) |
|
||||||
|
|
||||||
|
### Lifecycle Management Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `start.sh` | `<config-name>` | Start all containers for a config |
|
||||||
|
| `stop.sh` | `<config-name>` | Stop all containers for a config |
|
||||||
|
| `force-recreate.sh` | `<config-name>` | Force recreate containers (keeps volumes) |
|
||||||
|
| `rm.sh` | `<config-name>` | Remove containers (keeps volumes) |
|
||||||
|
| `delete-volumes.sh` | `<config-name>` | **DESTRUCTIVE** - Remove containers AND volumes |
|
||||||
|
| `delete-node-keys.sh` | `<config-name>` | Remove node keys (for re-initialization) |
|
||||||
|
|
||||||
|
### Backup & Restore Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `backup-node.sh` | `<config-name> [url]` | Backup volumes locally or to WebDAV |
|
||||||
|
| `restore-volumes.sh` | `<config-name> [url]` | Restore volumes from local or HTTP |
|
||||||
|
| `clone-node.sh` | `<config-name>` | Clone a node's state |
|
||||||
|
| `clone-backup.sh` | | Clone backup files |
|
||||||
|
| `clone-peers.sh` | | Clone peer information |
|
||||||
|
| `restore-peers.sh` | | Restore peer connections |
|
||||||
|
| `list-backups.sh` | | List available backup files |
|
||||||
|
| `list-peer-backups.sh` | | List peer backup files |
|
||||||
|
| `list-restorable.sh` | | List restorable configurations |
|
||||||
|
| `cleanup-backups.sh` | | Remove old backups |
|
||||||
|
| `cleanup-volumes.sh` | | Clean up unused volumes |
|
||||||
|
|
||||||
|
### Network & Connectivity Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `upstreams.sh` | | Generate dshackle upstream configuration |
|
||||||
|
| `connect-peers.sh` | | Connect to peer nodes |
|
||||||
|
| `search-node.sh` | `<query>` | Search compose files for patterns |
|
||||||
|
| `search-compose.sh` | `<query>` | Search compose files |
|
||||||
|
| `network-to-config.sh` | | Map network names to config files |
|
||||||
|
| `reload_dshackle.sh` | | Reload dshackle configuration |
|
||||||
|
| `update-whitelist.sh` | | Update IP whitelist |
|
||||||
|
| `update-ip.sh` | | Update IP configuration |
|
||||||
|
|
||||||
|
### Specialized Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `op-wheel.sh` | | OP rollup maintenance (rewind, set forkchoice) |
|
||||||
|
| `op-wheel-finalize-latest-block.sh` | `<client_svc> [node_svc]` | Finalize latest block (nuclear option) |
|
||||||
|
| `catchup.sh` | `<config-name>` | Help node catch up to chain head |
|
||||||
|
| `success-if-almost-synced.sh` | `<config-name> <seconds>` | Exit 0 if node is almost synced |
|
||||||
|
| `groq.sh` | | Query using Groq |
|
||||||
|
| `trai.sh` | | Trace transaction |
|
||||||
|
| `multicurl.sh` | | Parallel curl requests |
|
||||||
|
| `blocknumber.sh` | | Get block number |
|
||||||
|
| `get-block.sh` | | Get block information |
|
||||||
|
| `get-local-url.sh` | | Get local RPC URL |
|
||||||
|
| `get-shortname.sh` | `<config-file>` | Get short name for a config |
|
||||||
|
| `disk-space.sh` | | Check disk space |
|
||||||
|
| `limit-bandwidth.sh` | | Limit bandwidth |
|
||||||
|
| `maintenance.sh` | | Maintenance helper |
|
||||||
|
| `random-port.sh` | | Generate random port |
|
||||||
|
| `reference-rpc-endpoint.sh` | | Reference RPC endpoint helper |
|
||||||
|
| `reset-terminal.sh` | | Reset terminal |
|
||||||
|
| `setup-bandwidth-limit-cron.sh` | | Setup cron for bandwidth limiting |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Container Lifecycle Issues
|
||||||
|
|
||||||
|
### Symptom: Container Won't Start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check why it failed
|
||||||
|
./logs.sh <config-name> 2>&1 | tail -50
|
||||||
|
|
||||||
|
# Check container exit code
|
||||||
|
docker ps -a --filter "name=<config-name>" --format "{{.Names}} | {{.State}} | {{.Status}}"
|
||||||
|
|
||||||
|
# Inspect the container
|
||||||
|
docker inspect <container-name> | jq '.[0].State'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Port conflict**: Two services trying to bind to same host port
|
||||||
|
- **Volume permission issues**: Docker can't write to volume
|
||||||
|
- **Missing environment variables**: `.env` file incomplete
|
||||||
|
- **Invalid compose syntax**: YAML parsing error
|
||||||
|
- **Image pull failure**: Network issue or private registry auth
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Check for port conflicts
|
||||||
|
grep -h "^[0-9]\{1,5\}:[0-9]" *.yml | sort | uniq -d
|
||||||
|
|
||||||
|
# Validate compose syntax
|
||||||
|
docker compose -f <config-file>.yml config
|
||||||
|
|
||||||
|
# Pull images manually
|
||||||
|
docker compose -f <config-file>.yml pull
|
||||||
|
|
||||||
|
# Start with --build if using custom Dockerfiles
|
||||||
|
docker compose -f <config-file>.yml up -d --build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Container Exits Immediately After Starting
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# View the last 100 lines of logs before exit
|
||||||
|
./logs.sh <config-name> 2>&1 | tail -100
|
||||||
|
|
||||||
|
# Check exit code
|
||||||
|
docker ps -a --filter "name=<service>" --format "{{.Status}}"
|
||||||
|
|
||||||
|
# Run interactively to see error
|
||||||
|
docker compose -f <config-file>.yml run --rm <service-name> sh
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Missing config files**: `/config/` mount empty or wrong path
|
||||||
|
- **Invalid flags**: Command-line arguments malformed
|
||||||
|
- **Database corruption**: Existing data incompatible with new version
|
||||||
|
- **Checkpoint/genesis mismatch**: Chain ID or genesis doesn't match
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Verify config directory exists (if using custom configs)
|
||||||
|
ls -la <network>/<chain>/
|
||||||
|
|
||||||
|
# Try with fresh volumes (DESTRUCTIVE)
|
||||||
|
./delete-volumes.sh <config-name>
|
||||||
|
./start.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Container Restarts Repeatedly (Crash Loop)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Watch logs in real-time
|
||||||
|
./logs.sh <config-name> -f
|
||||||
|
|
||||||
|
# Check restart count
|
||||||
|
docker inspect <container-name> | jq '.[0].RestartCount'
|
||||||
|
|
||||||
|
# Check last restart reason
|
||||||
|
docker inspect <container-name> | jq '.[0].State.ExitCode, .[0].State.Error'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **OOM killed**: Memory limit exceeded
|
||||||
|
- **Out of disk space**: No space left on device
|
||||||
|
- **Segmentation fault**: Client bug or bad data
|
||||||
|
- **Panic**: Go client panic
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Check memory usage
|
||||||
|
./show-ram.sh <config-name>
|
||||||
|
|
||||||
|
# Check disk space
|
||||||
|
df -h /var/lib/docker
|
||||||
|
./show-db-size.sh
|
||||||
|
|
||||||
|
# Increase resources in compose file or .env
|
||||||
|
# Then force recreate
|
||||||
|
./force-recreate.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Sync Issues
|
||||||
|
|
||||||
|
### Symptom: Node Not Syncing (Stuck at Block 0 or Low Block)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check sync status
|
||||||
|
./sync-status.sh <config-name>
|
||||||
|
|
||||||
|
# Check current block
|
||||||
|
./latest.sh <config-name>
|
||||||
|
|
||||||
|
# Check logs for sync errors
|
||||||
|
./logs.sh <config-name> | grep -i -E "sync|error|fail|warn|stuck|behind"
|
||||||
|
|
||||||
|
# Check peer count
|
||||||
|
./peer-count.sh | grep <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **No peers**: P2P network connection failed
|
||||||
|
- **Wrong network**: Connected to wrong chain
|
||||||
|
- **Checkpoint too old**: Checkpoint URL unavailable or outdated
|
||||||
|
- **Snapshot download failed**: Snapshot server unreachable
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Check if checkpoint/snapshot is configured
|
||||||
|
grep -E "(checkpoint|snapshot)" <config-file>.yml
|
||||||
|
|
||||||
|
# Test checkpoint URL manually
|
||||||
|
curl -I $(grep checkpoint <config-file>.yml | grep -oE 'http[^ ]+')
|
||||||
|
|
||||||
|
# Check peer connections (geth example)
|
||||||
|
docker exec <client-container> admin_peers | jq '.[] | .network.remoteAddress' | wc -l
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Sync is Very Slow
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check sync speed over time
|
||||||
|
./latest.sh <config-name>; sleep 60; ./latest.sh <config-name>
|
||||||
|
|
||||||
|
# Check if node is processing blocks
|
||||||
|
./time-since-last-block.sh <config-name>
|
||||||
|
|
||||||
|
# Check CPU and memory
|
||||||
|
top -d 1 -p $(docker inspect <container> | jq -r '.[0].State.Pid')
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Resource constrained**: CPU throttled, memory swapped
|
||||||
|
- **Disk I/O bottleneck**: Slow storage or contention
|
||||||
|
- **Network rate limited**: P2P or RPC rate limiting
|
||||||
|
- **Too many peers**: P2P overhead
|
||||||
|
- **Wrong sync mode**: Full sync instead of snap sync
|
||||||
|
|
||||||
|
### Symptom: Sync Stuck at Specific Block
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check logs around the stuck block
|
||||||
|
./logs.sh <config-name> | grep -A 10 -B 10 "block <stuck-block-number>"
|
||||||
|
|
||||||
|
# Check if it's a known bad block
|
||||||
|
# Search online: <chain> bad block <number>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Bad block in chain**: Requires client patch or manual intervention
|
||||||
|
- **State trie inconsistency**: Database corruption
|
||||||
|
- **Fork choice issue**: Node on wrong fork
|
||||||
|
|
||||||
|
**Fixes for OP Stack:**
|
||||||
|
```bash
|
||||||
|
# Try to finalize past the block
|
||||||
|
./op-wheel-finalize-latest-block.sh <client-service>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Node on Wrong Fork / Chain
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check chain ID
|
||||||
|
./latest.sh <config-name> | grep -i chain
|
||||||
|
|
||||||
|
# Check what chain the node thinks it's on
|
||||||
|
docker exec <client-container> ethdo chain --endpoint=http://localhost:8545
|
||||||
|
|
||||||
|
# Compare with expected chain ID
|
||||||
|
grep chainId <config-file>.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. RPC/Connectivity Issues
|
||||||
|
|
||||||
|
### Symptom: RPC Endpoint Not Responding
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Test from host
|
||||||
|
curl -s http://localhost:<port> | head -c 100
|
||||||
|
|
||||||
|
# Check if traefik/proxy is running
|
||||||
|
docker ps | grep -E "(traefik|proxy|nginx)"
|
||||||
|
|
||||||
|
# Check traefik logs
|
||||||
|
docker logs <traefik-container> | tail -50
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Container not running**: Client crashed
|
||||||
|
- **Port not exposed**: Wrong port mapping
|
||||||
|
- **Traefik misconfiguration**: Labels wrong or missing
|
||||||
|
- **Firewall blocking**: Host firewall or cloud security group
|
||||||
|
|
||||||
|
### Symptom: RPC Returns Wrong Chain ID
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Query chain ID from RPC
|
||||||
|
curl -s -X POST http://localhost:<port> \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Cannot Connect to P2P Network
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check peer count
|
||||||
|
./peer-count.sh | grep <config-name>
|
||||||
|
|
||||||
|
# Test P2P connectivity from container
|
||||||
|
docker exec <client-container> nc -zv <bootstrap-node> <p2p-port>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Set public IP in .env
|
||||||
|
IP=$(curl -s ipinfo.io/ip)
|
||||||
|
echo "IP=$IP" >> .env
|
||||||
|
./force-recreate.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Log Interpretation
|
||||||
|
|
||||||
|
### Common Log Patterns
|
||||||
|
|
||||||
|
#### Warnings (Node may still function)
|
||||||
|
| Pattern | Meaning | Action |
|
||||||
|
|---|---|---|
|
||||||
|
| `WARN.*sync.*slow` | Sync slower than expected | Check resources |
|
||||||
|
| `WARN.*peers.*low` | Fewer peers than desired | Check P2P connectivity |
|
||||||
|
| `WARN.*rate.*limit` | API rate limiting active | Normal for public endpoints |
|
||||||
|
|
||||||
|
#### Errors (Node is degraded)
|
||||||
|
| Pattern | Meaning | Action |
|
||||||
|
|---|---|---|
|
||||||
|
| `Error.*database.*corrupt` | Database corruption | Restore from backup or resync |
|
||||||
|
| `Error.*handshake.*fail` | P2P handshake failed | Check chain ID |
|
||||||
|
| `Error.*no.*peers` | Cannot connect to P2P | Check bootstrap nodes |
|
||||||
|
| `Error.*timeout` | RPC/HTTP timeout | Check network, increase timeout |
|
||||||
|
|
||||||
|
#### Fatal (Node will not function)
|
||||||
|
| Pattern | Meaning | Action |
|
||||||
|
|---|---|---|
|
||||||
|
| `Fatal.*panic` | Client crashed | Check client version |
|
||||||
|
| `Fatal.*OOM` | Out of memory | Increase memory limit |
|
||||||
|
| `Fatal.*disk.*full` | No disk space | Free space |
|
||||||
|
| `Fatal.*permission.*denied` | Filesystem permissions | Fix volume permissions |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Resource Issues
|
||||||
|
|
||||||
|
### High CPU Usage
|
||||||
|
```bash
|
||||||
|
./show-ram.sh <config-name>
|
||||||
|
./show-cpu.sh
|
||||||
|
docker stats <container-name> --no-stream
|
||||||
|
```
|
||||||
|
|
||||||
|
### High Memory Usage
|
||||||
|
```bash
|
||||||
|
./show-ram.sh <config-name>
|
||||||
|
docker stats <container-name> --no-stream --format "{{.Container}} | {{.MemUsage}} | {{.MemPerc}}"
|
||||||
|
```
|
||||||
|
|
||||||
|
### High Disk Usage
|
||||||
|
```bash
|
||||||
|
./show-db-size.sh
|
||||||
|
docker system df -v
|
||||||
|
```
|
||||||
|
|
||||||
|
### Disk I/O Bottleneck
|
||||||
|
```bash
|
||||||
|
iotop -o -d 1
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Backup and Restore
|
||||||
|
|
||||||
|
### Creating a Backup
|
||||||
|
```bash
|
||||||
|
# Local backup (to /backup directory)
|
||||||
|
./backup-node.sh <config-name>
|
||||||
|
|
||||||
|
# Remote backup (to WebDAV)
|
||||||
|
./backup-node.sh <config-name> https://backup-server.tld/dav
|
||||||
|
```
|
||||||
|
|
||||||
|
### Restoring from Backup
|
||||||
|
```bash
|
||||||
|
# List available backups
|
||||||
|
./list-backups.sh
|
||||||
|
|
||||||
|
# Restore latest backup for config
|
||||||
|
./restore-volumes.sh <config-name>
|
||||||
|
|
||||||
|
# Restore from specific URL
|
||||||
|
./restore-volumes.sh <config-name> https://backup-server.tld/backup/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Cloning a Node
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone a node to a new location
|
||||||
|
./clone-node.sh <config-name>
|
||||||
|
|
||||||
|
# Clone peers (for faster sync)
|
||||||
|
./clone-peers.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Nuclear Option: Full Reset
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# WARNING: This deletes ALL data for the config
|
||||||
|
./stop.sh <config-name> && \
|
||||||
|
./rm.sh <config-name> && \
|
||||||
|
./delete-volumes.sh <config-name> && \
|
||||||
|
./delete-node-keys.sh <config-name> && \
|
||||||
|
./force-recreate.sh <config-name>
|
||||||
|
|
||||||
|
# Then check logs
|
||||||
|
./logs.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. Common Error Messages
|
||||||
|
|
||||||
|
### Database Errors
|
||||||
|
| Error | Cause | Solution |
|
||||||
|
|---|---|---|
|
||||||
|
| `database is corrupted` | Power loss, bug | Restore from backup or resync |
|
||||||
|
| `database version mismatch` | Client version changed | Delete and resync |
|
||||||
|
|
||||||
|
### P2P Errors
|
||||||
|
| Error | Cause | Solution |
|
||||||
|
|---|---|---|
|
||||||
|
| `no configured peers` | Missing bootstrap nodes | Add bootstrap nodes |
|
||||||
|
| `handshake failed` | Chain ID mismatch | Verify genesis.json |
|
||||||
|
|
||||||
|
### RPC Errors
|
||||||
|
| Error | Cause | Solution |
|
||||||
|
|---|---|---|
|
||||||
|
| `method not found` | Wrong client | Use correct client |
|
||||||
|
| `connection refused` | Port not open | Check container running, port mapping |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. OP Stack Specific Debugging
|
||||||
|
|
||||||
|
### OP Node Issues
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check op-node logs
|
||||||
|
./logs.sh <config-name> | grep -i "op-node\|rollup\|sequencer"
|
||||||
|
|
||||||
|
# Check rollup configuration (if custom)
|
||||||
|
cat op/<network>/ethereum/rollup.json | jq .
|
||||||
|
|
||||||
|
# Check if rollup.json is mounted
|
||||||
|
docker exec <op-node-container> cat /config/rollup.json | jq .
|
||||||
|
```
|
||||||
|
|
||||||
|
### OP Wheel (Manual Intervention)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Rewind to specific block (DANGEROUS - only if you know what you're doing)
|
||||||
|
./op-wheel.sh engine set-forkchoice \
|
||||||
|
--unsafe=<block-hash> \
|
||||||
|
--safe=<block-hash> \
|
||||||
|
--finalized=<block-hash> \
|
||||||
|
--engine=http://<client-service>:8551/ \
|
||||||
|
--engine.open=http://<client-service>:8545 \
|
||||||
|
--engine.jwt-secret-path=/jwtsecret
|
||||||
|
|
||||||
|
# Nuclear option: finalize latest local block
|
||||||
|
./op-wheel-finalize-latest-block.sh <client-service> <node-service>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 11. CometBFT Family (Cosmos, etc.) Specific
|
||||||
|
|
||||||
|
### Init Container Issues
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# CometBFT chains use init.sh inside the container
|
||||||
|
# The master script is at scripts/cometbft-common.sh
|
||||||
|
|
||||||
|
# Check if init completed
|
||||||
|
./logs.sh <config-name> | grep -i "init\|setup\|complete"
|
||||||
|
|
||||||
|
# Check the init script
|
||||||
|
cat <network>/<chain>/scripts/init.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 12. Quick Start Guide
|
||||||
|
|
||||||
|
### Starting a Node
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Set up environment
|
||||||
|
echo "IP=$(curl -s ipinfo.io/ip)" > .env
|
||||||
|
echo "DOMAIN=${IP//./-}.traefik.me" >> .env
|
||||||
|
echo "MAIL=your-email@example.com" >> .env
|
||||||
|
|
||||||
|
# 2. Select which nodes to run
|
||||||
|
# Add compose files to COMPOSE_FILE (colon-separated)
|
||||||
|
echo "COMPOSE_FILE=base.yml:rpc.yml:ethereum-mainnet-geth-pruned.yml" >> .env
|
||||||
|
|
||||||
|
# 3. Start the node
|
||||||
|
docker compose up -d
|
||||||
|
|
||||||
|
# 4. Verify it's running
|
||||||
|
./show-status.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Accessing Your Node
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Once running, access via:
|
||||||
|
# HTTP: http://<your-domain>/ethereum-mainnet-geth-pruned
|
||||||
|
# HTTPS: https://<your-domain>/ethereum-mainnet-geth-pruned
|
||||||
|
# WebSocket: wss://<your-domain>/ethereum-mainnet-geth-pruned
|
||||||
|
|
||||||
|
# Or locally (if NO_SSL=true):
|
||||||
|
# HTTP: http://localhost:<port>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 13. Configuration Reference
|
||||||
|
|
||||||
|
### Environment Variables
|
||||||
|
|
||||||
|
**Required for most setups:**
|
||||||
|
```bash
|
||||||
|
IP=203.0.113.42 # Your public IP
|
||||||
|
DOMAIN=203-0-113-42.traefik.me # Your domain (traefik.me for testing)
|
||||||
|
MAIL=your-email@example.com # For Let's Encrypt SSL
|
||||||
|
WHITELIST=0.0.0.0/0 # IP whitelist (0.0.0.0/0 = all)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Optional:**
|
||||||
|
```bash
|
||||||
|
NO_SSL=true # Disable SSL (testing only)
|
||||||
|
CHAINS_SUBNET=192.168.0.0/26 # Docker network subnet
|
||||||
|
```
|
||||||
|
|
||||||
|
**Chain-specific (examples):**
|
||||||
|
```bash
|
||||||
|
ETHEREUM_MAINNET_EXECUTION_RPC=https://fallback-rpc.example.com
|
||||||
|
ARBITRUM_SEPOLIA_EXECUTION_RPC=https://arb-sepolia-rpc.example.com
|
||||||
|
OP_NODE_NETWORK=mainnet
|
||||||
|
OP_NODE_L1_RPC_URL=https://l1-rpc.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compose File Structure
|
||||||
|
|
||||||
|
Each compose file defines one or more services:
|
||||||
|
- **client**: Execution layer (Geth, Erigon, Reth, etc.)
|
||||||
|
- **node**: Consensus/derivation node (op-node, lighthouse, etc.)
|
||||||
|
- **relay**: DA relay (eigenda-proxy, op-alt, etc.)
|
||||||
|
- **proxy**: HTTP/WS proxy (nginx, etc.)
|
||||||
|
- **database**: External database (Postgres, etc.)
|
||||||
|
|
||||||
|
### Volume Naming
|
||||||
|
|
||||||
|
Volumes are named after the config:
|
||||||
|
```
|
||||||
|
<config-name>_<service>_data
|
||||||
|
<config-name>_<service>_config
|
||||||
|
```
|
||||||
|
|
||||||
|
Example: `ethereum-mainnet-geth-pruned_client_data`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 14. Quick Debugging Checklist
|
||||||
|
|
||||||
|
Use this checklist when debugging an issue:
|
||||||
|
|
||||||
|
- [ ] **Is the container running?** → `./show-running.sh`
|
||||||
|
- [ ] **Are there errors in logs?** → `./logs.sh <config> | grep -i error`
|
||||||
|
- [ ] **Is the node synced?** → `./sync-status.sh <config>`
|
||||||
|
- [ ] **Are peers connected?** → `./peer-count.sh`
|
||||||
|
- [ ] **Are resources adequate?** → `./show-ram.sh`, `./show-db-size.sh`
|
||||||
|
- [ ] **Is P2P working?** → Check peer count
|
||||||
|
- [ ] **Is RPC responding?** → Test with curl
|
||||||
|
- [ ] **Is disk space available?** → `df -h /var/lib/docker`
|
||||||
|
- [ ] **Is the config file correct?** → `docker compose -f <file>.yml config`
|
||||||
|
- [ ] **Are environment variables set?** → Check `.env`
|
||||||
|
- [ ] **Is the genesis file correct?** → Check chain ID
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 15. When to Escalate
|
||||||
|
|
||||||
|
Escalate to a human operator if:
|
||||||
|
|
||||||
|
- [ ] Node stuck for > 2 hours with no progress
|
||||||
|
- [ ] Repeated `Fatal` or `panic` errors after restart
|
||||||
|
- [ ] Database corruption confirmed
|
||||||
|
- [ ] Issue affects multiple nodes across different chains
|
||||||
|
- [ ] Need to force-push to this repo
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 16. File Locations Quick Reference
|
||||||
|
|
||||||
|
| What You Need | Where to Find It |
|
||||||
|
|---|---|
|
||||||
|
| Compose files | Root of this repo (`*.yml`) |
|
||||||
|
| Operational scripts | Root of this repo (`*.sh`) |
|
||||||
|
| Chain assets | `<network>/<chain>/` or `<stack>/<network>/<settlement>/` |
|
||||||
|
| Genesis files | `<stack>/<network>/<settlement>/genesis.json` |
|
||||||
|
| Rollup configs | `op/<network>/<settlement>/rollup.json` |
|
||||||
|
| Custom Dockerfiles | `<path>/*.Dockerfile` |
|
||||||
|
| Init scripts | `<path>/scripts/init.sh` |
|
||||||
|
| CometBFT common | `scripts/cometbft-common.sh` |
|
||||||
|
| Compose registry | `compose_registry.json` |
|
||||||
|
| RPC endpoints | `reference-rpc-endpoint.json` |
|
||||||
|
| Environment | `.env` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 17. Resource Requirements Reference
|
||||||
|
|
||||||
|
| Node Type | Disk | RAM | CPU |
|
||||||
|
|---|---|---|---|
|
||||||
|
| Ethereum pruned | ~500GB | 8GB | 2+ cores |
|
||||||
|
| Ethereum archive | ~2TB+ | 16GB+ | 4+ cores |
|
||||||
|
| Ethereum archive-trace | ~4TB+ | 32GB+ | 8+ cores |
|
||||||
|
| L2 pruned | ~100-500GB | 4-8GB | 2+ cores |
|
||||||
|
| L2 archive | ~1-2TB | 8-16GB | 4+ cores |
|
||||||
|
|
||||||
|
**Note:** Requirements vary by chain. Check specific chain documentation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*This file is your complete operations and debugging reference. For additional user documentation, see README.md.*
|
||||||
729
VIBE.md
Normal file
729
VIBE.md
Normal file
@@ -0,0 +1,729 @@
|
|||||||
|
# VIBE.md — ethereum-rpc-docker Operations & Debugging Guide
|
||||||
|
|
||||||
|
You are an LLM agent or operator **running or debugging blockchain RPC nodes** from this
|
||||||
|
repository. This file is your **primary reference** for all operational tasks.
|
||||||
|
|
||||||
|
This repo contains Docker Compose configurations for blockchain RPC nodes plus operational
|
||||||
|
scripts for managing them. Everything you need to run, monitor, debug, and fix nodes is here.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 0. WHEN A NODE IS FAULTY — Start Here
|
||||||
|
|
||||||
|
### Immediate Triage (30 seconds)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Is the container running?
|
||||||
|
./show-running.sh
|
||||||
|
|
||||||
|
# 2. Check overall status of all configured nodes
|
||||||
|
./show-status.sh
|
||||||
|
|
||||||
|
# 3. If you know the config name, check its specific status
|
||||||
|
./sync-status.sh <config-name>
|
||||||
|
|
||||||
|
# 4. Check logs for the faulty node
|
||||||
|
./logs.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**If the container isn't running**, go to [§3. Container Lifecycle Issues](#3-container-lifecycle-issues)
|
||||||
|
|
||||||
|
**If the container is running but not synced**, go to [§4. Sync Issues](#4-sync-issues)
|
||||||
|
|
||||||
|
**If the container is running and synced but RPC fails**, go to [§5. RPC/Connectivity Issues](#5-rpcconnectivity-issues)
|
||||||
|
|
||||||
|
**If you see errors in logs but aren't sure what they mean**, go to [§6. Log Interpretation](#6-log-interpretation)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Repository Overview
|
||||||
|
|
||||||
|
### What This Repo Contains
|
||||||
|
|
||||||
|
```
|
||||||
|
rpc/
|
||||||
|
├── *.yml # Docker Compose files for node configurations
|
||||||
|
├── *.sh # Operational scripts (YOUR PRIMARY TOOLS)
|
||||||
|
├── scripts/ # Additional helper scripts (CometBFT support)
|
||||||
|
├── <network>/ # Network directories (e.g., ethereum/, op/, arb/)
|
||||||
|
│ ├── *.yml # Compose files for specific chains
|
||||||
|
│ └── <chain>/ # Chain-specific assets
|
||||||
|
│ ├── genesis.json # Custom genesis files
|
||||||
|
│ ├── rollup.json # Rollup configurations (OP Stack)
|
||||||
|
│ └── *.Dockerfile # Custom build files
|
||||||
|
├── README.md # User documentation
|
||||||
|
└── VIBE.md # THIS FILE — operations guide
|
||||||
|
```
|
||||||
|
|
||||||
|
### Key Concepts
|
||||||
|
|
||||||
|
- **Config name**: The compose filename WITHOUT `.yml` (e.g., `ethereum-mainnet-geth-pruned`)
|
||||||
|
- **Service name**: Derived from config name, used in `docker compose` commands
|
||||||
|
- **Short name**: Used in URL paths, container labels. Format: `{network}-{chain}[-{client}][-{db_type}]`
|
||||||
|
- **Volume names**: Docker volumes follow the full config name pattern
|
||||||
|
|
||||||
|
### Supported Networks
|
||||||
|
|
||||||
|
**Layer 1**: Ethereum, Polygon, BSC, Avalanche, Gnosis, Fantom, Core, Berachain, Ronin, Viction, Fuse, Tron, ThunderCore, Goat, AlephZero, Haqq, Taiko, Rootstock, Dogecoin, Litecoin, Bitcoin, Bitcoin-Cash, Ripple, Solana, Tron
|
||||||
|
|
||||||
|
**Layer 2 (OP Stack)**: Optimism, Base, Zora, Mode, Blast, Fraxtal, Bob, Boba, Worldchain, Metal, Ink, Lisk, SNAX, Celo
|
||||||
|
|
||||||
|
**Layer 2 (Arbitrum)**: Arbitrum One, Arbitrum Nova, Everclear, Playblock, Real, Connext, OpenCampusCodex
|
||||||
|
|
||||||
|
**Other L2s**: Linea, Scroll, zkSync Era, Metis, Moonbeam, Starknet, zkEVM, Immutable zkEVM, Polygon zkEVM
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Essential Scripts Reference
|
||||||
|
|
||||||
|
### Status & Monitoring Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `show-status.sh` | `[config-name]` | Lists ALL configured nodes with sync status, block height, health |
|
||||||
|
| `show-running.sh` | | Lists currently running containers |
|
||||||
|
| `sync-status.sh` | `<config-name>` | Detailed sync status for one config |
|
||||||
|
| `latest.sh` | `<config-name>` | Latest block number + hash |
|
||||||
|
| `logs.sh` | `<config-name>` | Tail logs from all containers in a config |
|
||||||
|
| `show-db-size.sh` | | Disk usage of ALL Docker volumes, sorted by size |
|
||||||
|
| `show-ram.sh` | `<config-name>` | Memory usage of containers |
|
||||||
|
| `show-cpu.sh` | | CPU usage display |
|
||||||
|
| `peer-count.sh` | | P2P peer count for all running nodes |
|
||||||
|
| `time-since-last-block.sh` | `<config-name>` | How long since last block was processed |
|
||||||
|
| `ping.sh` | `<container-name>` | Test network connectivity from container |
|
||||||
|
| `show-errors.sh` | | Show error counts/logs across containers |
|
||||||
|
| `show-size.sh` | | Show size of containers/volumes |
|
||||||
|
| `show-file-size.sh` | | Show static file sizes |
|
||||||
|
| `show-static-file-size.sh` | | Show static file sizes (alternative) |
|
||||||
|
|
||||||
|
### Lifecycle Management Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `start.sh` | `<config-name>` | Start all containers for a config |
|
||||||
|
| `stop.sh` | `<config-name>` | Stop all containers for a config |
|
||||||
|
| `force-recreate.sh` | `<config-name>` | Force recreate containers (keeps volumes) |
|
||||||
|
| `rm.sh` | `<config-name>` | Remove containers (keeps volumes) |
|
||||||
|
| `delete-volumes.sh` | `<config-name>` | **DESTRUCTIVE** - Remove containers AND volumes |
|
||||||
|
| `delete-node-keys.sh` | `<config-name>` | Remove node keys (for re-initialization) |
|
||||||
|
|
||||||
|
### Backup & Restore Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `backup-node.sh` | `<config-name> [url]` | Backup volumes locally or to WebDAV |
|
||||||
|
| `restore-volumes.sh` | `<config-name> [url]` | Restore volumes from local or HTTP |
|
||||||
|
| `clone-node.sh` | `<config-name>` | Clone a node's state |
|
||||||
|
| `clone-backup.sh` | | Clone backup files |
|
||||||
|
| `clone-peers.sh` | | Clone peer information |
|
||||||
|
| `restore-peers.sh` | | Restore peer connections |
|
||||||
|
| `list-backups.sh` | | List available backup files |
|
||||||
|
| `list-peer-backups.sh` | | List peer backup files |
|
||||||
|
| `list-restorable.sh` | | List restorable configurations |
|
||||||
|
| `cleanup-backups.sh` | | Remove old backups |
|
||||||
|
| `cleanup-volumes.sh` | | Clean up unused volumes |
|
||||||
|
|
||||||
|
### Network & Connectivity Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `upstreams.sh` | | Generate dshackle upstream configuration |
|
||||||
|
| `connect-peers.sh` | | Connect to peer nodes |
|
||||||
|
| `search-node.sh` | `<query>` | Search compose files for patterns |
|
||||||
|
| `search-compose.sh` | `<query>` | Search compose files |
|
||||||
|
| `network-to-config.sh` | | Map network names to config files |
|
||||||
|
| `reload_dshackle.sh` | | Reload dshackle configuration |
|
||||||
|
| `update-whitelist.sh` | | Update IP whitelist |
|
||||||
|
| `update-ip.sh` | | Update IP configuration |
|
||||||
|
|
||||||
|
### Specialized Scripts
|
||||||
|
|
||||||
|
| Script | Usage | What It Does |
|
||||||
|
|---|---|---|
|
||||||
|
| `op-wheel.sh` | | OP rollup maintenance (rewind, set forkchoice) |
|
||||||
|
| `op-wheel-finalize-latest-block.sh` | `<client_svc> [node_svc]` | Finalize latest block (nuclear option) |
|
||||||
|
| `catchup.sh` | `<config-name>` | Help node catch up to chain head |
|
||||||
|
| `success-if-almost-synced.sh` | `<config-name> <seconds>` | Exit 0 if node is almost synced |
|
||||||
|
| `groq.sh` | | Query using Groq |
|
||||||
|
| `trai.sh` | | Trace transaction |
|
||||||
|
| `multicurl.sh` | | Parallel curl requests |
|
||||||
|
| `blocknumber.sh` | | Get block number |
|
||||||
|
| `get-block.sh` | | Get block information |
|
||||||
|
| `get-local-url.sh` | | Get local RPC URL |
|
||||||
|
| `get-shortname.sh` | `<config-file>` | Get short name for a config |
|
||||||
|
| `disk-space.sh` | | Check disk space |
|
||||||
|
| `limit-bandwidth.sh` | | Limit bandwidth |
|
||||||
|
| `maintenance.sh` | | Maintenance helper |
|
||||||
|
| `random-port.sh` | | Generate random port |
|
||||||
|
| `reference-rpc-endpoint.sh` | | Reference RPC endpoint helper |
|
||||||
|
| `reset-terminal.sh` | | Reset terminal |
|
||||||
|
| `setup-bandwidth-limit-cron.sh` | | Setup cron for bandwidth limiting |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Container Lifecycle Issues
|
||||||
|
|
||||||
|
### Symptom: Container Won't Start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check why it failed
|
||||||
|
./logs.sh <config-name> 2>&1 | tail -50
|
||||||
|
|
||||||
|
# Check container exit code
|
||||||
|
docker ps -a --filter "name=<config-name>" --format "{{.Names}} | {{.State}} | {{.Status}}"
|
||||||
|
|
||||||
|
# Inspect the container
|
||||||
|
docker inspect <container-name> | jq '.[0].State'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Port conflict**: Two services trying to bind to same host port
|
||||||
|
- **Volume permission issues**: Docker can't write to volume
|
||||||
|
- **Missing environment variables**: `.env` file incomplete
|
||||||
|
- **Invalid compose syntax**: YAML parsing error
|
||||||
|
- **Image pull failure**: Network issue or private registry auth
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Check for port conflicts
|
||||||
|
grep -h "^[0-9]\{1,5\}:[0-9]" *.yml | sort | uniq -d
|
||||||
|
|
||||||
|
# Validate compose syntax
|
||||||
|
docker compose -f <config-file>.yml config
|
||||||
|
|
||||||
|
# Pull images manually
|
||||||
|
docker compose -f <config-file>.yml pull
|
||||||
|
|
||||||
|
# Start with --build if using custom Dockerfiles
|
||||||
|
docker compose -f <config-file>.yml up -d --build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Container Exits Immediately After Starting
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# View the last 100 lines of logs before exit
|
||||||
|
./logs.sh <config-name> 2>&1 | tail -100
|
||||||
|
|
||||||
|
# Check exit code
|
||||||
|
docker ps -a --filter "name=<service>" --format "{{.Status}}"
|
||||||
|
|
||||||
|
# Run interactively to see error
|
||||||
|
docker compose -f <config-file>.yml run --rm <service-name> sh
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Missing config files**: `/config/` mount empty or wrong path
|
||||||
|
- **Invalid flags**: Command-line arguments malformed
|
||||||
|
- **Database corruption**: Existing data incompatible with new version
|
||||||
|
- **Checkpoint/genesis mismatch**: Chain ID or genesis doesn't match
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Verify config directory exists (if using custom configs)
|
||||||
|
ls -la <network>/<chain>/
|
||||||
|
|
||||||
|
# Try with fresh volumes (DESTRUCTIVE)
|
||||||
|
./delete-volumes.sh <config-name>
|
||||||
|
./start.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Container Restarts Repeatedly (Crash Loop)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Watch logs in real-time
|
||||||
|
./logs.sh <config-name> -f
|
||||||
|
|
||||||
|
# Check restart count
|
||||||
|
docker inspect <container-name> | jq '.[0].RestartCount'
|
||||||
|
|
||||||
|
# Check last restart reason
|
||||||
|
docker inspect <container-name> | jq '.[0].State.ExitCode, .[0].State.Error'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **OOM killed**: Memory limit exceeded
|
||||||
|
- **Out of disk space**: No space left on device
|
||||||
|
- **Segmentation fault**: Client bug or bad data
|
||||||
|
- **Panic**: Go client panic
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Check memory usage
|
||||||
|
./show-ram.sh <config-name>
|
||||||
|
|
||||||
|
# Check disk space
|
||||||
|
df -h /var/lib/docker
|
||||||
|
./show-db-size.sh
|
||||||
|
|
||||||
|
# Increase resources in compose file or .env
|
||||||
|
# Then force recreate
|
||||||
|
./force-recreate.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Sync Issues
|
||||||
|
|
||||||
|
### Symptom: Node Not Syncing (Stuck at Block 0 or Low Block)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check sync status
|
||||||
|
./sync-status.sh <config-name>
|
||||||
|
|
||||||
|
# Check current block
|
||||||
|
./latest.sh <config-name>
|
||||||
|
|
||||||
|
# Check logs for sync errors
|
||||||
|
./logs.sh <config-name> | grep -i -E "sync|error|fail|warn|stuck|behind"
|
||||||
|
|
||||||
|
# Check peer count
|
||||||
|
./peer-count.sh | grep <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **No peers**: P2P network connection failed
|
||||||
|
- **Wrong network**: Connected to wrong chain
|
||||||
|
- **Checkpoint too old**: Checkpoint URL unavailable or outdated
|
||||||
|
- **Snapshot download failed**: Snapshot server unreachable
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Check if checkpoint/snapshot is configured
|
||||||
|
grep -E "(checkpoint|snapshot)" <config-file>.yml
|
||||||
|
|
||||||
|
# Test checkpoint URL manually
|
||||||
|
curl -I $(grep checkpoint <config-file>.yml | grep -oE 'http[^ ]+')
|
||||||
|
|
||||||
|
# Check peer connections (geth example)
|
||||||
|
docker exec <client-container> admin_peers | jq '.[] | .network.remoteAddress' | wc -l
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Sync is Very Slow
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check sync speed over time
|
||||||
|
./latest.sh <config-name>; sleep 60; ./latest.sh <config-name>
|
||||||
|
|
||||||
|
# Check if node is processing blocks
|
||||||
|
./time-since-last-block.sh <config-name>
|
||||||
|
|
||||||
|
# Check CPU and memory
|
||||||
|
top -d 1 -p $(docker inspect <container> | jq -r '.[0].State.Pid')
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Resource constrained**: CPU throttled, memory swapped
|
||||||
|
- **Disk I/O bottleneck**: Slow storage or contention
|
||||||
|
- **Network rate limited**: P2P or RPC rate limiting
|
||||||
|
- **Too many peers**: P2P overhead
|
||||||
|
- **Wrong sync mode**: Full sync instead of snap sync
|
||||||
|
|
||||||
|
### Symptom: Sync Stuck at Specific Block
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check logs around the stuck block
|
||||||
|
./logs.sh <config-name> | grep -A 10 -B 10 "block <stuck-block-number>"
|
||||||
|
|
||||||
|
# Check if it's a known bad block
|
||||||
|
# Search online: <chain> bad block <number>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Bad block in chain**: Requires client patch or manual intervention
|
||||||
|
- **State trie inconsistency**: Database corruption
|
||||||
|
- **Fork choice issue**: Node on wrong fork
|
||||||
|
|
||||||
|
**Fixes for OP Stack:**
|
||||||
|
```bash
|
||||||
|
# Try to finalize past the block
|
||||||
|
./op-wheel-finalize-latest-block.sh <client-service>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Node on Wrong Fork / Chain
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check chain ID
|
||||||
|
./latest.sh <config-name> | grep -i chain
|
||||||
|
|
||||||
|
# Check what chain the node thinks it's on
|
||||||
|
docker exec <client-container> ethdo chain --endpoint=http://localhost:8545
|
||||||
|
|
||||||
|
# Compare with expected chain ID
|
||||||
|
grep chainId <config-file>.yml
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. RPC/Connectivity Issues
|
||||||
|
|
||||||
|
### Symptom: RPC Endpoint Not Responding
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Test from host
|
||||||
|
curl -s http://localhost:<port> | head -c 100
|
||||||
|
|
||||||
|
# Check if traefik/proxy is running
|
||||||
|
docker ps | grep -E "(traefik|proxy|nginx)"
|
||||||
|
|
||||||
|
# Check traefik logs
|
||||||
|
docker logs <traefik-container> | tail -50
|
||||||
|
```
|
||||||
|
|
||||||
|
**Common causes:**
|
||||||
|
- **Container not running**: Client crashed
|
||||||
|
- **Port not exposed**: Wrong port mapping
|
||||||
|
- **Traefik misconfiguration**: Labels wrong or missing
|
||||||
|
- **Firewall blocking**: Host firewall or cloud security group
|
||||||
|
|
||||||
|
### Symptom: RPC Returns Wrong Chain ID
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Query chain ID from RPC
|
||||||
|
curl -s -X POST http://localhost:<port> \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Symptom: Cannot Connect to P2P Network
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check peer count
|
||||||
|
./peer-count.sh | grep <config-name>
|
||||||
|
|
||||||
|
# Test P2P connectivity from container
|
||||||
|
docker exec <client-container> nc -zv <bootstrap-node> <p2p-port>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Fixes:**
|
||||||
|
```bash
|
||||||
|
# Set public IP in .env
|
||||||
|
IP=$(curl -s ipinfo.io/ip)
|
||||||
|
echo "IP=$IP" >> .env
|
||||||
|
./force-recreate.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Log Interpretation
|
||||||
|
|
||||||
|
### Common Log Patterns
|
||||||
|
|
||||||
|
#### Warnings (Node may still function)
|
||||||
|
| Pattern | Meaning | Action |
|
||||||
|
|---|---|---|
|
||||||
|
| `WARN.*sync.*slow` | Sync slower than expected | Check resources |
|
||||||
|
| `WARN.*peers.*low` | Fewer peers than desired | Check P2P connectivity |
|
||||||
|
| `WARN.*rate.*limit` | API rate limiting active | Normal for public endpoints |
|
||||||
|
|
||||||
|
#### Errors (Node is degraded)
|
||||||
|
| Pattern | Meaning | Action |
|
||||||
|
|---|---|---|
|
||||||
|
| `Error.*database.*corrupt` | Database corruption | Restore from backup or resync |
|
||||||
|
| `Error.*handshake.*fail` | P2P handshake failed | Check chain ID |
|
||||||
|
| `Error.*no.*peers` | Cannot connect to P2P | Check bootstrap nodes |
|
||||||
|
| `Error.*timeout` | RPC/HTTP timeout | Check network, increase timeout |
|
||||||
|
|
||||||
|
#### Fatal (Node will not function)
|
||||||
|
| Pattern | Meaning | Action |
|
||||||
|
|---|---|---|
|
||||||
|
| `Fatal.*panic` | Client crashed | Check client version |
|
||||||
|
| `Fatal.*OOM` | Out of memory | Increase memory limit |
|
||||||
|
| `Fatal.*disk.*full` | No disk space | Free space |
|
||||||
|
| `Fatal.*permission.*denied` | Filesystem permissions | Fix volume permissions |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Resource Issues
|
||||||
|
|
||||||
|
### High CPU Usage
|
||||||
|
```bash
|
||||||
|
./show-ram.sh <config-name>
|
||||||
|
./show-cpu.sh
|
||||||
|
docker stats <container-name> --no-stream
|
||||||
|
```
|
||||||
|
|
||||||
|
### High Memory Usage
|
||||||
|
```bash
|
||||||
|
./show-ram.sh <config-name>
|
||||||
|
docker stats <container-name> --no-stream --format "{{.Container}} | {{.MemUsage}} | {{.MemPerc}}"
|
||||||
|
```
|
||||||
|
|
||||||
|
### High Disk Usage
|
||||||
|
```bash
|
||||||
|
./show-db-size.sh
|
||||||
|
docker system df -v
|
||||||
|
```
|
||||||
|
|
||||||
|
### Disk I/O Bottleneck
|
||||||
|
```bash
|
||||||
|
iotop -o -d 1
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Backup and Restore
|
||||||
|
|
||||||
|
### Creating a Backup
|
||||||
|
```bash
|
||||||
|
# Local backup (to /backup directory)
|
||||||
|
./backup-node.sh <config-name>
|
||||||
|
|
||||||
|
# Remote backup (to WebDAV)
|
||||||
|
./backup-node.sh <config-name> https://backup-server.tld/dav
|
||||||
|
```
|
||||||
|
|
||||||
|
### Restoring from Backup
|
||||||
|
```bash
|
||||||
|
# List available backups
|
||||||
|
./list-backups.sh
|
||||||
|
|
||||||
|
# Restore latest backup for config
|
||||||
|
./restore-volumes.sh <config-name>
|
||||||
|
|
||||||
|
# Restore from specific URL
|
||||||
|
./restore-volumes.sh <config-name> https://backup-server.tld/backup/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Cloning a Node
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone a node to a new location
|
||||||
|
./clone-node.sh <config-name>
|
||||||
|
|
||||||
|
# Clone peers (for faster sync)
|
||||||
|
./clone-peers.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Nuclear Option: Full Reset
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# WARNING: This deletes ALL data for the config
|
||||||
|
./stop.sh <config-name> && \
|
||||||
|
./rm.sh <config-name> && \
|
||||||
|
./delete-volumes.sh <config-name> && \
|
||||||
|
./delete-node-keys.sh <config-name> && \
|
||||||
|
./force-recreate.sh <config-name>
|
||||||
|
|
||||||
|
# Then check logs
|
||||||
|
./logs.sh <config-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. Common Error Messages
|
||||||
|
|
||||||
|
### Database Errors
|
||||||
|
| Error | Cause | Solution |
|
||||||
|
|---|---|---|
|
||||||
|
| `database is corrupted` | Power loss, bug | Restore from backup or resync |
|
||||||
|
| `database version mismatch` | Client version changed | Delete and resync |
|
||||||
|
|
||||||
|
### P2P Errors
|
||||||
|
| Error | Cause | Solution |
|
||||||
|
|---|---|---|
|
||||||
|
| `no configured peers` | Missing bootstrap nodes | Add bootstrap nodes |
|
||||||
|
| `handshake failed` | Chain ID mismatch | Verify genesis.json |
|
||||||
|
|
||||||
|
### RPC Errors
|
||||||
|
| Error | Cause | Solution |
|
||||||
|
|---|---|---|
|
||||||
|
| `method not found` | Wrong client | Use correct client |
|
||||||
|
| `connection refused` | Port not open | Check container running, port mapping |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. OP Stack Specific Debugging
|
||||||
|
|
||||||
|
### OP Node Issues
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check op-node logs
|
||||||
|
./logs.sh <config-name> | grep -i "op-node\|rollup\|sequencer"
|
||||||
|
|
||||||
|
# Check rollup configuration (if custom)
|
||||||
|
cat op/<network>/ethereum/rollup.json | jq .
|
||||||
|
|
||||||
|
# Check if rollup.json is mounted
|
||||||
|
docker exec <op-node-container> cat /config/rollup.json | jq .
|
||||||
|
```
|
||||||
|
|
||||||
|
### OP Wheel (Manual Intervention)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Rewind to specific block (DANGEROUS - only if you know what you're doing)
|
||||||
|
./op-wheel.sh engine set-forkchoice \
|
||||||
|
--unsafe=<block-hash> \
|
||||||
|
--safe=<block-hash> \
|
||||||
|
--finalized=<block-hash> \
|
||||||
|
--engine=http://<client-service>:8551/ \
|
||||||
|
--engine.open=http://<client-service>:8545 \
|
||||||
|
--engine.jwt-secret-path=/jwtsecret
|
||||||
|
|
||||||
|
# Nuclear option: finalize latest local block
|
||||||
|
./op-wheel-finalize-latest-block.sh <client-service> <node-service>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 11. CometBFT Family (Cosmos, etc.) Specific
|
||||||
|
|
||||||
|
### Init Container Issues
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# CometBFT chains use init.sh inside the container
|
||||||
|
# The master script is at scripts/cometbft-common.sh
|
||||||
|
|
||||||
|
# Check if init completed
|
||||||
|
./logs.sh <config-name> | grep -i "init\|setup\|complete"
|
||||||
|
|
||||||
|
# Check the init script
|
||||||
|
cat <network>/<chain>/scripts/init.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 12. Quick Start Guide
|
||||||
|
|
||||||
|
### Starting a Node
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Set up environment
|
||||||
|
echo "IP=$(curl -s ipinfo.io/ip)" > .env
|
||||||
|
echo "DOMAIN=${IP//./-}.traefik.me" >> .env
|
||||||
|
echo "MAIL=your-email@example.com" >> .env
|
||||||
|
|
||||||
|
# 2. Select which nodes to run
|
||||||
|
# Add compose files to COMPOSE_FILE (colon-separated)
|
||||||
|
echo "COMPOSE_FILE=base.yml:rpc.yml:ethereum-mainnet-geth-pruned.yml" >> .env
|
||||||
|
|
||||||
|
# 3. Start the node
|
||||||
|
docker compose up -d
|
||||||
|
|
||||||
|
# 4. Verify it's running
|
||||||
|
./show-status.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Accessing Your Node
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Once running, access via:
|
||||||
|
# HTTP: http://<your-domain>/ethereum-mainnet-geth-pruned
|
||||||
|
# HTTPS: https://<your-domain>/ethereum-mainnet-geth-pruned
|
||||||
|
# WebSocket: wss://<your-domain>/ethereum-mainnet-geth-pruned
|
||||||
|
|
||||||
|
# Or locally (if NO_SSL=true):
|
||||||
|
# HTTP: http://localhost:<port>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 13. Configuration Reference
|
||||||
|
|
||||||
|
### Environment Variables
|
||||||
|
|
||||||
|
**Required for most setups:**
|
||||||
|
```bash
|
||||||
|
IP=203.0.113.42 # Your public IP
|
||||||
|
DOMAIN=203-0-113-42.traefik.me # Your domain (traefik.me for testing)
|
||||||
|
MAIL=your-email@example.com # For Let's Encrypt SSL
|
||||||
|
WHITELIST=0.0.0.0/0 # IP whitelist (0.0.0.0/0 = all)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Optional:**
|
||||||
|
```bash
|
||||||
|
NO_SSL=true # Disable SSL (testing only)
|
||||||
|
CHAINS_SUBNET=192.168.0.0/26 # Docker network subnet
|
||||||
|
```
|
||||||
|
|
||||||
|
**Chain-specific (examples):**
|
||||||
|
```bash
|
||||||
|
ETHEREUM_MAINNET_EXECUTION_RPC=https://fallback-rpc.example.com
|
||||||
|
ARBITRUM_SEPOLIA_EXECUTION_RPC=https://arb-sepolia-rpc.example.com
|
||||||
|
OP_NODE_NETWORK=mainnet
|
||||||
|
OP_NODE_L1_RPC_URL=https://l1-rpc.example.com
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compose File Structure
|
||||||
|
|
||||||
|
Each compose file defines one or more services:
|
||||||
|
- **client**: Execution layer (Geth, Erigon, Reth, etc.)
|
||||||
|
- **node**: Consensus/derivation node (op-node, lighthouse, etc.)
|
||||||
|
- **relay**: DA relay (eigenda-proxy, op-alt, etc.)
|
||||||
|
- **proxy**: HTTP/WS proxy (nginx, etc.)
|
||||||
|
- **database**: External database (Postgres, etc.)
|
||||||
|
|
||||||
|
### Volume Naming
|
||||||
|
|
||||||
|
Volumes are named after the config:
|
||||||
|
```
|
||||||
|
<config-name>_<service>_data
|
||||||
|
<config-name>_<service>_config
|
||||||
|
```
|
||||||
|
|
||||||
|
Example: `ethereum-mainnet-geth-pruned_client_data`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 14. Quick Debugging Checklist
|
||||||
|
|
||||||
|
Use this checklist when debugging an issue:
|
||||||
|
|
||||||
|
- [ ] **Is the container running?** → `./show-running.sh`
|
||||||
|
- [ ] **Are there errors in logs?** → `./logs.sh <config> | grep -i error`
|
||||||
|
- [ ] **Is the node synced?** → `./sync-status.sh <config>`
|
||||||
|
- [ ] **Are peers connected?** → `./peer-count.sh`
|
||||||
|
- [ ] **Are resources adequate?** → `./show-ram.sh`, `./show-db-size.sh`
|
||||||
|
- [ ] **Is P2P working?** → Check peer count
|
||||||
|
- [ ] **Is RPC responding?** → Test with curl
|
||||||
|
- [ ] **Is disk space available?** → `df -h /var/lib/docker`
|
||||||
|
- [ ] **Is the config file correct?** → `docker compose -f <file>.yml config`
|
||||||
|
- [ ] **Are environment variables set?** → Check `.env`
|
||||||
|
- [ ] **Is the genesis file correct?** → Check chain ID
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 15. When to Escalate
|
||||||
|
|
||||||
|
Escalate to a human operator if:
|
||||||
|
|
||||||
|
- [ ] Node stuck for > 2 hours with no progress
|
||||||
|
- [ ] Repeated `Fatal` or `panic` errors after restart
|
||||||
|
- [ ] Database corruption confirmed
|
||||||
|
- [ ] Issue affects multiple nodes across different chains
|
||||||
|
- [ ] Need to force-push to this repo
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 16. File Locations Quick Reference
|
||||||
|
|
||||||
|
| What You Need | Where to Find It |
|
||||||
|
|---|---|
|
||||||
|
| Compose files | Root of this repo (`*.yml`) |
|
||||||
|
| Operational scripts | Root of this repo (`*.sh`) |
|
||||||
|
| Chain assets | `<network>/<chain>/` or `<stack>/<network>/<settlement>/` |
|
||||||
|
| Genesis files | `<stack>/<network>/<settlement>/genesis.json` |
|
||||||
|
| Rollup configs | `op/<network>/<settlement>/rollup.json` |
|
||||||
|
| Custom Dockerfiles | `<path>/*.Dockerfile` |
|
||||||
|
| Init scripts | `<path>/scripts/init.sh` |
|
||||||
|
| CometBFT common | `scripts/cometbft-common.sh` |
|
||||||
|
| Compose registry | `compose_registry.json` |
|
||||||
|
| RPC endpoints | `reference-rpc-endpoint.json` |
|
||||||
|
| Environment | `.env` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 17. Resource Requirements Reference
|
||||||
|
|
||||||
|
| Node Type | Disk | RAM | CPU |
|
||||||
|
|---|---|---|---|
|
||||||
|
| Ethereum pruned | ~500GB | 8GB | 2+ cores |
|
||||||
|
| Ethereum archive | ~2TB+ | 16GB+ | 4+ cores |
|
||||||
|
| Ethereum archive-trace | ~4TB+ | 32GB+ | 8+ cores |
|
||||||
|
| L2 pruned | ~100-500GB | 4-8GB | 2+ cores |
|
||||||
|
| L2 archive | ~1-2TB | 8-16GB | 4+ cores |
|
||||||
|
|
||||||
|
**Note:** Requirements vary by chain. Check specific chain documentation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*This file is your complete operations and debugging reference. For additional user documentation, see README.md.*
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
abstract-mainnet-archive:
|
abstract-mainnet-archive:
|
||||||
image: ${ABSTRACT_EXTERNAL_NODE_IMAGE:-matterlabs/external-node}:${ABSTRACT_MAINNET_EXTERNAL_NODE_VERSION:-v29.7.0}
|
image: ${ABSTRACT_EXTERNAL_NODE_IMAGE:-matterlabs/external-node}:${ABSTRACT_MAINNET_EXTERNAL_NODE_VERSION:-v31.0.0}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -98,8 +98,8 @@ services:
|
|||||||
- traefik.http.routers.abstract-mainnet-external-node-archive.service=abstract-mainnet-external-node-archive
|
- traefik.http.routers.abstract-mainnet-external-node-archive.service=abstract-mainnet-external-node-archive
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-archive-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-archive-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-archive-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-archive-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-archive-ws.rule=Host(`$DOMAIN`) && (Path(`/abstract-mainnet-archive`) || Path(`/abstract-mainnet-archive/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-archive-ws.rule=Host(`$DOMAIN`) && (Path(`/abstract-mainnet-archive`) || Path(`/abstract-mainnet-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.abstract-mainnet-external-node-archive-ws.rule=(Path(`/abstract-mainnet-archive`) || Path(`/abstract-mainnet-archive/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.abstract-mainnet-external-node-archive-ws.rule=(Path(`/abstract-mainnet-archive`) || Path(`/abstract-mainnet-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.abstract-mainnet-external-node-archive-ws.middlewares=abstract-mainnet-external-node-archive-stripprefix, ipallowlist
|
- traefik.http.routers.abstract-mainnet-external-node-archive-ws.middlewares=abstract-mainnet-external-node-archive-stripprefix, ipallowlist
|
||||||
|
|
||||||
abstract-mainnet-archive-db:
|
abstract-mainnet-archive-db:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
abstract-mainnet:
|
abstract-mainnet:
|
||||||
image: ${ABSTRACT_EXTERNAL_NODE_IMAGE:-matterlabs/external-node}:${ABSTRACT_MAINNET_EXTERNAL_NODE_VERSION:-v29.7.0}
|
image: ${ABSTRACT_EXTERNAL_NODE_IMAGE:-matterlabs/external-node}:${ABSTRACT_MAINNET_EXTERNAL_NODE_VERSION:-v31.0.0}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -98,8 +98,8 @@ services:
|
|||||||
- traefik.http.routers.abstract-mainnet-external-node-pruned.service=abstract-mainnet-external-node-pruned
|
- traefik.http.routers.abstract-mainnet-external-node-pruned.service=abstract-mainnet-external-node-pruned
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-pruned-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-pruned-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-pruned-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-pruned-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-pruned-ws.rule=Host(`$DOMAIN`) && (Path(`/abstract-mainnet`) || Path(`/abstract-mainnet/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.abstract-mainnet-external-node-pruned-ws.rule=Host(`$DOMAIN`) && (Path(`/abstract-mainnet`) || Path(`/abstract-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.abstract-mainnet-external-node-pruned-ws.rule=(Path(`/abstract-mainnet`) || Path(`/abstract-mainnet/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.abstract-mainnet-external-node-pruned-ws.rule=(Path(`/abstract-mainnet`) || Path(`/abstract-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.abstract-mainnet-external-node-pruned-ws.middlewares=abstract-mainnet-external-node-pruned-stripprefix, ipallowlist
|
- traefik.http.routers.abstract-mainnet-external-node-pruned-ws.middlewares=abstract-mainnet-external-node-pruned-stripprefix, ipallowlist
|
||||||
|
|
||||||
abstract-mainnet-db:
|
abstract-mainnet-db:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
abstract-testnet-archive:
|
abstract-testnet-archive:
|
||||||
image: ${ABSTRACT_EXTERNAL_NODE_IMAGE:-matterlabs/external-node}:${ABSTRACT_TESTNET_EXTERNAL_NODE_VERSION:-v29.7.0}
|
image: ${ABSTRACT_EXTERNAL_NODE_IMAGE:-matterlabs/external-node}:${ABSTRACT_TESTNET_EXTERNAL_NODE_VERSION:-v31.0.0}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -98,8 +98,8 @@ services:
|
|||||||
- traefik.http.routers.abstract-testnet-external-node-archive.service=abstract-testnet-external-node-archive
|
- traefik.http.routers.abstract-testnet-external-node-archive.service=abstract-testnet-external-node-archive
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-archive-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-archive-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-archive-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-archive-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-archive-ws.rule=Host(`$DOMAIN`) && (Path(`/abstract-testnet-archive`) || Path(`/abstract-testnet-archive/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-archive-ws.rule=Host(`$DOMAIN`) && (Path(`/abstract-testnet-archive`) || Path(`/abstract-testnet-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.abstract-testnet-external-node-archive-ws.rule=(Path(`/abstract-testnet-archive`) || Path(`/abstract-testnet-archive/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.abstract-testnet-external-node-archive-ws.rule=(Path(`/abstract-testnet-archive`) || Path(`/abstract-testnet-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.abstract-testnet-external-node-archive-ws.middlewares=abstract-testnet-external-node-archive-stripprefix, ipallowlist
|
- traefik.http.routers.abstract-testnet-external-node-archive-ws.middlewares=abstract-testnet-external-node-archive-stripprefix, ipallowlist
|
||||||
|
|
||||||
abstract-testnet-archive-db:
|
abstract-testnet-archive-db:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
abstract-testnet:
|
abstract-testnet:
|
||||||
image: ${ABSTRACT_EXTERNAL_NODE_IMAGE:-matterlabs/external-node}:${ABSTRACT_TESTNET_EXTERNAL_NODE_VERSION:-v29.7.0}
|
image: ${ABSTRACT_EXTERNAL_NODE_IMAGE:-matterlabs/external-node}:${ABSTRACT_TESTNET_EXTERNAL_NODE_VERSION:-v31.0.0}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -98,8 +98,8 @@ services:
|
|||||||
- traefik.http.routers.abstract-testnet-external-node-pruned.service=abstract-testnet-external-node-pruned
|
- traefik.http.routers.abstract-testnet-external-node-pruned.service=abstract-testnet-external-node-pruned
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-pruned-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-pruned-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-pruned-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-pruned-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-pruned-ws.rule=Host(`$DOMAIN`) && (Path(`/abstract-testnet`) || Path(`/abstract-testnet/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.abstract-testnet-external-node-pruned-ws.rule=Host(`$DOMAIN`) && (Path(`/abstract-testnet`) || Path(`/abstract-testnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.abstract-testnet-external-node-pruned-ws.rule=(Path(`/abstract-testnet`) || Path(`/abstract-testnet/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.abstract-testnet-external-node-pruned-ws.rule=(Path(`/abstract-testnet`) || Path(`/abstract-testnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.abstract-testnet-external-node-pruned-ws.middlewares=abstract-testnet-external-node-pruned-stripprefix, ipallowlist
|
- traefik.http.routers.abstract-testnet-external-node-pruned-ws.middlewares=abstract-testnet-external-node-pruned-stripprefix, ipallowlist
|
||||||
|
|
||||||
abstract-testnet-db:
|
abstract-testnet-db:
|
||||||
|
|||||||
5
arb/apechain/arbitrum-one/baseConfig.json
Normal file
5
arb/apechain/arbitrum-one/baseConfig.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"chain": {
|
||||||
|
"info-json": "[{\"chain-id\": 33139, \"parent-chain-id\": 42161, \"chain-name\": \"apechain\", \"chain-config\": {\"chainId\": 33139, \"homesteadBlock\": 0, \"daoForkBlock\": null, \"daoForkSupport\": true, \"eip150Block\": 0, \"eip150Hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\", \"eip155Block\": 0, \"eip158Block\": 0, \"byzantiumBlock\": 0, \"constantinopleBlock\": 0, \"petersburgBlock\": 0, \"istanbulBlock\": 0, \"muirGlacierBlock\": 0, \"berlinBlock\": 0, \"londonBlock\": 0, \"clique\": {\"period\": 0, \"epoch\": 0}, \"arbitrum\": {\"EnableArbOS\": true, \"AllowDebugPrecompiles\": false, \"DataAvailabilityCommittee\": false, \"InitialArbOSVersion\": 31, \"EigenDA\": false, \"InitialChainOwner\": \"0x5737cdbb3a67001441c0da8b86e6b1826705601c\", \"GenesisBlockNum\": 0}}, \"rollup\": {\"bridge\": \"0x6B71AFb4b7725227ab944c96FE018AB9dc0434b8\", \"inbox\": \"0x1B98e4ED82Ee1a91A65a38C690e2266364064D15\", \"sequencer-inbox\": \"0xE6a92Ae29E24C343eE66A2B3D3ECB783d65E4a3C\", \"rollup\": \"0x374de579AE15aD59eD0519aeAf1A23F348Df259c\", \"validator-utils\": \"0xaB36aec5517C346D21b9C19429BAA5aa87D17fCa\", \"validator-wallet-creator\": \"0x5a6C98F6A60BDC02cE4d8AD43b4Fc88Fe5b38856\", \"deployed-at\": 247653199}, \"parent-chain-is-arbitrum\": true}]"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
alephzero-mainnet-archive:
|
alephzero-mainnet-archive:
|
||||||
image: ${ALEPHZERO_NITRO_IMAGE:-offchainlabs/nitro-node}:${ALEPHZERO_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ALEPHZERO_NITRO_IMAGE:-offchainlabs/nitro-node}:${ALEPHZERO_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.alephzero.raas.gelato.cloud
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.alephzero.raas.gelato.cloud
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x1411949971076304187394088912578077660717096867958
|
|
||||||
- --node.feed.input.url=wss://feed.alephzero.raas.gelato.cloud
|
- --node.feed.input.url=wss://feed.alephzero.raas.gelato.cloud
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
alephzero-mainnet:
|
alephzero-mainnet:
|
||||||
image: ${ALEPHZERO_NITRO_IMAGE:-offchainlabs/nitro-node}:${ALEPHZERO_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ALEPHZERO_NITRO_IMAGE:-offchainlabs/nitro-node}:${ALEPHZERO_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.alephzero.raas.gelato.cloud
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.alephzero.raas.gelato.cloud
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x1411949971076304187394088912578077660717096867958
|
|
||||||
- --node.feed.input.url=wss://feed.alephzero.raas.gelato.cloud
|
- --node.feed.input.url=wss://feed.alephzero.raas.gelato.cloud
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
alephzero-sepolia-archive:
|
alephzero-sepolia-archive:
|
||||||
image: ${ALEPHZERO_NITRO_IMAGE:-offchainlabs/nitro-node}:${ALEPHZERO_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ALEPHZERO_NITRO_IMAGE:-offchainlabs/nitro-node}:${ALEPHZERO_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.alephzero-testnet.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.alephzero-testnet.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x130937498521962644184395825246273622310592356541
|
|
||||||
- --node.feed.input.url=wss://feed.alephzero-testnet.gelato.digital
|
- --node.feed.input.url=wss://feed.alephzero-testnet.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
alephzero-sepolia:
|
alephzero-sepolia:
|
||||||
image: ${ALEPHZERO_NITRO_IMAGE:-offchainlabs/nitro-node}:${ALEPHZERO_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ALEPHZERO_NITRO_IMAGE:-offchainlabs/nitro-node}:${ALEPHZERO_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.alephzero-testnet.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.alephzero-testnet.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x130937498521962644184395825246273622310592356541
|
|
||||||
- --node.feed.input.url=wss://feed.alephzero-testnet.gelato.digital
|
- --node.feed.input.url=wss://feed.alephzero-testnet.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
144
arb/nitro/apechain-mainnet-nitro-archive-pebble-hash.yml
Normal file
144
arb/nitro/apechain-mainnet-nitro-archive-pebble-hash.yml
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/apechain-mainnet-nitro-archive-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/apechain-mainnet-archive \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
apechain-mainnet-archive:
|
||||||
|
image: ${APECHAIN_NITRO_IMAGE:-public.ecr.aws/i6b2w2n6/nitro-node}:${APECHAIN_MAINNET_NITRO_VERSION:-apechain-v3.5.6}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --conf.file=/config/baseConfig.json
|
||||||
|
- --execution.caching.archive=true
|
||||||
|
- --execution.caching.database-cache=${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.forwarding-target=https://rpc.apechain.com/http
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.data-availability.enable=true
|
||||||
|
- --node.data-availability.rest-aggregator.enable=true
|
||||||
|
- --node.data-availability.rest-aggregator.urls=https://apechain.calderachain.xyz/rest-aggregator
|
||||||
|
- --node.feed.input.url=wss://apechain.calderachain.xyz/feed
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.connection.url=https://arb1.arbitrum.io/rpc
|
||||||
|
- --persistent.chain=/root/.arbitrum/apechain-mainnet-archive
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_DATA:-apechain-mainnet-nitro-archive-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./arb/apechain/arbitrum-one:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.apechain-mainnet-nitro-archive-pebble-hash-stripprefix.stripprefix.prefixes=/apechain-mainnet-archive
|
||||||
|
- traefik.http.services.apechain-mainnet-nitro-archive-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/apechain-mainnet-archive`) || Path(`/apechain-mainnet-archive/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.rule=Path(`/apechain-mainnet-archive`) || Path(`/apechain-mainnet-archive/`)}
|
||||||
|
- traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.middlewares=apechain-mainnet-nitro-archive-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
apechain-mainnet-nitro-archive-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: apechain
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
146
arb/nitro/apechain-mainnet-nitro-pruned-pebble-path.yml
Normal file
146
arb/nitro/apechain-mainnet-nitro-pruned-pebble-path.yml
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/apechain-mainnet-nitro-pruned-pebble-path.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/apechain-mainnet \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
apechain-mainnet:
|
||||||
|
image: ${APECHAIN_NITRO_IMAGE:-public.ecr.aws/i6b2w2n6/nitro-node}:${APECHAIN_MAINNET_NITRO_VERSION:-apechain-v3.5.6}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --conf.file=/config/baseConfig.json
|
||||||
|
- --execution.caching.archive=${APECHAIN_MAINNET_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.state-scheme=path
|
||||||
|
- --execution.caching.trie-clean-cache=${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.forwarding-target=https://rpc.apechain.com/http
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.data-availability.enable=true
|
||||||
|
- --node.data-availability.rest-aggregator.enable=true
|
||||||
|
- --node.data-availability.rest-aggregator.urls=https://apechain.calderachain.xyz/rest-aggregator
|
||||||
|
- --node.feed.input.url=wss://apechain.calderachain.xyz/feed
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.connection.url=https://arb1.arbitrum.io/rpc
|
||||||
|
- --persistent.chain=/root/.arbitrum/apechain-mainnet
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_DATA:-apechain-mainnet-nitro-pruned-pebble-path}:/root/.arbitrum
|
||||||
|
- ./arb/apechain/arbitrum-one:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.apechain-mainnet-nitro-pruned-pebble-path-stripprefix.stripprefix.prefixes=/apechain-mainnet
|
||||||
|
- traefik.http.services.apechain-mainnet-nitro-pruned-pebble-path.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/apechain-mainnet`) || Path(`/apechain-mainnet/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.rule=Path(`/apechain-mainnet`) || Path(`/apechain-mainnet/`)}
|
||||||
|
- traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.middlewares=apechain-mainnet-nitro-pruned-pebble-path-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
apechain-mainnet-nitro-pruned-pebble-path:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: apechain
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
# not compatible with path state scheme
|
||||||
|
- name: debug_traceBlockByHash
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-nova-archive:
|
arbitrum-nova-archive:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
142
arb/nitro/arbitrum-nova-nitro-archive-pebble-path.yml
Normal file
142
arb/nitro/arbitrum-nova-nitro-archive-pebble-path.yml
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/arbitrum-nova-nitro-archive-pebble-path.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arbitrum-nova-archive \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arbitrum-nova-archive:
|
||||||
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --chain.id=42170
|
||||||
|
- --execution.caching.archive=true
|
||||||
|
- --execution.caching.database-cache=${ARBITRUM_NOVA_NITRO_ARCHIVE_PEBBLE_PATH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${ARBITRUM_NOVA_NITRO_ARCHIVE_PEBBLE_PATH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.state-scheme=path
|
||||||
|
- --execution.caching.trie-clean-cache=${ARBITRUM_NOVA_NITRO_ARCHIVE_PEBBLE_PATH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${ARBITRUM_NOVA_NITRO_ARCHIVE_PEBBLE_PATH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_MAINNET_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/arbitrum-nova-archive
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARBITRUM_NOVA_NITRO_ARCHIVE_PEBBLE_PATH_DATA:-arbitrum-nova-nitro-archive-pebble-path}:/root/.arbitrum
|
||||||
|
- ./tmp/arbitrum-nova-archive:/tmp
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arbitrum-nova-nitro-archive-pebble-path-stripprefix.stripprefix.prefixes=/arbitrum-nova-archive
|
||||||
|
- traefik.http.services.arbitrum-nova-nitro-archive-pebble-path.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-archive-pebble-path.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-archive-pebble-path.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-archive-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-nova-archive`) || Path(`/arbitrum-nova-archive/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arbitrum-nova-nitro-archive-pebble-path.rule=Path(`/arbitrum-nova-archive`) || Path(`/arbitrum-nova-archive/`)}
|
||||||
|
- traefik.http.routers.arbitrum-nova-nitro-archive-pebble-path.middlewares=arbitrum-nova-nitro-archive-pebble-path-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arbitrum-nova-nitro-archive-pebble-path:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: arbitrum-nova
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
# not compatible with path state scheme
|
||||||
|
- name: debug_traceBlockByHash
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
141
arb/nitro/arbitrum-nova-nitro-minimal-pebble-hash.prune.yml
Normal file
141
arb/nitro/arbitrum-nova-nitro-minimal-pebble-hash.prune.yml
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/arbitrum-nova-nitro-minimal-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arbitrum-nova-minimal \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arbitrum-nova-minimal:
|
||||||
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --chain.id=42170
|
||||||
|
- --execution.caching.archive=${ARBITRUM_NOVA_MINIMAL_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --init.prune=minimal
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_MAINNET_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/arbitrum-nova-minimal
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_DATA:-arbitrum-nova-nitro-minimal-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./tmp/arbitrum-nova-minimal:/tmp
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arbitrum-nova-nitro-minimal-pebble-hash-stripprefix.stripprefix.prefixes=/arbitrum-nova-minimal
|
||||||
|
- traefik.http.services.arbitrum-nova-nitro-minimal-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-nova-minimal`) || Path(`/arbitrum-nova-minimal/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.rule=Path(`/arbitrum-nova-minimal`) || Path(`/arbitrum-nova-minimal/`)}
|
||||||
|
- traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.middlewares=arbitrum-nova-nitro-minimal-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arbitrum-nova-nitro-minimal-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: arbitrum-nova
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
140
arb/nitro/arbitrum-nova-nitro-minimal-pebble-hash.yml
Normal file
140
arb/nitro/arbitrum-nova-nitro-minimal-pebble-hash.yml
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/arbitrum-nova-nitro-minimal-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arbitrum-nova-minimal \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arbitrum-nova-minimal:
|
||||||
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --chain.id=42170
|
||||||
|
- --execution.caching.archive=${ARBITRUM_NOVA_MINIMAL_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_MAINNET_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/arbitrum-nova-minimal
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARBITRUM_NOVA_NITRO_MINIMAL_PEBBLE_HASH_DATA:-arbitrum-nova-nitro-minimal-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./tmp/arbitrum-nova-minimal:/tmp
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arbitrum-nova-nitro-minimal-pebble-hash-stripprefix.stripprefix.prefixes=/arbitrum-nova-minimal
|
||||||
|
- traefik.http.services.arbitrum-nova-nitro-minimal-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-nova-minimal`) || Path(`/arbitrum-nova-minimal/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.rule=Path(`/arbitrum-nova-minimal`) || Path(`/arbitrum-nova-minimal/`)}
|
||||||
|
- traefik.http.routers.arbitrum-nova-nitro-minimal-pebble-hash.middlewares=arbitrum-nova-nitro-minimal-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arbitrum-nova-nitro-minimal-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: arbitrum-nova
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-nova:
|
arbitrum-nova:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-nova:
|
arbitrum-nova:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_NOVA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-one-archive:
|
arbitrum-one-archive:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-one-archive:
|
arbitrum-one-archive:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
142
arb/nitro/arbitrum-one-nitro-archive-pebble-path.yml
Normal file
142
arb/nitro/arbitrum-one-nitro-archive-pebble-path.yml
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/arbitrum-one-nitro-archive-pebble-path.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arbitrum-one-archive \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arbitrum-one-archive:
|
||||||
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --chain.id=42161
|
||||||
|
- --execution.caching.archive=true
|
||||||
|
- --execution.caching.database-cache=${ARBITRUM_ONE_NITRO_ARCHIVE_PEBBLE_PATH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${ARBITRUM_ONE_NITRO_ARCHIVE_PEBBLE_PATH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.state-scheme=path
|
||||||
|
- --execution.caching.trie-clean-cache=${ARBITRUM_ONE_NITRO_ARCHIVE_PEBBLE_PATH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${ARBITRUM_ONE_NITRO_ARCHIVE_PEBBLE_PATH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_MAINNET_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/arbitrum-one-archive
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARBITRUM_ONE_NITRO_ARCHIVE_PEBBLE_PATH_DATA:-arbitrum-one-nitro-archive-pebble-path}:/root/.arbitrum
|
||||||
|
- ./tmp/arbitrum-one-archive:/tmp
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arbitrum-one-nitro-archive-pebble-path-stripprefix.stripprefix.prefixes=/arbitrum-one-archive
|
||||||
|
- traefik.http.services.arbitrum-one-nitro-archive-pebble-path.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-archive-pebble-path.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-archive-pebble-path.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-archive-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-one-archive`) || Path(`/arbitrum-one-archive/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arbitrum-one-nitro-archive-pebble-path.rule=Path(`/arbitrum-one-archive`) || Path(`/arbitrum-one-archive/`)}
|
||||||
|
- traefik.http.routers.arbitrum-one-nitro-archive-pebble-path.middlewares=arbitrum-one-nitro-archive-pebble-path-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arbitrum-one-nitro-archive-pebble-path:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: arbitrum
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
# not compatible with path state scheme
|
||||||
|
- name: debug_traceBlockByHash
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
141
arb/nitro/arbitrum-one-nitro-minimal-pebble-hash.prune.yml
Normal file
141
arb/nitro/arbitrum-one-nitro-minimal-pebble-hash.prune.yml
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/arbitrum-one-nitro-minimal-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arbitrum-one-minimal \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arbitrum-one-minimal:
|
||||||
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --chain.id=42161
|
||||||
|
- --execution.caching.archive=${ARBITRUM_ONE_MINIMAL_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --init.prune=minimal
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_MAINNET_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/arbitrum-one-minimal
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_DATA:-arbitrum-one-nitro-minimal-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./tmp/arbitrum-one-minimal:/tmp
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arbitrum-one-nitro-minimal-pebble-hash-stripprefix.stripprefix.prefixes=/arbitrum-one-minimal
|
||||||
|
- traefik.http.services.arbitrum-one-nitro-minimal-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-one-minimal`) || Path(`/arbitrum-one-minimal/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.rule=Path(`/arbitrum-one-minimal`) || Path(`/arbitrum-one-minimal/`)}
|
||||||
|
- traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.middlewares=arbitrum-one-nitro-minimal-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arbitrum-one-nitro-minimal-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: arbitrum
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
140
arb/nitro/arbitrum-one-nitro-minimal-pebble-hash.yml
Normal file
140
arb/nitro/arbitrum-one-nitro-minimal-pebble-hash.yml
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/arbitrum-one-nitro-minimal-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arbitrum-one-minimal \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arbitrum-one-minimal:
|
||||||
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --chain.id=42161
|
||||||
|
- --execution.caching.archive=${ARBITRUM_ONE_MINIMAL_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_MAINNET_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/arbitrum-one-minimal
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARBITRUM_ONE_NITRO_MINIMAL_PEBBLE_HASH_DATA:-arbitrum-one-nitro-minimal-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./tmp/arbitrum-one-minimal:/tmp
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arbitrum-one-nitro-minimal-pebble-hash-stripprefix.stripprefix.prefixes=/arbitrum-one-minimal
|
||||||
|
- traefik.http.services.arbitrum-one-nitro-minimal-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-one-minimal`) || Path(`/arbitrum-one-minimal/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.rule=Path(`/arbitrum-one-minimal`) || Path(`/arbitrum-one-minimal/`)}
|
||||||
|
- traefik.http.routers.arbitrum-one-nitro-minimal-pebble-hash.middlewares=arbitrum-one-nitro-minimal-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arbitrum-one-nitro-minimal-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: arbitrum
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-one:
|
arbitrum-one:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-one:
|
arbitrum-one:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_ONE_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-sepolia-archive:
|
arbitrum-sepolia-archive:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
141
arb/nitro/arbitrum-sepolia-nitro-minimal-pebble-hash.prune.yml
Normal file
141
arb/nitro/arbitrum-sepolia-nitro-minimal-pebble-hash.prune.yml
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/arbitrum-sepolia-nitro-minimal-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arbitrum-sepolia-minimal \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arbitrum-sepolia-minimal:
|
||||||
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --chain.id=421614
|
||||||
|
- --execution.caching.archive=${ARBITRUM_SEPOLIA_MINIMAL_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --init.prune=minimal
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_SEPOLIA_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/arbitrum-sepolia-minimal
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_DATA:-arbitrum-sepolia-nitro-minimal-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./tmp/arbitrum-sepolia-minimal:/tmp
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arbitrum-sepolia-nitro-minimal-pebble-hash-stripprefix.stripprefix.prefixes=/arbitrum-sepolia-minimal
|
||||||
|
- traefik.http.services.arbitrum-sepolia-nitro-minimal-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-sepolia-minimal`) || Path(`/arbitrum-sepolia-minimal/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.rule=Path(`/arbitrum-sepolia-minimal`) || Path(`/arbitrum-sepolia-minimal/`)}
|
||||||
|
- traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.middlewares=arbitrum-sepolia-nitro-minimal-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arbitrum-sepolia-nitro-minimal-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: arbitrum-sepolia
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
140
arb/nitro/arbitrum-sepolia-nitro-minimal-pebble-hash.yml
Normal file
140
arb/nitro/arbitrum-sepolia-nitro-minimal-pebble-hash.yml
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/arbitrum-sepolia-nitro-minimal-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arbitrum-sepolia-minimal \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arbitrum-sepolia-minimal:
|
||||||
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --chain.id=421614
|
||||||
|
- --execution.caching.archive=${ARBITRUM_SEPOLIA_MINIMAL_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_SEPOLIA_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/arbitrum-sepolia-minimal
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARBITRUM_SEPOLIA_NITRO_MINIMAL_PEBBLE_HASH_DATA:-arbitrum-sepolia-nitro-minimal-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./tmp/arbitrum-sepolia-minimal:/tmp
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arbitrum-sepolia-nitro-minimal-pebble-hash-stripprefix.stripprefix.prefixes=/arbitrum-sepolia-minimal
|
||||||
|
- traefik.http.services.arbitrum-sepolia-nitro-minimal-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-sepolia-minimal`) || Path(`/arbitrum-sepolia-minimal/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.rule=Path(`/arbitrum-sepolia-minimal`) || Path(`/arbitrum-sepolia-minimal/`)}
|
||||||
|
- traefik.http.routers.arbitrum-sepolia-nitro-minimal-pebble-hash.middlewares=arbitrum-sepolia-nitro-minimal-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arbitrum-sepolia-nitro-minimal-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: arbitrum-sepolia
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-sepolia:
|
arbitrum-sepolia:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
arbitrum-sepolia:
|
arbitrum-sepolia:
|
||||||
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${ARBITRUM_NITRO_IMAGE:-offchainlabs/nitro-node}:${ARBITRUM_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
connext-sepolia-archive:
|
connext-sepolia-archive:
|
||||||
image: ${CONNEXT_NITRO_IMAGE:-offchainlabs/nitro-node}:${CONNEXT_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${CONNEXT_NITRO_IMAGE:-offchainlabs/nitro-node}:${CONNEXT_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.connext-sepolia.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.connext-sepolia.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x727095791318912381473707332248435763608420056676
|
|
||||||
- --node.feed.input.url=wss://feed.connext-sepolia.gelato.digital
|
- --node.feed.input.url=wss://feed.connext-sepolia.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
connext-sepolia:
|
connext-sepolia:
|
||||||
image: ${CONNEXT_NITRO_IMAGE:-offchainlabs/nitro-node}:${CONNEXT_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${CONNEXT_NITRO_IMAGE:-offchainlabs/nitro-node}:${CONNEXT_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.connext-sepolia.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.connext-sepolia.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x727095791318912381473707332248435763608420056676
|
|
||||||
- --node.feed.input.url=wss://feed.connext-sepolia.gelato.digital
|
- --node.feed.input.url=wss://feed.connext-sepolia.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
everclear-mainnet-archive:
|
everclear-mainnet-archive:
|
||||||
image: ${EVERCLEAR_NITRO_IMAGE:-offchainlabs/nitro-node}:${EVERCLEAR_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${EVERCLEAR_NITRO_IMAGE:-offchainlabs/nitro-node}:${EVERCLEAR_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.everclear.raas.gelato.cloud
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.everclear.raas.gelato.cloud
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x727095791318912381473707332248435763608420056676
|
|
||||||
- --node.feed.input.url=wss://feed.everclear.raas.gelato.cloud
|
- --node.feed.input.url=wss://feed.everclear.raas.gelato.cloud
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
everclear-mainnet:
|
everclear-mainnet:
|
||||||
image: ${EVERCLEAR_NITRO_IMAGE:-offchainlabs/nitro-node}:${EVERCLEAR_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${EVERCLEAR_NITRO_IMAGE:-offchainlabs/nitro-node}:${EVERCLEAR_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.everclear.raas.gelato.cloud
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.everclear.raas.gelato.cloud
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x727095791318912381473707332248435763608420056676
|
|
||||||
- --node.feed.input.url=wss://feed.everclear.raas.gelato.cloud
|
- --node.feed.input.url=wss://feed.everclear.raas.gelato.cloud
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
opencampuscodex-sepolia-archive:
|
opencampuscodex-sepolia-archive:
|
||||||
image: ${OPENCAMPUSCODEX_NITRO_IMAGE:-offchainlabs/nitro-node}:${OPENCAMPUSCODEX_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${OPENCAMPUSCODEX_NITRO_IMAGE:-offchainlabs/nitro-node}:${OPENCAMPUSCODEX_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ARBITRUM_SEPOLIA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.open-campus-codex.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.open-campus-codex.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0xe347C1223381b9Dcd6c0F61cf81c90175A7Bae77
|
|
||||||
- --node.feed.input.url=wss://feed.open-campus-codex.gelato.digital
|
- --node.feed.input.url=wss://feed.open-campus-codex.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
opencampuscodex-sepolia:
|
opencampuscodex-sepolia:
|
||||||
image: ${OPENCAMPUSCODEX_NITRO_IMAGE:-offchainlabs/nitro-node}:${OPENCAMPUSCODEX_SEPOLIA_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${OPENCAMPUSCODEX_NITRO_IMAGE:-offchainlabs/nitro-node}:${OPENCAMPUSCODEX_SEPOLIA_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ARBITRUM_SEPOLIA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.open-campus-codex.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.open-campus-codex.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0xe347C1223381b9Dcd6c0F61cf81c90175A7Bae77
|
|
||||||
- --node.feed.input.url=wss://feed.open-campus-codex.gelato.digital
|
- --node.feed.input.url=wss://feed.open-campus-codex.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
playblock-mainnet-archive:
|
playblock-mainnet-archive:
|
||||||
image: ${PLAYBLOCK_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLAYBLOCK_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${PLAYBLOCK_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLAYBLOCK_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ARBITRUM_NOVA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.playblock.io
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.playblock.io
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x1297541082195356755105700451499873350464260779639
|
|
||||||
- --node.feed.input.url=wss://feed.playblock.io
|
- --node.feed.input.url=wss://feed.playblock.io
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
playblock-mainnet:
|
playblock-mainnet:
|
||||||
image: ${PLAYBLOCK_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLAYBLOCK_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${PLAYBLOCK_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLAYBLOCK_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ARBITRUM_NOVA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.playblock.io
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.playblock.io
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x1297541082195356755105700451499873350464260779639
|
|
||||||
- --node.feed.input.url=wss://feed.playblock.io
|
- --node.feed.input.url=wss://feed.playblock.io
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
plume-mainnet-archive:
|
plume-mainnet-archive:
|
||||||
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das-plume-mainnet-1.t.conduit.xyz
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das-plume-mainnet-1.t.conduit.xyz
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x85eC1b9138a8b9659A51e2b51bb0861901040b59
|
|
||||||
- --node.feed.input.url=wss://relay-plume-mainnet-1.t.conduit.xyz
|
- --node.feed.input.url=wss://relay-plume-mainnet-1.t.conduit.xyz
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
145
arb/nitro/plume-mainnet-nitro-archive-pebble-hash.yml
Normal file
145
arb/nitro/plume-mainnet-nitro-archive-pebble-hash.yml
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/plume-mainnet-nitro-archive-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/plume-mainnet-archive \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
plume-mainnet-archive:
|
||||||
|
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --conf.file=/config/baseConfig.json
|
||||||
|
- --execution.caching.archive=true
|
||||||
|
- --execution.caching.database-cache=${PLUME_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${PLUME_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${PLUME_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${PLUME_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.forwarding-target=https://rpc.plume.org
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.da.anytrust.enable=true
|
||||||
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
|
- --node.da.anytrust.rest-aggregator.urls=https://das-plume-mainnet-1.t.conduit.xyz
|
||||||
|
- --node.feed.input.url=wss://relay-plume-mainnet-1.t.conduit.xyz
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_MAINNET_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/plume-mainnet-archive
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${PLUME_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_DATA:-plume-mainnet-nitro-archive-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./arb/plume/mainnet:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.plume-mainnet-nitro-archive-pebble-hash-stripprefix.stripprefix.prefixes=/plume-mainnet-archive
|
||||||
|
- traefik.http.services.plume-mainnet-nitro-archive-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-mainnet-nitro-archive-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-mainnet-nitro-archive-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-mainnet-nitro-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/plume-mainnet-archive`) || Path(`/plume-mainnet-archive/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.plume-mainnet-nitro-archive-pebble-hash.rule=Path(`/plume-mainnet-archive`) || Path(`/plume-mainnet-archive/`)}
|
||||||
|
- traefik.http.routers.plume-mainnet-nitro-archive-pebble-hash.middlewares=plume-mainnet-nitro-archive-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
plume-mainnet-nitro-archive-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: plume
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
144
arb/nitro/plume-mainnet-nitro-pruned-leveldb-hash.yml
Normal file
144
arb/nitro/plume-mainnet-nitro-pruned-leveldb-hash.yml
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/plume-mainnet-nitro-pruned-leveldb-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/plume-mainnet \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
plume-mainnet:
|
||||||
|
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --conf.file=/config/baseConfig.json
|
||||||
|
- --execution.caching.archive=${PLUME_MAINNET_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${PLUME_MAINNET_NITRO_PRUNED_LEVELDB_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${PLUME_MAINNET_NITRO_PRUNED_LEVELDB_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${PLUME_MAINNET_NITRO_PRUNED_LEVELDB_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${PLUME_MAINNET_NITRO_PRUNED_LEVELDB_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.forwarding-target=https://rpc.plume.org
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.da.anytrust.enable=true
|
||||||
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
|
- --node.da.anytrust.rest-aggregator.urls=https://das-plume-mainnet-1.t.conduit.xyz
|
||||||
|
- --node.feed.input.url=wss://relay-plume-mainnet-1.t.conduit.xyz
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_MAINNET_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/plume-mainnet
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${PLUME_MAINNET_NITRO_PRUNED_LEVELDB_HASH_DATA:-plume-mainnet-nitro-pruned-leveldb-hash}:/root/.arbitrum
|
||||||
|
- ./arb/plume/mainnet:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.plume-mainnet-nitro-pruned-leveldb-hash-stripprefix.stripprefix.prefixes=/plume-mainnet
|
||||||
|
- traefik.http.services.plume-mainnet-nitro-pruned-leveldb-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-mainnet-nitro-pruned-leveldb-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-mainnet-nitro-pruned-leveldb-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-mainnet-nitro-pruned-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/plume-mainnet`) || Path(`/plume-mainnet/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.plume-mainnet-nitro-pruned-leveldb-hash.rule=Path(`/plume-mainnet`) || Path(`/plume-mainnet/`)}
|
||||||
|
- traefik.http.routers.plume-mainnet-nitro-pruned-leveldb-hash.middlewares=plume-mainnet-nitro-pruned-leveldb-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
plume-mainnet-nitro-pruned-leveldb-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: plume
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
plume-mainnet:
|
plume-mainnet:
|
||||||
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das-plume-mainnet-1.t.conduit.xyz
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das-plume-mainnet-1.t.conduit.xyz
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x85eC1b9138a8b9659A51e2b51bb0861901040b59
|
|
||||||
- --node.feed.input.url=wss://relay-plume-mainnet-1.t.conduit.xyz
|
- --node.feed.input.url=wss://relay-plume-mainnet-1.t.conduit.xyz
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
plume-testnet-archive:
|
plume-testnet-archive:
|
||||||
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_TESTNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_TESTNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das-plume-testnet-1.t.conduit.xyz
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das-plume-testnet-1.t.conduit.xyz
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0xbCa991f1831bE1F1E7e5576d5F84A645e70F3E4d
|
|
||||||
- --node.feed.input.url=wss://relay-plume-testnet-1.t.conduit.xyz
|
- --node.feed.input.url=wss://relay-plume-testnet-1.t.conduit.xyz
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
145
arb/nitro/plume-testnet-nitro-archive-pebble-hash.yml
Normal file
145
arb/nitro/plume-testnet-nitro-archive-pebble-hash.yml
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/plume-testnet-nitro-archive-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/plume-testnet-archive \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
plume-testnet-archive:
|
||||||
|
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_TESTNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --conf.file=/config/baseConfig.json
|
||||||
|
- --execution.caching.archive=true
|
||||||
|
- --execution.caching.database-cache=${PLUME_TESTNET_NITRO_ARCHIVE_PEBBLE_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${PLUME_TESTNET_NITRO_ARCHIVE_PEBBLE_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${PLUME_TESTNET_NITRO_ARCHIVE_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${PLUME_TESTNET_NITRO_ARCHIVE_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.forwarding-target=https://testnet-rpc.plume.org
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.da.anytrust.enable=true
|
||||||
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
|
- --node.da.anytrust.rest-aggregator.urls=https://das-plume-testnet-1.t.conduit.xyz
|
||||||
|
- --node.feed.input.url=wss://relay-plume-testnet-1.t.conduit.xyz
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_SEPOLIA_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/plume-testnet-archive
|
||||||
|
- --persistent.db-engine=pebble
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${PLUME_TESTNET_NITRO_ARCHIVE_PEBBLE_HASH_DATA:-plume-testnet-nitro-archive-pebble-hash}:/root/.arbitrum
|
||||||
|
- ./arb/plume/testnet:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.plume-testnet-nitro-archive-pebble-hash-stripprefix.stripprefix.prefixes=/plume-testnet-archive
|
||||||
|
- traefik.http.services.plume-testnet-nitro-archive-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-testnet-nitro-archive-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-testnet-nitro-archive-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-testnet-nitro-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/plume-testnet-archive`) || Path(`/plume-testnet-archive/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.plume-testnet-nitro-archive-pebble-hash.rule=Path(`/plume-testnet-archive`) || Path(`/plume-testnet-archive/`)}
|
||||||
|
- traefik.http.routers.plume-testnet-nitro-archive-pebble-hash.middlewares=plume-testnet-nitro-archive-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
plume-testnet-nitro-archive-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: plume-testnet
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
144
arb/nitro/plume-testnet-nitro-pruned-leveldb-hash.yml
Normal file
144
arb/nitro/plume-testnet-nitro-pruned-leveldb-hash.yml
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arb/nitro/plume-testnet-nitro-pruned-leveldb-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/plume-testnet \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
plume-testnet:
|
||||||
|
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_TESTNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
command:
|
||||||
|
- --conf.file=/config/baseConfig.json
|
||||||
|
- --execution.caching.archive=${PLUME_TESTNET_ARCHIVE_DB:-false}
|
||||||
|
- --execution.caching.database-cache=${PLUME_TESTNET_NITRO_PRUNED_LEVELDB_HASH_DATABASE_CACHE:-2048}
|
||||||
|
- --execution.caching.snapshot-cache=${PLUME_TESTNET_NITRO_PRUNED_LEVELDB_HASH_SNAPSHOT_CACHE:-400}
|
||||||
|
- --execution.caching.trie-clean-cache=${PLUME_TESTNET_NITRO_PRUNED_LEVELDB_HASH_TRIE_CLEAN_CACHE:-600}
|
||||||
|
- --execution.caching.trie-dirty-cache=${PLUME_TESTNET_NITRO_PRUNED_LEVELDB_HASH_TRIE_DIRTY_CACHE:-1024}
|
||||||
|
- --execution.forwarding-target=https://testnet-rpc.plume.org
|
||||||
|
- --execution.rpc.gas-cap=5500000000
|
||||||
|
- --execution.rpc.log-history=0
|
||||||
|
- --execution.sequencer.enable=false
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,arb,txpool,debug
|
||||||
|
- --http.corsdomain=*
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --metrics
|
||||||
|
- --metrics-server.addr=0.0.0.0
|
||||||
|
- --metrics-server.port=6070
|
||||||
|
- --node.batch-poster.enable=false
|
||||||
|
- --node.da.anytrust.enable=true
|
||||||
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
|
- --node.da.anytrust.rest-aggregator.urls=https://das-plume-testnet-1.t.conduit.xyz
|
||||||
|
- --node.feed.input.url=wss://relay-plume-testnet-1.t.conduit.xyz
|
||||||
|
- --node.sequencer=false
|
||||||
|
- --node.staker.enable=false
|
||||||
|
- --parent-chain.blob-client.beacon-url=${ETHEREUM_SEPOLIA_BEACON_REST}
|
||||||
|
- --parent-chain.connection.url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
||||||
|
- --persistent.chain=/root/.arbitrum/plume-testnet
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${PLUME_TESTNET_NITRO_PRUNED_LEVELDB_HASH_DATA:-plume-testnet-nitro-pruned-leveldb-hash}:/root/.arbitrum
|
||||||
|
- ./arb/plume/testnet:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6070
|
||||||
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.plume-testnet-nitro-pruned-leveldb-hash-stripprefix.stripprefix.prefixes=/plume-testnet
|
||||||
|
- traefik.http.services.plume-testnet-nitro-pruned-leveldb-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-testnet-nitro-pruned-leveldb-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-testnet-nitro-pruned-leveldb-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.plume-testnet-nitro-pruned-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/plume-testnet`) || Path(`/plume-testnet/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.plume-testnet-nitro-pruned-leveldb-hash.rule=Path(`/plume-testnet`) || Path(`/plume-testnet/`)}
|
||||||
|
- traefik.http.routers.plume-testnet-nitro-pruned-leveldb-hash.middlewares=plume-testnet-nitro-pruned-leveldb-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
plume-testnet-nitro-pruned-leveldb-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: plume-testnet
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
plume-testnet:
|
plume-testnet:
|
||||||
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_TESTNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${PLUME_NITRO_IMAGE:-offchainlabs/nitro-node}:${PLUME_TESTNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das-plume-testnet-1.t.conduit.xyz
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das-plume-testnet-1.t.conduit.xyz
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0xbCa991f1831bE1F1E7e5576d5F84A645e70F3E4d
|
|
||||||
- --node.feed.input.url=wss://relay-plume-testnet-1.t.conduit.xyz
|
- --node.feed.input.url=wss://relay-plume-testnet-1.t.conduit.xyz
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
real-mainnet-archive:
|
real-mainnet-archive:
|
||||||
image: ${REAL_NITRO_IMAGE:-offchainlabs/nitro-node}:${REAL_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${REAL_NITRO_IMAGE:-offchainlabs/nitro-node}:${REAL_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.realforreal.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.realforreal.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x466813324240923703236721233648302990016039913376
|
|
||||||
- --node.feed.input.url=wss://feed.realforreal.gelato.digital
|
- --node.feed.input.url=wss://feed.realforreal.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
real-mainnet-archive:
|
real-mainnet-archive:
|
||||||
image: ${REAL_NITRO_IMAGE:-offchainlabs/nitro-node}:${REAL_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${REAL_NITRO_IMAGE:-offchainlabs/nitro-node}:${REAL_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.realforreal.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.realforreal.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x466813324240923703236721233648302990016039913376
|
|
||||||
- --node.feed.input.url=wss://feed.realforreal.gelato.digital
|
- --node.feed.input.url=wss://feed.realforreal.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
real-mainnet:
|
real-mainnet:
|
||||||
image: ${REAL_NITRO_IMAGE:-offchainlabs/nitro-node}:${REAL_MAINNET_NITRO_VERSION:-v3.9.5-66e42c4}
|
image: ${REAL_NITRO_IMAGE:-offchainlabs/nitro-node}:${REAL_MAINNET_NITRO_VERSION:-v3.11.0-a618155}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -67,12 +67,9 @@ services:
|
|||||||
- --metrics-server.addr=0.0.0.0
|
- --metrics-server.addr=0.0.0.0
|
||||||
- --metrics-server.port=6070
|
- --metrics-server.port=6070
|
||||||
- --node.batch-poster.enable=false
|
- --node.batch-poster.enable=false
|
||||||
- --node.da-provider.enable=false
|
- --node.da.anytrust.enable=true
|
||||||
- --node.data-availability.enable=true
|
- --node.da.anytrust.rest-aggregator.enable=true
|
||||||
- --node.data-availability.parent-chain-node-url=${ETHEREUM_MAINNET_EXECUTION_RPC}
|
- --node.da.anytrust.rest-aggregator.urls=https://das.realforreal.gelato.digital
|
||||||
- --node.data-availability.rest-aggregator.enable=true
|
|
||||||
- --node.data-availability.rest-aggregator.urls=https://das.realforreal.gelato.digital
|
|
||||||
- --node.data-availability.sequencer-inbox-address=0x466813324240923703236721233648302990016039913376
|
|
||||||
- --node.feed.input.url=wss://feed.realforreal.gelato.digital
|
- --node.feed.input.url=wss://feed.realforreal.gelato.digital
|
||||||
- --node.sequencer=false
|
- --node.sequencer=false
|
||||||
- --node.staker.enable=false
|
- --node.staker.enable=false
|
||||||
|
|||||||
181
arc/reth/arc-testnet-reth-archive-trace.yml
Normal file
181
arc/reth/arc-testnet-reth-archive-trace.yml
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arc/reth/arc-testnet-reth-archive-trace.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arc-testnet-archive \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arc-testnet-archive-consensus-init:
|
||||||
|
image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_TESTNET_CONSENSUS_VERSION:-0.7.2}
|
||||||
|
user: 0:0
|
||||||
|
entrypoint: [/usr/local/bin/arc-node-consensus, init]
|
||||||
|
command:
|
||||||
|
- --home=/data/consensus
|
||||||
|
restart: no
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARC_TESTNET_RETH_ARCHIVE_TRACE_CONSENSUS_DATA:-arc-testnet-reth-archive-trace-consensus}:/data/consensus
|
||||||
|
logging: *logging-defaults
|
||||||
|
|
||||||
|
arc-testnet-archive-sockets-init:
|
||||||
|
image: debian:bookworm-slim
|
||||||
|
entrypoint: [/bin/sh, -c]
|
||||||
|
command: [rm -f /sockets/*.ipc && chown 999:999 /sockets]
|
||||||
|
restart: no
|
||||||
|
depends_on:
|
||||||
|
arc-testnet-archive-consensus-init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- arc-testnet-reth-archive-trace-sockets:/sockets
|
||||||
|
logging: *logging-defaults
|
||||||
|
|
||||||
|
arc-testnet-archive:
|
||||||
|
image: ${ARC_RETH_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-execution}:${ARC_TESTNET_RETH_VERSION:-0.7.2}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
|
||||||
|
user: 0:0
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
- 9001
|
||||||
|
entrypoint: [/usr/local/bin/arc-node-execution, node]
|
||||||
|
command:
|
||||||
|
- --auth-ipc
|
||||||
|
- --auth-ipc.path=/sockets/auth.ipc
|
||||||
|
- --chain=arc-testnet
|
||||||
|
- --datadir=/data/execution
|
||||||
|
- --disable-discovery
|
||||||
|
- --enable-arc-rpc
|
||||||
|
- --http
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,txpool,trace,debug
|
||||||
|
- --http.port=8545
|
||||||
|
- --ipcpath=/sockets/reth.ipc
|
||||||
|
- --log.file.directory=/data/execution/logs
|
||||||
|
- --metrics=0.0.0.0:9001
|
||||||
|
- --rpc.forwarder=https://rpc.quicknode.testnet.arc.network/
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
depends_on:
|
||||||
|
arc-testnet-archive-sockets-init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARC_TESTNET_RETH_ARCHIVE_TRACE_EXECUTION_DATA:-arc-testnet-reth-archive-trace-execution}:/data/execution
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
- arc-testnet-reth-archive-trace-sockets:/sockets
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=9001
|
||||||
|
- prometheus-scrape.path=/metrics
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arc-testnet-reth-archive-trace-stripprefix.stripprefix.prefixes=/arc-testnet-archive
|
||||||
|
- traefik.http.services.arc-testnet-reth-archive-trace.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arc-testnet-reth-archive-trace.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arc-testnet-reth-archive-trace.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arc-testnet-reth-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/arc-testnet-archive`) || Path(`/arc-testnet-archive/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arc-testnet-reth-archive-trace.rule=Path(`/arc-testnet-archive`) || Path(`/arc-testnet-archive/`)}
|
||||||
|
- traefik.http.routers.arc-testnet-reth-archive-trace.middlewares=arc-testnet-reth-archive-trace-stripprefix, ipallowlist
|
||||||
|
shm_size: 2gb
|
||||||
|
|
||||||
|
arc-testnet-archive-node:
|
||||||
|
image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_TESTNET_CONSENSUS_VERSION:-0.7.2}
|
||||||
|
user: 0:0
|
||||||
|
expose:
|
||||||
|
- 31000
|
||||||
|
- 29000
|
||||||
|
entrypoint: [/usr/local/bin/arc-node-consensus, start]
|
||||||
|
command:
|
||||||
|
- --eth-socket=/sockets/reth.ipc
|
||||||
|
- --execution-persistence-backpressure
|
||||||
|
- --execution-persistence-backpressure-threshold=50
|
||||||
|
- --execution-socket=/sockets/auth.ipc
|
||||||
|
- --follow
|
||||||
|
- --follow.endpoint=https://rpc.blockdaemon.testnet.arc.network,wss=rpc.blockdaemon.testnet.arc.network/websocket
|
||||||
|
- --follow.endpoint=https://rpc.drpc.testnet.arc.network,wss=rpc.drpc.testnet.arc.network
|
||||||
|
- --follow.endpoint=https://rpc.quicknode.testnet.arc.network,wss=rpc.quicknode.testnet.arc.network
|
||||||
|
- --full
|
||||||
|
- --home=/data/consensus
|
||||||
|
- --metrics=0.0.0.0:29000
|
||||||
|
- --rpc.addr=0.0.0.0:31000
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
depends_on:
|
||||||
|
arc-testnet-archive-consensus-init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
arc-testnet-archive:
|
||||||
|
condition: service_started
|
||||||
|
restart: true
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARC_TESTNET_RETH_ARCHIVE_TRACE_CONSENSUS_DATA:-arc-testnet-reth-archive-trace-consensus}:/data/consensus
|
||||||
|
- arc-testnet-reth-archive-trace-sockets:/sockets
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=29000
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arc-testnet-reth-archive-trace-consensus:
|
||||||
|
arc-testnet-reth-archive-trace-execution:
|
||||||
|
arc-testnet-reth-archive-trace-sockets:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
chain: arc-testnet
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
- trace
|
||||||
|
methods:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content
|
||||||
|
...
|
||||||
182
arc/reth/arc-testnet-reth-pruned-trace.yml
Normal file
182
arc/reth/arc-testnet-reth-pruned-trace.yml
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:arc/reth/arc-testnet-reth-pruned-trace.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/arc-testnet \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
arc-testnet-consensus-init:
|
||||||
|
image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_TESTNET_CONSENSUS_VERSION:-0.7.2}
|
||||||
|
user: 0:0
|
||||||
|
entrypoint: [/usr/local/bin/arc-node-consensus, init]
|
||||||
|
command:
|
||||||
|
- --home=/data/consensus
|
||||||
|
restart: no
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARC_TESTNET_RETH_PRUNED_TRACE_CONSENSUS_DATA:-arc-testnet-reth-pruned-trace-consensus}:/data/consensus
|
||||||
|
logging: *logging-defaults
|
||||||
|
|
||||||
|
arc-testnet-sockets-init:
|
||||||
|
image: debian:bookworm-slim
|
||||||
|
entrypoint: [/bin/sh, -c]
|
||||||
|
command: [rm -f /sockets/*.ipc && chown 999:999 /sockets]
|
||||||
|
restart: no
|
||||||
|
depends_on:
|
||||||
|
arc-testnet-consensus-init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- arc-testnet-reth-pruned-trace-sockets:/sockets
|
||||||
|
logging: *logging-defaults
|
||||||
|
|
||||||
|
arc-testnet:
|
||||||
|
image: ${ARC_RETH_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-execution}:${ARC_TESTNET_RETH_VERSION:-0.7.2}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
|
||||||
|
user: 0:0
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
- 9001
|
||||||
|
entrypoint: [/usr/local/bin/arc-node-execution, node]
|
||||||
|
command:
|
||||||
|
- --auth-ipc
|
||||||
|
- --auth-ipc.path=/sockets/auth.ipc
|
||||||
|
- --chain=arc-testnet
|
||||||
|
- --datadir=/data/execution
|
||||||
|
- --disable-discovery
|
||||||
|
- --enable-arc-rpc
|
||||||
|
- --full
|
||||||
|
- --http
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,txpool,trace,debug
|
||||||
|
- --http.port=8545
|
||||||
|
- --ipcpath=/sockets/reth.ipc
|
||||||
|
- --log.file.directory=/data/execution/logs
|
||||||
|
- --metrics=0.0.0.0:9001
|
||||||
|
- --rpc.forwarder=https://rpc.quicknode.testnet.arc.network/
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
depends_on:
|
||||||
|
arc-testnet-sockets-init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARC_TESTNET_RETH_PRUNED_TRACE_EXECUTION_DATA:-arc-testnet-reth-pruned-trace-execution}:/data/execution
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
- arc-testnet-reth-pruned-trace-sockets:/sockets
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=9001
|
||||||
|
- prometheus-scrape.path=/metrics
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.arc-testnet-reth-pruned-trace-stripprefix.stripprefix.prefixes=/arc-testnet
|
||||||
|
- traefik.http.services.arc-testnet-reth-pruned-trace.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arc-testnet-reth-pruned-trace.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arc-testnet-reth-pruned-trace.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.arc-testnet-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/arc-testnet`) || Path(`/arc-testnet/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.arc-testnet-reth-pruned-trace.rule=Path(`/arc-testnet`) || Path(`/arc-testnet/`)}
|
||||||
|
- traefik.http.routers.arc-testnet-reth-pruned-trace.middlewares=arc-testnet-reth-pruned-trace-stripprefix, ipallowlist
|
||||||
|
shm_size: 2gb
|
||||||
|
|
||||||
|
arc-testnet-node:
|
||||||
|
image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_TESTNET_CONSENSUS_VERSION:-0.7.2}
|
||||||
|
user: 0:0
|
||||||
|
expose:
|
||||||
|
- 31000
|
||||||
|
- 29000
|
||||||
|
entrypoint: [/usr/local/bin/arc-node-consensus, start]
|
||||||
|
command:
|
||||||
|
- --eth-socket=/sockets/reth.ipc
|
||||||
|
- --execution-persistence-backpressure
|
||||||
|
- --execution-persistence-backpressure-threshold=50
|
||||||
|
- --execution-socket=/sockets/auth.ipc
|
||||||
|
- --follow
|
||||||
|
- --follow.endpoint=https://rpc.blockdaemon.testnet.arc.network,wss=rpc.blockdaemon.testnet.arc.network/websocket
|
||||||
|
- --follow.endpoint=https://rpc.drpc.testnet.arc.network,wss=rpc.drpc.testnet.arc.network
|
||||||
|
- --follow.endpoint=https://rpc.quicknode.testnet.arc.network,wss=rpc.quicknode.testnet.arc.network
|
||||||
|
- --full
|
||||||
|
- --home=/data/consensus
|
||||||
|
- --metrics=0.0.0.0:29000
|
||||||
|
- --rpc.addr=0.0.0.0:31000
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
depends_on:
|
||||||
|
arc-testnet-consensus-init:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
arc-testnet:
|
||||||
|
condition: service_started
|
||||||
|
restart: true
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${ARC_TESTNET_RETH_PRUNED_TRACE_CONSENSUS_DATA:-arc-testnet-reth-pruned-trace-consensus}:/data/consensus
|
||||||
|
- arc-testnet-reth-pruned-trace-sockets:/sockets
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=29000
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
arc-testnet-reth-pruned-trace-consensus:
|
||||||
|
arc-testnet-reth-pruned-trace-execution:
|
||||||
|
arc-testnet-reth-pruned-trace-sockets:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
chain: arc-testnet
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
- trace
|
||||||
|
methods:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content
|
||||||
|
...
|
||||||
6
avalanche/fuji/prune/C/config.json
Normal file
6
avalanche/fuji/prune/C/config.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"rpc-gas-cap": 2500000000,
|
||||||
|
"eth-rpc-gas-limit": 2500000000,
|
||||||
|
"offline-pruning-enabled": true,
|
||||||
|
"offline-pruning-data-directory": "/root/.avalanchego/offline-pruning"
|
||||||
|
}
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
avalanche-fuji-archive:
|
avalanche-fuji-archive:
|
||||||
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.0}
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -87,8 +87,8 @@ services:
|
|||||||
- traefik.http.routers.avalanche-fuji-go-archive-leveldb.service=avalanche-fuji-go-archive-leveldb
|
- traefik.http.routers.avalanche-fuji-go-archive-leveldb.service=avalanche-fuji-go-archive-leveldb
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji-archive`) || Path(`/avalanche-fuji-archive/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji-archive`) || Path(`/avalanche-fuji-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.rule=(Path(`/avalanche-fuji-archive`) || Path(`/avalanche-fuji-archive/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.rule=(Path(`/avalanche-fuji-archive`) || Path(`/avalanche-fuji-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.middlewares=avalanche-fuji-go-archive-leveldb-stripprefix, avalanche-fuji-go-archive-leveldb-set-ws-path, ipallowlist
|
- traefik.http.routers.avalanche-fuji-go-archive-leveldb-ws.middlewares=avalanche-fuji-go-archive-leveldb-stripprefix, avalanche-fuji-go-archive-leveldb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
118
avalanche/go/avalanche-fuji-go-pruned-leveldb.prune.yml
Normal file
118
avalanche/go/avalanche-fuji-go-pruned-leveldb.prune.yml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:avalanche/go/avalanche-fuji-go-pruned-leveldb.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/avalanche-fuji \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
avalanche-fuji:
|
||||||
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
ports:
|
||||||
|
- 12059:12059
|
||||||
|
- 12059:12059/udp
|
||||||
|
expose:
|
||||||
|
- 9650
|
||||||
|
entrypoint: [/bin/sh, -c, mkdir -p /root/.avalanchego/offline-pruning && exec /avalanchego/build/avalanchego "$@", --]
|
||||||
|
command:
|
||||||
|
- --chain-config-dir=/config/prune
|
||||||
|
- --db-type=leveldb
|
||||||
|
- --http-allowed-hosts=*
|
||||||
|
- --http-host=
|
||||||
|
- --network-id=fuji
|
||||||
|
- --public-ip=${IP}
|
||||||
|
- --staking-port=12059
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${AVALANCHE_FUJI_GO_PRUNED_LEVELDB_DATA:-avalanche-fuji-go-pruned-leveldb}:/root/.avalanchego
|
||||||
|
- ./avalanche/fuji:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=false
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.avalanche-fuji-go-pruned-leveldb-set-path.replacepath.path=/ext/bc/C/rpc
|
||||||
|
- traefik.http.middlewares.avalanche-fuji-go-pruned-leveldb-stripprefix.stripprefix.prefixes=/avalanche-fuji
|
||||||
|
- traefik.http.services.avalanche-fuji-go-pruned-leveldb.loadbalancer.server.port=9650
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-pruned-leveldb.rule=Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)}
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb.middlewares=avalanche-fuji-go-pruned-leveldb-stripprefix, avalanche-fuji-go-pruned-leveldb-set-path, ipallowlist
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb.priority=50 # gets any request that is not GET with UPGRADE header
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.priority=100 # answers GET requests first
|
||||||
|
- traefik.http.middlewares.avalanche-fuji-go-pruned-leveldb-set-ws-path.replacepath.path=/ext/bc/C/ws
|
||||||
|
- traefik.http.services.avalanche-fuji-go-pruned-leveldb-ws.loadbalancer.server.port=9650
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.service=avalanche-fuji-go-pruned-leveldb-ws
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb.service=avalanche-fuji-go-pruned-leveldb
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.rule=(Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.middlewares=avalanche-fuji-go-pruned-leveldb-stripprefix, avalanche-fuji-go-pruned-leveldb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
avalanche-fuji-go-pruned-leveldb:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: avalanche
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
avalanche-fuji:
|
avalanche-fuji:
|
||||||
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.0}
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -87,8 +87,8 @@ services:
|
|||||||
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb.service=avalanche-fuji-go-pruned-leveldb
|
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb.service=avalanche-fuji-go-pruned-leveldb
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.rule=(Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.rule=(Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.middlewares=avalanche-fuji-go-pruned-leveldb-stripprefix, avalanche-fuji-go-pruned-leveldb-set-ws-path, ipallowlist
|
- traefik.http.routers.avalanche-fuji-go-pruned-leveldb-ws.middlewares=avalanche-fuji-go-pruned-leveldb-stripprefix, avalanche-fuji-go-pruned-leveldb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
118
avalanche/go/avalanche-fuji-go-pruned-pebbledb.prune.yml
Normal file
118
avalanche/go/avalanche-fuji-go-pruned-pebbledb.prune.yml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:avalanche/go/avalanche-fuji-go-pruned-pebbledb.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/avalanche-fuji \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
avalanche-fuji:
|
||||||
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
ports:
|
||||||
|
- 10350:10350
|
||||||
|
- 10350:10350/udp
|
||||||
|
expose:
|
||||||
|
- 9650
|
||||||
|
entrypoint: [/bin/sh, -c, mkdir -p /root/.avalanchego/offline-pruning && exec /avalanchego/build/avalanchego "$@", --]
|
||||||
|
command:
|
||||||
|
- --chain-config-dir=/config/prune
|
||||||
|
- --db-type=pebbledb
|
||||||
|
- --http-allowed-hosts=*
|
||||||
|
- --http-host=
|
||||||
|
- --network-id=fuji
|
||||||
|
- --public-ip=${IP}
|
||||||
|
- --staking-port=10350
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${AVALANCHE_FUJI_GO_PRUNED_PEBBLEDB_DATA:-avalanche-fuji-go-pruned-pebbledb}:/root/.avalanchego
|
||||||
|
- ./avalanche/fuji:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=false
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.avalanche-fuji-go-pruned-pebbledb-set-path.replacepath.path=/ext/bc/C/rpc
|
||||||
|
- traefik.http.middlewares.avalanche-fuji-go-pruned-pebbledb-stripprefix.stripprefix.prefixes=/avalanche-fuji
|
||||||
|
- traefik.http.services.avalanche-fuji-go-pruned-pebbledb.loadbalancer.server.port=9650
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.rule=Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)}
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.middlewares=avalanche-fuji-go-pruned-pebbledb-stripprefix, avalanche-fuji-go-pruned-pebbledb-set-path, ipallowlist
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.priority=50 # gets any request that is not GET with UPGRADE header
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.priority=100 # answers GET requests first
|
||||||
|
- traefik.http.middlewares.avalanche-fuji-go-pruned-pebbledb-set-ws-path.replacepath.path=/ext/bc/C/ws
|
||||||
|
- traefik.http.services.avalanche-fuji-go-pruned-pebbledb-ws.loadbalancer.server.port=9650
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.service=avalanche-fuji-go-pruned-pebbledb-ws
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.service=avalanche-fuji-go-pruned-pebbledb
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.rule=(Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.middlewares=avalanche-fuji-go-pruned-pebbledb-stripprefix, avalanche-fuji-go-pruned-pebbledb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
avalanche-fuji-go-pruned-pebbledb:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: avalanche
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
avalanche-fuji:
|
avalanche-fuji:
|
||||||
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.0}
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -87,8 +87,8 @@ services:
|
|||||||
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.service=avalanche-fuji-go-pruned-pebbledb
|
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb.service=avalanche-fuji-go-pruned-pebbledb
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.rule=(Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.rule=(Path(`/avalanche-fuji`) || Path(`/avalanche-fuji/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.middlewares=avalanche-fuji-go-pruned-pebbledb-stripprefix, avalanche-fuji-go-pruned-pebbledb-set-ws-path, ipallowlist
|
- traefik.http.routers.avalanche-fuji-go-pruned-pebbledb-ws.middlewares=avalanche-fuji-go-pruned-pebbledb-stripprefix, avalanche-fuji-go-pruned-pebbledb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
avalanche-mainnet-archive:
|
avalanche-mainnet-archive:
|
||||||
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.0}
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.2}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -87,8 +87,8 @@ services:
|
|||||||
- traefik.http.routers.avalanche-mainnet-go-archive-leveldb.service=avalanche-mainnet-go-archive-leveldb
|
- traefik.http.routers.avalanche-mainnet-go-archive-leveldb.service=avalanche-mainnet-go-archive-leveldb
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet-archive`) || Path(`/avalanche-mainnet-archive/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet-archive`) || Path(`/avalanche-mainnet-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.rule=(Path(`/avalanche-mainnet-archive`) || Path(`/avalanche-mainnet-archive/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.rule=(Path(`/avalanche-mainnet-archive`) || Path(`/avalanche-mainnet-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.middlewares=avalanche-mainnet-go-archive-leveldb-stripprefix, avalanche-mainnet-go-archive-leveldb-set-ws-path, ipallowlist
|
- traefik.http.routers.avalanche-mainnet-go-archive-leveldb-ws.middlewares=avalanche-mainnet-go-archive-leveldb-stripprefix, avalanche-mainnet-go-archive-leveldb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
118
avalanche/go/avalanche-mainnet-go-pruned-leveldb.prune.yml
Normal file
118
avalanche/go/avalanche-mainnet-go-pruned-leveldb.prune.yml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:avalanche/go/avalanche-mainnet-go-pruned-leveldb.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/avalanche-mainnet \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
avalanche-mainnet:
|
||||||
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.2}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
ports:
|
||||||
|
- 12757:12757
|
||||||
|
- 12757:12757/udp
|
||||||
|
expose:
|
||||||
|
- 9650
|
||||||
|
entrypoint: [/bin/sh, -c, mkdir -p /root/.avalanchego/offline-pruning && exec /avalanchego/build/avalanchego "$@", --]
|
||||||
|
command:
|
||||||
|
- --chain-config-dir=/config/prune
|
||||||
|
- --db-type=leveldb
|
||||||
|
- --http-allowed-hosts=*
|
||||||
|
- --http-host=
|
||||||
|
- --network-id=mainnet
|
||||||
|
- --public-ip=${IP}
|
||||||
|
- --staking-port=12757
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${AVALANCHE_MAINNET_GO_PRUNED_LEVELDB_DATA:-avalanche-mainnet-go-pruned-leveldb}:/root/.avalanchego
|
||||||
|
- ./avalanche/mainnet:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=false
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.avalanche-mainnet-go-pruned-leveldb-set-path.replacepath.path=/ext/bc/C/rpc
|
||||||
|
- traefik.http.middlewares.avalanche-mainnet-go-pruned-leveldb-stripprefix.stripprefix.prefixes=/avalanche-mainnet
|
||||||
|
- traefik.http.services.avalanche-mainnet-go-pruned-leveldb.loadbalancer.server.port=9650
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.rule=Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)}
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.middlewares=avalanche-mainnet-go-pruned-leveldb-stripprefix, avalanche-mainnet-go-pruned-leveldb-set-path, ipallowlist
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.priority=50 # gets any request that is not GET with UPGRADE header
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.priority=100 # answers GET requests first
|
||||||
|
- traefik.http.middlewares.avalanche-mainnet-go-pruned-leveldb-set-ws-path.replacepath.path=/ext/bc/C/ws
|
||||||
|
- traefik.http.services.avalanche-mainnet-go-pruned-leveldb-ws.loadbalancer.server.port=9650
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.service=avalanche-mainnet-go-pruned-leveldb-ws
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.service=avalanche-mainnet-go-pruned-leveldb
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.rule=(Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.middlewares=avalanche-mainnet-go-pruned-leveldb-stripprefix, avalanche-mainnet-go-pruned-leveldb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
avalanche-mainnet-go-pruned-leveldb:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: avalanche
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
avalanche-mainnet:
|
avalanche-mainnet:
|
||||||
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.0}
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.2}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -87,8 +87,8 @@ services:
|
|||||||
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.service=avalanche-mainnet-go-pruned-leveldb
|
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb.service=avalanche-mainnet-go-pruned-leveldb
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.rule=(Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.rule=(Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.middlewares=avalanche-mainnet-go-pruned-leveldb-stripprefix, avalanche-mainnet-go-pruned-leveldb-set-ws-path, ipallowlist
|
- traefik.http.routers.avalanche-mainnet-go-pruned-leveldb-ws.middlewares=avalanche-mainnet-go-pruned-leveldb-stripprefix, avalanche-mainnet-go-pruned-leveldb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
118
avalanche/go/avalanche-mainnet-go-pruned-pebbledb.prune.yml
Normal file
118
avalanche/go/avalanche-mainnet-go-pruned-pebbledb.prune.yml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:avalanche/go/avalanche-mainnet-go-pruned-pebbledb.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/avalanche-mainnet \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
avalanche-mainnet:
|
||||||
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.2}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
ports:
|
||||||
|
- 11929:11929
|
||||||
|
- 11929:11929/udp
|
||||||
|
expose:
|
||||||
|
- 9650
|
||||||
|
entrypoint: [/bin/sh, -c, mkdir -p /root/.avalanchego/offline-pruning && exec /avalanchego/build/avalanchego "$@", --]
|
||||||
|
command:
|
||||||
|
- --chain-config-dir=/config/prune
|
||||||
|
- --db-type=pebbledb
|
||||||
|
- --http-allowed-hosts=*
|
||||||
|
- --http-host=
|
||||||
|
- --network-id=mainnet
|
||||||
|
- --public-ip=${IP}
|
||||||
|
- --staking-port=11929
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${AVALANCHE_MAINNET_GO_PRUNED_PEBBLEDB_DATA:-avalanche-mainnet-go-pruned-pebbledb}:/root/.avalanchego
|
||||||
|
- ./avalanche/mainnet:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=false
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.avalanche-mainnet-go-pruned-pebbledb-set-path.replacepath.path=/ext/bc/C/rpc
|
||||||
|
- traefik.http.middlewares.avalanche-mainnet-go-pruned-pebbledb-stripprefix.stripprefix.prefixes=/avalanche-mainnet
|
||||||
|
- traefik.http.services.avalanche-mainnet-go-pruned-pebbledb.loadbalancer.server.port=9650
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.rule=Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)}
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.middlewares=avalanche-mainnet-go-pruned-pebbledb-stripprefix, avalanche-mainnet-go-pruned-pebbledb-set-path, ipallowlist
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.priority=50 # gets any request that is not GET with UPGRADE header
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.priority=100 # answers GET requests first
|
||||||
|
- traefik.http.middlewares.avalanche-mainnet-go-pruned-pebbledb-set-ws-path.replacepath.path=/ext/bc/C/ws
|
||||||
|
- traefik.http.services.avalanche-mainnet-go-pruned-pebbledb-ws.loadbalancer.server.port=9650
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.service=avalanche-mainnet-go-pruned-pebbledb-ws
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.service=avalanche-mainnet-go-pruned-pebbledb
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.rule=(Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.middlewares=avalanche-mainnet-go-pruned-pebbledb-stripprefix, avalanche-mainnet-go-pruned-pebbledb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
avalanche-mainnet-go-pruned-pebbledb:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: avalanche
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
avalanche-mainnet:
|
avalanche-mainnet:
|
||||||
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.0}
|
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.2}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -87,8 +87,8 @@ services:
|
|||||||
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.service=avalanche-mainnet-go-pruned-pebbledb
|
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb.service=avalanche-mainnet-go-pruned-pebbledb
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.rule=(Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && Headers(`Upgrade`, `websocket`)}
|
- ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.rule=(Path(`/avalanche-mainnet`) || Path(`/avalanche-mainnet/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.middlewares=avalanche-mainnet-go-pruned-pebbledb-stripprefix, avalanche-mainnet-go-pruned-pebbledb-set-ws-path, ipallowlist
|
- traefik.http.routers.avalanche-mainnet-go-pruned-pebbledb-ws.middlewares=avalanche-mainnet-go-pruned-pebbledb-stripprefix, avalanche-mainnet-go-pruned-pebbledb-set-ws-path, ipallowlist
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
23
avalanche/mainnet/prune/C/config.json
Normal file
23
avalanche/mainnet/prune/C/config.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"snowman-api-enabled": false,
|
||||||
|
"coreth-admin-api-enabled": false,
|
||||||
|
"net-api-enabled": true,
|
||||||
|
"rpc-gas-cap": 2500000000,
|
||||||
|
"rpc-tx-fee-cap": 100,
|
||||||
|
"eth-rpc-gas-limit": 2500000000,
|
||||||
|
"eth-api-enabled": true,
|
||||||
|
"personal-api-enabled": false,
|
||||||
|
"tx-pool-api-enabled": false,
|
||||||
|
"debug-api-enabled": false,
|
||||||
|
"web3-api-enabled": true,
|
||||||
|
"local-txs-enabled": false,
|
||||||
|
"pruning-enabled": true,
|
||||||
|
"api-max-duration": 0,
|
||||||
|
"api-max-blocks-per-request": 0,
|
||||||
|
"allow-unfinalized-queries": false,
|
||||||
|
"log-level": "info",
|
||||||
|
"state-sync-enabled": false,
|
||||||
|
"state-sync-skip-resume": true,
|
||||||
|
"offline-pruning-enabled": true,
|
||||||
|
"offline-pruning-data-directory": "/root/.avalanchego/offline-pruning"
|
||||||
|
}
|
||||||
112
aztec/aztec/aztec-devnet-aztec-pruned.yml
Normal file
112
aztec/aztec/aztec-devnet-aztec-pruned.yml
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
# Aztec full node. See https://docs.aztec.network/network/setup/running_a_node
|
||||||
|
# Admin port (8880) is not exposed; use docker exec for admin API.
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:aztec/aztec/aztec-devnet-aztec-pruned.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/aztec-devnet \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
aztec-devnet:
|
||||||
|
image: ${AZTEC_AZTEC_IMAGE:-aztecprotocol/aztec}:${AZTEC_DEVNET_AZTEC_VERSION:-3.0.0-devnet.6-patch.1}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
ports:
|
||||||
|
- 12024:12024
|
||||||
|
- 12024:12024/udp
|
||||||
|
expose:
|
||||||
|
- 8080
|
||||||
|
environment:
|
||||||
|
AZTEC_ADMIN_PORT: '8880'
|
||||||
|
AZTEC_PORT: '8080'
|
||||||
|
DATA_DIRECTORY: /var/lib/data
|
||||||
|
ETHEREUM_HOSTS: ${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
||||||
|
L1_CONSENSUS_HOST_URLS: ${ETHEREUM_SEPOLIA_BEACON_REST}
|
||||||
|
LOG_LEVEL: ${AZTEC_LOG_LEVEL:-info}
|
||||||
|
P2P_IP: ${IP}
|
||||||
|
P2P_PORT: '12024'
|
||||||
|
entrypoint: [node, --no-warnings, /usr/src/yarn-project/aztec/dest/bin/index.js, start]
|
||||||
|
command:
|
||||||
|
- --archiver
|
||||||
|
- --network=devnet
|
||||||
|
- --node
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${AZTEC_DEVNET_AZTEC_PRUNED_DATA:-aztec-devnet-aztec-pruned}:/var/lib/data
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=false
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.aztec-devnet-aztec-pruned-stripprefix.stripprefix.prefixes=/aztec-devnet
|
||||||
|
- traefik.http.services.aztec-devnet-aztec-pruned.loadbalancer.server.port=8080
|
||||||
|
- ${NO_SSL:-traefik.http.routers.aztec-devnet-aztec-pruned.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.aztec-devnet-aztec-pruned.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.aztec-devnet-aztec-pruned.rule=Host(`$DOMAIN`) && (Path(`/aztec-devnet`) || Path(`/aztec-devnet/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.aztec-devnet-aztec-pruned.rule=Path(`/aztec-devnet`) || Path(`/aztec-devnet/`)}
|
||||||
|
- traefik.http.routers.aztec-devnet-aztec-pruned.middlewares=aztec-devnet-aztec-pruned-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
aztec-devnet-aztec-pruned:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: aztec-devnet
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
111
aztec/aztec/aztec-testnet-aztec-pruned.yml
Normal file
111
aztec/aztec/aztec-testnet-aztec-pruned.yml
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
# Aztec full node. See https://docs.aztec.network/network/setup/running_a_node
|
||||||
|
# Admin port (8880) is not exposed; use docker exec for admin API.
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:aztec/aztec/aztec-testnet-aztec-pruned.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/aztec-testnet-pruned \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
aztec-testnet-pruned:
|
||||||
|
image: ${AZTEC_AZTEC_IMAGE:-aztecprotocol/aztec}:${AZTEC_TESTNET_AZTEC_VERSION:-5.0.0-rc.1}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
ports:
|
||||||
|
- 13009:13009
|
||||||
|
- 13009:13009/udp
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
environment:
|
||||||
|
AZTEC_ADMIN_PORT: '8880'
|
||||||
|
AZTEC_PORT: '8545'
|
||||||
|
DATA_DIRECTORY: /var/lib/data
|
||||||
|
ETHEREUM_HOSTS: ${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
||||||
|
L1_CONSENSUS_HOST_URLS: ${ETHEREUM_SEPOLIA_BEACON_REST}
|
||||||
|
LOG_LEVEL: ${AZTEC_LOG_LEVEL:-info}
|
||||||
|
P2P_IP: ${IP}
|
||||||
|
P2P_PORT: '13009'
|
||||||
|
entrypoint: [node, --no-warnings, /usr/src/yarn-project/aztec/dest/bin/index.js, start]
|
||||||
|
command:
|
||||||
|
- --node
|
||||||
|
- --network=testnet
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${AZTEC_TESTNET_AZTEC_PRUNED_DATA:-aztec-testnet-aztec-pruned}:/var/lib/data
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=false
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.aztec-testnet-aztec-pruned-stripprefix.stripprefix.prefixes=/aztec-testnet-pruned
|
||||||
|
- traefik.http.services.aztec-testnet-aztec-pruned.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.aztec-testnet-aztec-pruned.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.aztec-testnet-aztec-pruned.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.aztec-testnet-aztec-pruned.rule=Host(`$DOMAIN`) && (Path(`/aztec-testnet-pruned`) || Path(`/aztec-testnet-pruned/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.aztec-testnet-aztec-pruned.rule=Path(`/aztec-testnet-pruned`) || Path(`/aztec-testnet-pruned/`)}
|
||||||
|
- traefik.http.routers.aztec-testnet-aztec-pruned.middlewares=aztec-testnet-aztec-pruned-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
aztec-testnet-aztec-pruned:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: aztec-testnet
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
@@ -1,10 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
BASEPATH="$(dirname "$0")"
|
BASEPATH="$(dirname "$0")"
|
||||||
|
source "$BASEPATH/volume-utils.sh"
|
||||||
backup_dir="/backup"
|
backup_dir="/backup"
|
||||||
|
|
||||||
if [[ -n $2 ]]; then
|
remote_target="$2"
|
||||||
echo "upload backup via webdav to $2"
|
if [[ -n "$remote_target" ]] && is_local_backup_url "$remote_target"; then
|
||||||
|
echo "Target URL points to this server, using local /backup instead of $remote_target"
|
||||||
|
remote_target=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$remote_target" ]]; then
|
||||||
|
echo "upload backup via webdav to $remote_target"
|
||||||
else
|
else
|
||||||
if [ ! -d "$backup_dir" ]; then
|
if [ ! -d "$backup_dir" ]; then
|
||||||
echo "Error: /backup directory does not exist"
|
echo "Error: /backup directory does not exist"
|
||||||
@@ -29,21 +36,33 @@ generate_volume_metadata() {
|
|||||||
# Check each static file path
|
# Check each static file path
|
||||||
if [[ -f "$static_file_list" ]]; then
|
if [[ -f "$static_file_list" ]]; then
|
||||||
while IFS= read -r path; do
|
while IFS= read -r path; do
|
||||||
# Check if the path exists
|
[[ -z "$path" ]] && continue
|
||||||
if [[ -e "$prefix/_data/$path" ]]; then
|
# Match rule (see static-file-path-list.txt): an entry with NO slash is root-level
|
||||||
# Get the size
|
# only (so `snapshots` won't catch postgres pg_logical/snapshots); an entry WITH a
|
||||||
size=$(du -sL "$prefix/_data/$path" 2>/dev/null | awk '{print $1}')
|
# slash is a path-suffix, so any prefix matches (network-prefixed nitro freezers,
|
||||||
# Format size in human-readable format
|
# nested l2geth geth/geth/...). Record the CONCRETE relative path so restore-volumes
|
||||||
size_formatted=$(echo "$(( size * 1024 ))" | numfmt --to=iec --suffix=B --format="%.2f")
|
# can recreate the exact static-file -> /slowdisk symlink.
|
||||||
# Write to metadata file
|
# Match real dirs AND symlinks: an already-OFFLOADED static dir is a symlink to
|
||||||
echo "$size_formatted $path" >> "$metadata_file"
|
# /slowdisk, which find -type d alone would skip (then it would be dropped from the
|
||||||
|
# manifest and the next restore would not re-offload it).
|
||||||
|
local matches=() m rel
|
||||||
|
if [[ "$path" == */* ]]; then
|
||||||
|
while IFS= read -r m; do matches+=("$m"); done < <(find "$prefix/_data" \( -type d -o -type l \) -path "*/$path" 2>/dev/null)
|
||||||
|
else
|
||||||
|
m="$prefix/_data/$path"; { [ -d "$m" ] || [ -L "$m" ]; } && matches+=("$m")
|
||||||
fi
|
fi
|
||||||
|
for m in "${matches[@]}"; do
|
||||||
|
rel="${m#"$prefix/_data/"}"
|
||||||
|
size=$(du -sL "$m" 2>/dev/null | awk '{print $1}')
|
||||||
|
size_formatted=$(echo "$(( ${size:-0} * 1024 ))" | numfmt --to=iec --suffix=B --format="%.2f")
|
||||||
|
echo "$size_formatted $rel" >> "$metadata_file"
|
||||||
|
done
|
||||||
done < "$static_file_list"
|
done < "$static_file_list"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Read the JSON input and extract the list of keys
|
# Read the JSON input and extract the list of keys
|
||||||
keys=$(cat /root/rpc/$1.yml | yaml2json - | jq '.volumes' | jq -r 'keys[]')
|
keys=$(get_persistent_volume_keys "/root/rpc/$1.yml")
|
||||||
|
|
||||||
# Iterate over the list of keys
|
# Iterate over the list of keys
|
||||||
for key in $keys; do
|
for key in $keys; do
|
||||||
@@ -74,16 +93,16 @@ for key in $keys; do
|
|||||||
|
|
||||||
#echo "$target_file"
|
#echo "$target_file"
|
||||||
|
|
||||||
if [[ -n $2 ]]; then
|
if [[ -n "$remote_target" ]]; then
|
||||||
# Upload volume archive
|
# Upload volume archive
|
||||||
tar -cf - --dereference "$source_folder" | pv -pterb -s $(du -sb "$source_folder" | awk '{print $1}') | zstd | curl -X PUT --upload-file - "$2/null/uploading-$target_file"
|
tar -cf - --dereference "$source_folder" | pv -pterb -s $(du -sb "$source_folder" | awk '{print $1}') | zstd | curl -X PUT --upload-file - "$remote_target/null/uploading-$target_file"
|
||||||
curl -X MOVE -H "Destination: /null/$target_file" "$2/null/uploading-$target_file"
|
curl -X MOVE -H "Destination: /null/$target_file" "$remote_target/null/uploading-$target_file"
|
||||||
|
|
||||||
# Generate and upload metadata file
|
# Generate and upload metadata file
|
||||||
echo "Generating metadata for volume: rpc_$key"
|
echo "Generating metadata for volume: rpc_$key"
|
||||||
temp_metadata="/tmp/$metadata_file_name"
|
temp_metadata="/tmp/$metadata_file_name"
|
||||||
generate_volume_metadata "$key" "$source_folder" "$temp_metadata"
|
generate_volume_metadata "$key" "$source_folder" "$temp_metadata"
|
||||||
curl -X PUT --upload-file "$temp_metadata" "$2/null/$metadata_file_name"
|
curl -X PUT --upload-file "$temp_metadata" "$remote_target/null/$metadata_file_name"
|
||||||
rm -f "$temp_metadata"
|
rm -f "$temp_metadata"
|
||||||
else
|
else
|
||||||
# Create volume archive
|
# Create volume archive
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ services:
|
|||||||
context: ./berachain
|
context: ./berachain
|
||||||
dockerfile: beacon-kit.Dockerfile
|
dockerfile: beacon-kit.Dockerfile
|
||||||
args:
|
args:
|
||||||
BEACONKIT_VERSION: ${BERACHAIN_BEPOLIA_BEACON_KIT_VERSION:-v1.3.4}
|
BEACONKIT_VERSION: ${BERACHAIN_BEPOLIA_BEACON_KIT_VERSION:-v1.4.1}
|
||||||
BEACONKIT_IMAGE: ${BERACHAIN_BEPOLIA_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
BEACONKIT_IMAGE: ${BERACHAIN_BEPOLIA_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
||||||
ports:
|
ports:
|
||||||
- 19888:19888
|
- 19888:19888
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ services:
|
|||||||
context: ./berachain
|
context: ./berachain
|
||||||
dockerfile: beacon-kit.Dockerfile
|
dockerfile: beacon-kit.Dockerfile
|
||||||
args:
|
args:
|
||||||
BEACONKIT_VERSION: ${BERACHAIN_MAINNET_BEACON_KIT_VERSION:-v1.3.4}
|
BEACONKIT_VERSION: ${BERACHAIN_MAINNET_BEACON_KIT_VERSION:-v1.4.0-rc3}
|
||||||
BEACONKIT_IMAGE: ${BERACHAIN_MAINNET_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
BEACONKIT_IMAGE: ${BERACHAIN_MAINNET_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
||||||
ports:
|
ports:
|
||||||
- 16562:16562
|
- 16562:16562
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
berachain-bartio-reth:
|
berachain-bartio-reth:
|
||||||
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_BARTIO_RETH_VERSION:-v1.3.1}
|
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_BARTIO_RETH_VERSION:-v1.4.0}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -151,7 +151,7 @@ services:
|
|||||||
context: ./berachain
|
context: ./berachain
|
||||||
dockerfile: beacon-kit.Dockerfile
|
dockerfile: beacon-kit.Dockerfile
|
||||||
args:
|
args:
|
||||||
BEACONKIT_VERSION: ${BERACHAIN_BARTIO_BEACON_KIT_VERSION:-v1.3.4}
|
BEACONKIT_VERSION: ${BERACHAIN_BARTIO_BEACON_KIT_VERSION:-v1.4.0-rc3}
|
||||||
BEACONKIT_IMAGE: ${BERACHAIN_BARTIO_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
BEACONKIT_IMAGE: ${BERACHAIN_BARTIO_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
||||||
ports:
|
ports:
|
||||||
- 15527:15527
|
- 15527:15527
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
berachain-bartio-reth-pruned:
|
berachain-bartio-reth-pruned:
|
||||||
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_BARTIO_RETH_VERSION:-v1.3.1}
|
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_BARTIO_RETH_VERSION:-v1.4.0}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -152,7 +152,7 @@ services:
|
|||||||
context: ./berachain
|
context: ./berachain
|
||||||
dockerfile: beacon-kit.Dockerfile
|
dockerfile: beacon-kit.Dockerfile
|
||||||
args:
|
args:
|
||||||
BEACONKIT_VERSION: ${BERACHAIN_BARTIO_BEACON_KIT_VERSION:-v1.3.4}
|
BEACONKIT_VERSION: ${BERACHAIN_BARTIO_BEACON_KIT_VERSION:-v1.4.0-rc3}
|
||||||
BEACONKIT_IMAGE: ${BERACHAIN_BARTIO_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
BEACONKIT_IMAGE: ${BERACHAIN_BARTIO_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
||||||
ports:
|
ports:
|
||||||
- 19467:19467
|
- 19467:19467
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
berachain-bepolia-reth:
|
berachain-bepolia-reth:
|
||||||
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_BEPOLIA_RETH_VERSION:-v1.3.1}
|
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_BEPOLIA_RETH_VERSION:-v1.4.1}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -152,7 +152,7 @@ services:
|
|||||||
context: ./berachain
|
context: ./berachain
|
||||||
dockerfile: beacon-kit.Dockerfile
|
dockerfile: beacon-kit.Dockerfile
|
||||||
args:
|
args:
|
||||||
BEACONKIT_VERSION: ${BERACHAIN_BEPOLIA_BEACON_KIT_VERSION:-v1.3.4}
|
BEACONKIT_VERSION: ${BERACHAIN_BEPOLIA_BEACON_KIT_VERSION:-v1.4.1}
|
||||||
BEACONKIT_IMAGE: ${BERACHAIN_BEPOLIA_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
BEACONKIT_IMAGE: ${BERACHAIN_BEPOLIA_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
||||||
ports:
|
ports:
|
||||||
- 16347:16347
|
- 16347:16347
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
berachain-bepolia-reth-pruned:
|
berachain-bepolia-reth-pruned:
|
||||||
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_BEPOLIA_RETH_VERSION:-v1.3.1}
|
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_BEPOLIA_RETH_VERSION:-v1.4.1}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -153,7 +153,7 @@ services:
|
|||||||
context: ./berachain
|
context: ./berachain
|
||||||
dockerfile: beacon-kit.Dockerfile
|
dockerfile: beacon-kit.Dockerfile
|
||||||
args:
|
args:
|
||||||
BEACONKIT_VERSION: ${BERACHAIN_BEPOLIA_BEACON_KIT_VERSION:-v1.3.4}
|
BEACONKIT_VERSION: ${BERACHAIN_BEPOLIA_BEACON_KIT_VERSION:-v1.4.1}
|
||||||
BEACONKIT_IMAGE: ${BERACHAIN_BEPOLIA_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
BEACONKIT_IMAGE: ${BERACHAIN_BEPOLIA_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
||||||
ports:
|
ports:
|
||||||
- 17274:17274
|
- 17274:17274
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
berachain-mainnet-reth:
|
berachain-mainnet-reth:
|
||||||
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_MAINNET_RETH_VERSION:-v1.3.1}
|
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_MAINNET_RETH_VERSION:-v1.4.0}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -152,7 +152,7 @@ services:
|
|||||||
context: ./berachain
|
context: ./berachain
|
||||||
dockerfile: beacon-kit.Dockerfile
|
dockerfile: beacon-kit.Dockerfile
|
||||||
args:
|
args:
|
||||||
BEACONKIT_VERSION: ${BERACHAIN_MAINNET_BEACON_KIT_VERSION:-v1.3.4}
|
BEACONKIT_VERSION: ${BERACHAIN_MAINNET_BEACON_KIT_VERSION:-v1.4.0-rc3}
|
||||||
BEACONKIT_IMAGE: ${BERACHAIN_MAINNET_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
BEACONKIT_IMAGE: ${BERACHAIN_MAINNET_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
||||||
ports:
|
ports:
|
||||||
- 17881:17881
|
- 17881:17881
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
berachain-mainnet-reth-pruned:
|
berachain-mainnet-reth-pruned:
|
||||||
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_MAINNET_RETH_VERSION:-v1.3.1}
|
image: ${BERACHAIN_RETH_IMAGE:-ghcr.io/berachain/bera-reth}:${BERACHAIN_MAINNET_RETH_VERSION:-v1.4.0}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -153,7 +153,7 @@ services:
|
|||||||
context: ./berachain
|
context: ./berachain
|
||||||
dockerfile: beacon-kit.Dockerfile
|
dockerfile: beacon-kit.Dockerfile
|
||||||
args:
|
args:
|
||||||
BEACONKIT_VERSION: ${BERACHAIN_MAINNET_BEACON_KIT_VERSION:-v1.3.4}
|
BEACONKIT_VERSION: ${BERACHAIN_MAINNET_BEACON_KIT_VERSION:-v1.4.0-rc3}
|
||||||
BEACONKIT_IMAGE: ${BERACHAIN_MAINNET_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
BEACONKIT_IMAGE: ${BERACHAIN_MAINNET_BEACON_KIT_IMAGE:-ghcr.io/berachain/beacon-kit}
|
||||||
ports:
|
ports:
|
||||||
- 15900:15900
|
- 15900:15900
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
bitcoin-cash-mainnet:
|
bitcoin-cash-mainnet:
|
||||||
image: ${BITCOIN_CASH_BITCOIND_IMAGE:-bitcoinabc/bitcoin-abc}:${BITCOIN_CASH_MAINNET_BITCOIND_VERSION:-0.32.5}
|
image: ${BITCOIN_CASH_BITCOIND_IMAGE:-bitcoinabc/bitcoin-abc}:${BITCOIN_CASH_MAINNET_BITCOIND_VERSION:-0.33.6}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
bitcoin-cash-testnet:
|
bitcoin-cash-testnet:
|
||||||
image: ${BITCOIN_CASH_BITCOIND_IMAGE:-bitcoinabc/bitcoin-abc}:${BITCOIN_CASH_TESTNET_BITCOIND_VERSION:-0.32.5}
|
image: ${BITCOIN_CASH_BITCOIND_IMAGE:-bitcoinabc/bitcoin-abc}:${BITCOIN_CASH_TESTNET_BITCOIND_VERSION:-0.33.6}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -23,18 +23,33 @@ for path in $pathlist; do
|
|||||||
RPC_URL="https://$DOMAIN/$path"
|
RPC_URL="https://$DOMAIN/$path"
|
||||||
response_file=$(mktemp)
|
response_file=$(mktemp)
|
||||||
|
|
||||||
http_status_code=$(curl --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' $RPC_URL)
|
# Detect Starknet vs Ethereum based on path
|
||||||
|
if echo "$path" | grep -qi "starknet"; then
|
||||||
|
rpc_method='{"jsonrpc":"2.0","method":"starknet_getBlockWithTxHashes","params":["latest"],"id":1}'
|
||||||
|
is_starknet=true
|
||||||
|
else
|
||||||
|
rpc_method='{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}'
|
||||||
|
is_starknet=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
http_status_code=$(curl --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data "$rpc_method" $RPC_URL)
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
|
||||||
if [[ $http_status_code -eq 200 ]]; then
|
if [[ $http_status_code -eq 200 ]]; then
|
||||||
response=$(cat "$response_file")
|
response=$(cat "$response_file")
|
||||||
|
|
||||||
latest_block_number=$(echo "$response" | jq -r '.result.number')
|
if $is_starknet; then
|
||||||
latest_block_number_decimal=$((16#${latest_block_number#0x}))
|
# Starknet returns decimal block_number
|
||||||
|
latest_block_number_decimal=$(echo "$response" | jq -r '.result.block_number')
|
||||||
|
else
|
||||||
|
# Ethereum returns hex number
|
||||||
|
latest_block_number=$(echo "$response" | jq -r '.result.number')
|
||||||
|
latest_block_number_decimal=$((16#${latest_block_number#0x}))
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$latest_block_number_decimal"
|
echo "$latest_block_number_decimal"
|
||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
bsc-chapel:
|
bsc-chapel:
|
||||||
image: ${BSC_BSC_IMAGE:-ghcr.io/bnb-chain/bsc}:${BSC_CHAPEL_BSC_VERSION:-1.6.5}
|
image: ${BSC_BSC_IMAGE:-ghcr.io/bnb-chain/bsc}:${BSC_CHAPEL_BSC_VERSION:-1.7.3}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
160
bsc/bsc/bsc-mainnet-bsc-minimal-pebble-hash.yml
Normal file
160
bsc/bsc/bsc-mainnet-bsc-minimal-pebble-hash.yml
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
# Snapshot for minial datadir here
|
||||||
|
# https://github.com/48Club/bsc-snapshots?tab=readme-ov-file
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# mkdir rpc && cd rpc
|
||||||
|
#
|
||||||
|
# git init
|
||||||
|
# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git
|
||||||
|
# git fetch origin vibe
|
||||||
|
# git checkout origin/vibe
|
||||||
|
#
|
||||||
|
# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret
|
||||||
|
#
|
||||||
|
# env
|
||||||
|
# ...
|
||||||
|
# IP=$(curl ipinfo.io/ip)
|
||||||
|
# DOMAIN=${IP}.traefik.me
|
||||||
|
# COMPOSE_FILE=base.yml:rpc.yml:bsc/bsc/bsc-mainnet-bsc-minimal-pebble-hash.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/bsc-mainnet-minimal \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
bsc-mainnet-minimal:
|
||||||
|
image: ${BSC_BSC_IMAGE:-ghcr.io/bnb-chain/bsc}:${BSC_MAINNET_BSC_VERSION:-1.7.3}
|
||||||
|
sysctls:
|
||||||
|
# TCP Performance
|
||||||
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache
|
||||||
|
net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers
|
||||||
|
net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers
|
||||||
|
net.core.somaxconn: 32768 # Higher connection queue
|
||||||
|
# Memory/Connection Management
|
||||||
|
# net.core.netdev_max_backlog: 50000 # Increase network buffer
|
||||||
|
net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests
|
||||||
|
net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets
|
||||||
|
ulimits:
|
||||||
|
nofile: 1048576 # Max open files (for RPC/WS connections)
|
||||||
|
user: root
|
||||||
|
ports:
|
||||||
|
- 12853:12853
|
||||||
|
- 12853:12853/udp
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
- 6060
|
||||||
|
entrypoint: [geth]
|
||||||
|
command:
|
||||||
|
- --cache.database=${BSC_MAINNET_BSC_MINIMAL_PEBBLE_HASH_CACHE_DB:-40}
|
||||||
|
- --cache.gc=${BSC_MAINNET_BSC_MINIMAL_PEBBLE_HASH_CACHE_GC:-25}
|
||||||
|
- --cache.snapshot=${BSC_MAINNET_BSC_MINIMAL_PEBBLE_HASH_CACHE_SNAPSHOT:-20}
|
||||||
|
- --cache.trie=${BSC_MAINNET_BSC_MINIMAL_PEBBLE_HASH_CACHE_TRIE:-15}
|
||||||
|
- --cache=${BSC_MAINNET_BSC_MINIMAL_PEBBLE_HASH_CACHE:-1024}
|
||||||
|
- --config=/config/config.toml
|
||||||
|
- --datadir=/bsc/.ethereum
|
||||||
|
- --db.engine=pebble
|
||||||
|
- --gcmode=full
|
||||||
|
- --history.blocks=1024
|
||||||
|
- --history.logs.disable=true
|
||||||
|
- --history.state=1024
|
||||||
|
- --history.transactions=1024
|
||||||
|
- --http
|
||||||
|
- --http.addr=0.0.0.0
|
||||||
|
- --http.api=eth,net,web3,txpool,debug,admin,parlia
|
||||||
|
- --http.port=8545
|
||||||
|
- --http.vhosts=*
|
||||||
|
- --mainnet
|
||||||
|
- --maxpeers=50
|
||||||
|
- --metrics
|
||||||
|
- --metrics.addr=0.0.0.0
|
||||||
|
- --metrics.port=6060
|
||||||
|
- --nat=extip:${IP}
|
||||||
|
- --port=12853
|
||||||
|
- --rpc.gascap=600000000
|
||||||
|
- --rpc.txfeecap=0
|
||||||
|
- --state.scheme=hash
|
||||||
|
- --syncmode=full
|
||||||
|
- --tries-verify-mode=none
|
||||||
|
- --txpool.pricelimit=50000000
|
||||||
|
- --ws
|
||||||
|
- --ws.addr=0.0.0.0
|
||||||
|
- --ws.api=eth,net,web3,txpool,debug,admin,parlia
|
||||||
|
- --ws.origins=*
|
||||||
|
- --ws.port=8545
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${BSC_MAINNET_BSC_MINIMAL_PEBBLE_HASH_DATA:-bsc-mainnet-bsc-minimal-pebble-hash}:/bsc/.ethereum
|
||||||
|
- ./bsc/mainnet:/config
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6060
|
||||||
|
- prometheus-scrape.path=/metrics
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.bsc-mainnet-bsc-minimal-pebble-hash-stripprefix.stripprefix.prefixes=/bsc-mainnet-minimal
|
||||||
|
- traefik.http.services.bsc-mainnet-bsc-minimal-pebble-hash.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.bsc-mainnet-bsc-minimal-pebble-hash.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.bsc-mainnet-bsc-minimal-pebble-hash.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.bsc-mainnet-bsc-minimal-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/bsc-mainnet-minimal`) || Path(`/bsc-mainnet-minimal/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.bsc-mainnet-bsc-minimal-pebble-hash.rule=Path(`/bsc-mainnet-minimal`) || Path(`/bsc-mainnet-minimal/`)}
|
||||||
|
- traefik.http.routers.bsc-mainnet-bsc-minimal-pebble-hash.middlewares=bsc-mainnet-bsc-minimal-pebble-hash-stripprefix, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
bsc-mainnet-bsc-minimal-pebble-hash:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: bsc
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
# minimal bsc lacks the state to serve eth_getProof; the drpc gateway
|
||||||
|
# probes it and marks the whole upstream unavailable on "header not
|
||||||
|
# found" (especially while catching up after a restart).
|
||||||
|
- name: eth_getProof
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
# standard geth only
|
||||||
|
- name: debug_getRawBlock
|
||||||
|
- name: debug_getRawTransaction
|
||||||
|
- name: debug_getRawReceipts
|
||||||
|
- name: debug_getRawHeader
|
||||||
|
- name: debug_getBadBlocks
|
||||||
|
# non standard geth only slightly dangerous
|
||||||
|
- name: debug_intermediateRoots
|
||||||
|
- name: debug_dumpBlock
|
||||||
|
# standard geth and erigon
|
||||||
|
- name: debug_accountRange
|
||||||
|
- name: debug_getModifiedAccountsByNumber
|
||||||
|
- name: debug_getModifiedAccountsByHash
|
||||||
|
# non standard geth and erigon
|
||||||
|
- name: eth_getRawTransactionByHash
|
||||||
|
- name: eth_getRawTransactionByBlockHashAndIndex
|
||||||
|
...
|
||||||
@@ -32,7 +32,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
bsc-mainnet-minimal:
|
bsc-mainnet-minimal:
|
||||||
image: ${BSC_BSC_IMAGE:-ghcr.io/bnb-chain/bsc}:${BSC_MAINNET_BSC_VERSION:-1.6.5}
|
image: ${BSC_BSC_IMAGE:-ghcr.io/bnb-chain/bsc}:${BSC_MAINNET_BSC_VERSION:-1.7.3}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
@@ -137,6 +137,10 @@ x-upstreams:
|
|||||||
disabled:
|
disabled:
|
||||||
# not compatible with path state scheme
|
# not compatible with path state scheme
|
||||||
- name: debug_traceBlockByHash
|
- name: debug_traceBlockByHash
|
||||||
|
# minimal bsc lacks the state to serve eth_getProof; the drpc gateway
|
||||||
|
# probes it and marks the whole upstream unavailable on "header not
|
||||||
|
# found" (especially while catching up after a restart).
|
||||||
|
- name: eth_getProof
|
||||||
enabled:
|
enabled:
|
||||||
- name: txpool_content # TODO: should be disabled for rollup nodes
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
# standard geth only
|
# standard geth only
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
bsc-mainnet:
|
bsc-mainnet:
|
||||||
image: ${BSC_BSC_IMAGE:-ghcr.io/bnb-chain/bsc}:${BSC_MAINNET_BSC_VERSION:-1.6.5}
|
image: ${BSC_BSC_IMAGE:-ghcr.io/bnb-chain/bsc}:${BSC_MAINNET_BSC_VERSION:-1.7.3}
|
||||||
sysctls:
|
sysctls:
|
||||||
# TCP Performance
|
# TCP Performance
|
||||||
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
|
||||||
|
|||||||
@@ -130,6 +130,10 @@ x-upstreams:
|
|||||||
methods:
|
methods:
|
||||||
disabled:
|
disabled:
|
||||||
- name: eth_getLogs # this returns result [] on ethereum mainnet when it shouldn't so it's probably buggy on al networks
|
- name: eth_getLogs # this returns result [] on ethereum mainnet when it shouldn't so it's probably buggy on al networks
|
||||||
|
# minimal bsc lacks the state to serve eth_getProof; the drpc gateway
|
||||||
|
# probes it and marks the whole upstream unavailable on "header not
|
||||||
|
# found" (especially while catching up after a restart).
|
||||||
|
- name: eth_getProof
|
||||||
enabled:
|
enabled:
|
||||||
- name: txpool_content # TODO: should be disabled for rollup nodes
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
# standard geth and erigon
|
# standard geth and erigon
|
||||||
|
|||||||
@@ -130,6 +130,10 @@ x-upstreams:
|
|||||||
methods:
|
methods:
|
||||||
disabled:
|
disabled:
|
||||||
- name: eth_getLogs # this returns result [] on ethereum mainnet when it shouldn't so it's probably buggy on al networks
|
- name: eth_getLogs # this returns result [] on ethereum mainnet when it shouldn't so it's probably buggy on al networks
|
||||||
|
# minimal bsc lacks the state to serve eth_getProof; the drpc gateway
|
||||||
|
# probes it and marks the whole upstream unavailable on "header not
|
||||||
|
# found" (especially while catching up after a restart).
|
||||||
|
- name: eth_getProof
|
||||||
enabled:
|
enabled:
|
||||||
- name: txpool_content # TODO: should be disabled for rollup nodes
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
# standard geth and erigon
|
# standard geth and erigon
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||||
RETH_VERSION: ${BSC_CHAPEL_RETH_VERSION:-v0.0.7-beta}
|
RETH_VERSION: ${BSC_CHAPEL_RETH_VERSION:-v0.0.6.3}
|
||||||
RETH_REPO: ${BSC_CHAPEL_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
RETH_REPO: ${BSC_CHAPEL_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
||||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||||
@@ -101,6 +101,7 @@ services:
|
|||||||
- --rpc.max-blocks-per-filter=0
|
- --rpc.max-blocks-per-filter=0
|
||||||
- --rpc.max-connections=50000
|
- --rpc.max-connections=50000
|
||||||
- --rpc.max-logs-per-response=0
|
- --rpc.max-logs-per-response=0
|
||||||
|
- --rpc.max-trace-filter-blocks=10000
|
||||||
- --statedb.triedb
|
- --statedb.triedb
|
||||||
- --ws
|
- --ws
|
||||||
- --ws.addr=0.0.0.0
|
- --ws.addr=0.0.0.0
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||||
RETH_VERSION: ${BSC_CHAPEL_RETH_VERSION:-v0.0.7-beta}
|
RETH_VERSION: ${BSC_CHAPEL_RETH_VERSION:-v0.0.6.3}
|
||||||
RETH_REPO: ${BSC_CHAPEL_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
RETH_REPO: ${BSC_CHAPEL_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
||||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||||
@@ -101,6 +101,7 @@ services:
|
|||||||
- --rpc.max-blocks-per-filter=0
|
- --rpc.max-blocks-per-filter=0
|
||||||
- --rpc.max-connections=50000
|
- --rpc.max-connections=50000
|
||||||
- --rpc.max-logs-per-response=0
|
- --rpc.max-logs-per-response=0
|
||||||
|
- --rpc.max-trace-filter-blocks=10000
|
||||||
- --ws
|
- --ws
|
||||||
- --ws.addr=0.0.0.0
|
- --ws.addr=0.0.0.0
|
||||||
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
|
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||||
RETH_VERSION: ${BSC_CHAPEL_RETH_VERSION:-v0.0.7-beta}
|
RETH_VERSION: ${BSC_CHAPEL_RETH_VERSION:-v0.0.6.3}
|
||||||
RETH_REPO: ${BSC_CHAPEL_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
RETH_REPO: ${BSC_CHAPEL_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
||||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||||
@@ -102,6 +102,7 @@ services:
|
|||||||
- --rpc.max-blocks-per-filter=0
|
- --rpc.max-blocks-per-filter=0
|
||||||
- --rpc.max-connections=50000
|
- --rpc.max-connections=50000
|
||||||
- --rpc.max-logs-per-response=0
|
- --rpc.max-logs-per-response=0
|
||||||
|
- --rpc.max-trace-filter-blocks=10000
|
||||||
- --statedb.triedb
|
- --statedb.triedb
|
||||||
- --ws
|
- --ws
|
||||||
- --ws.addr=0.0.0.0
|
- --ws.addr=0.0.0.0
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||||
RETH_VERSION: ${BSC_CHAPEL_RETH_VERSION:-v0.0.7-beta}
|
RETH_VERSION: ${BSC_CHAPEL_RETH_VERSION:-v0.0.6.3}
|
||||||
RETH_REPO: ${BSC_CHAPEL_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
RETH_REPO: ${BSC_CHAPEL_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
||||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||||
@@ -102,6 +102,7 @@ services:
|
|||||||
- --rpc.max-blocks-per-filter=0
|
- --rpc.max-blocks-per-filter=0
|
||||||
- --rpc.max-connections=50000
|
- --rpc.max-connections=50000
|
||||||
- --rpc.max-logs-per-response=0
|
- --rpc.max-logs-per-response=0
|
||||||
|
- --rpc.max-trace-filter-blocks=10000
|
||||||
- --ws
|
- --ws
|
||||||
- --ws.addr=0.0.0.0
|
- --ws.addr=0.0.0.0
|
||||||
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
|
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||||
RETH_VERSION: ${BSC_MAINNET_RETH_VERSION:-v0.0.7-beta}
|
RETH_VERSION: ${BSC_MAINNET_RETH_VERSION:-v0.0.6.3}
|
||||||
RETH_REPO: ${BSC_MAINNET_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
RETH_REPO: ${BSC_MAINNET_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
||||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||||
@@ -102,6 +102,7 @@ services:
|
|||||||
- --rpc.max-blocks-per-filter=0
|
- --rpc.max-blocks-per-filter=0
|
||||||
- --rpc.max-connections=50000
|
- --rpc.max-connections=50000
|
||||||
- --rpc.max-logs-per-response=0
|
- --rpc.max-logs-per-response=0
|
||||||
|
- --rpc.max-trace-filter-blocks=10000
|
||||||
- --statedb.triedb
|
- --statedb.triedb
|
||||||
- --ws
|
- --ws
|
||||||
- --ws.addr=0.0.0.0
|
- --ws.addr=0.0.0.0
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||||
RETH_VERSION: ${BSC_MAINNET_RETH_VERSION:-v0.0.7-beta}
|
RETH_VERSION: ${BSC_MAINNET_RETH_VERSION:-v0.0.6.3}
|
||||||
RETH_REPO: ${BSC_MAINNET_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
RETH_REPO: ${BSC_MAINNET_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
||||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||||
@@ -102,6 +102,7 @@ services:
|
|||||||
- --rpc.max-blocks-per-filter=0
|
- --rpc.max-blocks-per-filter=0
|
||||||
- --rpc.max-connections=50000
|
- --rpc.max-connections=50000
|
||||||
- --rpc.max-logs-per-response=0
|
- --rpc.max-logs-per-response=0
|
||||||
|
- --rpc.max-trace-filter-blocks=10000
|
||||||
- --ws
|
- --ws
|
||||||
- --ws.addr=0.0.0.0
|
- --ws.addr=0.0.0.0
|
||||||
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
|
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||||
RETH_VERSION: ${BSC_MAINNET_RETH_VERSION:-v0.0.7-beta}
|
RETH_VERSION: ${BSC_MAINNET_RETH_VERSION:-v0.0.6.3}
|
||||||
RETH_REPO: ${BSC_MAINNET_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
RETH_REPO: ${BSC_MAINNET_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
||||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||||
@@ -102,6 +102,7 @@ services:
|
|||||||
- --rpc.max-blocks-per-filter=0
|
- --rpc.max-blocks-per-filter=0
|
||||||
- --rpc.max-connections=50000
|
- --rpc.max-connections=50000
|
||||||
- --rpc.max-logs-per-response=0
|
- --rpc.max-logs-per-response=0
|
||||||
|
- --rpc.max-trace-filter-blocks=10000
|
||||||
- --statedb.triedb
|
- --statedb.triedb
|
||||||
- --ws
|
- --ws
|
||||||
- --ws.addr=0.0.0.0
|
- --ws.addr=0.0.0.0
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm}
|
||||||
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
LLVM_VERSION: ${LLVM_VERSION:-20250912105042}
|
||||||
RETH_VERSION: ${BSC_MAINNET_RETH_VERSION:-v0.0.7-beta}
|
RETH_VERSION: ${BSC_MAINNET_RETH_VERSION:-v0.0.6.3}
|
||||||
RETH_REPO: ${BSC_MAINNET_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
RETH_REPO: ${BSC_MAINNET_RETH_REPO:-https://github.com/bnb-chain/reth-bsc.git}
|
||||||
ARCH_TARGET: ${ARCH_TARGET:-native}
|
ARCH_TARGET: ${ARCH_TARGET:-native}
|
||||||
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
PROFILE: ${RETH_BUILD_PROFILE:-maxperf}
|
||||||
@@ -102,6 +102,7 @@ services:
|
|||||||
- --rpc.max-blocks-per-filter=0
|
- --rpc.max-blocks-per-filter=0
|
||||||
- --rpc.max-connections=50000
|
- --rpc.max-connections=50000
|
||||||
- --rpc.max-logs-per-response=0
|
- --rpc.max-logs-per-response=0
|
||||||
|
- --rpc.max-trace-filter-blocks=10000
|
||||||
- --ws
|
- --ws
|
||||||
- --ws.addr=0.0.0.0
|
- --ws.addr=0.0.0.0
|
||||||
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
|
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ services:
|
|||||||
- "prometheus-scrape.enabled=true"
|
- "prometheus-scrape.enabled=true"
|
||||||
- "prometheus-scrape.port=8080"
|
- "prometheus-scrape.port=8080"
|
||||||
- "prometheus-scrape.job_name=cadvisor"
|
- "prometheus-scrape.job_name=cadvisor"
|
||||||
|
- "prometheus-scrape.metrics_path=/metrics"
|
||||||
- "org.label-schema.group=monitoring"
|
- "org.label-schema.group=monitoring"
|
||||||
networks:
|
networks:
|
||||||
- monitoring
|
- monitoring
|
||||||
|
|||||||
256
check-health.sh
256
check-health.sh
@@ -8,9 +8,25 @@ if [ $# -lt 2 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
RPC_URL=$1
|
RPC_URL=$1
|
||||||
REF=""
|
shift
|
||||||
|
|
||||||
for url in "${@:2}"; do
|
# Check for --starknet / --aztec / --cosmos flag
|
||||||
|
is_starknet=false
|
||||||
|
is_aztec=false
|
||||||
|
is_cosmos=false
|
||||||
|
if [ "$1" == "--starknet" ]; then
|
||||||
|
is_starknet=true
|
||||||
|
shift
|
||||||
|
elif [ "$1" == "--aztec" ]; then
|
||||||
|
is_aztec=true
|
||||||
|
shift
|
||||||
|
elif [ "$1" == "--cosmos" ]; then
|
||||||
|
is_cosmos=true
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
REF=""
|
||||||
|
for url in "$@"; do
|
||||||
REF+="--url $url "
|
REF+="--url $url "
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -21,53 +37,180 @@ ref=${REF% }
|
|||||||
|
|
||||||
timeout=3 # seconds
|
timeout=3 # seconds
|
||||||
|
|
||||||
|
# CometBFT / cosmos (gaiad and the cosmos batch): no EVM RPC. Use the chain's own
|
||||||
|
# sync_info from the CometBFT /status method — catching_up=false means caught up to head.
|
||||||
|
# Short-circuits here; the EVM/starknet/aztec block-comparison path below is not used.
|
||||||
|
if $is_cosmos; then
|
||||||
|
status=$(curl -L --ipv4 -m $timeout -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","id":1,"method":"status"}' "$RPC_URL")
|
||||||
|
if [ $? -ne 0 ] || [ -z "$status" ]; then echo "timeout"; exit 1; fi
|
||||||
|
catching_up=$(echo "$status" | jq -r '.result.sync_info.catching_up // .sync_info.catching_up' 2>/dev/null)
|
||||||
|
node_height=$(echo "$status" | jq -r '.result.sync_info.latest_block_height // .sync_info.latest_block_height' 2>/dev/null)
|
||||||
|
if [ -z "$node_height" ] || [ "$node_height" = "null" ]; then echo "error"; exit 1; fi
|
||||||
|
if [ "$catching_up" = "true" ]; then echo "syncing"; exit 1; fi
|
||||||
|
# catching_up=false => synced. If a reference endpoint is given, sanity-check head gap.
|
||||||
|
if [ -n "$ref" ]; then
|
||||||
|
ref_status=$($BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","id":1,"method":"status"}' $ref)
|
||||||
|
ref_height=$(echo "$ref_status" | jq -r '.result.sync_info.latest_block_height // .sync_info.latest_block_height' 2>/dev/null)
|
||||||
|
if [ -n "$ref_height" ] && [ "$ref_height" != "null" ] && [ "$ref_height" -gt 0 ] 2>/dev/null; then
|
||||||
|
gap=$(( ref_height - node_height ))
|
||||||
|
if [ "$gap" -gt 100 ]; then echo "behind ($gap)"; exit 1; fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "online"; exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
response_file=$(mktemp)
|
response_file=$(mktemp)
|
||||||
|
|
||||||
http_status_code=$(curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' $RPC_URL)
|
# Use appropriate RPC method based on chain type
|
||||||
|
if $is_starknet; then
|
||||||
|
rpc_method='{"jsonrpc":"2.0","method":"starknet_getBlockWithTxHashes","params":["latest"],"id":1}'
|
||||||
|
elif $is_aztec; then
|
||||||
|
rpc_method='{"jsonrpc":"2.0","method":"node_getBlock","params":["latest"],"id":1}'
|
||||||
|
else
|
||||||
|
rpc_method='{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
http_status_code=$(curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data "$rpc_method" $RPC_URL)
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
if [[ $http_status_code -eq 200 ]]; then
|
if [[ $http_status_code -eq 200 ]]; then
|
||||||
response=$(cat "$response_file")
|
response=$(cat "$response_file")
|
||||||
latest_block_timestamp=$(echo "$response" | jq -r '.result.timestamp')
|
|
||||||
latest_block_timestamp_decimal=$((16#${latest_block_timestamp#0x}))
|
if $is_starknet; then
|
||||||
|
# Starknet returns decimal timestamp and block_number
|
||||||
|
latest_block_timestamp_decimal=$(echo "$response" | jq -r '.result.timestamp')
|
||||||
|
latest_block_number=$(echo "$response" | jq -r '.result.block_number')
|
||||||
|
latest_block_hash=$(echo "$response" | jq -r '.result.block_hash')
|
||||||
|
elif $is_aztec; then
|
||||||
|
# Aztec: node_getBlock("latest") returns blockHash, header.globalVariables.blockNumber, header.globalVariables.timestamp
|
||||||
|
latest_block_number=$(echo "$response" | jq -r '.result.header.globalVariables.blockNumber')
|
||||||
|
latest_block_timestamp_decimal=$(echo "$response" | jq -r '.result.header.globalVariables.timestamp')
|
||||||
|
latest_block_hash=$(echo "$response" | jq -r '.result.blockHash')
|
||||||
|
if [ "$latest_block_number" = "null" ] || [ "$latest_block_timestamp_decimal" = "null" ] || [ -z "$latest_block_timestamp_decimal" ]; then
|
||||||
|
echo "error"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Ethereum returns hex timestamp and number
|
||||||
|
latest_block_timestamp=$(echo "$response" | jq -r '.result.timestamp')
|
||||||
|
latest_block_timestamp_decimal=$((16#${latest_block_timestamp#0x}))
|
||||||
|
latest_block_number=$(echo "$response" | jq -r '.result.number')
|
||||||
|
latest_block_hash=$(echo "$response" | jq -r '.result.hash')
|
||||||
|
fi
|
||||||
|
|
||||||
current_time=$(date +%s)
|
current_time=$(date +%s)
|
||||||
time_difference=$((current_time - latest_block_timestamp_decimal))
|
time_difference=$((current_time - latest_block_timestamp_decimal))
|
||||||
|
|
||||||
rm "$response_file"
|
rm "$response_file"
|
||||||
|
|
||||||
if [ -n "$ref" ]; then
|
|
||||||
latest_block_number=$(echo "$response" | jq -r '.result.number')
|
|
||||||
latest_block_hash=$(echo "$response" | jq -r '.result.hash')
|
|
||||||
response_file2=$(mktemp)
|
|
||||||
|
|
||||||
sleep 3 # to give the reference node more time to import the block if it is very current
|
if [ -n "$ref" ]; then
|
||||||
|
MAX_RETRIES=3
|
||||||
http_status_code2=$($BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file2" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"$latest_block_number\", false],\"id\":1}" $ref)
|
attempt=1
|
||||||
|
|
||||||
|
while [ $attempt -le $MAX_RETRIES ]; do
|
||||||
|
# Re-fetch local latest block for retries > 1
|
||||||
|
if [ $attempt -gt 1 ]; then
|
||||||
|
sleep 3
|
||||||
|
# Re-query local latest block and update variables
|
||||||
|
response_file=$(mktemp)
|
||||||
|
http_status_code=$(curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data "$rpc_method" $RPC_URL)
|
||||||
|
if [ $? -eq 0 ] && [[ $http_status_code -eq 200 ]]; then
|
||||||
|
response=$(cat "$response_file")
|
||||||
|
if $is_starknet; then
|
||||||
|
latest_block_timestamp_decimal=$(echo "$response" | jq -r '.result.timestamp')
|
||||||
|
latest_block_number=$(echo "$response" | jq -r '.result.block_number')
|
||||||
|
latest_block_hash=$(echo "$response" | jq -r '.result.block_hash')
|
||||||
|
elif $is_aztec; then
|
||||||
|
latest_block_number=$(echo "$response" | jq -r '.result.header.globalVariables.blockNumber')
|
||||||
|
latest_block_timestamp_decimal=$(echo "$response" | jq -r '.result.header.globalVariables.timestamp')
|
||||||
|
latest_block_hash=$(echo "$response" | jq -r '.result.blockHash')
|
||||||
|
if [ "$latest_block_number" = "null" ] || [ "$latest_block_timestamp_decimal" = "null" ] || [ -z "$latest_block_timestamp_decimal" ]; then
|
||||||
|
echo "error"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
latest_block_timestamp=$(echo "$response" | jq -r '.result.timestamp')
|
||||||
|
latest_block_timestamp_decimal=$((16#${latest_block_timestamp#0x}))
|
||||||
|
latest_block_number=$(echo "$response" | jq -r '.result.number')
|
||||||
|
latest_block_hash=$(echo "$response" | jq -r '.result.hash')
|
||||||
|
fi
|
||||||
|
current_time=$(date +%s)
|
||||||
|
time_difference=$((current_time - latest_block_timestamp_decimal))
|
||||||
|
rm "$response_file"
|
||||||
|
else
|
||||||
|
rm "$response_file"
|
||||||
|
echo "error"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
response_file2=$(mktemp)
|
||||||
|
|
||||||
|
if [ $attempt -eq 1 ]; then
|
||||||
|
sleep 3 # to give the reference node more time to import the block if it is very current
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $is_starknet; then
|
||||||
|
# Starknet uses block_id object with block_number
|
||||||
|
rpc_method2="{\"jsonrpc\":\"2.0\",\"method\":\"starknet_getBlockWithTxHashes\",\"params\":[{\"block_number\":$latest_block_number}],\"id\":1}"
|
||||||
|
elif $is_aztec; then
|
||||||
|
rpc_method2="{\"jsonrpc\":\"2.0\",\"method\":\"node_getBlock\",\"params\":[$latest_block_number],\"id\":1}"
|
||||||
|
else
|
||||||
|
rpc_method2="{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"$latest_block_number\", false],\"id\":1}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
http_status_code2=$($BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code}" -o "$response_file2" -H "Content-Type: application/json" --data "$rpc_method2" $ref)
|
||||||
|
|
||||||
curl_code2=$?
|
curl_code2=$?
|
||||||
|
|
||||||
if [ $curl_code2 -eq 0 ]; then
|
if [ $curl_code2 -eq 0 ]; then
|
||||||
if [[ $http_status_code2 -eq 200 ]]; then
|
if [[ $http_status_code2 -eq 200 ]]; then
|
||||||
response2=$(cat "$response_file2")
|
response2=$(cat "$response_file2")
|
||||||
latest_block_hash2=$(echo "$response2" | jq -r '.result.hash')
|
if $is_starknet; then
|
||||||
|
latest_block_hash2=$(echo "$response2" | jq -r '.result.block_hash')
|
||||||
|
elif $is_aztec; then
|
||||||
|
latest_block_hash2=$(echo "$response2" | jq -r '.result.blockHash')
|
||||||
|
else
|
||||||
|
latest_block_hash2=$(echo "$response2" | jq -r '.result.hash')
|
||||||
|
fi
|
||||||
|
|
||||||
rm "$response_file2"
|
rm "$response_file2"
|
||||||
|
|
||||||
|
# Proceed if hashes match (or both empty for Aztec when API omits hash)
|
||||||
if [ "$latest_block_hash" == "$latest_block_hash2" ]; then
|
if [ "$latest_block_hash" == "$latest_block_hash2" ]; then
|
||||||
response_file3=$(mktemp)
|
response_file3=$(mktemp)
|
||||||
status_file3=$(mktemp)
|
status_file3=$(mktemp)
|
||||||
{
|
|
||||||
$BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file3" -H "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"latest\", false],\"id\":1}" $ref > "$status_file3"
|
|
||||||
} &
|
|
||||||
pid3=$!
|
|
||||||
|
|
||||||
response_file4=$(mktemp)
|
if $is_aztec; then
|
||||||
status_file4=$(mktemp)
|
# Aztec: node_getBlock("latest") - same single-request pattern as eth/starknet
|
||||||
|
rpc_method_latest='{"jsonrpc":"2.0","method":"node_getBlock","params":["latest"],"id":1}'
|
||||||
{
|
{
|
||||||
curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file4" -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' $RPC_URL > "$status_file4"
|
$BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file3" -H "Content-Type: application/json" --data "$rpc_method_latest" $ref > "$status_file3"
|
||||||
} &
|
} &
|
||||||
pid4=$!
|
pid3=$!
|
||||||
|
response_file4=$(mktemp)
|
||||||
|
status_file4=$(mktemp)
|
||||||
|
{
|
||||||
|
curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file4" -H "Content-Type: application/json" --data "$rpc_method_latest" $RPC_URL > "$status_file4"
|
||||||
|
} &
|
||||||
|
pid4=$!
|
||||||
|
else
|
||||||
|
if $is_starknet; then
|
||||||
|
rpc_method_latest='{"jsonrpc":"2.0","method":"starknet_getBlockWithTxHashes","params":["latest"],"id":1}'
|
||||||
|
else
|
||||||
|
rpc_method_latest='{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}'
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
$BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file3" -H "Content-Type: application/json" --data "$rpc_method_latest" $ref > "$status_file3"
|
||||||
|
} &
|
||||||
|
pid3=$!
|
||||||
|
response_file4=$(mktemp)
|
||||||
|
status_file4=$(mktemp)
|
||||||
|
{
|
||||||
|
curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file4" -H "Content-Type: application/json" --data "$rpc_method_latest" $RPC_URL > "$status_file4"
|
||||||
|
} &
|
||||||
|
pid4=$!
|
||||||
|
fi
|
||||||
|
|
||||||
wait $pid3
|
wait $pid3
|
||||||
curl_code3=$?
|
curl_code3=$?
|
||||||
@@ -86,29 +229,53 @@ if [ $? -eq 0 ]; then
|
|||||||
if [ $curl_code3 -eq 0 ]; then
|
if [ $curl_code3 -eq 0 ]; then
|
||||||
if [[ $http_status_code3 -eq 200 ]]; then
|
if [[ $http_status_code3 -eq 200 ]]; then
|
||||||
response3=$(cat "$response_file3")
|
response3=$(cat "$response_file3")
|
||||||
latest_block_timestamp3=$(echo "$response3" | jq -r '.result.timestamp')
|
|
||||||
latest_block_timestamp_decimal3=$((16#${latest_block_timestamp3#0x}))
|
|
||||||
|
|
||||||
# echo "refer: $latest_block_timestamp_decimal3"
|
if $is_starknet; then
|
||||||
|
ref_num=$(echo "$response3" | jq -r '.result.block_number // empty')
|
||||||
|
elif $is_aztec; then
|
||||||
|
ref_num=$(echo "$response3" | jq -r '.result.header.globalVariables.blockNumber // empty')
|
||||||
|
else
|
||||||
|
ref_num_hex=$(echo "$response3" | jq -r '.result.number // empty')
|
||||||
|
ref_num=$([ -n "$ref_num_hex" ] && printf '%d' "$ref_num_hex" 2>/dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# echo "refer: $latest_block_timestamp_decimal3"
|
||||||
rm "$response_file3"
|
rm "$response_file3"
|
||||||
|
|
||||||
if [ $curl_code4 -eq 0 ]; then
|
if [ $curl_code4 -eq 0 ]; then
|
||||||
if [[ $http_status_code4 -eq 200 ]]; then
|
if [[ $http_status_code4 -eq 200 ]]; then
|
||||||
response4=$(cat "$response_file4")
|
response4=$(cat "$response_file4")
|
||||||
latest_block_timestamp4=$(echo "$response4" | jq -r '.result.timestamp')
|
|
||||||
latest_block_timestamp_decimal4=$((16#${latest_block_timestamp4#0x}))
|
if $is_starknet; then
|
||||||
|
local_num=$(echo "$response4" | jq -r '.result.block_number // empty')
|
||||||
|
elif $is_aztec; then
|
||||||
|
local_num=$(echo "$response4" | jq -r '.result.header.globalVariables.blockNumber // empty')
|
||||||
|
else
|
||||||
|
local_num_hex=$(echo "$response4" | jq -r '.result.number // empty')
|
||||||
|
local_num=$([ -n "$local_num_hex" ] && printf '%d' "$local_num_hex" 2>/dev/null)
|
||||||
|
fi
|
||||||
|
|
||||||
#echo "local: $latest_block_timestamp_decimal4"
|
#echo "local: $latest_block_timestamp_decimal4"
|
||||||
rm "$response_file4"
|
rm "$response_file4"
|
||||||
|
|
||||||
time_difference3=$(echo "scale=6; (${latest_block_timestamp_decimal3} - ${request_time3}) - (${latest_block_timestamp_decimal4} - ${request_time4})" | bc)
|
# Lag in BLOCKS between the reference head and the local head
|
||||||
|
# (positive => local behind). Compare against dRPC's own per-chain
|
||||||
#echo "diff after network latency: $time_difference3 s"
|
# thresholds (LAGGING_LAG / SYNCING_LAG from chains.yaml via
|
||||||
|
# sync-status.sh) so our status matches the dRPC gateway's view.
|
||||||
if (( $(echo "$time_difference3 < 2" | bc -l) )); then
|
# dRPC uses the two thresholds inconsistently (sometimes
|
||||||
|
# lagging<syncing, sometimes the reverse), so treat the smaller as
|
||||||
|
# the online boundary and the larger as the syncing/drop boundary.
|
||||||
|
if [ -z "$ref_num" ] || [ -z "$local_num" ]; then
|
||||||
|
echo "error"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
lag=$(( ref_num - local_num ))
|
||||||
|
lo=${LAGGING_LAG:-2}; hi=${SYNCING_LAG:-6}
|
||||||
|
if [ "$lo" -gt "$hi" ]; then tmp=$lo; lo=$hi; hi=$tmp; fi
|
||||||
|
if [ "$lag" -le "$lo" ]; then
|
||||||
echo "online"
|
echo "online"
|
||||||
exit 0
|
exit 0
|
||||||
elif (( $(echo "$time_difference3 < 5" | bc -l) )); then
|
elif [ "$lag" -le "$hi" ]; then
|
||||||
echo "lagging"
|
echo "lagging"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
@@ -123,14 +290,23 @@ if [ $? -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "forked"
|
# Hash mismatch - retry if we have attempts left
|
||||||
exit 1
|
if [ $attempt -lt $MAX_RETRIES ]; then
|
||||||
|
rm "$response_file2"
|
||||||
|
attempt=$((attempt + 1))
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
rm "$response_file2"
|
||||||
|
echo "forked"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "unverified ($http_status_code2)"
|
echo "unverified ($http_status_code2)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
echo "unverified ($curl_code)"
|
echo "unverified ($curl_code)"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -1,21 +1,260 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Retain the N newest backups per volume key and move excess to trash.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# ./cleanup-backups.sh [--dry-run]
|
||||||
|
#
|
||||||
|
# Environment:
|
||||||
|
# BACKUP_DIR=/backup Backup root directory
|
||||||
|
# TRASH_DIR=/backup/trash Where removed backups are staged
|
||||||
|
# KEEP_COUNT=3 Backups to keep per volume key
|
||||||
|
# UPLOADING_MAX_AGE_HOURS=72 Trash uploading-* only when older than this
|
||||||
|
# EXCLUDE_DIRS=graveyard:quarantained:trash Colon-separated subdirs to skip
|
||||||
|
|
||||||
# Directory containing the backup files
|
set -euo pipefail
|
||||||
backup_dir="/backup"
|
|
||||||
|
|
||||||
# Get a list of all backup files
|
BASEPATH="$(cd "$(dirname "$0")" && pwd)"
|
||||||
backup_files=$(find "$backup_dir" -type f -name 'rpc_*-*.tar.zst')
|
BACKUP_DIR="${BACKUP_DIR:-/backup}"
|
||||||
|
TRASH_DIR="${TRASH_DIR:-$BACKUP_DIR/trash}"
|
||||||
|
KEEP_COUNT="${KEEP_COUNT:-3}"
|
||||||
|
UPLOADING_MAX_AGE_HOURS="${UPLOADING_MAX_AGE_HOURS:-72}"
|
||||||
|
EXCLUDE_DIRS="${EXCLUDE_DIRS:-graveyard:quarantained:trash}"
|
||||||
|
|
||||||
# Iterate through each backup file
|
DRY_RUN=false
|
||||||
for file in $backup_files; do
|
if [[ "${1:-}" == "--dry-run" ]]; then
|
||||||
# Extract volume name from the file name
|
DRY_RUN=true
|
||||||
volume_name=$(basename "$file" | cut -d '-' -f 1-3)
|
elif [[ -n "${1:-}" ]]; then
|
||||||
|
echo "Usage: $0 [--dry-run]" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the latest backup file for this volume name
|
BACKUP_PATTERN='^(rpc_.+)-([0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{2})-([0-9]+)G\.tar\.zst$'
|
||||||
latest_backup=$(find "$backup_dir" -type f -name "$volume_name-*" -printf "%T@ %p\n" | sort -n | tail -1 | cut -d ' ' -f 2)
|
|
||||||
|
|
||||||
# Keep only the latest backup file for this volume name
|
log() {
|
||||||
if [[ "$file" != "$latest_backup" ]]; then
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >&2
|
||||||
rm "$file"
|
}
|
||||||
|
|
||||||
|
bytes_trashed=0
|
||||||
|
add_trashed_bytes() {
|
||||||
|
local file=$1
|
||||||
|
if [[ -f "$file" ]]; then
|
||||||
|
local size
|
||||||
|
size=$(stat -c%s "$file" 2>/dev/null || echo 0)
|
||||||
|
bytes_trashed=$((bytes_trashed + size))
|
||||||
fi
|
fi
|
||||||
done
|
}
|
||||||
|
|
||||||
|
trash_file() {
|
||||||
|
local file=$1
|
||||||
|
local reason=$2
|
||||||
|
|
||||||
|
if [[ ! -f "$file" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
local dest="$TRASH_DIR/$(basename "$file")"
|
||||||
|
if [[ -e "$dest" ]]; then
|
||||||
|
log "Error: trash destination already exists, skipping: $dest"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $DRY_RUN; then
|
||||||
|
log "DRY-RUN would trash ($reason): $file -> $dest"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv -- "$file" "$dest"
|
||||||
|
log "Trashed ($reason): $file -> $dest"
|
||||||
|
}
|
||||||
|
|
||||||
|
is_excluded_path() {
|
||||||
|
local path=$1
|
||||||
|
local rel="${path#"$BACKUP_DIR"/}"
|
||||||
|
|
||||||
|
if [[ "$rel" == broken_* ]] || [[ "$rel" == deprecated-* ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
local dir
|
||||||
|
IFS=':' read -ra excluded_dirs <<< "$EXCLUDE_DIRS"
|
||||||
|
for dir in "${excluded_dirs[@]}"; do
|
||||||
|
if [[ -n "$dir" && ( "$rel" == "$dir" || "$rel" == "$dir"/* ) ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_volume_key() {
|
||||||
|
local basename=$1
|
||||||
|
if [[ "$basename" =~ $BACKUP_PATTERN ]]; then
|
||||||
|
echo "${BASH_REMATCH[1]}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
metadata_for_archive() {
|
||||||
|
local archive=$1
|
||||||
|
echo "${archive%.tar.zst}.txt"
|
||||||
|
}
|
||||||
|
|
||||||
|
file_has_open_handles() {
|
||||||
|
local file=$1
|
||||||
|
|
||||||
|
if command -v lsof >/dev/null 2>&1; then
|
||||||
|
if lsof -- "$file" >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v fuser >/dev/null 2>&1; then
|
||||||
|
if fuser -- "$file" >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup_stale_uploads() {
|
||||||
|
local upload_file
|
||||||
|
local age_seconds=$((UPLOADING_MAX_AGE_HOURS * 3600))
|
||||||
|
local now
|
||||||
|
now=$(date +%s)
|
||||||
|
|
||||||
|
while IFS= read -r -d '' upload_file; do
|
||||||
|
if is_excluded_path "$upload_file"; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
local mtime age
|
||||||
|
mtime=$(stat -c %Y "$upload_file")
|
||||||
|
age=$((now - mtime))
|
||||||
|
|
||||||
|
if (( age < age_seconds )); then
|
||||||
|
log "Keeping in-progress upload ($(($age / 3600))h old): $upload_file"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if file_has_open_handles "$upload_file"; then
|
||||||
|
log "Keeping upload with open handles ($(($age / 3600))h old): $upload_file"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
add_trashed_bytes "$upload_file"
|
||||||
|
trash_file "$upload_file" "stale upload older than ${UPLOADING_MAX_AGE_HOURS}h"
|
||||||
|
done < <(find "$BACKUP_DIR" -maxdepth 1 -type f -name 'uploading-*' -print0 2>/dev/null)
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup_volume_backups() {
|
||||||
|
declare -A volume_files=()
|
||||||
|
local file basename volume_key
|
||||||
|
|
||||||
|
while IFS= read -r -d '' file; do
|
||||||
|
if is_excluded_path "$file"; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
basename=$(basename "$file")
|
||||||
|
if ! volume_key=$(parse_volume_key "$basename"); then
|
||||||
|
log "Skipping unrecognized backup filename: $file"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
volume_files["$volume_key"]+="$file"$'\n'
|
||||||
|
done < <(find "$BACKUP_DIR" -maxdepth 1 -type f -name 'rpc_*-*.tar.zst' -print0 2>/dev/null)
|
||||||
|
|
||||||
|
local volume trashed=0 kept=0
|
||||||
|
for volume in "${!volume_files[@]}"; do
|
||||||
|
mapfile -t files < <(printf '%s' "${volume_files[$volume]}" | sed '/^$/d' | sort)
|
||||||
|
|
||||||
|
local total=${#files[@]}
|
||||||
|
if (( total <= KEEP_COUNT )); then
|
||||||
|
kept=$((kept + total))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
local delete_count=$((total - KEEP_COUNT))
|
||||||
|
local i
|
||||||
|
for ((i = 0; i < delete_count; i++)); do
|
||||||
|
local archive="${files[$i]}"
|
||||||
|
local metadata
|
||||||
|
metadata=$(metadata_for_archive "$archive")
|
||||||
|
|
||||||
|
add_trashed_bytes "$archive"
|
||||||
|
trash_file "$archive" "keeping ${KEEP_COUNT}/${total} for $volume"
|
||||||
|
trashed=$((trashed + 1))
|
||||||
|
|
||||||
|
if [[ -f "$metadata" ]]; then
|
||||||
|
add_trashed_bytes "$metadata"
|
||||||
|
trash_file "$metadata" "orphaned metadata for $volume"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
kept=$((kept + KEEP_COUNT))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "$trashed $kept"
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup_orphan_metadata() {
|
||||||
|
local metadata archive basename
|
||||||
|
local orphans=0
|
||||||
|
|
||||||
|
while IFS= read -r -d '' metadata; do
|
||||||
|
if is_excluded_path "$metadata"; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
basename=$(basename "$metadata")
|
||||||
|
if [[ ! "$basename" =~ ^rpc_.+\.txt$ ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive="${metadata%.txt}.tar.zst"
|
||||||
|
if [[ -f "$archive" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f "$TRASH_DIR/$(basename "$archive")" ]]; then
|
||||||
|
add_trashed_bytes "$metadata"
|
||||||
|
trash_file "$metadata" "metadata for archived-in-trash backup"
|
||||||
|
orphans=$((orphans + 1))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
add_trashed_bytes "$metadata"
|
||||||
|
trash_file "$metadata" "orphaned metadata without archive"
|
||||||
|
orphans=$((orphans + 1))
|
||||||
|
done < <(find "$BACKUP_DIR" -maxdepth 1 -type f -name 'rpc_*.txt' -print0 2>/dev/null)
|
||||||
|
|
||||||
|
echo "$orphans"
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
if [[ ! -d "$BACKUP_DIR" ]]; then
|
||||||
|
log "Error: backup directory does not exist: $BACKUP_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! $DRY_RUN; then
|
||||||
|
mkdir -p "$TRASH_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Starting backup cleanup in $BACKUP_DIR (trash_dir=$TRASH_DIR, keep_count=$KEEP_COUNT, uploading_max_age=${UPLOADING_MAX_AGE_HOURS}h, dry_run=$DRY_RUN)"
|
||||||
|
|
||||||
|
cleanup_stale_uploads
|
||||||
|
|
||||||
|
local trashed kept orphan_metadata
|
||||||
|
read -r trashed kept < <(cleanup_volume_backups)
|
||||||
|
read -r orphan_metadata < <(cleanup_orphan_metadata)
|
||||||
|
|
||||||
|
local trashed_human
|
||||||
|
trashed_human=$(numfmt --to=iec-i --suffix=B "$bytes_trashed" 2>/dev/null || echo "${bytes_trashed}B")
|
||||||
|
|
||||||
|
log "Cleanup complete: trashed=$trashed kept=$kept orphan_metadata=$orphan_metadata staged≈$trashed_human"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# List (default) or, with --remove-from-disk, delete the docker volumes that are NOT
|
||||||
|
# referenced by the current COMPOSE_FILE. Removal also frees the static-file data that was
|
||||||
|
# offloaded to /slowdisk behind the volume's symlinks (delete_slowdisk_targets_for_key),
|
||||||
|
# so nothing leaks on /slowdisk.
|
||||||
BASEPATH="$(dirname "$0")"
|
BASEPATH="$(dirname "$0")"
|
||||||
source $BASEPATH/.env
|
source $BASEPATH/.env
|
||||||
|
source $BASEPATH/volume-utils.sh
|
||||||
|
|
||||||
IFS=':' read -ra parts <<< $COMPOSE_FILE
|
IFS=':' read -ra parts <<< $COMPOSE_FILE
|
||||||
|
|
||||||
used_volumes=()
|
used_volumes=()
|
||||||
|
|
||||||
for part in "${parts[@]}"; do
|
for part in "${parts[@]}"; do
|
||||||
|
volumes=$(get_volume_keys "$BASEPATH/$part")
|
||||||
|
|
||||||
# Convert YAML to JSON using yaml2json
|
# Prefix each compose volume key with rpc_ to match docker's volume names.
|
||||||
json=$(yaml2json "$BASEPATH/$part")
|
|
||||||
|
|
||||||
# Extract volumes using jq
|
|
||||||
volumes=$(echo "$json" | jq -r '.volumes | keys[]' 2> /dev/null)
|
|
||||||
|
|
||||||
# Convert volumes to an array
|
|
||||||
prefix="rpc_"
|
prefix="rpc_"
|
||||||
IFS=$'\n' read -r -d '' -a volumes_array <<< "$(printf "%s\n" "${volumes[@]}" | sed "/^$/! s/^/$prefix/")"
|
IFS=$'\n' read -r -d '' -a volumes_array <<< "$(printf "%s\n" "${volumes[@]}" | sed "/^$/! s/^/$prefix/")"
|
||||||
|
|
||||||
@@ -22,21 +23,29 @@ done
|
|||||||
|
|
||||||
on_disk=($(docker volume ls --format '{{.Name}}' | grep '^rpc_'))
|
on_disk=($(docker volume ls --format '{{.Name}}' | grep '^rpc_'))
|
||||||
|
|
||||||
unused_volumes=()
|
# A volume counts as "used" only on an EXACT name match. The previous substring test
|
||||||
|
# ([[ "${used_volumes[@]}" =~ "$element" ]]) could mis-classify a volume whose name is a
|
||||||
|
# substring of another (e.g. ...-pruned vs ...-pruned-trace) and wrongly purge a live one.
|
||||||
|
is_used() {
|
||||||
|
local v=$1 u
|
||||||
|
for u in "${used_volumes[@]}"; do
|
||||||
|
[[ "$u" == "$v" ]] && return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
unused_volumes=()
|
||||||
for element in "${on_disk[@]}"; do
|
for element in "${on_disk[@]}"; do
|
||||||
# Check if the element exists in array2
|
is_used "$element" || unused_volumes+=("$element")
|
||||||
if [[ ! "${used_volumes[@]}" =~ "$element" ]]; then
|
|
||||||
# If not, add it to the difference array
|
|
||||||
unused_volumes+=("$element")
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$1" = "--remove-from-disk" ]; then
|
if [ "$1" = "--remove-from-disk" ]; then
|
||||||
# Iterate over volumes in the difference array and remove them from disk
|
# Remove each unused volume AND the /slowdisk static data behind its symlinks.
|
||||||
for volume in "${unused_volumes[@]}"; do
|
for volume in "${unused_volumes[@]}"; do
|
||||||
docker volume rm "$volume"
|
echo "removing unused volume: $volume"
|
||||||
done
|
delete_slowdisk_targets_for_key "${volume#rpc_}"
|
||||||
|
docker volume rm "$volume"
|
||||||
|
done
|
||||||
else
|
else
|
||||||
printf '%s\n' "${unused_volumes[@]}"
|
printf '%s\n' "${unused_volumes[@]}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,6 +2,23 @@
|
|||||||
|
|
||||||
# Script to clone node volumes from backup location to a remote server
|
# Script to clone node volumes from backup location to a remote server
|
||||||
# Uses the same transfer method as clone-node.sh but streams zstd archives directly from backup location
|
# Uses the same transfer method as clone-node.sh but streams zstd archives directly from backup location
|
||||||
|
#
|
||||||
|
# Usage: ./clone-backup.sh <config> <dest_host> [--no-slowdisk]
|
||||||
|
# --no-slowdisk : do NOT offload static files to /slowdisk (no symlinks);
|
||||||
|
# extract everything onto the local disk instead. Required to
|
||||||
|
# proceed when /slowdisk is too small for the static files.
|
||||||
|
|
||||||
|
# Pull the --no-slowdisk flag out of the args so the positional <config>/<dest>
|
||||||
|
# parsing below is unaffected regardless of where the flag is placed.
|
||||||
|
NO_SLOWDISK=false
|
||||||
|
_args=()
|
||||||
|
for _a in "$@"; do
|
||||||
|
case "$_a" in
|
||||||
|
--no-slowdisk) NO_SLOWDISK=true ;;
|
||||||
|
*) _args+=("$_a") ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
set -- "${_args[@]}"
|
||||||
|
|
||||||
if [[ -n $2 ]]; then
|
if [[ -n $2 ]]; then
|
||||||
DEST_HOST="$2.stakesquid.eu"
|
DEST_HOST="$2.stakesquid.eu"
|
||||||
@@ -12,6 +29,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dir="$(dirname "$0")"
|
dir="$(dirname "$0")"
|
||||||
|
source "$dir/volume-utils.sh"
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
BASE_PORT=9000
|
BASE_PORT=9000
|
||||||
@@ -107,7 +125,7 @@ release_port() {
|
|||||||
|
|
||||||
# Check if SLOWDISK mode is enabled on target
|
# Check if SLOWDISK mode is enabled on target
|
||||||
check_slowdisk_enabled() {
|
check_slowdisk_enabled() {
|
||||||
$SSH_CMD "$DEST_HOST" "grep -q '^SLOWDISK=true' /root/rpc/.env 2>/dev/null"
|
$SSH_CMD "$DEST_HOST" "grep -qi '^SLOWDISK=true' /root/rpc/.env 2>/dev/null"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,6 +176,40 @@ parse_metadata() {
|
|||||||
printf '%s\n' "${static_paths[@]}"
|
printf '%s\n' "${static_paths[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Decide whether to offload this volume's static files to /slowdisk.
|
||||||
|
# return 0 -> use /slowdisk (caller should create symlinks + extract)
|
||||||
|
# return 1 -> skip /slowdisk (extract static files onto local disk)
|
||||||
|
# Aborts the whole script if /slowdisk is too small and --no-slowdisk was not
|
||||||
|
# given, to avoid overfilling /slowdisk with a partially-extracted snapshot.
|
||||||
|
decide_slowdisk() {
|
||||||
|
local key=$1
|
||||||
|
local static_size_kb=$2
|
||||||
|
|
||||||
|
# Explicit override: never offload, never create symlinks.
|
||||||
|
if [[ "$NO_SLOWDISK" == "true" ]]; then
|
||||||
|
echo " --no-slowdisk: skipping /slowdisk offload for '$key' (static files -> local disk)"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# How much room is actually on /slowdisk right now?
|
||||||
|
local slowdisk_available
|
||||||
|
slowdisk_available=$($SSH_CMD "$DEST_HOST" "df -BK /slowdisk 2>/dev/null | tail -1 | awk '{print \$4}' | sed 's/K//'")
|
||||||
|
|
||||||
|
if [[ -z "$slowdisk_available" ]] || [[ "$slowdisk_available" -lt "$static_size_kb" ]]; then
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "WARNING: /slowdisk on $DEST_HOST is too small for the static files of '$key'."
|
||||||
|
echo " available: $(( ${slowdisk_available:-0} / 1024 ))MB, needed: $(( static_size_kb / 1024 ))MB"
|
||||||
|
echo " Aborting to avoid overfilling /slowdisk with a partial snapshot."
|
||||||
|
echo " Re-run with --no-slowdisk to extract static files onto the local disk"
|
||||||
|
echo " instead (no /slowdisk offload, no symlinks created)."
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Setup slowdisk directory structure with symlinks
|
# Setup slowdisk directory structure with symlinks
|
||||||
setup_slowdisk_structure() {
|
setup_slowdisk_structure() {
|
||||||
local key=$1
|
local key=$1
|
||||||
@@ -254,7 +306,7 @@ transfer_backup() {
|
|||||||
local backup_basename=$(basename "$backup_file" .tar.zst)
|
local backup_basename=$(basename "$backup_file" .tar.zst)
|
||||||
local metadata_file="$backup_dir/${backup_basename}.txt"
|
local metadata_file="$backup_dir/${backup_basename}.txt"
|
||||||
local use_slowdisk=false
|
local use_slowdisk=false
|
||||||
local tar_extract_opts="-xf - -C /"
|
local tar_extract_opts="-xf - -C / --keep-directory-symlink"
|
||||||
|
|
||||||
if [[ -f "$metadata_file" ]] && check_slowdisk_enabled; then
|
if [[ -f "$metadata_file" ]] && check_slowdisk_enabled; then
|
||||||
echo "Metadata file found and SLOWDISK mode enabled"
|
echo "Metadata file found and SLOWDISK mode enabled"
|
||||||
@@ -266,16 +318,22 @@ transfer_backup() {
|
|||||||
local static_paths=($(echo "$metadata_output" | tail -n +2))
|
local static_paths=($(echo "$metadata_output" | tail -n +2))
|
||||||
|
|
||||||
if [[ ${#static_paths[@]} -gt 0 ]] && [[ -n "$static_size_kb" ]]; then
|
if [[ ${#static_paths[@]} -gt 0 ]] && [[ -n "$static_size_kb" ]]; then
|
||||||
# Setup slowdisk structure on remote
|
# Check /slowdisk capacity (aborts if too small without --no-slowdisk).
|
||||||
if setup_slowdisk_structure "$key" "$static_size_kb" "${static_paths[@]}"; then
|
if decide_slowdisk "$key" "$static_size_kb"; then
|
||||||
use_slowdisk=true
|
# Setup slowdisk structure on remote
|
||||||
# Use --skip-old-files to avoid overwriting existing symlinks/directories
|
if setup_slowdisk_structure "$key" "$static_size_kb" "${static_paths[@]}"; then
|
||||||
# But we still want to extract files into symlinked directories
|
use_slowdisk=true
|
||||||
tar_extract_opts="-xf - -C / --skip-old-files"
|
# Use --skip-old-files to avoid overwriting existing symlinks/directories
|
||||||
echo "SLOWDISK structure ready, will extract respecting symlinks"
|
# and --keep-directory-symlink so tar extracts THROUGH the pre-created dir symlinks
|
||||||
else
|
# instead of trying to mkdir over them (which fails with 'Cannot mkdir: File exists')
|
||||||
echo "Warning: Failed to setup SLOWDISK structure, falling back to normal extraction"
|
tar_extract_opts="-xf - -C / --skip-old-files --keep-directory-symlink"
|
||||||
|
echo "SLOWDISK structure ready, will extract respecting symlinks"
|
||||||
|
else
|
||||||
|
echo "Warning: Failed to setup SLOWDISK structure, falling back to normal extraction"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
# decide_slowdisk returned 1 (--no-slowdisk): leave tar_extract_opts at
|
||||||
|
# the default so static files are extracted onto the local disk.
|
||||||
else
|
else
|
||||||
echo "Warning: Could not parse metadata file, falling back to normal extraction"
|
echo "Warning: Could not parse metadata file, falling back to normal extraction"
|
||||||
fi
|
fi
|
||||||
@@ -437,7 +495,7 @@ transfer_backup_ssh() {
|
|||||||
# Check for metadata file and SLOWDISK mode (same logic as transfer_backup)
|
# Check for metadata file and SLOWDISK mode (same logic as transfer_backup)
|
||||||
local backup_basename=$(basename "$backup_file" .tar.zst)
|
local backup_basename=$(basename "$backup_file" .tar.zst)
|
||||||
local metadata_file="$backup_dir/${backup_basename}.txt"
|
local metadata_file="$backup_dir/${backup_basename}.txt"
|
||||||
local tar_extract_opts="-xf - -C /"
|
local tar_extract_opts="-xf - -C / --keep-directory-symlink"
|
||||||
|
|
||||||
if [[ -f "$metadata_file" ]] && check_slowdisk_enabled; then
|
if [[ -f "$metadata_file" ]] && check_slowdisk_enabled; then
|
||||||
echo "Metadata file found and SLOWDISK mode enabled"
|
echo "Metadata file found and SLOWDISK mode enabled"
|
||||||
@@ -451,7 +509,9 @@ transfer_backup_ssh() {
|
|||||||
if [[ ${#static_paths[@]} -gt 0 ]] && [[ -n "$static_size_kb" ]]; then
|
if [[ ${#static_paths[@]} -gt 0 ]] && [[ -n "$static_size_kb" ]]; then
|
||||||
# Setup slowdisk structure on remote
|
# Setup slowdisk structure on remote
|
||||||
if setup_slowdisk_structure "$key" "$static_size_kb" "${static_paths[@]}"; then
|
if setup_slowdisk_structure "$key" "$static_size_kb" "${static_paths[@]}"; then
|
||||||
tar_extract_opts="-xf - -C / --skip-old-files"
|
# and --keep-directory-symlink so tar extracts THROUGH the pre-created dir symlinks
|
||||||
|
# instead of trying to mkdir over them (which fails with 'Cannot mkdir: File exists')
|
||||||
|
tar_extract_opts="-xf - -C / --skip-old-files --keep-directory-symlink"
|
||||||
echo "SLOWDISK structure ready, will extract respecting symlinks"
|
echo "SLOWDISK structure ready, will extract respecting symlinks"
|
||||||
else
|
else
|
||||||
echo "Warning: Failed to setup SLOWDISK structure, falling back to normal extraction"
|
echo "Warning: Failed to setup SLOWDISK structure, falling back to normal extraction"
|
||||||
@@ -481,6 +541,15 @@ main() {
|
|||||||
# Set up cleanup trap
|
# Set up cleanup trap
|
||||||
trap cleanup_all_ports EXIT INT TERM
|
trap cleanup_all_ports EXIT INT TERM
|
||||||
|
|
||||||
|
# RETH GUARD: reth refuses to start when its static_files directory is a symlink.
|
||||||
|
# Match restore-volumes.sh: skip the whole /slowdisk static-file symlink offload
|
||||||
|
# for reth nodes and extract everything onto the primary disk.
|
||||||
|
if [[ "$1" == *reth* ]]; then
|
||||||
|
echo "WARNING: $1 contains 'reth' — static-file symlink offload disabled (reth broke whole-dir symlinks)"
|
||||||
|
echo " All volumes will be extracted onto the primary disk (equivalent to --no-slowdisk)"
|
||||||
|
NO_SLOWDISK=true
|
||||||
|
fi
|
||||||
|
|
||||||
setup_ssh_multiplex
|
setup_ssh_multiplex
|
||||||
|
|
||||||
# Check if backup directory exists
|
# Check if backup directory exists
|
||||||
@@ -524,7 +593,7 @@ main() {
|
|||||||
sudo sysctl -w net.ipv4.tcp_no_metrics_save=1
|
sudo sysctl -w net.ipv4.tcp_no_metrics_save=1
|
||||||
|
|
||||||
echo "Reading volume configuration from $dir/$1.yml..."
|
echo "Reading volume configuration from $dir/$1.yml..."
|
||||||
keys=$(cat "$dir/$1.yml" | yaml2json - | jq '.volumes' | jq -r 'keys[]')
|
keys=$(get_persistent_volume_keys "$dir/$1.yml")
|
||||||
|
|
||||||
if [[ -z "$keys" ]]; then
|
if [[ -z "$keys" ]]; then
|
||||||
echo "Error: No volumes found in configuration"
|
echo "Error: No volumes found in configuration"
|
||||||
|
|||||||
111
clone-node.sh
111
clone-node.sh
@@ -3,6 +3,22 @@
|
|||||||
# Fixed version that handles missing netstat
|
# Fixed version that handles missing netstat
|
||||||
|
|
||||||
BASEPATH="$(dirname "$0")"
|
BASEPATH="$(dirname "$0")"
|
||||||
|
source "$BASEPATH/volume-utils.sh"
|
||||||
|
|
||||||
|
# Usage: ./clone-node.sh <node_path> <dest_host> [--no-slowdisk]
|
||||||
|
# --no-slowdisk : do NOT offload static files to /slowdisk on the target (no
|
||||||
|
# symlinks); extract everything to the local disk. Required to
|
||||||
|
# proceed when the target's /slowdisk is too small. Strip it
|
||||||
|
# out before the positional <node>/<dest> parsing below.
|
||||||
|
NO_SLOWDISK=false
|
||||||
|
_args=()
|
||||||
|
for _a in "$@"; do
|
||||||
|
case "$_a" in
|
||||||
|
--no-slowdisk) NO_SLOWDISK=true ;;
|
||||||
|
*) _args+=("$_a") ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
set -- "${_args[@]}"
|
||||||
|
|
||||||
if [[ -n $2 ]]; then
|
if [[ -n $2 ]]; then
|
||||||
DEST_HOST="$2.stakesquid.eu"
|
DEST_HOST="$2.stakesquid.eu"
|
||||||
@@ -103,7 +119,7 @@ release_port() {
|
|||||||
|
|
||||||
# Check if SLOWDISK mode is enabled on target
|
# Check if SLOWDISK mode is enabled on target
|
||||||
check_slowdisk_enabled() {
|
check_slowdisk_enabled() {
|
||||||
$SSH_CMD "$DEST_HOST" "grep -q '^SLOWDISK=true' /root/rpc/.env 2>/dev/null"
|
$SSH_CMD "$DEST_HOST" "grep -qi '^SLOWDISK=true' /root/rpc/.env 2>/dev/null"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,6 +156,36 @@ detect_static_files() {
|
|||||||
printf '%s\n' "${static_paths[@]}"
|
printf '%s\n' "${static_paths[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Decide whether to offload this volume's static files to the target's /slowdisk.
|
||||||
|
# return 0 -> use /slowdisk (caller sets up symlinks + extracts through them)
|
||||||
|
# return 1 -> skip /slowdisk (extract static files onto local disk)
|
||||||
|
# Aborts the whole clone if /slowdisk is too small and --no-slowdisk was not
|
||||||
|
# given, to avoid overfilling /slowdisk with a partially-extracted volume.
|
||||||
|
decide_slowdisk() {
|
||||||
|
local key=$1
|
||||||
|
local static_size_kb=$2
|
||||||
|
|
||||||
|
if [[ "$NO_SLOWDISK" == "true" ]]; then
|
||||||
|
echo " --no-slowdisk: skipping /slowdisk offload for '$key' (static files -> local disk)"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local slowdisk_available
|
||||||
|
slowdisk_available=$($SSH_CMD "$DEST_HOST" "df -BK /slowdisk 2>/dev/null | tail -1 | awk '{print \$4}' | sed 's/K//'")
|
||||||
|
if [[ -z "$slowdisk_available" ]] || [[ "$slowdisk_available" -lt "$static_size_kb" ]]; then
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "WARNING: /slowdisk on $DEST_HOST is too small for the static files of '$key'."
|
||||||
|
echo " available: $(( ${slowdisk_available:-0} / 1024 ))MB, needed: $(( static_size_kb / 1024 ))MB"
|
||||||
|
echo " Aborting to avoid overfilling /slowdisk with a partial volume."
|
||||||
|
echo " Re-run with --no-slowdisk to clone without /slowdisk offload (static files on local disk)."
|
||||||
|
} >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# Setup slowdisk directory structure with symlinks
|
# Setup slowdisk directory structure with symlinks
|
||||||
setup_slowdisk_structure() {
|
setup_slowdisk_structure() {
|
||||||
local key=$1
|
local key=$1
|
||||||
@@ -230,7 +276,7 @@ transfer_volume() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local folder_size=$(du -sb "$source_folder" 2>/dev/null | awk '{print $1}')
|
local folder_size=$(du -sb "$source_folder" 2>/dev/null | awk '{print $1}')
|
||||||
local tar_extract_opts="-xf - -C /"
|
local tar_extract_opts="-xf - -C / --keep-directory-symlink"
|
||||||
local use_slowdisk=false
|
local use_slowdisk=false
|
||||||
|
|
||||||
# Check for SLOWDISK mode and detect static files
|
# Check for SLOWDISK mode and detect static files
|
||||||
@@ -244,17 +290,23 @@ transfer_volume() {
|
|||||||
|
|
||||||
if [[ ${#static_paths[@]} -gt 0 ]] && [[ -n "$static_size_kb" ]]; then
|
if [[ ${#static_paths[@]} -gt 0 ]] && [[ -n "$static_size_kb" ]]; then
|
||||||
echo "Found ${#static_paths[@]} static paths (total: $((static_size_kb / 1024))MB)"
|
echo "Found ${#static_paths[@]} static paths (total: $((static_size_kb / 1024))MB)"
|
||||||
echo "Setting up SLOWDISK structure on target..."
|
# Check /slowdisk capacity (aborts if too small without --no-slowdisk).
|
||||||
|
if decide_slowdisk "$key" "$static_size_kb"; then
|
||||||
# Setup slowdisk structure on remote
|
echo "Setting up SLOWDISK structure on target..."
|
||||||
if setup_slowdisk_structure "$key" "$static_size_kb" "${static_paths[@]}"; then
|
# Setup slowdisk structure on remote
|
||||||
use_slowdisk=true
|
if setup_slowdisk_structure "$key" "$static_size_kb" "${static_paths[@]}"; then
|
||||||
# Use --skip-old-files to avoid overwriting existing symlinks/directories
|
use_slowdisk=true
|
||||||
tar_extract_opts="-xf - -C / --skip-old-files"
|
# Use --skip-old-files to avoid overwriting existing symlinks/directories
|
||||||
echo "SLOWDISK structure ready, will extract respecting symlinks"
|
# and --keep-directory-symlink so tar extracts THROUGH the pre-created dir symlinks
|
||||||
else
|
# instead of trying to mkdir over them (which fails with 'Cannot mkdir: File exists')
|
||||||
echo "Warning: Failed to setup SLOWDISK structure, falling back to normal extraction"
|
tar_extract_opts="-xf - -C / --skip-old-files --keep-directory-symlink"
|
||||||
|
echo "SLOWDISK structure ready, will extract respecting symlinks"
|
||||||
|
else
|
||||||
|
echo "Warning: Failed to setup SLOWDISK structure, falling back to normal extraction"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
# decide_slowdisk returned 1 (--no-slowdisk): leave tar_extract_opts
|
||||||
|
# at the default so static files extract onto the local disk.
|
||||||
else
|
else
|
||||||
echo "No static files detected, using normal extraction"
|
echo "No static files detected, using normal extraction"
|
||||||
fi
|
fi
|
||||||
@@ -407,7 +459,7 @@ transfer_volume_ssh() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local folder_size=$(du -sb "$source_folder" 2>/dev/null | awk '{print $1}')
|
local folder_size=$(du -sb "$source_folder" 2>/dev/null | awk '{print $1}')
|
||||||
local tar_extract_opts="-xf - -C /"
|
local tar_extract_opts="-xf - -C / --keep-directory-symlink"
|
||||||
|
|
||||||
# Check for SLOWDISK mode and detect static files (same logic as transfer_volume)
|
# Check for SLOWDISK mode and detect static files (same logic as transfer_volume)
|
||||||
if check_slowdisk_enabled; then
|
if check_slowdisk_enabled; then
|
||||||
@@ -420,15 +472,21 @@ transfer_volume_ssh() {
|
|||||||
|
|
||||||
if [[ ${#static_paths[@]} -gt 0 ]] && [[ -n "$static_size_kb" ]]; then
|
if [[ ${#static_paths[@]} -gt 0 ]] && [[ -n "$static_size_kb" ]]; then
|
||||||
echo "Found ${#static_paths[@]} static paths (total: $((static_size_kb / 1024))MB)"
|
echo "Found ${#static_paths[@]} static paths (total: $((static_size_kb / 1024))MB)"
|
||||||
echo "Setting up SLOWDISK structure on target..."
|
# Check /slowdisk capacity (aborts if too small without --no-slowdisk).
|
||||||
|
if decide_slowdisk "$key" "$static_size_kb"; then
|
||||||
# Setup slowdisk structure on remote
|
echo "Setting up SLOWDISK structure on target..."
|
||||||
if setup_slowdisk_structure "$key" "$static_size_kb" "${static_paths[@]}"; then
|
# Setup slowdisk structure on remote
|
||||||
tar_extract_opts="-xf - -C / --skip-old-files"
|
if setup_slowdisk_structure "$key" "$static_size_kb" "${static_paths[@]}"; then
|
||||||
echo "SLOWDISK structure ready, will extract respecting symlinks"
|
# and --keep-directory-symlink so tar extracts THROUGH the pre-created dir symlinks
|
||||||
else
|
# instead of trying to mkdir over them (which fails with 'Cannot mkdir: File exists')
|
||||||
echo "Warning: Failed to setup SLOWDISK structure, falling back to normal extraction"
|
tar_extract_opts="-xf - -C / --skip-old-files --keep-directory-symlink"
|
||||||
|
echo "SLOWDISK structure ready, will extract respecting symlinks"
|
||||||
|
else
|
||||||
|
echo "Warning: Failed to setup SLOWDISK structure, falling back to normal extraction"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
# decide_slowdisk returned 1 (--no-slowdisk): leave tar_extract_opts
|
||||||
|
# at the default so static files extract onto the local disk.
|
||||||
else
|
else
|
||||||
echo "No static files detected, using normal extraction"
|
echo "No static files detected, using normal extraction"
|
||||||
fi
|
fi
|
||||||
@@ -459,6 +517,15 @@ main() {
|
|||||||
# Set up cleanup trap
|
# Set up cleanup trap
|
||||||
trap cleanup_all_ports EXIT INT TERM
|
trap cleanup_all_ports EXIT INT TERM
|
||||||
|
|
||||||
|
# RETH GUARD: reth refuses to start when its static_files directory is a symlink.
|
||||||
|
# Match restore-volumes.sh: skip the whole /slowdisk static-file symlink offload
|
||||||
|
# for reth nodes and extract everything onto the primary disk.
|
||||||
|
if [[ "$1" == *reth* ]]; then
|
||||||
|
echo "WARNING: $1 contains 'reth' — static-file symlink offload disabled (reth broke whole-dir symlinks)"
|
||||||
|
echo " All volumes will be extracted onto the primary disk (equivalent to --no-slowdisk)"
|
||||||
|
NO_SLOWDISK=true
|
||||||
|
fi
|
||||||
|
|
||||||
setup_ssh_multiplex
|
setup_ssh_multiplex
|
||||||
|
|
||||||
# the following sysctls are critical for high-latency networks
|
# the following sysctls are critical for high-latency networks
|
||||||
@@ -496,7 +563,7 @@ main() {
|
|||||||
sudo sysctl -w net.ipv4.tcp_no_metrics_save=1
|
sudo sysctl -w net.ipv4.tcp_no_metrics_save=1
|
||||||
|
|
||||||
echo "Reading volume configuration from $1.yml..."
|
echo "Reading volume configuration from $1.yml..."
|
||||||
keys=$(cat /root/rpc/$1.yml | yaml2json - | jq '.volumes' | jq -r 'keys[]')
|
keys=$(get_persistent_volume_keys "/root/rpc/$1.yml")
|
||||||
|
|
||||||
if [[ -z "$keys" ]]; then
|
if [[ -z "$keys" ]]; then
|
||||||
echo "Error: No volumes found in configuration"
|
echo "Error: No volumes found in configuration"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user