tac: add TAC mainnet archive profile with EVM JSON-RPC upstream
- Add archive profile (pruning=nothing) for tacchaind - Change client_rpc_port from 26657 (CometBFT) to 8545 (EVM JSON-RPC) - Update Dockerfile to download pre-built binary from GitHub releases v1.6.0 - Verify binary against checksums.txt - Update init.sh to support PRUNING env var (nothing for archive, default for pruned) - Update peers from NETWORKS.md - Add archive snapshot URL note - Traefik routes to EVM JSON-RPC port 8545 for both pruned and archive Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -9672,6 +9672,22 @@
|
|||||||
"starknet-sepolia-pathfinder-pruned"
|
"starknet-sepolia-pathfinder-pruned"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chain": "mainnet",
|
||||||
|
"client": "tacchaind",
|
||||||
|
"compose_file": "tac/tacchaind/tac-mainnet-tacchaind-archive",
|
||||||
|
"drpc_chain": "tac",
|
||||||
|
"features": [],
|
||||||
|
"network": "tac",
|
||||||
|
"node": "config",
|
||||||
|
"relay": null,
|
||||||
|
"stack": null,
|
||||||
|
"type": "archive",
|
||||||
|
"volumes": [
|
||||||
|
"tac-mainnet-tacchaind-archive",
|
||||||
|
"tac-mainnet-tacchaind-archive_config"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chain": "mainnet",
|
"chain": "mainnet",
|
||||||
"client": "tacchaind",
|
"client": "tacchaind",
|
||||||
@@ -9688,6 +9704,22 @@
|
|||||||
"tac-mainnet-tacchaind-pruned_config"
|
"tac-mainnet-tacchaind-pruned_config"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"chain": "spb",
|
||||||
|
"client": "tacchaind",
|
||||||
|
"compose_file": "tac/tacchaind/tac-spb-tacchaind-archive",
|
||||||
|
"drpc_chain": "tac-spb",
|
||||||
|
"features": [],
|
||||||
|
"network": "tac",
|
||||||
|
"node": "config",
|
||||||
|
"relay": null,
|
||||||
|
"stack": null,
|
||||||
|
"type": "archive",
|
||||||
|
"volumes": [
|
||||||
|
"tac-spb-tacchaind-archive",
|
||||||
|
"tac-spb-tacchaind-archive_config"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"chain": "spb",
|
"chain": "spb",
|
||||||
"client": "tacchaind",
|
"client": "tacchaind",
|
||||||
|
|||||||
23
tac/scripts/init.sh
Executable file → Normal file
23
tac/scripts/init.sh
Executable file → Normal file
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# tacchaind entrypoint — TAC (Cosmos-SDK + embedded EVM). Genesis replay is impractical
|
# tacchaind entrypoint — TAC (Cosmos-SDK + embedded EVM). EVM JSON-RPC :8545/:8546
|
||||||
# (5 gov upgrades), so fresh nodes statesync near head via cometbft-common.sh.
|
# is the dshackle/traefik upstream; CometBFT :26657 / gRPC :9090 / REST :1317 are NOT
|
||||||
|
# publicly exposed. Genesis replay is impractical (5 gov upgrades), so fresh nodes
|
||||||
|
# statesync near head via cometbft-common.sh.
|
||||||
set -e
|
set -e
|
||||||
. /usr/local/bin/cometbft-common.sh
|
. /usr/local/bin/cometbft-common.sh
|
||||||
|
|
||||||
@@ -12,6 +14,8 @@ STATESYNC_RPC="${STATESYNC_RPC:-https://tacchain-rpc.polkachu.com:443}"
|
|||||||
MIN_GAS="${MIN_GAS:-25000000000utac}"
|
MIN_GAS="${MIN_GAS:-25000000000utac}"
|
||||||
API="${API:-eth,net,web3,txpool,debug}"
|
API="${API:-eth,net,web3,txpool,debug}"
|
||||||
MONIKER="${MONIKER:-rpc-node}"
|
MONIKER="${MONIKER:-rpc-node}"
|
||||||
|
# Pruning mode: set to "nothing" for archive nodes, "default" for pruned nodes.
|
||||||
|
PRUNING="${PRUNING:-default}"
|
||||||
|
|
||||||
ct_apk curl jq
|
ct_apk curl jq
|
||||||
|
|
||||||
@@ -24,8 +28,11 @@ else
|
|||||||
ct_log "already initialized, continuing"
|
ct_log "already initialized, continuing"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Serve CometBFT RPC on all interfaces (dshackle/traefik upstream); default is 127.0.0.1.
|
# Set pruning mode in app.toml (nothing for archive, default for pruned).
|
||||||
sed -i '/^\[rpc\]/,/^\[/{s|^laddr = .*|laddr = "tcp://0.0.0.0:26657"|}' "$CONFIG_DIR/config.toml"
|
sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" "$CONFIG_DIR/app.toml"
|
||||||
|
|
||||||
|
# Serve CometBFT RPC on all interfaces (internal only); default is 127.0.0.1.
|
||||||
|
sed -i '/^\[rpc\],/^\[/{s|^laddr = .*|laddr = "tcp://0.0.0.0:26657"|}' "$CONFIG_DIR/config.toml"
|
||||||
|
|
||||||
ct_patch_p2p "$CONFIG_DIR/config.toml" "$IP" "${P2P_PORT:-26656}"
|
ct_patch_p2p "$CONFIG_DIR/config.toml" "$IP" "${P2P_PORT:-26656}"
|
||||||
ct_merge_seeds "$CONFIG_DIR/config.toml" "$SEEDS"
|
ct_merge_seeds "$CONFIG_DIR/config.toml" "$SEEDS"
|
||||||
@@ -35,10 +42,10 @@ ct_configure_statesync "$CONFIG_DIR/config.toml" "$STATESYNC_RPC"
|
|||||||
|
|
||||||
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" "$CONFIG_DIR/config.toml"
|
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" "$CONFIG_DIR/config.toml"
|
||||||
|
|
||||||
sed -i "/^\[json-rpc\]/,/^\[/{s|^address = .*|address = \"0.0.0.0:8545\"|}" "$CONFIG_DIR/app.toml"
|
sed -i "/^\[json-rpc\],/^\[/{s|^address = .*|address = \"0.0.0.0:8545\"|}" "$CONFIG_DIR/app.toml"
|
||||||
sed -i "/^\[json-rpc\]/,/^\[/{s|^ws-address = .*|ws-address = \"0.0.0.0:8546\"|}" "$CONFIG_DIR/app.toml"
|
sed -i "/^\[json-rpc\],/^\[/{s|^ws-address = .*|ws-address = \"0.0.0.0:8546\"|}" "$CONFIG_DIR/app.toml"
|
||||||
sed -i "/^\[json-rpc\]/,/^\[/{s|^api = .*|api = \"$API\"|}" "$CONFIG_DIR/app.toml"
|
sed -i "/^\[json-rpc\],/^\[/{s|^api = .*|api = \"$API\"|}" "$CONFIG_DIR/app.toml"
|
||||||
|
|
||||||
ct_seed_priv_validator_state "$HOME_DIR"
|
ct_seed_priv_validator_state "$HOME_DIR"
|
||||||
|
|
||||||
exec tacchaind start --chain-id="$CHAIN_ID" --pruning=default --json-rpc.enable --home "$HOME_DIR" "$@"
|
exec tacchaind start --chain-id="$CHAIN_ID" --json-rpc.enable --home "$HOME_DIR" "$@"
|
||||||
|
|||||||
@@ -1,38 +1,42 @@
|
|||||||
# tacchaind — source build mirroring upstream TacBuild/tacchain Dockerfile (v1.6.0).
|
# tacchaind — binary download from GitHub releases (v1.6.0).
|
||||||
|
# Downloads pre-built linux-amd64 binary and verifies against checksums.txt.
|
||||||
ARG VERSION=v1.6.0
|
ARG VERSION=v1.6.0
|
||||||
|
|
||||||
FROM golang:1.23.8-alpine3.21 AS go-builder
|
|
||||||
|
|
||||||
ARG VERSION
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
ca-certificates \
|
|
||||||
build-base \
|
|
||||||
git \
|
|
||||||
libusb-dev \
|
|
||||||
linux-headers \
|
|
||||||
eudev-dev
|
|
||||||
|
|
||||||
WORKDIR /code
|
|
||||||
RUN git clone https://github.com/TacBuild/tacchain.git /code && \
|
|
||||||
cd /code && \
|
|
||||||
git checkout "${VERSION}" && \
|
|
||||||
LEDGER_ENABLED=true make build
|
|
||||||
|
|
||||||
FROM alpine:3.21
|
FROM alpine:3.21
|
||||||
|
|
||||||
RUN apk upgrade --no-cache && \
|
RUN apk upgrade --no-cache && \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
curl \
|
||||||
libusb
|
libusb
|
||||||
|
|
||||||
COPY --from=go-builder /code/build/tacchaind /usr/bin/tacchaind
|
# Download binary and checksums
|
||||||
|
ARG VERSION
|
||||||
|
RUN set -eux; \
|
||||||
|
BINARY_URL="https://github.com/TacBuild/tacchain/releases/download/${VERSION}/tacchaind-linux-amd64" && \
|
||||||
|
CHECKSUMS_URL="https://github.com/TacBuild/tacchain/releases/download/${VERSION}/checksums.txt" && \
|
||||||
|
curl -sL -o /tmp/tacchaind "${BINARY_URL}" && \
|
||||||
|
curl -sL -o /tmp/checksums.txt "${CHECKSUMS_URL}" && \
|
||||||
|
# Verify the binary against checksums.txt (sha256sum format: <hash> <filename>)
|
||||||
|
cd /tmp && \
|
||||||
|
ExpectedHash=$(grep "tacchaind-linux-amd64$" checksums.txt | awk '{print $1}') && \
|
||||||
|
ActualHash=$(sha256sum tacchaind | awk '{print $1}') && \
|
||||||
|
if [ "$ExpectedHash" != "$ActualHash" ]; then \
|
||||||
|
echo "ERROR: checksum mismatch for tacchaind-linux-amd64" >&2; \
|
||||||
|
echo " Expected: $ExpectedHash" >&2; \
|
||||||
|
echo " Actual: $ActualHash" >&2; \
|
||||||
|
exit 1; \
|
||||||
|
fi && \
|
||||||
|
chmod +x /tmp/tacchaind && \
|
||||||
|
mv /tmp/tacchaind /usr/bin/tacchaind && \
|
||||||
|
rm -f /tmp/checksums.txt
|
||||||
|
|
||||||
COPY ./scripts/cometbft-common.sh /usr/local/bin/cometbft-common.sh
|
COPY ./scripts/cometbft-common.sh /usr/local/bin/cometbft-common.sh
|
||||||
COPY ./scripts/init.sh /usr/local/bin/init.sh
|
COPY ./scripts/init.sh /usr/local/bin/init.sh
|
||||||
RUN chmod +x /usr/local/bin/init.sh /usr/local/bin/cometbft-common.sh
|
RUN chmod +x /usr/local/bin/init.sh /usr/local/bin/cometbft-common.sh
|
||||||
|
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
EXPOSE 1317 26656 26657
|
EXPOSE 1317 26656 26657 8545 8546
|
||||||
|
|
||||||
ENTRYPOINT ["init.sh"]
|
ENTRYPOINT ["init.sh"]
|
||||||
|
|||||||
130
tac/tacchaind/tac-mainnet-tacchaind-archive.yml
Normal file
130
tac/tacchaind/tac-mainnet-tacchaind-archive.yml
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "512m"
|
||||||
|
max-file: "2"
|
||||||
|
|
||||||
|
# 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:tac/tacchaind/tac-mainnet-tacchaind-archive.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/tac-mainnet-archive \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
tac-mainnet-archive:
|
||||||
|
build:
|
||||||
|
context: ./tac
|
||||||
|
dockerfile: tacchaind.Dockerfile
|
||||||
|
args:
|
||||||
|
VERSION: ${TAC_MAINNET_TACCHAIND_VERSION:-v1.6.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
|
||||||
|
ports:
|
||||||
|
- 11030:11030
|
||||||
|
- 11030:11030/udp
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
- 8546
|
||||||
|
- 6065
|
||||||
|
environment:
|
||||||
|
- API=eth,net,web3,txpool,debug
|
||||||
|
- CHAIN_ID=tacchain_239-1
|
||||||
|
- GENESIS_URL=https://raw.githubusercontent.com/TacBuild/tacchain/refs/heads/main/networks/tacchain_239-1/genesis.json
|
||||||
|
- IP=${IP}
|
||||||
|
- MIN_GAS=25000000000utac
|
||||||
|
- MONIKER=d${DOMAIN:-local}
|
||||||
|
- P2P_PORT=11030
|
||||||
|
- PERSISTENT_PEERS=d0a80c43a10a6b60475864728db6d9ba4ead42d2@107.6.113.60:58960,10550a03e4f7fa487c78fbd07e0770e2b0f085c7@64.46.115.78:58960,0efae9d157f0ef60ad7d25507d6939799f832e34@173.244.202.99:58960,78079166d06e345dbf4a5c932ee3c69a04148e92@107.6.91.38:58960
|
||||||
|
- PRUNING=nothing
|
||||||
|
- SEEDS=d0a80c43a10a6b60475864728db6d9ba4ead42d2@107.6.113.60:58960,10550a03e4f7fa487c78fbd07e0770e2b0f085c7@64.46.115.78:58960,0efae9d157f0ef60ad7d25507d6939799f832e34@173.244.202.99:58960,78079166d06e345dbf4a5c932ee3c69a04148e92@107.6.91.38:58960
|
||||||
|
- STATESYNC_RPC=https://tacchain-rpc.polkachu.com:443
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${TAC_MAINNET_TACCHAIND_ARCHIVE_DATA:-tac-mainnet-tacchaind-archive}:/root/.tacchaind/data
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
- tac-mainnet-tacchaind-archive_config:/root/.tacchaind/config
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6065
|
||||||
|
- prometheus-scrape.path=/metrics
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.tac-mainnet-tacchaind-archive-stripprefix.stripprefix.prefixes=/tac-mainnet-archive
|
||||||
|
- traefik.http.services.tac-mainnet-tacchaind-archive.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-archive.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-archive.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-archive.rule=Host(`$DOMAIN`) && (Path(`/tac-mainnet-archive`) || Path(`/tac-mainnet-archive/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.tac-mainnet-tacchaind-archive.rule=Path(`/tac-mainnet-archive`) || Path(`/tac-mainnet-archive/`)}
|
||||||
|
- traefik.http.routers.tac-mainnet-tacchaind-archive.middlewares=tac-mainnet-tacchaind-archive-stripprefix, ipallowlist
|
||||||
|
- traefik.http.routers.tac-mainnet-tacchaind-archive.priority=50 # gets any request that is not GET with UPGRADE header
|
||||||
|
- traefik.http.routers.tac-mainnet-tacchaind-archive-ws.priority=100 # answers GET requests first
|
||||||
|
- traefik.http.middlewares.tac-mainnet-tacchaind-archive-set-ws-path.replacepath.path=/websocket
|
||||||
|
- traefik.http.services.tac-mainnet-tacchaind-archive-ws.loadbalancer.server.port=8546
|
||||||
|
- traefik.http.routers.tac-mainnet-tacchaind-archive-ws.service=tac-mainnet-tacchaind-archive-ws
|
||||||
|
- traefik.http.routers.tac-mainnet-tacchaind-archive.service=tac-mainnet-tacchaind-archive
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-archive-ws.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-archive-ws.tls.certresolver=myresolver}
|
||||||
|
# case-insensitive Upgrade: python websocket-client sends "WebSocket" (capital W)
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-archive-ws.rule=Host(`$DOMAIN`) && (Path(`/tac-mainnet-archive`) || Path(`/tac-mainnet-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.tac-mainnet-tacchaind-archive-ws.rule=(Path(`/tac-mainnet-archive`) || Path(`/tac-mainnet-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- traefik.http.routers.tac-mainnet-tacchaind-archive-ws.middlewares=tac-mainnet-tacchaind-archive-stripprefix, tac-mainnet-tacchaind-archive-set-ws-path, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
tac-mainnet-tacchaind-archive:
|
||||||
|
tac-mainnet-tacchaind-archive_config:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: tac
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
@@ -53,7 +53,8 @@ services:
|
|||||||
- 10283:10283
|
- 10283:10283
|
||||||
- 10283:10283/udp
|
- 10283:10283/udp
|
||||||
expose:
|
expose:
|
||||||
- 26657
|
- 8545
|
||||||
|
- 8546
|
||||||
- 6065
|
- 6065
|
||||||
environment:
|
environment:
|
||||||
- API=eth,net,web3,txpool,debug
|
- API=eth,net,web3,txpool,debug
|
||||||
@@ -63,8 +64,9 @@ services:
|
|||||||
- MIN_GAS=25000000000utac
|
- MIN_GAS=25000000000utac
|
||||||
- MONIKER=d${DOMAIN:-local}
|
- MONIKER=d${DOMAIN:-local}
|
||||||
- P2P_PORT=10283
|
- P2P_PORT=10283
|
||||||
- PERSISTENT_PEERS=68b409519dea2a057d93ab6df436f6d519f13cb8@65.109.61.125:32156,186e207d2c95e94a44ff613770aa269dac876013@65.108.201.240:32156,c4410e765acead36188500ed75d5666aa209c93d@65.108.205.121:32156
|
- PERSISTENT_PEERS=d0a80c43a10a6b60475864728db6d9ba4ead42d2@107.6.113.60:58960,10550a03e4f7fa487c78fbd07e0770e2b0f085c7@64.46.115.78:58960,0efae9d157f0ef60ad7d25507d6939799f832e34@173.244.202.99:58960,78079166d06e345dbf4a5c932ee3c69a04148e92@107.6.91.38:58960
|
||||||
- SEEDS=68b409519dea2a057d93ab6df436f6d519f13cb8@65.109.61.125:32156
|
- PRUNING=default
|
||||||
|
- SEEDS=d0a80c43a10a6b60475864728db6d9ba4ead42d2@107.6.113.60:58960,10550a03e4f7fa487c78fbd07e0770e2b0f085c7@64.46.115.78:58960,0efae9d157f0ef60ad7d25507d6939799f832e34@173.244.202.99:58960,78079166d06e345dbf4a5c932ee3c69a04148e92@107.6.91.38:58960
|
||||||
- STATESYNC_RPC=https://tacchain-rpc.polkachu.com:443
|
- STATESYNC_RPC=https://tacchain-rpc.polkachu.com:443
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
stop_grace_period: 5m
|
stop_grace_period: 5m
|
||||||
@@ -81,7 +83,7 @@ services:
|
|||||||
- prometheus-scrape.path=/metrics
|
- prometheus-scrape.path=/metrics
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.middlewares.tac-mainnet-tacchaind-pruned-stripprefix.stripprefix.prefixes=/tac-mainnet
|
- traefik.http.middlewares.tac-mainnet-tacchaind-pruned-stripprefix.stripprefix.prefixes=/tac-mainnet
|
||||||
- traefik.http.services.tac-mainnet-tacchaind-pruned.loadbalancer.server.port=26657
|
- traefik.http.services.tac-mainnet-tacchaind-pruned.loadbalancer.server.port=8545
|
||||||
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned.rule=Host(`$DOMAIN`) && (Path(`/tac-mainnet`) || Path(`/tac-mainnet/`))}
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned.rule=Host(`$DOMAIN`) && (Path(`/tac-mainnet`) || Path(`/tac-mainnet/`))}
|
||||||
@@ -90,7 +92,7 @@ services:
|
|||||||
- traefik.http.routers.tac-mainnet-tacchaind-pruned.priority=50 # gets any request that is not GET with UPGRADE header
|
- traefik.http.routers.tac-mainnet-tacchaind-pruned.priority=50 # gets any request that is not GET with UPGRADE header
|
||||||
- traefik.http.routers.tac-mainnet-tacchaind-pruned-ws.priority=100 # answers GET requests first
|
- traefik.http.routers.tac-mainnet-tacchaind-pruned-ws.priority=100 # answers GET requests first
|
||||||
- traefik.http.middlewares.tac-mainnet-tacchaind-pruned-set-ws-path.replacepath.path=/websocket
|
- traefik.http.middlewares.tac-mainnet-tacchaind-pruned-set-ws-path.replacepath.path=/websocket
|
||||||
- traefik.http.services.tac-mainnet-tacchaind-pruned-ws.loadbalancer.server.port=26657
|
- traefik.http.services.tac-mainnet-tacchaind-pruned-ws.loadbalancer.server.port=8546
|
||||||
- traefik.http.routers.tac-mainnet-tacchaind-pruned-ws.service=tac-mainnet-tacchaind-pruned-ws
|
- traefik.http.routers.tac-mainnet-tacchaind-pruned-ws.service=tac-mainnet-tacchaind-pruned-ws
|
||||||
- traefik.http.routers.tac-mainnet-tacchaind-pruned.service=tac-mainnet-tacchaind-pruned
|
- traefik.http.routers.tac-mainnet-tacchaind-pruned.service=tac-mainnet-tacchaind-pruned
|
||||||
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned-ws.entrypoints=websecure}
|
||||||
|
|||||||
129
tac/tacchaind/tac-spb-tacchaind-archive.yml
Normal file
129
tac/tacchaind/tac-spb-tacchaind-archive.yml
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
---
|
||||||
|
x-logging-defaults: &logging-defaults
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "512m"
|
||||||
|
max-file: "2"
|
||||||
|
|
||||||
|
# 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:tac/tacchaind/tac-spb-tacchaind-archive.yml
|
||||||
|
#
|
||||||
|
# docker compose up -d
|
||||||
|
#
|
||||||
|
# curl -X POST https://${IP}.traefik.me/tac-spb-archive \
|
||||||
|
# -H "Content-Type: application/json" \
|
||||||
|
# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
|
||||||
|
|
||||||
|
services:
|
||||||
|
tac-spb-archive:
|
||||||
|
build:
|
||||||
|
context: ./tac
|
||||||
|
dockerfile: tacchaind.Dockerfile
|
||||||
|
args:
|
||||||
|
VERSION: ${TAC_SPB_TACCHAIND_VERSION:-v1.6.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
|
||||||
|
ports:
|
||||||
|
- 11180:11180
|
||||||
|
- 11180:11180/udp
|
||||||
|
expose:
|
||||||
|
- 8545
|
||||||
|
- 8546
|
||||||
|
- 6065
|
||||||
|
environment:
|
||||||
|
- API=eth,net,web3,txpool,debug
|
||||||
|
- CHAIN_ID=tacchain_2391-1
|
||||||
|
- GENESIS_URL=https://raw.githubusercontent.com/TacBuild/tacchain/refs/heads/main/networks/tacchain_2391-1/genesis.json
|
||||||
|
- IP=${IP}
|
||||||
|
- MIN_GAS=25000000000utac
|
||||||
|
- MONIKER=d${DOMAIN:-local}
|
||||||
|
- P2P_PORT=11180
|
||||||
|
- PERSISTENT_PEERS=9c32b3b959a2427bd2aa064f8c9a8efebdad4c23@206.217.210.164:45130,04a2152eed9f73dc44779387a870ea6480c41fe7@206.217.210.164:45140,5aaaf8140262d7416ac53abe4e0bd13b0f582168@23.92.177.41:45110,ddb3e8b8f4d051e914686302dafc2a73adf9b0d2@23.92.177.41:45120
|
||||||
|
- PRUNING=nothing
|
||||||
|
- STATESYNC_RPC=https://spb.tendermint.rpc.tac.build
|
||||||
|
restart: unless-stopped
|
||||||
|
stop_grace_period: 5m
|
||||||
|
networks:
|
||||||
|
- chains
|
||||||
|
volumes:
|
||||||
|
- ${TAC_SPB_TACCHAIND_ARCHIVE_DATA:-tac-spb-tacchaind-archive}:/root/.tacchaind/data
|
||||||
|
- /slowdisk:/slowdisk
|
||||||
|
- tac-spb-tacchaind-archive_config:/root/.tacchaind/config
|
||||||
|
logging: *logging-defaults
|
||||||
|
labels:
|
||||||
|
- prometheus-scrape.enabled=true
|
||||||
|
- prometheus-scrape.port=6065
|
||||||
|
- prometheus-scrape.path=/metrics
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.middlewares.tac-spb-tacchaind-archive-stripprefix.stripprefix.prefixes=/tac-spb-archive
|
||||||
|
- traefik.http.services.tac-spb-tacchaind-archive.loadbalancer.server.port=8545
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-archive.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-archive.tls.certresolver=myresolver}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-archive.rule=Host(`$DOMAIN`) && (Path(`/tac-spb-archive`) || Path(`/tac-spb-archive/`))}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.tac-spb-tacchaind-archive.rule=Path(`/tac-spb-archive`) || Path(`/tac-spb-archive/`)}
|
||||||
|
- traefik.http.routers.tac-spb-tacchaind-archive.middlewares=tac-spb-tacchaind-archive-stripprefix, ipallowlist
|
||||||
|
- traefik.http.routers.tac-spb-tacchaind-archive.priority=50 # gets any request that is not GET with UPGRADE header
|
||||||
|
- traefik.http.routers.tac-spb-tacchaind-archive-ws.priority=100 # answers GET requests first
|
||||||
|
- traefik.http.middlewares.tac-spb-tacchaind-archive-set-ws-path.replacepath.path=/websocket
|
||||||
|
- traefik.http.services.tac-spb-tacchaind-archive-ws.loadbalancer.server.port=8546
|
||||||
|
- traefik.http.routers.tac-spb-tacchaind-archive-ws.service=tac-spb-tacchaind-archive-ws
|
||||||
|
- traefik.http.routers.tac-spb-tacchaind-archive.service=tac-spb-tacchaind-archive
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-archive-ws.entrypoints=websecure}
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-archive-ws.tls.certresolver=myresolver}
|
||||||
|
# case-insensitive Upgrade: python websocket-client sends "WebSocket" (capital W)
|
||||||
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-archive-ws.rule=Host(`$DOMAIN`) && (Path(`/tac-spb-archive`) || Path(`/tac-spb-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- ${NO_SSL:+traefik.http.routers.tac-spb-tacchaind-archive-ws.rule=(Path(`/tac-spb-archive`) || Path(`/tac-spb-archive/`)) && HeadersRegexp(`Upgrade`, `(?i)websocket`)}
|
||||||
|
- traefik.http.routers.tac-spb-tacchaind-archive-ws.middlewares=tac-spb-tacchaind-archive-stripprefix, tac-spb-tacchaind-archive-set-ws-path, ipallowlist
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
tac-spb-tacchaind-archive:
|
||||||
|
tac-spb-tacchaind-archive_config:
|
||||||
|
|
||||||
|
x-upstreams:
|
||||||
|
- id: $${ID}
|
||||||
|
labels:
|
||||||
|
provider: $${PROVIDER}
|
||||||
|
connection:
|
||||||
|
generic:
|
||||||
|
rpc:
|
||||||
|
url: $${RPC_URL}
|
||||||
|
ws:
|
||||||
|
frameSize: 20Mb
|
||||||
|
msgSize: 50Mb
|
||||||
|
url: $${WS_URL}
|
||||||
|
chain: tac-spb
|
||||||
|
method-groups:
|
||||||
|
enabled:
|
||||||
|
- debug
|
||||||
|
- filter
|
||||||
|
methods:
|
||||||
|
disabled:
|
||||||
|
enabled:
|
||||||
|
- name: txpool_content # TODO: should be disabled for rollup nodes
|
||||||
|
...
|
||||||
@@ -53,7 +53,8 @@ services:
|
|||||||
- 14331:14331
|
- 14331:14331
|
||||||
- 14331:14331/udp
|
- 14331:14331/udp
|
||||||
expose:
|
expose:
|
||||||
- 26657
|
- 8545
|
||||||
|
- 8546
|
||||||
- 6065
|
- 6065
|
||||||
environment:
|
environment:
|
||||||
- API=eth,net,web3,txpool,debug
|
- API=eth,net,web3,txpool,debug
|
||||||
@@ -64,6 +65,7 @@ services:
|
|||||||
- MONIKER=d${DOMAIN:-local}
|
- MONIKER=d${DOMAIN:-local}
|
||||||
- P2P_PORT=14331
|
- P2P_PORT=14331
|
||||||
- PERSISTENT_PEERS=9c32b3b959a2427bd2aa064f8c9a8efebdad4c23@206.217.210.164:45130,04a2152eed9f73dc44779387a870ea6480c41fe7@206.217.210.164:45140,5aaaf8140262d7416ac53abe4e0bd13b0f582168@23.92.177.41:45110,ddb3e8b8f4d051e914686302dafc2a73adf9b0d2@23.92.177.41:45120
|
- PERSISTENT_PEERS=9c32b3b959a2427bd2aa064f8c9a8efebdad4c23@206.217.210.164:45130,04a2152eed9f73dc44779387a870ea6480c41fe7@206.217.210.164:45140,5aaaf8140262d7416ac53abe4e0bd13b0f582168@23.92.177.41:45110,ddb3e8b8f4d051e914686302dafc2a73adf9b0d2@23.92.177.41:45120
|
||||||
|
- PRUNING=default
|
||||||
- STATESYNC_RPC=https://spb.tendermint.rpc.tac.build
|
- STATESYNC_RPC=https://spb.tendermint.rpc.tac.build
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
stop_grace_period: 5m
|
stop_grace_period: 5m
|
||||||
@@ -80,7 +82,7 @@ services:
|
|||||||
- prometheus-scrape.path=/metrics
|
- prometheus-scrape.path=/metrics
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.middlewares.tac-spb-tacchaind-pruned-stripprefix.stripprefix.prefixes=/tac-spb
|
- traefik.http.middlewares.tac-spb-tacchaind-pruned-stripprefix.stripprefix.prefixes=/tac-spb
|
||||||
- traefik.http.services.tac-spb-tacchaind-pruned.loadbalancer.server.port=26657
|
- traefik.http.services.tac-spb-tacchaind-pruned.loadbalancer.server.port=8545
|
||||||
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned.entrypoints=websecure}
|
||||||
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned.tls.certresolver=myresolver}
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned.tls.certresolver=myresolver}
|
||||||
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned.rule=Host(`$DOMAIN`) && (Path(`/tac-spb`) || Path(`/tac-spb/`))}
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned.rule=Host(`$DOMAIN`) && (Path(`/tac-spb`) || Path(`/tac-spb/`))}
|
||||||
@@ -89,7 +91,7 @@ services:
|
|||||||
- traefik.http.routers.tac-spb-tacchaind-pruned.priority=50 # gets any request that is not GET with UPGRADE header
|
- traefik.http.routers.tac-spb-tacchaind-pruned.priority=50 # gets any request that is not GET with UPGRADE header
|
||||||
- traefik.http.routers.tac-spb-tacchaind-pruned-ws.priority=100 # answers GET requests first
|
- traefik.http.routers.tac-spb-tacchaind-pruned-ws.priority=100 # answers GET requests first
|
||||||
- traefik.http.middlewares.tac-spb-tacchaind-pruned-set-ws-path.replacepath.path=/websocket
|
- traefik.http.middlewares.tac-spb-tacchaind-pruned-set-ws-path.replacepath.path=/websocket
|
||||||
- traefik.http.services.tac-spb-tacchaind-pruned-ws.loadbalancer.server.port=26657
|
- traefik.http.services.tac-spb-tacchaind-pruned-ws.loadbalancer.server.port=8546
|
||||||
- traefik.http.routers.tac-spb-tacchaind-pruned-ws.service=tac-spb-tacchaind-pruned-ws
|
- traefik.http.routers.tac-spb-tacchaind-pruned-ws.service=tac-spb-tacchaind-pruned-ws
|
||||||
- traefik.http.routers.tac-spb-tacchaind-pruned.service=tac-spb-tacchaind-pruned
|
- traefik.http.routers.tac-spb-tacchaind-pruned.service=tac-spb-tacchaind-pruned
|
||||||
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned-ws.entrypoints=websecure}
|
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned-ws.entrypoints=websecure}
|
||||||
|
|||||||
Reference in New Issue
Block a user