Skip to content

Commit 05cbdb4

Browse files
hyperpolymathclaude
andcommitted
feat(groove): rewrite Graduated Trust paper with dream→heartbreak→resurrection arc
Restructured the paper into three narrative acts: Act I — The Dream: Type safety everywhere. Groove gives us proven types on localhost. IPv6T's GRV6 frame carries type hashes across the internet for 105 bytes. The dream seems within reach. Act II — The Heartbreak: It doesn't work. A type hash is an assertion, not a proof. Any sender can forge one. Compile-time proofs terminate at the network edge. On the internet, between strangers, Level 4 is impossible. The graduated trust model is honest about this. Act III — The Typed Overlay: But what if both sides aren't strangers? Two Burble users, two panel instances, any two apps compiled from the same Idris2 ABI — they ARE Level 4 to each other, even across the internet. The proofs are in the binary. The internet is a dumb pipe carrying proven types between proven endpoints. Endpoint-Proven WAN Safety theorem: if both endpoints share ABI definitions, GRV6 frames carry Level 4 proofs across any network. ABI-Rooted Interoperability property: different panels sharing the same capability ABI package are Level 4 for that capability. Proliferation model: every panel installation is a new node in the typed overlay. No infrastructure change needed. Comparison table: Tor preserves anonymity, BitTorrent availability, IPFS content addressing, Signal confidentiality, Typed Overlay preserves type safety — and uniquely requires zero infrastructure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4ee830c commit 05cbdb4

1 file changed

Lines changed: 263 additions & 44 deletions

File tree

groove-protocol/docs/graduated-trust.tex

Lines changed: 263 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -443,37 +443,251 @@ \subsection{CBOR Tags}
443443
cryptographic hash rather than a tag number, enabling schema evolution
444444
detection and provenance chaining.
445445

446-
\section{Discussion}
446+
\section{Act I: The Dream}
447+
448+
Imagine a world where every byte crossing the internet carries its type
449+
with it. Where a message sent from London to Tokyo arrives not as a bag
450+
of bits to be parsed and prayed over, but as a typed value --- provably
451+
the same structure it was when it left. Where the receiver doesn't
452+
validate, because there's nothing to validate: the compiler proved the
453+
shapes match before either side ran.
454+
455+
This is the dream. On localhost, we have it. The Groove Protocol
456+
\cite{groove2026} provides exactly this: zero-configuration discovery,
457+
structural type matching, compile-time proofs via Idris2 dependent types,
458+
and linear resource handles that make connection leaks impossible. On a
459+
single machine, types flow freely between services. The proofs hold. The
460+
types survive.
461+
462+
Naturally, the question arises: can we extend this to the internet?
463+
464+
IPv6T's GRV6 frame format (Section~3) provides a mechanism: embed type
465+
hashes, capability identifiers, and provenance chain links inside
466+
standard TCP payloads. The frame passes through every middlebox in
467+
existence because it is application data, not a protocol extension. The
468+
type information travels with the payload. Routers, NATs, firewalls, and
469+
CDNs carry it faithfully without knowing it's there.
447470

448-
\subsection{Why Honesty Matters}
471+
The dream seems within reach: type safety, everywhere, for 105 bytes of
472+
overhead.
449473

450-
It would be easy to claim that IPv6T ``brings type safety to the
451-
internet.'' This would be misleading. What IPv6T brings is \emph{type
452-
awareness}: the receiver knows what the sender \emph{claims} to be
453-
sending, can reject mismatches early, can audit the conversation, and
454-
can verify structural compatibility. Full type safety (Level 4) is only
455-
possible when you control both endpoints' build pipeline.
474+
\section{Act II: The Heartbreak}
456475

457-
This honesty is a feature. A system that claims more than it delivers
458-
invites misplaced trust. A system that clearly states its guarantees
459-
enables informed decisions. The graduated trust model lets each
460-
deployment choose the level appropriate to its threat model:
476+
It doesn't work. Not really.
461477

478+
The type hash in a GRV6 header is an \emph{assertion}, not a
479+
\emph{proof}. Any sender can compute the hash and stamp it on garbage.
480+
The hash proves the sender knows the type definition, not that the data
481+
conforms to it. A malicious actor --- or simply a buggy implementation
482+
--- can produce frames with valid type hashes and invalid payloads.
483+
484+
On localhost, this doesn't matter. You compiled both sides. The Idris2
485+
type checker verified both binaries. The proof exists because you are
486+
both the sender and the receiver.
487+
488+
On the internet, you don't control the far side. You didn't compile
489+
their code. You don't know if they used Idris2, or Zig, or Python, or a
490+
hand-rolled script that forges type hashes for entertainment. The
491+
compile-time proof chain --- the thing that makes Groove powerful ---
492+
\emph{terminates at the network edge}. Beyond your machine, there are no
493+
proofs. There is only trust.
494+
495+
And trust is exactly what the internet doesn't provide.
496+
497+
This means:
462498
\begin{itemize}
463-
\item Internal microservices behind a firewall: Level 3 (verified) is
464-
sufficient.
465-
\item Financial API with a trusted partner: Level 2 (attested) provides
466-
the audit trail regulators require.
467-
\item Public API for unknown clients: Level 1 (declared) gives early
468-
rejection and schema negotiation.
469-
\item Formally verified safety-critical system: Level 4 (proven) is
470-
mandatory and achievable because you control the build.
499+
\item Level 1 (Declared) tells you what the sender \emph{claims}. Not
500+
what they sent.
501+
\item Level 2 (Attested) tells you they committed to a hash chain. But a
502+
consistent liar produces a consistent chain.
503+
\item Level 3 (Verified) tells you their manifest matches yours. But the
504+
manifest is self-declared. Verification is of the \emph{claim}, not
505+
the \emph{reality}.
506+
\item Level 4 (Proven) requires you to have compiled both sides. On the
507+
internet, between strangers, this is impossible.
471508
\end{itemize}
472509

510+
The graduated trust model is honest about this. Each level provides real
511+
benefits (early rejection, schema negotiation, audit trails). But the
512+
dream of compile-time type safety across the open internet is, for the
513+
general case, exactly that: a dream.
514+
515+
The heart breaks here.
516+
517+
\section{Act III: The Typed Overlay}
518+
519+
But what if both sides \emph{aren't} strangers?
520+
521+
Consider: two users running Burble (a voice platform). Both downloaded
522+
the same application. Both applications were compiled from the same
523+
Idris2 ABI definitions, by the same build pipeline, with the same type
524+
proofs. The binary on machine A and the binary on machine B are
525+
\emph{the same binary}.
526+
527+
For these two endpoints, the compile-time proof chain doesn't terminate
528+
at the network edge. It doesn't terminate at all. The proof exists in
529+
the compiler's output, which is identical on both sides. The internet
530+
between them is just a dumb pipe carrying proven types from one proven
531+
endpoint to another.
532+
533+
\begin{theorem}[Endpoint-Proven WAN Safety]
534+
If two endpoints are compiled from the same Idris2 ABI definitions, then
535+
the GRV6 frames exchanged between them carry Level 4 (Proven) type
536+
safety across any network, including the public internet. The network
537+
infrastructure is irrelevant to the proof; it is a transparent conduit.
538+
\end{theorem}
539+
540+
\begin{proof}
541+
Let $A$ and $B$ be binaries compiled from ABI definition $D$. The Idris2
542+
type checker has verified that $A$'s output type and $B$'s input type are
543+
structurally identical (both derived from $D$). The roundtrip proofs
544+
guarantee $\text{decode}(\text{encode}(x)) = x$ for all $x$ of type $D$.
545+
The GRV6 frame carries $\text{encode}(x)$ over TCP. TCP guarantees
546+
ordered, reliable delivery. Therefore $B$ receives $\text{encode}(x)$
547+
and decodes it to $x$. The proof holds regardless of the network path.
548+
\end{proof}
549+
550+
This is not a theoretical curiosity. It is a practical architecture:
551+
552+
\subsection{The Proliferation Model}
553+
554+
\begin{enumerate}
555+
\item Ship a panel. Any panel --- a chat client, a game server manager, a
556+
file sharing tool, a collaborative editor. The panel includes the
557+
Groove harness and GRV6 framing.
558+
559+
\item Every instance of that panel is a proven endpoint. It was compiled
560+
from the same source, with the same Idris2 ABI, producing the same
561+
type hashes. It carries the proofs in its binary.
562+
563+
\item Two instances of the panel, on different machines, on different
564+
continents, connected by the public internet, exchange GRV6 frames
565+
at Level 4. Full compile-time type safety. Not Level 1, not Level 3.
566+
Level 4. Proven.
567+
568+
\item The internet between them neither knows nor cares. It is TCP
569+
carrying payload bytes. The types are inside the payload, and both
570+
endpoints can trust them because they share the same proofs.
571+
\end{enumerate}
572+
573+
This is how WhatsApp achieved end-to-end encryption without changing
574+
the phone network: encryption at both endpoints, the network in the
575+
middle is a dumb pipe. We are doing the same thing with types: proofs
576+
at both endpoints, the network in the middle is a dumb pipe.
577+
578+
\subsection{The Overlay Network}
579+
580+
Each panel instance is a node. Each GRV6 connection between instances is
581+
an edge. The result is a typed overlay network:
582+
583+
\begin{lstlisting}[caption={The typed overlay}]
584+
Machine A (London) Machine B (Tokyo)
585+
+-----------------+ +-----------------+
586+
| Panel Instance | | Panel Instance |
587+
| (proven, L4) | <-GRV6->| (proven, L4) |
588+
| Idris2 ABI: D | TCP/ | Idris2 ABI: D |
589+
| Type hash: H | IPv6 | Type hash: H |
590+
+-----------------+ +-----------------+
591+
| |
592+
| The Internet |
593+
| (untyped, doesn't care) |
594+
+---------------------------+
595+
\end{lstlisting}
596+
597+
Every node in this overlay is a proven endpoint. Every edge is a Level 4
598+
connection. The overlay grows with every panel installation. No
599+
infrastructure change is needed --- no new routers, no protocol
600+
extensions, no ISP cooperation. Just more panels.
601+
602+
\subsection{Cross-Panel Interoperability}
603+
604+
The overlay is not limited to instances of the \emph{same} panel. Any
605+
two panels that share the same Idris2 ABI root --- the same type
606+
definitions for their common capabilities --- are Level 4 to each other.
607+
608+
A chat panel and a file-sharing panel, compiled from different source
609+
trees but importing the same ABI package for their shared ``text''
610+
capability, exchange text messages at Level 4. They weren't compiled
611+
\emph{together}, but they were compiled against the same \emph{types}.
612+
The proofs compose.
613+
614+
\begin{property}[ABI-Rooted Interoperability]
615+
Two panels $P_1$ and $P_2$ achieve Level 4 type safety for capability $C$
616+
if both import the Idris2 ABI definition of $C$ from the same package
617+
version. They need not share any other code, any other capability, or
618+
any other build infrastructure.
619+
\end{property}
620+
621+
This means the typed overlay is not a closed network. It is open to any
622+
application that imports the published ABI packages. The more
623+
applications that import the standard capability definitions, the larger
624+
the proven overlay becomes. Proliferation is adoption.
625+
626+
\subsection{The Dream, Restored}
627+
628+
The dream of Act I was type safety across the internet. Act II broke it:
629+
you can't prove anything about a stranger's code. Act III restores it
630+
with a restriction: \emph{you can prove everything about code compiled
631+
from the same type definitions}.
632+
633+
This restriction is not onerous. It is the natural outcome of
634+
publishing ABI packages. When a capability's Idris2 ABI is published to
635+
a package registry, every application that imports it becomes a proven
636+
node in the typed overlay. The registry is the root of trust. The
637+
compiler is the proof engine. The internet is the wire.
638+
639+
The dream is not that the internet becomes typed. The internet will
640+
never be typed --- it is infrastructure, and infrastructure is
641+
deliberately dumb. The dream is that a \emph{typed network grows inside
642+
the internet}, one panel at a time, until the untyped gaps are the
643+
exception rather than the rule.
644+
645+
\section{Discussion}
646+
647+
\subsection{Why Honesty First}
648+
649+
This paper deliberately presents the heartbreak before the resolution.
650+
This is not dramatic affectation. It is methodological honesty.
651+
652+
Too many systems papers claim universal properties that hold only in
653+
restricted cases. ``Type-safe distributed communication'' sounds
654+
universal. In reality, it requires both sides to share type definitions.
655+
By presenting the general limitation first (Act II) and the specific
656+
resolution second (Act III), we ensure the reader understands exactly
657+
where the proofs hold and where they don't.
658+
659+
The graduated trust model remains the correct framework for the general
660+
case (communicating with strangers). The typed overlay is the correct
661+
framework for the specific case (communicating with peers who share your
662+
ABI). Both are needed. Neither substitutes for the other.
663+
664+
\subsection{Comparison with Existing Overlay Networks}
665+
666+
\begin{table}[h]
667+
\centering
668+
\small
669+
\begin{tabular}{llll}
670+
\toprule
671+
Overlay & What it preserves & Trust model & Infrastructure \\
672+
\midrule
673+
Tor & Anonymity & Onion routing & Relays \\
674+
BitTorrent & Availability & Hash verification & Trackers/DHT \\
675+
IPFS & Content addressing & CID hashes & DHT \\
676+
Signal Protocol & Confidentiality & Key exchange & Servers \\
677+
\textbf{Typed Overlay} & \textbf{Type safety} & \textbf{Compiled proofs} & \textbf{None} \\
678+
\bottomrule
679+
\end{tabular}
680+
\caption{Overlay networks and what they preserve}
681+
\end{table}
682+
683+
The typed overlay is unique in requiring \emph{no infrastructure}. Tor
684+
needs relays. BitTorrent needs trackers. IPFS needs a DHT. The typed
685+
overlay needs only two endpoints that were compiled from the same ABI.
686+
The internet does the rest.
687+
473688
\subsection{The Path Upward}
474689

475-
The most important property of the graduated trust model is that any
476-
communication channel can be \emph{moved upward} on the spectrum:
690+
The graduated trust model provides an incremental upgrade path:
477691

478692
\begin{enumerate}
479693
\item Start at Level 0 (raw bytes). No cost, no benefit.
@@ -483,33 +697,38 @@ \subsection{The Path Upward}
483697
computation. Benefit: audit trail.
484698
\item Add Groove handshake $\rightarrow$ Level 3. Cost: one-time 5ms
485699
handshake. Benefit: structural verification.
486-
\item Compile both sides from shared Idris2 ABI $\rightarrow$ Level 4.
487-
Cost: build-time investment. Benefit: mathematical proof.
700+
\item Share the ABI package $\rightarrow$ Level 4. Cost: import the
701+
Idris2 ABI. Benefit: mathematical proof, even across the internet.
488702
\end{enumerate}
489703

490-
Each step is incremental. Each step is independently valuable. No step
491-
requires rewriting existing code --- you \emph{wrap} existing traffic in
492-
progressively stronger typed envelopes.
704+
The last step is the key insight of this paper: Level 4 is not restricted
705+
to localhost. It is available to any two endpoints that share ABI
706+
definitions. The internet is not an obstacle to proven type safety. It is
707+
irrelevant to it.
493708

494709
\section{Conclusion}
495710

496-
Type safety is not binary. Between ``proven at compile time'' and
497-
``completely untyped'' there is a useful, practical, and honest spectrum.
498-
IPv6T's GRV6 frame format provides a 105-byte mechanism for declaring,
499-
attesting, and verifying types across the internet, using standard
500-
TCP/IPv6 that passes through every middlebox in existence.
501-
502-
The contribution is not that types cross the internet --- they do, but
503-
as assertions, not proofs. The contribution is the \emph{graduated trust
504-
model}: a continuous spectrum where every communication channel can be
505-
pushed upward, incrementally, with known costs and honest guarantees at
506-
each level.
507-
508-
The world is not untyped. It is typed at the edges and untyped in the
509-
gaps. IPv6T does not close the WAN gap with a proof. It narrows it ---
510-
from ``no information'' to ``declared, attested, and verifiable.'' And
511-
for most of the internet, that is the difference between parsing and
512-
praying, and parsing with confidence.
711+
We began with a dream: type safety across the internet. We broke the
712+
dream with honesty: compile-time proofs don't extend to strangers. We
713+
rebuilt it with an observation: when both sides run software compiled
714+
from the same type definitions, the proofs hold end-to-end regardless
715+
of the network between them.
716+
717+
The internet is a dumb pipe. It carries bytes. It does not care whether
718+
those bytes are typed or untyped, proven or unproven, meaningful or
719+
random. The intelligence is at the endpoints. And when the endpoints
720+
share the same proofs, the pipe between them --- however long, however
721+
hostile, however untyped --- does not matter.
722+
723+
The typed overlay network grows one panel at a time. Every installation
724+
is a new node. Every shared ABI package is a new edge. No infrastructure
725+
change is needed. No ISP cooperation. No protocol extension. No
726+
standards body approval. Just code, compiled with proofs, talking to
727+
other code compiled with the same proofs, through an internet that
728+
faithfully carries what it does not understand.
729+
730+
The world is not untyped. The internet is. And inside the internet, a
731+
typed network is growing.
513732

514733
\bibliographystyle{plain}
515734
\begin{thebibliography}{10}

0 commit comments

Comments
 (0)