Compare commits

..

21 Commits

Author SHA1 Message Date
206fc78735 Merge branch 'main' into issue-2601 2026-08-26 02:42:30 +00:00
20511cd247 Merge pull request 'abcore mainnet: add geth-fork chain-id 36888' (#56) from issue-3079 into main 2026-08-26 02:35:13 +00:00
42bc7f504e avalanche fuji: enable C-chain state-sync on pruned profile (mirrors #48 for mainnet; full block execution was 55h+ ETA on the de-22 prune-cycle test node) 2026-08-26 01:50:29 +00:00
fed15a5484 Merge pull request 'avalanche: enable state-sync on C-chain pruned profile' (#48) from issue-2307 into main 2026-08-26 01:49:58 +00:00
ba44def37b fix zero-gravity doubled-v: add VERSION normalization to extraction RUN step
The previous commit (7cbd0532) added VERSION normalization to the DOWNLOAD
RUN step but forgot to add it to the EXTRACTION RUN step. Each Dockerfile
RUN is a fresh shell, so the extraction step fails with 'VERSION: unbound
variable' when it tries to use ${VERSION} in the SRC variable.

Fix: add VERSION="${ZERO_GRAVITY_VERSION#v}"; to the extraction RUN step
(line 73) so it defines VERSION before using it.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-08-25 09:14:25 +00:00
0071f41e4c tac: update mainnet peer list with verified live peers (2026-08-25) 2026-08-25 05:35:26 +00:00
7cbd053236 fix zero-gravity doubled-v bug in Dockerfile asset names
Remove leading 'v' from ZERO_GRAVITY_VERSION values in context.yml
(1.0.6, 3.0.8 instead of v1.0.6, v3.0.8) and add defensive stripping in
zerog.Dockerfile (VERSION=${ZERO_GRAVITY_VERSION#v}) to prevent
asset names like aristotle-vv1.0.6.tar.gz / galileo-vv3.0.8.tar.gz.

The asset filename is always <spec>-v<version>.tar.gz, and the Dockerfile
was adding a 'v' prefix to versions that already had one.

Verified URLs resolve:
- aristotle: https://github.com/0gfoundation/0gchain-Aristotle/releases/download/v1.0.6/aristotle-v1.0.6.tar.gz
- galileo: https://github.com/0gfoundation/0gchain-NG/releases/download/v3.0.8/galileo-v3.0.8.tar.gz

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-08-25 04:36:36 +00:00
6979290310 tac: fix malformed sed address ranges in init.sh
Fix four sed address ranges that were missing closing slash before comma:
- /^\[rpc\],/^\[/ -> /^\[rpc\]/,/^\[/
- /^\[json-rpc\],/^\[/ -> /^\[json-rpc\]/,/^\[/ (3 occurrences)

The malformed patterns caused sed to crash-loop the TAC container.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-08-25 04:08:06 +00:00
0e6c2a3bc7 zero-gravity: bump zerog node versions aristotle 1.0.6->v1.0.6, galileo 3.0.8->v3.0.8
Match upstream release tags: aristotle v1.0.6 (0gchain-Aristotle) and
galileo v3.0.8 (0gchain-NG) both carry v-prefix in their release tags.
Required for 0g hardfork; old clients stuck-syncing.

Supersedes stale unmergeable PR ethereum-rpc-docker#62.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-08-25 04:03:35 +00:00
Mistral Vibe
7cab80da70 avalanche: bump fuji avalanchego version to v1.15.0-fuji
Fuji validators run the v1.15.0-fuji prerelease and refuse v1.14.2 peers
('peer attempting to connect with newer version'), so fuji nodes cannot
bootstrap on the stable version.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-08-25 03:51:42 +00:00
fc9f82ec48 tac: fix crash-loop by installing GNU sed for sed command compatibility
The TAC mainnet container was crash-looping with 'sed: unsupported command ^'
because busybox sed in Alpine does not support the GNU sed extensions used in
the cometbft-common.sh scripts (address ranges with ^ anchor and {} grouping).

Adding the 'sed' package installs GNU sed which supports these features.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-08-25 03:40:27 +00:00
b93ad15f52 avalanche: add mainnet offline-prune config matching fuji pattern
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-08-24 05:31:21 +00:00
cff52429bd 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>
2026-08-23 10:55:39 +00:00
434717b194 deploy: regenerate compose from vibe-node main a86fd1cc5923 2026-08-20 17:16:40 +00:00
25b764684d deploy: regenerate compose from vibe-node main 57aeb4d4424f 2026-08-20 04:01:57 +00:00
b92fb0ecb3 deploy: regenerate compose from vibe-node main a1ebdcbaffd4 2026-08-13 08:08:13 +00:00
477e969e54 abcore: add mainnet genesis.json and config.toml for chain-id 36888 2026-08-09 00:19:29 +00:00
b0efb236bf Add abcore mainnet genesis.json (chain-id 36888, Newton) 2026-08-08 22:47:51 +00:00
bfe5bdd97d haqq: add required DTEAM and allnodes.me seeds to bootstrap config 2026-08-04 12:04:21 +00:00
223c694085 haqq: fix bootstrap config - correct addrbook filename, add Polkachu seeds, persistent peers, auto-refresh from Polkachu when empty 2026-08-04 10:28:18 +00:00
7a3003cb63 avalanche: enable state-sync on C-chain pruned profile 2026-08-01 00:17:37 +00:00
41 changed files with 771 additions and 119 deletions

View File

@@ -0,0 +1,33 @@
[Eth]
NetworkId = 36888
SyncMode = "snap"
NoPruning = false
NoPrefetch = false
[Eth.Miner]
GasFloor = 0
GasCeil = 63000000
GasPrice = 50000000000000
Recommit = 2000000000
NewPayloadTimeout = 2000000000
[Node]
DataDir = "/root/.ethereum"
HTTPHost = "0.0.0.0"
HTTPPort = 8545
HTTPVirtualHosts = ["*"]
HTTPModules = ["eth", "net", "web3", "debug", "admin", "txpool", "engine"]
WSHost = "0.0.0.0"
WSPort = 8546
WSModules = ["eth", "net", "web3", "debug", "admin", "txpool", "engine"]
WSOrigins = ["*"]
[Node.P2P]
MaxPeers = 50
NoDiscovery = false
DiscoveryV4 = true
ListenAddr = ":33333"
[Metrics]
HTTP = "127.0.0.1"
Port = 6060

View File

@@ -0,0 +1,28 @@
{
"config": {
"chainId": 36888,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"muirGlacierBlock": 0,
"berlinBlock": 0,
"clique": {
"period": 3,
"epoch": 30000
}
},
"timestamp": "0x67fda368",
"difficulty": "1",
"gasLimit": "63000000",
"extradata": "0x0000000000000000000000000000000000000000000000000000000000000000E9B95948d28EF808a9184d5fC98346EF3e56839c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"alloc": {
"da8B88027Ac27532E1525DD67974c2377b450A08": {
"balance": "100000000000000000000000000000"
}
}
}

View File

@@ -1,4 +1,6 @@
{
"rpc-gas-cap": 2500000000,
"eth-rpc-gas-limit": 2500000000
"eth-rpc-gas-limit": 2500000000,
"state-sync-enabled": true,
"state-sync-skip-resume": true
}

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
avalanche-fuji-archive:
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.15.0-fuji}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
avalanche-fuji:
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.15.0-fuji}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
avalanche-fuji:
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.15.0-fuji}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
avalanche-fuji:
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.15.0-fuji}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
avalanche-fuji:
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.14.2}
image: ${AVALANCHE_GO_IMAGE:-avaplatform/avalanchego}:${AVALANCHE_FUJI_GO_VERSION:-v1.15.0-fuji}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -1,23 +1,6 @@
{
"snowman-api-enabled": false,
"coreth-admin-api-enabled": false,
"net-api-enabled": true,
"rpc-gas-cap": 2500000000,
"rpc-tx-fee-cap": 100,
"eth-rpc-gas-limit": 2500000000,
"eth-api-enabled": true,
"personal-api-enabled": false,
"tx-pool-api-enabled": false,
"debug-api-enabled": false,
"web3-api-enabled": true,
"local-txs-enabled": false,
"pruning-enabled": true,
"api-max-duration": 0,
"api-max-blocks-per-request": 0,
"allow-unfinalized-queries": false,
"log-level": "info",
"state-sync-enabled": false,
"state-sync-skip-resume": true,
"offline-pruning-enabled": true,
"offline-pruning-data-directory": "/root/.avalanchego/offline-pruning"
}

View File

@@ -16,6 +16,6 @@
"api-max-blocks-per-request": 0,
"allow-unfinalized-queries": false,
"log-level": "info",
"state-sync-enabled": false,
"state-sync-enabled": true,
"state-sync-skip-resume": true
}

View File

@@ -9672,6 +9672,22 @@
"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",
"client": "tacchaind",
@@ -9688,6 +9704,22 @@
"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",
"client": "tacchaind",

View File

@@ -35,7 +35,7 @@ services:
dockerfile: cometbft.Dockerfile
args:
CL_IMAGE: ${COSMOS_GAIAD_IMAGE:-ghcr.io/cosmos/gaia}
CL_VERSION: ${COSMOS_MAINNET_GAIAD_VERSION:-v27.5.0}
CL_VERSION: ${COSMOS_MAINNET_GAIAD_VERSION:-v27.6.0}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -61,6 +61,7 @@ services:
- --engine.cross-block-cache-size=${ETHEREUM_HOODI_RETH_STATE_CACHE:-4096}
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -62,6 +62,7 @@ services:
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --full
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -61,6 +61,7 @@ services:
- --engine.cross-block-cache-size=${ETHEREUM_MAINNET_RETH_STATE_CACHE:-4096}
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -61,6 +61,7 @@ services:
- --engine.cross-block-cache-size=${ETHEREUM_MAINNET_RETH_STATE_CACHE:-4096}
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -61,6 +61,7 @@ services:
- --engine.cross-block-cache-size=${ETHEREUM_MAINNET_RETH_STATE_CACHE:-4096}
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -65,6 +65,7 @@ services:
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --full
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -87,6 +87,7 @@ services:
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --full
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -62,6 +62,7 @@ services:
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --full
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -62,6 +62,7 @@ services:
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --full
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -62,6 +62,7 @@ services:
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --full
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -61,6 +61,7 @@ services:
- --engine.cross-block-cache-size=${ETHEREUM_SEPOLIA_RETH_STATE_CACHE:-4096}
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -61,6 +61,7 @@ services:
- --engine.cross-block-cache-size=${ETHEREUM_SEPOLIA_RETH_STATE_CACHE:-4096}
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -62,6 +62,7 @@ services:
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --full
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -62,6 +62,7 @@ services:
- --engine.memory-block-buffer-target=0
- --engine.persistence-threshold=0
- --full
- --gpo.ignoreprice=2
- --max-inbound-peers=50
- --max-outbound-peers=50
- --metrics=0.0.0.0:9001

View File

@@ -0,0 +1,223 @@
#!/bin/sh
# cometbft-common.sh — reusable CometBFT-node bootstrap helpers (family C).
#
# Source this from a chain-specific init.sh. It encapsulates the operations every
# CometBFT-consensus node needs (init, fetch config artifacts, patch config.toml /
# app.toml, seed priv_validator_state), extracted verbatim from the proven berachain
# beacon-kit entrypoint so callers inherit known-good behavior.
#
# Each function takes explicit arguments (paths/values) — it is binary-agnostic. The
# caller owns the binary name, the `<binary> init` invocation, the artifact URLs, and
# the final `exec <binary> start ...`. EL-driven chains (beacon-kit, morph) also call
# the JWT / engine-dial helpers; pure-consensus chains (gaiad) skip them.
#
# Conventions: POSIX sh (alpine). Config dir is conventionally $HOME_DIR/config.
# Used by: morph-node, gaiad (cosmos batch), and any future family-C chain.
# beacon-kit (berachain) keeps its own bespoke init.sh on purpose — do not retrofit it.
set -e
ct_log() { echo "[cometbft-init] $*"; }
# Ensure curl exists (alpine base images often omit it). Idempotent.
ct_require_curl() {
if ! command -v curl >/dev/null 2>&1; then
ct_log "installing curl"
apk add --no-cache curl
fi
}
# ct_fetch URL DEST [required]
# Download URL -> DEST. If the 3rd arg is "required", a failure is fatal;
# otherwise a missing/failed fetch is logged and skipped (returns 0).
ct_fetch() {
_url="$1"; _dest="$2"; _req="${3:-optional}"
[ -n "$_url" ] || { [ "$_req" = required ] && { ct_log "FATAL: empty URL for $_dest"; exit 1; }; return 0; }
if curl -fsSL "$_url" -o "$_dest"; then
ct_log "fetched $_url -> $_dest"
else
if [ "$_req" = required ]; then
ct_log "FATAL: failed to fetch required $_url"; exit 1
fi
ct_log "skip: could not fetch optional $_url"
fi
}
# ct_patch_p2p CONFIG_TOML IP P2P_PORT
# Bind p2p to 0.0.0.0:PORT and advertise IP:PORT (only within the [p2p] section).
ct_patch_p2p() {
_cfg="$1"; _ip="$2"; _port="$3"
[ -f "$_cfg" ] || { ct_log "patch_p2p: $_cfg missing, skipping"; return 0; }
_laddr="tcp:\\/\\/0\\.0\\.0\\.0\\:${_port}"
sed -i "/^\[p2p\]/,/^\[/{s|^laddr = .*|laddr = \"$_laddr\"|}" "$_cfg"
sed -i "/^\[p2p\]/,/^\[/{s|^external_address = .*|external_address = \"${_ip}:${_port}\"|}" "$_cfg"
}
# ct_merge_seeds CONFIG_TOML CONFIGURED_SEEDS [SEEDS_URL]
# Merge operator-configured seeds with an optional official seed list (1 entry per
# line, first line skipped like the berachain cl-seeds.txt header), dedupe, write.
ct_merge_seeds() {
_cfg="$1"; _seeds="$2"; _url="$3"
[ -f "$_cfg" ] || return 0
if [ -n "$_url" ]; then
_official=$(curl -f -s "$_url" | tail -n +2 | tr '\n' ',' | sed 's/,$//' || true)
if [ -n "$_official" ]; then
ct_log "merging official seeds from $_url"
_seeds=$(echo "${_seeds},${_official}" | tr ',' '\n' | sed '/^$/d' | sort -u | paste -sd,)
else
ct_log "no official seeds fetched from $_url (continuing with configured)"
fi
fi
if [ -n "$_seeds" ]; then
sed -i "s/^seeds = \".*\"/seeds = \"${_seeds}\"/" "$_cfg"
fi
}
# ct_set_persistent_peers CONFIG_TOML PEERS
# Handles both cometbft-classic `persistent_peers` (underscore) and forks that use
# `persistent-peers` (hyphen, e.g. sei) — patches whichever key is present.
ct_set_persistent_peers() {
_cfg="$1"; _peers="$2"
[ -f "$_cfg" ] || return 0
[ -n "$_peers" ] || return 0
sed -i "s/^persistent_peers = \".*\"/persistent_peers = \"${_peers}\"/" "$_cfg"
sed -i "s/^persistent-peers = \".*\"/persistent-peers = \"${_peers}\"/" "$_cfg"
return 0
}
# ct_set_moniker CONFIG_TOML MONIKER
ct_set_moniker() {
_cfg="$1"; _mon="$2"
[ -f "$_cfg" ] || return 0
[ -n "$_mon" ] && sed -i "s/^moniker = \".*\"/moniker = \"$_mon\"/" "$_cfg"
return 0
}
# ct_set_addrbook CONFIG_DIR ADDRBOOK_URL
# Optional: cosmos chains often seed an addrbook.json for faster peer discovery.
ct_set_addrbook() {
_dir="$1"; _url="$2"
[ -n "$_url" ] || return 0
ct_fetch "$_url" "$_dir/addrbook.json" optional
}
# ct_write_jwt CONFIG_DIR [JWT_SRC]
# EL-driven chains: copy the shared engine JWT (default /jwtsecret) into the config
# dir as jwt.hex so the CL can authenticate to the EL engine API.
ct_write_jwt() {
_dir="$1"; _src="${2:-/jwtsecret}"
[ -f "$_src" ] || { ct_log "write_jwt: $_src missing, skipping"; return 0; }
cat "$_src" > "$_dir/jwt.hex"
}
# ct_set_rpc_dial_url APP_TOML AUTH_RPC
# beacon-kit / app.toml-style EL engine endpoint (e.g. http://<el>:8551).
ct_set_rpc_dial_url() {
_app="$1"; _rpc="$2"
[ -f "$_app" ] || return 0
[ -n "$_rpc" ] && sed -i "s|^rpc-dial-url = \".*\"|rpc-dial-url = \"$_rpc\"|" "$_app"
return 0
}
# ct_seed_priv_validator_state HOME_DIR
# Ensure data/priv_validator_state.json exists (cometbft refuses to start without it
# when one is present in config/). Mirrors the berachain init.sh behavior.
ct_seed_priv_validator_state() {
_home="$1"
if [ -e "$_home/config/priv_validator_state.json" ] && [ ! -e "$_home/data/priv_validator_state.json" ]; then
mkdir -p "$_home/data"
cp "$_home/config/priv_validator_state.json" "$_home/data/priv_validator_state.json"
fi
return 0
}
# ct_apk PKG...
# Install alpine packages idempotently (most cosmos init scripts need curl, some jq).
ct_apk() {
apk add --no-cache "$@"
}
# ct_localize_home CONFIG_DIR
# Rewrite `~/` to `/root/` in config.toml + app.toml. Cosmos `init` writes home-relative
# paths; the container runs as root with a static home, so make paths absolute.
ct_localize_home() {
_dir="$1"
[ -f "$_dir/config.toml" ] && sed -i 's|~/|/root/|g' "$_dir/config.toml"
[ -f "$_dir/app.toml" ] && sed -i 's|~/|/root/|g' "$_dir/app.toml"
return 0
}
# ct_set_min_gas_prices APP_TOML PRICE
# Cosmos chains reject txs (and sometimes refuse to start) with an empty
# minimum-gas-prices. PRICE e.g. "0.01usei", "0.0025uatom", "0.01hqq".
ct_set_min_gas_prices() {
_app="$1"; _price="$2"
[ -f "$_app" ] || return 0
[ -n "$_price" ] || return 0
sed -i "s/minimum-gas-prices = \"\"/minimum-gas-prices = \"${_price}\"/g" "$_app"
return 0
}
# ct_configure_statesync CONFIG_TOML RPC_SERVERS [TRUST_OFFSET]
# Enable cometbft state-sync so a fresh node bootstraps near chainhead instead of
# replaying from genesis — the single biggest lever for "can't keep it at chainhead"
# chains. RPC_SERVERS = comma list of trusted RPC endpoints (>=2 recommended; a single
# endpoint is duplicated). TRUST_OFFSET = blocks below head to trust (default 2000).
# Requires jq + curl. No-op (logged) if head height can't be fetched.
ct_configure_statesync() {
_cfg="$1"; _rpc="$2"; _offset="${3:-2000}"
[ -f "$_cfg" ] || return 0
# NEVER re-arm statesync on a node that already has application state (a restored
# snapshot or a prior sync). Re-statesyncing over it leaves a broken/partial datadir and,
# for wasm chains, drops the wasm files -> startup panic. _cfg is $HOME/config/config.toml,
# so application state lives at $HOME/data/application.db.
_home=$(dirname "$(dirname "$_cfg")")
if [ -e "$_home/data/application.db" ]; then
ct_log "statesync: existing data dir, skipping"
return 0
fi
[ -n "$_rpc" ] || { ct_log "statesync: no RPC servers given, skipping"; return 0; }
_primary=$(echo "$_rpc" | cut -d, -f1)
_latest=$(curl -s "$_primary/block" | jq -r '.result.block.header.height // .block.header.height' 2>/dev/null || true)
if [ -z "$_latest" ] || [ "$_latest" = null ]; then
ct_log "statesync: could not read head height from $_primary, skipping"; return 0
fi
_trust_h=$((_latest - _offset))
_trust_hash=$(curl -s "$_primary/block?height=$_trust_h" | jq -r '.result.block_id.hash // .block_id.hash' 2>/dev/null || true)
[ -n "$_trust_hash" ] && [ "$_trust_hash" != null ] || { ct_log "statesync: no trust hash, skipping"; return 0; }
# second server defaults to the first (cometbft wants >=2 for light-client cross-check)
echo "$_rpc" | grep -q ',' || _rpc="$_rpc,$_rpc"
ct_log "statesync: enable trust_height=$_trust_h trust_hash=$_trust_hash"
# Patch ONLY the [statesync] section. CometBFT config.toml uses underscore keys
# (rpc_servers/trust_height/trust_hash); tolerate hyphen variants with [_-].
sed -i.bak -E "/^\[statesync\]/,/^\[/{
s|^([[:space:]]*enable[[:space:]]*=[[:space:]]*).*|\1true|
s|^([[:space:]]*rpc[_-]servers[[:space:]]*=[[:space:]]*).*|\1\"$_rpc\"|
s|^([[:space:]]*trust[_-]height[[:space:]]*=[[:space:]]*).*|\1$_trust_h|
s|^([[:space:]]*trust[_-]hash[[:space:]]*=[[:space:]]*).*|\1\"$_trust_hash\"|
}" "$_cfg"
return 0
}
# ct_ensure_wasm HOME_DIR WASM_SNAPSHOT_URL
# CosmWasm + IBC 08-wasm bytecode are FILES on disk that state-sync does NOT restore, so
# a state-synced wasm chain panics at startup ("wasmlckeeper failed initialize pinned codes
# / Error opening Wasm file"). Seed them from a wasm-only snapshot (e.g. polkachu
# cosmos_wasmonly.tar.lz4) when the wasm dir is missing/empty. No-op if URL unset or wasm
# already present. Best-effort (logs on failure); the fully robust path for wasm chains is a
# FULL snapshot restore. Requires lz4 + tar (installed here).
ct_ensure_wasm() {
_home="$1"; _url="$2"
[ -n "$_url" ] || return 0
if [ -d "$_home/wasm" ] && [ -n "$(ls -A "$_home/wasm" 2>/dev/null)" ]; then
return 0 # wasm already present
fi
ct_log "wasm: empty, fetching snapshot $_url"
ct_apk lz4 tar
if curl -sL "$_url" | lz4 -dc | tar -xf - -C "$_home"; then
ct_log "wasm: extracted into $_home"
else
ct_log "WARN wasm: fetch/extract failed ($_url)"
fi
return 0
}

95
haqq/scripts/init.sh Normal file → Executable file
View File

@@ -1,64 +1,65 @@
#!/bin/sh
# haqq (haqqd) entrypoint — family C, pure CometBFT (no EL). Thin: sources the
# shared cometbft-common.sh and orchestrates init + statesync bootstrap + start.
# Serves CometBFT RPC :26657 (the dshackle/traefik upstream).
# Genesis replay across ~25 Haqq network upgrades is impractical, so we statesync
# near head with the current binary.
set -e
. /usr/local/bin/cometbft-common.sh
set -e # Exit on failure
HOME_DIR="/root/.haqqd"
CONFIG_DIR="$HOME_DIR/config"
CHAIN_ID="${CHAINID:-haqq_11235-1}"
CHAINNAME="${CHAINNAME:-mainnet}"
GENESIS_URL="${GENESIS_URL:-https://raw.githubusercontent.com/haqq-network/${CHAINNAME}/master/genesis.json}"
ADDRBOOK_URL="${ADDRBOOK_URL:-https://snapshots.polkachu.com/addrbook/haqq/addrbook.json}"
STATESYNC_RPC="${STATESYNC_RPC:-https://haqq-rpc.polkachu.com:443}"
MIN_GAS="${MIN_GAS:-0.01hqq}"
MONIKER="${MONIKER:-rpc-node}"
echo "MONIKER: $MONIKER"
# Polkachu seeds + official Haqq network seeds for reliable peer discovery
SEEDS="${SEEDS:-936e27a05f3cfb090507dd810395cbbd8efbffb0@65.109.115.172:24056,f4675b63b8872fb9216efa99428eb5b1fb297393@65.109.104.118:61256,6c9a6fc0e0d94bf303075e46560832e652cffc14@65.108.71.137:24056,7c153a83@peer.haqq.mainnet.dteam.tech:28656}"
CHAINID=${CHAINID:-haqq_11235-1}
CHAINNAME=${CHAINNAME:-mainnet}
API=${API:-eth,net,web3}
# Optional persistent peers for additional bootstrap reliability
PERSISTENT_PEERS="${PERSISTENT_PEERS:-17e0fd08f04e062d18412808b8bf134e9ad34508@65.109.109.189:10656,e000b992a0066eae9e87c66e0d65229a76647509@198.96.92.242:32656,7c153a83@peer.haqq.mainnet.dteam.tech:28656,235ac65359582357b04754e838496545b3ba6429@haqq-seed-1.allnodes.me:26656,9573a569016378765444095484840d7f543d2800@haqq-seed-2.allnodes.me:26656}"
CONFIG_DIR="/root/.haqqd/config"
ct_apk curl jq
# Create config directory
mkdir -p "$CONFIG_DIR"
P2P_STRING="tcp:\\/\\/0\\.0\\.0\\.0\\:${P2P_PORT:-10465}"
NAT_STRING="${IP}:${P2P_PORT:-10465}"
env
# this goes first because it won't overwrite shit
apk add curl
if [ $? -ne 0 ]; then exit 1; fi
if haqqd init ${MONIKER} --chain-id ${CHAINID} --home /root/.haqqd/; then
# Define variables
GENESIS_URL="https://raw.githubusercontent.com/haqq-network/${CHAINNAME}/master/genesis.json"
ADDRESSBOOK_URL="https://raw.githubusercontent.com/haqq-network/${CHAINNAME}/master/addrbook.json"
# Download config files
curl -sL "$GENESIS_URL" -o "$CONFIG_DIR/genesis.json"
curl -sL "$ADDRESSBOOK_URL" -o "$CONFIG_DIR/addressbook.json"
# somehow it's better to make home static to /root
sed -i 's|~/|/root/|g' "$CONFIG_DIR/config.toml"
sed -i 's|~/|/root/|g' "$CONFIG_DIR/app.toml"
if haqqd init "$MONIKER" --chain-id "$CHAIN_ID" --home "$HOME_DIR" >/dev/null 2>&1; then
ct_log "fresh init; fetching genesis and addrbook"
ct_fetch "$GENESIS_URL" "$CONFIG_DIR/genesis.json" required
ct_set_addrbook "$CONFIG_DIR" "$ADDRBOOK_URL"
ct_localize_home "$CONFIG_DIR"
ct_set_min_gas_prices "$CONFIG_DIR/app.toml" "$MIN_GAS"
else
echo "Already initialized, continuing!" >&2
ct_log "already initialized, continuing"
# Auto-refresh addrbook from Polkachu when empty on startup
if [ ! -s "$CONFIG_DIR/addrbook.json" ]; then
ct_log "addrbook.json is empty, refreshing from Polkachu"
ct_set_addrbook "$CONFIG_DIR" "$ADDRBOOK_URL"
fi
fi
# Serve RPC on all interfaces (dshackle/traefik upstream); default is 127.0.0.1.
sed -i '/^\[rpc\]/,/^\[/{s|^laddr = .*|laddr = "tcp://0.0.0.0:8545"|}' "$CONFIG_DIR/config.toml"
# apply a port change to the config
sed -i "/^\[p2p\]/,/^\[/{s|^laddr = .*|laddr = \"$P2P_STRING\"|}" "$CONFIG_DIR/config.toml"
#sed -i "s/^laddr = \".*\"/laddr = \"$P2P_STRING\"/" "$CONFIG_DIR/config.toml"
sed -i "/^\[p2p\]/,/^\[/{s|^external_address = .*|external_address = \"$NAT_STRING\"|}" "$CONFIG_DIR/config.toml"
#sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.01hqq"/g' $CONFIG_DIR/app.toml
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $CONFIG_DIR/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $CONFIG_DIR/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $CONFIG_DIR/app.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $CONFIG_DIR/config.toml
ct_patch_p2p "$CONFIG_DIR/config.toml" "$IP" "${P2P_PORT:-10465}"
ct_merge_seeds "$CONFIG_DIR/config.toml" "$SEEDS" "$ADDRBOOK_URL"
ct_set_persistent_peers "$CONFIG_DIR/config.toml" "$PERSISTENT_PEERS"
ct_set_moniker "$CONFIG_DIR/config.toml" "$MONIKER"
ct_configure_statesync "$CONFIG_DIR/config.toml" "$STATESYNC_RPC"
ct_seed_priv_validator_state "$HOME_DIR"
# Haqq-specific config: enable API endpoints
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|^metrics-address = .*|metrics-address = \"0.0.0.0:6065\"|}" "$CONFIG_DIR/app.toml"
sed -i "/^\[json-rpc\]/,/^\[/{s|^api = .*|api = \"$API\"|}" "$CONFIG_DIR/app.toml"
# Update moniker if set
if [ -n "$MONIKER" ] && [ -f "$CONFIG_DIR/config.toml" ]; then
sed -i "s/^moniker = \".*\"/moniker = \"$MONIKER\"/" "$CONFIG_DIR/config.toml"
fi
# Custom pruning settings for RPC node
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" "$CONFIG_DIR/app.toml"
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" "$CONFIG_DIR/app.toml"
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" "$CONFIG_DIR/app.toml"
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" "$CONFIG_DIR/config.toml"
exec haqqd start --chain-id ${CHAINID} $@
exec haqqd start --chain-id "$CHAIN_ID" --home "$HOME_DIR" $@

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
polygon-amoy-archive:
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_AMOY_BOR_VERSION:-2.9.0}
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_AMOY_BOR_VERSION:-2.10.0}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
polygon-amoy:
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_AMOY_BOR_VERSION:-2.9.0}
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_AMOY_BOR_VERSION:-2.10.0}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
polygon-mainnet-archive:
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_MAINNET_BOR_VERSION:-2.9.0}
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_MAINNET_BOR_VERSION:-2.10.0}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -30,7 +30,7 @@ x-logging-defaults: &logging-defaults
services:
polygon-mainnet:
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_MAINNET_BOR_VERSION:-2.9.0}
image: ${POLYGON_BOR_IMAGE:-0xpolygon/bor}:${POLYGON_MAINNET_BOR_VERSION:-2.10.0}
sysctls:
# TCP Performance
net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle

View File

@@ -143,7 +143,8 @@
"urls": [
"https://rpc-amoy.polygon.technology",
"https://polygon-amoy-bor-rpc.publicnode.com",
"https://polygon-amoy.drpc.org"
"https://polygon-amoy.drpc.org",
"https://rpc.satelink.network/rpc/amoy"
]
},
"arbitrum": {
@@ -157,6 +158,7 @@
"https://arb1.arbitrum.io/rpc",
"https://arbitrum-one-rpc.publicnode.com",
"https://rpcfree.com/arbitrum-rpc",
"https://rpc.satelink.network/rpc/arbitrum",
"https://arbitrum.drpc.org"
]
},
@@ -307,6 +309,7 @@
"https://base-rpc.publicnode.com",
"https://rpcfree.com/base-rpc",
"https://rpc.baseazul.dev",
"https://rpc.satelink.network/rpc/base",
"https://base.drpc.org"
]
},
@@ -3832,6 +3835,60 @@
"https://neo-x-testnet.drpc.org"
]
},
"stellar": {
"protocol": "stellar",
"block_time_ms": 5000,
"lagging_lag": 10,
"syncing_lag": 20,
"urls": [
"https://stellar.drpc.org"
]
},
"stellar-testnet": {
"protocol": "stellar",
"block_time_ms": 5000,
"lagging_lag": 10,
"syncing_lag": 20,
"urls": [
"https://stellar-testnet.drpc.org"
]
},
"celestia": {
"protocol": "celestia",
"block_time_ms": 6000,
"lagging_lag": 5,
"syncing_lag": 10,
"urls": [
"https://celestia.drpc.org"
]
},
"celestia-mocha": {
"protocol": "celestia",
"block_time_ms": 6000,
"lagging_lag": 5,
"syncing_lag": 10,
"urls": [
"https://celestia-mocha.drpc.org"
]
},
"sui": {
"protocol": "sui",
"block_time_ms": 250,
"lagging_lag": 20,
"syncing_lag": 40,
"urls": [
"https://sui.drpc.org"
]
},
"sui-testnet": {
"protocol": "sui",
"block_time_ms": 250,
"lagging_lag": 20,
"syncing_lag": 40,
"urls": [
"https://sui-testnet.drpc.org"
]
},
"core-pigeon": {
"id": 1114,
"urls": [

View File

@@ -40,7 +40,7 @@ services:
- chains
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.ipallowlist.ipallowlist.sourcerange=${WHITELIST:-0.0.0.0/0}"
- "traefik.http.middlewares.ipallowlist.ipallowlist.sourcerange=$WHITELIST"
- "prometheus-scrape.enabled=true"
- "prometheus-scrape.port=8082"
- "prometheus-scrape.job_name=traefik"

15
tac/scripts/init.sh Executable file → Normal file
View File

@@ -1,6 +1,8 @@
#!/bin/sh
# tacchaind entrypoint — TAC (Cosmos-SDK + embedded EVM). Genesis replay is impractical
# (5 gov upgrades), so fresh nodes statesync near head via cometbft-common.sh.
# tacchaind entrypoint — TAC (Cosmos-SDK + embedded EVM). EVM JSON-RPC :8545/:8546
# 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
. /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}"
API="${API:-eth,net,web3,txpool,debug}"
MONIKER="${MONIKER:-rpc-node}"
# Pruning mode: set to "nothing" for archive nodes, "default" for pruned nodes.
PRUNING="${PRUNING:-default}"
ct_apk curl jq
@@ -24,7 +28,10 @@ else
ct_log "already initialized, continuing"
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 -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}"
@@ -41,4 +48,4 @@ sed -i "/^\[json-rpc\]/,/^\[/{s|^api = .*|api = \"$API\"|}" "$CONFIG_DIR/app.tom
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" "$@"

View File

@@ -1,38 +1,43 @@
# 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
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
RUN apk upgrade --no-cache && \
apk add --no-cache \
ca-certificates \
libusb
curl \
libusb \
sed
# 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 --from=go-builder /code/build/tacchaind /usr/bin/tacchaind
COPY ./scripts/cometbft-common.sh /usr/local/bin/cometbft-common.sh
COPY ./scripts/init.sh /usr/local/bin/init.sh
RUN chmod +x /usr/local/bin/init.sh /usr/local/bin/cometbft-common.sh
WORKDIR /opt
EXPOSE 1317 26656 26657
EXPOSE 1317 26656 26657 8545 8546
ENTRYPOINT ["init.sh"]

View 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=68b409519dea2a057d93ab6df436f6d519f13cb8@65.109.61.125:32156,54646e966938882d244a7dfd5aa90deb0cbae102@46.37.123.228:26656,d957eca9e06978956bca65a74d5df13ca858b3ec@209.192.185.53:26656,61bcffa521f20daea439e1560a282a6c6d13382a@136.243.54.160:26656,6224e4d06ace6591af55ffc9e033c1fd8492acf7@40.160.23.137:26656,4594eda1e728c1499801346fd99198e2f7c076dc@3.37.85.69:26656
- PRUNING=nothing
- SEEDS=68b409519dea2a057d93ab6df436f6d519f13cb8@65.109.61.125:32156,54646e966938882d244a7dfd5aa90deb0cbae102@46.37.123.228:26656,d957eca9e06978956bca65a74d5df13ca858b3ec@209.192.185.53:26656,61bcffa521f20daea439e1560a282a6c6d13382a@136.243.54.160:26656,6224e4d06ace6591af55ffc9e033c1fd8492acf7@40.160.23.137:26656,4594eda1e728c1499801346fd99198e2f7c076dc@3.37.85.69:26656
- 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
...

View File

@@ -53,7 +53,8 @@ services:
- 10283:10283
- 10283:10283/udp
expose:
- 26657
- 8545
- 8546
- 6065
environment:
- API=eth,net,web3,txpool,debug
@@ -63,8 +64,9 @@ services:
- MIN_GAS=25000000000utac
- MONIKER=d${DOMAIN:-local}
- P2P_PORT=10283
- PERSISTENT_PEERS=68b409519dea2a057d93ab6df436f6d519f13cb8@65.109.61.125:32156,186e207d2c95e94a44ff613770aa269dac876013@65.108.201.240:32156,c4410e765acead36188500ed75d5666aa209c93d@65.108.205.121:32156
- SEEDS=68b409519dea2a057d93ab6df436f6d519f13cb8@65.109.61.125:32156
- PERSISTENT_PEERS=68b409519dea2a057d93ab6df436f6d519f13cb8@65.109.61.125:32156,54646e966938882d244a7dfd5aa90deb0cbae102@46.37.123.228:26656,d957eca9e06978956bca65a74d5df13ca858b3ec@209.192.185.53:26656,61bcffa521f20daea439e1560a282a6c6d13382a@136.243.54.160:26656,6224e4d06ace6591af55ffc9e033c1fd8492acf7@40.160.23.137:26656,4594eda1e728c1499801346fd99198e2f7c076dc@3.37.85.69:26656
- PRUNING=default
- SEEDS=68b409519dea2a057d93ab6df436f6d519f13cb8@65.109.61.125:32156,54646e966938882d244a7dfd5aa90deb0cbae102@46.37.123.228:26656,d957eca9e06978956bca65a74d5df13ca858b3ec@209.192.185.53:26656,61bcffa521f20daea439e1560a282a6c6d13382a@136.243.54.160:26656,6224e4d06ace6591af55ffc9e033c1fd8492acf7@40.160.23.137:26656,4594eda1e728c1499801346fd99198e2f7c076dc@3.37.85.69:26656
- STATESYNC_RPC=https://tacchain-rpc.polkachu.com:443
restart: unless-stopped
stop_grace_period: 5m
@@ -81,7 +83,7 @@ services:
- prometheus-scrape.path=/metrics
- traefik.enable=true
- 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.tls.certresolver=myresolver}
- ${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-ws.priority=100 # answers GET requests first
- 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.service=tac-mainnet-tacchaind-pruned
- ${NO_SSL:-traefik.http.routers.tac-mainnet-tacchaind-pruned-ws.entrypoints=websecure}

View 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
...

View File

@@ -53,7 +53,8 @@ services:
- 14331:14331
- 14331:14331/udp
expose:
- 26657
- 8545
- 8546
- 6065
environment:
- API=eth,net,web3,txpool,debug
@@ -64,6 +65,7 @@ services:
- MONIKER=d${DOMAIN:-local}
- 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
- PRUNING=default
- STATESYNC_RPC=https://spb.tendermint.rpc.tac.build
restart: unless-stopped
stop_grace_period: 5m
@@ -80,7 +82,7 @@ services:
- prometheus-scrape.path=/metrics
- traefik.enable=true
- 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.tls.certresolver=myresolver}
- ${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-ws.priority=100 # answers GET requests first
- 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.service=tac-spb-tacchaind-pruned
- ${NO_SSL:-traefik.http.routers.tac-spb-tacchaind-pruned-ws.entrypoints=websecure}

View File

@@ -22,20 +22,23 @@ ARG ZERO_GRAVITY_CHAIN_SPEC
# curl uses -f (fail on HTTP error). Without it a 404 HTML body is written into the .tar.gz
# and the build dies several layers later at "tar: not in gzip format" -- an error that
# points nowhere near the real cause. That has cost three separate misdiagnoses.
#
# Strip leading 'v' from version if present, to avoid doubled-v (e.g., vv1.0.6 -> v1.0.6)
RUN set -eu; \
ASSET="${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}.tar.gz"; \
VERSION="${ZERO_GRAVITY_VERSION#v}"; \
ASSET="${ZERO_GRAVITY_CHAIN_SPEC}-v${VERSION}.tar.gz"; \
if [ "${ZERO_GRAVITY_CHAIN_SPEC}" = "aristotle" ]; then \
REPO="0gfoundation/0gchain-Aristotle"; \
TAGS="${ZERO_GRAVITY_VERSION} v${ZERO_GRAVITY_VERSION} ${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}"; \
TAGS="${VERSION} v${VERSION} ${ZERO_GRAVITY_CHAIN_SPEC}-v${VERSION}"; \
else \
REPO="0gfoundation/0gchain-NG"; \
TAGS="v${ZERO_GRAVITY_VERSION} ${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION} ${ZERO_GRAVITY_VERSION}"; \
TAGS="v${VERSION} ${ZERO_GRAVITY_CHAIN_SPEC}-v${VERSION} ${VERSION}"; \
fi; \
for TAG in ${TAGS}; do \
URL="https://github.com/${REPO}/releases/download/${TAG}/${ASSET}"; \
echo "0g: trying tag '${TAG}' -> ${URL}"; \
if curl -fsSL "${URL}" -o "/tmp/${ASSET}"; then \
echo "0g: resolved ${ZERO_GRAVITY_CHAIN_SPEC} ${ZERO_GRAVITY_VERSION} from tag '${TAG}'"; \
echo "0g: resolved ${ZERO_GRAVITY_CHAIN_SPEC} ${VERSION} from tag '${TAG}'"; \
break; \
fi; \
rm -f "/tmp/${ASSET}"; \
@@ -44,7 +47,7 @@ RUN set -eu; \
echo "0g: FATAL - no release asset '${ASSET}' found in ${REPO} under any of: ${TAGS}" >&2; \
echo "0g: aristotle and galileo are SEPARATE repos on SEPARATE version lines" >&2; \
echo "0g: aristotle = 0gchain-Aristotle (1.0.x), galileo = 0gchain-NG (3.0.x)" >&2; \
echo "0g: check that version '${ZERO_GRAVITY_VERSION}' exists for '${ZERO_GRAVITY_CHAIN_SPEC}'" >&2; \
echo "0g: check that version '${VERSION}' exists for '${ZERO_GRAVITY_CHAIN_SPEC}'" >&2; \
exit 1; \
fi
@@ -67,7 +70,8 @@ RUN set -eu; \
# version, nor the layout. Assert on the binaries here so the NEXT upstream reshuffle
# reports itself at the point of failure instead.
RUN set -eu; \
SRC="/tmp/${ZERO_GRAVITY_CHAIN_SPEC}-v${ZERO_GRAVITY_VERSION}"; \
VERSION="${ZERO_GRAVITY_VERSION#v}"; \
SRC="/tmp/${ZERO_GRAVITY_CHAIN_SPEC}-v${VERSION}"; \
tar -xzf "${SRC}.tar.gz" -C /tmp; \
mkdir -p /0g; \
if [ -d "${SRC}/rpc" ]; then \
@@ -88,7 +92,7 @@ RUN set -eu; \
done; \
if [ -n "${missing}" ]; then \
echo "0g: FATAL - missing after extraction:${missing}" >&2; \
echo "0g: ${ZERO_GRAVITY_CHAIN_SPEC} v${ZERO_GRAVITY_VERSION} tarball layout not recognised." >&2; \
echo "0g: ${ZERO_GRAVITY_CHAIN_SPEC} v${VERSION} tarball layout not recognised." >&2; \
echo "0g: known layouts are '<root>/rpc/bin/' (per-profile) and '<root>/bin/' (flat)." >&2; \
echo "0g: contents of /0g were:" >&2; \
ls -la /0g >&2 || true; \