forgo.cloud
Sign in
Repo workspace

forkjoin-ai/gnosis

Teleporting computation over radio

distributed-inference/docs/TELEPORT.md
forkjoin-ai/gnosis

Teleporting computation over radio

Broadcast the cache key, not the request. The key crosses the gap; the compute does not.

This is the index for the cache-key teleport work: a way to make a remote node serve a result without sending it a request and waiting for the round trip. A tiny key travels over RF (or any channel); if it validates, the receiving runtime replays a frozen, precomputed result locally — a geodesicLength:0 cache hit that never traverses compute space. Proven on real hardware, formalized in Lean, and wired as a first-class admission path across every runtime in the mesh.


The honest core (read this first)

We are not breaking the speed of light. Causality is intact. The trick is refusing to pay the round trip: the answer was computed once and frozen in a cache; a small key, broadcast over the air, tells the far side which cached answer to serve. At Mars distances that is the difference between a 40-minute round trip and a 0.19 ms local replay — because the answer was already there. A request the cache has never seen is a miss: it falls back to the slow path. The teleport is real; the magic is bookkeeping.

Every certificate in this work states what is real vs. modeled. The RF reception, the projection validation, the fail-closed gates, and the cache replay are real. Interplanetary distance is modeled (Eb/N0-equivalence on the bench + real link-budget physics), and the docs say so wherever it applies.


The mechanism

  • The cache key is an amplituhedron volume keyed by (prefix_hash, prefix_len, layer_lo, layer_hi). The canonical demo key is prefixHash=66, prefixLen=7 with a replayContract of geodesicLength:0 — a frozen prefill that replays without re-running. (src/amplituhedron.rs, src/amplituhedron_wire.rs.)
  • protocol69 is the over-the-air admission ticket: broadcast symbol 66 XOR local FOIL operand 7 = 69. If the projection validates, the station is admitted to the replay. The projection travels; the compute does not. (src/protocol69.rs.)
  • The shared primitive: teleport_admit(envelope, cache, prefix_hash, prefix_len, layer_lo, layer_hi) -> TeleportAdmission validates the protocol69 envelope, then replays the amplituhedron volume. Fail-closed on projection drift; a miss is a miss. (src/teleport.rs.)
  broadcast symbol 66 ──(RF / Flow / HTTP / wasm)──▶  teleport_admit
                                                         │
                              66 XOR 7 = 69 ? ───────────┤
                                 │ no                     │ yes
                                 ▼                        ▼
                          403 / fail-closed       amplituhedron.replay
                                                  (geodesicLength:0)
                                                         │
                                                         ▼
                                            frozen result, served locally

What is proven (real hardware)

Lab radios: two NESDR SMArt v5 RTL-SDRs (SN 94092559, 78922015) and an ADALM-Pluto (usb:0.5.5); a libiio v0.25 built from source. See .qa-artifacts/rtlsdr/ for captures and certificates.

Proof Result
protocol69 over the air Pluto transmitted symbol 66 as a 66 kHz tone; the NESDR recovered it at 66.1 dB SNR / +49 dB on-off; 66 XOR 7 = 69 validated over HTTP and the 10-byte Flow/UDP frame; a drifted projection (68) fail-closed 400.
Full framed cache key over the air The entire GNOSIS-RFKEY/1 ... crc16=a4ce frame (8-FSK + Reed-Solomon + convolutional + Whip diversity) transmitted Pluto→NESDR at 433.92 MHz / 2.4 MS/s and recovered byte-exact at −20 dB (sync 0.998, rsErrors 0, CRC pass).
FEC closes a Mars-grade gap on real silicon At −50 dB (same power), the FEC-coded frame recovered the exact key while the FEC-off frame failed with a CRC mismatch (sync still locked) — the coding gain, demonstrated over the air.
Software A/B (deterministic) At the FEC cliff (Eb/N0 = 5 dB): raw recovers 0/5 seeds, rs+conv 5/5. Whip fork/race/fold survives a fully-faded replica.
Distance ladder Link margin is monotone in distance (proved). Mars closes 33–51 dB at all regimes; the link keeps closing out through New Horizons and breaks honestly at Voyager 1 (−2.4 dB) at a 34 m / 20 W reference.
Teleport latency A/B geodesicLength:0 replay ≈ 0.19 ms vs. the round trip it avoids: Moon 13,267×, Mars mean 7.7 million×, Voyager 1 849 million×. A wrong key is rejected (fail-closed).
Skymesh Two air-gapped NESDRs, no link between them, both derive a gain-invariant witness off the same ambient carrier (102.49 MHz) and teleport the same answer in lockstep; a different sky and a forged key both fail closed.

Teleport is first-class everywhere

The same teleport_admit primitive is the admission fast-path across the stack — so the demo is not rigged; it is the one gate every layer calls.

Surface Where What it does
fat-station src/bin/fat-station.rs POST /.aeon/teleport-admit → 200 + X-Geodesic-Length: 0 on a hit, 403 on drift, 404 on miss; POST /.aeon/amplituhedron-capture seeds a volume.
moonshine moonshine/src/executor.rs gate in Backend::run_node before the model forward; a hit returns the cached replay.
monster monster-guard, monster-swarm, monster-resident protocol69 admission before the sandboxed spawn / subagent fork.
gnosis-uring ../../x-gnosis/gnosis-uring/src/fano_transport.rs protocol69 GATE-0 before FANO routing → UringFanoRouteDecision::CachedReplay.
aether wasm-simd ../../aether/src/wasm-simd/{protocol69,teleport}.ts a TS teleport admit that short-circuits the heavy wasm kernel on a hit (opt-in, non-breaking).

The Mars-channel modem (Layer A)

A real framed modem that puts the whole cache key over the air and survives Mars-grade Eb/N0. All in ../../gnosis/rtlsdr-mock-sim/:

  • Modulation: non-coherent 8-FSK (mfsk-modem.ts, the proven tone-argmax detector, repeated per symbol) with a coherent BPSK option (bpsk-modem.ts).
  • FEC: concatenated Reed-Solomon GF(256) + K=7 convolutional/Viterbi (CCSDS/Voyager polynomials) + block interleaver (fec-*.ts, interleaver.ts), plus the house Whip fork/race/fold time diversity (whip-diversity.ts).
  • Channel + budget: AWGN at a target Eb/N0 (mars-channel.ts), Friis link budget + certificate (link-budget.ts), the full distance ladder with monotonicity + break-rung (distance-ladder.ts), light-time (mars-light-time.ts).
  • TX: pluto-tx.ts builds the iio_writedev stream; run.mts modes mars-tx, mars-rx, mars-link-budget, mars-ladder.

Deep dives: EXPERIMENT_006.


The proofs in Lean (Rustic Church, Init-only)

  • gnosis-math/Gnosis/SkymeshTeleport.lean — the admission shape: canonical_projection (66⊕7=69), geodesic_is_zero, the resilient agreement (agree_monotone, agree_tolerates_one_flip), the four gates + admitted_iff, the fail-closed family (unlocked_denied, miss_denied, forged_projection_denied, foil_veto_denied), and genuine_sky_forged_key_denied — you cannot teleport a computation you cannot prove you own, even on the same sky.
  • gnosis/lean/Lean/ForkRaceFoldTheorems/MarsDistanceLadder.lean — the ladder dominance: friis_loss_monotone_in_distance, teleport_savings_monotone_in_distance, margin_closes_at_dmax_implies_closes_below ("works at Mars ⇒ works at everything nearer").

Both build under lake build with no omega/simp/Mathlib. The hardware/RF truth stays outside Lean; the kernel carries the arithmetic and the admission algebra.


Run it

# from open-source/gnosis
# --- the math, no hardware ---
node_modules/.bin/tsx rtlsdr-mock-sim/run.mts mars-link-budget --mars-regime mean --band x-down
node_modules/.bin/tsx rtlsdr-mock-sim/run.mts mars-ladder --csv-out /tmp/ladder.csv
node_modules/.bin/vitest run --config rtlsdr-mock-sim/vitest.config.ts   # software A/B + all PHY

# --- the teleport admission against a live FOIL node ---
./distributed-inference/target/debug/gnosis-foil-control --raw-engine ambient-host &
node_modules/.bin/tsx rtlsdr-mock-sim/mars-teleport-demo.mts --cert-out /tmp/teleport.json

# --- Skymesh rehearsal (zero hardware) ---
node_modules/.bin/tsx rtlsdr-mock-sim/skymesh-run.mts --rehearse
./distributed-inference/target/debug/aeon-monitor --skymesh --demo   # the 2-pane view

# --- real RF: build libiio, then mars-tx (Pluto) -> rtl_sdr capture -> mars-rx (NESDR) ---
node_modules/.bin/tsx rtlsdr-mock-sim/run.mts mars-tx --whip-replicas 1 --whip-gap-samples 0
# (configure Pluto via iio_attr + iio_writedev; capture with rtl_sdr -d 0; then:)
node_modules/.bin/tsx rtlsdr-mock-sim/run.mts mars-rx --iq-file <capture>.u8 --whip-replicas 1

What it can do (today, proven)

  • Admit a cache key over RF, HTTP, Flow/UDP, or wasm and serve a geodesicLength:0 replay — the same teleport_admit primitive across fat-station, moonshine, monster, gnosis-uring, and the aether wasm-simd edge.
  • Put a whole framed cache key over the air and recover it byte-exact under noise (FEC closes a Mars-grade Eb/N0 gap on real silicon).
  • Have two receivers with no link between them reach the same answer off the same sky (Skymesh), with fail-closed rejection of a different sky or a forged key.
  • Quantify the payoff: a local replay (~0.19 ms) vs. a round trip that grows with distance — 7.7 million× at Mars, and the value provably grows with range.

How it scales (the short version)

The key is tiny and the result is precomputed, so broadcast is O(1) in receivers and in result size, and the latency win grows monotonically with distance (proved). A fleet of /chain mesh stations shares aggregate cache; the FOIL "vacuum of the future" pre-populates it from off-path work so future same-shape requests inside the latency window inherit it for free; and the proof relays down the distance ladder by monotonicity. Full treatment, with the proven-vs-design split, in TELEPORT_SCALING.md.

The doc set

  • SKYMESH.mdthe umbrella: the whole system (teleport + Skymesh + Mars ladder + rhizome routing + atlas coordinates + the Edgework old-web bridge), the inversion, and the Lean-proven pillars. Start here for the big picture.
  • This file — the teleport mechanism, overview and index.
  • TELEPORT_BENCHMARKS.md — every measured number (RF, FEC A/B, ladder, latency, Skymesh, build/test timings), cold vs. warm.
  • TELEPORT_LIMITATIONS.md — the honest ledger of what it is not.
  • TELEPORT_SCALING.md — what it can do and how it scales.
  • HARDWARE_SETUP.md — the local hardware bring-up (2 NESDRs, Pluto, R1s).
  • SKYMESH_DEMO.md — the two-air-gapped-stations demo runbook.
  • MARS_DELAY_TOLERANT_TELEPORT.md — the Mars station, light-time model, and the latency A/B.
  • EXPERIMENT_006_MARS_CHANNEL_RF_LINK.md — the modem + FEC + link budget, with the bench results.
  • R1_RESILIENT_MESH.md — the /chain mesh the teleport amortizes.
  • ../../gnosis/rtlsdr-mock-sim/README.md + CLI_CONTRACT.md — the modem CLI surface.
  • .qa-artifacts/rtlsdr/ — captures, certificates, and the protocol69 OTA proof log.

Hardware

  • 2× NESDR SMArt v5 (RTL2832U + R820T, receive-only) + 1 antenna — the Skymesh stations.
  • ADALM-Pluto (usb:0.5.5) — the transmitter for the Mars-channel loopback (libiio v0.25 built from source; macOS framework under /tmp/libiio_build, ephemeral — rebuild if gone).
  • Rabbit R1 Android devices — mesh nodes (/chain distributed inference).

RTL-SDRs cannot transmit, and that is on-theme: deep-space operation is receive-dominant — you listen and serve locally; you do not pay a synchronous round trip. The teleport is the software expression of exactly that.