122 lines
5.1 KiB
YAML
122 lines
5.1 KiB
YAML
---
|
|
x-logging-defaults: &logging-defaults
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
# statesync is great. if you are too far behind after a restart then you can just delete the volume and start again.
|
|
# statesync will need a few hours to complete tho.
|
|
# if you want to test the current lag you could try it under the RPC endpoint, for example XXXX:26657/lag_status
|
|
|
|
# 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:sei/sei/sei-mainnet-sei-pruned.yml
|
|
#
|
|
# docker compose up -d
|
|
#
|
|
# curl -X POST https://${IP}.traefik.me/sei-mainnet-sei-pruned \
|
|
# -H "Content-Type: application/json" \
|
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
|
|
|
services:
|
|
sei-mainnet-sei-pruned:
|
|
build:
|
|
context: ./sei
|
|
dockerfile: sei.Dockerfile
|
|
args:
|
|
SEI_VERSION: ${SEI_MAINNET_SEI_VERSION:-v6.1.11}
|
|
SEI_IMAGE: ${SEI_MAINNET_SEI_IMAGE:-ghcr.io/sei-protocol/sei}
|
|
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:
|
|
- 10019:10019
|
|
- 10019:10019/udp
|
|
expose:
|
|
- 8545
|
|
- 8546
|
|
env_file:
|
|
- ./sei/mainnet.env
|
|
environment:
|
|
- IP=${IP}
|
|
- MONIKER=d${DOMAIN:-local}
|
|
- P2P_PORT=10019
|
|
- PEERS=${SEI_MAINNET_SEI_PEERS:-3be6b24cf86a5938cce7d48f44fb6598465a9924@p2p.state-sync-0.pacific-1.seinetwork.io:26656,b21279d7092fde2e41770832a1cacc7d0051e9dc@p2p.state-sync-1.pacific-1.seinetwork.io:26656,616c05e9ba24acc89c0de630b5e3adbedaebb478@p2p.state-sync-2.pacific-1.seinetwork.io:26656}
|
|
restart: unless-stopped
|
|
stop_grace_period: 5m
|
|
networks:
|
|
- chains
|
|
volumes:
|
|
- ${SEI_MAINNET_SEI_PRUNED_DATA:-sei-mainnet-sei-pruned}:/root/.sei
|
|
- /slowdisk:/slowdisk
|
|
logging: *logging-defaults
|
|
labels:
|
|
- prometheus-scrape.enabled=false
|
|
- traefik.enable=true
|
|
- traefik.http.middlewares.sei-mainnet-sei-pruned-stripprefix.stripprefix.prefixes=/sei-mainnet-sei-pruned
|
|
- traefik.http.services.sei-mainnet-sei-pruned.loadbalancer.server.port=8545
|
|
- ${NO_SSL:-traefik.http.routers.sei-mainnet-sei-pruned.entrypoints=websecure}
|
|
- ${NO_SSL:-traefik.http.routers.sei-mainnet-sei-pruned.tls.certresolver=myresolver}
|
|
- ${NO_SSL:-traefik.http.routers.sei-mainnet-sei-pruned.rule=Host(`$DOMAIN`) && (Path(`/sei-mainnet-sei-pruned`) || Path(`/sei-mainnet-sei-pruned/`))}
|
|
- ${NO_SSL:+traefik.http.routers.sei-mainnet-sei-pruned.rule=Path(`/sei-mainnet-sei-pruned`) || Path(`/sei-mainnet-sei-pruned/`)}
|
|
- traefik.http.routers.sei-mainnet-sei-pruned.middlewares=sei-mainnet-sei-pruned-stripprefix, ipallowlist
|
|
- traefik.http.routers.sei-mainnet-sei-pruned.priority=50 # gets any request that is not GET with UPGRADE header
|
|
- traefik.http.routers.sei-mainnet-sei-pruned-ws.priority=100 # answers GET requests first
|
|
- traefik.http.services.sei-mainnet-sei-pruned-ws.loadbalancer.server.port=8546
|
|
- traefik.http.routers.sei-mainnet-sei-pruned-ws.service=sei-mainnet-sei-pruned-ws
|
|
- traefik.http.routers.sei-mainnet-sei-pruned.service=sei-mainnet-sei-pruned
|
|
- ${NO_SSL:-traefik.http.routers.sei-mainnet-sei-pruned-ws.entrypoints=websecure}
|
|
- ${NO_SSL:-traefik.http.routers.sei-mainnet-sei-pruned-ws.tls.certresolver=myresolver}
|
|
- ${NO_SSL:-traefik.http.routers.sei-mainnet-sei-pruned-ws.rule=Host(`$DOMAIN`) && (Path(`/sei-mainnet-sei-pruned`) || Path(`/sei-mainnet-sei-pruned/`)) && Headers(`Upgrade`, `websocket`)}
|
|
- ${NO_SSL:+traefik.http.routers.sei-mainnet-sei-pruned-ws.rule=(Path(`/sei-mainnet-sei-pruned`) || Path(`/sei-mainnet-sei-pruned/`)) && Headers(`Upgrade`, `websocket`)}
|
|
- traefik.http.routers.sei-mainnet-sei-pruned-ws.middlewares=sei-mainnet-sei-pruned-stripprefix, ipallowlist
|
|
|
|
volumes:
|
|
sei-mainnet-sei-pruned:
|
|
|
|
x-upstreams:
|
|
- id: $${ID}
|
|
labels:
|
|
provider: $${PROVIDER}
|
|
connection:
|
|
generic:
|
|
rpc:
|
|
url: $${RPC_URL}
|
|
ws:
|
|
frameSize: 20Mb
|
|
msgSize: 50Mb
|
|
url: $${WS_URL}
|
|
chain: sei
|
|
method-groups:
|
|
enabled:
|
|
- debug
|
|
- filter
|
|
methods:
|
|
disabled:
|
|
enabled:
|
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
|
... |