Passa al contenuto principale

Riferimento alla Configurazione

Tutti i file di configurazione si trovano nella directory config/. Formato TOML.

Rete

[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
ParametroDevProdDescrizione
max_peers1050Connessioni P2P massime
connection_timeout10s30sTimeout connessione peer

Archiviazione

[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
ParametroDevProdDescrizione
cache_size_mb2561024Dimensione cache blocchi
write_buffer_size_mb1664Buffer di scrittura
compressionfalsetrueCompressione archiviazione

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
ParametroDevProdDescrizione
scoring_update_interval30s300sFrequenza di aggiornamento dei punteggi PoU
group_formation_interval60s600sFrequenza di ribilanciamento dei gruppi
min_eligibility_score1001000Punteggio minimo per partecipare
group_size37Lightnode per gruppo

Prestazioni

[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
ParametroDevProdDescrizione
target_tps1001000Throughput obiettivo
block_time_ms20005000Intervallo blocchi

Latenza Adattiva

[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

Consenso

[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

[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

Monitoraggio

[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 dei Punteggi

[cache]
max_entries = 10000 # LRU cache size
ttl_seconds = 300 # Cache entry TTL
cleanup_interval = 60 # Cleanup frequency (seconds)

Configurazioni Masternode

Configurazioni per singolo masternode in exucutables/configs/masternode/mn-*.toml:

[node]
listen_port = 5021
group_node_timeout_secs = 600 # Peer inactivity timeout

[storage]
db_path = "data/mn1"

Variabili d'Ambiente

VariabileDescrizione
RUST_LOGFiltro log (es. info,libp2p_gossipsub::behaviour=error)
CARGO_TARGET_DIRDirectory di output della build
RUSTFLAGSFlag del compilatore (es. -C link-arg=/STACK:8388608)