xlayer: archive-only reth on OKX xlayer/op-reth image + snapshot reth.toml

X Layer mainnet/testnet op-reth now use the OKX xlayer/op-reth:v0.0.4.1 fork
(generic op-reth can't read the X Layer DB format), the image's built-in
xlayer-<network> chain spec, --rpc.legacy-url for post-snapshot history gap-fill,
and the OKX archive-compatible reth.toml (light pruning only: merkle_changesets
distance=10064). Switched the reth profile from full_trace to archive_trace and
deleted the pruned variants — a "pruned" compose over archive snapshot data
crash-loops on a block-height mismatch. Requires the official OKX reth snapshot
pre-loaded into the volume; do NOT sync from scratch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-16 04:35:28 +00:00
parent fd283122f5
commit 677a98d9bd
13 changed files with 236 additions and 471 deletions

View File

@@ -6776,22 +6776,6 @@
"xlayer-mainnet-op-reth-archive-trace" "xlayer-mainnet-op-reth-archive-trace"
] ]
}, },
{
"chain": "mainnet",
"client": "reth",
"compose_file": "op/reth/xlayer-mainnet-op-reth-pruned-trace",
"features": [
"trace"
],
"network": "xlayer",
"node": "node",
"relay": null,
"stack": "op",
"type": "pruned",
"volumes": [
"xlayer-mainnet-op-reth-pruned-trace"
]
},
{ {
"chain": "testnet", "chain": "testnet",
"client": "reth", "client": "reth",
@@ -6808,22 +6792,6 @@
"xlayer-testnet-op-reth-archive-trace" "xlayer-testnet-op-reth-archive-trace"
] ]
}, },
{
"chain": "testnet",
"client": "reth",
"compose_file": "op/reth/xlayer-testnet-op-reth-pruned-trace",
"features": [
"trace"
],
"network": "xlayer",
"node": "node",
"relay": null,
"stack": "op",
"type": "pruned",
"volumes": [
"xlayer-testnet-op-reth-pruned-trace"
]
},
{ {
"chain": "amoy", "chain": "amoy",
"client": "bor", "client": "bor",

View File

@@ -136,7 +136,7 @@ services:
- OP_NODE_CONDUCTOR_ENABLED=false - OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST} - OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER} - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_MAINNET_EXECUTION_RPC} - OP_NODE_L1_ETH_RPC=${XLAYER_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-standard} - OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false} - OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret - OP_NODE_L2_ENGINE_AUTH=/jwtsecret

View File

@@ -136,7 +136,7 @@ services:
- OP_NODE_CONDUCTOR_ENABLED=false - OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST} - OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER} - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_MAINNET_EXECUTION_RPC} - OP_NODE_L1_ETH_RPC=${XLAYER_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-standard} - OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false} - OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret - OP_NODE_L2_ENGINE_AUTH=/jwtsecret

View File

@@ -136,7 +136,7 @@ services:
- OP_NODE_CONDUCTOR_ENABLED=false - OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST} - OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER} - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_MAINNET_EXECUTION_RPC} - OP_NODE_L1_ETH_RPC=${XLAYER_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-standard} - OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false} - OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret - OP_NODE_L2_ENGINE_AUTH=/jwtsecret

View File

@@ -136,7 +136,7 @@ services:
- OP_NODE_CONDUCTOR_ENABLED=false - OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST} - OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER} - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_SEPOLIA_EXECUTION_RPC} - OP_NODE_L1_ETH_RPC=${XLAYER_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard} - OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false} - OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret - OP_NODE_L2_ENGINE_AUTH=/jwtsecret

View File

@@ -136,7 +136,7 @@ services:
- OP_NODE_CONDUCTOR_ENABLED=false - OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST} - OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER} - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_SEPOLIA_EXECUTION_RPC} - OP_NODE_L1_ETH_RPC=${XLAYER_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard} - OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false} - OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret - OP_NODE_L2_ENGINE_AUTH=/jwtsecret

View File

@@ -136,7 +136,7 @@ services:
- OP_NODE_CONDUCTOR_ENABLED=false - OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST} - OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER} - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_SEPOLIA_EXECUTION_RPC} - OP_NODE_L1_ETH_RPC=${XLAYER_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard} - OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false} - OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret - OP_NODE_L2_ENGINE_AUTH=/jwtsecret

View File

@@ -4,6 +4,11 @@ x-logging-defaults: &logging-defaults
options: options:
max-size: "10m" max-size: "10m"
max-file: "3" max-file: "3"
# X Layer mainnet/testnet require the official OKX reth snapshot — do NOT sync from scratch.
# Generic op-reth can't read the X Layer DB format (xlayerdb), so this uses xlayer/op-reth
# (pinned in context.yml) with the image's built-in xlayer-<network> chain spec and the OKX
# archive reth.toml. --rpc.legacy-url (the public X Layer RPC) gap-fills history after the
# snapshot loads. node_sync=true already gives op-node consensus-layer + reth --disable-discovery.
# Usage: # Usage:
# #
@@ -46,7 +51,7 @@ services:
logging: *logging-defaults logging: *logging-defaults
xlayer-mainnet-op-reth: xlayer-mainnet-op-reth:
image: ${XLAYER_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${XLAYER_MAINNET_RETH_VERSION:-v2.3.1} image: ${XLAYER_RETH_IMAGE:-xlayer/op-reth}:${XLAYER_MAINNET_RETH_VERSION:-v0.0.4.1}
sysctls: sysctls:
# TCP Performance # TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
@@ -70,7 +75,7 @@ services:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz - GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
entrypoint: [op-reth, node] entrypoint: [op-reth, node]
command: command:
- --chain=/config/genesis.json - --chain=xlayer-mainnet
- --config=/config/reth/reth.toml - --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth - --datadir=/root/.local/share/reth
- --disable-discovery - --disable-discovery
@@ -82,6 +87,7 @@ services:
- --rpc-cache.max-blocks=10000 - --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048 - --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000 - --rpc.gascap=600000000
- --rpc.legacy-url=https://rpc.xlayer.tech
- --rpc.max-blocks-per-filter=0 - --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000 - --rpc.max-connections=50000
- --rpc.max-logs-per-response=0 - --rpc.max-logs-per-response=0
@@ -135,7 +141,7 @@ services:
- OP_NODE_CONDUCTOR_ENABLED=false - OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST} - OP_NODE_L1_BEACON=${ETHEREUM_MAINNET_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER} - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_MAINNET_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_MAINNET_EXECUTION_RPC} - OP_NODE_L1_ETH_RPC=${XLAYER_MAINNET_L1_EXECUTION_RPC:-${ETHEREUM_MAINNET_EXECUTION_RPC}}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-standard} - OP_NODE_L1_RPC_KIND=${ETHEREUM_MAINNET_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false} - OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret - OP_NODE_L2_ENGINE_AUTH=/jwtsecret

View File

@@ -1,213 +0,0 @@
---
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:op/reth/xlayer-mainnet-op-reth-pruned-trace.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/xlayer-mainnet-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
xlayer-mainnet-op-reth-pruned-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || wget -qO- "https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz" | tar -xzf - -O --wildcards "*.json" > /config/genesis.json
restart: no
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
logging: *logging-defaults
xlayer-mainnet-op-reth-pruned:
image: ${XLAYER_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${XLAYER_MAINNET_RETH_VERSION:-v2.3.1}
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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
expose:
- 8545
- 9001
- 8551
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
entrypoint: [op-reth, node]
command:
- --chain=/config/genesis.json
- --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth
- --disable-discovery
- --engine.cross-block-cache-size=${XLAYER_MAINNET_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --rollup.sequencer-http=https://rpc.xlayer.tech
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
depends_on:
xlayer-mainnet-op-reth-pruned-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${XLAYER_MAINNET_OP_RETH_PRUNED_TRACE_DATA:-xlayer-mainnet-op-reth-pruned-trace}:/root/.local/share/reth
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/xlayer-mainnet-op-reth-pruned
- traefik.http.services.xlayer-mainnet-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/xlayer-mainnet-op-reth-pruned`) || Path(`/xlayer-mainnet-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace.rule=Path(`/xlayer-mainnet-op-reth-pruned`) || Path(`/xlayer-mainnet-op-reth-pruned/`)}
- traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace.middlewares=xlayer-mainnet-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
xlayer-mainnet-op-reth-pruned-node:
image: ${XLAYER_NODE_IMAGE:-xlayer/op-node}:${XLAYER_MAINNET_NODE_VERSION:-v0.1.5.1}
ports:
- 18338:18338
- 18338:18338/udp
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.mainnet.tar.gz
- OP_NODE_CONDUCTOR_ENABLED=false
- 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:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_MAINNET_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret
- OP_NODE_L2_ENGINE_KIND=reth
- OP_NODE_L2_ENGINE_RPC=http://xlayer-mainnet-op-reth-pruned:8551
- OP_NODE_L2_ENGINE_RPC_TIMEOUT=120s
- 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_P2P_ADVERTISE_IP=${IP}
- OP_NODE_P2P_BOOTNODES=enode://c67d7f63c5483ab8311123d2997bfe6a8aac2b117a40167cf71682f8a3e37d3b86547c786559355c4c05ae0b1a7e7a1b8fde55050b183f96728d62e276467ce1@8.210.177.150:9223,enode://28e3e305b266e01226a7cc979ab692b22507784095157453ee0e34607bb3beac9a5b00f3e3d7d3ac36164612ca25108e6b79f75e3a9ecb54a0b3e7eb3e097d37@8.210.15.172:9223,enode://b5aa43622aad25c619650a0b7f8bb030161dfbfd5664233f92d841a33b404cea3ffffdc5bc8d6667c7dc212242a52f0702825c1e51612047f75c847ab96ef7a6@8.210.69.97:9223
- OP_NODE_P2P_LISTEN_IP=0.0.0.0
- OP_NODE_P2P_LISTEN_TCP_PORT=18338
- OP_NODE_P2P_LISTEN_UDP_PORT=18338
- OP_NODE_P2P_STATIC=/ip4/47.242.38.0/tcp/9223/p2p/16Uiu2HAmH1AVhKWR29mb5s8Cubgsbh4CH1G86A6yoVtjrLWQgiY3,/ip4/8.210.153.12/tcp/9223/p2p/16Uiu2HAkuerkmQYMZxYiQYfQcPob9H7XHPwS7pd8opPTMEm2nsAp,/ip4/8.210.117.27/tcp/9223/p2p/16Uiu2HAmQEzn2WQj4kmWVrK9aQsfyQcETgXQKjcKGrTPsKcJBv7a
- OP_NODE_ROLLUP_CONFIG=/config/rollup.json
- 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=consensus-layer
- OP_NODE_VERIFIER_L1_CONFS=0
entrypoint: [/app/op-node/bin/op-node]
restart: unless-stopped
depends_on:
- xlayer-mainnet-op-reth-pruned
networks:
- chains
volumes:
- ./op/xlayer/mainnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-mainnet-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/xlayer-mainnet-op-reth-pruned/node
- traefik.http.services.xlayer-mainnet-op-reth-pruned-trace-node.loadbalancer.server.port=8547
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/xlayer-mainnet-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace-node.rule=PathPrefix(`/xlayer-mainnet-op-reth-pruned/node`)}
- traefik.http.routers.xlayer-mainnet-op-reth-pruned-trace-node.middlewares=xlayer-mainnet-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
xlayer-mainnet-op-reth-pruned-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: xlayer
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -4,6 +4,11 @@ x-logging-defaults: &logging-defaults
options: options:
max-size: "10m" max-size: "10m"
max-file: "3" max-file: "3"
# X Layer mainnet/testnet require the official OKX reth snapshot — do NOT sync from scratch.
# Generic op-reth can't read the X Layer DB format (xlayerdb), so this uses xlayer/op-reth
# (pinned in context.yml) with the image's built-in xlayer-<network> chain spec and the OKX
# archive reth.toml. --rpc.legacy-url (the public X Layer RPC) gap-fills history after the
# snapshot loads. node_sync=true already gives op-node consensus-layer + reth --disable-discovery.
# Usage: # Usage:
# #
@@ -46,7 +51,7 @@ services:
logging: *logging-defaults logging: *logging-defaults
xlayer-testnet-op-reth: xlayer-testnet-op-reth:
image: ${XLAYER_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${XLAYER_TESTNET_RETH_VERSION:-v2.3.1} image: ${XLAYER_RETH_IMAGE:-xlayer/op-reth}:${XLAYER_TESTNET_RETH_VERSION:-v0.0.4.1}
sysctls: sysctls:
# TCP Performance # TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle
@@ -70,7 +75,7 @@ services:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.tar.gz - GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.tar.gz
entrypoint: [op-reth, node] entrypoint: [op-reth, node]
command: command:
- --chain=/config/genesis.json - --chain=xlayer-testnet
- --config=/config/reth/reth.toml - --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth - --datadir=/root/.local/share/reth
- --disable-discovery - --disable-discovery
@@ -82,6 +87,7 @@ services:
- --rpc-cache.max-blocks=10000 - --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048 - --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000 - --rpc.gascap=600000000
- --rpc.legacy-url=https://testrpc.xlayer.tech
- --rpc.max-blocks-per-filter=0 - --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000 - --rpc.max-connections=50000
- --rpc.max-logs-per-response=0 - --rpc.max-logs-per-response=0
@@ -135,7 +141,7 @@ services:
- OP_NODE_CONDUCTOR_ENABLED=false - OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST} - OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER} - OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_SEPOLIA_EXECUTION_RPC} - OP_NODE_L1_ETH_RPC=${XLAYER_TESTNET_L1_EXECUTION_RPC:-${ETHEREUM_SEPOLIA_EXECUTION_RPC}}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard} - OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false} - OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret - OP_NODE_L2_ENGINE_AUTH=/jwtsecret

View File

@@ -1,214 +0,0 @@
---
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:op/reth/xlayer-testnet-op-reth-pruned-trace.yml
#
# docker compose up -d
#
# curl -X POST https://${IP}.traefik.me/xlayer-testnet-op-reth-pruned \
# -H "Content-Type: application/json" \
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
services:
xlayer-testnet-op-reth-pruned-init:
image: alpine:3.21
user: root
entrypoint: [/bin/sh, -c]
command:
- |
apk add --no-cache curl wget
mkdir -p /config
[ -f /config/genesis.json ] || wget -qO- "https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.tar.gz" | tar -xzf - -O --wildcards "*.json" > /config/genesis.json
restart: no
networks:
- chains
volumes:
- ./op/xlayer/testnet:/config
logging: *logging-defaults
xlayer-testnet-op-reth-pruned:
image: ${XLAYER_RETH_IMAGE:-us-docker.pkg.dev/oplabs-tools-artifacts/images/op-reth}:${XLAYER_TESTNET_RETH_VERSION:-v2.3.1}
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)
memlock: -1 # Disable memory locking limits (for in-memory DBs like MDBX)
user: root
expose:
- 8545
- 9001
- 8551
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.tar.gz
entrypoint: [op-reth, node]
command:
- --chain=/config/genesis.json
- --config=/config/reth/reth.toml
- --datadir=/root/.local/share/reth
- --disable-discovery
- --engine.cross-block-cache-size=${XLAYER_TESTNET_RETH_STATE_CACHE:-4096}
- --full
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001
- --rollup.sequencer-http=https://testrpc.xlayer.tech
- --rpc-cache.max-blocks=10000
- --rpc-cache.max-concurrent-db-requests=2048
- --rpc.gascap=600000000
- --rpc.max-blocks-per-filter=0
- --rpc.max-connections=50000
- --rpc.max-logs-per-response=0
- --rpc.max-trace-filter-blocks=10000
- --http
- --http.addr=0.0.0.0
- --http.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --http.corsdomain=*
- --http.port=8545
- --ws
- --ws.addr=0.0.0.0
- --ws.api=admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,mev
- --ws.origins=*
- --ws.port=8545
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/jwtsecret
restart: unless-stopped
stop_grace_period: 5m
depends_on:
xlayer-testnet-op-reth-pruned-init:
condition: service_completed_successfully
networks:
- chains
volumes:
- ${XLAYER_TESTNET_OP_RETH_PRUNED_TRACE_DATA:-xlayer-testnet-op-reth-pruned-trace}:/root/.local/share/reth
- ./op/xlayer/testnet:/config
- .jwtsecret:/jwtsecret:ro
- /slowdisk:/slowdisk
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=9001
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-testnet-op-reth-pruned-trace-stripprefix.stripprefix.prefixes=/xlayer-testnet-op-reth-pruned
- traefik.http.services.xlayer-testnet-op-reth-pruned-trace.loadbalancer.server.port=8545
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-pruned-trace.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-pruned-trace.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-pruned-trace.rule=Host(`$DOMAIN`) && (Path(`/xlayer-testnet-op-reth-pruned`) || Path(`/xlayer-testnet-op-reth-pruned/`))}
- ${NO_SSL:+traefik.http.routers.xlayer-testnet-op-reth-pruned-trace.rule=Path(`/xlayer-testnet-op-reth-pruned`) || Path(`/xlayer-testnet-op-reth-pruned/`)}
- traefik.http.routers.xlayer-testnet-op-reth-pruned-trace.middlewares=xlayer-testnet-op-reth-pruned-trace-stripprefix, ipallowlist
shm_size: 2gb
xlayer-testnet-op-reth-pruned-node:
image: ${XLAYER_NODE_IMAGE:-xlayer/op-node}:${XLAYER_TESTNET_NODE_VERSION:-v0.1.5.1}
ports:
- 16456:16456
- 16456:16456/udp
environment:
- GENESIS_URL=https://okg-pub-hk.oss-cn-hongkong.aliyuncs.com/cdn/chain/xlayer/snapshot/merged.genesis.json.tar.gz
- OP_NODE_CONDUCTOR_ENABLED=false
- OP_NODE_L1_BEACON=${ETHEREUM_SEPOLIA_BEACON_REST}
- OP_NODE_L1_BEACON_ARCHIVER=${ETHEREUM_SEPOLIA_BEACON_ARCHIVER}
- OP_NODE_L1_ETH_RPC=${ETHEREUM_SEPOLIA_EXECUTION_RPC}
- OP_NODE_L1_RPC_KIND=${ETHEREUM_SEPOLIA_EXECUTION_KIND:-standard}
- OP_NODE_L1_TRUST_RPC=${ETHEREUM_SEPOLIA_EXECUTION_TRUST:-false}
- OP_NODE_L2_ENGINE_AUTH=/jwtsecret
- OP_NODE_L2_ENGINE_KIND=reth
- OP_NODE_L2_ENGINE_RPC=http://xlayer-testnet-op-reth-pruned:8551
- OP_NODE_L2_ENGINE_RPC_TIMEOUT=120s
- 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_OVERRIDE_PECTRABLOBSCHEDULE=1742486400
- OP_NODE_P2P_ADVERTISE_IP=${IP}
- OP_NODE_P2P_BOOTNODES=enode://eaae9fe2fc758add65fe4cfd42918e898e16ab23294db88f0dcdbcab2773e75bbea6bfdaa42b3ed502dfbee1335c242c602078c4aa009264e4705caa20d3dca7@8.210.181.50:9223
- OP_NODE_P2P_LISTEN_IP=0.0.0.0
- OP_NODE_P2P_LISTEN_TCP_PORT=16456
- OP_NODE_P2P_LISTEN_UDP_PORT=16456
- OP_NODE_P2P_STATIC=/ip4/47.242.219.101/tcp/9223/p2p/16Uiu2HAkwUdbn9Q7UBKQYRsfjm9SQX5Yc2e96HUz2pyR3cw1FZLv,/ip4/47.242.235.15/tcp/9223/p2p/16Uiu2HAmThDG9xMpADbyGo1oCU8fndztwNg1PH6A7yp1BhCk5jfE
- OP_NODE_ROLLUP_CONFIG=/config/rollup.json
- 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=consensus-layer
- OP_NODE_VERIFIER_L1_CONFS=0
entrypoint: [/app/op-node/bin/op-node]
restart: unless-stopped
depends_on:
- xlayer-testnet-op-reth-pruned
networks:
- chains
volumes:
- ./op/xlayer/testnet:/config
- .jwtsecret:/jwtsecret:ro
logging: *logging-defaults
labels:
- prometheus-scrape.enabled=true
- prometheus-scrape.port=7300
- prometheus-scrape.path=/metrics
- traefik.enable=true
- traefik.http.middlewares.xlayer-testnet-op-reth-pruned-trace-node-stripprefix.stripprefix.prefixes=/xlayer-testnet-op-reth-pruned/node
- traefik.http.services.xlayer-testnet-op-reth-pruned-trace-node.loadbalancer.server.port=8547
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-pruned-trace-node.entrypoints=websecure}
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-pruned-trace-node.tls.certresolver=myresolver}
- ${NO_SSL:-traefik.http.routers.xlayer-testnet-op-reth-pruned-trace-node.rule=Host(`$DOMAIN`) && PathPrefix(`/xlayer-testnet-op-reth-pruned/node`)}
- ${NO_SSL:+traefik.http.routers.xlayer-testnet-op-reth-pruned-trace-node.rule=PathPrefix(`/xlayer-testnet-op-reth-pruned/node`)}
- traefik.http.routers.xlayer-testnet-op-reth-pruned-trace-node.middlewares=xlayer-testnet-op-reth-pruned-trace-node-stripprefix, ipallowlist
volumes:
xlayer-testnet-op-reth-pruned-trace:
x-upstreams:
- id: $${ID}
labels:
provider: $${PROVIDER}
connection:
generic:
rpc:
url: $${RPC_URL}
ws:
frameSize: 20Mb
msgSize: 50Mb
url: $${WS_URL}
chain: xlayer-testnet
method-groups:
enabled:
- debug
- filter
- trace
methods:
disabled:
- name: eth_maxPriorityFeePerGas
enabled:
- name: txpool_content # TODO: should be disabled for rollup nodes
...

View File

@@ -0,0 +1,106 @@
[stages.era]
[stages.headers]
downloader_max_concurrent_requests = 100
downloader_min_concurrent_requests = 5
downloader_max_buffered_responses = 100
downloader_request_limit = 1000
commit_threshold = 10000
[stages.bodies]
downloader_request_limit = 200
downloader_stream_batch_size = 1000
downloader_max_buffered_blocks_size_bytes = 2147483648
downloader_min_concurrent_requests = 5
downloader_max_concurrent_requests = 100
[stages.sender_recovery]
commit_threshold = 5000000
[stages.execution]
max_blocks = 500000
max_changes = 5000000
max_cumulative_gas = 1500000000000
max_duration = "10m"
[stages.prune]
commit_threshold = 1000000
[stages.account_hashing]
clean_threshold = 500000
commit_threshold = 100000
[stages.storage_hashing]
clean_threshold = 500000
commit_threshold = 100000
[stages.merkle]
incremental_threshold = 7000
rebuild_threshold = 100000
[stages.transaction_lookup]
chunk_size = 5000000
[stages.index_account_history]
commit_threshold = 100000
[stages.index_storage_history]
commit_threshold = 100000
[stages.etl]
file_size = 524288000
[prune]
block_interval = 5
[prune.segments.merkle_changesets]
distance = 10064
[peers]
refill_slots_interval = "5s"
trusted_nodes = []
trusted_nodes_only = false
trusted_nodes_resolution_interval = "1h"
max_backoff_count = 5
ban_duration = "12h"
incoming_ip_throttle_duration = "30s"
[peers.connection_info]
max_outbound = 100
max_inbound = 30
max_concurrent_outbound_dials = 15
[peers.reputation_weights]
bad_message = -16384
bad_block = -16384
bad_transactions = -16384
already_seen_transactions = 0
timeout = -4096
bad_protocol = -2147483648
failed_to_connect = -25600
dropped = -4096
bad_announcement = -1024
[peers.backoff_durations]
low = "30s"
medium = "3m"
high = "15m"
max = "1h"
[sessions]
session_command_buffer = 32
session_event_buffer = 260
[sessions.limits]
[sessions.initial_internal_request_timeout]
secs = 20
nanos = 0
[sessions.protocol_breach_request_timeout]
secs = 120
nanos = 0
[sessions.pending_session_timeout]
secs = 20
nanos = 0

View File

@@ -0,0 +1,106 @@
[stages.era]
[stages.headers]
downloader_max_concurrent_requests = 100
downloader_min_concurrent_requests = 5
downloader_max_buffered_responses = 100
downloader_request_limit = 1000
commit_threshold = 10000
[stages.bodies]
downloader_request_limit = 200
downloader_stream_batch_size = 1000
downloader_max_buffered_blocks_size_bytes = 2147483648
downloader_min_concurrent_requests = 5
downloader_max_concurrent_requests = 100
[stages.sender_recovery]
commit_threshold = 5000000
[stages.execution]
max_blocks = 500000
max_changes = 5000000
max_cumulative_gas = 1500000000000
max_duration = "10m"
[stages.prune]
commit_threshold = 1000000
[stages.account_hashing]
clean_threshold = 500000
commit_threshold = 100000
[stages.storage_hashing]
clean_threshold = 500000
commit_threshold = 100000
[stages.merkle]
incremental_threshold = 7000
rebuild_threshold = 100000
[stages.transaction_lookup]
chunk_size = 5000000
[stages.index_account_history]
commit_threshold = 100000
[stages.index_storage_history]
commit_threshold = 100000
[stages.etl]
file_size = 524288000
[prune]
block_interval = 5
[prune.segments.merkle_changesets]
distance = 10064
[peers]
refill_slots_interval = "5s"
trusted_nodes = []
trusted_nodes_only = false
trusted_nodes_resolution_interval = "1h"
max_backoff_count = 5
ban_duration = "12h"
incoming_ip_throttle_duration = "30s"
[peers.connection_info]
max_outbound = 100
max_inbound = 30
max_concurrent_outbound_dials = 15
[peers.reputation_weights]
bad_message = -16384
bad_block = -16384
bad_transactions = -16384
already_seen_transactions = 0
timeout = -4096
bad_protocol = -2147483648
failed_to_connect = -25600
dropped = -4096
bad_announcement = -1024
[peers.backoff_durations]
low = "30s"
medium = "3m"
high = "15m"
max = "1h"
[sessions]
session_command_buffer = 32
session_event_buffer = 260
[sessions.limits]
[sessions.initial_internal_request_timeout]
secs = 20
nanos = 0
[sessions.protocol_breach_request_timeout]
secs = 120
nanos = 0
[sessions.pending_session_timeout]
secs = 20
nanos = 0