101 lines
3.7 KiB
YAML
101 lines
3.7 KiB
YAML
---
|
|
|
|
services:
|
|
sonic-mainnet-archive:
|
|
build:
|
|
context: ./sonic
|
|
dockerfile: sonic.Dockerfile
|
|
args:
|
|
VERSION: v2.0.3
|
|
REPO: https://github.com/0xsoniclabs/sonic.git
|
|
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:
|
|
- 10658:10658
|
|
- 10658:10658/udp
|
|
expose:
|
|
- 8545
|
|
environment:
|
|
- CACHE_GB=${SONIC_CACHE_GB:-28}
|
|
- GENESIS=https://genesis.soniclabs.com/sonic-mainnet/genesis/sonic-16500-full.g
|
|
- IP=${IP}
|
|
- SONIC_HOME=/var/sonic
|
|
command:
|
|
- --cache=${SONIC_MAINNET_SONIC_ARCHIVE_CACHE_MB:-16000}
|
|
- --http
|
|
- --http.addr=0.0.0.0
|
|
- --http.api=admin,debug,web3,eth,dag,txpool,personal,abft,net,trace,ftm
|
|
- --http.port=8545
|
|
- --http.vhosts=*
|
|
- --maxpeers=50
|
|
- --nat=extip:${IP}
|
|
- --port=10658
|
|
- --rpc.gascap=600000000
|
|
- --rpc.txfeecap=0
|
|
- --ws
|
|
- --ws.addr=0.0.0.0
|
|
- --ws.api=admin,debug,web3,eth,dag,txpool,personal,abft,net,trace,ftm
|
|
- --ws.origins=*
|
|
- --ws.port=8545
|
|
restart: unless-stopped
|
|
stop_grace_period: 5m
|
|
networks:
|
|
- chains
|
|
volumes:
|
|
- ${SONIC_MAINNET_SONIC_ARCHIVE_DATA:-sonic-mainnet-sonic-archive}:/var/sonic
|
|
- /slowdisk:/slowdisk
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.middlewares.sonic-mainnet-sonic-archive-stripprefix.stripprefix.prefixes=/sonic-mainnet-archive
|
|
- traefik.http.services.sonic-mainnet-sonic-archive.loadbalancer.server.port=8545
|
|
- ${NO_SSL:-traefik.http.routers.sonic-mainnet-sonic-archive.entrypoints=websecure}
|
|
- ${NO_SSL:-traefik.http.routers.sonic-mainnet-sonic-archive.tls.certresolver=myresolver}
|
|
- ${NO_SSL:-traefik.http.routers.sonic-mainnet-sonic-archive.rule=Host(`$DOMAIN`) && PathPrefix(`/sonic-mainnet-archive`)}
|
|
- ${NO_SSL:+traefik.http.routers.sonic-mainnet-sonic-archive.rule=PathPrefix(`/sonic-mainnet-archive`)}
|
|
- traefik.http.routers.sonic-mainnet-sonic-archive.middlewares=sonic-mainnet-sonic-archive-stripprefix, ipwhitelist
|
|
|
|
volumes:
|
|
sonic-mainnet-sonic-archive:
|
|
|
|
x-upstreams:
|
|
- id: $${ID}
|
|
labels:
|
|
provider: $${PROVIDER}
|
|
chain: sonic
|
|
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
|
|
... |