- Add linea/geth/ compose files (mainnet/sepolia, pruned/archive) - Update Maru version and --network flag in besu/erigon3 configs - Update compose_registry.json Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
186 lines
7.4 KiB
YAML
186 lines
7.4 KiB
YAML
---
|
|
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:linea/geth/linea-sepolia-geth-archive-leveldb-hash.yml
|
|
#
|
|
# docker compose up -d
|
|
#
|
|
# curl -X POST https://${IP}.traefik.me/linea-sepolia-geth-archive \
|
|
# -H "Content-Type: application/json" \
|
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
|
|
|
services:
|
|
linea-sepolia-geth-archive:
|
|
image: ${LINEA_GETH_IMAGE:-ethereum/client-go}:${LINEA_SEPOLIA_GETH_VERSION:-v1.16.7}
|
|
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:
|
|
- 11564:11564
|
|
- 11564:11564/udp
|
|
expose:
|
|
- 8545
|
|
- 6060
|
|
- 8551
|
|
environment:
|
|
- GETH_BOOTNODES=enode://6f20afbe4397e51b717a7c1ad3095e79aee48c835eebd9237a3e8a16951ade1fe0e66e981e30ea269849fcb6ba03d838da37f524fabd2a557474194a2e2604fa@18.221.100.27:31002,enode://ce1e0d8e0500cb5c0ac56bdcdafb2d6320c3a2c5125b5ccf12f5dfc9b47ee74acbcafc32559017613136c9c36a0ce74ba4f83b7fb8244f099f3b15708d9d3129@3.23.75.47:31000,enode://1b026a5eb0ae74300f58987d235ef0e3a550df963345cb3574be3b0b54378bd11f14dfd515a8976f2c2d2826090e9507b8ccc24f896a9ffffffcabcfd996a733@3.129.120.128:31001
|
|
entrypoint: /bin/sh -c '[ ! -d /root/.ethereum/geth ] && geth --db.engine=leveldb --gcmode=archive --datadir /root/.ethereum init --state.scheme=hash /config/genesis.json; exec geth "$@"' --
|
|
command:
|
|
- --bootnodes=enode://6f20afbe4397e51b717a7c1ad3095e79aee48c835eebd9237a3e8a16951ade1fe0e66e981e30ea269849fcb6ba03d838da37f524fabd2a557474194a2e2604fa@18.221.100.27:31002,enode://ce1e0d8e0500cb5c0ac56bdcdafb2d6320c3a2c5125b5ccf12f5dfc9b47ee74acbcafc32559017613136c9c36a0ce74ba4f83b7fb8244f099f3b15708d9d3129@3.23.75.47:31000,enode://1b026a5eb0ae74300f58987d235ef0e3a550df963345cb3574be3b0b54378bd11f14dfd515a8976f2c2d2826090e9507b8ccc24f896a9ffffffcabcfd996a733@3.129.120.128:31001
|
|
- --datadir=/root/.ethereum
|
|
- --db.engine=leveldb
|
|
- --gcmode=archive
|
|
- --maxpeers=50
|
|
- --metrics
|
|
- --metrics.addr=0.0.0.0
|
|
- --metrics.port=6060
|
|
- --nat=extip:${IP}
|
|
- --port=11564
|
|
- --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
|
|
- --http.port=8545
|
|
- --http.vhosts=*
|
|
- --ws
|
|
- --ws.addr=0.0.0.0
|
|
- --ws.api=eth,net,web3,debug,admin,txpool
|
|
- --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:
|
|
- ${LINEA_SEPOLIA_GETH_ARCHIVE_LEVELDB_HASH_DATA:-linea-sepolia-geth-archive-leveldb-hash}:/root/.ethereum
|
|
- ./linea/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.linea-sepolia-geth-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/linea-sepolia-geth-archive
|
|
- traefik.http.services.linea-sepolia-geth-archive-leveldb-hash.loadbalancer.server.port=8545
|
|
- ${NO_SSL:-traefik.http.routers.linea-sepolia-geth-archive-leveldb-hash.entrypoints=websecure}
|
|
- ${NO_SSL:-traefik.http.routers.linea-sepolia-geth-archive-leveldb-hash.tls.certresolver=myresolver}
|
|
- ${NO_SSL:-traefik.http.routers.linea-sepolia-geth-archive-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/linea-sepolia-geth-archive`) || Path(`/linea-sepolia-geth-archive/`))}
|
|
- ${NO_SSL:+traefik.http.routers.linea-sepolia-geth-archive-leveldb-hash.rule=Path(`/linea-sepolia-geth-archive`) || Path(`/linea-sepolia-geth-archive/`)}
|
|
- traefik.http.routers.linea-sepolia-geth-archive-leveldb-hash.middlewares=linea-sepolia-geth-archive-leveldb-hash-stripprefix, ipallowlist
|
|
|
|
linea-sepolia-geth-archive-node:
|
|
build:
|
|
context: ./linea
|
|
dockerfile: maru.Dockerfile
|
|
args:
|
|
MARU_IMAGE: ${LINEA_SEPOLIA_MARU_IMAGE:-consensys/maru}
|
|
MARU_VERSION: ${LINEA_SEPOLIA_MARU_VERSION:-v1.0.0-20260108114606-36f5e2f}
|
|
ports:
|
|
- 16564:16564
|
|
- 16564:16564/udp
|
|
expose:
|
|
- 8080
|
|
environment:
|
|
- EL_HOST=linea-sepolia-geth-archive
|
|
- IP=${IP}
|
|
- L1_RPC=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
|
|
- P2P_PORT=16564
|
|
- SEQUENCER=https://rpc.sepolia.linea.build
|
|
entrypoint: [/bin/bash, -c]
|
|
command:
|
|
- |
|
|
envsubst < /config/maru/config.toml.template > /config.toml
|
|
exec java -Dlog4j2.configurationFile=/config/maru/log4j.xml -jar /opt/consensys/maru/maru.jar --network=linea-sepolia --config=/config.toml "$@"
|
|
restart: unless-stopped
|
|
networks:
|
|
- chains
|
|
volumes:
|
|
- ${LINEA_SEPOLIA_GETH_ARCHIVE_LEVELDB_HASH__MARU_DATA:-linea-sepolia-geth-archive-leveldb-hash_maru}:/opt/maru/data
|
|
- ./linea/sepolia:/config
|
|
- .jwtsecret:/jwtsecret:ro
|
|
logging: *logging-defaults
|
|
labels:
|
|
- prometheus-scrape.enabled=true
|
|
- prometheus-scrape.port=9090
|
|
- prometheus-scrape.path=/debug/metrics/prometheus
|
|
|
|
volumes:
|
|
linea-sepolia-geth-archive-leveldb-hash:
|
|
linea-sepolia-geth-archive-leveldb-hash_maru:
|
|
|
|
x-upstreams:
|
|
- id: $${ID}
|
|
labels:
|
|
provider: $${PROVIDER}
|
|
connection:
|
|
generic:
|
|
rpc:
|
|
url: $${RPC_URL}
|
|
ws:
|
|
frameSize: 20Mb
|
|
msgSize: 50Mb
|
|
url: $${WS_URL}
|
|
chain: linea-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
|
|
... |