gcx/blockchain/genex-chain/config/archive-node.toml

67 lines
3.1 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ============================================================
# Genex Chain 归档节点配置 (Archive Node)
# ============================================================
# 用途:保存链创世以来的全部历史状态,支持任意历史区块的状态查询
# 使用者Blockscout、监管API、历史数据分析、审计
# 部署数量至少2个美国 US-East + 新加坡 SG 各一)
# 存储需求:远大于普通节点(预估年增长 500GB-2TB
# ============================================================
# ─── Pruning 配置 ─────────────────────────────────────────
# 归档节点不裁剪任何状态
[pruning]
pruning = "nothing" # 不裁剪任何状态
pruning-keep-recent = "0" # 保留全部
pruning-interval = "0" # 不执行裁剪
# ─── State Sync 配置 ─────────────────────────────────────
# 定期生成快照供新节点快速同步
[state-sync]
snapshot-interval = 1000 # 每1000块生成快照
snapshot-keep-recent = 5 # 保留最近5个快照
# ─── API 配置 ─────────────────────────────────────────────
[api]
enable = true
swagger = false # 生产环境关闭
address = "tcp://0.0.0.0:1317"
# ─── gRPC 配置 ────────────────────────────────────────────
[grpc]
enable = true
address = "0.0.0.0:9090"
# ─── EVM JSON-RPC 配置 ────────────────────────────────────
[json-rpc]
enable = true
address = "0.0.0.0:8545"
ws-address = "0.0.0.0:8546"
api = "eth,net,web3,txpool,debug,personal"
# 归档节点开启 debug_traceTransaction
enable-indexer = true
# 历史状态查询需要更大的 Gas 限制
gas-cap = 50000000
# 支持 eth_getLogs 更大的区块范围
logs-cap = 20000
block-range-cap = 20000
# ─── Telemetry 配置 ───────────────────────────────────────
[telemetry]
enabled = true
prometheus-retention-time = 600 # 10分钟Prometheus会抓取
service-name = "genex-archive"
# ─── 存储配置 ─────────────────────────────────────────────
# 推荐使用 NVMe SSDIOPS > 10000
# 定期备份快照到 S3/GCS
[store]
# 较大的缓存以加速历史查询
cache-size = 8192 # 8GB block cache
# ─── P2P 网络 ─────────────────────────────────────────────
# 归档节点作为种子节点提供数据
[p2p]
max-num-inbound-peers = 80
max-num-outbound-peers = 40
seed-mode = false # 非种子模式(种子节点另有配置)