From 7b667fe04924c777627536a6089b6d0b90bb6c26 Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Sat, 29 Aug 2026 05:29:40 +0000 Subject: [PATCH] avalanche: add firewood profile for mainnet (pruning-free merkle DB) Add new avalanchego v1.14.2 profile with Firewood state database backend: - state-scheme: firewood (with required populate-missing-tries:null, snapshot-cache:0) - state-sync-enabled: true (confirmed supported in v1.14.2) - chain-config-dir: /config/firewood - db-type: firewood - coreth-state-scheme: firewood Generated compose: avalanche-mainnet-go-firewood-firewood.yml Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- ...avalanche-mainnet-go-firewood-firewood.yml | 120 ++++++++++++++++++ avalanche/mainnet/firewood/C/config.json | 24 ++++ compose_registry.json | 17 +++ reference-rpc-endpoint.json | 1 + 4 files changed, 162 insertions(+) create mode 100644 avalanche/go/avalanche-mainnet-go-firewood-firewood.yml create mode 100644 avalanche/mainnet/firewood/C/config.json diff --git a/avalanche/go/avalanche-mainnet-go-firewood-firewood.yml b/avalanche/go/avalanche-mainnet-go-firewood-firewood.yml new file mode 100644 index 00000000..ff1f81d3 --- /dev/null +++ b/avalanche/go/avalanche-mainnet-go-firewood-firewood.yml @@ -0,0 +1,120 @@ +--- +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:avalanche/go/avalanche-mainnet-go-firewood-firewood.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/avalanche-mainnet-firewood \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + +services: + avalanche-mainnet-firewood: + image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_MAINNET_GO_VERSION:-v1.14.2} + sysctls: + # TCP Performance + net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle + net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache + net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers + net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers + net.core.somaxconn: 32768 # Higher connection queue + # Memory/Connection Management + # net.core.netdev_max_backlog: 50000 # Increase network buffer + net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests + net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets + ulimits: + nofile: 1048576 # Max open files (for RPC/WS connections) + user: root + ports: + - 13144:13144 + - 13144:13144/udp + expose: + - 9650 + entrypoint: [/avalanchego/build/avalanchego] + command: + - --chain-config-dir=/config/firewood + - --coreth-state-scheme=firewood + - --db-type=firewood + - --http-allowed-hosts=* + - --http-host= + - --network-id=mainnet + - --public-ip=${IP} + - --staking-port=13144 + restart: unless-stopped + stop_grace_period: 5m + networks: + - chains + volumes: + - ${AVALANCHE_MAINNET_GO_FIREWOOD_FIREWOOD_DATA:-avalanche-mainnet-go-firewood-firewood}:/root/.avalanchego + - ./avalanche/mainnet:/config + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - prometheus-scrape.enabled=false + - traefik.enable=true + - traefik.http.middlewares.avalanche-mainnet-go-firewood-firewood-set-path.replacepath.path=/ext/bc/C/rpc + - traefik.http.middlewares.avalanche-mainnet-go-firewood-firewood-stripprefix.stripprefix.prefixes=/avalanche-mainnet-firewood + - traefik.http.services.avalanche-mainnet-go-firewood-firewood.loadbalancer.server.port=9650 + - ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-firewood-firewood.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-firewood-firewood.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-firewood-firewood.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet-firewood`) || Path(`/avalanche-mainnet-firewood/`))} + - ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-firewood-firewood.rule=Path(`/avalanche-mainnet-firewood`) || Path(`/avalanche-mainnet-firewood/`)} + - traefik.http.routers.avalanche-mainnet-go-firewood-firewood.middlewares=avalanche-mainnet-go-firewood-firewood-stripprefix, avalanche-mainnet-go-firewood-firewood-set-path, ipallowlist + - traefik.http.routers.avalanche-mainnet-go-firewood-firewood.priority=50 # gets any request that is not GET with UPGRADE header + - traefik.http.routers.avalanche-mainnet-go-firewood-firewood-ws.priority=100 # answers GET requests first + - traefik.http.middlewares.avalanche-mainnet-go-firewood-firewood-set-ws-path.replacepath.path=/ext/bc/C/ws + - traefik.http.services.avalanche-mainnet-go-firewood-firewood-ws.loadbalancer.server.port=9650 + - traefik.http.routers.avalanche-mainnet-go-firewood-firewood-ws.service=avalanche-mainnet-go-firewood-firewood-ws + - traefik.http.routers.avalanche-mainnet-go-firewood-firewood.service=avalanche-mainnet-go-firewood-firewood + - ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-firewood-firewood-ws.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-firewood-firewood-ws.tls.certresolver=myresolver} + # case-insensitive Upgrade: python websocket-client sends "WebSocket" (capital W) + - ${NO_SSL:-traefik.http.routers.avalanche-mainnet-go-firewood-firewood-ws.rule=Host(`$DOMAIN`) && (Path(`/avalanche-mainnet-firewood`) || Path(`/avalanche-mainnet-firewood/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)} + - ${NO_SSL:+traefik.http.routers.avalanche-mainnet-go-firewood-firewood-ws.rule=(Path(`/avalanche-mainnet-firewood`) || Path(`/avalanche-mainnet-firewood/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)} + - traefik.http.routers.avalanche-mainnet-go-firewood-firewood-ws.middlewares=avalanche-mainnet-go-firewood-firewood-stripprefix, avalanche-mainnet-go-firewood-firewood-set-ws-path, ipallowlist + +volumes: + avalanche-mainnet-go-firewood-firewood: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: avalanche + method-groups: + enabled: + - debug + - filter + methods: + disabled: + enabled: + - name: txpool_content # TODO: should be disabled for rollup nodes +... \ No newline at end of file diff --git a/avalanche/mainnet/firewood/C/config.json b/avalanche/mainnet/firewood/C/config.json new file mode 100644 index 00000000..03498c1f --- /dev/null +++ b/avalanche/mainnet/firewood/C/config.json @@ -0,0 +1,24 @@ +{ + "snowman-api-enabled": false, + "coreth-admin-api-enabled": false, + "net-api-enabled": true, + "rpc-gas-cap": 2500000000, + "rpc-tx-fee-cap": 100, + "eth-rpc-gas-limit": 2500000000, + "eth-api-enabled": true, + "personal-api-enabled": false, + "tx-pool-api-enabled": false, + "debug-api-enabled": false, + "web3-api-enabled": true, + "local-txs-enabled": false, + "pruning-enabled": false, + "api-max-duration": 0, + "api-max-blocks-per-request": 0, + "allow-unfinalized-queries": false, + "log-level": "info", + "state-sync-enabled": true, + "state-sync-skip-resume": true, + "state-scheme": "firewood", + "populate-missing-tries": null, + "snapshot-cache": 0 +} diff --git a/compose_registry.json b/compose_registry.json index 66db5d30..8656687f 100644 --- a/compose_registry.json +++ b/compose_registry.json @@ -1174,6 +1174,23 @@ "avalanche-mainnet-go-archive-leveldb" ] }, + { + "chain": "mainnet-firewood-firewood", + "client": "go", + "compose_file": "avalanche/go/avalanche-mainnet-go-firewood-firewood", + "drpc_chain": "avalanche", + "features": [ + "leveldb" + ], + "network": "avalanche", + "node": null, + "relay": null, + "stack": null, + "type": "archive", + "volumes": [ + "avalanche-mainnet-go-firewood-firewood" + ] + }, { "chain": "mainnet", "client": "go", diff --git a/reference-rpc-endpoint.json b/reference-rpc-endpoint.json index 91b5208e..39a3ea8c 100644 --- a/reference-rpc-endpoint.json +++ b/reference-rpc-endpoint.json @@ -3441,6 +3441,7 @@ "syncing_lag": 40, "urls": [ "https://rpc.testnet.chain.robinhood.com/rpc", + "https://robinhood-sepolia-rpc.publicnode.com", "https://robinhood-testnet.drpc.org" ] },