feat: Multi-node connectivity via hero_proxy over Mycelium #84

Merged
mahmoud merged 6 commits from development_hero_proxy_multinode into development 2026-04-09 12:54:53 +00:00
Owner

Summary

  • Rename all hero_router references to hero_proxy for cross-node traffic (port 9998 to 9997)
  • Add auto-configuration of hero_proxy Mycelium listener on master/worker start
  • Add hero_router + hero_proxy to install/uninstall scripts
  • Update all documentation

Changes

Area Files What
SDK lib.rs HERO_PROXY_PORT=9997, proxy_*_url() functions
CLI main.rs Mycelium listener auto-setup, write_env() updates
Heartbeat heartbeat_sender.rs proxy_* references
Explorer proxy.rs proxy_* doc updates
Install install.sh, uninstall.sh hero_router + hero_proxy steps
Docs setup, arch, config, .env Hero Proxy for multi-node

Test plan

  • cargo build --workspace passes
  • cargo test --workspace — 13 suites, 0 failures
  • make lint passes
  • Multi-node test: master + worker over Mycelium

Closes #83

## Summary - Rename all hero_router references to hero_proxy for cross-node traffic (port 9998 to 9997) - Add auto-configuration of hero_proxy Mycelium listener on master/worker start - Add hero_router + hero_proxy to install/uninstall scripts - Update all documentation ## Changes | Area | Files | What | |------|-------|------| | SDK | `lib.rs` | HERO_PROXY_PORT=9997, proxy_*_url() functions | | CLI | `main.rs` | Mycelium listener auto-setup, write_env() updates | | Heartbeat | `heartbeat_sender.rs` | proxy_* references | | Explorer | `proxy.rs` | proxy_* doc updates | | Install | `install.sh`, `uninstall.sh` | hero_router + hero_proxy steps | | Docs | setup, arch, config, .env | Hero Proxy for multi-node | ## Test plan - [x] `cargo build --workspace` passes - [x] `cargo test --workspace` — 13 suites, 0 failures - [x] `make lint` passes - [x] Multi-node test: master + worker over Mycelium Closes #83
feat: multi-node connectivity via hero_proxy over Mycelium
All checks were successful
Test / test (push) Successful in 1m25s
Test / test (pull_request) Successful in 1m28s
Test Install Script / test-install-ubuntu (pull_request) Successful in 1m38s
c6aeeb48d7
Replace hero_router references with hero_proxy for cross-node traffic.
hero_router stays localhost-only (socket discovery). hero_proxy handles
external Mycelium IPv6 connections.

SDK:
- Rename HERO_ROUTER_PORT to HERO_PROXY_PORT (9997)
- Rename router_*_url() to proxy_*_url()
- Rename ROUTER_*_PREFIX to PROXY_*_PREFIX

CLI:
- Add setup_hero_proxy_mycelium_listener() — auto-configures hero_proxy
  Mycelium listener on master/worker start via mycelium.info + listener.add
- Update write_env() and detect_outbound_ip() for new port

Install script:
- Add hero_router and hero_proxy download/install/start steps
- Read versions from central config (hero_compute_config)
- Start hero_router and hero_proxy via hero_proc
- Update uninstall.sh with cleanup

Docs:
- Update all references from Hero Router to Hero Proxy for multi-node
- Update port 9998 to 9997

#83
merge: development into hero_proxy_multinode — resolve script conflicts with clean rewrites
All checks were successful
Test Install Script / test-install-ubuntu (pull_request) Successful in 52s
Test / test (pull_request) Successful in 1m24s
Test / test (push) Successful in 1m51s
13d36c4122
fix: wrap IPv6 addresses in brackets for URLs, use MYCELIUM_IP for worker advertise
All checks were successful
Test Install Script / test-install-ubuntu (pull_request) Successful in 1m17s
Test / test (push) Successful in 2m29s
Test / test (pull_request) Successful in 2m30s
837a2e85fe
- proxy_server_rpc_url/proxy_explorer_rpc_url now wrap IPv6 in brackets
  (e.g. http://[5ed:...]:9997/... instead of http://5ed:...:9997/...)
- Worker mode uses MYCELIUM_IP env var for advertise address instead of
  detect_outbound_ip which finds the IPv4 route
chore: clean up branch for merge
All checks were successful
Test Install Script / test-install-ubuntu (pull_request) Successful in 48s
Test / test (push) Successful in 1m28s
Test / test (pull_request) Successful in 1m51s
e74968707a
- Remove hero_install.nu (now in hero_scripts repo)
- Rewrite docs/architecture.md — full multi-node architecture with
  hero_proxy -> hero_router -> socket chain, component roles, deployment modes
- Rewrite docs/setup.md — multi-node setup guide with Mycelium configuration
- Update .env.example — correct IPv6 URL examples with brackets
- Build passes, lint passes, all 13 test suites pass
feat: install script starts hero_router, hero_proxy, configures Mycelium
All checks were successful
Test Install Script / test-install-ubuntu (pull_request) Successful in 1m21s
Test / test (push) Successful in 1m24s
Test / test (pull_request) Successful in 1m32s
9ef09e1964
Install script now fully automates multi-node setup:
1. Install nushell + all binaries (via hero_scripts)
2. System packages + kernel
3. Start hero_proc_server
4. Start mycelium
5. Start hero_router (socket discovery)
6. Start hero_proxy (network gateway)
7. Create hero_proxy [::]:9997 dual-stack listener
8. Detect Mycelium IPv6 and save MYCELIUM_IP to env file

After install, user only needs:
  hero_compute --start --mode master
  hero_compute --start --mode worker --master-ip <mycelium-ipv6>

Summary now shows all 4 services + Mycelium IP.
Merge branch 'development' into development_hero_proxy_multinode
All checks were successful
Test Install Script / test-install-ubuntu (pull_request) Successful in 1m18s
Test / test (push) Successful in 1m24s
Test / test (pull_request) Successful in 1m28s
9208524297
mahmoud merged commit f404f80218 into development 2026-04-09 12:54:53 +00:00
mahmoud deleted branch development_hero_proxy_multinode 2026-04-09 12:54:58 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_compute!84
No description provided.