/ testnet / config / adnet-testnet.toml
adnet-testnet.toml
  1  # ADNet Unified Binary - Testnet Configuration
  2  # =============================================
  3  # This is the main configuration file for running adnet in testnet mode.
  4  # It configures both ALPHA and DELTA chains in a single process.
  5  
  6  # Chain operation mode: dual (both chains), alpha_only, or delta_only
  7  chain_mode = "dual"
  8  
  9  [node]
 10  # Unique node identifier (auto-generated if empty)
 11  node_id = ""
 12  # Path to node keypair file
 13  keypair_path = "/var/lib/adnet/keys/node.json"
 14  # Base data directory for all chain data
 15  data_dir = "/var/lib/adnet/data"
 16  # Node type: validator, client, or prover
 17  node_type = "validator"
 18  # Development mode (false for testnet)
 19  dev_mode = false
 20  
 21  [network]
 22  # P2P listen address
 23  listen_addr = "0.0.0.0:30303"
 24  # Bootstrap peers for testnet
 25  bootstrap_peers = [
 26      # Testnet bootstrap nodes (to be populated after deployment)
 27      # "/ip4/testnet1.ac-dc.network/tcp/30303/p2p/<peer_id>",
 28      # "/ip4/testnet2.ac-dc.network/tcp/30303/p2p/<peer_id>",
 29  ]
 30  # Maximum peer connections
 31  max_peers = 50
 32  # Enable mDNS for local peer discovery (disable in production)
 33  mdns_enabled = false
 34  # External IP address (for NAT traversal, auto-detect if empty)
 35  external_ip = ""
 36  
 37  [alpha]
 38  # ALPHA chain specific settings
 39  
 40  # Target block time in milliseconds
 41  block_time_ms = 10000
 42  # RPC server port
 43  rpc_port = 3030
 44  # Enable RPC server
 45  rpc_enabled = true
 46  # Maximum transactions per block
 47  max_txs_per_block = 1000
 48  
 49  [alpha.consensus]
 50  # BFT consensus settings for ALPHA
 51  gc_depth = 50
 52  batch_size = 1000
 53  max_batch_delay_ms = 100
 54  
 55  [alpha.storage]
 56  # Storage backend: rocksdb or memory
 57  backend = "rocksdb"
 58  # Database path (relative to data_dir)
 59  db_path = "alpha"
 60  # Cache size in MB
 61  cache_size_mb = 1024
 62  # Write buffer size in MB
 63  write_buffer_mb = 256
 64  
 65  [delta]
 66  # DELTA chain specific settings
 67  
 68  # Target block time in milliseconds (faster for exchange)
 69  block_time_ms = 1000
 70  # RPC server port
 71  rpc_port = 3031
 72  # Enable RPC server
 73  rpc_enabled = true
 74  # Maximum transactions per block (higher for exchange throughput)
 75  max_txs_per_block = 10000
 76  # Enable DEX functionality
 77  dex_enabled = true
 78  # WebSocket port for streaming
 79  websocket_port = 3032
 80  
 81  [delta.consensus]
 82  # BFT consensus settings for DELTA (optimized for throughput)
 83  gc_depth = 50
 84  batch_size = 5000
 85  max_batch_delay_ms = 50
 86  
 87  [delta.storage]
 88  # Storage backend: rocksdb or memory
 89  backend = "rocksdb"
 90  # Database path (relative to data_dir)
 91  db_path = "delta"
 92  # Cache size in MB (larger for exchange)
 93  cache_size_mb = 2048
 94  # Write buffer size in MB
 95  write_buffer_mb = 512
 96  
 97  [ipc]
 98  # Internal IPC between ALPHA and DELTA runtimes
 99  enabled = true
100  # IPC socket path
101  socket_path = "/var/run/adnet/ipc.sock"
102  # Maximum message queue size
103  queue_size = 10000
104  # Message timeout in milliseconds
105  timeout_ms = 5000
106  
107  [api]
108  # Unified API server settings
109  enabled = true
110  # Combined API port
111  port = 8080
112  # CORS origins
113  cors_origins = ["*"]
114  # Rate limiting (requests per minute per IP)
115  rate_limit = 1000
116  # Enable Swagger/OpenAPI docs
117  swagger_enabled = true
118  
119  [metrics]
120  # Prometheus metrics configuration
121  enabled = true
122  # Metrics server port
123  port = 9100
124  # Metrics path
125  path = "/metrics"
126  # Additional labels
127  labels = { network = "testnet", chain = "dual" }
128  
129  [logging]
130  # Logging configuration
131  level = "info"
132  format = "json"
133  # Log file (empty for stdout)
134  file = ""
135  # Enable log rotation
136  rotation = true
137  # Maximum log file size in MB
138  max_size_mb = 100
139  # Maximum number of log files
140  max_files = 10
141  
142  [telemetry]
143  # Telemetry reporting (opt-in for testnet)
144  enabled = true
145  # Telemetry endpoint
146  endpoint = "https://telemetry.ac-dc.network"
147  # Report interval in seconds
148  interval_secs = 60
149  
150  [validator]
151  # Validator-specific settings (only used if node_type = "validator")
152  
153  # Withdrawal address for rewards
154  withdrawal_address = ""
155  # Commission rate (percentage)
156  commission_percent = 5
157  # Enable automated key rotation
158  auto_key_rotation = false
159  # Key rotation interval in blocks
160  key_rotation_interval = 0