Dorian
d37ec1dea5
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
...
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
Dorian
70f1348c15
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
...
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
Dorian
a5d5faf90c
feat: Phase 3-4 Weeks 5+6 — off-grid Bitcoin ops + emergency alert system
...
Bitcoin relay (mesh/bitcoin_relay.rs):
- BlockHeaderCache: stores latest block headers from internet peers for SPV
- RelayTracker: tracks in-flight TX and Lightning relay requests
- Builder functions: block header announcements (Ed25519 signed),
TX relay request/response, Lightning invoice relay/response
- All amounts as u64 sats, never float
- 4 unit tests
Emergency alerts (mesh/alerts.rs):
- AlertConfig: dead man switch settings, GPS, emergency contacts
- DeadManSwitch: background timer, auto-trigger after configurable interval
(default 6h), signed alert broadcast with GPS coordinates
- check_in() resets timer, is_triggered() checks elapsed time
- GPS as integer microdegrees (Coordinate type from message_types)
- Disk persistence for config
- 4 unit tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:26:07 +00:00
Dorian
de92bb2cd4
feat: Phase 3 Week 3 — typed messages + store-and-forward outbox
...
- Create mesh/message_types.rs: typed message envelope system
- MeshMessageType enum: Text, Alert, Invoice, PsbtHash, Coordinate,
PrekeyBundle, SessionInit, BlockHeader, TxRelay, LightningRelay
- TypedEnvelope: CBOR wire format with 0x02 prefix, optional Ed25519 sig
- Payload types: AlertPayload (with AlertType enum), InvoicePayload
(sats as u64), Coordinate (integer microdegrees, no float),
PsbtHashPayload, BlockHeaderPayload, TxRelayPayload, LightningRelayPayload
- Signed envelope creation + verification for alerts/block headers
- 8 unit tests
- Create mesh/outbox.rs: store-and-forward message queue
- PendingMessage with TTL (24h default), retry count, relay hops (max 3)
- MeshOutbox: persistent VecDeque, max 200 messages, expiry, relay support
- Disk persistence to mesh-outbox.json
- 6 unit tests: enqueue, deliver, expire, persistence, max size, relay hops
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:08:58 +00:00
Dorian
688adc8321
feat: add per-peer ratchet session manager with disk persistence
...
- Create mesh/session.rs: SessionManager for Double Ratchet state lifecycle
- Lazy-loads sessions from disk on first message
- Saves after every encrypt/decrypt (chain key advancement)
- Per-DID storage at {data_dir}/ratchet/{sha256(did)}.json
- Session info API for RPC status reporting
- Zeroize on drop for all key material
- Tests: store+load roundtrip, encrypt/decrypt through manager, session removal
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 01:54:26 +00:00
Dorian
e05bb3cc85
feat: Phase 3 Week 2 — Double Ratchet protocol for forward-secret mesh messaging
...
- Create mesh/ratchet.rs: full Signal-style Double Ratchet implementation
- DH ratchet with X25519 ephemeral keypairs per step
- Symmetric-key ratchet via HKDF-SHA256 chain derivation
- Per-message ChaCha20-Poly1305 encryption with derived message keys
- Out-of-order delivery via skipped message key cache (max 100)
- Forward secrecy: old keys zeroized on ratchet step
- Wire format: 40B header + nonce + ciphertext + tag
- Tests: full conversation, out-of-order, forward secrecy, wire format,
long conversation (50 messages alternating), message roundtrip
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 01:50:22 +00:00
Dorian
1ced0fdbf3
feat: Phase 3 Week 1 — X3DH key agreement + HKDF foundation
...
- Add hkdf = "0.12" dependency for Double Ratchet key derivation
- Extend mesh/crypto.rs with hkdf_sha256, hkdf_sha256_32, hkdf_sha256_64,
and generate_x25519_ephemeral() for DH ratchet steps
- Create mesh/x3dh.rs: full X3DH key agreement protocol
- PrekeyBundle generation with Ed25519-signed prekeys
- 3-way (or 4-way) ECDH → HKDF-SHA256 → root key
- Initiator and responder sides derive identical root key
- CBOR encoding for mesh transmission
- Bundle signature verification
- 5 unit tests: generate+verify, both-sides-same-key,
without-one-time-prekey, cbor-roundtrip, tamper-detection
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 01:28:35 +00:00
Dorian
253c305cc8
backup commit
2026-03-17 00:03:08 +00:00