ICN Demo - Immediate Pivot

Archived Document Notice (2026-02-12): This file is retained for historical context and may not reflect current code, APIs, runtime defaults, CI status, or deployment posture. Use active documentation under docs/ as authoritative.

Current Situation (After 2 hours)

Problem: Daemon fails to start with "Address already in use" error, even though:

  • No port conflicts exist (verified with ss and lsof)
  • All other daemons killed
  • Store directories cleaned
  • Multiple ports tried

Root Cause (Hypothesis): Something in the runtime initialization triggers an early shutdown. The "address already in use" error appears to be a symptom, not the cause.

Time Box Exceeded: 2 hours spent on daemon startup. Need to pivot.


Immediate Pivot: Test with CLI Tools

Instead of trying to get the daemon running, let's test the system using the existing running daemons and CLI tools.

Step 1: Use Existing Daemon (5 minutes)

# Check which daemons are running
ps aux | grep icnd

# Try connecting to one with icnctl
cd <repo-root>/icn

# Test connection to existing daemon (likely on port 5601)
./target/release/icnctl status

# If that works, try other commands
./target/release/icnctl id show
./target/release/icnctl network peers

Step 2: Initialize Cooperative via CLI (10 minutes)

# Check init-coop command
./target/release/icnctl init-coop --help

# Try to create a test cooperative
./target/release/icnctl init-coop

# Or check if cooperatives already exist
./target/release/icnctl  # look for coop commands

Step 3: Test Ledger Operations (15 minutes)

# Check ledger commands
./target/release/icnctl ledger --help

# Try to query balances
./target/release/icnctl ledger balance --help

# Try to create a transaction
./target/release/icnctl ledger transfer --help

Alternative: CLI-Based Demo

If gateway continues to be problematic, we can do a CLI-based demo which is actually quite compelling:

Demo Script (CLI Version)

# 1. Show identity
icnctl id show

# 2. Show network status
icnctl network peers

# 3. Create cooperative
icnctl init-coop

# 4. Add members (need to figure out how)
# ...

# 5. Create transaction
icnctl ledger transfer --from Alice --to Bob --amount 2.5 --memo "Woodworking instruction"

# 6. Show balances
icnctl ledger balance Alice
icnctl ledger balance Bob

# 7. Show transaction history
icnctl ledger history

# 8. Create governance proposal
icnctl gov proposal create --title "Set credit limit" --description "..."

# 9. Vote on proposal
icnctl gov vote --proposal-id 1 --vote yes

# 10. Show proposal results
icnctl gov proposal show 1

Advantage of CLI Demo:

  • Shows the system works
  • No UI debugging needed
  • Can use jq to make JSON output beautiful
  • Terminal demos are impressive to technical audiences
  • Less can go wrong

Disadvantage:

  • Less visual
  • Doesn't show UI capabilities

Decision Matrix

Option A: Keep Debugging Daemon (High Risk)

  • Time: Unknown (could be 1 hour, could be 4 hours)
  • Probability of Success: 60%
  • Value if Success: High (full stack demo)
  • Value if Failure: Low (no demo at all)

Option B: CLI Demo (Low Risk)

  • Time: 2-3 hours to perfect
  • Probability of Success: 95%
  • Value: Medium-High (shows system works, just not UI)
  • Fallback: Can always show UI screenshots/mockups

Option C: Hybrid Approach (Medium Risk)

  • Time: 3-4 hours
  • Steps:
    1. Perfect CLI demo (2 hours)
    2. Continue debugging daemon in parallel
    3. If daemon works, great - show both
    4. If not, have CLI demo as backup

Recommendation: Option C (Hybrid)

Why:

  1. CLI demo is achievable and valuable
  2. Gives us a working demo to fall back on
  3. Can continue daemon debugging without pressure
  4. Best risk/reward ratio

Action Plan:

  1. Now: Test CLI commands with existing daemon
  2. Next 2 hours: Build CLI demo script that works
  3. Tomorrow: Polish CLI demo, continue daemon debug
  4. Day 3: If daemon works, add UI; if not, CLI demo is ready

Immediate Next Command

cd <repo-root>/icn
./target/release/icnctl --help
./target/release/icnctl status

Let's see what we can do with the CLI tools RIGHT NOW.