설정 참조
모든 설정 파일은 config/ 디렉터리에 있습니다. TOML 형식.
네트워크
[network]
name = "devnet" # "devnet", "testnet", "mainnet"
port = 8333 # P2P listening port
rpc_port = 8545 # JSON-RPC port
ws_port = 8546 # WebSocket port
bootstrap_nodes = [] # Initial peers for discovery
max_peers = 50 # Maximum peer connections
connection_timeout = 30 # Timeout in seconds
| 매개변수 | 개발 | 운영 | 설명 |
|---|---|---|---|
max_peers | 10 | 50 | 최대 P2P 연결 수 |
connection_timeout | 10초 | 30초 | 피어 연결 타임아웃 |
스토리지
[storage]
data_dir = "./data" # Database directory
cache_size_mb = 1024 # RocksDB block cache
write_buffer_size_mb = 64 # Write buffer per CF
max_open_files = 1000 # Max file descriptors
sync_interval = 30 # WAL sync interval (seconds)
compression = true # Enable LZ4 compression
| 매개변수 | 개발 | 운영 | 설명 |
|---|---|---|---|
cache_size_mb | 256 | 1024 | 블록 캐시 크기 |
write_buffer_size_mb | 16 | 64 | 쓰기 버퍼 |
compression | false | true | 스토리지 압축 |
Proof-of-Unity (PoU)
[pou]
scoring_update_interval = 300 # Score update (seconds)
group_formation_interval = 600 # Group rebalance (seconds)
consensus_sync_interval = 30 # Sync interval (seconds)
min_eligibility_score = 1000 # Min score (basis points, 0-10000)
min_stake_amount = 150 # Min stake for participation
min_uptime_requirement = 0.8 # Min uptime (0.0-1.0)
[pou.weights]
availability = 0.25 # Uptime weight
latency = 0.20 # Response time weight
integrity = 0.20 # Correctness weight
reputation = 0.20 # Historical weight
participation = 0.15 # Activity weight
[pou.groups]
group_size = 7 # Lightnodes per group
num_groups = 10 # Number of groups
algorithm = "TopScore" # Group formation algorithm
| 매개변수 | 개발 | 운영 | 설명 |
|---|---|---|---|
scoring_update_interval | 30초 | 300초 | PoU 점수 업데이트 빈도 |
group_formation_interval | 60초 | 600초 | 그룹 재조정 빈도 |
min_eligibility_score | 100 | 1000 | 참여 최소 점수 |
group_size | 3 | 7 | 그룹당 lightnode 수 |
성능
[performance]
max_scoring_time_ms = 1000 # Max scoring computation time
max_group_formation_time_ms = 3000
max_consensus_sync_time_ms = 500
target_tps = 1000 # Target transactions per second
max_block_size = 2097152 # Max block size (bytes)
block_time_ms = 5000 # Target block time
| 매개변수 | 개발 | 운영 | 설명 |
|---|---|---|---|
target_tps | 100 | 1000 | 목표 처리량 |
block_time_ms | 2000 | 5000 | 블록 간격 |
적응형 레이턴시
[adaptive_latency]
enabled = true
base_latency_ms = 100 # Baseline latency
max_latency_ms = 2000 # Max acceptable latency
adjustment_factor = 0.05 # Smoothing factor
epoch_window = 100 # Epochs for averaging
network_averaging = true # Average across network
합의
[consensus]
timeout = 10 # Round timeout (seconds)
max_rounds = 10 # Max voting rounds
quorum_threshold = 0.67 # BFT quorum (2f+1)
enable_bft_optimizations = true # Fast-path for unanimous votes
슬래싱
[slashing]
enabled = true # Enable slashing (prod only)
double_vote_slash = 0.50 # 50% slash for double voting
downtime_slash = 0.10 # 10% slash for downtime
invalid_proposal_slash = 0.25 # 25% slash for invalid blocks
downtime_threshold = 0.2 # 20% missed blocks triggers slash
grace_period = 3600 # 1 hour grace before downtime slash
모니터링
[monitoring]
enabled = true
host = "127.0.0.1"
port = 9090
update_interval_secs = 5
log_level = "info" # "debug", "info", "warn", "error"
[monitoring.thresholds]
block_stall_timeout_secs = 300
high_block_time_secs = 15
low_peer_count = 3
high_memory_usage = 0.9
점수 캐시
[cache]
max_entries = 10000 # LRU cache size
ttl_seconds = 300 # Cache entry TTL
cleanup_interval = 60 # Cleanup frequency (seconds)
Masternode 설정
exucutables/configs/masternode/mn-*.toml의 개별 masternode 설정:
[node]
listen_port = 5021
group_node_timeout_secs = 600 # Peer inactivity timeout
[storage]
db_path = "data/mn1"
환경 변수
| 변수 | 설명 |
|---|---|
RUST_LOG | 로그 필터 (예: info,libp2p_gossipsub::behaviour=error) |
CARGO_TARGET_DIR | 빌드 출력 디렉터리 |
RUSTFLAGS | 컴파일러 플래그 (예: -C link-arg=/STACK:8388608) |