diff --git a/arb/fireeth/arbitrum-one-fireeth-pruned-pebble-hash.yml b/arb/fireeth/arbitrum-one-fireeth-pruned-pebble-hash.yml new file mode 100644 index 00000000..51ce4955 --- /dev/null +++ b/arb/fireeth/arbitrum-one-fireeth-pruned-pebble-hash.yml @@ -0,0 +1,145 @@ +--- + +# 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/fireeth/arbitrum-one-fireeth-pruned-pebble-hash.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/arbitrum-one \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: 10m + max-file: '3' + +services: + arbitrum-one: + image: ${ARBITRUM_FIREETH_IMAGE:-ghcr.io/streamingfast/firehose-ethereum}:${ARBITRUM_ONE_FIREETH_VERSION:-v2.11.7-nitro-nitro-v3.5.5-fh3.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 + expose: + - 8545 + environment: + - ${ARBITRUM_ONE_FIREETH_PRUNED_PEBBLE_HASH_S3_BLOCKS_STORE:-/firehose-data/storage/merged-blocks} + entrypoint: [sh, -c, 'exec fireeth -c /config/firehose.yml start --substreams-rpc-endpoints "${ ARBITRUM_ONE_EXECUTION_RPC}" --reader-node-arguments "$*"', _] + command: + - --execution.caching.archive=false + - --execution.caching.state-scheme=hash + - --execution.rpc.gas-cap=600000000 + - --execution.sequencer.enable=false + - --firehose-enabled + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,debug,admin,txpool,engine + - --http.corsdomain=* + - --http.port=8545 + - --http.vhosts=* + - --init.download-path=/tmp + - --init.latest=pruned + - --persistent.chain=/firehose-data/reader/data/arbitrum-one + - --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: + - ${ARBITRUM_ONE_FIREETH_PRUNED_PEBBLE_HASH_DATA:-arbitrum-one-fireeth-pruned-pebble-hash}:/firehose-data + - ${ARBITRUM_ONE_FIREETH_PRUNED_PEBBLE_HASH_MERGED_BLOCKS_DATA:-arbitrum-one-fireeth-pruned-pebble-hash-blocks}:/firehose-data/storage/merged-blocks + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.arbitrum-one-fireeth-pruned-pebble-hash-stripprefix.stripprefix.prefixes=/arbitrum-one + - traefik.http.services.arbitrum-one-fireeth-pruned-pebble-hash.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash.rule=Host(`$DOMAIN`) && (Path(`/arbitrum-one`) || Path(`/arbitrum-one/`))} + - ${NO_SSL:+traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash.rule=Path(`/arbitrum-one`) || Path(`/arbitrum-one/`)} + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash.middlewares=arbitrum-one-fireeth-pruned-pebble-hash-stripprefix, ipallowlist + - traefik.http.services.arbitrum-one-fireeth-pruned-pebble-hash-firehose.loadbalancer.server.scheme=h2c + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-firehose.service=arbitrum-one-fireeth-pruned-pebble-hash-firehose + - traefik.http.services.arbitrum-one-fireeth-pruned-pebble-hash-firehose.loadbalancer.server.port=10015 + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-firehose.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-firehose.tls.certresolver=myresolver} + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-firehose.rule=Host(`arbitrum-one.${DOMAIN}`) + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-firehose.middlewares=ipallowlist + - traefik.http.services.arbitrum-one-fireeth-pruned-pebble-hash-substreams.loadbalancer.server.scheme=h2c + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-substreams.service=arbitrum-one-fireeth-pruned-pebble-hash-substreams + - traefik.http.services.arbitrum-one-fireeth-pruned-pebble-hash-substreams.loadbalancer.server.port=10016 + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-substreams.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-substreams.tls.certresolver=myresolver} + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-substreams.rule=Host(`arbitrum-one-substreams.${DOMAIN}`) + - traefik.http.routers.arbitrum-one-fireeth-pruned-pebble-hash-substreams.middlewares=ipallowlist + +volumes: + arbitrum-one-fireeth-pruned-pebble-hash: + arbitrum-one-fireeth-pruned-pebble-hash-blocks: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: arbitrum + 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/bsc/fireeth/bsc-mainnet-fireeth-pruned-pebble-path.yml b/bsc/fireeth/bsc-mainnet-fireeth-pruned-pebble-path.yml new file mode 100644 index 00000000..5c3d7515 --- /dev/null +++ b/bsc/fireeth/bsc-mainnet-fireeth-pruned-pebble-path.yml @@ -0,0 +1,153 @@ +--- + +# 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:bsc/fireeth/bsc-mainnet-fireeth-pruned-pebble-path.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/bsc-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: 10m + max-file: '3' + +services: + bsc-mainnet: + image: ${BSC_FIREETH_IMAGE:-ghcr.io/streamingfast/firehose-ethereum}:${BSC_MAINNET_FIREETH_VERSION:-v2.11.9-bnb} + 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: + - 10214:10214 + - 10214:10214/udp + expose: + - 8545 + entrypoint: [sh, -c, 'exec fireeth -c /config/firehose.yml start --substreams-rpc-endpoints "${ BSC_MAINNET_EXECUTION_RPC}" --reader-node-arguments "$*"', _] + command: + - --datadir=/firehose-data/reader/data + - --db.engine=pebble + - --firehose-enabled + - --gcmode=full + - --http + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,debug,admin,txpool,engine + - --http.port=8545 + - --http.vhosts=* + - --maxpeers=50 + - --nat=extip:${IP} + - --port=10214 + - --rpc.gascap=600000000 + - --rpc.txfeecap=0 + - --state.scheme=path + - --syncmode=snap + - --ws + - --ws.addr=0.0.0.0 + - --ws.api=eth,net,web3,debug,admin,txpool,engine + - --ws.origins=* + - --ws.port=8545 + restart: unless-stopped + stop_grace_period: 5m + networks: + - chains + volumes: + - ${BSC_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_DATA:-bsc-mainnet-fireeth-pruned-pebble-path}:/firehose-data + - ${BSC_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_MERGED_BLOCKS_DATA:-bsc-mainnet-fireeth-pruned-pebble-path-blocks}:/firehose-data/storage/merged-blocks + - ./bsc/mainnet:/config + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.bsc-mainnet-fireeth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/bsc-mainnet + - traefik.http.services.bsc-mainnet-fireeth-pruned-pebble-path.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/bsc-mainnet`) || Path(`/bsc-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path.rule=Path(`/bsc-mainnet`) || Path(`/bsc-mainnet/`)} + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path.middlewares=bsc-mainnet-fireeth-pruned-pebble-path-stripprefix, ipallowlist + - traefik.http.services.bsc-mainnet-fireeth-pruned-pebble-path-firehose.loadbalancer.server.scheme=h2c + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-firehose.service=bsc-mainnet-fireeth-pruned-pebble-path-firehose + - traefik.http.services.bsc-mainnet-fireeth-pruned-pebble-path-firehose.loadbalancer.server.port=10015 + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-firehose.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-firehose.tls.certresolver=myresolver} + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-firehose.rule=Host(`bsc-mainnet.${DOMAIN}`) + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-firehose.middlewares=ipallowlist + - traefik.http.services.bsc-mainnet-fireeth-pruned-pebble-path-substreams.loadbalancer.server.scheme=h2c + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-substreams.service=bsc-mainnet-fireeth-pruned-pebble-path-substreams + - traefik.http.services.bsc-mainnet-fireeth-pruned-pebble-path-substreams.loadbalancer.server.port=10016 + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-substreams.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-substreams.tls.certresolver=myresolver} + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-substreams.rule=Host(`bsc-mainnet-substreams.${DOMAIN}`) + - traefik.http.routers.bsc-mainnet-fireeth-pruned-pebble-path-substreams.middlewares=ipallowlist + +volumes: + bsc-mainnet-fireeth-pruned-pebble-path: + bsc-mainnet-fireeth-pruned-pebble-path-blocks: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: bsc + 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/ethereum/fireeth/ethereum-mainnet-fireeth-pruned-leveldb-hash--nimbus.yml b/ethereum/fireeth/ethereum-mainnet-fireeth-pruned-leveldb-hash--nimbus.yml new file mode 100644 index 00000000..5f25c2b1 --- /dev/null +++ b/ethereum/fireeth/ethereum-mainnet-fireeth-pruned-leveldb-hash--nimbus.yml @@ -0,0 +1,202 @@ +--- + +# 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:ethereum/fireeth/ethereum-mainnet-fireeth-pruned-leveldb-hash--nimbus.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/ethereum-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: 10m + max-file: '3' + +services: + ethereum-mainnet: + image: ${ETHEREUM_FIREETH_IMAGE:-ghcr.io/streamingfast/firehose-ethereum}:${ETHEREUM_MAINNET_FIREETH_VERSION:-v2.11.9-geth-v1.15.10-fh3.0-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: + - 13790:13790 + - 13790:13790/udp + expose: + - 8545 + - 8551 + environment: + - ${ETHEREUM_MAINNET_FIREETH_PRUNED_LEVELDB_HASH_S3_BLOCKS_STORE:-/firehose-data/storage/merged-blocks} + entrypoint: [sh, -c, 'exec fireeth -c /config/firehose.yml start --substreams-rpc-endpoints "${ ETHEREUM_MAINNET_EXECUTION_RPC}" --reader-node-arguments "$*"', _] + command: + - --datadir=/firehose-data/reader/data + - --db.engine=leveldb + - --firehose-enabled + - --gcmode=full + - --maxpeers=50 + - --nat=extip:${IP} + - --port=13790 + - --rpc.gascap=600000000 + - --rpc.txfeecap=0 + - --state.scheme=hash + - --syncmode=snap + - --http + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,debug,admin,txpool,engine + - --http.port=8545 + - --http.vhosts=* + - --ws + - --ws.addr=0.0.0.0 + - --ws.api=eth,net,web3,debug,admin,txpool,engine + - --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: + - ${ETHEREUM_MAINNET_FIREETH_PRUNED_LEVELDB_HASH_DATA:-ethereum-mainnet-fireeth-pruned-leveldb-hash}:/firehose-data + - ${ETHEREUM_MAINNET_FIREETH_PRUNED_LEVELDB_HASH_MERGED_BLOCKS_DATA:-ethereum-mainnet-fireeth-pruned-leveldb-hash-blocks}:/firehose-data/storage/merged-blocks + - .jwtsecret:/jwtsecret:ro + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.ethereum-mainnet-fireeth-pruned-leveldb-hash-stripprefix.stripprefix.prefixes=/ethereum-mainnet + - traefik.http.services.ethereum-mainnet-fireeth-pruned-leveldb-hash.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/ethereum-mainnet`) || Path(`/ethereum-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash.rule=Path(`/ethereum-mainnet`) || Path(`/ethereum-mainnet/`)} + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash.middlewares=ethereum-mainnet-fireeth-pruned-leveldb-hash-stripprefix, ipallowlist + - traefik.http.services.ethereum-mainnet-fireeth-pruned-leveldb-hash-firehose.loadbalancer.server.scheme=h2c + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-firehose.service=ethereum-mainnet-fireeth-pruned-leveldb-hash-firehose + - traefik.http.services.ethereum-mainnet-fireeth-pruned-leveldb-hash-firehose.loadbalancer.server.port=10015 + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-firehose.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-firehose.tls.certresolver=myresolver} + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-firehose.rule=Host(`ethereum-mainnet.${DOMAIN}`) + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-firehose.middlewares=ipallowlist + - traefik.http.services.ethereum-mainnet-fireeth-pruned-leveldb-hash-substreams.loadbalancer.server.scheme=h2c + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-substreams.service=ethereum-mainnet-fireeth-pruned-leveldb-hash-substreams + - traefik.http.services.ethereum-mainnet-fireeth-pruned-leveldb-hash-substreams.loadbalancer.server.port=10016 + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-substreams.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-substreams.tls.certresolver=myresolver} + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-substreams.rule=Host(`ethereum-mainnet-substreams.${DOMAIN}`) + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-substreams.middlewares=ipallowlist + + ethereum-mainnet-node: + image: ${ETHEREUM_NIMBUS_IMAGE:-statusim/nimbus-eth2}:${ETHEREUM_MAINNET_NIMBUS_VERSION:-amd64-v25.4.1} + user: root + ports: + - 18790:18790 + - 18790:18790/udp + entrypoint: /bin/sh -c '/home/user/nimbus-eth2/build/nimbus_beacon_node trustedNodeSync --network=mainnet --trusted-node-url=https://mainnet.beaconstate.info --backfill=false; exec /home/user/nimbus-eth2/build/nimbus_beacon_node "$@"' -- + command: + - --history=prune + - --jwt-secret=/jwtsecret + - --nat=extip:${IP} + - --network=mainnet + - --rest + - --rest-address=0.0.0.0 + - --rest-port=3500 + - --tcp-port=18790 + - --udp-port=18790 + - --web3-url=http://ethereum-mainnet:8551 + restart: unless-stopped + depends_on: + - ethereum-mainnet + networks: + - chains + volumes: + - ${ETHEREUM_MAINNET_FIREETH_PRUNED_LEVELDB_HASH__NIMBUS_DATA:-ethereum-mainnet-fireeth-pruned-leveldb-hash_nimbus}:/root/.cache/nimbus/BeaconNode + - .jwtsecret:/jwtsecret:ro + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.ethereum-mainnet-fireeth-pruned-leveldb-hash-node-stripprefix.stripprefix.prefixes=/ethereum-mainnet + - traefik.http.services.ethereum-mainnet-fireeth-pruned-leveldb-hash-node.loadbalancer.server.port=3500 + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-node.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-node.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-node.rule=Host(`$DOMAIN`) && PathPrefix(`/ethereum-mainnet/eth`)} + - ${NO_SSL:+traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-node.rule=PathPrefix(`/ethereum-mainnet/eth`)} + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-leveldb-hash-node.middlewares=ethereum-mainnet-fireeth-pruned-leveldb-hash-node-stripprefix, ipallowlist + +volumes: + ethereum-mainnet-fireeth-pruned-leveldb-hash: + ethereum-mainnet-fireeth-pruned-leveldb-hash_nimbus: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: ethereum + 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 + - id: $${ID}-beacon-chain + chain: eth-beacon-chain + labels: + provider: $${PROVIDER}-beacon-chain + connection: + generic: + rpc: + url: $${RPC_URL} +... \ No newline at end of file diff --git a/ethereum/fireeth/ethereum-mainnet-fireeth-pruned-pebble-path--nimbus.yml b/ethereum/fireeth/ethereum-mainnet-fireeth-pruned-pebble-path--nimbus.yml new file mode 100644 index 00000000..86df92f8 --- /dev/null +++ b/ethereum/fireeth/ethereum-mainnet-fireeth-pruned-pebble-path--nimbus.yml @@ -0,0 +1,204 @@ +--- + +# 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:ethereum/fireeth/ethereum-mainnet-fireeth-pruned-pebble-path--nimbus.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/ethereum-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: 10m + max-file: '3' + +services: + ethereum-mainnet: + image: ${ETHEREUM_FIREETH_IMAGE:-ghcr.io/streamingfast/firehose-ethereum}:${ETHEREUM_MAINNET_FIREETH_VERSION:-v2.11.9-geth-v1.15.10-fh3.0-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: + - 10384:10384 + - 10384:10384/udp + expose: + - 8545 + - 8551 + environment: + - ${ETHEREUM_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_S3_BLOCKS_STORE:-/firehose-data/storage/merged-blocks} + entrypoint: [sh, -c, 'exec fireeth -c /config/firehose.yml start --substreams-rpc-endpoints "${ ETHEREUM_MAINNET_EXECUTION_RPC}" --reader-node-arguments "$*"', _] + command: + - --datadir=/firehose-data/reader/data + - --db.engine=pebble + - --firehose-enabled + - --gcmode=full + - --maxpeers=50 + - --nat=extip:${IP} + - --port=10384 + - --rpc.gascap=600000000 + - --rpc.txfeecap=0 + - --state.scheme=path + - --syncmode=snap + - --http + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,debug,admin,txpool,engine + - --http.port=8545 + - --http.vhosts=* + - --ws + - --ws.addr=0.0.0.0 + - --ws.api=eth,net,web3,debug,admin,txpool,engine + - --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: + - ${ETHEREUM_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_DATA:-ethereum-mainnet-fireeth-pruned-pebble-path}:/firehose-data + - ${ETHEREUM_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_MERGED_BLOCKS_DATA:-ethereum-mainnet-fireeth-pruned-pebble-path-blocks}:/firehose-data/storage/merged-blocks + - .jwtsecret:/jwtsecret:ro + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.ethereum-mainnet-fireeth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/ethereum-mainnet + - traefik.http.services.ethereum-mainnet-fireeth-pruned-pebble-path.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/ethereum-mainnet`) || Path(`/ethereum-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path.rule=Path(`/ethereum-mainnet`) || Path(`/ethereum-mainnet/`)} + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path.middlewares=ethereum-mainnet-fireeth-pruned-pebble-path-stripprefix, ipallowlist + - traefik.http.services.ethereum-mainnet-fireeth-pruned-pebble-path-firehose.loadbalancer.server.scheme=h2c + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-firehose.service=ethereum-mainnet-fireeth-pruned-pebble-path-firehose + - traefik.http.services.ethereum-mainnet-fireeth-pruned-pebble-path-firehose.loadbalancer.server.port=10015 + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-firehose.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-firehose.tls.certresolver=myresolver} + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-firehose.rule=Host(`ethereum-mainnet.${DOMAIN}`) + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-firehose.middlewares=ipallowlist + - traefik.http.services.ethereum-mainnet-fireeth-pruned-pebble-path-substreams.loadbalancer.server.scheme=h2c + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-substreams.service=ethereum-mainnet-fireeth-pruned-pebble-path-substreams + - traefik.http.services.ethereum-mainnet-fireeth-pruned-pebble-path-substreams.loadbalancer.server.port=10016 + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-substreams.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-substreams.tls.certresolver=myresolver} + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-substreams.rule=Host(`ethereum-mainnet-substreams.${DOMAIN}`) + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-substreams.middlewares=ipallowlist + + ethereum-mainnet-node: + image: ${ETHEREUM_NIMBUS_IMAGE:-statusim/nimbus-eth2}:${ETHEREUM_MAINNET_NIMBUS_VERSION:-amd64-v25.4.1} + user: root + ports: + - 15384:15384 + - 15384:15384/udp + entrypoint: /bin/sh -c '/home/user/nimbus-eth2/build/nimbus_beacon_node trustedNodeSync --network=mainnet --trusted-node-url=https://mainnet.beaconstate.info --backfill=false; exec /home/user/nimbus-eth2/build/nimbus_beacon_node "$@"' -- + command: + - --history=prune + - --jwt-secret=/jwtsecret + - --nat=extip:${IP} + - --network=mainnet + - --rest + - --rest-address=0.0.0.0 + - --rest-port=3500 + - --tcp-port=15384 + - --udp-port=15384 + - --web3-url=http://ethereum-mainnet:8551 + restart: unless-stopped + depends_on: + - ethereum-mainnet + networks: + - chains + volumes: + - ${ETHEREUM_MAINNET_FIREETH_PRUNED_PEBBLE_PATH__NIMBUS_DATA:-ethereum-mainnet-fireeth-pruned-pebble-path_nimbus}:/root/.cache/nimbus/BeaconNode + - .jwtsecret:/jwtsecret:ro + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.ethereum-mainnet-fireeth-pruned-pebble-path-node-stripprefix.stripprefix.prefixes=/ethereum-mainnet + - traefik.http.services.ethereum-mainnet-fireeth-pruned-pebble-path-node.loadbalancer.server.port=3500 + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-node.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-node.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-node.rule=Host(`$DOMAIN`) && PathPrefix(`/ethereum-mainnet/eth`)} + - ${NO_SSL:+traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-node.rule=PathPrefix(`/ethereum-mainnet/eth`)} + - traefik.http.routers.ethereum-mainnet-fireeth-pruned-pebble-path-node.middlewares=ethereum-mainnet-fireeth-pruned-pebble-path-node-stripprefix, ipallowlist + +volumes: + ethereum-mainnet-fireeth-pruned-pebble-path: + ethereum-mainnet-fireeth-pruned-pebble-path_nimbus: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: ethereum + 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 + - id: $${ID}-beacon-chain + chain: eth-beacon-chain + labels: + provider: $${PROVIDER}-beacon-chain + connection: + generic: + rpc: + url: $${RPC_URL} +... \ No newline at end of file diff --git a/op/fireeth/base-mainnet-fireeth-pruned-leveldb-hash.yml b/op/fireeth/base-mainnet-fireeth-pruned-leveldb-hash.yml new file mode 100644 index 00000000..711466ae --- /dev/null +++ b/op/fireeth/base-mainnet-fireeth-pruned-leveldb-hash.yml @@ -0,0 +1,198 @@ +--- + +# 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:op/fireeth/base-mainnet-fireeth-pruned-leveldb-hash.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/base-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: 10m + max-file: '3' + +services: + base-mainnet: + image: ${BASE_FIREETH_IMAGE:-ghcr.io/streamingfast/firehose-ethereum}:${BASE_MAINNET_FIREETH_VERSION:-v2.11.9-optimism-v1.101503.4-op-node.v1.13.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: + - 12013:12013 + - 12013:12013/udp + expose: + - 8545 + - 8551 + environment: + - ${BASE_MAINNET_FIREETH_PRUNED_LEVELDB_HASH_S3_BLOCKS_STORE:-/firehose-data/storage/merged-blocks} + - GETH_OP_NETWORK=base-mainnet + - GETH_ROLLUP_SEQUENCERHTTP=https://mainnet-sequencer.base.org + entrypoint: [sh, -c, 'exec fireeth -c /config/firehose.yml start --substreams-rpc-endpoints "${ BASE_MAINNET_EXECUTION_RPC}" --reader-node-arguments "$*"', _] + command: + - --datadir=/firehose-data/reader/data + - --db.engine=leveldb + - --firehose-enabled + - --gcmode=full + - --maxpeers=50 + - --nat=extip:${IP} + - --port=12013 + - --rpc.gascap=600000000 + - --rpc.txfeecap=0 + - --state.scheme=hash + - --syncmode=snap + - --http + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,debug,admin,txpool,engine + - --http.port=8545 + - --http.vhosts=* + - --ws + - --ws.addr=0.0.0.0 + - --ws.api=eth,net,web3,debug,admin,txpool,engine + - --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: + - ${BASE_MAINNET_FIREETH_PRUNED_LEVELDB_HASH_DATA:-base-mainnet-fireeth-pruned-leveldb-hash}:/firehose-data + - ${BASE_MAINNET_FIREETH_PRUNED_LEVELDB_HASH_MERGED_BLOCKS_DATA:-base-mainnet-fireeth-pruned-leveldb-hash-blocks}:/firehose-data/storage/merged-blocks + - .jwtsecret:/jwtsecret:ro + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.base-mainnet-fireeth-pruned-leveldb-hash-stripprefix.stripprefix.prefixes=/base-mainnet + - traefik.http.services.base-mainnet-fireeth-pruned-leveldb-hash.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet`) || Path(`/base-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash.rule=Path(`/base-mainnet`) || Path(`/base-mainnet/`)} + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash.middlewares=base-mainnet-fireeth-pruned-leveldb-hash-stripprefix, ipallowlist + - traefik.http.services.base-mainnet-fireeth-pruned-leveldb-hash-firehose.loadbalancer.server.scheme=h2c + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-firehose.service=base-mainnet-fireeth-pruned-leveldb-hash-firehose + - traefik.http.services.base-mainnet-fireeth-pruned-leveldb-hash-firehose.loadbalancer.server.port=10015 + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-firehose.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-firehose.tls.certresolver=myresolver} + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-firehose.rule=Host(`base-mainnet.${DOMAIN}`) + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-firehose.middlewares=ipallowlist + - traefik.http.services.base-mainnet-fireeth-pruned-leveldb-hash-substreams.loadbalancer.server.scheme=h2c + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-substreams.service=base-mainnet-fireeth-pruned-leveldb-hash-substreams + - traefik.http.services.base-mainnet-fireeth-pruned-leveldb-hash-substreams.loadbalancer.server.port=10016 + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-substreams.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-substreams.tls.certresolver=myresolver} + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-substreams.rule=Host(`base-mainnet-substreams.${DOMAIN}`) + - traefik.http.routers.base-mainnet-fireeth-pruned-leveldb-hash-substreams.middlewares=ipallowlist + + base-mainnet-node: + image: ${BASE_NODE_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node}:${BASE_MAINNET_NODE_VERSION:-v1.13.2} + ports: + - 17013:17013 + - 17013:17013/udp + environment: + - OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST} + - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER} + - OP_NODE_L1_ETH_RPC=${ETHEREUM_MAINNET_EXECUTION_RPC} + - OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-basic} + - OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false} + - OP_NODE_L2_ENGINE_AUTH=/jwtsecret + - OP_NODE_L2_ENGINE_RPC=http://base-mainnet:8551 + - OP_NODE_L2_SKIP_SYNC_START_CHECK=true + - OP_NODE_LOG_LEVEL=info + - OP_NODE_METRICS_ADDR=0.0.0.0 + - OP_NODE_METRICS_ENABLED=true + - OP_NODE_METRICS_PORT=7300 + - OP_NODE_NETWORK=base-mainnet + - OP_NODE_P2P_ADVERTISE_IP=${IP} + - OP_NODE_P2P_LISTEN_IP=0.0.0.0 + - OP_NODE_P2P_LISTEN_TCP_PORT=17013 + - OP_NODE_P2P_LISTEN_UDP_PORT=17013 + - OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true + - OP_NODE_RPC_ADDR=0.0.0.0 + - OP_NODE_RPC_PORT=8545 + - OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log + - OP_NODE_SYNCMODE=execution-layer + - OP_NODE_VERIFIER_L1_CONFS=0 + entrypoint: [op-node] + restart: unless-stopped + depends_on: + - base-mainnet + networks: + - chains + volumes: + - .jwtsecret:/jwtsecret:ro + logging: *logging-defaults + +volumes: + base-mainnet-fireeth-pruned-leveldb-hash: + base-mainnet-fireeth-pruned-leveldb-hash-blocks: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: base + 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/op/fireeth/base-mainnet-fireeth-pruned-pebble-path.yml b/op/fireeth/base-mainnet-fireeth-pruned-pebble-path.yml new file mode 100644 index 00000000..0ada552a --- /dev/null +++ b/op/fireeth/base-mainnet-fireeth-pruned-pebble-path.yml @@ -0,0 +1,200 @@ +--- + +# 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:op/fireeth/base-mainnet-fireeth-pruned-pebble-path.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/base-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: 10m + max-file: '3' + +services: + base-mainnet: + image: ${BASE_FIREETH_IMAGE:-ghcr.io/streamingfast/firehose-ethereum}:${BASE_MAINNET_FIREETH_VERSION:-v2.11.9-optimism-v1.101503.4-op-node.v1.13.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: + - 11189:11189 + - 11189:11189/udp + expose: + - 8545 + - 8551 + environment: + - ${BASE_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_S3_BLOCKS_STORE:-/firehose-data/storage/merged-blocks} + - GETH_OP_NETWORK=base-mainnet + - GETH_ROLLUP_SEQUENCERHTTP=https://mainnet-sequencer.base.org + entrypoint: [sh, -c, 'exec fireeth -c /config/firehose.yml start --substreams-rpc-endpoints "${ BASE_MAINNET_EXECUTION_RPC}" --reader-node-arguments "$*"', _] + command: + - --datadir=/firehose-data/reader/data + - --db.engine=pebble + - --firehose-enabled + - --gcmode=full + - --maxpeers=50 + - --nat=extip:${IP} + - --port=11189 + - --rpc.gascap=600000000 + - --rpc.txfeecap=0 + - --state.scheme=path + - --syncmode=snap + - --http + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,debug,admin,txpool,engine + - --http.port=8545 + - --http.vhosts=* + - --ws + - --ws.addr=0.0.0.0 + - --ws.api=eth,net,web3,debug,admin,txpool,engine + - --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: + - ${BASE_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_DATA:-base-mainnet-fireeth-pruned-pebble-path}:/firehose-data + - ${BASE_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_MERGED_BLOCKS_DATA:-base-mainnet-fireeth-pruned-pebble-path-blocks}:/firehose-data/storage/merged-blocks + - .jwtsecret:/jwtsecret:ro + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.base-mainnet-fireeth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/base-mainnet + - traefik.http.services.base-mainnet-fireeth-pruned-pebble-path.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/base-mainnet`) || Path(`/base-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path.rule=Path(`/base-mainnet`) || Path(`/base-mainnet/`)} + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path.middlewares=base-mainnet-fireeth-pruned-pebble-path-stripprefix, ipallowlist + - traefik.http.services.base-mainnet-fireeth-pruned-pebble-path-firehose.loadbalancer.server.scheme=h2c + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-firehose.service=base-mainnet-fireeth-pruned-pebble-path-firehose + - traefik.http.services.base-mainnet-fireeth-pruned-pebble-path-firehose.loadbalancer.server.port=10015 + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-firehose.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-firehose.tls.certresolver=myresolver} + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-firehose.rule=Host(`base-mainnet.${DOMAIN}`) + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-firehose.middlewares=ipallowlist + - traefik.http.services.base-mainnet-fireeth-pruned-pebble-path-substreams.loadbalancer.server.scheme=h2c + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-substreams.service=base-mainnet-fireeth-pruned-pebble-path-substreams + - traefik.http.services.base-mainnet-fireeth-pruned-pebble-path-substreams.loadbalancer.server.port=10016 + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-substreams.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-substreams.tls.certresolver=myresolver} + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-substreams.rule=Host(`base-mainnet-substreams.${DOMAIN}`) + - traefik.http.routers.base-mainnet-fireeth-pruned-pebble-path-substreams.middlewares=ipallowlist + + base-mainnet-node: + image: ${BASE_NODE_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node}:${BASE_MAINNET_NODE_VERSION:-v1.13.2} + ports: + - 16189:16189 + - 16189:16189/udp + environment: + - OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST} + - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER} + - OP_NODE_L1_ETH_RPC=${ETHEREUM_MAINNET_EXECUTION_RPC} + - OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-basic} + - OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false} + - OP_NODE_L2_ENGINE_AUTH=/jwtsecret + - OP_NODE_L2_ENGINE_RPC=http://base-mainnet:8551 + - OP_NODE_L2_SKIP_SYNC_START_CHECK=true + - OP_NODE_LOG_LEVEL=info + - OP_NODE_METRICS_ADDR=0.0.0.0 + - OP_NODE_METRICS_ENABLED=true + - OP_NODE_METRICS_PORT=7300 + - OP_NODE_NETWORK=base-mainnet + - OP_NODE_P2P_ADVERTISE_IP=${IP} + - OP_NODE_P2P_LISTEN_IP=0.0.0.0 + - OP_NODE_P2P_LISTEN_TCP_PORT=16189 + - OP_NODE_P2P_LISTEN_UDP_PORT=16189 + - OP_NODE_ROLLUP_LOAD_PROTOCOL_VERSIONS=true + - OP_NODE_RPC_ADDR=0.0.0.0 + - OP_NODE_RPC_PORT=8545 + - OP_NODE_SNAPSHOT_LOG=/tmp/op-node-snapshot-log + - OP_NODE_SYNCMODE=execution-layer + - OP_NODE_VERIFIER_L1_CONFS=0 + entrypoint: [op-node] + restart: unless-stopped + depends_on: + - base-mainnet + networks: + - chains + volumes: + - .jwtsecret:/jwtsecret:ro + logging: *logging-defaults + +volumes: + base-mainnet-fireeth-pruned-pebble-path: + base-mainnet-fireeth-pruned-pebble-path-blocks: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: base + 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/polygon/fireeth/polygon-mainnet-fireeth-pruned-pebble-path.yml b/polygon/fireeth/polygon-mainnet-fireeth-pruned-pebble-path.yml new file mode 100644 index 00000000..4e56f3f5 --- /dev/null +++ b/polygon/fireeth/polygon-mainnet-fireeth-pruned-pebble-path.yml @@ -0,0 +1,146 @@ +--- + +# 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/fireeth/polygon-mainnet-fireeth-pruned-pebble-path.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/polygon-mainnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: 10m + max-file: '3' + +services: + polygon-mainnet: + image: ${POLYGON_FIREETH_IMAGE:-ghcr.io/streamingfast/firehose-ethereum}:${POLYGON_MAINNET_FIREETH_VERSION:-v2.11.9-polygon-v1.4.1-fh2.4-3} + 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 + environment: + - ${POLYGON_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_S3_BLOCKS_STORE:-/firehose-data/storage/merged-blocks} + entrypoint: [sh, -c, 'exec fireeth -c /config/firehose.yml start --substreams-rpc-endpoints "${ POLYGON_MAINNET_EXECUTION_RPC}" --reader-node-arguments "$*"', _] + command: + - --execution.caching.archive=false + - --execution.caching.state-scheme=path + - --execution.rpc.gas-cap=600000000 + - --execution.sequencer.enable=false + - --firehose-enabled + - --http.addr=0.0.0.0 + - --http.api=eth,net,web3,debug,admin,txpool,engine + - --http.corsdomain=* + - --http.port=8545 + - --http.vhosts=* + - --init.download-path=/tmp + - --persistent.chain=/firehose-data/reader/data/polygon-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: + - ${POLYGON_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_DATA:-polygon-mainnet-fireeth-pruned-pebble-path}:/firehose-data + - ${POLYGON_MAINNET_FIREETH_PRUNED_PEBBLE_PATH_MERGED_BLOCKS_DATA:-polygon-mainnet-fireeth-pruned-pebble-path-blocks}:/firehose-data/storage/merged-blocks + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - traefik.enable=true + - traefik.http.middlewares.polygon-mainnet-fireeth-pruned-pebble-path-stripprefix.stripprefix.prefixes=/polygon-mainnet + - traefik.http.services.polygon-mainnet-fireeth-pruned-pebble-path.loadbalancer.server.port=8545 + - ${NO_SSL:-traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path.rule=Host(`$DOMAIN`) && (Path(`/polygon-mainnet`) || Path(`/polygon-mainnet/`))} + - ${NO_SSL:+traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path.rule=Path(`/polygon-mainnet`) || Path(`/polygon-mainnet/`)} + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path.middlewares=polygon-mainnet-fireeth-pruned-pebble-path-stripprefix, ipallowlist + - traefik.http.services.polygon-mainnet-fireeth-pruned-pebble-path-firehose.loadbalancer.server.scheme=h2c + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-firehose.service=polygon-mainnet-fireeth-pruned-pebble-path-firehose + - traefik.http.services.polygon-mainnet-fireeth-pruned-pebble-path-firehose.loadbalancer.server.port=10015 + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-firehose.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-firehose.tls.certresolver=myresolver} + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-firehose.rule=Host(`polygon-mainnet.${DOMAIN}`) + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-firehose.middlewares=ipallowlist + - traefik.http.services.polygon-mainnet-fireeth-pruned-pebble-path-substreams.loadbalancer.server.scheme=h2c + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-substreams.service=polygon-mainnet-fireeth-pruned-pebble-path-substreams + - traefik.http.services.polygon-mainnet-fireeth-pruned-pebble-path-substreams.loadbalancer.server.port=10016 + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-substreams.entrypoints=grpc + - ${NO_SSL:-traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-substreams.tls.certresolver=myresolver} + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-substreams.rule=Host(`polygon-mainnet-substreams.${DOMAIN}`) + - traefik.http.routers.polygon-mainnet-fireeth-pruned-pebble-path-substreams.middlewares=ipallowlist + +volumes: + polygon-mainnet-fireeth-pruned-pebble-path: + polygon-mainnet-fireeth-pruned-pebble-path-blocks: + +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 +... \ No newline at end of file