NAC_Blockchain/config/mainnet_config.toml

110 lines
2.3 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.

# NAC主网原生架构配置
# NewAssetChain Native Architecture Configuration
# 版本: 2.0.0 - 彻底移除以太坊架构
# 更新时间: 2026-02-20
[network]
# 网络名称
name = "NAC Mainnet"
# 网络IDNAC专用不使用以太坊chain_id
chain_id = 20260131
# 网络类型
network_type = "mainnet"
[consensus]
# 共识协议: CBPP (Constitutional Block Production Protocol)
# ❌ 不是PoW/PoS
protocol = "CBPP"
# CBPP节点RPC端口NAC原生不使用8545
cbpp_rpc_port = 9545
# CBPP节点WebSocket端口
cbpp_ws_port = 9546
# 流体区块初始软上限 (字节)
initial_soft_limit = 1048576 # 1MB
# 流体区块最大软上限 (字节)
max_soft_limit = 8388608 # 8MB
# 最小出块间隔 (毫秒)
min_block_interval = 100
# 目标出块时间 (秒)
target_block_time = 3
[network_protocol]
# CSNP (Constitutional Structured Network Protocol)
# ❌ 不是P2P协议
protocol = "CSNP"
# CSNP端口不使用30303
csnp_port = 39303
# NAC Lens端口不使用8545
nrpc_port = 9547
# WebSocket端口
ws_port = 9548
# 最大连接数
max_peers = 50
[vm]
# NVM虚拟机配置不是EVM
vm_type = "NVM"
# Gas限制
gas_limit = 30000000
# Gas价格 (最小单位)
min_gas_price = 1
# NVM RPC端口
nvm_rpc_port = 9549
[rpc]
# NAC Lens配置不是JSON-RPC
protocol = "NRPC4.0"
# HTTP端口
http_port = 9547
# WebSocket端口
ws_port = 9548
# 启用CORS
cors_enabled = true
cors_origins = ["*"]
[api]
# API服务配置
# 监听地址
host = "0.0.0.0"
# API端口不使用8080避免冲突
port = 9550
# CBPP节点连接使用NRPC4.0
cbpp_node_url = "http://localhost:9545"
# NVM节点连接
nvm_node_url = "http://localhost:9549"
[state]
# 状态树配置
# Merkle树深度
merkle_depth = 32
# 快照间隔 (区块数)
snapshot_interval = 10000
[database]
# 数据库配置
# 数据库类型
db_type = "rocksdb"
# 数据库路径
db_path = "/var/lib/nac/mainnet"
# 缓存大小 (MB)
cache_size = 1024
[logging]
# 日志配置
level = "info"
# 日志文件路径
log_file = "/var/log/nac/mainnet.log"
# 日志轮转大小 (MB)
max_log_size = 100
[monitoring]
# 监控配置
# 启用性能监控
performance_monitoring = true
# 启用健康检查
health_check = true
# 健康检查端口
health_check_port = 9090
# Prometheus metrics端口
metrics_port = 9091