/ testnet-deployment-requirements.cspec
testnet-deployment-requirements.cspec
  1  # Testnet Deployment Requirements - Investigation Report
  2  # Date: 2026-01-19
  3  # Status: adnet NOT production-ready, Phase 2 (networking/APIs) missing
  4  
  5  # === EXECUTIVE SUMMARY ===
  6  status: adnet_v0.3.0_not_ready_for_testnet
  7  phase_complete: phase_1_runtime_ipc
  8  phase_missing: phase_2.2-2.5_networking_apis
  9  recommendation: option_c_hybrid_deployment
 10  
 11  # === CURRENT ARCHITECTURE ===
 12  adnet_v0.3.0:
 13    status: internal_runtime_complete_external_missing
 14    location: /home/devops/working-repos/adnet
 15    working_components:
 16      - adnet-runtime: runtime_orchestration
 17      - adnet-ipc: cross_chain_messaging
 18      - adnet-consensus: bft_consensus_wiring
 19      - adnet-storage: storage_abstractions
 20      - adnet-e2e: 37_tests_passing
 21    missing_components:
 22      - adnet-api: "TODO: Phase 2.2-2.5" # HTTP/REST servers
 23      - adnet-network: "TODO: Phase 2.2-2.5" # P2P networking
 24    impact:
 25      - no_http_endpoints: cannot_query_state_or_submit_txs
 26      - no_p2p_networking: nodes_cannot_discover_or_communicate
 27      - ports_not_listening: 3030,3031,30303,4130,4131
 28  
 29  alphaos_deltaos_nodes:
 30    status: production_ready_mature
 31    location: /home/devops/working-repos/{alphaos,deltaos}
 32    components_complete:
 33      - node/rest: full_rest_api_axum_based
 34      - node/network: complete_p2p_networking
 35      - node/consensus: bft_narwhal_consensus
 36      - node/bft: byzantine_fault_tolerance
 37      - node/sync: block_synchronization
 38      - node/router: message_routing
 39    binary_size: ~130MB_each
 40    build_time: 5-10_minutes
 41  
 42  # === DEPLOYMENT OPTIONS ===
 43  option_a_separate_nodes:
 44    status: ready_now
 45    timeline: 1-2_days
 46    architecture: separate_alphaos_deltaos_binaries
 47    pros:
 48      - mature_battle_tested_code
 49      - full_rest_apis_p2p_networking
 50      - can_deploy_immediately
 51      - production_grade_components
 52    cons:
 53      - two_processes_per_server
 54      - no_cross_chain_ipc
 55      - higher_resource_usage
 56    servers_required:
 57      validators: 3-5_servers # each runs both alphaos+deltaos, serves RPC
 58      cpu: 8+_cores
 59      ram: 32GB
 60      storage: 500GB_NVMe
 61      total_servers: 3-5 # validators serve RPC directly for testnet
 62  
 63  option_b_complete_adnet:
 64    status: not_ready_needs_development
 65    timeline: 2-4_weeks
 66    missing_work:
 67      week_1-2: implement_rest_api_servers_adnet-api
 68      week_2-3: implement_p2p_networking_adnet-network
 69      week_3-4: integration_testing
 70    servers_required:
 71      validators: 3-5_unified_servers # serve RPC directly
 72      cpu: 16+_cores
 73      ram: 64GB
 74      storage: 1TB_NVMe
 75      total_servers: 3-5
 76  
 77  option_c_hybrid:
 78    status: recommended
 79    timeline:
 80      week_1: deploy_separate_nodes_testnet_operational
 81      week_2-4: complete_adnet_development_parallel
 82      week_5: migrate_to_unified_binary
 83    advantages:
 84      - testnet_operational_immediately
 85      - real_world_testing_during_development
 86      - smooth_migration_path
 87      - risk_mitigation_fallback_available
 88  
 89  # === TECHNICAL REQUIREMENTS ===
 90  genesis_config:
 91    validators_needed: 3-5_for_bft_consensus
 92    validator_spec:
 93      address: validator_address
 94      stake: 1000000
 95      public_key: consensus_pubkey
 96    bootstrap_peers:
 97      - 65.108.155.133:4130 # testnet001 Alpha
 98      - 178.156.159.24:4130 # testnet002 Alpha
 99      - 65.108.155.133:4131 # testnet001 Delta
100      - 178.156.159.24:4131 # testnet002 Delta
101  
102  network_ports:
103    3030: alpha_rpc_tcp_public
104    3031: delta_rpc_tcp_public
105    3032: delta_websocket_tcp_public
106    4130: alpha_p2p_tcp_udp_validators
107    4131: delta_p2p_tcp_udp_validators
108    30303: unified_p2p_tcp_udp_future_adnet
109    9090-9100: metrics_tcp_internal_only
110  
111  minimum_testnet_topology:
112    option_a_separate:
113      servers: 3_minimum_5_recommended
114      per_server:
115        - alphaos_validator_port_4130_rpc_3030
116        - deltaos_validator_port_4131_rpc_3031
117      public_endpoints: all_validators_expose_rpc
118      bft_tolerance: f=1_need_3_servers_minimum
119    option_b_unified:
120      servers: 3_minimum_5_recommended
121      per_server: adnet_unified_all_ports
122      public_endpoints: all_validators_expose_rpc
123      bft_tolerance: f=1_need_3_servers_minimum
124  
125  build_commands:
126    alphaos:
127      repo: /home/devops/working-repos/alphaos
128      command: RUSTFLAGS="-C target-cpu=x86-64" cargo build --release
129      binary: target/release/alphaos
130      size: ~130MB
131    deltaos:
132      repo: /home/devops/working-repos/deltaos
133      command: RUSTFLAGS="-C target-cpu=x86-64" cargo build --release
134      binary: target/release/deltaos
135      size: ~130MB
136  
137  # === CURRENT TESTNET STATUS ===
138  deployed_nodes:
139    testnet001:
140      ip: 65.108.155.133
141      hostname: testnet001.ac-dc.network
142      status: adnet_v0.3.0_running_internal_only
143      runtime_status: both_runtimes_initialized
144      network_status: no_ports_listening
145      communication: cannot_communicate
146    testnet002:
147      ip: 178.156.159.24
148      hostname: testnet002.ac-dc.network
149      status: adnet_v0.3.0_running_internal_only
150      runtime_status: both_runtimes_initialized
151      network_status: no_ports_listening
152      communication: cannot_communicate
153  
154  # === IMMEDIATE ACTION REQUIRED ===
155  decision_needed:
156    - deployment_approach: option_a_b_or_c
157    - additional_servers: how_many_can_be_provisioned
158    - timeline_constraint: testnet_asap_vs_wait_for_unified
159  
160  recommended_path:
161    approach: option_c_hybrid
162    total_servers: 3-5 # 2 already deployed, need 1-3 more
163    week_1:
164      - provision_1-3_additional_servers # testnet001+002 already exist
165      - build_alphaos_deltaos_binaries_x86-64_portable
166      - create_genesis_configuration
167      - deploy_to_all_servers
168      - configure_validators_to_serve_rpc_publicly
169      - start_consensus
170      - testnet_operational
171    week_2-4:
172      - parallel_adnet_api_development
173      - parallel_adnet_network_development
174      - integration_testing_with_live_testnet
175    week_5:
176      - migration_separate_to_unified
177      - zero_downtime_cutover
178  
179  minimum_server_spec:
180    cpu: 8_cores
181    ram: 32GB
182    storage: 500GB_NVMe
183    network: 100Mbps_symmetric
184    os: ubuntu_22.04_debian_12
185    memory_config:
186      swap: 16GB_minimum_32GB_recommended  # Prevents OOM crashes during load spikes
187      swap_file: /swapfile
188      swappiness: 10  # Prefer RAM, use swap for emergency buffer
189      oom_protection: protect_critical_services  # systemd, validator processes
190  
191  ready_to_proceed:
192    - alphaos_binary: can_build_immediately
193    - deltaos_binary: can_build_immediately
194    - deployment_scripts: available_in_testnet_directory
195    - configuration_templates: available_in_config_directory
196    - awaiting: user_decision_on_approach_and_server_count