From e68c802d7cda314cec6b256470a842ffb4c83a81 Mon Sep 17 00:00:00 2001 From: Claude Agent Date: Mon, 15 Jun 2026 06:45:51 +0000 Subject: [PATCH] Add apechain-mainnet nitro node (Arbitrum Orbit L3 on Arbitrum One) ApeChain chain 33139, parent Arbitrum One (42161), Caldera infra, $APE gas. baseConfig.json chain-info from the official Constellation replica nodeConfig (ArbOS 31, owner 0x5737..601c, full rollup contract set). das/feed/sequencer point at Caldera; parent-chain = ARBITRUM_ONE_EXECUTION_RPC (no L1 beacon). pruned-pebble-path + archive-pebble-hash profiles. Co-Authored-By: Claude Opus 4.8 (1M context) --- arb/apechain/arbitrum-one/baseConfig.json | 5 + ...hain-mainnet-nitro-archive-pebble-hash.yml | 144 +++++++++++++++++ ...chain-mainnet-nitro-pruned-pebble-path.yml | 146 ++++++++++++++++++ compose_registry.json | 34 ++++ 4 files changed, 329 insertions(+) create mode 100644 arb/apechain/arbitrum-one/baseConfig.json create mode 100644 arb/nitro/apechain-mainnet-nitro-archive-pebble-hash.yml create mode 100644 arb/nitro/apechain-mainnet-nitro-pruned-pebble-path.yml diff --git a/arb/apechain/arbitrum-one/baseConfig.json b/arb/apechain/arbitrum-one/baseConfig.json new file mode 100644 index 00000000..42a95d06 --- /dev/null +++ b/arb/apechain/arbitrum-one/baseConfig.json @@ -0,0 +1,5 @@ +{ + "chain": { + "info-json": "[{\"chain-id\":33139,\"parent-chain-id\":42161,\"chain-name\":\"apechain\",\"chain-config\":{\"chainId\":33139,\"homesteadBlock\":0,\"daoForkBlock\":null,\"daoForkSupport\":true,\"eip150Block\":0,\"eip150Hash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"eip155Block\":0,\"eip158Block\":0,\"byzantiumBlock\":0,\"constantinopleBlock\":0,\"petersburgBlock\":0,\"istanbulBlock\":0,\"muirGlacierBlock\":0,\"berlinBlock\":0,\"londonBlock\":0,\"clique\":{\"period\":0,\"epoch\":0},\"arbitrum\":{\"EnableArbOS\":true,\"AllowDebugPrecompiles\":false,\"DataAvailabilityCommittee\":false,\"InitialArbOSVersion\":31,\"EigenDA\":false,\"InitialChainOwner\":\"0x5737cdbb3a67001441c0da8b86e6b1826705601c\",\"GenesisBlockNum\":0}},\"rollup\":{\"bridge\":\"0x6B71AFb4b7725227ab944c96FE018AB9dc0434b8\",\"inbox\":\"0x1B98e4ED82Ee1a91A65a38C690e2266364064D15\",\"sequencer-inbox\":\"0xE6a92Ae29E24C343eE66A2B3D3ECB783d65E4a3C\",\"rollup\":\"0x374de579AE15aD59eD0519aeAf1A23F348Df259c\",\"validator-utils\":\"0xaB36aec5517C346D21b9C19429BAA5aa87D17fCa\",\"validator-wallet-creator\":\"0x5a6C98F6A60BDC02cE4d8AD43b4Fc88Fe5b38856\",\"deployed-at\":247653199}}]" + } +} diff --git a/arb/nitro/apechain-mainnet-nitro-archive-pebble-hash.yml b/arb/nitro/apechain-mainnet-nitro-archive-pebble-hash.yml new file mode 100644 index 00000000..040069b3 --- /dev/null +++ b/arb/nitro/apechain-mainnet-nitro-archive-pebble-hash.yml @@ -0,0 +1,144 @@ +--- +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:arb/nitro/apechain-mainnet-nitro-archive-pebble-hash.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/apechain-mainnet-archive \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + +services: + apechain-mainnet-archive: + image: ${APECHAIN_NITRO_IMAGE:-offchainlabs/nitro-node}:${APECHAIN_MAINNET_NITRO_VERSION:-v3.10.1-d7f07be} + 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 + command: + - --conf.file=/config/baseConfig.json + - --execution.caching.archive=true + - --execution.caching.database-cache=${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_DATABASE_CACHE:-2048} + - --execution.caching.snapshot-cache=${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_SNAPSHOT_CACHE:-400} + - --execution.caching.trie-clean-cache=${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_TRIE_CLEAN_CACHE:-600} + - --execution.caching.trie-dirty-cache=${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_TRIE_DIRTY_CACHE:-1024} + - --execution.forwarding-target=https://rpc.apechain.com/http + - --execution.rpc.gas-cap=5500000000 + - --execution.rpc.log-history=0 + - --execution.sequencer.enable=false + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,arb,txpool,debug + - --http.corsdomain=* + - --http.port=8545 + - --http.vhosts=* + - --metrics + - --metrics-server.addr=0.0.0.0 + - --metrics-server.port=6070 + - --node.batch-poster.enable=false + - --node.data-availability.enable=true + - --node.data-availability.rest-aggregator.enable=true + - --node.data-availability.rest-aggregator.urls=https://apechain.calderachain.xyz/rest-aggregator + - --node.feed.input.url=wss://apechain.calderachain.xyz/feed + - --node.sequencer=false + - --node.staker.enable=false + - --parent-chain.connection.url=${ARBITRUM_ONE_EXECUTION_RPC} + - --persistent.chain=/root/.arbitrum/apechain-mainnet-archive + - --persistent.db-engine=pebble + - --ws.addr=0.0.0.0 + - --ws.origins=* + - --ws.port=8545 + restart: unless-stopped + stop_grace_period: 5m + networks: + - chains + volumes: + - ${APECHAIN_MAINNET_NITRO_ARCHIVE_PEBBLE_HASH_DATA:-apechain-mainnet-nitro-archive-pebble-hash}:/root/.arbitrum + - ./arb/apechain/arbitrum-one:/config + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - prometheus-scrape.enabled=true + - prometheus-scrape.port=6070 + - prometheus-scrape.path=/debug/metrics/prometheus + - traefik.enable=true + - traefik.http.middlewares.apechain-mainnet-nitro-archive-pebble-hash-stripprefix.stripprefix.prefixes=/apechain-mainnet-archive + - traefik.http.services.apechain-mainnet-nitro-archive-pebble-hash.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/apechain-mainnet-archive`) || Path(`/apechain-mainnet-archive/`))} + - ${NO_SSL:+traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.rule=Path(`/apechain-mainnet-archive`) || Path(`/apechain-mainnet-archive/`)} + - traefik.http.routers.apechain-mainnet-nitro-archive-pebble-hash.middlewares=apechain-mainnet-nitro-archive-pebble-hash-stripprefix, ipallowlist + +volumes: + apechain-mainnet-nitro-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: apechain + 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 +... \ No newline at end of file diff --git a/arb/nitro/apechain-mainnet-nitro-pruned-pebble-path.yml b/arb/nitro/apechain-mainnet-nitro-pruned-pebble-path.yml new file mode 100644 index 00000000..d7d93320 --- /dev/null +++ b/arb/nitro/apechain-mainnet-nitro-pruned-pebble-path.yml @@ -0,0 +1,146 @@ +--- +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:arb/nitro/apechain-mainnet-nitro-pruned-pebble-path.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/apechain-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + +services: + apechain-mainnet: + image: ${APECHAIN_NITRO_IMAGE:-offchainlabs/nitro-node}:${APECHAIN_MAINNET_NITRO_VERSION:-v3.10.1-d7f07be} + 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 + command: + - --conf.file=/config/baseConfig.json + - --execution.caching.archive=${APECHAIN_MAINNET_ARCHIVE_DB:-false} + - --execution.caching.database-cache=${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_DATABASE_CACHE:-2048} + - --execution.caching.snapshot-cache=${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_SNAPSHOT_CACHE:-400} + - --execution.caching.state-scheme=path + - --execution.caching.trie-clean-cache=${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_TRIE_CLEAN_CACHE:-600} + - --execution.caching.trie-dirty-cache=${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_TRIE_DIRTY_CACHE:-1024} + - --execution.forwarding-target=https://rpc.apechain.com/http + - --execution.rpc.gas-cap=5500000000 + - --execution.sequencer.enable=false + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,arb,txpool,debug + - --http.corsdomain=* + - --http.port=8545 + - --http.vhosts=* + - --metrics + - --metrics-server.addr=0.0.0.0 + - --metrics-server.port=6070 + - --node.batch-poster.enable=false + - --node.data-availability.enable=true + - --node.data-availability.rest-aggregator.enable=true + - --node.data-availability.rest-aggregator.urls=https://apechain.calderachain.xyz/rest-aggregator + - --node.feed.input.url=wss://apechain.calderachain.xyz/feed + - --node.sequencer=false + - --node.staker.enable=false + - --parent-chain.connection.url=${ARBITRUM_ONE_EXECUTION_RPC} + - --persistent.chain=/root/.arbitrum/apechain-mainnet + - --persistent.db-engine=pebble + - --ws.addr=0.0.0.0 + - --ws.origins=* + - --ws.port=8545 + restart: unless-stopped + stop_grace_period: 5m + networks: + - chains + volumes: + - ${APECHAIN_MAINNET_NITRO_PRUNED_PEBBLE_PATH_DATA:-apechain-mainnet-nitro-pruned-pebble-path}:/root/.arbitrum + - ./arb/apechain/arbitrum-one:/config + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - prometheus-scrape.enabled=true + - prometheus-scrape.port=6070 + - prometheus-scrape.path=/debug/metrics/prometheus + - traefik.enable=true + - traefik.http.middlewares.apechain-mainnet-nitro-pruned-pebble-path-stripprefix.stripprefix.prefixes=/apechain-mainnet + - traefik.http.services.apechain-mainnet-nitro-pruned-pebble-path.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/apechain-mainnet`) || Path(`/apechain-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.rule=Path(`/apechain-mainnet`) || Path(`/apechain-mainnet/`)} + - traefik.http.routers.apechain-mainnet-nitro-pruned-pebble-path.middlewares=apechain-mainnet-nitro-pruned-pebble-path-stripprefix, ipallowlist + +volumes: + apechain-mainnet-nitro-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: apechain + 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/compose_registry.json b/compose_registry.json index 6cc66b4c..11292e5e 100644 --- a/compose_registry.json +++ b/compose_registry.json @@ -196,6 +196,40 @@ "alephzero-sepolia-nitro-pruned-pebble-path" ] }, + { + "chain": "mainnet", + "client": "nitro", + "compose_file": "arb/nitro/apechain-mainnet-nitro-archive-pebble-hash", + "features": [ + "hash", + "pebble" + ], + "network": "apechain", + "node": null, + "relay": null, + "stack": "arb", + "type": "archive", + "volumes": [ + "apechain-mainnet-nitro-archive-pebble-hash" + ] + }, + { + "chain": "mainnet", + "client": "nitro", + "compose_file": "arb/nitro/apechain-mainnet-nitro-pruned-pebble-path", + "features": [ + "path", + "pebble" + ], + "network": "apechain", + "node": null, + "relay": null, + "stack": "arb", + "type": "pruned", + "volumes": [ + "apechain-mainnet-nitro-pruned-pebble-path" + ] + }, { "chain": "nova", "client": "nitro",