Compare commits

..

1 Commits

Author SHA1 Message Date
a7135129eb fix: use admin_addPeer for op-geth peer reconciliation
op-geth does not support admin_addStaticPeer; classify op-geth via
compose path (admin_nodeInfo often still says Geth) and fall back on
go-ethereum-style "does not exist/is not available" errors so reinject
and connect-peers restore peers (e.g. hashkey-mainnet).
2026-07-30 11:58:12 +00:00
13 changed files with 55 additions and 357 deletions

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services: services:
arc-mainnet-archive-consensus-init: arc-mainnet-archive-consensus-init:
image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_MAINNET_CONSENSUS_VERSION:-v0.7.3} image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_MAINNET_CONSENSUS_VERSION:-0.7.2}
user: 0:0 user: 0:0
entrypoint: [/usr/local/bin/arc-node-consensus, init] entrypoint: [/usr/local/bin/arc-node-consensus, init]
command: command:
@@ -57,7 +57,7 @@ services:
logging: *logging-defaults logging: *logging-defaults
arc-mainnet-archive: arc-mainnet-archive:
image: ${ARC_RETH_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-execution}:${ARC_MAINNET_RETH_VERSION:-v0.7.3} image: ${ARC_RETH_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-execution}:${ARC_MAINNET_RETH_VERSION:-0.7.2}
sysctls: sysctls:
# TCP Performance # TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
@@ -119,7 +119,7 @@ services:
shm_size: 2gb shm_size: 2gb
arc-mainnet-archive-node: arc-mainnet-archive-node:
image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_MAINNET_CONSENSUS_VERSION:-v0.7.3} image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_MAINNET_CONSENSUS_VERSION:-0.7.2}
user: 0:0 user: 0:0
expose: expose:
- 31000 - 31000

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services: services:
arc-mainnet-consensus-init: arc-mainnet-consensus-init:
image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_MAINNET_CONSENSUS_VERSION:-v0.7.3} image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_MAINNET_CONSENSUS_VERSION:-0.7.2}
user: 0:0 user: 0:0
entrypoint: [/usr/local/bin/arc-node-consensus, init] entrypoint: [/usr/local/bin/arc-node-consensus, init]
command: command:
@@ -57,7 +57,7 @@ services:
logging: *logging-defaults logging: *logging-defaults
arc-mainnet: arc-mainnet:
image: ${ARC_RETH_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-execution}:${ARC_MAINNET_RETH_VERSION:-v0.7.3} image: ${ARC_RETH_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-execution}:${ARC_MAINNET_RETH_VERSION:-0.7.2}
sysctls: sysctls:
# TCP Performance # TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
@@ -120,7 +120,7 @@ services:
shm_size: 2gb shm_size: 2gb
arc-mainnet-node: arc-mainnet-node:
image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_MAINNET_CONSENSUS_VERSION:-v0.7.3} image: ${ARC_CONSENSUS_IMAGE:-docker.cloudsmith.io/circle/arc-network/arc-consensus}:${ARC_MAINNET_CONSENSUS_VERSION:-0.7.2}
user: 0:0 user: 0:0
expose: expose:
- 31000 - 31000

View File

@@ -16,6 +16,6 @@
"api-max-blocks-per-request": 0, "api-max-blocks-per-request": 0,
"allow-unfinalized-queries": false, "allow-unfinalized-queries": false,
"log-level": "info", "log-level": "info",
"state-sync-enabled": true, "state-sync-enabled": false,
"state-sync-skip-resume": true "state-sync-skip-resume": true
} }

View File

@@ -157,15 +157,8 @@ for key in $keys; do
folder_size_gb=$(printf "%.0f" "$folder_size") folder_size_gb=$(printf "%.0f" "$folder_size")
if (( folder_size_gb < 1 )) && [[ "$FORCE_SMALL" != true ]]; then if (( folder_size_gb < 1 )) && [[ "$FORCE_SMALL" != true ]]; then
# The torn-backup floor applies to the MAIN data volume only (key == compose echo "FATAL: existing datadir too small for backup (${folder_size_gb}G at $source_folder); use --force if intentional" >&2
# basename). Sidecar volumes (eigenda-proxy, configs, ...) are legitimately exit 1
# tiny — a 0G sidecar aborting the whole backup left no manifest and blocked
# the refresh lane on every ronin bench-retire (4 cycles, 2026-07).
if [[ "$key" == "$(basename "$compose_name")" ]]; then
echo "FATAL: existing datadir too small for backup (${folder_size_gb}G at $source_folder); use --force if intentional" >&2
exit 1
fi
echo "NOTE: sidecar volume rpc_$key is ${folder_size_gb}G — allowing small backup (floor guards the main data volume only)"
fi fi
timestamp=$(date +'%Y-%m-%d-%H-%M-%S') timestamp=$(date +'%Y-%m-%d-%H-%M-%S')

View File

@@ -8389,23 +8389,6 @@
"polygon-mainnet-bor-archive-pebble-path" "polygon-mainnet-bor-archive-pebble-path"
] ]
}, },
{
"chain": "mainnet",
"client": "bor",
"compose_file": "polygon/bor/polygon-mainnet-bor-minimal-pebble-path",
"features": [
"path",
"pebble"
],
"network": "polygon",
"node": null,
"relay": null,
"stack": null,
"type": "minimal",
"volumes": [
"polygon-mainnet-bor-minimal-pebble-path"
]
},
{ {
"chain": "mainnet", "chain": "mainnet",
"client": "bor", "client": "bor",

View File

@@ -318,12 +318,19 @@ check_rpc_success() {
return 1 return 1
} }
# Function to detect client type from node name # Function to detect client type from node name (+ optional compose path hint).
# op-geth often still reports admin_nodeInfo.name as "Geth/…", so the compose
# path (…/op-geth/… or *-op-geth-*) is the reliable signal.
detect_client_type() { detect_client_type() {
local node_name="$1" local node_name="$1"
local compose_hint="${2:-}"
local name_lower=$(echo "$node_name" | tr '[:upper:]' '[:lower:]') local name_lower=$(echo "$node_name" | tr '[:upper:]' '[:lower:]')
local hint_lower=$(echo "$compose_hint" | tr '[:upper:]' '[:lower:]')
if [[ "$name_lower" == *"geth"* ]]; then
# op-geth lacks admin_addStaticPeer — must use admin_addPeer
if [[ "$name_lower" == *"op-geth"* ]] || [[ "$hint_lower" == *"op-geth"* ]]; then
echo "op-geth"
elif [[ "$name_lower" == *"geth"* ]]; then
echo "geth" echo "geth"
elif [[ "$name_lower" == *"reth"* ]]; then elif [[ "$name_lower" == *"reth"* ]]; then
echo "reth" echo "reth"
@@ -346,12 +353,12 @@ add_static_peer() {
local response local response
local method local method
# Determine which method to try first based on client type # Determine which method to try first based on client type.
# Only vanilla geth supports admin_addStaticPeer; op-geth does not.
if [[ "$client_type" == "geth" ]]; then if [[ "$client_type" == "geth" ]]; then
# Geth supports admin_addStaticPeer
method="admin_addStaticPeer" method="admin_addStaticPeer"
else else
# Reth and most other clients use admin_addPeer # op-geth, reth, and most other clients use admin_addPeer
method="admin_addPeer" method="admin_addPeer"
fi fi
@@ -364,10 +371,11 @@ add_static_peer() {
return 1 return 1
} }
# Check if method not found, try fallback # Fallback when the primary method is unsupported. go-ethereum-style errors
if echo "$response" | grep -qi "method not found"; then # say "the method X does not exist/is not available", not "method not found".
if echo "$response" | grep -qiE 'method not found|does not exist|not available|-32601'; then
if [[ "$method" == "admin_addStaticPeer" ]]; then if [[ "$method" == "admin_addStaticPeer" ]]; then
# Try admin_addPeer as fallback # Try admin_addPeer as fallback (required for op-geth)
method="admin_addPeer" method="admin_addPeer"
response=$(curl --ipv4 -s -X POST "$url" \ response=$(curl --ipv4 -s -X POST "$url" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
@@ -425,7 +433,7 @@ echo -e "${GREEN}OK${NC}"
SOURCE_ENODE=$(extract_enode "$SOURCE_INFO") SOURCE_ENODE=$(extract_enode "$SOURCE_INFO")
SOURCE_NAME=$(extract_name "$SOURCE_INFO") SOURCE_NAME=$(extract_name "$SOURCE_INFO")
SOURCE_PUBKEY=$(echo "$SOURCE_ENODE" | sed -E 's|enode://([^@]+)@.*|\1|') SOURCE_PUBKEY=$(echo "$SOURCE_ENODE" | sed -E 's|enode://([^@]+)@.*|\1|')
SOURCE_CLIENT=$(detect_client_type "$SOURCE_NAME") SOURCE_CLIENT=$(detect_client_type "$SOURCE_NAME" "$COMPOSE_FILE")
if [[ -z "$SOURCE_ENODE" ]]; then if [[ -z "$SOURCE_ENODE" ]]; then
echo -e "${RED}Could not extract enode from source${NC}" echo -e "${RED}Could not extract enode from source${NC}"
@@ -457,7 +465,7 @@ echo -e "${GREEN}OK${NC}"
TARGET_ENODE=$(extract_enode "$TARGET_INFO") TARGET_ENODE=$(extract_enode "$TARGET_INFO")
TARGET_NAME=$(extract_name "$TARGET_INFO") TARGET_NAME=$(extract_name "$TARGET_INFO")
TARGET_PUBKEY=$(echo "$TARGET_ENODE" | sed -E 's|enode://([^@]+)@.*|\1|') TARGET_PUBKEY=$(echo "$TARGET_ENODE" | sed -E 's|enode://([^@]+)@.*|\1|')
TARGET_CLIENT=$(detect_client_type "$TARGET_NAME") TARGET_CLIENT=$(detect_client_type "$TARGET_NAME" "$TARGET_COMPOSE_FILE")
if [[ -z "$TARGET_ENODE" ]]; then if [[ -z "$TARGET_ENODE" ]]; then
echo -e "${RED}Could not extract enode from target${NC}" echo -e "${RED}Could not extract enode from target${NC}"

View File

@@ -1,14 +1,10 @@
# [linea] finalization provider DISABLED (2026-07-31): Maru CL stuck at slot # Uncomment the below [linea] section for finalized L2 block tag
# 6764022 with EL head ~24k behind tip; Maru sent FCU finalized ahead of EL [linea]
# head → Besu -38002 Invalid forkchoice. Maru has no linea.enabled flag — contract-address = "0xd19d4B5d358258f05D7B411E21A1460D11B0876F"
# presence of [linea] enables the provider; comment out to disable. Re-enable l1-eth-api = { endpoint = "${L1_RPC}" }
# (uncomment) once EL has caught tip. l1-polling-interval = "6 seconds"
# [linea] l1-highest-block-tag = "finalized"
# contract-address = "0xd19d4B5d358258f05D7B411E21A1460D11B0876F" l2-eth-api-endpoint = { endpoint = "${SEQUENCER}" }
# l1-eth-api = { endpoint = "${L1_RPC}" }
# l1-polling-interval = "6 seconds"
# l1-highest-block-tag = "finalized"
# l2-eth-api-endpoint = { endpoint = "${SEQUENCER}" }
[persistence] [persistence]
data-path = "/opt/maru/data" data-path = "/opt/maru/data"

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services: services:
ink-mainnet: ink-mainnet:
image: ${INK_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${INK_MAINNET_RETH_VERSION:-v2.4.0} image: ${INK_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${INK_MAINNET_RETH_VERSION:-v2.3.3}
sysctls: sysctls:
# TCP Performance # TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -106,7 +106,7 @@ services:
shm_size: 2gb shm_size: 2gb
zircuit-garfield-op-reth-pruned-node: zircuit-garfield-op-reth-pruned-node:
image: ${ZIRCUIT_NODE_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node}:${GARFIELD_NODE_VERSION:-v1.19.3} image: ${ZIRCUIT_NODE_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node}:${GARFIELD_NODE_VERSION:-v1.19.0}
user: root user: root
ports: ports:
- 18027:18027 - 18027:18027

View File

@@ -78,16 +78,21 @@ CLIENT_NAME="$(echo "$INFO" | jq -r '.result.name // empty' 2>/dev/null || true)
PEERS_JSON="$(rpc admin_peers)" PEERS_JSON="$(rpc admin_peers)"
PEER_COUNT="$(echo "$PEERS_JSON" | jq -r '.result | length' 2>/dev/null || echo 0)" PEER_COUNT="$(echo "$PEERS_JSON" | jq -r '.result | length' 2>/dev/null || echo 0)"
# Detect client type (connect-peers.sh logic) # Detect client type (connect-peers.sh logic).
# op-geth often still reports as "Geth/…" — prefer compose path for op-geth.
NAME_LC="$(echo "$CLIENT_NAME" | tr '[:upper:]' '[:lower:]')" NAME_LC="$(echo "$CLIENT_NAME" | tr '[:upper:]' '[:lower:]')"
CLIENT_TYPE="unknown" CLIENT_TYPE="unknown"
case "$NAME_LC" in case "$NAME_LC" in
*op-geth*) CLIENT_TYPE="op-geth" ;;
*geth*) CLIENT_TYPE="geth" ;; *geth*) CLIENT_TYPE="geth" ;;
*reth*) CLIENT_TYPE="reth" ;; *reth*) CLIENT_TYPE="reth" ;;
*erigon*) CLIENT_TYPE="erigon" ;; *erigon*) CLIENT_TYPE="erigon" ;;
*nethermind*) CLIENT_TYPE="nethermind" ;; *nethermind*) CLIENT_TYPE="nethermind" ;;
*besu*) CLIENT_TYPE="besu" ;; *besu*) CLIENT_TYPE="besu" ;;
esac esac
case "$COMPOSE_PATH" in
*op-geth*) CLIENT_TYPE="op-geth" ;;
esac
TS="$(date -u +%Y-%m-%dT%H:%M:%SZ)" TS="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
echo "$PEERS_JSON" | jq -c --arg path "$COMPOSE_PATH" --arg ts "$TS" \ echo "$PEERS_JSON" | jq -c --arg path "$COMPOSE_PATH" --arg ts "$TS" \

View File

@@ -1,7 +1,8 @@
#!/bin/bash #!/bin/bash
# peer-reinject.sh — generic .after-start hook: re-seed peers from peer-capture state. # peer-reinject.sh — generic .after-start hook: re-seed peers from peer-capture state.
# Uses admin_addStaticPeer for geth, admin_addPeer otherwise (connect-peers.sh). # Uses admin_addStaticPeer for vanilla geth, admin_addPeer for op-geth and others
# In-network vantage (rpc_chains). Idempotent; best-effort (never fails the restart). # (connect-peers.sh). In-network vantage (rpc_chains). Idempotent; best-effort
# (never fails the restart).
# #
# Seed order (one path for us and customers): # Seed order (one path for us and customers):
# 1. Own persisted peerset (peer-state/<compose>.json from peer-capture) # 1. Own persisted peerset (peer-state/<compose>.json from peer-capture)
@@ -68,6 +69,12 @@ if [ "${#ENODES[@]}" -eq 0 ]; then
exit 0 exit 0
fi fi
# op-geth lacks admin_addStaticPeer; compose path wins over stale capture state
# that classified the node as plain "geth" (admin_nodeInfo often still says Geth).
case "$COMPOSE_PATH" in
*op-geth*) CLIENT_TYPE="op-geth" ;;
esac
BASE="$(basename "$COMPOSE_PATH" | sed 's/--.*//')" BASE="$(basename "$COMPOSE_PATH" | sed 's/--.*//')"
EL="" EL=""
# wait briefly for container after recreate # wait briefly for container after recreate
@@ -120,6 +127,7 @@ done
add_peer() { add_peer() {
local enode="$1" local enode="$1"
local method local method
# Only vanilla geth supports admin_addStaticPeer; op-geth must use admin_addPeer
if [ "$CLIENT_TYPE" = "geth" ]; then if [ "$CLIENT_TYPE" = "geth" ]; then
method="admin_addStaticPeer" method="admin_addStaticPeer"
else else
@@ -132,7 +140,8 @@ add_peer() {
resp="$(docker exec peer-hook-probe curl -s --max-time 8 -X POST \ resp="$(docker exec peer-hook-probe curl -s --max-time 8 -X POST \
-H 'Content-Type: application/json' --data "$payload" \ -H 'Content-Type: application/json' --data "$payload" \
"http://${IP}:8545" 2>/dev/null || true)" "http://${IP}:8545" 2>/dev/null || true)"
if echo "$resp" | grep -qi 'method not found'; then # go-ethereum-style: "the method X does not exist/is not available" (not "method not found")
if echo "$resp" | grep -qiE 'method not found|does not exist|not available|-32601'; then
if [ "$method" = "admin_addStaticPeer" ]; then if [ "$method" = "admin_addStaticPeer" ]; then
method="admin_addPeer" method="admin_addPeer"
else else

View File

@@ -1,148 +0,0 @@
---
x-logging-defaults: &logging-defaults
driver: json-file
options:
max-size: "512m"
max-file: "2"
# 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:polygon/bor/polygon-mainnet-bor-minimal-pebble-path.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/polygon-mainnet-minimal \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
polygon-mainnet-minimal:
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_MAINNET_BOR_VERSION:-2.9.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:
- 10259:10259
- 10259:10259/udp
expose:
- 8545
- 6060
entrypoint: [sh, -c, 'bor snapshot prune-block --datadir=/root/.bor/ --block-amount-reserved=${POLYGON_MAINNET_BOR_MINIMAL_PEBBLE_PATH_BLOCK_AMOUNT_RESERVED:-129600} --cache=${POLYGON_MAINNET_BOR_MINIMAL_PEBBLE_PATH_CACHE:-1024} && exec bor server "$@"', _]
command:
- --bootnodes=enode://07bc4cf87ff8f4e7dc51280991809940f26e846c944609ae4726309be73742a830040cd783989f6941e1b41c02405834bc6365059403a59ca9255ac695156235@34.89.75.187:30303,enode://2c3be2e637a68dc694498a44b6e0d57b5c762925ea97f941079a91f8a080b032fe2eb9e6c3230076e9fb046f626b5dcd3fb045dc9c194689a359aa7167ae0f6c@34.142.43.249:30303,enode://a0bc4dd2b59370d5a375a7ef9ac06cf531571005ae8b2ead2e9aaeb8205168919b169451fb0ef7061e0d80592e6ed0720f559bd1be1c4efb6e6c4381f1bdb986@35.246.99.203:30303,enode://f2b0d50e0b843d38ddcab59614f93065e2c82130100032f86ae193eb874505de12fcaf12502dfd88e339b817c0b374fa4b4f7c4d5a4d1aa04f29c503d95e0228@35.197.233.240:30303,enode://8a3f21c293c913a1148116a295aa69fdf41b9c5b0b0628d49be751aa8c025ae2ec1973d6d84cea8e2aba5541b5d76219dfaae41a124d42d0f56d4e1af50b74f8@35.246.95.65:30303,enode://f5cfe35f47ed928d5403aa28ee616fd64ed7daa527b5ae6a7bc412ca25eaad9b6bf2f776144fd9f8e7e9c80b5360a9c03b67f1d47ea88767def7d391cc7e0cd1@34.105.180.11:30303,enode://fc7624241515f9d5e599a396362c29de92b13a048ad361c90dd72286aa4cca835ba65e140a46ace70cc4dcb18472a476963750b3b69d958c5f546d48675880a8@34.147.169.102:30303,enode://7400e4bc70c56de26d5d240474a1b78af0bf8f0db567edfa851c9724ed697ca7692a92483369e9633d4342a036d10223958007160765d0317a1073f86f2a80c8@34.89.55.74:30303,enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303,enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303,enode://0e50fdcc2106b0c4e4d9ffbd7798ceda9432e680723dc7b7b4627e384078850c1c4a3e67f17ef2c484201ae6ee7c491cbf5e189b8ffee3948252e9bef59fc54e@35.234.148.172:30303,enode://72c3176693f7100dfedc8a37909120fea16971260a5d95ceff49affbc0e23968c35655fee75734736f0b038147645e8ceeee59af68859b3f5bf91fe249be6259@35.246.95.65:30303,enode://f0e44769385aea31de930d3f4796e3e348962221063bb9f681106d832d13f70e5543d652d30e819812104f1b1ffdd7585977b46bf802ed5a52cf731de8c48dbd@34.105.180.11:30303,enode://198896e373735ba38a0313d073137a413787ece791fbc0d0be0f9f6b9d9dd00ee0841f46519904d666d7f1cdfce5532b093e3a1574b34eb64224f57b9b7fce7b@34.89.55.74:30303
- --bor.heimdall=https://polygon-heimdall-rest.publicnode.com
- --cache.gomemlimit=${POLYGON_MAINNET_BOR_MINIMAL_PEBBLE_PATH_CACHE_GOMEMLIMIT:-}
- --cache=${POLYGON_MAINNET_BOR_MINIMAL_PEBBLE_PATH_CACHE:-1024}
- --chain=mainnet
- --datadir=/root/.bor/
- --db.engine=pebble
- --discovery.dns=enrtree://AKUEZKN7PSKVNR65FZDHECMKOJQSGPARGTPPBI7WS2VUL4EGR6XPC@pos.polygon-peers.io
- --gcmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,txpool,debug,admin,bor
- --http.port=8545
- --http.vhosts=*
- --maxpeers=50
- --metrics
- --metrics.prometheus-addr=0.0.0.0:6060
- --nat=extip:${IP}
- --port=10259
- --rpc.gascap=600000000
- --rpc.returndatalimit=10000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,txpool,debug,admin,bor
- --ws.origins=*
- --ws.port=8545
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${POLYGON_MAINNET_BOR_MINIMAL_PEBBLE_PATH_DATA:-polygon-mainnet-bor-minimal-pebble-path}:/root/.bor/
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.polygon-mainnet-bor-minimal-pebble-path-stripprefix.stripprefix.prefixes=/polygon-mainnet-minimal
- traefik.http.services.polygon-mainnet-bor-minimal-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/polygon-mainnet-minimal`) || Path(`/polygon-mainnet-minimal/`))}
- ${NO_SSL:+traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.rule=Path(`/polygon-mainnet-minimal`) || Path(`/polygon-mainnet-minimal/`)}
- traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.middlewares=polygon-mainnet-bor-minimal-pebble-path-stripprefix, ipallowlist
volumes:
polygon-mainnet-bor-minimal-pebble-path:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: polygon
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

@@ -1,148 +0,0 @@
---
x-logging-defaults: &logging-defaults
driver: json-file
options:
max-size: "512m"
max-file: "2"
# 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:polygon/bor/polygon-mainnet-bor-minimal-pebble-path.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/polygon-mainnet-minimal \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
polygon-mainnet-minimal:
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_MAINNET_BOR_VERSION:-2.9.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:
- 10259:10259
- 10259:10259/udp
expose:
- 8545
- 6060
entrypoint: [bor, server]
command:
- --bootnodes=enode://07bc4cf87ff8f4e7dc51280991809940f26e846c944609ae4726309be73742a830040cd783989f6941e1b41c02405834bc6365059403a59ca9255ac695156235@34.89.75.187:30303,enode://2c3be2e637a68dc694498a44b6e0d57b5c762925ea97f941079a91f8a080b032fe2eb9e6c3230076e9fb046f626b5dcd3fb045dc9c194689a359aa7167ae0f6c@34.142.43.249:30303,enode://a0bc4dd2b59370d5a375a7ef9ac06cf531571005ae8b2ead2e9aaeb8205168919b169451fb0ef7061e0d80592e6ed0720f559bd1be1c4efb6e6c4381f1bdb986@35.246.99.203:30303,enode://f2b0d50e0b843d38ddcab59614f93065e2c82130100032f86ae193eb874505de12fcaf12502dfd88e339b817c0b374fa4b4f7c4d5a4d1aa04f29c503d95e0228@35.197.233.240:30303,enode://8a3f21c293c913a1148116a295aa69fdf41b9c5b0b0628d49be751aa8c025ae2ec1973d6d84cea8e2aba5541b5d76219dfaae41a124d42d0f56d4e1af50b74f8@35.246.95.65:30303,enode://f5cfe35f47ed928d5403aa28ee616fd64ed7daa527b5ae6a7bc412ca25eaad9b6bf2f776144fd9f8e7e9c80b5360a9c03b67f1d47ea88767def7d391cc7e0cd1@34.105.180.11:30303,enode://fc7624241515f9d5e599a396362c29de92b13a048ad361c90dd72286aa4cca835ba65e140a46ace70cc4dcb18472a476963750b3b69d958c5f546d48675880a8@34.147.169.102:30303,enode://7400e4bc70c56de26d5d240474a1b78af0bf8f0db567edfa851c9724ed697ca7692a92483369e9633d4342a036d10223958007160765d0317a1073f86f2a80c8@34.89.55.74:30303,enode://e4fb013061eba9a2c6fb0a41bbd4149f4808f0fb7e88ec55d7163f19a6f02d64d0ce5ecc81528b769ba552a7068057432d44ab5e9e42842aff5b4709aa2c3f3b@34.89.75.187:30303,enode://a49da6300403cf9b31e30502eb22c142ba4f77c9dda44990bccce9f2121c3152487ee95ee55c6b92d4cdce77845e40f59fd927da70ea91cf935b23e262236d75@34.142.43.249:30303,enode://0e50fdcc2106b0c4e4d9ffbd7798ceda9432e680723dc7b7b4627e384078850c1c4a3e67f17ef2c484201ae6ee7c491cbf5e189b8ffee3948252e9bef59fc54e@35.234.148.172:30303,enode://72c3176693f7100dfedc8a37909120fea16971260a5d95ceff49affbc0e23968c35655fee75734736f0b038147645e8ceeee59af68859b3f5bf91fe249be6259@35.246.95.65:30303,enode://f0e44769385aea31de930d3f4796e3e348962221063bb9f681106d832d13f70e5543d652d30e819812104f1b1ffdd7585977b46bf802ed5a52cf731de8c48dbd@34.105.180.11:30303,enode://198896e373735ba38a0313d073137a413787ece791fbc0d0be0f9f6b9d9dd00ee0841f46519904d666d7f1cdfce5532b093e3a1574b34eb64224f57b9b7fce7b@34.89.55.74:30303
- --bor.heimdall=https://polygon-heimdall-rest.publicnode.com
- --cache.gomemlimit=${POLYGON_MAINNET_BOR_MINIMAL_PEBBLE_PATH_CACHE_GOMEMLIMIT:-}
- --cache=${POLYGON_MAINNET_BOR_MINIMAL_PEBBLE_PATH_CACHE:-1024}
- --chain=mainnet
- --datadir=/root/.bor/
- --db.engine=pebble
- --discovery.dns=enrtree://AKUEZKN7PSKVNR65FZDHECMKOJQSGPARGTPPBI7WS2VUL4EGR6XPC@pos.polygon-peers.io
- --gcmode=full
- --http
- --http.addr=0.0.0.0
- --http.api=eth,net,web3,txpool,debug,admin,bor
- --http.port=8545
- --http.vhosts=*
- --maxpeers=50
- --metrics
- --metrics.prometheus-addr=0.0.0.0:6060
- --nat=extip:${IP}
- --port=10259
- --rpc.gascap=600000000
- --rpc.returndatalimit=10000000
- --rpc.txfeecap=0
- --state.scheme=path
- --syncmode=snap
- --ws
- --ws.addr=0.0.0.0
- --ws.api=eth,net,web3,txpool,debug,admin,bor
- --ws.origins=*
- --ws.port=8545
restart: unless-stopped
stop_grace_period: 5m
networks:
- chains
volumes:
- ${POLYGON_MAINNET_BOR_MINIMAL_PEBBLE_PATH_DATA:-polygon-mainnet-bor-minimal-pebble-path}:/root/.bor/
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=6060
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.polygon-mainnet-bor-minimal-pebble-path-stripprefix.stripprefix.prefixes=/polygon-mainnet-minimal
- traefik.http.services.polygon-mainnet-bor-minimal-pebble-path.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/polygon-mainnet-minimal`) || Path(`/polygon-mainnet-minimal/`))}
- ${NO_SSL:+traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.rule=Path(`/polygon-mainnet-minimal`) || Path(`/polygon-mainnet-minimal/`)}
- traefik.http.routers.polygon-mainnet-bor-minimal-pebble-path.middlewares=polygon-mainnet-bor-minimal-pebble-path-stripprefix, ipallowlist
volumes:
polygon-mainnet-bor-minimal-pebble-path:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: polygon
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
...