op: add kona consensus-client variants for 13 OP-stack chains

Generate --kona compose profiles for base, mode, zircuit, fraxtal, zora,
metal, hashkeychain, superseed, swell, bnb, manta-pacific, blast, and xlayer
so production nodes can migrate off stock op-node before DRPC deprioritizes it.
Each kona variant shares the same EL data volume as its op-node sibling.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-05 02:04:05 +00:00
parent 018451b9b0
commit 66ecc3d8bc
81 changed files with 17581 additions and 88 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,203 @@
---
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:op/erigon/base-mainnet-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-mainnet-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-mainnet-op-erigon:
image: ${BASE_ERIGON_IMAGE:-testinprod/op-erigon}:${BASE_MAINNET_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 13092:13092
- 13092:13092/udp
- 33092:33092
- 33092:33092/udp
- 38092:38092
- 38092:38092/udp
expose:
- 8545
- 6060
- 8551
entrypoint: [erigon]
command:
- --chain=base-mainnet
- --datadir=/root/.local/share/erigon
- --db.size.limit=8TB
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --p2p.allowed-ports=33092
- --p2p.allowed-ports=38092
- --port=13092
- --rollup.sequencerhttp=https://mainnet-sequencer.base.org
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_MAINNET_OP_ERIGON_ARCHIVE_TRACE_DATA:-base-mainnet-op-erigon-archive-trace}:/root/.local/share/erigon
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/base-mainnet-op-erigon
- traefik.http.services.base-mainnet-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet-op-erigon`) || Path(`/base-mainnet-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-erigon-archive-trace.rule=Path(`/base-mainnet-op-erigon`) || Path(`/base-mainnet-op-erigon/`)}
- traefik.http.routers.base-mainnet-op-erigon-archive-trace.middlewares=base-mainnet-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
base-mainnet-op-erigon-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18092:18092
- 18092:18092/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=8453
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-mainnet-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18092
- KONA_NODE_P2P_LISTEN_UDP_PORT=18092
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-mainnet-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/base-mainnet-op-erigon/node
- traefik.http.services.base-mainnet-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-mainnet-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-erigon-archive-trace-node.rule=PathPrefix(`/base-mainnet-op-erigon/node`)}
- traefik.http.routers.base-mainnet-op-erigon-archive-trace-node.middlewares=base-mainnet-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
base-mainnet-op-erigon-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,203 @@
---
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:op/erigon/base-sepolia-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-sepolia-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-sepolia-op-erigon:
image: ${BASE_ERIGON_IMAGE:-testinprod/op-erigon}:${BASE_SEPOLIA_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 13487:13487
- 13487:13487/udp
- 33487:33487
- 33487:33487/udp
- 38487:38487
- 38487:38487/udp
expose:
- 8545
- 6060
- 8551
entrypoint: [erigon]
command:
- --chain=base-sepolia
- --datadir=/root/.local/share/erigon
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --p2p.allowed-ports=33487
- --p2p.allowed-ports=38487
- --port=13487
- --rollup.sequencerhttp=https://sepolia-sequencer.base.org
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_SEPOLIA_OP_ERIGON_ARCHIVE_TRACE_DATA:-base-sepolia-op-erigon-archive-trace}:/root/.local/share/erigon
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/base-sepolia-op-erigon
- traefik.http.services.base-sepolia-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/base-sepolia-op-erigon`) || Path(`/base-sepolia-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-erigon-archive-trace.rule=Path(`/base-sepolia-op-erigon`) || Path(`/base-sepolia-op-erigon/`)}
- traefik.http.routers.base-sepolia-op-erigon-archive-trace.middlewares=base-sepolia-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
base-sepolia-op-erigon-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 18487:18487
- 18487:18487/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=84532
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-sepolia-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18487
- KONA_NODE_P2P_LISTEN_UDP_PORT=18487
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-sepolia-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/base-sepolia-op-erigon/node
- traefik.http.services.base-sepolia-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-sepolia-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-erigon-archive-trace-node.rule=PathPrefix(`/base-sepolia-op-erigon/node`)}
- traefik.http.routers.base-sepolia-op-erigon-archive-trace-node.middlewares=base-sepolia-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
base-sepolia-op-erigon-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base-sepolia
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,228 @@
---
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:op/erigon/hashkeychain-mainnet-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/hashkeychain-mainnet-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
hashkeychain-mainnet-op-erigon-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || curl -fsSL -o /config/genesis.json "https://hashkeychain.s3.ap-southeast-1.amazonaws.com/mainnet/genesis.json"
restart: no
networks:
- chains
volumes:
- ${HASHKEYCHAIN_MAINNET_OP_ERIGON_ARCHIVE_TRACE_CONFIG:-hashkeychain-mainnet-op-erigon-archive-trace_config}:/config
logging: *logging-defaults
hashkeychain-mainnet-op-erigon:
image: ${HASHKEYCHAIN_ERIGON_IMAGE:-testinprod/op-erigon}:${HASHKEYCHAIN_MAINNET_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 11378:11378
- 11378:11378/udp
- 31378:31378
- 31378:31378/udp
- 36378:36378
- 36378:36378/udp
expose:
- 8545
- 6060
- 8551
entrypoint: /bin/sh -c '[ ! -d /root/.local/share/erigon/chaindata/mdbx.dat ] && erigon init --datadir /root/.local/share/erigon /config/genesis.json; exec erigon "$@"' --
command:
- --bootnodes=enode://5ecd6d2054a58fa00729b73396044a35e6aceeafe58373d2f26b3f50a3934175fb56f8efa538381430889771613beaabf1177805910bbd34e4b4840320914690@mainnet-bootnodes.hsk.xyz:30615,enode://bd244da2a066e15f82d4bfb7f2732c5b5bac44cefb36cefef01a4c0e87e72b42004d012c9a294b8402ebf67491777f280ffbcc93a71157921d6d358b19ddac67@mainnet-bootnodes.hsk.xyz:30616,enode://a5bba6459ac3a075a4a8941478a4ef8d167460191c89632004b17e4b2d7beea52cdc1a2d376f35e996ad44ccac8db25f900700aad6991d015bdc4db072832063@mainnet-bootnodes.hsk.xyz:30617
- --bootnodes=enode://5ecd6d2054a58fa00729b73396044a35e6aceeafe58373d2f26b3f50a3934175fb56f8efa538381430889771613beaabf1177805910bbd34e4b4840320914690@mainnet-bootnodes.hsk.xyz:30615,enode://bd244da2a066e15f82d4bfb7f2732c5b5bac44cefb36cefef01a4c0e87e72b42004d012c9a294b8402ebf67491777f280ffbcc93a71157921d6d358b19ddac67@mainnet-bootnodes.hsk.xyz:30616,enode://a5bba6459ac3a075a4a8941478a4ef8d167460191c89632004b17e4b2d7beea52cdc1a2d376f35e996ad44ccac8db25f900700aad6991d015bdc4db072832063@mainnet-bootnodes.hsk.xyz:30617
- --datadir=/root/.local/share/erigon
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=177
- --p2p.allowed-ports=31378
- --p2p.allowed-ports=36378
- --port=11378
- --rollup.sequencerhttp=https://mainnet.hsk.xyz
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
hashkeychain-mainnet-op-erigon-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${HASHKEYCHAIN_MAINNET_OP_ERIGON_ARCHIVE_TRACE_CONFIG:-hashkeychain-mainnet-op-erigon-archive-trace_config}:/config
- ${HASHKEYCHAIN_MAINNET_OP_ERIGON_ARCHIVE_TRACE_DATA:-hashkeychain-mainnet-op-erigon-archive-trace}:/root/.local/share/erigon
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-mainnet-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/hashkeychain-mainnet-op-erigon
- traefik.http.services.hashkeychain-mainnet-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/hashkeychain-mainnet-op-erigon`) || Path(`/hashkeychain-mainnet-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace.rule=Path(`/hashkeychain-mainnet-op-erigon`) || Path(`/hashkeychain-mainnet-op-erigon/`)}
- traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace.middlewares=hashkeychain-mainnet-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
hashkeychain-mainnet-op-erigon-node:
image: ${HASHKEYCHAIN_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${HASHKEYCHAIN_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16378:16378
- 16378:16378/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${HASHKEYCHAIN_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=177
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://hashkeychain-mainnet-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16378
- KONA_NODE_P2P_LISTEN_UDP_PORT=16378
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
hashkeychain-mainnet-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-mainnet-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/hashkeychain-mainnet-op-erigon/node
- traefik.http.services.hashkeychain-mainnet-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/hashkeychain-mainnet-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace-node.rule=PathPrefix(`/hashkeychain-mainnet-op-erigon/node`)}
- traefik.http.routers.hashkeychain-mainnet-op-erigon-archive-trace-node.middlewares=hashkeychain-mainnet-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
hashkeychain-mainnet-op-erigon-archive-trace:
hashkeychain-mainnet-op-erigon-archive-trace_config:
x-ephemeral-volumes:
- hashkeychain-mainnet-op-erigon-archive-trace_config
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: hashkey
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,202 @@
---
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:op/erigon/metal-mainnet-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/metal-mainnet-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
metal-mainnet-op-erigon:
image: ${METAL_ERIGON_IMAGE:-testinprod/op-erigon}:${METAL_MAINNET_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 10543:10543
- 10543:10543/udp
- 30543:30543
- 30543:30543/udp
- 35543:35543
- 35543:35543/udp
expose:
- 8545
- 6060
- 8551
entrypoint: [erigon]
command:
- --chain=metal-mainnet
- --datadir=/root/.local/share/erigon
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --p2p.allowed-ports=30543
- --p2p.allowed-ports=35543
- --port=10543
- --rollup.sequencerhttp=https://rpc.metall2.com
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${METAL_MAINNET_OP_ERIGON_ARCHIVE_TRACE_DATA:-metal-mainnet-op-erigon-archive-trace}:/root/.local/share/erigon
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.metal-mainnet-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/metal-mainnet-op-erigon
- traefik.http.services.metal-mainnet-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/metal-mainnet-op-erigon`) || Path(`/metal-mainnet-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.metal-mainnet-op-erigon-archive-trace.rule=Path(`/metal-mainnet-op-erigon`) || Path(`/metal-mainnet-op-erigon/`)}
- traefik.http.routers.metal-mainnet-op-erigon-archive-trace.middlewares=metal-mainnet-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
metal-mainnet-op-erigon-node:
image: ${METAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${METAL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 15543:15543
- 15543:15543/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${METAL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1750
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://metal-mainnet-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15543
- KONA_NODE_P2P_LISTEN_UDP_PORT=15543
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
metal-mainnet-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.metal-mainnet-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/metal-mainnet-op-erigon/node
- traefik.http.services.metal-mainnet-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/metal-mainnet-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.metal-mainnet-op-erigon-archive-trace-node.rule=PathPrefix(`/metal-mainnet-op-erigon/node`)}
- traefik.http.routers.metal-mainnet-op-erigon-archive-trace-node.middlewares=metal-mainnet-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
metal-mainnet-op-erigon-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: metall2
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,204 @@
---
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:op/erigon/mode-mainnet-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/mode-mainnet-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
mode-mainnet-op-erigon:
image: ${MODE_ERIGON_IMAGE:-testinprod/op-erigon}:${MODE_MAINNET_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 12509:12509
- 12509:12509/udp
- 32509:32509
- 32509:32509/udp
- 37509:37509
- 37509:37509/udp
expose:
- 8545
- 6060
- 8551
entrypoint: /bin/sh -c '[ ! -d /root/.local/share/erigon/chaindata/mdbx.dat ] && erigon init --datadir /root/.local/share/erigon /config/genesis.json; exec erigon "$@"' --
command:
- --datadir=/root/.local/share/erigon
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=34443
- --p2p.allowed-ports=32509
- --p2p.allowed-ports=37509
- --port=12509
- --rollup.sequencerhttp=https://mainnet.mode.network
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MODE_MAINNET_OP_ERIGON_ARCHIVE_TRACE_DATA:-mode-mainnet-op-erigon-archive-trace}:/root/.local/share/erigon
- ./op/mode/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.mode-mainnet-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/mode-mainnet-op-erigon
- traefik.http.services.mode-mainnet-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/mode-mainnet-op-erigon`) || Path(`/mode-mainnet-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.mode-mainnet-op-erigon-archive-trace.rule=Path(`/mode-mainnet-op-erigon`) || Path(`/mode-mainnet-op-erigon/`)}
- traefik.http.routers.mode-mainnet-op-erigon-archive-trace.middlewares=mode-mainnet-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
mode-mainnet-op-erigon-node:
image: ${MODE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MODE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17509:17509
- 17509:17509/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MODE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=34443
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://mode-mainnet-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17509
- KONA_NODE_P2P_LISTEN_UDP_PORT=17509
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
mode-mainnet-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/mode/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.mode-mainnet-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/mode-mainnet-op-erigon/node
- traefik.http.services.mode-mainnet-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/mode-mainnet-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.mode-mainnet-op-erigon-archive-trace-node.rule=PathPrefix(`/mode-mainnet-op-erigon/node`)}
- traefik.http.routers.mode-mainnet-op-erigon-archive-trace-node.middlewares=mode-mainnet-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
mode-mainnet-op-erigon-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: mode
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,203 @@
---
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:op/erigon/mode-sepolia-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/mode-sepolia-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
mode-sepolia-op-erigon:
image: ${MODE_ERIGON_IMAGE:-testinprod/op-erigon}:${MODE_SEPOLIA_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 13212:13212
- 13212:13212/udp
- 33212:33212
- 33212:33212/udp
- 38212:38212
- 38212:38212/udp
expose:
- 8545
- 6060
- 8551
entrypoint: [erigon]
command:
- --chain=mode-sepolia
- --datadir=/root/.local/share/erigon
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --p2p.allowed-ports=33212
- --p2p.allowed-ports=38212
- --port=13212
- --rollup.sequencerhttp=https://sepolia.mode.network
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MODE_SEPOLIA_OP_ERIGON_ARCHIVE_TRACE_DATA:-mode-sepolia-op-erigon-archive-trace}:/root/.local/share/erigon
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.mode-sepolia-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/mode-sepolia-op-erigon
- traefik.http.services.mode-sepolia-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/mode-sepolia-op-erigon`) || Path(`/mode-sepolia-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.mode-sepolia-op-erigon-archive-trace.rule=Path(`/mode-sepolia-op-erigon`) || Path(`/mode-sepolia-op-erigon/`)}
- traefik.http.routers.mode-sepolia-op-erigon-archive-trace.middlewares=mode-sepolia-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
mode-sepolia-op-erigon-node:
image: ${MODE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MODE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 18212:18212
- 18212:18212/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MODE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=919
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://mode-sepolia-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18212
- KONA_NODE_P2P_LISTEN_UDP_PORT=18212
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
mode-sepolia-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.mode-sepolia-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/mode-sepolia-op-erigon/node
- traefik.http.services.mode-sepolia-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/mode-sepolia-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.mode-sepolia-op-erigon-archive-trace-node.rule=PathPrefix(`/mode-sepolia-op-erigon/node`)}
- traefik.http.routers.mode-sepolia-op-erigon-archive-trace-node.middlewares=mode-sepolia-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
mode-sepolia-op-erigon-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: mode-testnet
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,202 @@
---
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:op/erigon/swell-mainnet-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/swell-mainnet-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
swell-mainnet-op-erigon:
image: ${SWELL_ERIGON_IMAGE:-testinprod/op-erigon}:${SWELL_MAINNET_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 10810:10810
- 10810:10810/udp
- 30810:30810
- 30810:30810/udp
- 35810:35810
- 35810:35810/udp
expose:
- 8545
- 6060
- 8551
entrypoint: [erigon]
command:
- --chain=swell-mainnet
- --datadir=/root/.local/share/erigon
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --p2p.allowed-ports=30810
- --p2p.allowed-ports=35810
- --port=10810
- --rollup.sequencerhttp=https://swell-mainnet.alt.technology
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${SWELL_MAINNET_OP_ERIGON_ARCHIVE_TRACE_DATA:-swell-mainnet-op-erigon-archive-trace}:/root/.local/share/erigon
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.swell-mainnet-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/swell-mainnet-op-erigon
- traefik.http.services.swell-mainnet-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/swell-mainnet-op-erigon`) || Path(`/swell-mainnet-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.swell-mainnet-op-erigon-archive-trace.rule=Path(`/swell-mainnet-op-erigon`) || Path(`/swell-mainnet-op-erigon/`)}
- traefik.http.routers.swell-mainnet-op-erigon-archive-trace.middlewares=swell-mainnet-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
swell-mainnet-op-erigon-node:
image: ${SWELL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${SWELL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 15810:15810
- 15810:15810/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${SWELL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1923
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://swell-mainnet-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15810
- KONA_NODE_P2P_LISTEN_UDP_PORT=15810
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
swell-mainnet-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.swell-mainnet-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/swell-mainnet-op-erigon/node
- traefik.http.services.swell-mainnet-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/swell-mainnet-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.swell-mainnet-op-erigon-archive-trace-node.rule=PathPrefix(`/swell-mainnet-op-erigon/node`)}
- traefik.http.routers.swell-mainnet-op-erigon-archive-trace-node.middlewares=swell-mainnet-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
swell-mainnet-op-erigon-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: swell
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,204 @@
---
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:op/erigon/zora-mainnet-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-mainnet-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-mainnet-op-erigon:
image: ${ZORA_ERIGON_IMAGE:-testinprod/op-erigon}:${ZORA_MAINNET_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 14360:14360
- 14360:14360/udp
- 34360:34360
- 34360:34360/udp
- 39360:39360
- 39360:39360/udp
expose:
- 8545
- 6060
- 8551
entrypoint: /bin/sh -c '[ ! -d /root/.local/share/erigon/chaindata/mdbx.dat ] && erigon init --datadir /root/.local/share/erigon /config/genesis.json; exec erigon "$@"' --
command:
- --datadir=/root/.local/share/erigon
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=7777777
- --p2p.allowed-ports=34360
- --p2p.allowed-ports=39360
- --port=14360
- --rollup.sequencerhttp=https://rpc.zora.energy
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_MAINNET_OP_ERIGON_ARCHIVE_TRACE_DATA:-zora-mainnet-op-erigon-archive-trace}:/root/.local/share/erigon
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/zora-mainnet-op-erigon
- traefik.http.services.zora-mainnet-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/zora-mainnet-op-erigon`) || Path(`/zora-mainnet-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-erigon-archive-trace.rule=Path(`/zora-mainnet-op-erigon`) || Path(`/zora-mainnet-op-erigon/`)}
- traefik.http.routers.zora-mainnet-op-erigon-archive-trace.middlewares=zora-mainnet-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
zora-mainnet-op-erigon-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 19360:19360
- 19360:19360/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=7777777
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-mainnet-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19360
- KONA_NODE_P2P_LISTEN_UDP_PORT=19360
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-mainnet-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/zora-mainnet-op-erigon/node
- traefik.http.services.zora-mainnet-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-mainnet-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-erigon-archive-trace-node.rule=PathPrefix(`/zora-mainnet-op-erigon/node`)}
- traefik.http.routers.zora-mainnet-op-erigon-archive-trace-node.middlewares=zora-mainnet-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
zora-mainnet-op-erigon-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zora
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,205 @@
---
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:op/erigon/zora-sepolia-op-erigon-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-sepolia-op-erigon \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-sepolia-op-erigon:
image: ${ZORA_ERIGON_IMAGE:-testinprod/op-erigon}:${ZORA_SEPOLIA_ERIGON_VERSION:-v2.61.3-0.10.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 13839:13839
- 13839:13839/udp
- 33839:33839
- 33839:33839/udp
- 38839:38839
- 38839:38839/udp
expose:
- 8545
- 6060
- 8551
entrypoint: /bin/sh -c '[ ! -d /root/.local/share/erigon/chaindata/mdbx.dat ] && erigon init --datadir /root/.local/share/erigon /config/genesis.json; exec erigon "$@"' --
command:
- --datadir=/root/.local/share/erigon
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=999999999
- --p2p.allowed-ports=33839
- --p2p.allowed-ports=38839
- --port=13839
- --rollup.sequencerhttp=https://sepolia.rpc.zora.energy
- --rpc.gascap=6000000000
- --rpc.returndata.limit=1500000
- --http
- --http.addr=0.0.0.0
- --http.api=eth,erigon,web3,net,debug,trace,txpool,admin,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_SEPOLIA_OP_ERIGON_ARCHIVE_TRACE_DATA:-zora-sepolia-op-erigon-archive-trace}:/root/.local/share/erigon
- ./op/zora/sepolia:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zora-sepolia-op-erigon-archive-trace-stripprefix.stripprefix.prefixes=/zora-sepolia-op-erigon
- traefik.http.services.zora-sepolia-op-erigon-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-erigon-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-erigon-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-erigon-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/zora-sepolia-op-erigon`) || Path(`/zora-sepolia-op-erigon/`))}
- ${NO_SSL:+traefik.http.routers.zora-sepolia-op-erigon-archive-trace.rule=Path(`/zora-sepolia-op-erigon`) || Path(`/zora-sepolia-op-erigon/`)}
- traefik.http.routers.zora-sepolia-op-erigon-archive-trace.middlewares=zora-sepolia-op-erigon-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
zora-sepolia-op-erigon-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 18839:18839
- 18839:18839/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=999999999
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-sepolia-op-erigon:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18839
- KONA_NODE_P2P_LISTEN_UDP_PORT=18839
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-sepolia-op-erigon:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/sepolia:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-sepolia-op-erigon-archive-trace-node-stripprefix.stripprefix.prefixes=/zora-sepolia-op-erigon/node
- traefik.http.services.zora-sepolia-op-erigon-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-erigon-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-erigon-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-erigon-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-sepolia-op-erigon/node`)}
- ${NO_SSL:+traefik.http.routers.zora-sepolia-op-erigon-archive-trace-node.rule=PathPrefix(`/zora-sepolia-op-erigon/node`)}
- traefik.http.routers.zora-sepolia-op-erigon-archive-trace-node.middlewares=zora-sepolia-op-erigon-archive-trace-node-stripprefix, ipallowlist
volumes:
zora-sepolia-op-erigon-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zora-sepolia
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
# standard geth and erigon
- name: debug_accountRange
- name: debug_getModifiedAccountsByNumber
- name: debug_getModifiedAccountsByHash
# non standard geth and erigon
- name: eth_getRawTransactionByHash
- name: eth_getRawTransactionByBlockHashAndIndex
# non standard erigon only
- name: eth_getBlockReceipts
- name: eth_protocolVersion
- name: eth_callMany
- name: eth_callBundle
- name: debug_accountAt
- name: debug_traceCallMany
- name: erigon_getHeaderByHash
- name: erigon_getBlockReceiptsByBlockHash
- name: erigon_getHeaderByNumber
- name: erigon_getLogsByHash
- name: erigon_forks
- name: erigon_getBlockByTimestamp
- name: erigon_BlockNumber
- name: erigon_getLatestLogs
...

View File

@@ -0,0 +1,196 @@
---
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:op/geth/base-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-mainnet-archive:
image: ${BASE_GETH_IMAGE:-ghcr.io/base/node-geth}:${BASE_MAINNET_GETH_VERSION:-v0.15.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
ports:
- 13596:13596
- 13596:13596/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=base-mainnet
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet-sequencer.base.org
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=13596
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-base-mainnet-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/base-mainnet-archive
- traefik.http.services.base-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet-archive`) || Path(`/base-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/base-mainnet-archive`) || Path(`/base-mainnet-archive/`)}
- traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash.middlewares=base-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
base-mainnet-archive-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18596:18596
- 18596:18596/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=8453
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18596
- KONA_NODE_P2P_LISTEN_UDP_PORT=18596
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/base-mainnet-archive/node
- traefik.http.services.base-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/base-mainnet-archive/node`)}
- traefik.http.routers.base-mainnet-op-geth-archive-leveldb-hash-node.middlewares=base-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
base-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base
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
...

View File

@@ -0,0 +1,263 @@
---
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:op/geth/base-mainnet-op-geth-pruned-pebble-path--kona--fireeth.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-mainnet:
image: ${BASE_FIREETH_IMAGE:-ghcr.io/streamingfast/go-ethereum}:${BASE_MAINNET_FIREETH_VERSION:-v2.12.4-optimism-v1.101511.0-op-node.v1.13.3-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:
- 11422:11422
- 11422:11422/udp
expose:
- 8545
- 6060
- 8551
- 10010
environment:
- GETH_OP_NETWORK=base-mainnet
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet-sequencer.base.org
entrypoint: [sh, -c, exec fireeth start reader-node --reader-node-arguments "$*", _]
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=11422
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=full
- --vmtrace=firehose
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_MAINNET_FIREETH_DATA:-base-mainnet-fireeth}:/app/firehose-data
- ${BASE_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-base-mainnet-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/base-mainnet
- traefik.http.services.base-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet`) || Path(`/base-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.rule=Path(`/base-mainnet`) || Path(`/base-mainnet/`)}
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.middlewares=base-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
base-mainnet-firehose:
image: ${BASE_FIREETH_IMAGE:-ghcr.io/streamingfast/go-ethereum}:${BASE_MAINNET_FIREETH_VERSION:-v2.12.4-optimism-v1.101511.0-op-node.v1.13.3-1}
expose:
- 10015
- 10014
environment:
- ${BASE_MAINNET_FIREETH_BLOCKS_STORE:-/app/firehose-data/storage/merged-blocks}
entrypoint: [sh, -c, exec fireeth --config-file="" --log-to-file=false start firehose index-builder relayer merger $@, _]
command:
- --firehose-rate-limit-bucket-fill-rate=${BASE_MAINNET_FIREHOSE_RATE_LIMIT_BUCKET_FILL_RATE:-1s}
- --firehose-rate-limit-bucket-size=${BASE_MAINNET_FIREHOSE_RATE_LIMIT_BUCKET_SIZE:-200}
- --log-to-file=false
- --relayer-source=base-mainnet:10010
restart: unless-stopped
depends_on:
- base-mainnet
networks:
- chains
volumes:
- ${BASE_MAINNET_FIREETH_DATA:-base-mainnet-fireeth}:/app/firehose-data
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=false
- traefik.enable=true
- traefik.http.services.base-mainnet-op-geth-pruned-pebble-path-firehose.loadbalancer.server.scheme=h2c
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-firehose.service=base-mainnet-op-geth-pruned-pebble-path-firehose
- traefik.http.services.base-mainnet-op-geth-pruned-pebble-path-firehose.loadbalancer.server.port=10015
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-firehose.entrypoints=grpc
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-firehose.tls.certresolver=myresolver}
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-firehose.rule=Host(`base-mainnet-firehose.${DOMAIN}`)
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-firehose.middlewares=ipallowlist
base-mainnet-events:
image: ${BASE_FIREETH_IMAGE:-ghcr.io/streamingfast/go-ethereum}:${BASE_MAINNET_FIREETH_VERSION:-v2.12.4-optimism-v1.101511.0-op-node.v1.13.3-1}
expose:
- 10016
entrypoint: [sh, -c, exec fireeth --config-file="" --log-to-file=false start substreams-tier1 substreams-tier2 $@, _]
command:
- --common-live-blocks-addr=base-mainnet-firehose:10014
- --log-to-file=false
- --substreams-block-execution-timeout=${BASE_MAINNET_SUBSTREAMS_BLOCK_EXECUTION_TIMEOUT:-3m0s}
- --substreams-rpc-endpoints=${BASE_MAINNET_EXECUTION_ARCHIVE_RPC}
- --substreams-tier1-max-subrequests=${BASE_MAINNET_SUBSTREAMS_TIER1_MAX_SUBREQUESTS:-4}
restart: unless-stopped
depends_on:
- base-mainnet
networks:
- chains
volumes:
- ${BASE_MAINNET_FIREETH_DATA:-base-mainnet-fireeth}:/app/firehose-data
logging: *logging-defaults
labels:
- traefik.enable=true
- traefik.http.services.base-mainnet-op-geth-pruned-pebble-path-events.loadbalancer.server.scheme=h2c
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-events.service=base-mainnet-op-geth-pruned-pebble-path-events
- traefik.http.services.base-mainnet-op-geth-pruned-pebble-path-events.loadbalancer.server.port=10016
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-events.entrypoints=grpc
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-events.tls.certresolver=myresolver}
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-events.rule=Host(`base-mainnet-events.${DOMAIN}`)
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-events.middlewares=ipallowlist
base-mainnet-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16422:16422
- 16422:16422/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=8453
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16422
- KONA_NODE_P2P_LISTEN_UDP_PORT=16422
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/base-mainnet/node
- traefik.http.services.base-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/base-mainnet/node`)}
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.middlewares=base-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
base-mainnet-op-geth-pruned-pebble-path:
base-mainnet-op-geth-pruned-pebble-path_fireeth:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/base-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-mainnet:
image: ${BASE_GETH_IMAGE:-ghcr.io/base/node-geth}:${BASE_MAINNET_GETH_VERSION:-v0.15.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
ports:
- 11422:11422
- 11422:11422/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=base-mainnet
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet-sequencer.base.org
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=11422
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-base-mainnet-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/base-mainnet
- traefik.http.services.base-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet`) || Path(`/base-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.rule=Path(`/base-mainnet`) || Path(`/base-mainnet/`)}
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path.middlewares=base-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
base-mainnet-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16422:16422
- 16422:16422/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=8453
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16422
- KONA_NODE_P2P_LISTEN_UDP_PORT=16422
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/base-mainnet/node
- traefik.http.services.base-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/base-mainnet/node`)}
- traefik.http.routers.base-mainnet-op-geth-pruned-pebble-path-node.middlewares=base-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
base-mainnet-op-geth-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: base
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
...

View File

@@ -0,0 +1,197 @@
---
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:op/geth/base-sepolia-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-sepolia-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-sepolia-archive:
image: ${BASE_GETH_IMAGE:-ghcr.io/base/node-geth}:${BASE_SEPOLIA_GETH_VERSION:-v0.15.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
ports:
- 10910:10910
- 10910:10910/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=base-sepolia
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia-sequencer.base.org
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=10910
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_SEPOLIA_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-base-sepolia-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/base-sepolia-archive
- traefik.http.services.base-sepolia-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/base-sepolia-archive`) || Path(`/base-sepolia-archive/`))}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash.rule=Path(`/base-sepolia-archive`) || Path(`/base-sepolia-archive/`)}
- traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash.middlewares=base-sepolia-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
base-sepolia-archive-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 15910:15910
- 15910:15910/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=84532
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-sepolia-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15910
- KONA_NODE_P2P_LISTEN_UDP_PORT=15910
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-sepolia-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/base-sepolia-archive/node
- traefik.http.services.base-sepolia-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-sepolia-archive/node`)}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/base-sepolia-archive/node`)}
- traefik.http.routers.base-sepolia-op-geth-archive-leveldb-hash-node.middlewares=base-sepolia-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
base-sepolia-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base-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
...

View File

@@ -0,0 +1,199 @@
---
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:op/geth/base-sepolia-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-sepolia \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-sepolia:
image: ${BASE_GETH_IMAGE:-ghcr.io/base/node-geth}:${BASE_SEPOLIA_GETH_VERSION:-v0.15.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
ports:
- 12022:12022
- 12022:12022/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=base-sepolia
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia-sequencer.base.org
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=12022
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_SEPOLIA_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-base-sepolia-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/base-sepolia
- traefik.http.services.base-sepolia-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/base-sepolia`) || Path(`/base-sepolia/`))}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path.rule=Path(`/base-sepolia`) || Path(`/base-sepolia/`)}
- traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path.middlewares=base-sepolia-op-geth-pruned-pebble-path-stripprefix, ipallowlist
base-sepolia-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 17022:17022
- 17022:17022/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=84532
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-sepolia:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17022
- KONA_NODE_P2P_LISTEN_UDP_PORT=17022
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-sepolia:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/base-sepolia/node
- traefik.http.services.base-sepolia-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-sepolia/node`)}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/base-sepolia/node`)}
- traefik.http.routers.base-sepolia-op-geth-pruned-pebble-path-node.middlewares=base-sepolia-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
base-sepolia-op-geth-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: base-sepolia
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/blast-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/blast-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
blast-mainnet-archive:
image: ${BLAST_GETH_IMAGE:-blastio/blast-geth}:${BLAST_MAINNET_GETH_VERSION:-mainnet-v1.8.0}
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
- 6060
- 8551
environment:
- GETH_OVERRIDE_CANYON=0
- GETH_OVERRIDE_ECOTONE=1716843599
- GETH_OVERRIDE_TAIGA=1746612311
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sequencer.blast.io
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=81457
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BLAST_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-blast-mainnet-op-geth-archive-leveldb-hash}:/data
- ./op/blast/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.blast-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/blast-mainnet-archive
- traefik.http.services.blast-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/blast-mainnet-archive`) || Path(`/blast-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/blast-mainnet-archive`) || Path(`/blast-mainnet-archive/`)}
- traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash.middlewares=blast-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
blast-mainnet-archive-node:
image: ${BLAST_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BLAST_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 15683:15683
- 15683:15683/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BLAST_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=81457
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://blast-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enr:-J64QGwHl9uYLfC_cnmxSA6wQH811nkOWJDWjzxqkEUlJoZHWvI66u-BXgVcPCeMUmg0dBpFQAPotFchG67FHJMZ9OSGAY3d6wevgmlkgnY0gmlwhANizeSHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaECg4pk0cskPAyJ7pOmo9E6RqGBwV-Lex4VS9a3MQvu7PWDdGNwgnZhg3VkcIJ2YQ,enr:-J64QDge2jYBQtcNEpRqmKfci5E5BHAhNBjgv4WSdwH1_wPqbueq2bDj38-TSW8asjy5lJj1Xftui6Or8lnaYFCqCI-GAY3d6wf3gmlkgnY0gmlwhCO2D9yHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaEDo4aCTq7pCEN8om9U5n_VyWdambGnQhwHNwKc8o-OicaDdGNwgnZhg3VkcIJ2YQ
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15683
- KONA_NODE_P2P_LISTEN_UDP_PORT=15683
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
blast-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/blast/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.blast-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/blast-mainnet-archive/node
- traefik.http.services.blast-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/blast-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/blast-mainnet-archive/node`)}
- traefik.http.routers.blast-mainnet-op-geth-archive-leveldb-hash-node.middlewares=blast-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
blast-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: blast
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/blast-mainnet-op-geth-archive-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/blast-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
blast-mainnet-archive:
image: ${BLAST_GETH_IMAGE:-blastio/blast-geth}:${BLAST_MAINNET_GETH_VERSION:-mainnet-v1.8.0}
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
- 6060
- 8551
environment:
- GETH_OVERRIDE_CANYON=0
- GETH_OVERRIDE_ECOTONE=1716843599
- GETH_OVERRIDE_TAIGA=1746612311
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sequencer.blast.io
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=81457
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BLAST_MAINNET_OP_GETH_ARCHIVE_PEBBLE_HASH_DATA:-blast-mainnet-op-geth-archive-pebble-hash}:/data
- ./op/blast/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.blast-mainnet-op-geth-archive-pebble-hash-stripprefix.stripprefix.prefixes=/blast-mainnet-archive
- traefik.http.services.blast-mainnet-op-geth-archive-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/blast-mainnet-archive`) || Path(`/blast-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash.rule=Path(`/blast-mainnet-archive`) || Path(`/blast-mainnet-archive/`)}
- traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash.middlewares=blast-mainnet-op-geth-archive-pebble-hash-stripprefix, ipallowlist
blast-mainnet-archive-node:
image: ${BLAST_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BLAST_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 15287:15287
- 15287:15287/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BLAST_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=81457
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://blast-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enr:-J64QGwHl9uYLfC_cnmxSA6wQH811nkOWJDWjzxqkEUlJoZHWvI66u-BXgVcPCeMUmg0dBpFQAPotFchG67FHJMZ9OSGAY3d6wevgmlkgnY0gmlwhANizeSHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaECg4pk0cskPAyJ7pOmo9E6RqGBwV-Lex4VS9a3MQvu7PWDdGNwgnZhg3VkcIJ2YQ,enr:-J64QDge2jYBQtcNEpRqmKfci5E5BHAhNBjgv4WSdwH1_wPqbueq2bDj38-TSW8asjy5lJj1Xftui6Or8lnaYFCqCI-GAY3d6wf3gmlkgnY0gmlwhCO2D9yHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaEDo4aCTq7pCEN8om9U5n_VyWdambGnQhwHNwKc8o-OicaDdGNwgnZhg3VkcIJ2YQ
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15287
- KONA_NODE_P2P_LISTEN_UDP_PORT=15287
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
blast-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/blast/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.blast-mainnet-op-geth-archive-pebble-hash-node-stripprefix.stripprefix.prefixes=/blast-mainnet-archive/node
- traefik.http.services.blast-mainnet-op-geth-archive-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/blast-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash-node.rule=PathPrefix(`/blast-mainnet-archive/node`)}
- traefik.http.routers.blast-mainnet-op-geth-archive-pebble-hash-node.middlewares=blast-mainnet-op-geth-archive-pebble-hash-node-stripprefix, ipallowlist
volumes:
blast-mainnet-op-geth-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: blast
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
...

View File

@@ -0,0 +1,200 @@
---
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:op/geth/blast-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/blast-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
blast-mainnet:
image: ${BLAST_GETH_IMAGE:-blastio/blast-geth}:${BLAST_MAINNET_GETH_VERSION:-mainnet-v1.8.0}
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
- 6060
- 8551
environment:
- GETH_OVERRIDE_CANYON=0
- GETH_OVERRIDE_ECOTONE=1716843599
- GETH_OVERRIDE_TAIGA=1746612311
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sequencer.blast.io
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=81457
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BLAST_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-blast-mainnet-op-geth-pruned-pebble-path}:/data
- ./op/blast/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.blast-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/blast-mainnet
- traefik.http.services.blast-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/blast-mainnet`) || Path(`/blast-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path.rule=Path(`/blast-mainnet`) || Path(`/blast-mainnet/`)}
- traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path.middlewares=blast-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
blast-mainnet-node:
image: ${BLAST_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BLAST_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17769:17769
- 17769:17769/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BLAST_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=81457
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://blast-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enr:-J64QGwHl9uYLfC_cnmxSA6wQH811nkOWJDWjzxqkEUlJoZHWvI66u-BXgVcPCeMUmg0dBpFQAPotFchG67FHJMZ9OSGAY3d6wevgmlkgnY0gmlwhANizeSHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaECg4pk0cskPAyJ7pOmo9E6RqGBwV-Lex4VS9a3MQvu7PWDdGNwgnZhg3VkcIJ2YQ,enr:-J64QDge2jYBQtcNEpRqmKfci5E5BHAhNBjgv4WSdwH1_wPqbueq2bDj38-TSW8asjy5lJj1Xftui6Or8lnaYFCqCI-GAY3d6wf3gmlkgnY0gmlwhCO2D9yHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaEDo4aCTq7pCEN8om9U5n_VyWdambGnQhwHNwKc8o-OicaDdGNwgnZhg3VkcIJ2YQ
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17769
- KONA_NODE_P2P_LISTEN_UDP_PORT=17769
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
blast-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/blast/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.blast-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/blast-mainnet/node
- traefik.http.services.blast-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/blast-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/blast-mainnet/node`)}
- traefik.http.routers.blast-mainnet-op-geth-pruned-pebble-path-node.middlewares=blast-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
blast-mainnet-op-geth-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: blast
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/blast-sepolia-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/blast-sepolia \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
blast-sepolia:
image: ${BLAST_GETH_IMAGE:-blastio/blast-geth}:${BLAST_SEPOLIA_GETH_VERSION:-sepolia-v1.7.0}
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
- 6060
- 8551
environment:
- GETH_OVERRIDE_CANYON=0
- GETH_OVERRIDE_ECOTONE_TIME=1713999600
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sequencer.s2.testblast.io
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=168587773
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BLAST_SEPOLIA_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-blast-sepolia-op-geth-pruned-pebble-hash}:/data
- ./op/blast/sepolia:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.blast-sepolia-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/blast-sepolia
- traefik.http.services.blast-sepolia-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/blast-sepolia`) || Path(`/blast-sepolia/`))}
- ${NO_SSL:+traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash.rule=Path(`/blast-sepolia`) || Path(`/blast-sepolia/`)}
- traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash.middlewares=blast-sepolia-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
blast-sepolia-node:
image: ${BLAST_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BLAST_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 16591:16591
- 16591:16591/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BLAST_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=168587773
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://blast-sepolia:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enr:-J-4QM3GLUFfKMSJQuP1UvuKQe8DyovE7Eaiit0l6By4zjTodkR4V8NWXJxNmlg8t8rP-Q-wp3jVmeAOml8cjMj__ROGAYznzb_HgmlkgnY0gmlwhA-cZ_eHb3BzdGFja4X947FQAIlzZWNwMjU2azGhAiuDqvB-AsVSRmnnWr6OHfjgY8YfNclFy9p02flKzXnOg3RjcIJ2YYN1ZHCCdmE,enr:-J-4QDCVpByqQ8nFqCS9aHicqwUfXgzFDslvpEyYz19lvkHLIdtcIGp2d4q5dxHdjRNTO6HXCsnIKxUeuZSPcEbyVQCGAYznzz0RgmlkgnY0gmlwhANiQfuHb3BzdGFja4X947FQAIlzZWNwMjU2azGhAy3AtF2Jh_aPdOohg506Hjmtx-fQ1AKmu71C7PfkWAw9g3RjcIJ2YYN1ZHCCdmE
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16591
- KONA_NODE_P2P_LISTEN_UDP_PORT=16591
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
blast-sepolia:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/blast/sepolia:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.blast-sepolia-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/blast-sepolia/node
- traefik.http.services.blast-sepolia-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/blast-sepolia/node`)}
- ${NO_SSL:+traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/blast-sepolia/node`)}
- traefik.http.routers.blast-sepolia-op-geth-pruned-pebble-hash-node.middlewares=blast-sepolia-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
blast-sepolia-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: blast-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
...

View File

@@ -0,0 +1,197 @@
---
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:op/geth/bnb-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/bnb-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
bnb-mainnet-archive:
image: ${BNB_GETH_IMAGE:-ghcr.io/bnb-chain/op-geth}:${BNB_MAINNET_GETH_VERSION:-v0.5.9}
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:
- 11402:11402
- 11402:11402/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://opbnb-mainnet-rpc.bnbchain.org
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --bootnodes=enr:-KO4QHs5qh_kPFcjMgqkuN9dbxXT4C5Cjad4SAheaUxveCbJQ3XdeMMDHeHilHyqisyYQAByfdhzyKAdUp2SvyzWeBqGAYvRDf80g2V0aMfGhHFtSjqAgmlkgnY0gmlwhDaykUmJc2VjcDI1NmsxoQJUevTL3hJwj21IT2GC6VaNqVQEsJFPtNtO-ld5QTNCfIRzbmFwwIN0Y3CCdl-DdWRwgnZf,enr:-KO4QKIByq-YMjs6IL2YCNZEmlo3dKWNOy4B6sdqE3gjOrXeKdNbwZZGK_JzT1epqCFs3mujjg2vO1lrZLzLy4Rl7PyGAYvRA8bEg2V0aMfGhHFtSjqAgmlkgnY0gmlwhDbjSM6Jc2VjcDI1NmsxoQNQhJ5pqCPnTbK92gEc2F98y-u1OgZVAI1Msx-UiHezY4RzbmFwwIN0Y3CCdl-DdWRwgnZf
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --opBNBMainnet
- --port=11402
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BNB_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-bnb-mainnet-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.bnb-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/bnb-mainnet-archive
- traefik.http.services.bnb-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/bnb-mainnet-archive`) || Path(`/bnb-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/bnb-mainnet-archive`) || Path(`/bnb-mainnet-archive/`)}
- traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash.middlewares=bnb-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
bnb-mainnet-archive-node:
image: ${BNB_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BNB_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16402:16402
- 16402:16402/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BNB_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=204
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://bnb-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16402
- KONA_NODE_P2P_LISTEN_UDP_PORT=16402
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
bnb-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.bnb-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/bnb-mainnet-archive/node
- traefik.http.services.bnb-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/bnb-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/bnb-mainnet-archive/node`)}
- traefik.http.routers.bnb-mainnet-op-geth-archive-leveldb-hash-node.middlewares=bnb-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
bnb-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: opbnb
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
...

View File

@@ -0,0 +1,200 @@
---
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:op/geth/bnb-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/bnb-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
bnb-mainnet:
image: ${BNB_GETH_IMAGE:-ghcr.io/bnb-chain/op-geth}:${BNB_MAINNET_GETH_VERSION:-v0.5.9}
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:
- 12599:12599
- 12599:12599/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://opbnb-mainnet-rpc.bnbchain.org
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --allow-insecure-no-tries
- --bootnodes=enr:-KO4QHs5qh_kPFcjMgqkuN9dbxXT4C5Cjad4SAheaUxveCbJQ3XdeMMDHeHilHyqisyYQAByfdhzyKAdUp2SvyzWeBqGAYvRDf80g2V0aMfGhHFtSjqAgmlkgnY0gmlwhDaykUmJc2VjcDI1NmsxoQJUevTL3hJwj21IT2GC6VaNqVQEsJFPtNtO-ld5QTNCfIRzbmFwwIN0Y3CCdl-DdWRwgnZf,enr:-KO4QKIByq-YMjs6IL2YCNZEmlo3dKWNOy4B6sdqE3gjOrXeKdNbwZZGK_JzT1epqCFs3mujjg2vO1lrZLzLy4Rl7PyGAYvRA8bEg2V0aMfGhHFtSjqAgmlkgnY0gmlwhDbjSM6Jc2VjcDI1NmsxoQNQhJ5pqCPnTbK92gEc2F98y-u1OgZVAI1Msx-UiHezY4RzbmFwwIN0Y3CCdl-DdWRwgnZf
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --opBNBMainnet
- --port=12599
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BNB_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-bnb-mainnet-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.bnb-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/bnb-mainnet
- traefik.http.services.bnb-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/bnb-mainnet`) || Path(`/bnb-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path.rule=Path(`/bnb-mainnet`) || Path(`/bnb-mainnet/`)}
- traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path.middlewares=bnb-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
bnb-mainnet-node:
image: ${BNB_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BNB_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17599:17599
- 17599:17599/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BNB_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=204
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://bnb-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17599
- KONA_NODE_P2P_LISTEN_UDP_PORT=17599
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
bnb-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.bnb-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/bnb-mainnet/node
- traefik.http.services.bnb-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/bnb-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/bnb-mainnet/node`)}
- traefik.http.routers.bnb-mainnet-op-geth-pruned-pebble-path-node.middlewares=bnb-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
bnb-mainnet-op-geth-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: opbnb
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
...

View File

@@ -0,0 +1,197 @@
---
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:op/geth/bnb-testnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/bnb-testnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
bnb-testnet-archive:
image: ${BNB_GETH_IMAGE:-ghcr.io/bnb-chain/op-geth}:${BNB_TESTNET_GETH_VERSION:-v0.5.9}
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:
- 10163:10163
- 10163:10163/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://opbnb-testnet-rpc.bnbchain.org
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --bootnodes=enr:-KO4QKFOBDW--pF4pFwv3Al_jiLOITj_Y5mr1Ajyy2yxHpFtNcBfkZEkvWUxAKXQjWALZEFxYHooU88JClyzA00e8YeGAYtBOOZig2V0aMfGhE0ZYGqAgmlkgnY0gmlwhDREiqaJc2VjcDI1NmsxoQM8pC_6wwTr5N2Q-yXQ1KGKsgz9i9EPLk8Ata65pUyYG4RzbmFwwIN0Y3CCdl-DdWRwgnZf,enr:-KO4QFJc0KR09ye818GT2kyN9y6BAGjhz77sYimxn85jJf2hOrNqg4X0b0EsS-_ssdkzVpavqh6oMX7W5Y81xMRuEayGAYtBSiK9g2V0aMfGhE0ZYGqAgmlkgnY0gmlwhANzx96Jc2VjcDI1NmsxoQPwA1XHfWGd4umIt7j3Fc7hKq_35izIWT_9yiN_tX8lR4RzbmFwwIN0Y3CCdl-DdWRwgnZf
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --opBNBTestnet
- --port=10163
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BNB_TESTNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-bnb-testnet-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.bnb-testnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/bnb-testnet-archive
- traefik.http.services.bnb-testnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/bnb-testnet-archive`) || Path(`/bnb-testnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash.rule=Path(`/bnb-testnet-archive`) || Path(`/bnb-testnet-archive/`)}
- traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash.middlewares=bnb-testnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
bnb-testnet-archive-node:
image: ${BNB_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BNB_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 15163:15163
- 15163:15163/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_TESTNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BNB_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_TESTNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_TESTNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=5611
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://bnb-testnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15163
- KONA_NODE_P2P_LISTEN_UDP_PORT=15163
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
bnb-testnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.bnb-testnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/bnb-testnet-archive/node
- traefik.http.services.bnb-testnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/bnb-testnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/bnb-testnet-archive/node`)}
- traefik.http.routers.bnb-testnet-op-geth-archive-leveldb-hash-node.middlewares=bnb-testnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
bnb-testnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: opbnb-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
...

View File

@@ -0,0 +1,200 @@
---
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:op/geth/bnb-testnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/bnb-testnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
bnb-testnet:
image: ${BNB_GETH_IMAGE:-ghcr.io/bnb-chain/op-geth}:${BNB_TESTNET_GETH_VERSION:-v0.5.9}
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:
- 13187:13187
- 13187:13187/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://opbnb-testnet-rpc.bnbchain.org
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --allow-insecure-no-tries
- --bootnodes=enr:-KO4QKFOBDW--pF4pFwv3Al_jiLOITj_Y5mr1Ajyy2yxHpFtNcBfkZEkvWUxAKXQjWALZEFxYHooU88JClyzA00e8YeGAYtBOOZig2V0aMfGhE0ZYGqAgmlkgnY0gmlwhDREiqaJc2VjcDI1NmsxoQM8pC_6wwTr5N2Q-yXQ1KGKsgz9i9EPLk8Ata65pUyYG4RzbmFwwIN0Y3CCdl-DdWRwgnZf,enr:-KO4QFJc0KR09ye818GT2kyN9y6BAGjhz77sYimxn85jJf2hOrNqg4X0b0EsS-_ssdkzVpavqh6oMX7W5Y81xMRuEayGAYtBSiK9g2V0aMfGhE0ZYGqAgmlkgnY0gmlwhANzx96Jc2VjcDI1NmsxoQPwA1XHfWGd4umIt7j3Fc7hKq_35izIWT_9yiN_tX8lR4RzbmFwwIN0Y3CCdl-DdWRwgnZf
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --opBNBTestnet
- --port=13187
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BNB_TESTNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-bnb-testnet-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.bnb-testnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/bnb-testnet
- traefik.http.services.bnb-testnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/bnb-testnet`) || Path(`/bnb-testnet/`))}
- ${NO_SSL:+traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path.rule=Path(`/bnb-testnet`) || Path(`/bnb-testnet/`)}
- traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path.middlewares=bnb-testnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
bnb-testnet-node:
image: ${BNB_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BNB_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 18187:18187
- 18187:18187/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_TESTNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BNB_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_TESTNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_TESTNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=5611
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://bnb-testnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18187
- KONA_NODE_P2P_LISTEN_UDP_PORT=18187
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
bnb-testnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.bnb-testnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/bnb-testnet/node
- traefik.http.services.bnb-testnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/bnb-testnet/node`)}
- ${NO_SSL:+traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/bnb-testnet/node`)}
- traefik.http.routers.bnb-testnet-op-geth-pruned-pebble-path-node.middlewares=bnb-testnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
bnb-testnet-op-geth-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: opbnb-testnet
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
...

View File

@@ -0,0 +1,207 @@
---
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:op/geth/fraxtal-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/fraxtal-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
fraxtal-mainnet-archive:
image: ${FRAXTAL_GETH_IMAGE:-ghcr.io/fraxfinance/fraxtal-op-geth}:${FRAXTAL_MAINNET_GETH_VERSION:-v1.101702.1-frax-1.3.0}
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:
- 13290:13290
- 13290:13290/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_BOOTNODES=enr:-J24QI8QR7VIgvQFuvLl09b9ocugoQ1WkS_AOMWKFgNX48-4P1hjgDKGeMFXZmKtfjYA2aEehxKT066riaktnxhh92OGAY5Sw_QsgmlkgnY0gmlwhCztZu2Hb3BzdGFja4P8AQCJc2VjcDI1NmsxoQM2KM0mkdH97Ze8AqwxLeqc934PKj8-xoKsyP6mAptWwIN0Y3CCdl2DdWRwgnZd,enr:-J24QGD1J-g2EPY9b7XiuwLhIoGocVp2qx2gWSfDI_CdftiPSHlgi7G6LtzkQlDskuSvRj4OXTg3vXLISubphXNNhqyGAY5Sw8GxgmlkgnY0gmlwhCzW_iGHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQPvMYlJHJUsEyciuJCTkKHLE2ogZ6cs2xuPI28CGq0CTIN0Y3CCdl2DdWRwgnZd,enr:-J24QCA5I3xroUXt7Ge_Kf04VCRBnI-GbZeyBxOkkpIDGGLrVsonrbngQG1hAEnufRb1TgS6sNFCGtaZ2ZpRx7AgciGGAY5SxEy0gmlkgnY0gmlwhCLzRQyHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQOaHzrtPQWYcwAcFJWFrbGlbNUsBC0VEhCcH02RbgEIwIN0Y3CCdl2DdWRwgnZd
- GETH_OVERRIDE_CANYON=0
- GETH_OVERRIDE_ECOTONE=1717009201
- GETH_OVERRIDE_FJORD=1733947201
- GETH_OVERRIDE_GRANITE=1738958401
- GETH_OVERRIDE_HOLOCENE=1744052401
- GETH_OVERRIDE_ISTHMUS=1755716401
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.mainnet.frax.com
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --bootnodes=enr:-J24QI8QR7VIgvQFuvLl09b9ocugoQ1WkS_AOMWKFgNX48-4P1hjgDKGeMFXZmKtfjYA2aEehxKT066riaktnxhh92OGAY5Sw_QsgmlkgnY0gmlwhCztZu2Hb3BzdGFja4P8AQCJc2VjcDI1NmsxoQM2KM0mkdH97Ze8AqwxLeqc934PKj8-xoKsyP6mAptWwIN0Y3CCdl2DdWRwgnZd,enr:-J24QGD1J-g2EPY9b7XiuwLhIoGocVp2qx2gWSfDI_CdftiPSHlgi7G6LtzkQlDskuSvRj4OXTg3vXLISubphXNNhqyGAY5Sw8GxgmlkgnY0gmlwhCzW_iGHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQPvMYlJHJUsEyciuJCTkKHLE2ogZ6cs2xuPI28CGq0CTIN0Y3CCdl2DdWRwgnZd,enr:-J24QCA5I3xroUXt7Ge_Kf04VCRBnI-GbZeyBxOkkpIDGGLrVsonrbngQG1hAEnufRb1TgS6sNFCGtaZ2ZpRx7AgciGGAY5SxEy0gmlkgnY0gmlwhCLzRQyHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQOaHzrtPQWYcwAcFJWFrbGlbNUsBC0VEhCcH02RbgEIwIN0Y3CCdl2DdWRwgnZd
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=252
- --port=13290
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${FRAXTAL_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-fraxtal-mainnet-op-geth-archive-leveldb-hash}:/data
- ./op/fraxtal/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.fraxtal-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/fraxtal-mainnet-archive
- traefik.http.services.fraxtal-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/fraxtal-mainnet-archive`) || Path(`/fraxtal-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/fraxtal-mainnet-archive`) || Path(`/fraxtal-mainnet-archive/`)}
- traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash.middlewares=fraxtal-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
fraxtal-mainnet-archive-node:
image: ${FRAXTAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${FRAXTAL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18290:18290
- 18290:18290/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${FRAXTAL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=252
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://fraxtal-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enr:-J24QPGxmNmQ6Gsofjwnaaqt-RvC-2te44hHSU_wFGvCBpdnGnAuW0hKBCwzarXEmLN0TfwilwX3xS8xjEd9sQRqKXqGAY1ok0P3gmlkgnY0gmlwhDa-pcmHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQJA0echCE64KVt7m1lHfRF9_QgYxqIOSoPZ1UHcEArDu4N0Y3CCJAaDdWRwgiQG,enr:-J24QHPYu7uUXH4LCJ_pjHMD3fYhluZEgFRlewqOFFcja7ACaTDp4zG4GZBJdTPmLjsqskhTQa5ldKiVu4ypZYMzR_uGAY1ok_ABgmlkgnY0gmlwhCLvv1KHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQOEemNzZL5buGmwlN2naXLtz4nauCqBFeFxdmi4RL4rDIN0Y3CCJAaDdWRwgiQG,enr:-J24QBujtfGNIiE6GJrCgXEKJMs1F11wd4Y8Uvx7ZFn3Z1tyR0erNcpiW5EYIQEKQX0kL9PLJUDHWZFiaHWOTBvFg5aGAY1ok5p8gmlkgnY0gmlwhDbD-tqHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQLunzKLYJLvy6cWWkLgSSdLlILgSohrV8RT3tlKGwHBi4N0Y3CCJAaDdWRwgiQG
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18290
- KONA_NODE_P2P_LISTEN_UDP_PORT=18290
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
fraxtal-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/fraxtal/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.fraxtal-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/fraxtal-mainnet-archive/node
- traefik.http.services.fraxtal-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/fraxtal-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/fraxtal-mainnet-archive/node`)}
- traefik.http.routers.fraxtal-mainnet-op-geth-archive-leveldb-hash-node.middlewares=fraxtal-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
fraxtal-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: fraxtal
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
...

View File

@@ -0,0 +1,209 @@
---
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:op/geth/fraxtal-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/fraxtal-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
fraxtal-mainnet:
image: ${FRAXTAL_GETH_IMAGE:-ghcr.io/fraxfinance/fraxtal-op-geth}:${FRAXTAL_MAINNET_GETH_VERSION:-v1.101702.1-frax-1.3.0}
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:
- 10282:10282
- 10282:10282/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_BOOTNODES=enr:-J24QI8QR7VIgvQFuvLl09b9ocugoQ1WkS_AOMWKFgNX48-4P1hjgDKGeMFXZmKtfjYA2aEehxKT066riaktnxhh92OGAY5Sw_QsgmlkgnY0gmlwhCztZu2Hb3BzdGFja4P8AQCJc2VjcDI1NmsxoQM2KM0mkdH97Ze8AqwxLeqc934PKj8-xoKsyP6mAptWwIN0Y3CCdl2DdWRwgnZd,enr:-J24QGD1J-g2EPY9b7XiuwLhIoGocVp2qx2gWSfDI_CdftiPSHlgi7G6LtzkQlDskuSvRj4OXTg3vXLISubphXNNhqyGAY5Sw8GxgmlkgnY0gmlwhCzW_iGHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQPvMYlJHJUsEyciuJCTkKHLE2ogZ6cs2xuPI28CGq0CTIN0Y3CCdl2DdWRwgnZd,enr:-J24QCA5I3xroUXt7Ge_Kf04VCRBnI-GbZeyBxOkkpIDGGLrVsonrbngQG1hAEnufRb1TgS6sNFCGtaZ2ZpRx7AgciGGAY5SxEy0gmlkgnY0gmlwhCLzRQyHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQOaHzrtPQWYcwAcFJWFrbGlbNUsBC0VEhCcH02RbgEIwIN0Y3CCdl2DdWRwgnZd
- GETH_OVERRIDE_CANYON=0
- GETH_OVERRIDE_ECOTONE=1717009201
- GETH_OVERRIDE_FJORD=1733947201
- GETH_OVERRIDE_GRANITE=1738958401
- GETH_OVERRIDE_HOLOCENE=1744052401
- GETH_OVERRIDE_ISTHMUS=1755716401
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.mainnet.frax.com
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --bootnodes=enr:-J24QI8QR7VIgvQFuvLl09b9ocugoQ1WkS_AOMWKFgNX48-4P1hjgDKGeMFXZmKtfjYA2aEehxKT066riaktnxhh92OGAY5Sw_QsgmlkgnY0gmlwhCztZu2Hb3BzdGFja4P8AQCJc2VjcDI1NmsxoQM2KM0mkdH97Ze8AqwxLeqc934PKj8-xoKsyP6mAptWwIN0Y3CCdl2DdWRwgnZd,enr:-J24QGD1J-g2EPY9b7XiuwLhIoGocVp2qx2gWSfDI_CdftiPSHlgi7G6LtzkQlDskuSvRj4OXTg3vXLISubphXNNhqyGAY5Sw8GxgmlkgnY0gmlwhCzW_iGHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQPvMYlJHJUsEyciuJCTkKHLE2ogZ6cs2xuPI28CGq0CTIN0Y3CCdl2DdWRwgnZd,enr:-J24QCA5I3xroUXt7Ge_Kf04VCRBnI-GbZeyBxOkkpIDGGLrVsonrbngQG1hAEnufRb1TgS6sNFCGtaZ2ZpRx7AgciGGAY5SxEy0gmlkgnY0gmlwhCLzRQyHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQOaHzrtPQWYcwAcFJWFrbGlbNUsBC0VEhCcH02RbgEIwIN0Y3CCdl2DdWRwgnZd
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=252
- --port=10282
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${FRAXTAL_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-fraxtal-mainnet-op-geth-pruned-pebble-path}:/data
- ./op/fraxtal/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.fraxtal-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/fraxtal-mainnet
- traefik.http.services.fraxtal-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/fraxtal-mainnet`) || Path(`/fraxtal-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path.rule=Path(`/fraxtal-mainnet`) || Path(`/fraxtal-mainnet/`)}
- traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path.middlewares=fraxtal-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
fraxtal-mainnet-node:
image: ${FRAXTAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${FRAXTAL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 15282:15282
- 15282:15282/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${FRAXTAL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=252
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://fraxtal-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enr:-J24QPGxmNmQ6Gsofjwnaaqt-RvC-2te44hHSU_wFGvCBpdnGnAuW0hKBCwzarXEmLN0TfwilwX3xS8xjEd9sQRqKXqGAY1ok0P3gmlkgnY0gmlwhDa-pcmHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQJA0echCE64KVt7m1lHfRF9_QgYxqIOSoPZ1UHcEArDu4N0Y3CCJAaDdWRwgiQG,enr:-J24QHPYu7uUXH4LCJ_pjHMD3fYhluZEgFRlewqOFFcja7ACaTDp4zG4GZBJdTPmLjsqskhTQa5ldKiVu4ypZYMzR_uGAY1ok_ABgmlkgnY0gmlwhCLvv1KHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQOEemNzZL5buGmwlN2naXLtz4nauCqBFeFxdmi4RL4rDIN0Y3CCJAaDdWRwgiQG,enr:-J24QBujtfGNIiE6GJrCgXEKJMs1F11wd4Y8Uvx7ZFn3Z1tyR0erNcpiW5EYIQEKQX0kL9PLJUDHWZFiaHWOTBvFg5aGAY1ok5p8gmlkgnY0gmlwhDbD-tqHb3BzdGFja4P8AQCJc2VjcDI1NmsxoQLunzKLYJLvy6cWWkLgSSdLlILgSohrV8RT3tlKGwHBi4N0Y3CCJAaDdWRwgiQG
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15282
- KONA_NODE_P2P_LISTEN_UDP_PORT=15282
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
fraxtal-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/fraxtal/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.fraxtal-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/fraxtal-mainnet/node
- traefik.http.services.fraxtal-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/fraxtal-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/fraxtal-mainnet/node`)}
- traefik.http.routers.fraxtal-mainnet-op-geth-pruned-pebble-path-node.middlewares=fraxtal-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
fraxtal-mainnet-op-geth-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: fraxtal
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
...

View File

@@ -0,0 +1,202 @@
---
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:op/geth/fraxtal-testnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/fraxtal-testnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
fraxtal-testnet-archive:
image: ${FRAXTAL_GETH_IMAGE:-ghcr.io/fraxfinance/fraxtal-op-geth}:${FRAXTAL_TESTNET_GETH_VERSION:-v1.101702.1-frax-1.3.0}
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
- 6060
- 8551
environment:
- GETH_BOOTNODES=enr:-KO4QFOGWnVckCqXKTpKAPU_AZJmIbRjz8PTwPjkLgKJ9H_1bQT3fx57hU5OWeBqoLJ4Wa_VfA4paKQ_O-l7CJxj8ECGAZoNhOM7g2V0aMfGhGTaoWCAgmlkgnY0gmlwhCigGzaJc2VjcDI1NmsxoQJHFjvlp9CAbQ-YbO-QglEnykeVDLW8chF72qYUhax0T4RzbmFwwIN0Y3CCdmKDdWRwgnZi,enr:-KO4QCRQ8XyyqzjjYV2NcGWNc6R-kaMhp8KyYw-8mxoGbHsvUbBCO2H8f7PjtDE_ce85nSfcnVgHzfiqhpLvl5aSONWGAZoNdAX-g2V0aMfGhGTaoWCAgmlkgnY0gmlwhA_MbmOJc2VjcDI1NmsxoQO0Z6xvk6FhoaOAiEfRYHfjD5iBD-l0DFSn61-Y2Rf6VYRzbmFwwIN0Y3CCdmKDdWRwgnZi
- GETH_OVERRIDE_CANYON=0
- GETH_OVERRIDE_ECOTONE=0
- GETH_OVERRIDE_FJORD=0
- GETH_OVERRIDE_GRANITE=0
- GETH_OVERRIDE_HOLOCENE=0
- GETH_OVERRIDE_ISTHMUS=0
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.testnet.frax.com
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=2523
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${FRAXTAL_TESTNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-fraxtal-testnet-op-geth-archive-leveldb-hash}:/data
- ./op/fraxtal/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.fraxtal-testnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/fraxtal-testnet-archive
- traefik.http.services.fraxtal-testnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/fraxtal-testnet-archive`) || Path(`/fraxtal-testnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash.rule=Path(`/fraxtal-testnet-archive`) || Path(`/fraxtal-testnet-archive/`)}
- traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash.middlewares=fraxtal-testnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
fraxtal-testnet-archive-node:
image: ${FRAXTAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${FRAXTAL_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 15294:15294
- 15294:15294/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_HOODI_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${FRAXTAL_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_HOODI_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_HOODI_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=2523
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://fraxtal-testnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enr:-J24QMswfOBuPJnTjWPN7p-jZDXlB0VIYznPmpbmdkYM6rWKXc9nP34X5iMECUJmO-r-ebFdB0lKKyCtwMx1K2iOWb6GAYv0JJTPgmlkgnY0gmlwhDaUK8yHb3BzdGFja4PaEwCJc2VjcDI1NmsxoQJ-3NmhyfH63mVHv81ZlfG95tW6RwHPh_4S5To1eqbJhYN0Y3CCJAaDdWRwgiQG,enr:-J24QAsDW6Q83Cxb_qZaKtjm4jkhYWX7S3zDOoore9_1gjgge-POCzksofNo-27mbnthX7T9m4y7tr6t5Limw52TVVqGAYv0JGdPgmlkgnY0gmlwhDavnMmHb3BzdGFja4PaEwCJc2VjcDI1NmsxoQM1128eBAblNUFycltYl2B6mvhDWuFs1ZInCkByriIWY4N0Y3CCJAaDdWRwgiQG,enr:-J24QNkAGsc3ptRO1I23guIZh6kPZfLRlkWRX5U--Fk3X27fdSnq3giOAOTsRFNDgUeuNy5wrpKBWR_5TueJTMRmg4eGAYv0JIFbgmlkgnY0gmlwhDbZXGmHb3BzdGFja4PaEwCJc2VjcDI1NmsxoQO8_h2GFnyeoW1GoxgGYtg_0qIXgO5IFdEsvXaCBh6RcIN0Y3CCJAaDdWRwgiQGenr:-J24QLWXBXHni0E8pqwsAxCpqq-W1-J9MIABLFpG3WQmNF_SGsHBLbxQXojGIFFMq904Hy9Q9uU9BDRwgm-6hmx50FOGAZoNhRvjgmlkgnY0gmlwhCigGzaHb3BzdGFja4PbEwCJc2VjcDI1NmsxoQJlIOBp-Tsu0KwuFBG8Nd_YyjvqgHJbrxqGHKfdLvQG4IN0Y3CCeMuDdWRwgnjL,enr:-J24QKkRJDmCMshdvGbg37TBi5kgVV5iHI-_o-M9aGfaSrMJHUUop6XXhSGZz-E_bBb_cUMsMClt2VWesE_I0u6zI2mGAZoNdD-IgmlkgnY0gmlwhA_MbmOHb3BzdGFja4PbEwCJc2VjcDI1NmsxoQJR7V9CwGDb4Xd7r9qu_nOluNy9HGI7E2WMQ6e60G6P8oN0Y3CCeMuDdWRwgnjL
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15294
- KONA_NODE_P2P_LISTEN_UDP_PORT=15294
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
fraxtal-testnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/fraxtal/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.fraxtal-testnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/fraxtal-testnet-archive/node
- traefik.http.services.fraxtal-testnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/fraxtal-testnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/fraxtal-testnet-archive/node`)}
- traefik.http.routers.fraxtal-testnet-op-geth-archive-leveldb-hash-node.middlewares=fraxtal-testnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
fraxtal-testnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: fraxtal-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
...

View File

@@ -0,0 +1,204 @@
---
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:op/geth/fraxtal-testnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/fraxtal-testnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
fraxtal-testnet:
image: ${FRAXTAL_GETH_IMAGE:-ghcr.io/fraxfinance/fraxtal-op-geth}:${FRAXTAL_TESTNET_GETH_VERSION:-v1.101702.1-frax-1.3.0}
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
- 6060
- 8551
environment:
- GETH_BOOTNODES=enr:-KO4QFOGWnVckCqXKTpKAPU_AZJmIbRjz8PTwPjkLgKJ9H_1bQT3fx57hU5OWeBqoLJ4Wa_VfA4paKQ_O-l7CJxj8ECGAZoNhOM7g2V0aMfGhGTaoWCAgmlkgnY0gmlwhCigGzaJc2VjcDI1NmsxoQJHFjvlp9CAbQ-YbO-QglEnykeVDLW8chF72qYUhax0T4RzbmFwwIN0Y3CCdmKDdWRwgnZi,enr:-KO4QCRQ8XyyqzjjYV2NcGWNc6R-kaMhp8KyYw-8mxoGbHsvUbBCO2H8f7PjtDE_ce85nSfcnVgHzfiqhpLvl5aSONWGAZoNdAX-g2V0aMfGhGTaoWCAgmlkgnY0gmlwhA_MbmOJc2VjcDI1NmsxoQO0Z6xvk6FhoaOAiEfRYHfjD5iBD-l0DFSn61-Y2Rf6VYRzbmFwwIN0Y3CCdmKDdWRwgnZi
- GETH_OVERRIDE_CANYON=0
- GETH_OVERRIDE_ECOTONE=0
- GETH_OVERRIDE_FJORD=0
- GETH_OVERRIDE_GRANITE=0
- GETH_OVERRIDE_HOLOCENE=0
- GETH_OVERRIDE_ISTHMUS=0
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.testnet.frax.com
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=2523
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${FRAXTAL_TESTNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-fraxtal-testnet-op-geth-pruned-pebble-path}:/data
- ./op/fraxtal/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.fraxtal-testnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/fraxtal-testnet
- traefik.http.services.fraxtal-testnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/fraxtal-testnet`) || Path(`/fraxtal-testnet/`))}
- ${NO_SSL:+traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path.rule=Path(`/fraxtal-testnet`) || Path(`/fraxtal-testnet/`)}
- traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path.middlewares=fraxtal-testnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
fraxtal-testnet-node:
image: ${FRAXTAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${FRAXTAL_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 16370:16370
- 16370:16370/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_HOODI_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${FRAXTAL_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_HOODI_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_HOODI_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=2523
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://fraxtal-testnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enr:-J24QMswfOBuPJnTjWPN7p-jZDXlB0VIYznPmpbmdkYM6rWKXc9nP34X5iMECUJmO-r-ebFdB0lKKyCtwMx1K2iOWb6GAYv0JJTPgmlkgnY0gmlwhDaUK8yHb3BzdGFja4PaEwCJc2VjcDI1NmsxoQJ-3NmhyfH63mVHv81ZlfG95tW6RwHPh_4S5To1eqbJhYN0Y3CCJAaDdWRwgiQG,enr:-J24QAsDW6Q83Cxb_qZaKtjm4jkhYWX7S3zDOoore9_1gjgge-POCzksofNo-27mbnthX7T9m4y7tr6t5Limw52TVVqGAYv0JGdPgmlkgnY0gmlwhDavnMmHb3BzdGFja4PaEwCJc2VjcDI1NmsxoQM1128eBAblNUFycltYl2B6mvhDWuFs1ZInCkByriIWY4N0Y3CCJAaDdWRwgiQG,enr:-J24QNkAGsc3ptRO1I23guIZh6kPZfLRlkWRX5U--Fk3X27fdSnq3giOAOTsRFNDgUeuNy5wrpKBWR_5TueJTMRmg4eGAYv0JIFbgmlkgnY0gmlwhDbZXGmHb3BzdGFja4PaEwCJc2VjcDI1NmsxoQO8_h2GFnyeoW1GoxgGYtg_0qIXgO5IFdEsvXaCBh6RcIN0Y3CCJAaDdWRwgiQGenr:-J24QLWXBXHni0E8pqwsAxCpqq-W1-J9MIABLFpG3WQmNF_SGsHBLbxQXojGIFFMq904Hy9Q9uU9BDRwgm-6hmx50FOGAZoNhRvjgmlkgnY0gmlwhCigGzaHb3BzdGFja4PbEwCJc2VjcDI1NmsxoQJlIOBp-Tsu0KwuFBG8Nd_YyjvqgHJbrxqGHKfdLvQG4IN0Y3CCeMuDdWRwgnjL,enr:-J24QKkRJDmCMshdvGbg37TBi5kgVV5iHI-_o-M9aGfaSrMJHUUop6XXhSGZz-E_bBb_cUMsMClt2VWesE_I0u6zI2mGAZoNdD-IgmlkgnY0gmlwhA_MbmOHb3BzdGFja4PbEwCJc2VjcDI1NmsxoQJR7V9CwGDb4Xd7r9qu_nOluNy9HGI7E2WMQ6e60G6P8oN0Y3CCeMuDdWRwgnjL
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16370
- KONA_NODE_P2P_LISTEN_UDP_PORT=16370
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
fraxtal-testnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/fraxtal/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.fraxtal-testnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/fraxtal-testnet/node
- traefik.http.services.fraxtal-testnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/fraxtal-testnet/node`)}
- ${NO_SSL:+traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/fraxtal-testnet/node`)}
- traefik.http.routers.fraxtal-testnet-op-geth-pruned-pebble-path-node.middlewares=fraxtal-testnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
fraxtal-testnet-op-geth-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: fraxtal-testnet
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
...

View File

@@ -0,0 +1,222 @@
---
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:op/geth/hashkeychain-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/hashkeychain-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
hashkeychain-mainnet-archive-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || curl -fsSL -o /config/genesis.json "https://hashkeychain.s3.ap-southeast-1.amazonaws.com/mainnet/genesis.json"
restart: no
networks:
- chains
volumes:
- ${HASHKEYCHAIN_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_CONFIG:-hashkeychain-mainnet-op-geth-archive-leveldb-hash_config}:/config
logging: *logging-defaults
hashkeychain-mainnet-archive:
image: ${HASHKEYCHAIN_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${HASHKEYCHAIN_MAINNET_GETH_VERSION:-v1.101702.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:
- 14113:14113
- 14113:14113/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_BOOTNODES=enode://5ecd6d2054a58fa00729b73396044a35e6aceeafe58373d2f26b3f50a3934175fb56f8efa538381430889771613beaabf1177805910bbd34e4b4840320914690@mainnet-bootnodes.hsk.xyz:30615,enode://bd244da2a066e15f82d4bfb7f2732c5b5bac44cefb36cefef01a4c0e87e72b42004d012c9a294b8402ebf67491777f280ffbcc93a71157921d6d358b19ddac67@mainnet-bootnodes.hsk.xyz:30616,enode://a5bba6459ac3a075a4a8941478a4ef8d167460191c89632004b17e4b2d7beea52cdc1a2d376f35e996ad44ccac8db25f900700aad6991d015bdc4db072832063@mainnet-bootnodes.hsk.xyz:30617
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet.hsk.xyz
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --bootnodes=enode://5ecd6d2054a58fa00729b73396044a35e6aceeafe58373d2f26b3f50a3934175fb56f8efa538381430889771613beaabf1177805910bbd34e4b4840320914690@mainnet-bootnodes.hsk.xyz:30615,enode://bd244da2a066e15f82d4bfb7f2732c5b5bac44cefb36cefef01a4c0e87e72b42004d012c9a294b8402ebf67491777f280ffbcc93a71157921d6d358b19ddac67@mainnet-bootnodes.hsk.xyz:30616,enode://a5bba6459ac3a075a4a8941478a4ef8d167460191c89632004b17e4b2d7beea52cdc1a2d376f35e996ad44ccac8db25f900700aad6991d015bdc4db072832063@mainnet-bootnodes.hsk.xyz:30617
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=177
- --port=14113
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
hashkeychain-mainnet-archive-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${HASHKEYCHAIN_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_CONFIG:-hashkeychain-mainnet-op-geth-archive-leveldb-hash_config}:/config
- ${HASHKEYCHAIN_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-hashkeychain-mainnet-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/hashkeychain-mainnet-archive
- traefik.http.services.hashkeychain-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/hashkeychain-mainnet-archive`) || Path(`/hashkeychain-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/hashkeychain-mainnet-archive`) || Path(`/hashkeychain-mainnet-archive/`)}
- traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash.middlewares=hashkeychain-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
hashkeychain-mainnet-archive-node:
image: ${HASHKEYCHAIN_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${HASHKEYCHAIN_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 19113:19113
- 19113:19113/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${HASHKEYCHAIN_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=177
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://hashkeychain-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19113
- KONA_NODE_P2P_LISTEN_UDP_PORT=19113
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
hashkeychain-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/hashkeychain-mainnet-archive/node
- traefik.http.services.hashkeychain-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/hashkeychain-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/hashkeychain-mainnet-archive/node`)}
- traefik.http.routers.hashkeychain-mainnet-op-geth-archive-leveldb-hash-node.middlewares=hashkeychain-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
hashkeychain-mainnet-op-geth-archive-leveldb-hash:
hashkeychain-mainnet-op-geth-archive-leveldb-hash_config:
x-ephemeral-volumes:
- hashkeychain-mainnet-op-geth-archive-leveldb-hash_config
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: hashkey
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
...

View File

@@ -0,0 +1,224 @@
---
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:op/geth/hashkeychain-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/hashkeychain-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
hashkeychain-mainnet-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || curl -fsSL -o /config/genesis.json "https://hashkeychain.s3.ap-southeast-1.amazonaws.com/mainnet/genesis.json"
restart: no
networks:
- chains
volumes:
- ${HASHKEYCHAIN_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_CONFIG:-hashkeychain-mainnet-op-geth-pruned-pebble-path_config}:/config
logging: *logging-defaults
hashkeychain-mainnet:
image: ${HASHKEYCHAIN_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${HASHKEYCHAIN_MAINNET_GETH_VERSION:-v1.101702.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:
- 12188:12188
- 12188:12188/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_BOOTNODES=enode://5ecd6d2054a58fa00729b73396044a35e6aceeafe58373d2f26b3f50a3934175fb56f8efa538381430889771613beaabf1177805910bbd34e4b4840320914690@mainnet-bootnodes.hsk.xyz:30615,enode://bd244da2a066e15f82d4bfb7f2732c5b5bac44cefb36cefef01a4c0e87e72b42004d012c9a294b8402ebf67491777f280ffbcc93a71157921d6d358b19ddac67@mainnet-bootnodes.hsk.xyz:30616,enode://a5bba6459ac3a075a4a8941478a4ef8d167460191c89632004b17e4b2d7beea52cdc1a2d376f35e996ad44ccac8db25f900700aad6991d015bdc4db072832063@mainnet-bootnodes.hsk.xyz:30617
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet.hsk.xyz
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --bootnodes=enode://5ecd6d2054a58fa00729b73396044a35e6aceeafe58373d2f26b3f50a3934175fb56f8efa538381430889771613beaabf1177805910bbd34e4b4840320914690@mainnet-bootnodes.hsk.xyz:30615,enode://bd244da2a066e15f82d4bfb7f2732c5b5bac44cefb36cefef01a4c0e87e72b42004d012c9a294b8402ebf67491777f280ffbcc93a71157921d6d358b19ddac67@mainnet-bootnodes.hsk.xyz:30616,enode://a5bba6459ac3a075a4a8941478a4ef8d167460191c89632004b17e4b2d7beea52cdc1a2d376f35e996ad44ccac8db25f900700aad6991d015bdc4db072832063@mainnet-bootnodes.hsk.xyz:30617
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=177
- --port=12188
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
hashkeychain-mainnet-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${HASHKEYCHAIN_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_CONFIG:-hashkeychain-mainnet-op-geth-pruned-pebble-path_config}:/config
- ${HASHKEYCHAIN_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-hashkeychain-mainnet-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/hashkeychain-mainnet
- traefik.http.services.hashkeychain-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/hashkeychain-mainnet`) || Path(`/hashkeychain-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path.rule=Path(`/hashkeychain-mainnet`) || Path(`/hashkeychain-mainnet/`)}
- traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path.middlewares=hashkeychain-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
hashkeychain-mainnet-node:
image: ${HASHKEYCHAIN_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${HASHKEYCHAIN_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17188:17188
- 17188:17188/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${HASHKEYCHAIN_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=177
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://hashkeychain-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17188
- KONA_NODE_P2P_LISTEN_UDP_PORT=17188
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
hashkeychain-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/hashkeychain-mainnet/node
- traefik.http.services.hashkeychain-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/hashkeychain-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/hashkeychain-mainnet/node`)}
- traefik.http.routers.hashkeychain-mainnet-op-geth-pruned-pebble-path-node.middlewares=hashkeychain-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
hashkeychain-mainnet-op-geth-pruned-pebble-path:
hashkeychain-mainnet-op-geth-pruned-pebble-path_config:
x-ephemeral-volumes:
- hashkeychain-mainnet-op-geth-pruned-pebble-path_config
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: hashkey
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
...

View File

@@ -0,0 +1,220 @@
---
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:op/geth/hashkeychain-testnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/hashkeychain-testnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
hashkeychain-testnet-archive-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || curl -fsSL -o /config/genesis.json "https://hashkeychain.s3.ap-southeast-1.amazonaws.com/testnet/genesis.json"
restart: no
networks:
- chains
volumes:
- ./op/hashkeychain/testnet:/config
logging: *logging-defaults
hashkeychain-testnet-archive:
image: ${HASHKEYCHAIN_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${HASHKEYCHAIN_TESTNET_GETH_VERSION:-v1.101702.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:
- 10789:10789
- 10789:10789/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_BOOTNODES=enode://0492e74fb10579a3c53a327ee42dc70db35e7e0aebd73793a806afccb86b30acecb8fe9d024e06bb3fd154c678926d884df3ae696c71adcbf1339a5762e19c4d@testnet-bootnodes.hsk.xyz:30303,enode://dba82c6b384844a00a54ecdfcb34c209ea714072558db80512d4c65e760846d054cf3f58a826cba33b6b410498559b7e41b147dfa487f8cba3d25d2b5bb9e7bc@testnet-bootnodes.hsk.xyz:30304
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://testnet.hsk.xyz
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --bootnodes=enode://0492e74fb10579a3c53a327ee42dc70db35e7e0aebd73793a806afccb86b30acecb8fe9d024e06bb3fd154c678926d884df3ae696c71adcbf1339a5762e19c4d@testnet-bootnodes.hsk.xyz:30303,enode://dba82c6b384844a00a54ecdfcb34c209ea714072558db80512d4c65e760846d054cf3f58a826cba33b6b410498559b7e41b147dfa487f8cba3d25d2b5bb9e7bc@testnet-bootnodes.hsk.xyz:30304
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=133
- --port=10789
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
hashkeychain-testnet-archive-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${HASHKEYCHAIN_TESTNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-hashkeychain-testnet-op-geth-archive-leveldb-hash}:/data
- ./op/hashkeychain/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-testnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/hashkeychain-testnet-archive
- traefik.http.services.hashkeychain-testnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/hashkeychain-testnet-archive`) || Path(`/hashkeychain-testnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash.rule=Path(`/hashkeychain-testnet-archive`) || Path(`/hashkeychain-testnet-archive/`)}
- traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash.middlewares=hashkeychain-testnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
hashkeychain-testnet-archive-node:
image: ${HASHKEYCHAIN_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${HASHKEYCHAIN_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 15789:15789
- 15789:15789/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${HASHKEYCHAIN_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=133
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://hashkeychain-testnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15789
- KONA_NODE_P2P_LISTEN_UDP_PORT=15789
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
hashkeychain-testnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/hashkeychain/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-testnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/hashkeychain-testnet-archive/node
- traefik.http.services.hashkeychain-testnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/hashkeychain-testnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/hashkeychain-testnet-archive/node`)}
- traefik.http.routers.hashkeychain-testnet-op-geth-archive-leveldb-hash-node.middlewares=hashkeychain-testnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
hashkeychain-testnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: hashkey-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
...

View File

@@ -0,0 +1,220 @@
---
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:op/geth/hashkeychain-testnet-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/hashkeychain-testnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
hashkeychain-testnet-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || curl -fsSL -o /config/genesis.json "https://hashkeychain.s3.ap-southeast-1.amazonaws.com/testnet/genesis.json"
restart: no
networks:
- chains
volumes:
- ./op/hashkeychain/testnet:/config
logging: *logging-defaults
hashkeychain-testnet:
image: ${HASHKEYCHAIN_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${HASHKEYCHAIN_TESTNET_GETH_VERSION:-v1.101702.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:
- 12091:12091
- 12091:12091/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_BOOTNODES=enode://0492e74fb10579a3c53a327ee42dc70db35e7e0aebd73793a806afccb86b30acecb8fe9d024e06bb3fd154c678926d884df3ae696c71adcbf1339a5762e19c4d@testnet-bootnodes.hsk.xyz:30303,enode://dba82c6b384844a00a54ecdfcb34c209ea714072558db80512d4c65e760846d054cf3f58a826cba33b6b410498559b7e41b147dfa487f8cba3d25d2b5bb9e7bc@testnet-bootnodes.hsk.xyz:30304
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://testnet.hsk.xyz
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --bootnodes=enode://0492e74fb10579a3c53a327ee42dc70db35e7e0aebd73793a806afccb86b30acecb8fe9d024e06bb3fd154c678926d884df3ae696c71adcbf1339a5762e19c4d@testnet-bootnodes.hsk.xyz:30303,enode://dba82c6b384844a00a54ecdfcb34c209ea714072558db80512d4c65e760846d054cf3f58a826cba33b6b410498559b7e41b147dfa487f8cba3d25d2b5bb9e7bc@testnet-bootnodes.hsk.xyz:30304
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=133
- --port=12091
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
hashkeychain-testnet-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${HASHKEYCHAIN_TESTNET_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-hashkeychain-testnet-op-geth-pruned-pebble-hash}:/data
- ./op/hashkeychain/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-testnet-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/hashkeychain-testnet
- traefik.http.services.hashkeychain-testnet-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/hashkeychain-testnet`) || Path(`/hashkeychain-testnet/`))}
- ${NO_SSL:+traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash.rule=Path(`/hashkeychain-testnet`) || Path(`/hashkeychain-testnet/`)}
- traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash.middlewares=hashkeychain-testnet-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
hashkeychain-testnet-node:
image: ${HASHKEYCHAIN_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${HASHKEYCHAIN_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 17091:17091
- 17091:17091/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${HASHKEYCHAIN_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=133
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://hashkeychain-testnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17091
- KONA_NODE_P2P_LISTEN_UDP_PORT=17091
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
hashkeychain-testnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/hashkeychain/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-testnet-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/hashkeychain-testnet/node
- traefik.http.services.hashkeychain-testnet-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/hashkeychain-testnet/node`)}
- ${NO_SSL:+traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/hashkeychain-testnet/node`)}
- traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-hash-node.middlewares=hashkeychain-testnet-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
hashkeychain-testnet-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: hashkey-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
...

View File

@@ -0,0 +1,222 @@
---
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:op/geth/hashkeychain-testnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/hashkeychain-testnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
hashkeychain-testnet-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || curl -fsSL -o /config/genesis.json "https://hashkeychain.s3.ap-southeast-1.amazonaws.com/testnet/genesis.json"
restart: no
networks:
- chains
volumes:
- ./op/hashkeychain/testnet:/config
logging: *logging-defaults
hashkeychain-testnet:
image: ${HASHKEYCHAIN_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${HASHKEYCHAIN_TESTNET_GETH_VERSION:-v1.101702.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:
- 11009:11009
- 11009:11009/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_BOOTNODES=enode://0492e74fb10579a3c53a327ee42dc70db35e7e0aebd73793a806afccb86b30acecb8fe9d024e06bb3fd154c678926d884df3ae696c71adcbf1339a5762e19c4d@testnet-bootnodes.hsk.xyz:30303,enode://dba82c6b384844a00a54ecdfcb34c209ea714072558db80512d4c65e760846d054cf3f58a826cba33b6b410498559b7e41b147dfa487f8cba3d25d2b5bb9e7bc@testnet-bootnodes.hsk.xyz:30304
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://testnet.hsk.xyz
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --bootnodes=enode://0492e74fb10579a3c53a327ee42dc70db35e7e0aebd73793a806afccb86b30acecb8fe9d024e06bb3fd154c678926d884df3ae696c71adcbf1339a5762e19c4d@testnet-bootnodes.hsk.xyz:30303,enode://dba82c6b384844a00a54ecdfcb34c209ea714072558db80512d4c65e760846d054cf3f58a826cba33b6b410498559b7e41b147dfa487f8cba3d25d2b5bb9e7bc@testnet-bootnodes.hsk.xyz:30304
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=133
- --port=11009
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
hashkeychain-testnet-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${HASHKEYCHAIN_TESTNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-hashkeychain-testnet-op-geth-pruned-pebble-path}:/data
- ./op/hashkeychain/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-testnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/hashkeychain-testnet
- traefik.http.services.hashkeychain-testnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/hashkeychain-testnet`) || Path(`/hashkeychain-testnet/`))}
- ${NO_SSL:+traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path.rule=Path(`/hashkeychain-testnet`) || Path(`/hashkeychain-testnet/`)}
- traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path.middlewares=hashkeychain-testnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
hashkeychain-testnet-node:
image: ${HASHKEYCHAIN_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${HASHKEYCHAIN_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 16009:16009
- 16009:16009/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${HASHKEYCHAIN_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=133
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://hashkeychain-testnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16009
- KONA_NODE_P2P_LISTEN_UDP_PORT=16009
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
hashkeychain-testnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/hashkeychain/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-testnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/hashkeychain-testnet/node
- traefik.http.services.hashkeychain-testnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/hashkeychain-testnet/node`)}
- ${NO_SSL:+traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/hashkeychain-testnet/node`)}
- traefik.http.routers.hashkeychain-testnet-op-geth-pruned-pebble-path-node.middlewares=hashkeychain-testnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
hashkeychain-testnet-op-geth-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: hashkey-testnet
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/manta-pacific-mainnet-op-geth-archive-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/manta-pacific-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
manta-pacific-mainnet-archive:
image: ${MANTA_PACIFIC_GETH_IMAGE:-public.ecr.aws/i6b2w2n6/op-geth}:${MANTA_PACIFIC_MAINNET_GETH_VERSION:-5.2.0}
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:
- 11437:11437
- 11437:11437/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://manta-pacific.calderachain.xyz/http
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=169
- --port=11437
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=web3,net,eth,debug,admin
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=web3,net,eth,debug,admin
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MANTA_PACIFIC_MAINNET_OP_GETH_ARCHIVE_PEBBLE_HASH_DATA:-manta-pacific-mainnet-op-geth-archive-pebble-hash}:/data
- ./op/manta-pacific/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.manta-pacific-mainnet-op-geth-archive-pebble-hash-stripprefix.stripprefix.prefixes=/manta-pacific-mainnet-archive
- traefik.http.services.manta-pacific-mainnet-op-geth-archive-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/manta-pacific-mainnet-archive`) || Path(`/manta-pacific-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash.rule=Path(`/manta-pacific-mainnet-archive`) || Path(`/manta-pacific-mainnet-archive/`)}
- traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash.middlewares=manta-pacific-mainnet-op-geth-archive-pebble-hash-stripprefix, ipallowlist
manta-pacific-mainnet-archive-node:
image: ${MANTA_PACIFIC_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MANTA_PACIFIC_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16437:16437
- 16437:16437/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MANTA_PACIFIC_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=169
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://manta-pacific-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16437
- KONA_NODE_P2P_LISTEN_UDP_PORT=16437
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
manta-pacific-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/manta-pacific/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.manta-pacific-mainnet-op-geth-archive-pebble-hash-node-stripprefix.stripprefix.prefixes=/manta-pacific-mainnet-archive/node
- traefik.http.services.manta-pacific-mainnet-op-geth-archive-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/manta-pacific-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash-node.rule=PathPrefix(`/manta-pacific-mainnet-archive/node`)}
- traefik.http.routers.manta-pacific-mainnet-op-geth-archive-pebble-hash-node.middlewares=manta-pacific-mainnet-op-geth-archive-pebble-hash-node-stripprefix, ipallowlist
volumes:
manta-pacific-mainnet-op-geth-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: manta-pacific
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
...

View File

@@ -0,0 +1,196 @@
---
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:op/geth/metal-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/metal-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
metal-mainnet-archive:
image: ${METAL_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${METAL_MAINNET_GETH_VERSION:-v1.101702.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:
- 10324:10324
- 10324:10324/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=metal-mainnet
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.metall2.com
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=10324
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${METAL_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-metal-mainnet-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.metal-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/metal-mainnet-archive
- traefik.http.services.metal-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/metal-mainnet-archive`) || Path(`/metal-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/metal-mainnet-archive`) || Path(`/metal-mainnet-archive/`)}
- traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash.middlewares=metal-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
metal-mainnet-archive-node:
image: ${METAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${METAL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 15324:15324
- 15324:15324/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${METAL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1750
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://metal-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15324
- KONA_NODE_P2P_LISTEN_UDP_PORT=15324
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
metal-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.metal-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/metal-mainnet-archive/node
- traefik.http.services.metal-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/metal-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/metal-mainnet-archive/node`)}
- traefik.http.routers.metal-mainnet-op-geth-archive-leveldb-hash-node.middlewares=metal-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
metal-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: metall2
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/metal-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/metal-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
metal-mainnet:
image: ${METAL_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${METAL_MAINNET_GETH_VERSION:-v1.101702.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:
- 12821:12821
- 12821:12821/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=metal-mainnet
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.metall2.com
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=12821
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${METAL_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-metal-mainnet-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.metal-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/metal-mainnet
- traefik.http.services.metal-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/metal-mainnet`) || Path(`/metal-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path.rule=Path(`/metal-mainnet`) || Path(`/metal-mainnet/`)}
- traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path.middlewares=metal-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
metal-mainnet-node:
image: ${METAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${METAL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17821:17821
- 17821:17821/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${METAL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1750
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://metal-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17821
- KONA_NODE_P2P_LISTEN_UDP_PORT=17821
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
metal-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.metal-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/metal-mainnet/node
- traefik.http.services.metal-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/metal-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/metal-mainnet/node`)}
- traefik.http.routers.metal-mainnet-op-geth-pruned-pebble-path-node.middlewares=metal-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
metal-mainnet-op-geth-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: metall2
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
...

View File

@@ -0,0 +1,193 @@
---
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:op/geth/metal-sepolia-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/metal-sepolia-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
metal-sepolia-archive:
image: ${METAL_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${METAL_SEPOLIA_GETH_VERSION:-v1.101702.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
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=metal-sepolia
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://testnet.rpc.metall2.com
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${METAL_SEPOLIA_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-metal-sepolia-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.metal-sepolia-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/metal-sepolia-archive
- traefik.http.services.metal-sepolia-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/metal-sepolia-archive`) || Path(`/metal-sepolia-archive/`))}
- ${NO_SSL:+traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash.rule=Path(`/metal-sepolia-archive`) || Path(`/metal-sepolia-archive/`)}
- traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash.middlewares=metal-sepolia-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
metal-sepolia-archive-node:
image: ${METAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${METAL_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 19770:19770
- 19770:19770/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${METAL_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1740
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://metal-sepolia-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19770
- KONA_NODE_P2P_LISTEN_UDP_PORT=19770
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
metal-sepolia-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.metal-sepolia-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/metal-sepolia-archive/node
- traefik.http.services.metal-sepolia-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/metal-sepolia-archive/node`)}
- ${NO_SSL:+traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/metal-sepolia-archive/node`)}
- traefik.http.routers.metal-sepolia-op-geth-archive-leveldb-hash-node.middlewares=metal-sepolia-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
metal-sepolia-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: metall2-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
...

View File

@@ -0,0 +1,195 @@
---
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:op/geth/metal-sepolia-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/metal-sepolia \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
metal-sepolia:
image: ${METAL_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${METAL_SEPOLIA_GETH_VERSION:-v1.101702.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
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=metal-sepolia
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://testnet.rpc.metall2.com
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${METAL_SEPOLIA_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-metal-sepolia-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.metal-sepolia-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/metal-sepolia
- traefik.http.services.metal-sepolia-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/metal-sepolia`) || Path(`/metal-sepolia/`))}
- ${NO_SSL:+traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path.rule=Path(`/metal-sepolia`) || Path(`/metal-sepolia/`)}
- traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path.middlewares=metal-sepolia-op-geth-pruned-pebble-path-stripprefix, ipallowlist
metal-sepolia-node:
image: ${METAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${METAL_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 19701:19701
- 19701:19701/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${METAL_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1740
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://metal-sepolia:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19701
- KONA_NODE_P2P_LISTEN_UDP_PORT=19701
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
metal-sepolia:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.metal-sepolia-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/metal-sepolia/node
- traefik.http.services.metal-sepolia-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/metal-sepolia/node`)}
- ${NO_SSL:+traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/metal-sepolia/node`)}
- traefik.http.routers.metal-sepolia-op-geth-pruned-pebble-path-node.middlewares=metal-sepolia-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
metal-sepolia-op-geth-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: metall2-testnet
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/mode-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/mode-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
mode-mainnet-archive:
image: ${MODE_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${MODE_MAINNET_GETH_VERSION:-v1.101702.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:
- 10430:10430
- 10430:10430/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet.mode.network
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=34443
- --port=10430
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MODE_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-mode-mainnet-op-geth-archive-leveldb-hash}:/data
- ./op/mode/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.mode-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/mode-mainnet-archive
- traefik.http.services.mode-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/mode-mainnet-archive`) || Path(`/mode-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/mode-mainnet-archive`) || Path(`/mode-mainnet-archive/`)}
- traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash.middlewares=mode-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
mode-mainnet-archive-node:
image: ${MODE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MODE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 15430:15430
- 15430:15430/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MODE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=34443
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://mode-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15430
- KONA_NODE_P2P_LISTEN_UDP_PORT=15430
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
mode-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/mode/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.mode-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/mode-mainnet-archive/node
- traefik.http.services.mode-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/mode-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/mode-mainnet-archive/node`)}
- traefik.http.routers.mode-mainnet-op-geth-archive-leveldb-hash-node.middlewares=mode-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
mode-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: mode
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/mode-mainnet-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/mode-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
mode-mainnet:
image: ${MODE_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${MODE_MAINNET_GETH_VERSION:-v1.101702.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:
- 11249:11249
- 11249:11249/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet.mode.network
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=34443
- --port=11249
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MODE_MAINNET_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-mode-mainnet-op-geth-pruned-pebble-hash}:/data
- ./op/mode/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.mode-mainnet-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/mode-mainnet
- traefik.http.services.mode-mainnet-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/mode-mainnet`) || Path(`/mode-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash.rule=Path(`/mode-mainnet`) || Path(`/mode-mainnet/`)}
- traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash.middlewares=mode-mainnet-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
mode-mainnet-node:
image: ${MODE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MODE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16249:16249
- 16249:16249/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MODE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=34443
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://mode-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16249
- KONA_NODE_P2P_LISTEN_UDP_PORT=16249
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
mode-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/mode/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.mode-mainnet-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/mode-mainnet/node
- traefik.http.services.mode-mainnet-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/mode-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/mode-mainnet/node`)}
- traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-hash-node.middlewares=mode-mainnet-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
mode-mainnet-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: mode
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
...

View File

@@ -0,0 +1,200 @@
---
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:op/geth/mode-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/mode-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
mode-mainnet:
image: ${MODE_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${MODE_MAINNET_GETH_VERSION:-v1.101702.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:
- 12054:12054
- 12054:12054/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet.mode.network
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=34443
- --port=12054
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MODE_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-mode-mainnet-op-geth-pruned-pebble-path}:/data
- ./op/mode/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.mode-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/mode-mainnet
- traefik.http.services.mode-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/mode-mainnet`) || Path(`/mode-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path.rule=Path(`/mode-mainnet`) || Path(`/mode-mainnet/`)}
- traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path.middlewares=mode-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
mode-mainnet-node:
image: ${MODE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MODE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17054:17054
- 17054:17054/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MODE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=34443
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://mode-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17054
- KONA_NODE_P2P_LISTEN_UDP_PORT=17054
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
mode-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/mode/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.mode-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/mode-mainnet/node
- traefik.http.services.mode-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/mode-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/mode-mainnet/node`)}
- traefik.http.routers.mode-mainnet-op-geth-pruned-pebble-path-node.middlewares=mode-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
mode-mainnet-op-geth-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: mode
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
...

View File

@@ -0,0 +1,197 @@
---
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:op/geth/mode-sepolia-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/mode-sepolia-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
mode-sepolia-archive:
image: ${MODE_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${MODE_SEPOLIA_GETH_VERSION:-v1.101702.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:
- 12835:12835
- 12835:12835/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=mode-sepolia
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia.mode.network
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=12835
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MODE_SEPOLIA_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-mode-sepolia-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.mode-sepolia-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/mode-sepolia-archive
- traefik.http.services.mode-sepolia-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/mode-sepolia-archive`) || Path(`/mode-sepolia-archive/`))}
- ${NO_SSL:+traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash.rule=Path(`/mode-sepolia-archive`) || Path(`/mode-sepolia-archive/`)}
- traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash.middlewares=mode-sepolia-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
mode-sepolia-archive-node:
image: ${MODE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MODE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 17835:17835
- 17835:17835/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MODE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=919
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://mode-sepolia-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17835
- KONA_NODE_P2P_LISTEN_UDP_PORT=17835
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
mode-sepolia-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.mode-sepolia-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/mode-sepolia-archive/node
- traefik.http.services.mode-sepolia-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/mode-sepolia-archive/node`)}
- ${NO_SSL:+traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/mode-sepolia-archive/node`)}
- traefik.http.routers.mode-sepolia-op-geth-archive-leveldb-hash-node.middlewares=mode-sepolia-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
mode-sepolia-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: mode-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
...

View File

@@ -0,0 +1,197 @@
---
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:op/geth/mode-sepolia-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/mode-sepolia \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
mode-sepolia:
image: ${MODE_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${MODE_SEPOLIA_GETH_VERSION:-v1.101702.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:
- 13454:13454
- 13454:13454/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=mode-sepolia
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia.mode.network
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=13454
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MODE_SEPOLIA_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-mode-sepolia-op-geth-pruned-pebble-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.mode-sepolia-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/mode-sepolia
- traefik.http.services.mode-sepolia-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/mode-sepolia`) || Path(`/mode-sepolia/`))}
- ${NO_SSL:+traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash.rule=Path(`/mode-sepolia`) || Path(`/mode-sepolia/`)}
- traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash.middlewares=mode-sepolia-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
mode-sepolia-node:
image: ${MODE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MODE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 18454:18454
- 18454:18454/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MODE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=919
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://mode-sepolia:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18454
- KONA_NODE_P2P_LISTEN_UDP_PORT=18454
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
mode-sepolia:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.mode-sepolia-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/mode-sepolia/node
- traefik.http.services.mode-sepolia-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/mode-sepolia/node`)}
- ${NO_SSL:+traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/mode-sepolia/node`)}
- traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-hash-node.middlewares=mode-sepolia-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
mode-sepolia-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: mode-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
...

View File

@@ -0,0 +1,199 @@
---
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:op/geth/mode-sepolia-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/mode-sepolia \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
mode-sepolia:
image: ${MODE_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${MODE_SEPOLIA_GETH_VERSION:-v1.101702.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:
- 13308:13308
- 13308:13308/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=mode-sepolia
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia.mode.network
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=13308
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${MODE_SEPOLIA_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-mode-sepolia-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.mode-sepolia-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/mode-sepolia
- traefik.http.services.mode-sepolia-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/mode-sepolia`) || Path(`/mode-sepolia/`))}
- ${NO_SSL:+traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path.rule=Path(`/mode-sepolia`) || Path(`/mode-sepolia/`)}
- traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path.middlewares=mode-sepolia-op-geth-pruned-pebble-path-stripprefix, ipallowlist
mode-sepolia-node:
image: ${MODE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${MODE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 18308:18308
- 18308:18308/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${MODE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=919
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://mode-sepolia:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18308
- KONA_NODE_P2P_LISTEN_UDP_PORT=18308
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
mode-sepolia:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.mode-sepolia-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/mode-sepolia/node
- traefik.http.services.mode-sepolia-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/mode-sepolia/node`)}
- ${NO_SSL:+traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/mode-sepolia/node`)}
- traefik.http.routers.mode-sepolia-op-geth-pruned-pebble-path-node.middlewares=mode-sepolia-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
mode-sepolia-op-geth-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: mode-testnet
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
...

View File

@@ -0,0 +1,203 @@
---
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:op/geth/superseed-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/superseed-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
superseed-mainnet:
image: ${SUPERSEED_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${SUPERSEED_MAINNET_GETH_VERSION:-v1.101702.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:
- 11876:11876
- 11876:11876/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OVERRIDE_GRANITE=1726185601
- GETH_OVERRIDE_HOLOCENE=1736445601
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://mainnet.superseed.xyz
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=5330
- --port=11876
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${SUPERSEED_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-superseed-mainnet-op-geth-pruned-pebble-path}:/data
- ./op/superseed/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.superseed-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/superseed-mainnet
- traefik.http.services.superseed-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/superseed-mainnet`) || Path(`/superseed-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path.rule=Path(`/superseed-mainnet`) || Path(`/superseed-mainnet/`)}
- traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path.middlewares=superseed-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
superseed-mainnet-node:
image: ${SUPERSEED_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${SUPERSEED_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16876:16876
- 16876:16876/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${SUPERSEED_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=5330
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://superseed-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enode://3e905f39a5c084367bbe172453cf6d81b28a49f57064b56b0eb76af75d6eafe3d578605f56c4353328194245453083e1c26e339497f732461d2187d0c4a4474e@35.203.166.40:9222?discport=30301,enode://d25ce99435982b04d60c4b41ba256b84b888626db7bee45a9419382300fbe907359ae5ef250346785bff8d3b9d07cd3e017a27e2ee3cfda3bcbb0ba762ac9674@bootnode.conduit.xyz:0?discport=30301,enode://2d4e7e9d48f4dd4efe9342706dd1b0024681bd4c3300d021f86fc75eab7865d4e0cbec6fbc883f011cfd6a57423e7e2f6e104baad2b744c3cafaec6bc7dc92c1@34.65.43.171:0?discport=30305,enode://9d7a3efefe442351217e73b3a593bcb8efffb55b4807699972145324eab5e6b382152f8d24f6301baebbfb5ecd4127bd3faab2842c04cd432bdf50ba092f6645@34.65.109.126:0?discport=30305
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16876
- KONA_NODE_P2P_LISTEN_UDP_PORT=16876
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
superseed-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/superseed/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.superseed-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/superseed-mainnet/node
- traefik.http.services.superseed-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/superseed-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/superseed-mainnet/node`)}
- traefik.http.routers.superseed-mainnet-op-geth-pruned-pebble-path-node.middlewares=superseed-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
superseed-mainnet-op-geth-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: superseed
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
...

View File

@@ -0,0 +1,201 @@
---
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:op/geth/superseed-sepolia-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/superseed-sepolia \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
superseed-sepolia:
image: ${SUPERSEED_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${SUPERSEED_SEPOLIA_GETH_VERSION:-v1.101702.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
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OVERRIDE_GRANITE=1732546800
- GETH_OVERRIDE_HOLOCENE=1732633200
- GETH_OVERRIDE_ISTHMUS=1744905600
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia.superseed.xyz
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=53302
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${SUPERSEED_SEPOLIA_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-superseed-sepolia-op-geth-pruned-pebble-path}:/data
- ./op/superseed/sepolia:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.superseed-sepolia-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/superseed-sepolia
- traefik.http.services.superseed-sepolia-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/superseed-sepolia`) || Path(`/superseed-sepolia/`))}
- ${NO_SSL:+traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path.rule=Path(`/superseed-sepolia`) || Path(`/superseed-sepolia/`)}
- traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path.middlewares=superseed-sepolia-op-geth-pruned-pebble-path-stripprefix, ipallowlist
superseed-sepolia-node:
image: ${SUPERSEED_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${SUPERSEED_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 17522:17522
- 17522:17522/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${SUPERSEED_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=53302
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://superseed-sepolia:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enode://c9fb471294f243ce4aa32f8987d743fed73fa109013996f169f81914efd2a76762f2f142bd6dcc147afe342c752a587e06ef2ea1418c99ff757986242e372f3d@34.105.58.183:9222?discport=30301,enode://d25ce99435982b04d60c4b41ba256b84b888626db7bee45a9419382300fbe907359ae5ef250346785bff8d3b9d07cd3e017a27e2ee3cfda3bcbb0ba762ac9674@bootnode.conduit.xyz:0?discport=30301,enode://2d4e7e9d48f4dd4efe9342706dd1b0024681bd4c3300d021f86fc75eab7865d4e0cbec6fbc883f011cfd6a57423e7e2f6e104baad2b744c3cafaec6bc7dc92c1@34.65.43.171:0?discport=30305,enode://9d7a3efefe442351217e73b3a593bcb8efffb55b4807699972145324eab5e6b382152f8d24f6301baebbfb5ecd4127bd3faab2842c04cd432bdf50ba092f6645@34.65.109.126:0?discport=30305
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17522
- KONA_NODE_P2P_LISTEN_UDP_PORT=17522
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
superseed-sepolia:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/superseed/sepolia:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.superseed-sepolia-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/superseed-sepolia/node
- traefik.http.services.superseed-sepolia-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/superseed-sepolia/node`)}
- ${NO_SSL:+traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/superseed-sepolia/node`)}
- traefik.http.routers.superseed-sepolia-op-geth-pruned-pebble-path-node.middlewares=superseed-sepolia-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
superseed-sepolia-op-geth-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: superseed-sepolia
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
...

View File

@@ -0,0 +1,196 @@
---
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:op/geth/swell-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/swell-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
swell-mainnet-archive:
image: ${SWELL_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${SWELL_MAINNET_GETH_VERSION:-v1.101702.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:
- 11863:11863
- 11863:11863/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=swell-mainnet
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://swell-mainnet.alt.technology
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=11863
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${SWELL_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-swell-mainnet-op-geth-archive-leveldb-hash}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.swell-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/swell-mainnet-archive
- traefik.http.services.swell-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/swell-mainnet-archive`) || Path(`/swell-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/swell-mainnet-archive`) || Path(`/swell-mainnet-archive/`)}
- traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash.middlewares=swell-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
swell-mainnet-archive-node:
image: ${SWELL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${SWELL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16863:16863
- 16863:16863/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${SWELL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1923
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://swell-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16863
- KONA_NODE_P2P_LISTEN_UDP_PORT=16863
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
swell-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.swell-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/swell-mainnet-archive/node
- traefik.http.services.swell-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/swell-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/swell-mainnet-archive/node`)}
- traefik.http.routers.swell-mainnet-op-geth-archive-leveldb-hash-node.middlewares=swell-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
swell-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: swell
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/swell-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/swell-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
swell-mainnet:
image: ${SWELL_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${SWELL_MAINNET_GETH_VERSION:-v1.101702.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:
- 11312:11312
- 11312:11312/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_OP_NETWORK=swell-mainnet
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://swell-mainnet.alt.technology
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --port=11312
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${SWELL_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-swell-mainnet-op-geth-pruned-pebble-path}:/data
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.swell-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/swell-mainnet
- traefik.http.services.swell-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/swell-mainnet`) || Path(`/swell-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path.rule=Path(`/swell-mainnet`) || Path(`/swell-mainnet/`)}
- traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path.middlewares=swell-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
swell-mainnet-node:
image: ${SWELL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${SWELL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16312:16312
- 16312:16312/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${SWELL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1923
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://swell-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16312
- KONA_NODE_P2P_LISTEN_UDP_PORT=16312
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
swell-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.swell-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/swell-mainnet/node
- traefik.http.services.swell-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/swell-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/swell-mainnet/node`)}
- traefik.http.routers.swell-mainnet-op-geth-pruned-pebble-path-node.middlewares=swell-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
swell-mainnet-op-geth-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: swell
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
...

View File

@@ -0,0 +1,219 @@
---
x-logging-defaults: &logging-defaults
driver: json-file
options:
max-size: "10m"
max-file: "3"
# You should use a snapshot for Xlayer
# if import of genesis fails the chainid will be 1 for ethereum mainnet
# 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:op/geth/xlayer-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/xlayer-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
xlayer-mainnet-archive-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || wget -qO- "https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz" | tar -xzf - -O --wildcards "*.json" > /config/genesis.json
restart: no
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
logging: *logging-defaults
xlayer-mainnet-archive:
image: ${XLAYER_GETH_IMAGE:-xlayer/op-geth}:${XLAYER_MAINNET_GETH_VERSION:-v0.1.5.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
expose:
- 8545
- 6060
- 8551
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.xlayer.tech
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --config=/config/geth.toml
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nodiscover
- --rollup.enabletxpooladmission
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
xlayer-mainnet-archive-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${XLAYER_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-xlayer-mainnet-op-geth-archive-leveldb-hash}:/data
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/xlayer-mainnet-archive
- traefik.http.services.xlayer-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/xlayer-mainnet-archive`) || Path(`/xlayer-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/xlayer-mainnet-archive`) || Path(`/xlayer-mainnet-archive/`)}
- traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash.middlewares=xlayer-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
xlayer-mainnet-archive-node:
image: ${XLAYER_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${XLAYER_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16947:16947
- 16947:16947/udp
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${XLAYER_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=196
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://xlayer-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enode://c67d7f63c5483ab8311123d2997bfe6a8aac2b117a40167cf71682f8a3e37d3b86547c786559355c4c05ae0b1a7e7a1b8fde55050b183f96728d62e276467ce1@8.210.177.150:9223,enode://28e3e305b266e01226a7cc979ab692b22507784095157453ee0e34607bb3beac9a5b00f3e3d7d3ac36164612ca25108e6b79f75e3a9ecb54a0b3e7eb3e097d37@8.210.15.172:9223,enode://b5aa43622aad25c619650a0b7f8bb030161dfbfd5664233f92d841a33b404cea3ffffdc5bc8d6667c7dc212242a52f0702825c1e51612047f75c847ab96ef7a6@8.210.69.97:9223
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16947
- KONA_NODE_P2P_LISTEN_UDP_PORT=16947
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
xlayer-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/xlayer-mainnet-archive/node
- traefik.http.services.xlayer-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/xlayer-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/xlayer-mainnet-archive/node`)}
- traefik.http.routers.xlayer-mainnet-op-geth-archive-leveldb-hash-node.middlewares=xlayer-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
xlayer-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: xlayer
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
...

View File

@@ -0,0 +1,219 @@
---
x-logging-defaults: &logging-defaults
driver: json-file
options:
max-size: "10m"
max-file: "3"
# You should use a snapshot for Xlayer
# if import of genesis fails the chainid will be 1 for ethereum mainnet
# 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:op/geth/xlayer-mainnet-op-geth-archive-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/xlayer-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
xlayer-mainnet-archive-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || wget -qO- "https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz" | tar -xzf - -O --wildcards "*.json" > /config/genesis.json
restart: no
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
logging: *logging-defaults
xlayer-mainnet-archive:
image: ${XLAYER_GETH_IMAGE:-xlayer/op-geth}:${XLAYER_MAINNET_GETH_VERSION:-v0.1.5.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
expose:
- 8545
- 6060
- 8551
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.xlayer.tech
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --config=/config/geth.toml
- --datadir=/data
- --db.engine=pebble
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nodiscover
- --rollup.enabletxpooladmission
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
xlayer-mainnet-archive-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${XLAYER_MAINNET_OP_GETH_ARCHIVE_PEBBLE_HASH_DATA:-xlayer-mainnet-op-geth-archive-pebble-hash}:/data
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-geth-archive-pebble-hash-stripprefix.stripprefix.prefixes=/xlayer-mainnet-archive
- traefik.http.services.xlayer-mainnet-op-geth-archive-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/xlayer-mainnet-archive`) || Path(`/xlayer-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash.rule=Path(`/xlayer-mainnet-archive`) || Path(`/xlayer-mainnet-archive/`)}
- traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash.middlewares=xlayer-mainnet-op-geth-archive-pebble-hash-stripprefix, ipallowlist
xlayer-mainnet-archive-node:
image: ${XLAYER_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${XLAYER_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17934:17934
- 17934:17934/udp
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${XLAYER_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=196
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://xlayer-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enode://c67d7f63c5483ab8311123d2997bfe6a8aac2b117a40167cf71682f8a3e37d3b86547c786559355c4c05ae0b1a7e7a1b8fde55050b183f96728d62e276467ce1@8.210.177.150:9223,enode://28e3e305b266e01226a7cc979ab692b22507784095157453ee0e34607bb3beac9a5b00f3e3d7d3ac36164612ca25108e6b79f75e3a9ecb54a0b3e7eb3e097d37@8.210.15.172:9223,enode://b5aa43622aad25c619650a0b7f8bb030161dfbfd5664233f92d841a33b404cea3ffffdc5bc8d6667c7dc212242a52f0702825c1e51612047f75c847ab96ef7a6@8.210.69.97:9223
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17934
- KONA_NODE_P2P_LISTEN_UDP_PORT=17934
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
xlayer-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-geth-archive-pebble-hash-node-stripprefix.stripprefix.prefixes=/xlayer-mainnet-archive/node
- traefik.http.services.xlayer-mainnet-op-geth-archive-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/xlayer-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash-node.rule=PathPrefix(`/xlayer-mainnet-archive/node`)}
- traefik.http.routers.xlayer-mainnet-op-geth-archive-pebble-hash-node.middlewares=xlayer-mainnet-op-geth-archive-pebble-hash-node-stripprefix, ipallowlist
volumes:
xlayer-mainnet-op-geth-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: xlayer
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
...

View File

@@ -0,0 +1,221 @@
---
x-logging-defaults: &logging-defaults
driver: json-file
options:
max-size: "10m"
max-file: "3"
# You should use a snapshot for Xlayer
# if import of genesis fails the chainid will be 1 for ethereum mainnet
# 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:op/geth/xlayer-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/xlayer-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
xlayer-mainnet-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || wget -qO- "https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz" | tar -xzf - -O --wildcards "*.json" > /config/genesis.json
restart: no
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
logging: *logging-defaults
xlayer-mainnet:
image: ${XLAYER_GETH_IMAGE:-xlayer/op-geth}:${XLAYER_MAINNET_GETH_VERSION:-v0.1.5.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
expose:
- 8545
- 6060
- 8551
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.xlayer.tech
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --config=/config/geth.toml
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nodiscover
- --rollup.enabletxpooladmission
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
depends_on:
xlayer-mainnet-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${XLAYER_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-xlayer-mainnet-op-geth-pruned-pebble-path}:/data
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/xlayer-mainnet
- traefik.http.services.xlayer-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/xlayer-mainnet`) || Path(`/xlayer-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path.rule=Path(`/xlayer-mainnet`) || Path(`/xlayer-mainnet/`)}
- traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path.middlewares=xlayer-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
xlayer-mainnet-node:
image: ${XLAYER_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${XLAYER_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 19389:19389
- 19389:19389/udp
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${XLAYER_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=196
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://xlayer-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enode://c67d7f63c5483ab8311123d2997bfe6a8aac2b117a40167cf71682f8a3e37d3b86547c786559355c4c05ae0b1a7e7a1b8fde55050b183f96728d62e276467ce1@8.210.177.150:9223,enode://28e3e305b266e01226a7cc979ab692b22507784095157453ee0e34607bb3beac9a5b00f3e3d7d3ac36164612ca25108e6b79f75e3a9ecb54a0b3e7eb3e097d37@8.210.15.172:9223,enode://b5aa43622aad25c619650a0b7f8bb030161dfbfd5664233f92d841a33b404cea3ffffdc5bc8d6667c7dc212242a52f0702825c1e51612047f75c847ab96ef7a6@8.210.69.97:9223
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19389
- KONA_NODE_P2P_LISTEN_UDP_PORT=19389
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
xlayer-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/xlayer-mainnet/node
- traefik.http.services.xlayer-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/xlayer-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/xlayer-mainnet/node`)}
- traefik.http.routers.xlayer-mainnet-op-geth-pruned-pebble-path-node.middlewares=xlayer-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
xlayer-mainnet-op-geth-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: xlayer
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
...

View File

@@ -0,0 +1,200 @@
---
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:op/geth/zircuit-garfield-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-garfield-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-garfield-archive:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_GARFIELD_GETH_VERSION:-v1.138.8}
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
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_GARFIELD_WS_SECRET}@${ZIRCUIT_GARFIELD_ETH_STATS_SERVER}:${ZIRCUIT_GARFIELD_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://proxyd-ingress-us.garfield-testnet.zircuit.com?token=drpcV4hDaEwatB9G3zgk8gBkaH5s4TVMGeuUvlBIiVTD
- GETH_TXPOOL_GLOBALQUEUE=1024
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=48899
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_GARFIELD_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-zircuit-garfield-op-geth-archive-leveldb-hash}:/data
- ./op/zircuit/garfield:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-garfield-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/zircuit-garfield-archive
- traefik.http.services.zircuit-garfield-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-garfield-archive`) || Path(`/zircuit-garfield-archive/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash.rule=Path(`/zircuit-garfield-archive`) || Path(`/zircuit-garfield-archive/`)}
- traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash.middlewares=zircuit-garfield-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
zircuit-garfield-archive-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_GARFIELD_KONA_VERSION:-v1.6.1}
ports:
- 17296:17296
- 17296:17296/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_HOLESKY_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_GARFIELD_L1_EXECUTION_RPC:-${ETHEREUM_HOLESKY_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_HOLESKY_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48899
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-garfield-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17296
- KONA_NODE_P2P_LISTEN_UDP_PORT=17296
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-garfield-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/garfield:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-garfield-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/zircuit-garfield-archive/node
- traefik.http.services.zircuit-garfield-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-garfield-archive/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/zircuit-garfield-archive/node`)}
- traefik.http.routers.zircuit-garfield-op-geth-archive-leveldb-hash-node.middlewares=zircuit-garfield-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
zircuit-garfield-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zircuit-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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,200 @@
---
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:op/geth/zircuit-garfield-op-geth-archive-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-garfield-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-garfield-archive:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_GARFIELD_GETH_VERSION:-v1.138.8}
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
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_GARFIELD_WS_SECRET}@${ZIRCUIT_GARFIELD_ETH_STATS_SERVER}:${ZIRCUIT_GARFIELD_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://proxyd-ingress-us.garfield-testnet.zircuit.com?token=drpcV4hDaEwatB9G3zgk8gBkaH5s4TVMGeuUvlBIiVTD
- GETH_TXPOOL_GLOBALQUEUE=1024
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=48899
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_GARFIELD_OP_GETH_ARCHIVE_PEBBLE_HASH_DATA:-zircuit-garfield-op-geth-archive-pebble-hash}:/data
- ./op/zircuit/garfield:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-garfield-op-geth-archive-pebble-hash-stripprefix.stripprefix.prefixes=/zircuit-garfield-archive
- traefik.http.services.zircuit-garfield-op-geth-archive-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-garfield-archive`) || Path(`/zircuit-garfield-archive/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash.rule=Path(`/zircuit-garfield-archive`) || Path(`/zircuit-garfield-archive/`)}
- traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash.middlewares=zircuit-garfield-op-geth-archive-pebble-hash-stripprefix, ipallowlist
zircuit-garfield-archive-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_GARFIELD_KONA_VERSION:-v1.6.1}
ports:
- 16723:16723
- 16723:16723/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_HOLESKY_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_GARFIELD_L1_EXECUTION_RPC:-${ETHEREUM_HOLESKY_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_HOLESKY_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48899
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-garfield-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16723
- KONA_NODE_P2P_LISTEN_UDP_PORT=16723
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-garfield-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/garfield:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-garfield-op-geth-archive-pebble-hash-node-stripprefix.stripprefix.prefixes=/zircuit-garfield-archive/node
- traefik.http.services.zircuit-garfield-op-geth-archive-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-garfield-archive/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash-node.rule=PathPrefix(`/zircuit-garfield-archive/node`)}
- traefik.http.routers.zircuit-garfield-op-geth-archive-pebble-hash-node.middlewares=zircuit-garfield-op-geth-archive-pebble-hash-node-stripprefix, ipallowlist
volumes:
zircuit-garfield-op-geth-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: zircuit-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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,200 @@
---
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:op/geth/zircuit-garfield-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-garfield \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-garfield:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_GARFIELD_GETH_VERSION:-v1.138.8}
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
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_GARFIELD_WS_SECRET}@${ZIRCUIT_GARFIELD_ETH_STATS_SERVER}:${ZIRCUIT_GARFIELD_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://proxyd-ingress-us.garfield-testnet.zircuit.com?token=drpcV4hDaEwatB9G3zgk8gBkaH5s4TVMGeuUvlBIiVTD
- GETH_TXPOOL_GLOBALQUEUE=1024
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=48899
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_GARFIELD_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-zircuit-garfield-op-geth-pruned-pebble-hash}:/data
- ./op/zircuit/garfield:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-garfield-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/zircuit-garfield
- traefik.http.services.zircuit-garfield-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-garfield`) || Path(`/zircuit-garfield/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash.rule=Path(`/zircuit-garfield`) || Path(`/zircuit-garfield/`)}
- traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash.middlewares=zircuit-garfield-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
zircuit-garfield-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_GARFIELD_KONA_VERSION:-v1.6.1}
ports:
- 17397:17397
- 17397:17397/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_HOLESKY_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_GARFIELD_L1_EXECUTION_RPC:-${ETHEREUM_HOLESKY_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_HOLESKY_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48899
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-garfield:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17397
- KONA_NODE_P2P_LISTEN_UDP_PORT=17397
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-garfield:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/garfield:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-garfield-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/zircuit-garfield/node
- traefik.http.services.zircuit-garfield-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-garfield/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/zircuit-garfield/node`)}
- traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-hash-node.middlewares=zircuit-garfield-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
zircuit-garfield-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zircuit-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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,202 @@
---
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:op/geth/zircuit-garfield-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-garfield \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-garfield:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_GARFIELD_GETH_VERSION:-v1.138.8}
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
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_GARFIELD_WS_SECRET}@${ZIRCUIT_GARFIELD_ETH_STATS_SERVER}:${ZIRCUIT_GARFIELD_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://proxyd-ingress-us.garfield-testnet.zircuit.com?token=drpcV4hDaEwatB9G3zgk8gBkaH5s4TVMGeuUvlBIiVTD
- GETH_TXPOOL_GLOBALQUEUE=1024
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --networkid=48899
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_GARFIELD_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-zircuit-garfield-op-geth-pruned-pebble-path}:/data
- ./op/zircuit/garfield:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-garfield-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/zircuit-garfield
- traefik.http.services.zircuit-garfield-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/zircuit-garfield`) || Path(`/zircuit-garfield/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path.rule=Path(`/zircuit-garfield`) || Path(`/zircuit-garfield/`)}
- traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path.middlewares=zircuit-garfield-op-geth-pruned-pebble-path-stripprefix, ipallowlist
zircuit-garfield-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_GARFIELD_KONA_VERSION:-v1.6.1}
ports:
- 15072:15072
- 15072:15072/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_HOLESKY_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_GARFIELD_L1_EXECUTION_RPC:-${ETHEREUM_HOLESKY_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_HOLESKY_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48899
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-garfield:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15072
- KONA_NODE_P2P_LISTEN_UDP_PORT=15072
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-garfield:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/garfield:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-garfield-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/zircuit-garfield/node
- traefik.http.services.zircuit-garfield-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-garfield/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/zircuit-garfield/node`)}
- traefik.http.routers.zircuit-garfield-op-geth-pruned-pebble-path-node.middlewares=zircuit-garfield-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
zircuit-garfield-op-geth-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: zircuit-testnet
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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,201 @@
---
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:op/geth/zircuit-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-mainnet-archive:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_MAINNET_GETH_VERSION:-v1.138.8}
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
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_MAINNET_WS_SECRET}@${ZIRCUIT_MAINNET_ETH_STATS_SERVER}:${ZIRCUIT_MAINNET_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://proxyd-ingress-eu.mainnet.zircuit.com/?token=drpcvATEn3gsYCLyLw7ztFLCBwQNoDJr2QjpcsNNkksu
- GETH_TXPOOL_GLOBALQUEUE=1024
- ZIRCUIT_NETWORK=mainnet
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --network=mainnet
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-zircuit-mainnet-op-geth-archive-leveldb-hash}:/data
- ./op/zircuit/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/zircuit-mainnet-archive
- traefik.http.services.zircuit-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-mainnet-archive`) || Path(`/zircuit-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/zircuit-mainnet-archive`) || Path(`/zircuit-mainnet-archive/`)}
- traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash.middlewares=zircuit-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
zircuit-mainnet-archive-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 19463:19463
- 19463:19463/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48900
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19463
- KONA_NODE_P2P_LISTEN_UDP_PORT=19463
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/zircuit-mainnet-archive/node
- traefik.http.services.zircuit-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/zircuit-mainnet-archive/node`)}
- traefik.http.routers.zircuit-mainnet-op-geth-archive-leveldb-hash-node.middlewares=zircuit-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
zircuit-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zircuit-mainnet
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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,201 @@
---
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:op/geth/zircuit-mainnet-op-geth-archive-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-mainnet-archive:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_MAINNET_GETH_VERSION:-v1.138.8}
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
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_MAINNET_WS_SECRET}@${ZIRCUIT_MAINNET_ETH_STATS_SERVER}:${ZIRCUIT_MAINNET_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://proxyd-ingress-eu.mainnet.zircuit.com/?token=drpcvATEn3gsYCLyLw7ztFLCBwQNoDJr2QjpcsNNkksu
- GETH_TXPOOL_GLOBALQUEUE=1024
- ZIRCUIT_NETWORK=mainnet
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --network=mainnet
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_MAINNET_OP_GETH_ARCHIVE_PEBBLE_HASH_DATA:-zircuit-mainnet-op-geth-archive-pebble-hash}:/data
- ./op/zircuit/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-mainnet-op-geth-archive-pebble-hash-stripprefix.stripprefix.prefixes=/zircuit-mainnet-archive
- traefik.http.services.zircuit-mainnet-op-geth-archive-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-mainnet-archive`) || Path(`/zircuit-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash.rule=Path(`/zircuit-mainnet-archive`) || Path(`/zircuit-mainnet-archive/`)}
- traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash.middlewares=zircuit-mainnet-op-geth-archive-pebble-hash-stripprefix, ipallowlist
zircuit-mainnet-archive-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 15588:15588
- 15588:15588/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48900
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15588
- KONA_NODE_P2P_LISTEN_UDP_PORT=15588
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-mainnet-op-geth-archive-pebble-hash-node-stripprefix.stripprefix.prefixes=/zircuit-mainnet-archive/node
- traefik.http.services.zircuit-mainnet-op-geth-archive-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash-node.rule=PathPrefix(`/zircuit-mainnet-archive/node`)}
- traefik.http.routers.zircuit-mainnet-op-geth-archive-pebble-hash-node.middlewares=zircuit-mainnet-op-geth-archive-pebble-hash-node-stripprefix, ipallowlist
volumes:
zircuit-mainnet-op-geth-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: zircuit-mainnet
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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,201 @@
---
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:op/geth/zircuit-mainnet-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-mainnet:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_MAINNET_GETH_VERSION:-v1.138.8}
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
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_MAINNET_WS_SECRET}@${ZIRCUIT_MAINNET_ETH_STATS_SERVER}:${ZIRCUIT_MAINNET_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://proxyd-ingress-eu.mainnet.zircuit.com/?token=drpcvATEn3gsYCLyLw7ztFLCBwQNoDJr2QjpcsNNkksu
- GETH_TXPOOL_GLOBALQUEUE=1024
- ZIRCUIT_NETWORK=mainnet
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --network=mainnet
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_MAINNET_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-zircuit-mainnet-op-geth-pruned-pebble-hash}:/data
- ./op/zircuit/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-mainnet-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/zircuit-mainnet
- traefik.http.services.zircuit-mainnet-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-mainnet`) || Path(`/zircuit-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash.rule=Path(`/zircuit-mainnet`) || Path(`/zircuit-mainnet/`)}
- traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash.middlewares=zircuit-mainnet-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
zircuit-mainnet-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18688:18688
- 18688:18688/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48900
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18688
- KONA_NODE_P2P_LISTEN_UDP_PORT=18688
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-mainnet-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/zircuit-mainnet/node
- traefik.http.services.zircuit-mainnet-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/zircuit-mainnet/node`)}
- traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-hash-node.middlewares=zircuit-mainnet-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
zircuit-mainnet-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zircuit-mainnet
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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,203 @@
---
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:op/geth/zircuit-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-mainnet:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_MAINNET_GETH_VERSION:-v1.138.8}
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
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_MAINNET_WS_SECRET}@${ZIRCUIT_MAINNET_ETH_STATS_SERVER}:${ZIRCUIT_MAINNET_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://proxyd-ingress-eu.mainnet.zircuit.com/?token=drpcvATEn3gsYCLyLw7ztFLCBwQNoDJr2QjpcsNNkksu
- GETH_TXPOOL_GLOBALQUEUE=1024
- ZIRCUIT_NETWORK=mainnet
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --network=mainnet
- --nodiscover
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-zircuit-mainnet-op-geth-pruned-pebble-path}:/data
- ./op/zircuit/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/zircuit-mainnet
- traefik.http.services.zircuit-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/zircuit-mainnet`) || Path(`/zircuit-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path.rule=Path(`/zircuit-mainnet`) || Path(`/zircuit-mainnet/`)}
- traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path.middlewares=zircuit-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
zircuit-mainnet-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18359:18359
- 18359:18359/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48900
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18359
- KONA_NODE_P2P_LISTEN_UDP_PORT=18359
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/zircuit-mainnet/node
- traefik.http.services.zircuit-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/zircuit-mainnet/node`)}
- traefik.http.routers.zircuit-mainnet-op-geth-pruned-pebble-path-node.middlewares=zircuit-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
zircuit-mainnet-op-geth-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: zircuit-mainnet
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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,204 @@
---
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:op/geth/zircuit-testnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-testnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-testnet-archive:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_TESTNET_GETH_VERSION:-v1.138.8}
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:
- 13095:13095
- 13095:13095/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_TESTNET_WS_SECRET}@${ZIRCUIT_TESTNET_ETH_STATS_SERVER}:${ZIRCUIT_TESTNET_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://zircuit-testnet.drpc.org
- GETH_TXPOOL_GLOBALQUEUE=1024
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=48899
- --port=13095
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_TESTNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-zircuit-testnet-op-geth-archive-leveldb-hash}:/data
- ./op/zircuit/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-testnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/zircuit-testnet-archive
- traefik.http.services.zircuit-testnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-testnet-archive`) || Path(`/zircuit-testnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash.rule=Path(`/zircuit-testnet-archive`) || Path(`/zircuit-testnet-archive/`)}
- traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash.middlewares=zircuit-testnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
zircuit-testnet-archive-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 18095:18095
- 18095:18095/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_TESTNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_TESTNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_TESTNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48899
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-testnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18095
- KONA_NODE_P2P_LISTEN_UDP_PORT=18095
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-testnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-testnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/zircuit-testnet-archive/node
- traefik.http.services.zircuit-testnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-testnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/zircuit-testnet-archive/node`)}
- traefik.http.routers.zircuit-testnet-op-geth-archive-leveldb-hash-node.middlewares=zircuit-testnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
zircuit-testnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zircuit-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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,204 @@
---
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:op/geth/zircuit-testnet-op-geth-archive-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-testnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-testnet-archive:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_TESTNET_GETH_VERSION:-v1.138.8}
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:
- 11499:11499
- 11499:11499/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_TESTNET_WS_SECRET}@${ZIRCUIT_TESTNET_ETH_STATS_SERVER}:${ZIRCUIT_TESTNET_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://zircuit-testnet.drpc.org
- GETH_TXPOOL_GLOBALQUEUE=1024
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=48899
- --port=11499
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_TESTNET_OP_GETH_ARCHIVE_PEBBLE_HASH_DATA:-zircuit-testnet-op-geth-archive-pebble-hash}:/data
- ./op/zircuit/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-testnet-op-geth-archive-pebble-hash-stripprefix.stripprefix.prefixes=/zircuit-testnet-archive
- traefik.http.services.zircuit-testnet-op-geth-archive-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-testnet-archive`) || Path(`/zircuit-testnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash.rule=Path(`/zircuit-testnet-archive`) || Path(`/zircuit-testnet-archive/`)}
- traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash.middlewares=zircuit-testnet-op-geth-archive-pebble-hash-stripprefix, ipallowlist
zircuit-testnet-archive-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 16499:16499
- 16499:16499/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_TESTNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_TESTNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_TESTNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48899
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-testnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16499
- KONA_NODE_P2P_LISTEN_UDP_PORT=16499
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-testnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-testnet-op-geth-archive-pebble-hash-node-stripprefix.stripprefix.prefixes=/zircuit-testnet-archive/node
- traefik.http.services.zircuit-testnet-op-geth-archive-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-testnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash-node.rule=PathPrefix(`/zircuit-testnet-archive/node`)}
- traefik.http.routers.zircuit-testnet-op-geth-archive-pebble-hash-node.middlewares=zircuit-testnet-op-geth-archive-pebble-hash-node-stripprefix, ipallowlist
volumes:
zircuit-testnet-op-geth-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: zircuit-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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,204 @@
---
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:op/geth/zircuit-testnet-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-testnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-testnet:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_TESTNET_GETH_VERSION:-v1.138.8}
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:
- 11357:11357
- 11357:11357/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_TESTNET_WS_SECRET}@${ZIRCUIT_TESTNET_ETH_STATS_SERVER}:${ZIRCUIT_TESTNET_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://zircuit-testnet.drpc.org
- GETH_TXPOOL_GLOBALQUEUE=1024
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=48899
- --port=11357
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_TESTNET_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-zircuit-testnet-op-geth-pruned-pebble-hash}:/data
- ./op/zircuit/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-testnet-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/zircuit-testnet
- traefik.http.services.zircuit-testnet-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/zircuit-testnet`) || Path(`/zircuit-testnet/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash.rule=Path(`/zircuit-testnet`) || Path(`/zircuit-testnet/`)}
- traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash.middlewares=zircuit-testnet-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
zircuit-testnet-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 16357:16357
- 16357:16357/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_TESTNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_TESTNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_TESTNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48899
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-testnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16357
- KONA_NODE_P2P_LISTEN_UDP_PORT=16357
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-testnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-testnet-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/zircuit-testnet/node
- traefik.http.services.zircuit-testnet-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-testnet/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/zircuit-testnet/node`)}
- traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-hash-node.middlewares=zircuit-testnet-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
zircuit-testnet-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zircuit-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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,206 @@
---
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:op/geth/zircuit-testnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zircuit-testnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zircuit-testnet:
image: ${ZIRCUIT_GETH_IMAGE:-zircuit1/l2-geth}:${ZIRCUIT_TESTNET_GETH_VERSION:-v1.138.8}
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:
- 12804:12804
- 12804:12804/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_CONFIG=/config/gethconfig.toml
- GETH_ETHSTATS=d${DOMAIN}:${ZIRCUIT_TESTNET_WS_SECRET}@${ZIRCUIT_TESTNET_ETH_STATS_SERVER}:${ZIRCUIT_TESTNET_ETH_STATS_SERVER_PORT}
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://zircuit-testnet.drpc.org
- GETH_TXPOOL_GLOBALQUEUE=1024
entrypoint: /bin/sh -c 'exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=48899
- --port=12804
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZIRCUIT_TESTNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-zircuit-testnet-op-geth-pruned-pebble-path}:/data
- ./op/zircuit/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zircuit-testnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/zircuit-testnet
- traefik.http.services.zircuit-testnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/zircuit-testnet`) || Path(`/zircuit-testnet/`))}
- ${NO_SSL:+traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path.rule=Path(`/zircuit-testnet`) || Path(`/zircuit-testnet/`)}
- traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path.middlewares=zircuit-testnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
zircuit-testnet-node:
image: ${ZIRCUIT_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZIRCUIT_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 17804:17804
- 17804:17804/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_TESTNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZIRCUIT_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_TESTNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_TESTNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=48899
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zircuit-testnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17804
- KONA_NODE_P2P_LISTEN_UDP_PORT=17804
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zircuit-testnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zircuit/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zircuit-testnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/zircuit-testnet/node
- traefik.http.services.zircuit-testnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zircuit-testnet/node`)}
- ${NO_SSL:+traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/zircuit-testnet/node`)}
- traefik.http.routers.zircuit-testnet-op-geth-pruned-pebble-path-node.middlewares=zircuit-testnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
zircuit-testnet-op-geth-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: zircuit-testnet
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
- name: zirc_getQuarantineHistory
- name: zirc_getQuarantined
- name: zirc_isQuarantined
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/zora-mainnet-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-mainnet-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-mainnet-archive:
image: ${ZORA_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${ZORA_MAINNET_GETH_VERSION:-v1.101702.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:
- 12066:12066
- 12066:12066/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.zora.energy
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=7777777
- --port=12066
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_MAINNET_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-zora-mainnet-op-geth-archive-leveldb-hash}:/data
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/zora-mainnet-archive
- traefik.http.services.zora-mainnet-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/zora-mainnet-archive`) || Path(`/zora-mainnet-archive/`))}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash.rule=Path(`/zora-mainnet-archive`) || Path(`/zora-mainnet-archive/`)}
- traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash.middlewares=zora-mainnet-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
zora-mainnet-archive-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17066:17066
- 17066:17066/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=7777777
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-mainnet-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17066
- KONA_NODE_P2P_LISTEN_UDP_PORT=17066
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-mainnet-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/zora-mainnet-archive/node
- traefik.http.services.zora-mainnet-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-mainnet-archive/node`)}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/zora-mainnet-archive/node`)}
- traefik.http.routers.zora-mainnet-op-geth-archive-leveldb-hash-node.middlewares=zora-mainnet-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
zora-mainnet-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zora
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
...

View File

@@ -0,0 +1,198 @@
---
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:op/geth/zora-mainnet-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-mainnet:
image: ${ZORA_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${ZORA_MAINNET_GETH_VERSION:-v1.101702.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:
- 13237:13237
- 13237:13237/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.zora.energy
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=7777777
- --port=13237
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_MAINNET_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-zora-mainnet-op-geth-pruned-pebble-hash}:/data
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/zora-mainnet
- traefik.http.services.zora-mainnet-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/zora-mainnet`) || Path(`/zora-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash.rule=Path(`/zora-mainnet`) || Path(`/zora-mainnet/`)}
- traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash.middlewares=zora-mainnet-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
zora-mainnet-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18237:18237
- 18237:18237/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=7777777
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18237
- KONA_NODE_P2P_LISTEN_UDP_PORT=18237
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/zora-mainnet/node
- traefik.http.services.zora-mainnet-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/zora-mainnet/node`)}
- traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-hash-node.middlewares=zora-mainnet-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
zora-mainnet-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zora
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
...

View File

@@ -0,0 +1,200 @@
---
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:op/geth/zora-mainnet-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-mainnet \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-mainnet:
image: ${ZORA_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${ZORA_MAINNET_GETH_VERSION:-v1.101702.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:
- 13714:13714
- 13714:13714/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://rpc.zora.energy
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=7777777
- --port=13714
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_MAINNET_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-zora-mainnet-op-geth-pruned-pebble-path}:/data
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/zora-mainnet
- traefik.http.services.zora-mainnet-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/zora-mainnet`) || Path(`/zora-mainnet/`))}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path.rule=Path(`/zora-mainnet`) || Path(`/zora-mainnet/`)}
- traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path.middlewares=zora-mainnet-op-geth-pruned-pebble-path-stripprefix, ipallowlist
zora-mainnet-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18714:18714
- 18714:18714/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=7777777
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-mainnet:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18714
- KONA_NODE_P2P_LISTEN_UDP_PORT=18714
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-mainnet:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/zora-mainnet/node
- traefik.http.services.zora-mainnet-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-mainnet/node`)}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/zora-mainnet/node`)}
- traefik.http.routers.zora-mainnet-op-geth-pruned-pebble-path-node.middlewares=zora-mainnet-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
zora-mainnet-op-geth-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: zora
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
...

View File

@@ -0,0 +1,199 @@
---
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:op/geth/zora-sepolia-op-geth-archive-leveldb-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-sepolia-archive \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-sepolia-archive:
image: ${ZORA_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${ZORA_SEPOLIA_GETH_VERSION:-v1.101702.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:
- 10308:10308
- 10308:10308/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia.rpc.zora.energy
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=leveldb --gcmode=archive --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=leveldb
- --gcmode=archive
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=999999999
- --port=10308
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_SEPOLIA_OP_GETH_ARCHIVE_LEVELDB_HASH_DATA:-zora-sepolia-op-geth-archive-leveldb-hash}:/data
- ./op/zora/sepolia:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zora-sepolia-op-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/zora-sepolia-archive
- traefik.http.services.zora-sepolia-op-geth-archive-leveldb-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/zora-sepolia-archive`) || Path(`/zora-sepolia-archive/`))}
- ${NO_SSL:+traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash.rule=Path(`/zora-sepolia-archive`) || Path(`/zora-sepolia-archive/`)}
- traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash.middlewares=zora-sepolia-op-geth-archive-leveldb-hash-stripprefix, ipallowlist
zora-sepolia-archive-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 15308:15308
- 15308:15308/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=999999999
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-sepolia-archive:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=15308
- KONA_NODE_P2P_LISTEN_UDP_PORT=15308
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-sepolia-archive:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/sepolia:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-sepolia-op-geth-archive-leveldb-hash-node-stripprefix.stripprefix.prefixes=/zora-sepolia-archive/node
- traefik.http.services.zora-sepolia-op-geth-archive-leveldb-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-sepolia-archive/node`)}
- ${NO_SSL:+traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash-node.rule=PathPrefix(`/zora-sepolia-archive/node`)}
- traefik.http.routers.zora-sepolia-op-geth-archive-leveldb-hash-node.middlewares=zora-sepolia-op-geth-archive-leveldb-hash-node-stripprefix, ipallowlist
volumes:
zora-sepolia-op-geth-archive-leveldb-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zora-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
...

View File

@@ -0,0 +1,199 @@
---
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:op/geth/zora-sepolia-op-geth-pruned-pebble-hash--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-sepolia \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-sepolia:
image: ${ZORA_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${ZORA_SEPOLIA_GETH_VERSION:-v1.101702.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:
- 13380:13380
- 13380:13380/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia.rpc.zora.energy
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=999999999
- --port=13380
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=hash
- --syncmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_SEPOLIA_OP_GETH_PRUNED_PEBBLE_HASH_DATA:-zora-sepolia-op-geth-pruned-pebble-hash}:/data
- ./op/zora/sepolia:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zora-sepolia-op-geth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/zora-sepolia
- traefik.http.services.zora-sepolia-op-geth-pruned-pebble-hash.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/zora-sepolia`) || Path(`/zora-sepolia/`))}
- ${NO_SSL:+traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash.rule=Path(`/zora-sepolia`) || Path(`/zora-sepolia/`)}
- traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash.middlewares=zora-sepolia-op-geth-pruned-pebble-hash-stripprefix, ipallowlist
zora-sepolia-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 18380:18380
- 18380:18380/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=999999999
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-sepolia:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18380
- KONA_NODE_P2P_LISTEN_UDP_PORT=18380
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-sepolia:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/sepolia:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-sepolia-op-geth-pruned-pebble-hash-node-stripprefix.stripprefix.prefixes=/zora-sepolia/node
- traefik.http.services.zora-sepolia-op-geth-pruned-pebble-hash-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-sepolia/node`)}
- ${NO_SSL:+traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash-node.rule=PathPrefix(`/zora-sepolia/node`)}
- traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-hash-node.middlewares=zora-sepolia-op-geth-pruned-pebble-hash-node-stripprefix, ipallowlist
volumes:
zora-sepolia-op-geth-pruned-pebble-hash:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zora-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
...

View File

@@ -0,0 +1,201 @@
---
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:op/geth/zora-sepolia-op-geth-pruned-pebble-path--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-sepolia \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-sepolia:
image: ${ZORA_GETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth}:${ZORA_SEPOLIA_GETH_VERSION:-v1.101702.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:
- 14083:14083
- 14083:14083/udp
expose:
- 8545
- 6060
- 8551
environment:
- GETH_ROLLUP_DISABLETXPOOLGOSSIP=true
- GETH_ROLLUP_SEQUENCERHTTP=https://sepolia.rpc.zora.energy
entrypoint: /bin/sh -c '[ -f /config/genesis.json ] && geth --db.engine=pebble --gcmode=full --datadir /data init --state.scheme=path /config/genesis.json; exec geth "$@"' --
command:
- --datadir=/data
- --db.engine=pebble
- --gcmode=full
- --maxpeers=50
- --metrics
- --metrics.addr=0.0.0.0
- --metrics.port=6060
- --nat=extip:${IP}
- --networkid=999999999
- --port=14083
- --rpc.gascap=600000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,debug,admin,txpool,engine
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,debug,admin,txpool,engine
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
- --authrpc.vhosts=*
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_SEPOLIA_OP_GETH_PRUNED_PEBBLE_PATH_DATA:-zora-sepolia-op-geth-pruned-pebble-path}:/data
- ./op/zora/sepolia:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/debug/metrics/prometheus
- traefik.enable=true
- traefik.http.middlewares.zora-sepolia-op-geth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/zora-sepolia
- traefik.http.services.zora-sepolia-op-geth-pruned-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/zora-sepolia`) || Path(`/zora-sepolia/`))}
- ${NO_SSL:+traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path.rule=Path(`/zora-sepolia`) || Path(`/zora-sepolia/`)}
- traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path.middlewares=zora-sepolia-op-geth-pruned-pebble-path-stripprefix, ipallowlist
zora-sepolia-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 19083:19083
- 19083:19083/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=999999999
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-sepolia:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19083
- KONA_NODE_P2P_LISTEN_UDP_PORT=19083
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-sepolia:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/sepolia:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-sepolia-op-geth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/zora-sepolia/node
- traefik.http.services.zora-sepolia-op-geth-pruned-pebble-path-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-sepolia/node`)}
- ${NO_SSL:+traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path-node.rule=PathPrefix(`/zora-sepolia/node`)}
- traefik.http.routers.zora-sepolia-op-geth-pruned-pebble-path-node.middlewares=zora-sepolia-op-geth-pruned-pebble-path-node-stripprefix, ipallowlist
volumes:
zora-sepolia-op-geth-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: zora-sepolia
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
...

View 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:op/reth/base-mainnet-op-reth-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-mainnet-op-reth \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-mainnet-op-reth:
image: ${BASE_RETH_IMAGE:-ghcr.io/base/node-reth}:${BASE_MAINNET_RETH_VERSION:-v1.1.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 14221:14221
- 14221:14221/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [/app/base-reth-node, node]
command:
- --chain=base
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${BASE_MAINNET_RETH_STATE_CACHE:-4096}
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=14221
- --rollup.sequencer-http=https://mainnet-sequencer.base.org
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_MAINNET_OP_RETH_ARCHIVE_TRACE_DATA:-base-mainnet-op-reth-archive-trace}:/root/.local/share/reth
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-reth-archive-trace-stripprefix.stripprefix.prefixes=/base-mainnet-op-reth
- traefik.http.services.base-mainnet-op-reth-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet-op-reth`) || Path(`/base-mainnet-op-reth/`))}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-reth-archive-trace.rule=Path(`/base-mainnet-op-reth`) || Path(`/base-mainnet-op-reth/`)}
- traefik.http.routers.base-mainnet-op-reth-archive-trace.middlewares=base-mainnet-op-reth-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
base-mainnet-op-reth-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 19221:19221
- 19221:19221/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=8453
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-mainnet-op-reth:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19221
- KONA_NODE_P2P_LISTEN_UDP_PORT=19221
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-mainnet-op-reth:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-reth-archive-trace-node-stripprefix.stripprefix.prefixes=/base-mainnet-op-reth/node
- traefik.http.services.base-mainnet-op-reth-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-mainnet-op-reth/node`)}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-reth-archive-trace-node.rule=PathPrefix(`/base-mainnet-op-reth/node`)}
- traefik.http.routers.base-mainnet-op-reth-archive-trace-node.middlewares=base-mainnet-op-reth-archive-trace-node-stripprefix, ipallowlist
volumes:
base-mainnet-op-reth-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View 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:op/reth/base-mainnet-op-reth-minimal-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-mainnet-op-reth-minimal \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-mainnet-op-reth-minimal:
image: ${BASE_RETH_IMAGE:-ghcr.io/base/node-reth}:${BASE_MAINNET_RETH_VERSION:-v1.1.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 11240:11240
- 11240:11240/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [/app/base-reth-node, node]
command:
- --chain=base
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${BASE_MAINNET_RETH_STATE_CACHE:-4096}
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=11240
- --rollup.sequencer-http=https://mainnet-sequencer.base.org
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_MAINNET_OP_RETH_MINIMAL_TRACE_DATA:-base-mainnet-op-reth-minimal-trace}:/root/.local/share/reth
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-reth-minimal-trace-stripprefix.stripprefix.prefixes=/base-mainnet-op-reth-minimal
- traefik.http.services.base-mainnet-op-reth-minimal-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-minimal-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-minimal-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-minimal-trace.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet-op-reth-minimal`) || Path(`/base-mainnet-op-reth-minimal/`))}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-reth-minimal-trace.rule=Path(`/base-mainnet-op-reth-minimal`) || Path(`/base-mainnet-op-reth-minimal/`)}
- traefik.http.routers.base-mainnet-op-reth-minimal-trace.middlewares=base-mainnet-op-reth-minimal-trace-stripprefix, ipallowlist
shm_size: 2gb
base-mainnet-op-reth-minimal-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16240:16240
- 16240:16240/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=8453
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-mainnet-op-reth-minimal:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16240
- KONA_NODE_P2P_LISTEN_UDP_PORT=16240
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-mainnet-op-reth-minimal:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-reth-minimal-trace-node-stripprefix.stripprefix.prefixes=/base-mainnet-op-reth-minimal/node
- traefik.http.services.base-mainnet-op-reth-minimal-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-minimal-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-minimal-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-minimal-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-mainnet-op-reth-minimal/node`)}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-reth-minimal-trace-node.rule=PathPrefix(`/base-mainnet-op-reth-minimal/node`)}
- traefik.http.routers.base-mainnet-op-reth-minimal-trace-node.middlewares=base-mainnet-op-reth-minimal-trace-node-stripprefix, ipallowlist
volumes:
base-mainnet-op-reth-minimal-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,183 @@
---
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:op/reth/base-mainnet-op-reth-pruned-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-mainnet-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-mainnet-op-reth-pruned:
image: ${BASE_RETH_IMAGE:-ghcr.io/base/node-reth}:${BASE_MAINNET_RETH_VERSION:-v1.1.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
ports:
- 14759:14759
- 14759:14759/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [/app/base-reth-node, node]
command:
- --chain=base
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${BASE_MAINNET_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=14759
- --rollup.sequencer-http=https://mainnet-sequencer.base.org
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_MAINNET_OP_RETH_PRUNED_TRACE_DATA:-base-mainnet-op-reth-pruned-trace}:/root/.local/share/reth
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/base-mainnet-op-reth-pruned
- traefik.http.services.base-mainnet-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet-op-reth-pruned`) || Path(`/base-mainnet-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-reth-pruned-trace.rule=Path(`/base-mainnet-op-reth-pruned`) || Path(`/base-mainnet-op-reth-pruned/`)}
- traefik.http.routers.base-mainnet-op-reth-pruned-trace.middlewares=base-mainnet-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
base-mainnet-op-reth-pruned-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 19759:19759
- 19759:19759/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=8453
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-mainnet-op-reth-pruned:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=19759
- KONA_NODE_P2P_LISTEN_UDP_PORT=19759
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-mainnet-op-reth-pruned:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-mainnet-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/base-mainnet-op-reth-pruned/node
- traefik.http.services.base-mainnet-op-reth-pruned-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-mainnet-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-mainnet-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.base-mainnet-op-reth-pruned-trace-node.rule=PathPrefix(`/base-mainnet-op-reth-pruned/node`)}
- traefik.http.routers.base-mainnet-op-reth-pruned-trace-node.middlewares=base-mainnet-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
base-mainnet-op-reth-pruned-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,183 @@
---
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:op/reth/base-sepolia-op-reth-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-sepolia-op-reth \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-sepolia-op-reth:
image: ${BASE_RETH_IMAGE:-ghcr.io/base/node-reth}:${BASE_SEPOLIA_RETH_VERSION:-v1.1.0}
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: root
ports:
- 11390:11390
- 11390:11390/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [/app/base-reth-node, node]
command:
- --chain=base-sepolia
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${BASE_SEPOLIA_RETH_STATE_CACHE:-4096}
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=11390
- --rollup.sequencer-http=https://sepolia-sequencer.base.org
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_SEPOLIA_OP_RETH_ARCHIVE_TRACE_DATA:-base-sepolia-op-reth-archive-trace}:/root/.local/share/reth
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-reth-archive-trace-stripprefix.stripprefix.prefixes=/base-sepolia-op-reth
- traefik.http.services.base-sepolia-op-reth-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/base-sepolia-op-reth`) || Path(`/base-sepolia-op-reth/`))}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-reth-archive-trace.rule=Path(`/base-sepolia-op-reth`) || Path(`/base-sepolia-op-reth/`)}
- traefik.http.routers.base-sepolia-op-reth-archive-trace.middlewares=base-sepolia-op-reth-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
base-sepolia-op-reth-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 16390:16390
- 16390:16390/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=84532
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-sepolia-op-reth:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16390
- KONA_NODE_P2P_LISTEN_UDP_PORT=16390
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-sepolia-op-reth:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-reth-archive-trace-node-stripprefix.stripprefix.prefixes=/base-sepolia-op-reth/node
- traefik.http.services.base-sepolia-op-reth-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-sepolia-op-reth/node`)}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-reth-archive-trace-node.rule=PathPrefix(`/base-sepolia-op-reth/node`)}
- traefik.http.routers.base-sepolia-op-reth-archive-trace-node.middlewares=base-sepolia-op-reth-archive-trace-node-stripprefix, ipallowlist
volumes:
base-sepolia-op-reth-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base-sepolia
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,183 @@
---
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:op/reth/base-sepolia-op-reth-minimal-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-sepolia-op-reth-minimal \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-sepolia-op-reth-minimal:
image: ${BASE_RETH_IMAGE:-ghcr.io/base/node-reth}:${BASE_SEPOLIA_RETH_VERSION:-v1.1.0}
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: root
ports:
- 12165:12165
- 12165:12165/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [/app/base-reth-node, node]
command:
- --chain=base-sepolia
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${BASE_SEPOLIA_RETH_STATE_CACHE:-4096}
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=12165
- --rollup.sequencer-http=https://sepolia-sequencer.base.org
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_SEPOLIA_OP_RETH_MINIMAL_TRACE_DATA:-base-sepolia-op-reth-minimal-trace}:/root/.local/share/reth
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-reth-minimal-trace-stripprefix.stripprefix.prefixes=/base-sepolia-op-reth-minimal
- traefik.http.services.base-sepolia-op-reth-minimal-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-minimal-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-minimal-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-minimal-trace.rule=Host(`$DOMAIN`) && (Path(`/base-sepolia-op-reth-minimal`) || Path(`/base-sepolia-op-reth-minimal/`))}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-reth-minimal-trace.rule=Path(`/base-sepolia-op-reth-minimal`) || Path(`/base-sepolia-op-reth-minimal/`)}
- traefik.http.routers.base-sepolia-op-reth-minimal-trace.middlewares=base-sepolia-op-reth-minimal-trace-stripprefix, ipallowlist
shm_size: 2gb
base-sepolia-op-reth-minimal-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 17165:17165
- 17165:17165/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=84532
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-sepolia-op-reth-minimal:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17165
- KONA_NODE_P2P_LISTEN_UDP_PORT=17165
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-sepolia-op-reth-minimal:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-reth-minimal-trace-node-stripprefix.stripprefix.prefixes=/base-sepolia-op-reth-minimal/node
- traefik.http.services.base-sepolia-op-reth-minimal-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-minimal-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-minimal-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-minimal-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-sepolia-op-reth-minimal/node`)}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-reth-minimal-trace-node.rule=PathPrefix(`/base-sepolia-op-reth-minimal/node`)}
- traefik.http.routers.base-sepolia-op-reth-minimal-trace-node.middlewares=base-sepolia-op-reth-minimal-trace-node-stripprefix, ipallowlist
volumes:
base-sepolia-op-reth-minimal-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base-sepolia
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,184 @@
---
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:op/reth/base-sepolia-op-reth-pruned-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/base-sepolia-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
base-sepolia-op-reth-pruned:
image: ${BASE_RETH_IMAGE:-ghcr.io/base/node-reth}:${BASE_SEPOLIA_RETH_VERSION:-v1.1.0}
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: root
ports:
- 11147:11147
- 11147:11147/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [/app/base-reth-node, node]
command:
- --chain=base-sepolia
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${BASE_SEPOLIA_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=11147
- --rollup.sequencer-http=https://sepolia-sequencer.base.org
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${BASE_SEPOLIA_OP_RETH_PRUNED_TRACE_DATA:-base-sepolia-op-reth-pruned-trace}:/root/.local/share/reth
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/base-sepolia-op-reth-pruned
- traefik.http.services.base-sepolia-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/base-sepolia-op-reth-pruned`) || Path(`/base-sepolia-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-reth-pruned-trace.rule=Path(`/base-sepolia-op-reth-pruned`) || Path(`/base-sepolia-op-reth-pruned/`)}
- traefik.http.routers.base-sepolia-op-reth-pruned-trace.middlewares=base-sepolia-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
base-sepolia-op-reth-pruned-node:
image: ${BASE_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${BASE_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 16147:16147
- 16147:16147/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${BASE_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=84532
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://base-sepolia-op-reth-pruned:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16147
- KONA_NODE_P2P_LISTEN_UDP_PORT=16147
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
base-sepolia-op-reth-pruned:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.base-sepolia-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/base-sepolia-op-reth-pruned/node
- traefik.http.services.base-sepolia-op-reth-pruned-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.base-sepolia-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/base-sepolia-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.base-sepolia-op-reth-pruned-trace-node.rule=PathPrefix(`/base-sepolia-op-reth-pruned/node`)}
- traefik.http.routers.base-sepolia-op-reth-pruned-trace-node.middlewares=base-sepolia-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
base-sepolia-op-reth-pruned-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: base-sepolia
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,208 @@
---
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:op/reth/hashkeychain-mainnet-op-reth-pruned-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/hashkeychain-mainnet-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
hashkeychain-mainnet-op-reth-pruned-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || curl -fsSL -o /config/genesis.json "https://hashkeychain.s3.ap-southeast-1.amazonaws.com/mainnet/genesis.json"
restart: no
networks:
- chains
volumes:
- ${HASHKEYCHAIN_MAINNET_OP_RETH_PRUNED_TRACE_CONFIG:-hashkeychain-mainnet-op-reth-pruned-trace_config}:/config
logging: *logging-defaults
hashkeychain-mainnet-op-reth-pruned:
image: ${HASHKEYCHAIN_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${HASHKEYCHAIN_MAINNET_RETH_VERSION:-v2.3.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: root
ports:
- 12151:12151
- 12151:12151/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [op-reth, node]
command:
- --bootnodes=enode://5ecd6d2054a58fa00729b73396044a35e6aceeafe58373d2f26b3f50a3934175fb56f8efa538381430889771613beaabf1177805910bbd34e4b4840320914690@mainnet-bootnodes.hsk.xyz:30615,enode://bd244da2a066e15f82d4bfb7f2732c5b5bac44cefb36cefef01a4c0e87e72b42004d012c9a294b8402ebf67491777f280ffbcc93a71157921d6d358b19ddac67@mainnet-bootnodes.hsk.xyz:30616,enode://a5bba6459ac3a075a4a8941478a4ef8d167460191c89632004b17e4b2d7beea52cdc1a2d376f35e996ad44ccac8db25f900700aad6991d015bdc4db072832063@mainnet-bootnodes.hsk.xyz:30617
- --chain=/config/genesis.json
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${HASHKEYCHAIN_MAINNET_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=12151
- --rollup.sequencer-http=https://mainnet.hsk.xyz
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
depends_on:
hashkeychain-mainnet-op-reth-pruned-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${HASHKEYCHAIN_MAINNET_OP_RETH_PRUNED_TRACE_CONFIG:-hashkeychain-mainnet-op-reth-pruned-trace_config}:/config
- ${HASHKEYCHAIN_MAINNET_OP_RETH_PRUNED_TRACE_DATA:-hashkeychain-mainnet-op-reth-pruned-trace}:/root/.local/share/reth
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-mainnet-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/hashkeychain-mainnet-op-reth-pruned
- traefik.http.services.hashkeychain-mainnet-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/hashkeychain-mainnet-op-reth-pruned`) || Path(`/hashkeychain-mainnet-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace.rule=Path(`/hashkeychain-mainnet-op-reth-pruned`) || Path(`/hashkeychain-mainnet-op-reth-pruned/`)}
- traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace.middlewares=hashkeychain-mainnet-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
hashkeychain-mainnet-op-reth-pruned-node:
image: ${HASHKEYCHAIN_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${HASHKEYCHAIN_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 17151:17151
- 17151:17151/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${HASHKEYCHAIN_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=177
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://hashkeychain-mainnet-op-reth-pruned:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17151
- KONA_NODE_P2P_LISTEN_UDP_PORT=17151
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
hashkeychain-mainnet-op-reth-pruned:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-mainnet-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/hashkeychain-mainnet-op-reth-pruned/node
- traefik.http.services.hashkeychain-mainnet-op-reth-pruned-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/hashkeychain-mainnet-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace-node.rule=PathPrefix(`/hashkeychain-mainnet-op-reth-pruned/node`)}
- traefik.http.routers.hashkeychain-mainnet-op-reth-pruned-trace-node.middlewares=hashkeychain-mainnet-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
hashkeychain-mainnet-op-reth-pruned-trace:
hashkeychain-mainnet-op-reth-pruned-trace_config:
x-ephemeral-volumes:
- hashkeychain-mainnet-op-reth-pruned-trace_config
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: hashkey
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,202 @@
---
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:op/reth/hashkeychain-testnet-op-reth-pruned-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/hashkeychain-testnet-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
hashkeychain-testnet-op-reth-pruned-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || curl -fsSL -o /config/genesis.json "https://hashkeychain.s3.ap-southeast-1.amazonaws.com/testnet/genesis.json"
restart: no
networks:
- chains
volumes:
- ./op/hashkeychain/testnet:/config
logging: *logging-defaults
hashkeychain-testnet-op-reth-pruned:
image: ${HASHKEYCHAIN_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${HASHKEYCHAIN_TESTNET_RETH_VERSION:-v2.3.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: root
expose:
- 8545
- 9001
- 8551
entrypoint: [op-reth, node]
command:
- --chain=/config/genesis.json
- --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth
- --disable-discovery
- --engine.cross-block-cache-size=${HASHKEYCHAIN_TESTNET_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --rollup.sequencer-http=https://testnet.hsk.xyz
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
depends_on:
hashkeychain-testnet-op-reth-pruned-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${HASHKEYCHAIN_TESTNET_OP_RETH_PRUNED_TRACE_DATA:-hashkeychain-testnet-op-reth-pruned-trace}:/root/.local/share/reth
- ./op/hashkeychain/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-testnet-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/hashkeychain-testnet-op-reth-pruned
- traefik.http.services.hashkeychain-testnet-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/hashkeychain-testnet-op-reth-pruned`) || Path(`/hashkeychain-testnet-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace.rule=Path(`/hashkeychain-testnet-op-reth-pruned`) || Path(`/hashkeychain-testnet-op-reth-pruned/`)}
- traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace.middlewares=hashkeychain-testnet-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
hashkeychain-testnet-op-reth-pruned-node:
image: ${HASHKEYCHAIN_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${HASHKEYCHAIN_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 16964:16964
- 16964:16964/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${HASHKEYCHAIN_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=133
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://hashkeychain-testnet-op-reth-pruned:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16964
- KONA_NODE_P2P_LISTEN_UDP_PORT=16964
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
hashkeychain-testnet-op-reth-pruned:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/hashkeychain/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.hashkeychain-testnet-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/hashkeychain-testnet-op-reth-pruned/node
- traefik.http.services.hashkeychain-testnet-op-reth-pruned-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/hashkeychain-testnet-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace-node.rule=PathPrefix(`/hashkeychain-testnet-op-reth-pruned/node`)}
- traefik.http.routers.hashkeychain-testnet-op-reth-pruned-trace-node.middlewares=hashkeychain-testnet-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
hashkeychain-testnet-op-reth-pruned-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: hashkey-testnet
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,183 @@
---
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:op/reth/metal-mainnet-op-reth-pruned-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/metal-mainnet-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
metal-mainnet-op-reth-pruned:
image: ${METAL_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${METAL_MAINNET_RETH_VERSION:-v2.3.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: root
ports:
- 11194:11194
- 11194:11194/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [op-reth, node]
command:
- --chain=metal
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${METAL_MAINNET_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=11194
- --rollup.sequencer-http=https://rpc.metall2.com
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${METAL_MAINNET_OP_RETH_PRUNED_TRACE_DATA:-metal-mainnet-op-reth-pruned-trace}:/root/.local/share/reth
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.metal-mainnet-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/metal-mainnet-op-reth-pruned
- traefik.http.services.metal-mainnet-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/metal-mainnet-op-reth-pruned`) || Path(`/metal-mainnet-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.metal-mainnet-op-reth-pruned-trace.rule=Path(`/metal-mainnet-op-reth-pruned`) || Path(`/metal-mainnet-op-reth-pruned/`)}
- traefik.http.routers.metal-mainnet-op-reth-pruned-trace.middlewares=metal-mainnet-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
metal-mainnet-op-reth-pruned-node:
image: ${METAL_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${METAL_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 16194:16194
- 16194:16194/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${METAL_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1750
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://metal-mainnet-op-reth-pruned:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=16194
- KONA_NODE_P2P_LISTEN_UDP_PORT=16194
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
metal-mainnet-op-reth-pruned:
condition: service_started
restart: true
networks:
- chains
volumes:
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.metal-mainnet-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/metal-mainnet-op-reth-pruned/node
- traefik.http.services.metal-mainnet-op-reth-pruned-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.metal-mainnet-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/metal-mainnet-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.metal-mainnet-op-reth-pruned-trace-node.rule=PathPrefix(`/metal-mainnet-op-reth-pruned/node`)}
- traefik.http.routers.metal-mainnet-op-reth-pruned-trace-node.middlewares=metal-mainnet-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
metal-mainnet-op-reth-pruned-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: metall2
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,185 @@
---
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:op/reth/superseed-sepolia-op-reth-pruned-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/superseed-sepolia-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
superseed-sepolia-op-reth-pruned:
image: ${SUPERSEED_RETH_IMAGE:-ghcr.io/conduitxyz/conduit-op-reth}:${SUPERSEED_SEPOLIA_RETH_VERSION:-v2.1.0}
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: root
expose:
- 8545
- 9001
- 8551
entrypoint: [op-reth, node]
command:
- --chain=/config/genesis.json
- --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth
- --disable-discovery
- --engine.cross-block-cache-size=${SUPERSEED_SEPOLIA_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --rollup.historicalrpc=${SUPERSEED_SEPOLIA_CLASSIC_ARCHIVE_RPC:-https://sepolia.superseed.xyz}
- --rollup.sequencer-http=https://sepolia.superseed.xyz
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${SUPERSEED_SEPOLIA_OP_RETH_PRUNED_TRACE_DATA:-superseed-sepolia-op-reth-pruned-trace}:/root/.local/share/reth
- ./op/superseed/sepolia:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.superseed-sepolia-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/superseed-sepolia-op-reth-pruned
- traefik.http.services.superseed-sepolia-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/superseed-sepolia-op-reth-pruned`) || Path(`/superseed-sepolia-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.superseed-sepolia-op-reth-pruned-trace.rule=Path(`/superseed-sepolia-op-reth-pruned`) || Path(`/superseed-sepolia-op-reth-pruned/`)}
- traefik.http.routers.superseed-sepolia-op-reth-pruned-trace.middlewares=superseed-sepolia-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
superseed-sepolia-op-reth-pruned-node:
image: ${SUPERSEED_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${SUPERSEED_SEPOLIA_KONA_VERSION:-v1.6.1}
ports:
- 17399:17399
- 17399:17399/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${SUPERSEED_SEPOLIA_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=53302
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://superseed-sepolia-op-reth-pruned:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enode://c9fb471294f243ce4aa32f8987d743fed73fa109013996f169f81914efd2a76762f2f142bd6dcc147afe342c752a587e06ef2ea1418c99ff757986242e372f3d@34.105.58.183:9222?discport=30301,enode://d25ce99435982b04d60c4b41ba256b84b888626db7bee45a9419382300fbe907359ae5ef250346785bff8d3b9d07cd3e017a27e2ee3cfda3bcbb0ba762ac9674@bootnode.conduit.xyz:0?discport=30301,enode://2d4e7e9d48f4dd4efe9342706dd1b0024681bd4c3300d021f86fc75eab7865d4e0cbec6fbc883f011cfd6a57423e7e2f6e104baad2b744c3cafaec6bc7dc92c1@34.65.43.171:0?discport=30305,enode://9d7a3efefe442351217e73b3a593bcb8efffb55b4807699972145324eab5e6b382152f8d24f6301baebbfb5ecd4127bd3faab2842c04cd432bdf50ba092f6645@34.65.109.126:0?discport=30305
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=17399
- KONA_NODE_P2P_LISTEN_UDP_PORT=17399
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
superseed-sepolia-op-reth-pruned:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/superseed/sepolia:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.superseed-sepolia-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/superseed-sepolia-op-reth-pruned/node
- traefik.http.services.superseed-sepolia-op-reth-pruned-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.superseed-sepolia-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/superseed-sepolia-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.superseed-sepolia-op-reth-pruned-trace-node.rule=PathPrefix(`/superseed-sepolia-op-reth-pruned/node`)}
- traefik.http.routers.superseed-sepolia-op-reth-pruned-trace-node.middlewares=superseed-sepolia-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
superseed-sepolia-op-reth-pruned-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: superseed-sepolia
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,210 @@
---
x-logging-defaults: &logging-defaults
driver: json-file
options:
max-size: "10m"
max-file: "3"
# X Layer mainnet/testnet require the official OKX reth snapshot — do NOT sync from scratch.
# Generic op-reth can't read the X Layer DB format (xlayerdb), so this uses xlayer/op-reth
# (pinned in context.yml) with the image's built-in xlayer-<network> chain spec and the OKX
# archive reth.toml. --rpc.legacy-url (the public X Layer RPC) gap-fills history after the
# snapshot loads. node_sync=true already gives op-node consensus-layer + reth --disable-discovery.
# 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:op/reth/xlayer-mainnet-op-reth-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/xlayer-mainnet-op-reth \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
xlayer-mainnet-op-reth-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || wget -qO- "https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz" | tar -xzf - -O --wildcards "*.json" > /config/genesis.json
restart: no
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
logging: *logging-defaults
xlayer-mainnet-op-reth:
image: ${XLAYER_RETH_IMAGE:-xlayer/xlayer-reth}:${XLAYER_MAINNET_RETH_VERSION:-v0.0.6.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
expose:
- 8545
- 9001
- 8551
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
entrypoint: [op-reth, node]
command:
- --chain=xlayer-mainnet
- --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth
- --disable-discovery
- --engine.cross-block-cache-size=${XLAYER_MAINNET_RETH_STATE_CACHE:-4096}
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --rollup.sequencer-http=https://rpc.xlayer.tech
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.legacy-url=https://rpc.xlayer.tech
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
depends_on:
xlayer-mainnet-op-reth-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${XLAYER_MAINNET_OP_RETH_ARCHIVE_TRACE_DATA:-xlayer-mainnet-op-reth-archive-trace}:/root/.local/share/reth
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-reth-archive-trace-stripprefix.stripprefix.prefixes=/xlayer-mainnet-op-reth
- traefik.http.services.xlayer-mainnet-op-reth-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/xlayer-mainnet-op-reth`) || Path(`/xlayer-mainnet-op-reth/`))}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-reth-archive-trace.rule=Path(`/xlayer-mainnet-op-reth`) || Path(`/xlayer-mainnet-op-reth/`)}
- traefik.http.routers.xlayer-mainnet-op-reth-archive-trace.middlewares=xlayer-mainnet-op-reth-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
xlayer-mainnet-op-reth-node:
image: ${XLAYER_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${XLAYER_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18556:18556
- 18556:18556/udp
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${XLAYER_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=196
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://xlayer-mainnet-op-reth:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enode://c67d7f63c5483ab8311123d2997bfe6a8aac2b117a40167cf71682f8a3e37d3b86547c786559355c4c05ae0b1a7e7a1b8fde55050b183f96728d62e276467ce1@8.210.177.150:9223,enode://28e3e305b266e01226a7cc979ab692b22507784095157453ee0e34607bb3beac9a5b00f3e3d7d3ac36164612ca25108e6b79f75e3a9ecb54a0b3e7eb3e097d37@8.210.15.172:9223,enode://b5aa43622aad25c619650a0b7f8bb030161dfbfd5664233f92d841a33b404cea3ffffdc5bc8d6667c7dc212242a52f0702825c1e51612047f75c847ab96ef7a6@8.210.69.97:9223
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18556
- KONA_NODE_P2P_LISTEN_UDP_PORT=18556
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
xlayer-mainnet-op-reth:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-reth-archive-trace-node-stripprefix.stripprefix.prefixes=/xlayer-mainnet-op-reth/node
- traefik.http.services.xlayer-mainnet-op-reth-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/xlayer-mainnet-op-reth/node`)}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-reth-archive-trace-node.rule=PathPrefix(`/xlayer-mainnet-op-reth/node`)}
- traefik.http.routers.xlayer-mainnet-op-reth-archive-trace-node.middlewares=xlayer-mainnet-op-reth-archive-trace-node-stripprefix, ipallowlist
volumes:
xlayer-mainnet-op-reth-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: xlayer
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,211 @@
---
x-logging-defaults: &logging-defaults
driver: json-file
options:
max-size: "10m"
max-file: "3"
# X Layer mainnet/testnet require the official OKX reth snapshot — do NOT sync from scratch.
# Generic op-reth can't read the X Layer DB format (xlayerdb), so this uses xlayer/op-reth
# (pinned in context.yml) with the image's built-in xlayer-<network> chain spec and the OKX
# archive reth.toml. --rpc.legacy-url (the public X Layer RPC) gap-fills history after the
# snapshot loads. node_sync=true already gives op-node consensus-layer + reth --disable-discovery.
# 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:op/reth/xlayer-testnet-op-reth-archive-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/xlayer-testnet-op-reth \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
xlayer-testnet-op-reth-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || wget -qO- "https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.tar.gz" | tar -xzf - -O --wildcards "*.json" > /config/genesis.json
restart: no
networks:
- chains
volumes:
- ./op/xlayer/testnet:/config
logging: *logging-defaults
xlayer-testnet-op-reth:
image: ${XLAYER_RETH_IMAGE:-xlayer/xlayer-reth}:${XLAYER_TESTNET_RETH_VERSION:-v0.0.6.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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
expose:
- 8545
- 9001
- 8551
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.tar.gz
entrypoint: [op-reth, node]
command:
- --chain=xlayer-testnet
- --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth
- --disable-discovery
- --engine.cross-block-cache-size=${XLAYER_TESTNET_RETH_STATE_CACHE:-4096}
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --rollup.sequencer-http=https://testrpc.xlayer.tech
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.legacy-url=https://testrpc.xlayer.tech
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
depends_on:
xlayer-testnet-op-reth-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${XLAYER_TESTNET_OP_RETH_ARCHIVE_TRACE_DATA:-xlayer-testnet-op-reth-archive-trace}:/root/.local/share/reth
- ./op/xlayer/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-testnet-op-reth-archive-trace-stripprefix.stripprefix.prefixes=/xlayer-testnet-op-reth
- traefik.http.services.xlayer-testnet-op-reth-archive-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-archive-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-archive-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-archive-trace.rule=Host(`$DOMAIN`) && (Path(`/xlayer-testnet-op-reth`) || Path(`/xlayer-testnet-op-reth/`))}
- ${NO_SSL:+traefik.http.routers.xlayer-testnet-op-reth-archive-trace.rule=Path(`/xlayer-testnet-op-reth`) || Path(`/xlayer-testnet-op-reth/`)}
- traefik.http.routers.xlayer-testnet-op-reth-archive-trace.middlewares=xlayer-testnet-op-reth-archive-trace-stripprefix, ipallowlist
shm_size: 2gb
xlayer-testnet-op-reth-node:
image: ${XLAYER_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${XLAYER_TESTNET_KONA_VERSION:-v1.6.1}
ports:
- 18466:18466
- 18466:18466/udp
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.tar.gz
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${XLAYER_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=1952
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://xlayer-testnet-op-reth:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_OVERRIDE_PECTRA_BLOB_SCHEDULE=1742486400
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_BOOTNODES=enode://eaae9fe2fc758add65fe4cfd42918e898e16ab23294db88f0dcdbcab2773e75bbea6bfdaa42b3ed502dfbee1335c242c602078c4aa009264e4705caa20d3dca7@8.210.181.50:9223
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18466
- KONA_NODE_P2P_LISTEN_UDP_PORT=18466
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
xlayer-testnet-op-reth:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/xlayer/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-testnet-op-reth-archive-trace-node-stripprefix.stripprefix.prefixes=/xlayer-testnet-op-reth/node
- traefik.http.services.xlayer-testnet-op-reth-archive-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-archive-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-archive-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-archive-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/xlayer-testnet-op-reth/node`)}
- ${NO_SSL:+traefik.http.routers.xlayer-testnet-op-reth-archive-trace-node.rule=PathPrefix(`/xlayer-testnet-op-reth/node`)}
- traefik.http.routers.xlayer-testnet-op-reth-archive-trace-node.middlewares=xlayer-testnet-op-reth-archive-trace-node-stripprefix, ipallowlist
volumes:
xlayer-testnet-op-reth-archive-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: xlayer-testnet
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,186 @@
---
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:op/reth/zora-mainnet-op-reth-pruned-trace--kona.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/zora-mainnet-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
zora-mainnet-op-reth-pruned:
image: ${ZORA_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${ZORA_MAINNET_RETH_VERSION:-v2.3.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: root
ports:
- 13561:13561
- 13561:13561/udp
expose:
- 8545
- 9001
- 8551
entrypoint: [op-reth, node]
command:
- --chain=/config/genesis.json
- --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth
- --engine.cross-block-cache-size=${ZORA_MAINNET_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --nat=extip:${IP}
- --port=13561
- --rollup.sequencer-http=https://rpc.zora.energy
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${ZORA_MAINNET_OP_RETH_PRUNED_TRACE_DATA:-zora-mainnet-op-reth-pruned-trace}:/root/.local/share/reth
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/zora-mainnet-op-reth-pruned
- traefik.http.services.zora-mainnet-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/zora-mainnet-op-reth-pruned`) || Path(`/zora-mainnet-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-reth-pruned-trace.rule=Path(`/zora-mainnet-op-reth-pruned`) || Path(`/zora-mainnet-op-reth-pruned/`)}
- traefik.http.routers.zora-mainnet-op-reth-pruned-trace.middlewares=zora-mainnet-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
zora-mainnet-op-reth-pruned-node:
image: ${ZORA_KONA_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/kona-node}:${ZORA_MAINNET_KONA_VERSION:-v1.6.1}
ports:
- 18561:18561
- 18561:18561/udp
environment:
- KONA_METRICS_ADDR=0.0.0.0
- KONA_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- KONA_NODE_L1_ETH_RPC=${ZORA_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- KONA_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- KONA_NODE_L2_CHAIN_ID=7777777
- KONA_NODE_L2_ENGINE_AUTH=/jwtsecret
- KONA_NODE_L2_ENGINE_RPC=http://zora-mainnet-op-reth-pruned:8551
- KONA_NODE_L2_ENGINE_TIMEOUT=120000
- KONA_NODE_L2_TRUST_RPC=true
- KONA_NODE_METRICS_PORT=7300
- KONA_NODE_MODE=Validator
- KONA_NODE_P2P_ADVERTISE_IP=${IP}
- KONA_NODE_P2P_LISTEN_IP=0.0.0.0
- KONA_NODE_P2P_LISTEN_TCP_PORT=18561
- KONA_NODE_P2P_LISTEN_UDP_PORT=18561
- KONA_NODE_RPC_ADDR=0.0.0.0
- KONA_NODE_RPC_PORT=9545
entrypoint: [kona-node, node]
restart: unless-stopped
depends_on:
zora-mainnet-op-reth-pruned:
condition: service_started
restart: true
networks:
- chains
volumes:
- ./op/zora/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.zora-mainnet-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/zora-mainnet-op-reth-pruned/node
- traefik.http.services.zora-mainnet-op-reth-pruned-trace-node.loadbalancer.server.port=9545
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.zora-mainnet-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/zora-mainnet-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.zora-mainnet-op-reth-pruned-trace-node.rule=PathPrefix(`/zora-mainnet-op-reth-pruned/node`)}
- traefik.http.routers.zora-mainnet-op-reth-pruned-trace-node.middlewares=zora-mainnet-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
zora-mainnet-op-reth-pruned-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: zora
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...