From 6d8920d6596e84aa4530ee84dd479a45b07d7c1c Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Fri, 19 Jun 2026 06:28:21 +0000 Subject: [PATCH] deploy: regenerate compose from vibe-node main fb44bc5499e8 --- compose_registry.json | 34 +++ .../ethereum-hoodi-reth-archive-trace.yml | 2 +- .../reth/ethereum-hoodi-reth-pruned-trace.yml | 2 +- ...archive-trace--lighthouse-pruned-blobs.yml | 2 +- ...eum-mainnet-reth-archive-trace--nimbus.yml | 2 +- .../ethereum-mainnet-reth-archive-trace.yml | 2 +- ...eum-mainnet-reth-minimal-trace--blsync.yml | 2 +- ...eum-mainnet-reth-minimal-trace--nimbus.yml | 2 +- ...-mainnet-reth-pruned-trace--lighthouse.yml | 2 +- ...reum-mainnet-reth-pruned-trace--nimbus.yml | 2 +- .../ethereum-mainnet-reth-pruned-trace.yml | 2 +- ...eum-sepolia-reth-archive-trace--nimbus.yml | 2 +- .../ethereum-sepolia-reth-archive-trace.yml | 2 +- ...reum-sepolia-reth-pruned-trace--nimbus.yml | 2 +- .../ethereum-sepolia-reth-pruned-trace.yml | 2 +- ...barium-mainnet-bor-archive-pebble-path.yml | 150 ++++++++++++ ...ibarium-mainnet-bor-pruned-pebble-path.yml | 150 ++++++++++++ shibarium/scripts/cometbft-common.sh | 223 ++++++++++++++++++ .../reth/tempo-mainnet-reth-archive-trace.yml | 2 +- .../reth/tempo-mainnet-reth-pruned-trace.yml | 2 +- .../tempo-moderato-reth-archive-trace.yml | 2 +- .../reth/tempo-moderato-reth-pruned-trace.yml | 2 +- .../reth/tempo-testnet-reth-archive-trace.yml | 2 +- .../reth/tempo-testnet-reth-pruned-trace.yml | 2 +- 24 files changed, 577 insertions(+), 20 deletions(-) create mode 100644 shibarium/bor/shibarium-mainnet-bor-archive-pebble-path.yml create mode 100644 shibarium/bor/shibarium-mainnet-bor-pruned-pebble-path.yml create mode 100644 shibarium/scripts/cometbft-common.sh diff --git a/compose_registry.json b/compose_registry.json index 3b9ce021..e69b6929 100644 --- a/compose_registry.json +++ b/compose_registry.json @@ -7300,6 +7300,40 @@ "sei-testnet-sei-pruned" ] }, + { + "chain": "mainnet", + "client": "bor", + "compose_file": "shibarium/bor/shibarium-mainnet-bor-archive-pebble-path", + "features": [ + "path", + "pebble" + ], + "network": "shibarium", + "node": "heimdall", + "relay": null, + "stack": null, + "type": "archive", + "volumes": [ + "shibarium-mainnet-bor-archive-pebble-path" + ] + }, + { + "chain": "mainnet", + "client": "bor", + "compose_file": "shibarium/bor/shibarium-mainnet-bor-pruned-pebble-path", + "features": [ + "path", + "pebble" + ], + "network": "shibarium", + "node": "heimdall", + "relay": null, + "stack": null, + "type": "pruned", + "volumes": [ + "shibarium-mainnet-bor-pruned-pebble-path" + ] + }, { "chain": "mainnet", "client": "agave", diff --git a/ethereum/reth/ethereum-hoodi-reth-archive-trace.yml b/ethereum/reth/ethereum-hoodi-reth-archive-trace.yml index 6ebbd4ad..f58d262d 100644 --- a/ethereum/reth/ethereum-hoodi-reth-archive-trace.yml +++ b/ethereum/reth/ethereum-hoodi-reth-archive-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-hoodi-reth: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_HOODI_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_HOODI_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-hoodi-reth-pruned-trace.yml b/ethereum/reth/ethereum-hoodi-reth-pruned-trace.yml index ae72a5e8..df46ff99 100644 --- a/ethereum/reth/ethereum-hoodi-reth-pruned-trace.yml +++ b/ethereum/reth/ethereum-hoodi-reth-pruned-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-hoodi-reth-pruned: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_HOODI_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_HOODI_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-mainnet-reth-archive-trace--lighthouse-pruned-blobs.yml b/ethereum/reth/ethereum-mainnet-reth-archive-trace--lighthouse-pruned-blobs.yml index 28b892b8..0577f1e4 100644 --- a/ethereum/reth/ethereum-mainnet-reth-archive-trace--lighthouse-pruned-blobs.yml +++ b/ethereum/reth/ethereum-mainnet-reth-archive-trace--lighthouse-pruned-blobs.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-mainnet-reth: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-mainnet-reth-archive-trace--nimbus.yml b/ethereum/reth/ethereum-mainnet-reth-archive-trace--nimbus.yml index 37f9be8c..a4d10226 100644 --- a/ethereum/reth/ethereum-mainnet-reth-archive-trace--nimbus.yml +++ b/ethereum/reth/ethereum-mainnet-reth-archive-trace--nimbus.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-mainnet-reth: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-mainnet-reth-archive-trace.yml b/ethereum/reth/ethereum-mainnet-reth-archive-trace.yml index 609a03e8..814a1a3b 100644 --- a/ethereum/reth/ethereum-mainnet-reth-archive-trace.yml +++ b/ethereum/reth/ethereum-mainnet-reth-archive-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-mainnet-reth: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-mainnet-reth-minimal-trace--blsync.yml b/ethereum/reth/ethereum-mainnet-reth-minimal-trace--blsync.yml index 0e4743b5..2758a451 100644 --- a/ethereum/reth/ethereum-mainnet-reth-minimal-trace--blsync.yml +++ b/ethereum/reth/ethereum-mainnet-reth-minimal-trace--blsync.yml @@ -33,7 +33,7 @@ x-logging-defaults: &logging-defaults services: ethereum-mainnet-reth-minimal: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-mainnet-reth-minimal-trace--nimbus.yml b/ethereum/reth/ethereum-mainnet-reth-minimal-trace--nimbus.yml index cc842fb3..094532ed 100644 --- a/ethereum/reth/ethereum-mainnet-reth-minimal-trace--nimbus.yml +++ b/ethereum/reth/ethereum-mainnet-reth-minimal-trace--nimbus.yml @@ -52,7 +52,7 @@ services: args: LLVM_IMAGE: ${LLVM_IMAGE:-snowstep/llvm} LLVM_VERSION: ${LLVM_VERSION:-20250912105042} - RETH_VERSION: ${ETHEREUM_MAINNET_RETH_VERSION:-v2.2.0} + RETH_VERSION: ${ETHEREUM_MAINNET_RETH_VERSION:-v2.1.0} RETH_REPO: ${ETHEREUM_MAINNET_RETH_REPO:-https://github.com/paradigmxyz/reth} ARCH_TARGET: ${ARCH_TARGET:-native} PROFILE: ${RETH_BUILD_PROFILE:-maxperf} diff --git a/ethereum/reth/ethereum-mainnet-reth-pruned-trace--lighthouse.yml b/ethereum/reth/ethereum-mainnet-reth-pruned-trace--lighthouse.yml index 42f4e561..a03d1132 100644 --- a/ethereum/reth/ethereum-mainnet-reth-pruned-trace--lighthouse.yml +++ b/ethereum/reth/ethereum-mainnet-reth-pruned-trace--lighthouse.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-mainnet-reth-pruned: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-mainnet-reth-pruned-trace--nimbus.yml b/ethereum/reth/ethereum-mainnet-reth-pruned-trace--nimbus.yml index f01c8b83..6867368c 100644 --- a/ethereum/reth/ethereum-mainnet-reth-pruned-trace--nimbus.yml +++ b/ethereum/reth/ethereum-mainnet-reth-pruned-trace--nimbus.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-mainnet-reth-pruned: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-mainnet-reth-pruned-trace.yml b/ethereum/reth/ethereum-mainnet-reth-pruned-trace.yml index 2a6d7603..01a7671b 100644 --- a/ethereum/reth/ethereum-mainnet-reth-pruned-trace.yml +++ b/ethereum/reth/ethereum-mainnet-reth-pruned-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-mainnet-reth-pruned: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-sepolia-reth-archive-trace--nimbus.yml b/ethereum/reth/ethereum-sepolia-reth-archive-trace--nimbus.yml index 98cfbec1..9952adf1 100644 --- a/ethereum/reth/ethereum-sepolia-reth-archive-trace--nimbus.yml +++ b/ethereum/reth/ethereum-sepolia-reth-archive-trace--nimbus.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-sepolia-reth: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_SEPOLIA_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_SEPOLIA_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-sepolia-reth-archive-trace.yml b/ethereum/reth/ethereum-sepolia-reth-archive-trace.yml index 316ae9e6..18dbfd94 100644 --- a/ethereum/reth/ethereum-sepolia-reth-archive-trace.yml +++ b/ethereum/reth/ethereum-sepolia-reth-archive-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-sepolia-reth: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_SEPOLIA_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_SEPOLIA_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-sepolia-reth-pruned-trace--nimbus.yml b/ethereum/reth/ethereum-sepolia-reth-pruned-trace--nimbus.yml index 743b776c..e847526e 100644 --- a/ethereum/reth/ethereum-sepolia-reth-pruned-trace--nimbus.yml +++ b/ethereum/reth/ethereum-sepolia-reth-pruned-trace--nimbus.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-sepolia-reth-pruned: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_SEPOLIA_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_SEPOLIA_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/ethereum/reth/ethereum-sepolia-reth-pruned-trace.yml b/ethereum/reth/ethereum-sepolia-reth-pruned-trace.yml index 1d81e7dd..a2348a12 100644 --- a/ethereum/reth/ethereum-sepolia-reth-pruned-trace.yml +++ b/ethereum/reth/ethereum-sepolia-reth-pruned-trace.yml @@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults services: ethereum-sepolia-reth-pruned: - image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_SEPOLIA_RETH_VERSION:-v2.2.0} + image: ${ETHEREUM_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${ETHEREUM_SEPOLIA_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/shibarium/bor/shibarium-mainnet-bor-archive-pebble-path.yml b/shibarium/bor/shibarium-mainnet-bor-archive-pebble-path.yml new file mode 100644 index 00000000..9eb78597 --- /dev/null +++ b/shibarium/bor/shibarium-mainnet-bor-archive-pebble-path.yml @@ -0,0 +1,150 @@ +--- +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:shibarium/bor/shibarium-mainnet-bor-archive-pebble-path.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/shibarium-mainnet-archive \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + +services: + shibarium-mainnet-archive: + image: ${SHIBARIUM_BOR_IMAGE:-0xpolygon/bor}:${SHIBARIUM_MAINNET_BOR_VERSION:-} + 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: + - 12212:12212 + - 12212:12212/udp + expose: + - 8545 + - 6060 + - 8551 + entrypoint: [bor, server] + command: + - --bor.heimdall=http://shibarium-mainnet-node:1317 + - --chain=mainnet + - --datadir=/root/.bor/ + - --db.engine=pebble + - --discovery.dns= + - --gcmode=archive + - --maxpeers=50 + - --metrics + - --metrics.prometheus-addr=0.0.0.0:6060 + - --nat=extip:${IP} + - --port=12212 + - --rpc.gascap=600000000 + - --rpc.returndatalimit=10000000 + - --rpc.txfeecap=0 + - --state.scheme=path + - --syncmode=full + - --http + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,txpool,debug,admin,bor + - --http.port=8545 + - --http.vhosts=* + - --ws + - --ws.addr=0.0.0.0 + - --ws.api=eth,net,web3,txpool,debug,admin,bor + - --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: + - ${SHIBARIUM_MAINNET_BOR_ARCHIVE_PEBBLE_PATH_DATA:-shibarium-mainnet-bor-archive-pebble-path}:/root/.bor/ + - .jwtsecret:/jwtsecret:ro + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - prometheus-scrape.enabled=true + - prometheus-scrape.port=6060 + - prometheus-scrape.path=/metrics + - traefik.enable=true + - traefik.http.middlewares.shibarium-mainnet-bor-archive-pebble-path-stripprefix.stripprefix.prefixes=/shibarium-mainnet-archive + - traefik.http.services.shibarium-mainnet-bor-archive-pebble-path.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.shibarium-mainnet-bor-archive-pebble-path.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.shibarium-mainnet-bor-archive-pebble-path.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.shibarium-mainnet-bor-archive-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/shibarium-mainnet-archive`) || Path(`/shibarium-mainnet-archive/`))} + - ${NO_SSL:+traefik.http.routers.shibarium-mainnet-bor-archive-pebble-path.rule=Path(`/shibarium-mainnet-archive`) || Path(`/shibarium-mainnet-archive/`)} + - traefik.http.routers.shibarium-mainnet-bor-archive-pebble-path.middlewares=shibarium-mainnet-bor-archive-pebble-path-stripprefix, ipallowlist + +volumes: + shibarium-mainnet-bor-archive-pebble-path: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: shibarium + 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 +... \ No newline at end of file diff --git a/shibarium/bor/shibarium-mainnet-bor-pruned-pebble-path.yml b/shibarium/bor/shibarium-mainnet-bor-pruned-pebble-path.yml new file mode 100644 index 00000000..1a8b35ad --- /dev/null +++ b/shibarium/bor/shibarium-mainnet-bor-pruned-pebble-path.yml @@ -0,0 +1,150 @@ +--- +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:shibarium/bor/shibarium-mainnet-bor-pruned-pebble-path.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/shibarium-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + +services: + shibarium-mainnet: + image: ${SHIBARIUM_BOR_IMAGE:-0xpolygon/bor}:${SHIBARIUM_MAINNET_BOR_VERSION:-} + 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: + - 10154:10154 + - 10154:10154/udp + expose: + - 8545 + - 6060 + - 8551 + entrypoint: [bor, server] + command: + - --bor.heimdall=http://shibarium-mainnet-node:1317 + - --chain=mainnet + - --datadir=/root/.bor/ + - --db.engine=pebble + - --discovery.dns= + - --gcmode=full + - --maxpeers=50 + - --metrics + - --metrics.prometheus-addr=0.0.0.0:6060 + - --nat=extip:${IP} + - --port=10154 + - --rpc.gascap=600000000 + - --rpc.returndatalimit=10000000 + - --rpc.txfeecap=0 + - --state.scheme=path + - --syncmode=snap + - --http + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,txpool,debug,admin,bor + - --http.port=8545 + - --http.vhosts=* + - --ws + - --ws.addr=0.0.0.0 + - --ws.api=eth,net,web3,txpool,debug,admin,bor + - --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: + - ${SHIBARIUM_MAINNET_BOR_PRUNED_PEBBLE_PATH_DATA:-shibarium-mainnet-bor-pruned-pebble-path}:/root/.bor/ + - .jwtsecret:/jwtsecret:ro + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - prometheus-scrape.enabled=true + - prometheus-scrape.port=6060 + - prometheus-scrape.path=/metrics + - traefik.enable=true + - traefik.http.middlewares.shibarium-mainnet-bor-pruned-pebble-path-stripprefix.stripprefix.prefixes=/shibarium-mainnet + - traefik.http.services.shibarium-mainnet-bor-pruned-pebble-path.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.shibarium-mainnet-bor-pruned-pebble-path.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.shibarium-mainnet-bor-pruned-pebble-path.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.shibarium-mainnet-bor-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/shibarium-mainnet`) || Path(`/shibarium-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.shibarium-mainnet-bor-pruned-pebble-path.rule=Path(`/shibarium-mainnet`) || Path(`/shibarium-mainnet/`)} + - traefik.http.routers.shibarium-mainnet-bor-pruned-pebble-path.middlewares=shibarium-mainnet-bor-pruned-pebble-path-stripprefix, ipallowlist + +volumes: + shibarium-mainnet-bor-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: shibarium + 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 +... \ No newline at end of file diff --git a/shibarium/scripts/cometbft-common.sh b/shibarium/scripts/cometbft-common.sh new file mode 100644 index 00000000..e2710b3f --- /dev/null +++ b/shibarium/scripts/cometbft-common.sh @@ -0,0 +1,223 @@ +#!/bin/sh +# cometbft-common.sh — reusable CometBFT-node bootstrap helpers (family C). +# +# Source this from a chain-specific init.sh. It encapsulates the operations every +# CometBFT-consensus node needs (init, fetch config artifacts, patch config.toml / +# app.toml, seed priv_validator_state), extracted verbatim from the proven berachain +# beacon-kit entrypoint so callers inherit known-good behavior. +# +# Each function takes explicit arguments (paths/values) — it is binary-agnostic. The +# caller owns the binary name, the ` init` invocation, the artifact URLs, and +# the final `exec start ...`. EL-driven chains (beacon-kit, morph) also call +# the JWT / engine-dial helpers; pure-consensus chains (gaiad) skip them. +# +# Conventions: POSIX sh (alpine). Config dir is conventionally $HOME_DIR/config. +# Used by: morph-node, gaiad (cosmos batch), and any future family-C chain. +# beacon-kit (berachain) keeps its own bespoke init.sh on purpose — do not retrofit it. + +set -e + +ct_log() { echo "[cometbft-init] $*"; } + +# Ensure curl exists (alpine base images often omit it). Idempotent. +ct_require_curl() { + if ! command -v curl >/dev/null 2>&1; then + ct_log "installing curl" + apk add --no-cache curl + fi +} + +# ct_fetch URL DEST [required] +# Download URL -> DEST. If the 3rd arg is "required", a failure is fatal; +# otherwise a missing/failed fetch is logged and skipped (returns 0). +ct_fetch() { + _url="$1"; _dest="$2"; _req="${3:-optional}" + [ -n "$_url" ] || { [ "$_req" = required ] && { ct_log "FATAL: empty URL for $_dest"; exit 1; }; return 0; } + if curl -fsSL "$_url" -o "$_dest"; then + ct_log "fetched $_url -> $_dest" + else + if [ "$_req" = required ]; then + ct_log "FATAL: failed to fetch required $_url"; exit 1 + fi + ct_log "skip: could not fetch optional $_url" + fi +} + +# ct_patch_p2p CONFIG_TOML IP P2P_PORT +# Bind p2p to 0.0.0.0:PORT and advertise IP:PORT (only within the [p2p] section). +ct_patch_p2p() { + _cfg="$1"; _ip="$2"; _port="$3" + [ -f "$_cfg" ] || { ct_log "patch_p2p: $_cfg missing, skipping"; return 0; } + _laddr="tcp:\\/\\/0\\.0\\.0\\.0\\:${_port}" + sed -i "/^\[p2p\]/,/^\[/{s|^laddr = .*|laddr = \"$_laddr\"|}" "$_cfg" + sed -i "/^\[p2p\]/,/^\[/{s|^external_address = .*|external_address = \"${_ip}:${_port}\"|}" "$_cfg" +} + +# ct_merge_seeds CONFIG_TOML CONFIGURED_SEEDS [SEEDS_URL] +# Merge operator-configured seeds with an optional official seed list (1 entry per +# line, first line skipped like the berachain cl-seeds.txt header), dedupe, write. +ct_merge_seeds() { + _cfg="$1"; _seeds="$2"; _url="$3" + [ -f "$_cfg" ] || return 0 + if [ -n "$_url" ]; then + _official=$(curl -f -s "$_url" | tail -n +2 | tr '\n' ',' | sed 's/,$//' || true) + if [ -n "$_official" ]; then + ct_log "merging official seeds from $_url" + _seeds=$(echo "${_seeds},${_official}" | tr ',' '\n' | sed '/^$/d' | sort -u | paste -sd,) + else + ct_log "no official seeds fetched from $_url (continuing with configured)" + fi + fi + if [ -n "$_seeds" ]; then + sed -i "s/^seeds = \".*\"/seeds = \"${_seeds}\"/" "$_cfg" + fi +} + +# ct_set_persistent_peers CONFIG_TOML PEERS +# Handles both cometbft-classic `persistent_peers` (underscore) and forks that use +# `persistent-peers` (hyphen, e.g. sei) — patches whichever key is present. +ct_set_persistent_peers() { + _cfg="$1"; _peers="$2" + [ -f "$_cfg" ] || return 0 + [ -n "$_peers" ] || return 0 + sed -i "s/^persistent_peers = \".*\"/persistent_peers = \"${_peers}\"/" "$_cfg" + sed -i "s/^persistent-peers = \".*\"/persistent-peers = \"${_peers}\"/" "$_cfg" + return 0 +} + +# ct_set_moniker CONFIG_TOML MONIKER +ct_set_moniker() { + _cfg="$1"; _mon="$2" + [ -f "$_cfg" ] || return 0 + [ -n "$_mon" ] && sed -i "s/^moniker = \".*\"/moniker = \"$_mon\"/" "$_cfg" + return 0 +} + +# ct_set_addrbook CONFIG_DIR ADDRBOOK_URL +# Optional: cosmos chains often seed an addrbook.json for faster peer discovery. +ct_set_addrbook() { + _dir="$1"; _url="$2" + [ -n "$_url" ] || return 0 + ct_fetch "$_url" "$_dir/addrbook.json" optional +} + +# ct_write_jwt CONFIG_DIR [JWT_SRC] +# EL-driven chains: copy the shared engine JWT (default /jwtsecret) into the config +# dir as jwt.hex so the CL can authenticate to the EL engine API. +ct_write_jwt() { + _dir="$1"; _src="${2:-/jwtsecret}" + [ -f "$_src" ] || { ct_log "write_jwt: $_src missing, skipping"; return 0; } + cat "$_src" > "$_dir/jwt.hex" +} + +# ct_set_rpc_dial_url APP_TOML AUTH_RPC +# beacon-kit / app.toml-style EL engine endpoint (e.g. http://:8551). +ct_set_rpc_dial_url() { + _app="$1"; _rpc="$2" + [ -f "$_app" ] || return 0 + [ -n "$_rpc" ] && sed -i "s|^rpc-dial-url = \".*\"|rpc-dial-url = \"$_rpc\"|" "$_app" + return 0 +} + +# ct_seed_priv_validator_state HOME_DIR +# Ensure data/priv_validator_state.json exists (cometbft refuses to start without it +# when one is present in config/). Mirrors the berachain init.sh behavior. +ct_seed_priv_validator_state() { + _home="$1" + if [ -e "$_home/config/priv_validator_state.json" ] && [ ! -e "$_home/data/priv_validator_state.json" ]; then + mkdir -p "$_home/data" + cp "$_home/config/priv_validator_state.json" "$_home/data/priv_validator_state.json" + fi + return 0 +} + +# ct_apk PKG... +# Install alpine packages idempotently (most cosmos init scripts need curl, some jq). +ct_apk() { + apk add --no-cache "$@" +} + +# ct_localize_home CONFIG_DIR +# Rewrite `~/` to `/root/` in config.toml + app.toml. Cosmos `init` writes home-relative +# paths; the container runs as root with a static home, so make paths absolute. +ct_localize_home() { + _dir="$1" + [ -f "$_dir/config.toml" ] && sed -i 's|~/|/root/|g' "$_dir/config.toml" + [ -f "$_dir/app.toml" ] && sed -i 's|~/|/root/|g' "$_dir/app.toml" + return 0 +} + +# ct_set_min_gas_prices APP_TOML PRICE +# Cosmos chains reject txs (and sometimes refuse to start) with an empty +# minimum-gas-prices. PRICE e.g. "0.01usei", "0.0025uatom", "0.01hqq". +ct_set_min_gas_prices() { + _app="$1"; _price="$2" + [ -f "$_app" ] || return 0 + [ -n "$_price" ] || return 0 + sed -i "s/minimum-gas-prices = \"\"/minimum-gas-prices = \"${_price}\"/g" "$_app" + return 0 +} + +# ct_configure_statesync CONFIG_TOML RPC_SERVERS [TRUST_OFFSET] +# Enable cometbft state-sync so a fresh node bootstraps near chainhead instead of +# replaying from genesis — the single biggest lever for "can't keep it at chainhead" +# chains. RPC_SERVERS = comma list of trusted RPC endpoints (>=2 recommended; a single +# endpoint is duplicated). TRUST_OFFSET = blocks below head to trust (default 2000). +# Requires jq + curl. No-op (logged) if head height can't be fetched. +ct_configure_statesync() { + _cfg="$1"; _rpc="$2"; _offset="${3:-2000}" + [ -f "$_cfg" ] || return 0 + # NEVER re-arm statesync on a node that already has application state (a restored + # snapshot or a prior sync). Re-statesyncing over it leaves a broken/partial datadir and, + # for wasm chains, drops the wasm files -> startup panic. _cfg is $HOME/config/config.toml, + # so application state lives at $HOME/data/application.db. + _home=$(dirname "$(dirname "$_cfg")") + if [ -e "$_home/data/application.db" ]; then + ct_log "statesync: existing data dir, skipping" + return 0 + fi + [ -n "$_rpc" ] || { ct_log "statesync: no RPC servers given, skipping"; return 0; } + _primary=$(echo "$_rpc" | cut -d, -f1) + _latest=$(curl -s "$_primary/block" | jq -r '.result.block.header.height // .block.header.height' 2>/dev/null || true) + if [ -z "$_latest" ] || [ "$_latest" = null ]; then + ct_log "statesync: could not read head height from $_primary, skipping"; return 0 + fi + _trust_h=$((_latest - _offset)) + _trust_hash=$(curl -s "$_primary/block?height=$_trust_h" | jq -r '.result.block_id.hash // .block_id.hash' 2>/dev/null || true) + [ -n "$_trust_hash" ] && [ "$_trust_hash" != null ] || { ct_log "statesync: no trust hash, skipping"; return 0; } + # second server defaults to the first (cometbft wants >=2 for light-client cross-check) + echo "$_rpc" | grep -q ',' || _rpc="$_rpc,$_rpc" + ct_log "statesync: enable trust_height=$_trust_h trust_hash=$_trust_hash" + # Patch ONLY the [statesync] section. CometBFT config.toml uses underscore keys + # (rpc_servers/trust_height/trust_hash); tolerate hyphen variants with [_-]. + sed -i.bak -E "/^\[statesync\]/,/^\[/{ + s|^([[:space:]]*enable[[:space:]]*=[[:space:]]*).*|\1true| + s|^([[:space:]]*rpc[_-]servers[[:space:]]*=[[:space:]]*).*|\1\"$_rpc\"| + s|^([[:space:]]*trust[_-]height[[:space:]]*=[[:space:]]*).*|\1$_trust_h| + s|^([[:space:]]*trust[_-]hash[[:space:]]*=[[:space:]]*).*|\1\"$_trust_hash\"| + }" "$_cfg" + return 0 +} + +# ct_ensure_wasm HOME_DIR WASM_SNAPSHOT_URL +# CosmWasm + IBC 08-wasm bytecode are FILES on disk that state-sync does NOT restore, so +# a state-synced wasm chain panics at startup ("wasmlckeeper failed initialize pinned codes +# / Error opening Wasm file"). Seed them from a wasm-only snapshot (e.g. polkachu +# cosmos_wasmonly.tar.lz4) when the wasm dir is missing/empty. No-op if URL unset or wasm +# already present. Best-effort (logs on failure); the fully robust path for wasm chains is a +# FULL snapshot restore. Requires lz4 + tar (installed here). +ct_ensure_wasm() { + _home="$1"; _url="$2" + [ -n "$_url" ] || return 0 + if [ -d "$_home/wasm" ] && [ -n "$(ls -A "$_home/wasm" 2>/dev/null)" ]; then + return 0 # wasm already present + fi + ct_log "wasm: empty, fetching snapshot $_url" + ct_apk lz4 tar + if curl -sL "$_url" | lz4 -dc | tar -xf - -C "$_home"; then + ct_log "wasm: extracted into $_home" + else + ct_log "WARN wasm: fetch/extract failed ($_url)" + fi + return 0 +} diff --git a/tempo/reth/tempo-mainnet-reth-archive-trace.yml b/tempo/reth/tempo-mainnet-reth-archive-trace.yml index 87b310a5..ba8b91f9 100644 --- a/tempo/reth/tempo-mainnet-reth-archive-trace.yml +++ b/tempo/reth/tempo-mainnet-reth-archive-trace.yml @@ -32,7 +32,7 @@ x-logging-defaults: &logging-defaults services: tempo-mainnet-reth: - image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_MAINNET_RETH_VERSION:-v2.2.0} + image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/tempo/reth/tempo-mainnet-reth-pruned-trace.yml b/tempo/reth/tempo-mainnet-reth-pruned-trace.yml index 5f71e812..a9564290 100644 --- a/tempo/reth/tempo-mainnet-reth-pruned-trace.yml +++ b/tempo/reth/tempo-mainnet-reth-pruned-trace.yml @@ -32,7 +32,7 @@ x-logging-defaults: &logging-defaults services: tempo-mainnet-reth-pruned: - image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_MAINNET_RETH_VERSION:-v2.2.0} + image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_MAINNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/tempo/reth/tempo-moderato-reth-archive-trace.yml b/tempo/reth/tempo-moderato-reth-archive-trace.yml index ebfb045f..c640bc5c 100644 --- a/tempo/reth/tempo-moderato-reth-archive-trace.yml +++ b/tempo/reth/tempo-moderato-reth-archive-trace.yml @@ -32,7 +32,7 @@ x-logging-defaults: &logging-defaults services: tempo-moderato-reth: - image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_MODERATO_RETH_VERSION:-v2.2.0} + image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_MODERATO_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/tempo/reth/tempo-moderato-reth-pruned-trace.yml b/tempo/reth/tempo-moderato-reth-pruned-trace.yml index effbb69c..769786dd 100644 --- a/tempo/reth/tempo-moderato-reth-pruned-trace.yml +++ b/tempo/reth/tempo-moderato-reth-pruned-trace.yml @@ -32,7 +32,7 @@ x-logging-defaults: &logging-defaults services: tempo-moderato-reth-pruned: - image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_MODERATO_RETH_VERSION:-v2.2.0} + image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_MODERATO_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/tempo/reth/tempo-testnet-reth-archive-trace.yml b/tempo/reth/tempo-testnet-reth-archive-trace.yml index 7582fd12..ff567bc0 100644 --- a/tempo/reth/tempo-testnet-reth-archive-trace.yml +++ b/tempo/reth/tempo-testnet-reth-archive-trace.yml @@ -32,7 +32,7 @@ x-logging-defaults: &logging-defaults services: tempo-testnet-reth: - image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_TESTNET_RETH_VERSION:-v2.2.0} + image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_TESTNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle diff --git a/tempo/reth/tempo-testnet-reth-pruned-trace.yml b/tempo/reth/tempo-testnet-reth-pruned-trace.yml index abf5bd59..b54a0045 100644 --- a/tempo/reth/tempo-testnet-reth-pruned-trace.yml +++ b/tempo/reth/tempo-testnet-reth-pruned-trace.yml @@ -32,7 +32,7 @@ x-logging-defaults: &logging-defaults services: tempo-testnet-reth-pruned: - image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_TESTNET_RETH_VERSION:-v2.2.0} + image: ${TEMPO_RETH_IMAGE:-ghcr.io/paradigmxyz/reth}:${TEMPO_TESTNET_RETH_VERSION:-v2.1.0} sysctls: # TCP Performance net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle