/ testnet-deployment-plan.cspec
testnet-deployment-plan.cspec
  1  # Testnet Deployment Plan - Step by Step
  2  # Date: 2026-01-19
  3  # Approach: Option C - Deploy separate nodes, migrate to unified later
  4  
  5  # === CURRENT STATE ===
  6  deployed:
  7    testnet001:
  8      ip: 65.108.155.133
  9      status: adnet_running_but_no_networking
 10      root_disk: 226GB_sda1
 11      blockchain_disk: 500GB_sdb_mounted_at_/mnt/blockchain-data
 12      data_dirs:
 13        alphaos: /mnt/blockchain-data/alphaos # symlinked from ~/.alphaos
 14        deltaos: /mnt/blockchain-data/deltaos # symlinked from ~/.deltaos
 15    testnet002:
 16      ip: 178.156.159.24
 17      status: adnet_running_but_no_networking
 18      root_disk: 343GB_sda1
 19      blockchain_disk: 500GB_sdb_mounted_at_/mnt/blockchain-data
 20      data_dirs:
 21        alphaos: /mnt/blockchain-data/alphaos # symlinked from ~/.alphaos
 22        deltaos: /mnt/blockchain-data/deltaos # symlinked from ~/.deltaos
 23    binaries_on_servers: adnet_v0.3.0 # not production ready
 24    ssh_access: configured # devops@ci can access
 25    storage: configured # 500GB volumes mounted and ready
 26  
 27  needed:
 28    additional_servers: 1-3 # (3 total min, 5 total recommended)
 29    approach: deploy_separate_alphaos_deltaos_binaries
 30    reason: adnet_missing_APIs_and_P2P_networking
 31  
 32  # === PHASE 1: BUILD BINARIES (30 mins) ===
 33  step_1_build_alphaos:
 34    location: /home/devops/working-repos/alphaos
 35    command: RUSTFLAGS="-C target-cpu=x86-64" cargo build --release
 36    output: target/release/alphaos (~130MB)
 37    duration: ~5-10_minutes
 38    portable: true # works on AMD EPYC and Intel Xeon
 39  
 40  step_2_build_deltaos:
 41    location: /home/devops/working-repos/deltaos
 42    output: target/release/deltaos (~130MB)
 43    duration: ~5-10_minutes
 44    note: already_built_at /home/devops/working-repos/deltaos/target/release/deltaos
 45  
 46  step_3_verify_binaries:
 47    alphaos: ./target/release/alphaos --version
 48    deltaos: ./target/release/deltaos --version
 49    test_help: ./target/release/alphaos start --help
 50  
 51  # === PHASE 2: GENERATE KEYS (15 mins) ===
 52  step_4_generate_validator_keys:
 53    per_server:
 54      - generate_alpha_account: alphaos account new
 55      - generate_delta_account: deltaos account new
 56      - save_private_keys: securely_store_offline
 57      - extract_public_keys: for_genesis_config
 58    servers:
 59      testnet001:
 60        alpha_address: to_be_generated
 61        delta_address: to_be_generated
 62      testnet002:
 63        alpha_address: to_be_generated
 64        delta_address: to_be_generated
 65      testnet003:
 66        alpha_address: to_be_generated
 67        delta_address: to_be_generated
 68  
 69  step_5_generate_network_keys:
 70    purpose: p2p_peer_identity
 71    per_chain: separate_network_keys_for_alpha_delta
 72    storage: /home/devops/.alphaos/keys/ and /home/devops/.deltaos/keys/
 73  
 74  # === PHASE 3: CREATE GENESIS (30 mins) ===
 75  step_6_alpha_genesis:
 76    file: genesis.json
 77    validators:
 78      - address: testnet001_alpha_address
 79        stake: 1000000
 80        public_key: testnet001_consensus_key
 81      - address: testnet002_alpha_address
 82        stake: 1000000
 83        public_key: testnet002_consensus_key
 84      - address: testnet003_alpha_address
 85        stake: 1000000
 86        public_key: testnet003_consensus_key
 87    bootstrap_peers:
 88      - 65.108.155.133:4130
 89      - 178.156.159.24:4130
 90      - testnet003_ip:4130
 91  
 92  step_7_delta_genesis:
 93    file: genesis.json
 94    validators:
 95      - address: testnet001_delta_address
 96        stake: 1000000
 97        public_key: testnet001_consensus_key
 98      - address: testnet002_delta_address
 99        stake: 1000000
100        public_key: testnet002_consensus_key
101      - address: testnet003_delta_address
102        stake: 1000000
103        public_key: testnet003_consensus_key
104    bootstrap_peers:
105      - 65.108.155.133:4131
106      - 178.156.159.24:4131
107      - testnet003_ip:4131
108  
109  # === PHASE 4: DEPLOY TO SERVERS (30 mins) ===
110  step_8_stop_adnet:
111    on_all_servers:
112      - ssh devops@testnet001.ac-dc.network "pkill -f adnet"
113      - ssh devops@testnet002.ac-dc.network "pkill -f adnet"
114      - ssh devops@testnet003.ac-dc.network "pkill -f adnet"
115  
116  step_9_transfer_binaries:
117    command: |
118      scp alphaos/target/release/alphaos devops@testnet{001,002,003}.ac-dc.network:/tmp/
119      scp deltaos/target/release/deltaos devops@testnet{001,002,003}.ac-dc.network:/tmp/
120    install: |
121      ssh devops@testnetXXX.ac-dc.network "sudo mv /tmp/{alphaos,deltaos} /usr/local/bin/ && sudo chmod +x /usr/local/bin/{alphaos,deltaos}"
122  
123  step_10_transfer_configs:
124    genesis_files: scp_to_each_server
125    validator_keys: scp_private_keys_securely
126    node_configs: create_per_server_config_files
127  
128  # === PHASE 5: START NODES (15 mins) ===
129  step_11_start_alpha_validators:
130    testnet001: |
131      ssh devops@testnet001.ac-dc.network "nohup alphaos start \
132        --network testnet \
133        --validator \
134        --node 65.108.155.133:4130 \
135        --rest 0.0.0.0:3030 \
136        --peers 178.156.159.24:4130,testnet003_ip:4130 \
137        > ~/.alphaos/alphaos.log 2>&1 &"
138    testnet002: similar_command
139    testnet003: similar_command
140  
141  step_12_start_delta_validators:
142    testnet001: |
143      ssh devops@testnet001.ac-dc.network "nohup deltaos start \
144        --network testnet \
145        --validator \
146        --node 65.108.155.133:4131 \
147        --rest 0.0.0.0:3031 \
148        --peers 178.156.159.24:4131,testnet003_ip:4131 \
149        > ~/.deltaos/deltaos.log 2>&1 &"
150    testnet002: similar_command
151    testnet003: similar_command
152  
153  # === PHASE 6: VERIFY (15 mins) ===
154  step_13_check_processes:
155    command: ssh devops@testnetXXX.ac-dc.network "ps aux | grep -E 'alphaos|deltaos' | grep -v grep"
156    expected: 2_processes_per_server
157  
158  step_14_check_ports:
159    command: ssh devops@testnetXXX.ac-dc.network "ss -tlnp | grep -E '3030|3031|4130|4131'"
160    expected:
161      - 3030_alpha_rpc
162      - 3031_delta_rpc
163      - 4130_alpha_p2p
164      - 4131_delta_p2p
165  
166  step_15_check_consensus:
167    alpha_status: curl http://testnet001.ac-dc.network:3030/mainnet/latest/height
168    delta_status: curl http://testnet001.ac-dc.network:3031/mainnet/latest/height
169    expected: block_height_increasing
170  
171  step_16_check_p2p_peers:
172    alpha_peers: curl http://testnet001.ac-dc.network:3030/mainnet/peers/count
173    delta_peers: curl http://testnet001.ac-dc.network:3031/mainnet/peers/count
174    expected: peer_count_2_or_more
175  
176  step_17_test_transactions:
177    submit_alpha_tx: curl -X POST http://testnet001.ac-dc.network:3030/mainnet/transaction/broadcast
178    submit_delta_tx: curl -X POST http://testnet001.ac-dc.network:3031/mainnet/transaction/broadcast
179    verify: check_tx_included_in_block
180  
181  # === PHASE 7: MONITOR (ongoing) ===
182  step_18_setup_monitoring:
183    logs:
184      - tail -f ~/.alphaos/alphaos.log
185      - tail -f ~/.deltaos/deltaos.log
186    metrics:
187      - curl http://testnet001.ac-dc.network:3030/mainnet/latest/stateRoot
188      - watch curl http://testnet001.ac-dc.network:3030/mainnet/latest/height
189  
190  step_19_setup_systemd:
191    create_services: |
192      /etc/systemd/system/alphaos.service
193      /etc/systemd/system/deltaos.service
194    enable_autostart: |
195      systemctl enable alphaos deltaos
196      systemctl start alphaos deltaos
197  
198  # === TIMELINE ESTIMATE ===
199  total_time:
200    phase_1_build: 30_minutes
201    phase_2_keys: 15_minutes
202    phase_3_genesis: 30_minutes
203    phase_4_deploy: 30_minutes
204    phase_5_start: 15_minutes
205    phase_6_verify: 15_minutes
206    phase_7_monitor: ongoing
207    total_to_operational: 2_hours_15_minutes
208  
209  # === DEPENDENCIES ===
210  blockers:
211    - need_1_more_server: testnet003 # or 3 more for 5 total
212    - user_approval: proceed_with_option_c
213    - server_access: ssh_keys_configured
214  
215  ready_now:
216    - deltaos_binary: already_built
217    - alphaos_binary: can_build_in_5_minutes
218    - ssh_access: configured_to_testnet001_002
219    - investigation: complete
220  
221  # === NEXT IMMEDIATE ACTIONS ===
222  waiting_for_user:
223    decision_1: how_many_servers # 3 total or 5 total
224    decision_2: server_hostnames_ips # testnet003 details
225    decision_3: proceed_approval # green light to start
226  
227  can_start_immediately:
228    - build_alphaos_binary
229    - generate_validator_keys
230    - create_genesis_configs
231    - deploy_to_existing_2_servers
232    - add_3rd_server_when_ready