Rings: An Algebraic Structured Peer-to-Peer Network for Decentralized Identity and Resource Ownership
Ryan J. Kung is with the Rings Network project (e-mail: [email protected]; ORCID: <a href="https://orcid.org/0009-0000-3026-1111" target="_blank" rel="noreferrer">0009-0000-3026-1111</a>). Manuscript created February 8, 2023; consolidated and empirically evaluated for Rings 1.0 in November 2026. Source code and formal-verification artifacts: https://github.com/RingsNetwork/rings.
Rings is an implemented algebraic structured peer-to-peer network for decentralized identity, resource ownership, transport, storage, privacy, and application protocols. Application servers, DNS authorities, and relay providers in conventional Internet deployments frequently become trusted bottlenecks for naming, routing, and user state. Rings instead models identities and resources as algebraic objects over a CorrectChord circular overlay \(\mathbb{Z}/2^{160}\mathbb{Z}\), pairing browser WebAssembly and native runtimes over WebRTC/SCTP while keeping all cryptographic operations on carriers disjoint from the routing identifier ring. This paper unifies the core algebraic design with six production subsystems implemented in Rings 1.0: range-proved finger convergence, non-transitive WebRTC Chord routing and single-hop bridge delegation, conflict-free replicated data types (CRDTs) with HLC removal stability and Merkle data provenance, crash-durable local stores and age-gated replicated relay custody, cleanest-first slot accounting across shared node tables, and Sphinx/AEZ-v5 onion Kleisli pipelines bridging counterparty-signed service receipts to DRanking 2.0. We evaluate the Rust implementation empirically on real hardware and summarize exhaustive Stateright/BFS verification across \(9,496,521\) reachable finite states (\(9.50\times 10^6\)) and 54 refuted safety mutants. Core object: \(\mathsf{Rings}=(R,\mathcal{R}_N,\mathbf{Set}/R,\Omega_N,\mathsf{T}^{\mathcal{E}}_A,\Pi,\mathbb{G},\mathcal{X})\) with \(R=\mathbb{Z}/2^{160}\mathbb{Z}\), \(\Omega_N(X,H)=(X,\operatorname{owner}_N\circ H)\), and \(\mathsf{CryptoCarrier}\cap R=\varnothing\).
I.Introduction#
Centralized application platforms simplify deployment, but they also concentrate identity, naming, storage, and traffic control at service operators. Cloud and platform centralization therefore becomes a privacy, availability, and autonomy risk for users who need direct communication and durable control over their data [1, 2, 3, 4]. The Rings project is motivated by this observation: a sovereign network should let a participant own an identity, establish a session, route to another identity or resource, and run application protocols without turning a single application server into the root of authority.
Rings is implemented as a network, but this paper is organized around the algebraic structure that makes the implementation coherent. It states the ideal carrier, ownership, transition, durability, admission, and privacy laws that the Rings 1.0 implementation realizes. The older intuition was that Decentralized Identifiers (DIDs) directly form a finite ring suitable for all routing and cryptographic operations. The refined model is more precise: Chord identifiers form an additive circular carrier for placement, interval order, replica selection, and finger targets; threshold schemes, signatures, encryption, wide-block onion encipherment, and zero-knowledge protocols use their own fields or groups.
The resulting design has three practical consequences. First, DIDs and virtual DIDs (VIDs) share the same 160-bit placement surface, so identities, mailboxes, service descriptors, chunks, and application rendezvous points can be routed by one owner function. Second, Rings builds on Chord and CorrectChord rather than replacing the overlay literature: successor lists, multi-predecessor relations, join, rectify, stabilize, range-proved finger convergence, and passive 1-hop gap-bridge delegation are the maintenance substrate on which Rings semantics are layered [1, 5, 6, 7]. Third, state transitions return typed effects instead of directly performing network IO, which allows the overlay, storage, durability, load-accounting, and onion-pipeline state machines to be reasoned about purely, model-checked with Stateright [8], and then interpreted by browser or native runtimes.
II.Problem Statement and Design Goals#
Rings addresses a narrow but recurring gap between existing decentralized systems. Kademlia-derived systems provide scalable lookup, and contemporary frameworks such as Veilid [9] add Rust/WebAssembly node runtimes and private safety routes over Kademlia, yet the XOR metric does not by itself give Rings the circular ownership law needed for successor lists, replicated ownership, and interval-based placement. Relay networks and mixnets improve metadata resistance, but they are not structured P2P ownership systems. Blockchains provide global ordering, but embedding consensus in every message or storage operation would turn Rings into a ledger rather than an algebraic structured peer-to-peer substrate.
The problem is therefore to specify a network object
that simultaneously supports:
self-certifying identity and delegated sessions;
structured lookup, range-proved finger convergence, and non-transitive WebRTC routing;
browser-native and native transport and crash-durable storage surfaces;
CRDT storage with tombstone stability, per-writer cryptographic provenance, and replicated relay custody;
Sybil-resistant slot accounting, credit reclaim, and bounded load under free identities;
Sphinx/AEZ-v5 onion Kleisli pipelines and counterparty-signed service receipts.
This paper makes the following contributions. It presents Rings as an algebraic structured peer-to-peer network, modeling the identifier space as the additive cyclic group \(R=\mathbb{Z}/2^{160}\mathbb{Z}\) and lifting resource placement into \(\mathbf{Set}/R\). It specifies range-proved finger convergence and bounded multi-predecessor non-transitive Chord routing over restricted WebRTC graphs (Section IV). It establishes the removal-stability law, HLC data provenance, factored carrier eviction, and signed lease heartbeats for replicated CRDT storage (Section V). It defines the crash-meaning authority lattice \(C\times M\), presence markers, per-platform crash durability, group commit, link-local replay windows, and age-gated replicated relay custody (Section VI). It proves fair slot accounting across five shared node tables, credit reclaim, and single-charge chunk reassembly under free identities (Section VII). It replaces legacy relay framing with client-sealed Sphinx/AEZ-v5 onion Kleisli pipelines (Section VIII), bridges 1.0 service receipts into the companion DRanking 2.0 protocol [10] (Section IX), and presents empirical micro- and macro-benchmarks together with exhaustive Stateright formal-verification metrics across all Rings 1.0 subsystems (Section X).
III.Algebraic System Model, Threat Model, and Effects#
III-ACarrier, System Scope, and Threat Model#
Clock tolerance \(\sigma\) bounds skew across synchronized honest nodes.
Unified Threat Model
Rings 1.0 operates under four explicit adversarial and fault assumptions across its layers while deliberately scoping out global traffic analysis without cover or majority ring capture:
Link and Network Adversary: A passive observer monitors arbitrary underlay links and WebRTC NAT paths, while an active adversary delays, duplicates, reorders, drops, or replays valid signed control/onion messages on any link it controls. Asynchronous replay and credit exhaustion are defeated at every node boundary by durable/link-local replay windows, generation-tagged credit reclaim, and sliced-Bloom filters.
Colluding Onion Relays: Up to \(H-1\) relays on an \(H\)-hop client loop may be honest-but-curious or actively tag, shrink, or relabel packets without breaking payload confidentiality on any segment whose endpoints are honest. For sender–destination unlinkability, header/payload cryptographic unlinkability on the entry segment requires at least one honest relay in \(\{r_{0,1},r_{0,2}\}\) separating \(\diamond\) from \(h_1\), while resistance to deterministic inter-hop timing correlation across \(r_{0,2}\) additionally assumes non-collusion between guard \(g=r_{0,1}\) and symbol hop \(h_1\) unless cover pacing masks per-hop release delays \(L(f_i)\); Sphinx header MACs, uniform \(205\,\mathrm{B}\) layers, and AEZ v5 wide-block encryption (Section VIII) prevent bitwise correlation and detect single-attempt tagging with probability \(\ge 1-2^{-128}\).
Byzantine Writers and Sybil Rotation: Since minting a DID has zero cost (\(\mathsf{cost}(\mathsf{did})=0\)), an adversary may forge unsigned messages, spawn arbitrarily many DIDs, rotate identities rapidly, or inject stale DHT deltas. Unauthenticated mutations and skewed HLC timestamps are rejected by
DataProvenance; memory/table exhaustion is bounded by cleanest-first connection slot floors (Section VII); and Sybil endorsement inflation is bounded by dual-signedServiceReceipts in DRanking 2.0 (Section IX).Local Storage Crashes: Native file systems and browser IndexedDB backends may crash at arbitrary points between write, rename, and barrier sync;
RecordAuthority(\(C\times M\)) enforces platform-native barriers (F_FULLFSYNC,MOVEFILE_WRITE_THROUGH,fsync, or strict IndexedDB) and witnessed presence markers (Section VI).Out of Scope: Rings 1.0 does not prevent end-to-end timing correlation by a global passive adversary observing both a client's guard link and its world exit when real-time interactive latency prohibits heavy cover padding, does not defend against \(>50\%\) Sybil capture of the global overlay without DRanking 2.0 admission filtering, and trusts local client execution hosts/kernels.
Note that \((a,a]_R=\varnothing\) since \(\delta_a(a)=0\), so self-ownership is handled prior to interval tests.
Each live node maps to a unique identifier in \(N\subset R\) (hence \(\operatorname{owner}_N(k)\) and \(\operatorname{pred}_N(n)\) have unique minimizers); bootstrap singletons (\(|N|=1\)) resolve \(\operatorname{owner}_N(k)=n\) trivially.
Storage redundancy uses affine rotations of the entry key (\(\rho=6\) by default for data topics). Successor lists remain the CorrectChord safety root for topology maintenance.
Table 1 summarizes how Rings 1.0 assigns each protocol object to its disjoint algebraic carrier and cryptographic domain separator.
| Object | Carrier or law |
|---|---|
| Chord IDs | additive cyclic group \(R=\mathbb{Z}/2^{160}\mathbb{Z}\) |
| DID / Session | verifier over rings-delegation-v1 |
| VID placement | \(H_\nu:X_\nu\to R\) then owner map \(\Omega_N\) |
| Storage merge | factored CRDT semilattice \(\mathsf{E}(x)\sqcup\mathsf{R}(x)\) |
| Data provenance | Merkle batch rings-core: data-entry: mutation |
| Lease descriptors | rings-node:{online-node, service, mail}-descriptor, |
rings-turn:service-descriptor | |
| Store authority | crash \(\times\) meaning lattice \(C\times M\) |
| Load accounting | slot floor \(f_T\) + fair pool \(\mathcal{P}_T\) over \(\mathcal{R}\) slots |
| Onion pipeline | Kleisli category \(\mathbf{Kl}(M)\) with Sphinx + AEZ v5 |
| Service receipts | rings-core: service-receipt: provisional |
\(\to\) DRanking rings-service-receipt-v1 | |
| Effects | writer monad \(\mathsf{T}^{\mathcal{E}}_A\) over action lists |
III-BArchitecture as Interfaces#
Rings 1.0 factors its architecture into six composable interfaces (Figure 1), separating identity authentication, transport signaling, overlay ownership, and capability-confined execution.
checked at each authenticated hop via \(\mathsf{HopCheck}(d,s,e)\equiv\operatorname{Session}(d,s,e)\).
Figures 2 and 3 contrast standard multi-round-trip trickle-ICE negotiation against Rings' 1-RTT overlay SDP/ICE signaling exchange (which front-loads candidate gathering into one Offer/Answer DHT exchange prior to direct-path ICE connectivity checks and DTLS/SCTP setup).
Figure 4 illustrates how the browser host FFI enforces capability check \(\mathsf{cap}\) between network/timer events and pure core steps.
Capability checks apply atomically per step\((S,i)\) transition on the host FFI boundary (aborting state commit and rejecting host IO if any emitted action falls outside \(\mathsf{cap}\)).
III-CCategory and Effect Monad#
We summarize namespace placement and pure effect emission using lightweight slice-category and writer-monad notation as a uniform interface vocabulary for the pure transition reducers verified in Section X, rather than relying on deep categorical machinery in later protocol proofs.
indexing DID, VID, Mailbox, Hidden Service, User/Relay, Queue/Quota, and World-Exit namespaces.
\(\operatorname{owner}_N\circ H_\mu\circ f = \operatorname{owner}_N\circ H_\nu\).
\(((\alpha\cdot\beta)\cdot\gamma) = (\alpha\cdot(\beta\cdot\gamma))\).
Here \(\mathcal{E}\) captures hard transition aborts (discarding emitted actions via \(\pi_A(e)=\epsilon\)), whereas recoverable failures emit \(\mathsf{RecoverableReport}\in A\) along the normal \((X\times A^*)\) branch. For \((\sigma_S\times\sigma_O):S_\nu\times O_\nu\to S_\mu\times O_\mu\), \(\mathsf{T}^{\sigma_{\mathcal{E}}}_{\sigma_A}(g)=\sigma_{\mathcal{E}}+(g\times\sigma_A^*)\).
A protocol morphism \(\Sigma:\mathcal{P}_\nu\to\mathcal{P}_\mu=(\sigma_X,\sigma_S,\sigma_I,\sigma_O,\sigma_{\mathcal{E}},\sigma_A^*)\) satisfies \(H_\mu\circ\sigma_X=H_\nu\) and \(\mathsf{T}_{\sigma_A}^{\sigma_{\mathcal{E}}}(\sigma_S\times\sigma_O)\circ\tau_\nu=\tau_\mu\circ(\sigma_S\times\sigma_I)\).
IV.Chord Implementation — PeerRing and Overlay Routing#
IV-ABase Chord and CorrectChord Maintenance#
This section fixes Chord as the base lookup protocol and CorrectChord as the
ring-safety maintenance law [1, 6] (Figures 5 and 6), then extends the
pure overlay state machine (PeerRing) with range-proved finger convergence and
non-transitive WebRTC routing.
where \(p_n\in N\cup\{\bot\}\), \(L_n\in N^{\leq r}\), \(F_n:[0,L)\to N\cup\{\bot\}\) (with \(F_n(i)\in\{\bot,\operatorname{finger}_i(n)\}\) upon convergence), and \(E_n\subseteq E\).
- 1function BeginJoin(\(n, known\))
- 2\(pred[n]\gets none\); \(a\gets \mathit{FindSuccessor}(n.did)\)
- 3Return \(Remote(known, a)\)
- 4function InstallSuccessor(\(n, s\))
- 5\(succ[n]\gets take(r, [s])\)
- 6Return \(Remote(s, QuerySuccList(s))\)
- 7function InstallSuccList(\(n, s, list\))
- 8\(succ[n]\gets take(r, s :: list)\)
- 9if \(head(succ[n]) \neq none\) then
- 10\(h\gets head(succ[n])\)
- 11Return \(Multi(Notify(h, n.did),\) \(SyncStorage(h))\)
- 12else
- 13Return \(Noop\)
- 1function Lookup(\(key, n\))
- 2if \(key = n.did\) then
- 3Return \(Local(n)\)
- 4\(s\gets head(succ[n])\)
- 5if \(s = none\) then
- 6Return \(Repair(QuerySuccList(n))\)
- 7if \(key \in (n.did, s]\) then
- 8Return \(Local(s)\)// Delegated by Law 5 (B2) on bridged gaps
- 9\(next\gets \mathit{closest\_preceding\_node}(n, key)\)// Searches \(F_n\cup L_n\)
- 10if \(next = none\) then
- 11Return \(Repair(QuerySuccList(s))\)
- 12else
- 13Return \(Remote(next, \mathit{FindSuccessor}(key))\)
- 1procedure Stabilize(\(n, topo\))
- 2\(actions\gets []\); \(c\gets topo.pred\); \(s\gets head(succ[n])\)
- 3if \(c \neq none\) and \(c \in (n.did, s)\) then
- 4\(succ[n]\gets insert(succ[n], c)\)
- 5\(actions\gets actions :: FindSuccessor(c)\)
- 6\(succ[n]\gets take(r, merge(succ[n], topo.succ))\)
- 7if \(head(succ[n]) \neq none\) then
- 8\(h\gets head(succ[n])\)
- 9\(actions\gets actions :: Notify(h, n.did)\)
- 10Return \(Multi(actions)\)
Invariant 2 guarantees exact owner resolution and \(O(\log |V|)\)-hop lookup [1, 5, 6] on a steady, finger-converged ring \(\mathsf{Steady}(N)\). Under transient churn or before finger convergence completes, some fingers remain sparse or stale; payload delivery then preserves loop-free correctness within \(\le 2|V|\) hops via bridge-delegated delivery (Theorem 1).
IV-BRange-Proved Finger Convergence#
Classical Chord refreshes one random finger slot per stabilization period,
requiring \(\Theta(m)\) periods (\(m=160\)) to converge and failing to distinguish
unverified neighbor hints from proved entries [5]. Because
Rings nodes span browser and WAN peers whose asynchronous NAT-traversing WebRTC
handshakes are orders of magnitude costlier than local memory transitions,
rings-core (dht::finger::convergence) specifies finger maintenance as
a pure transition \(\mathrm{step}:(S,\mathrm{Event})\to(S,\mathrm{Actions})\)
built on the Chord Range Lemma and four operational disciplines.
With half-open interval \([x,y)_R=\{z\in R:0\le\delta_x(z)<\delta_x(y)\}\) (\([x,x)_R=\varnothing\)), for any nonempty live membership view \(V\subseteq R\) and target \(x\in R\),
Specifically, for node \(n\in V\) and slot \(i\in[0,L)\) (\(L\le 160\)) with target \(t_i=n+2^i\), let \(s=\operatorname{succ}_V(t_i)\) and \(d=\delta_n(s)\). If \(s=n\), then \(\operatorname{succ}_V(t_j)=n\) for all \(j\in[i,L)\); otherwise \(2^i\le d\) and
By definition, \(\operatorname{succ}_V(t_i)=s\) implies \(s\in V\) and \([t_i,s)_R\cap V=\varnothing\). If \(s=n\), every \(t_j\) with \(i\le j<L\) lies in \([t_i,n)_R\) (since \(2^i\le 2^j < 2^{160}\)), so \([t_j,n)_R\cap V=\varnothing\) and \(\operatorname{succ}_V(t_j)=n\). Otherwise \(2^i\le d\), and for every \(j\ge i\) with \(2^j\le d\) we have \(t_j\in[t_i,s]_R\), so \([t_j,s)_R\subseteq[t_i,s)_R\) is empty in \(V\) and \(\operatorname{succ}_V(t_j)=s\).
A lookup for slot \(i\) answered by \(s\) yields a range proof \(\pi=(i,\mathrm{id},e_\pi,s,\operatorname{end})\), where \(\mathrm{id}\) is the lookup UUID [12], \(e_\pi\) is the evidence epoch at issue, and
Proof \(\pi\) covers the contiguous slot interval \([i,\operatorname{end}]\).
If the true successor values partition the \(L\) slots into \(m_{\mathrm{runs}}\) maximal runs of equal successor, a complete convergence pass requires at most \(m_{\mathrm{runs}}\le\min(L,|V|)\) routed lookups; under uniform identifier placement, \(\mathbb{E}[m_{\mathrm{runs}}]=O(\log |V|)\).
Each answered lookup for slot \(i\) yields \(\pi=(i,\mathrm{id},e_\pi,s,\operatorname{end})\) covering the maximal run \([i,\operatorname{end}]\) of identical successor \(s\) by Lemma 1, advancing cursor \(c\gets\operatorname{end}+1\) past the entire run. Because there are at most \(L\) slots and each distinct successor begins at most one maximal run before wrapping past \(n\), \(m_{\mathrm{runs}}\le\min(L,|V|)\). Under uniform random placement of \(|V|\) DIDs on \(R=\mathbb{Z}/2^{160}\mathbb{Z}\), expected inter-node spacing is \(2^{160}/|V|\), so slots with \(2^j\lesssim 2^{160}/|V|\) share \(\operatorname{head}(n)\) while only the top \(O(\log |V|)\) slots span distinct sub-intervals, giving \(\mathbb{E}[m_{\mathrm{runs}}]=O(\log |V|)\).
Let \(h=\operatorname{head}(n)\) be the first clockwise successor of \(n\). When \(n\) receives an authenticated stabilization report from \(h\) echoing \(n\)'s active stabilization token and stating \(\operatorname{pred}(h)=n\), then
Applying local confirmation sets \(\mathsf{ver}_j\gets\top\) for all \(j\le\min(L-1,\lfloor\log_2\delta_n(h)\rfloor)\) with zero routed network lookups; if an active attempt's slot lies in that range, it is superseded via \(\textsc{Progress}(\min(L-1,\lfloor\log_2\delta_n(h)\rfloor))\).
Because \(h\) is \(n\)'s live successor head and \(h\) itself attests on \(n\)'s fresh stabilization correlation token that \(\operatorname{pred}(h)=n\), the half-open arc \((n,h)_R\) contains no member of \(V\) observable between \(n\) and \(h\). For every finger index \(j\ge 0\) with \(2^j\le\delta_n(h)\), the finger target \(t_j=n+2^j\) lies in \((n,h]_R\), so \([t_j,h)_R\subseteq(n,h)_R\) is empty in \(V\) and \(\operatorname{succ}_V(t_j)=h\) by Lemma 1. Setting \(\mathsf{ver}_j\gets\top\) for \(0\le j\le\min(L-1,\lfloor\log_2\delta_n(h)\rfloor)\) therefore proves the prefix interval using only the existing stabilization RPC (\(\textsc{Progress}\) avoids issuing any FindSuccessor lookup for those slots).
Each node \(n\) maintains an evidence state \((e_n,(\mathsf{chg}_j,\mathsf{ver}_j)_{j<L})\), where \(e_n\in\mathbb{N}\) is the node's monotone topology epoch [13], \(\mathsf{chg}_j\in\mathbb{N}\) is the epoch at which hint \(\mathsf{hint}_j\) last changed, and \(\mathsf{ver}_j\in\{\bot,\top\}\) records whether slot \(j\) holds a range-proved peer.
Hint change: For any unverified topology/hint transition \(H\to H'\) with changed slots \(C=\{j:H_j\neq H'_j\}\neq\varnothing\), advance \(e\gets e+1\) and set \((\mathsf{chg}_j,\mathsf{ver}_j)\gets(e,\bot)\) for all \(j\in C\).
Slot-wise admission: Proof \(\pi=(i,\mathrm{id},e_\pi,s,\operatorname{end})\) admits slot set \(A(\pi)=\{j\in[i,\operatorname{end}]:\mathsf{chg}_j\le e_\pi\}\). If \(A(\pi)=\varnothing\), \(\pi\) is rejected as \(\mathsf{Stale}\); otherwise, for every \(j\in A(\pi)\), \(\mathsf{hint}_j\gets(s=n\ ?\ \bot : s)\) and \(\mathsf{ver}_j\gets\top\).
Discontinuity: Losing the last successor increments \(e\gets e+1\), clears \(\mathsf{ver}_j\gets\bot\) for all \(j\), and returns the attempt owner to \(\mathsf{Idle}\).
At most one finger lookup attempt \(\alpha\) exists at node \(n\):
where \(\mathsf{AwR}(u,p,t)\equiv\mathsf{AwR}((u,p),e_\pi,\tau_r)\) awaits a lookup report for slot \(p\) and request UUID \(u\) issued at evidence epoch \(e_\pi\) before monotonic deadline \(t=\tau_r=\mathrm{issued}+T_r\) (\(T_r=10\,\mathrm{s}\)), and \(\mathsf{AwA}(u,p,y,e,t)\equiv\mathsf{AwA}(\pi,\tau_a)\) awaits WebRTC transport admission of proved peer \(y\) at epoch \(e\) before lease deadline \(t=\tau_a=\mathrm{deferred}+T_a\) (\(T_h=180\,\mathrm{s}\), \(T_a=T_h+30\,\mathrm{s}=210\,\mathrm{s}\)).
A report \((u',p',y')\) consumes \(\alpha\) iff either \(\alpha=\mathsf{AwR}(u,p,t)\land(u',p')=(u,p)\) or \(\alpha=\mathsf{AwA}(u,p,y,e,t)\land(u',p',y')=(u,p,y)\); all other reports are dropped as \(\mathsf{Stale}\) without mutating state or failure streak \(k\in[0,255]\). With cursor \(c\in\mathbb{N}\) and retry cooldown deadline \(\nu\in\mathbb{N}_\bot\) (an attempt may start from \(\mathsf{Idle}\) only when \(\nu=\bot\) or \(\mathrm{now}\ge\nu\)), consuming reports and timeout expirations (\(\mathrm{now}\ge\tau_r\) or \(\mathrm{now}\ge\tau_a\)) transition \((\alpha,c,k,\nu)\) via [14]:
where \(\textsc{Fail}(p)\) handles expired or empty lookup attempts (\(\mathsf{AwR}\)), \(\textsc{Retire}(\operatorname{end})\) handles admission refusal/expiry (\(\mathsf{AwA}\)), \(\textsc{Progress}(\operatorname{end})\) records admitted range confirmation, \(\operatorname{run}(p)=\max\{j\in[p,L):\forall l\in[p,j],\,\mathsf{hint}_l=\mathsf{hint}_p\}\) when \(\mathsf{hint}_p\neq\bot\) and \(\operatorname{run}(p)=p\) when \(\mathsf{hint}_p=\bot\), and \(f(k)=\min(2^{\min(k,6)}\,\mathrm{s},\,60\,\mathrm{s})\) with minimum issue spacing \(T_{\min}=1\,\mathrm{s}\). (Under Law 1(3), losing the last successor clears \(\alpha\gets\mathsf{Idle}\) and preserves monotonic backoff pacing until a head is restored.)
next_fix_slot)).#With \(h=\operatorname{head}(n)\) and first routable slot \(r=\lfloor\log_2\delta_n(h)\rfloor+1\) (\(r=0\) if \(h=\bot\)), let \(c\in\mathbb{N}\) be the cyclic cursor, \(A=\{j\ge\max(c,r):\neg\mathsf{ver}_j\}\), and \(B=\{j\in[r,\max(c,r)):\neg\mathsf{ver}_j\}\). The selector is
Let \(\mathcal{U}\) be the set of maximal contiguous populated equal-hint runs and individual unpopulated (\(\bot\)) or unretired slots among routable entries remaining unverified across attempts. Between any two selections in \(\mathcal{U}\), every other element of \(\mathcal{U}\) is selected at least once, and periodic revalidation reopens proved ranges whenever \(\alpha=\mathsf{Idle}\land(\neg\exists j\ge r:\neg\mathsf{ver}_j\ \lor\ k>0)\).
Every completed or failed attempt at slot \(j\) advances \(c\) strictly past \(j\) (\(\operatorname{end}+1>j\) or \(\operatorname{run}(j)+1>j\)). Because \(\operatorname{sel}(c)\) scans cyclically from \(c\), it visits \(U\) in strict cyclic index order, preventing a single unreachable NAT peer from monopolizing the single attempt owner.
Stabilization and successor-list synchronization reports are correlated by
two-phase claim tokens \(\mathsf{tok}=(h,\mathrm{id},\phi)\) with
\(\phi\in\{\mathsf{Req},\mathsf{Proc}\}\). A report claims its token atomically
by moving \(\mathsf{Req}\to\mathsf{Proc}\), dials at most \(K+1\) distinct
candidates for stabilization (and at most \(K\) for successor sync) re-checking
\(\phi=\mathsf{Proc}\) before each dial, and clears \(\mathsf{tok}\) on completion
or on any \(\mathsf{SuccessorHeadChanged}\) transition (ReportFloor).
IV-CNon-Transitive WebRTC Overlay and Bridge-Delegated Delivery#
In browser and native WebRTC deployments, symmetric NATs, enterprise firewalls, and disjoint LANs violate underlay transitivity [7, 15]: if node \(a\) links to \(b\) and \(b\) links to \(c\), \(a\) may still fail ICE negotiation with \(c\). Figure 7 illustrates two full-mesh WebRTC cliques \(V_1=\{A,B,C\}\) and \(V_2=\{C,D,E\}\) joined at an articulation (bridge) node \(C(50)\) with interleaved ring order \(A(10)\prec B(30)\prec E(40)\prec C(50)\prec D(80)\).
Rather than injecting unstructured neighborhood gossip or virtual fingers [16, 17] (which would violate the direct-link invariant \(\operatorname{Referenced}(S_n)\subseteq\operatorname{Admitted}(n)\)), Rings resolves non-transitive WebRTC routing with zero extra control frames via four mechanisms:
Each node \(n\in V\) maintains
where \(\operatorname{Preds}_K(n)=\langle p_1,\dots,p_m\rangle\) (\(m\le K\), supporting capacity \(K=4\)) is ordered by descending clockwise distance \(\delta_n(p_1)>\dots>\delta_n(p_m)\) (ascending counter-clockwise distance \(\delta_{p_i}(n)\)), with primary predecessor \(\texttt{pred}_n=p_1\), \(\Phi_n\) denoting the finger-convergence evidence/attempt state (Definitions 16–18), and \(\Pi_n\) denoting the report-claim and dial-backoff state (Laws 3–4). All referenced peers satisfy
Empty-confirmed commit: When \(r=\operatorname{head}(n)\) remains routable (\(\operatorname{Routable}(n,r)\)), \(n\) commits \(\texttt{Stabilize}(r)\) and emits \(\texttt{Notify}(r)\) even if confirmation filtering leaves \(\texttt{confirmed}\) empty.
Candidate dial backoff (
DialBackoff): Failed or expired candidate handshakes enter a bounded negative cache \(\mathcal{B}_n\) (\(B_{\max}=64\)) with exponential cooldown \(\beta(f)=\min(\beta_0\cdot 2^{\min(f-1,4)},\,\beta_{\max})\) (base \(\beta_0=5\,\mathrm{s}\), cap \(\beta_{\max}=60\,\mathrm{s}\), configurable to \(30\)–\(300\,\mathrm{s}\)), suppressing redundant SDP offers while clearing \(\mathcal{B}_n(c)\) immediately on explicit connects or admission.Supersede-on-Closer, Retain-on-Sub-Ring (
rectify_preds): Given geometrically admissible non-self candidate \(c\in R\setminus\{n\}\) (\(c\) passes peer identity verification and is reachable or actively notified) and primary predecessor \(p_1\): if \(p_1=\bot\) or \(\delta_n(c)>\delta_n(p_1)\) (\(c\) is strictly closer to \(n\)), \(\operatorname{Preds}_K(n)\gets\langle c\rangle\); if \(\delta_n(c)\le\delta_n(p_1)\) (notification from a farther sub-clique predecessor), insert \(c\) into \(\operatorname{Preds}_K(n)\) in descending \(\delta_n(\cdot)\) order, deduplicate, and truncate to \(K\).
On any transitive ring, once \(\operatorname{pred}_V(n)\) notifies \(n\) and stale prior entries expire or depart, \(\operatorname{Preds}_K(n)\) collapses to the singleton global predecessor \([\operatorname{pred}_V(n)]\). At an articulation node \(C\) joining \(m\le K\) internally stabilized cliques \(V_1,\dots,V_m\), \(\operatorname{Preds}_K(C)\) retains all \(m\) sub-clique predecessors \(p_i=\operatorname{pred}_{V_i}(C)\) within two stabilization rounds (round 1 installs \(p_1\) at the head, and round 2 retains all farther \(p_i\) without interim eviction), protecting every bridge link \((p_i,C)\) and allowing each \(p_i\) to filter \(\texttt{reported.preds}\) to \(\texttt{confirmed.pred}=\operatorname{Some}(p_i)\) and prove its local sub-clique finger range \([0,\min(L-1,\lfloor\log_2\delta_{p_i}(C)\rfloor)]\) over \(V_i\) via Lemma 2.
In a transitive ring, the true global predecessor \(\operatorname{pred}_V(n)\) has strictly maximal clockwise distance \(\delta_n(\operatorname{pred}_V(n))\) among all \(p\neq n\); once \(\operatorname{pred}_V(n)\) stabilizes and sends Notify, Law 4(3) satisfies \(\delta_n(\operatorname{pred}_V(n))>\delta_n(p_1)\) for any prior \(p_1\) and collapses \(\operatorname{Preds}_K(n)\) to \([\operatorname{pred}_V(n)]\) (with unreachable stale predecessors removed by transport eviction). At an articulation bridge \(C\) linking \(m\le K\) internally stabilized cliques \(V_1,\dots,V_m\), let \(p_1=\operatorname{pred}_{V_{\text{near}}}(C)\) denote the global primary predecessor of \(C\) (closest counter-clockwise across \(\bigcup_i V_i\)). Each sub-clique predecessor \(p_i=\operatorname{pred}_{V_i}(C)\) satisfies \(\delta_C(p_i)\le\delta_C(p_1)\), so once \(p_1\) occupies index \(0\) in round 1, every other \(p_i\)'s Notify falls into the sub-ring retention branch of rectify_preds rather than superseding \(p_1\). Since there are \(m\le K\) distinct sub-clique predecessors and rectify_preds retains the \(K\) largest \(\delta_C(\cdot)\) values, all \(\{p_1,\dots,p_m\}\) persist inside \(\operatorname{Preds}_K(C)\subseteq\operatorname{Referenced}(S_C)\) within two stabilization rounds, pinning their WebRTC links and enabling each \(p_i\) to filter reported.preds for itself and apply Lemma 2 over its routable sub-clique \(V_i\) on \([0,\min(L-1,\lfloor\log_2\delta_{p_i}(C)\rfloor)]\) (resolving cross-clique keys in \((p_i,p_1]_R\) via Law 5).
Whenever \(n\) processes an authenticated TopoInfo report from
\(r\in\texttt{succ}_n\), the unconfirmed peers \(U(n,r)=(\operatorname{set}(\texttt{reported.preds})\cup\operatorname{set}(\texttt{reported.succ}))\setminus\{p:\rho_n(p)\}\)—where \(\rho_n(p)\equiv (p\in\operatorname{Referenced}(S_n)\cup\{n\})\)—update the zero-TTL partial map \(\texttt{bridged}_n:\mathsf{Did}\rightharpoonup\mathsf{Did}\) (\(|\texttt{bridged}_n|\le 2K^2\), with \(p\mapsto r\) iff \(r\in\operatorname{Referenced}(S_n)\land p\notin\operatorname{Referenced}(S_n)\)).
Payload delivery carries \(\sigma\in\operatorname{RouteStage}=\operatorname{aim}(\mathsf{Did}_{\bot})\times\mathsf{bridged}(\mathbb{B})\) (fields \((\texttt{via},\texttt{handed\_off})\) with \(\operatorname{aim}(\sigma,T)=\texttt{via}.\operatorname{unwrap\_or}(T)\); here \(\texttt{via}=\operatorname{Some}(b)\) is fixed only at origination by a predecessor-less node via reply_via for FindSuccessorReport replies and is delivered directly once \(b\) is reached without mid-route mutation):
Rule B1 (Bridged Delivery on Local Minimum in
delivery_step): Node \(n\) first delivers directly if \(\operatorname{Linked}_n(T)\) (or to \(a=\operatorname{aim}(\sigma,T)\) if \(a\neq T\land\operatorname{Linked}_n(a)\)), and otherwise runs greedy clockwise forwarding (route_toward) over linked referenced peers \(\operatorname{Referenced}(S_n)\cap\operatorname{Linked}(n)\) along \((n,a]_R\). Only when greedy hits a local minimum (\(\operatorname{Handoff}(h)\)) with \(\neg\sigma.\texttt{handed\_off}\), if \(\texttt{bridged}_n(a)=\operatorname{Some}(b)\) satisfies \(b\neq n\land\operatorname{Linked}_n(b)\land\neg\operatorname{Linked}_n(a)\), \(n\) delegates to \((b,\sigma)\) when \(\delta_n(b)<\delta_n(a)\) and to \((b,(\sigma.\texttt{via},\top))\) otherwise; if no bridged hint applies, it falls back to \((h,(\sigma.\texttt{via},\top))\). When \(\operatorname{Handoff}(h)\) occurs with \(\sigma.\texttt{handed\_off}=\top\),delivery_stepreturns \(\bot\) (terminating the route acyclically).Rule B2 (Gap-Bridge Lookup Delegation in
lookup_successor): When DHT key resolutionfind_successor(\(k\)) would otherwise terminate with local head \(h\notin\{k,n\}\) (\(k\neq n\)) across an unlinked gap, if \(\exists(p\mapsto b)\in\texttt{bridged}_n\) with \(b\in\operatorname{Referenced}(S_n)\), \(p\notin\operatorname{Referenced}(S_n)\), \(\operatorname{Linked}_n(b)\), and \(\delta_n(k)\le\delta_n(p)<\delta_n(h)\), node \(n\) delegatesFindSuccessorSend(\(k\)) via the bridge \(b^*\) minimizing \(\delta_n(p)\).
Without source-routing hop lists on the wire, \(\operatorname{delivery\_step}\)
over \(\operatorname{RouteStage}=\operatorname{aim}(\mathsf{Did}_{\bot})\times\mathsf{bridged}(\mathbb{B})\)
preserves all four route-safety invariants on any underlay graph \(G=(V,L)\):
(1) Linked (\(\{n_k,n_{k+1}\}\in L\)),
(2) NeverOvershoots (\(\delta_{n_k}(n_{k+1})<\delta_{n_k}(\operatorname{aim})\) on every non-crossing hop),
(3) SingleCrossing and Acyclic (the boolean crossing bit transitions \(\bot\to\top\) at most once, visiting no state \((n_k,\sigma_k)\) twice and bounding every route to \(\le 2|V|\) hops), and
(4) all-pairs cross-clique delivery in \(\le 3\) hops (\(2\) hops from a clique local minimum or bridge-adjacent peer, \(3\) hops when greedy advances through a closer clique mate first) between two cliques \(V_1,V_2\) sharing bridge \(C\) whenever \((V_1\cup V_2)\setminus\{C\}\subseteq\texttt{succ}_C\cup\operatorname{Preds}_K(C)\) (supporting up to \(s+m\) total non-bridge peers under minimal \(m\)-clique notifications, or up to \(s+K=2K=8\), i.e. \(C_{\mathrm{sub}}\le 4\), when \(\operatorname{Preds}_K(C)\) holds \(K\) entries; larger or multi-bridge cliques establish direct WebRTC links seamlessly via Rings' DHT-discovered stateless cryptographic UDP/TCP TURN and multi-hop onion::udp Onion TURN in rings-turn-service).
Because \(0<\delta_{n_k}(n_{k+1})<\delta_{n_k}(a)\iff \delta_{n_{k+1}}(a)=\delta_{n_k}(a)-\delta_{n_k}(n_{k+1})<\delta_{n_k}(a)\) on \(R=\mathbb{Z}/2^{160}\mathbb{Z}\), Invariant (2) implies \(\delta_{n_k}(\operatorname{aim}(\sigma,T))\in\mathbb{N}\) strictly decreases across every non-crossing greedy hop within each fixed stage \(\sigma\), visiting at most \(|V|-1\) nodes.
At any local minimum `Handoff(h)`, \(\operatorname{Referenced}(S_n)\cap\operatorname{Linked}(n)\) contains no node in \((n,a]_R\), so any linked bridge \(b\) satisfies \(\delta_n(b)>\delta_n(a)\) and both the wrapping branch of Rule B1 and fallback handoff flip \(\texttt{handed\_off}:\bot\to\top\) (while \(\sigma.\texttt{via}\) never mutates mid-route, changing to \(\bot\) only upon reaching \(a=\operatorname{via}\) where \(b\) delivers directly to \(T\)); since `Handoff` with \(\texttt{handed\_off}=\top\) returns \(\bot\), at most one ring-wrap or gap-bridge crossing occurs per route, yielding \(\le 2|V|\) hops total. In a
two-clique graph \(V_1\cup V_2\) sharing bridge \(C\), whenever \(C\)'s succ\(_C\) and \(\operatorname{Preds}_K(C)\) cover \((V_1\cup V_2)\setminus\{C\}\) (up to \(s+2=6\) combined non-bridge peers under minimal two-predecessor stabilization via Lemma 3, or up to \(s+K=8\) peers when \(\operatorname{Preds}_K(C)\) holds \(K=4\) entries), every \(u\in V_i\setminus\{C\}\) learns \(\texttt{bridged}_u(v)=\operatorname{Some}(C)\) for \(v\in V_j\setminus\{C\}\) from \(C\)'s TopoInfo. Within full-mesh clique \(V_i\), greedy forwarding takes at most one intra-clique hop \(u\to w\) to the local minimum relative to \(v\) (\(0\) hops if \(u\) itself is the local minimum or \(C\) is greedy-closest in \((u,v]_R\)), whereupon Rule B1 delegates \(w\to C\) and \(C\) delivers directly \(C\to v\) in at most \(3\) hops total.
V.CRDT Storage and Removal Stability#
V-ADID, VID, and Replicated Entry Algebra#
decided relative to pivot \(C\) via Algorithm 4.
- 1function BiasedCompare(\(A,B,C\))
- 2\(a\gets \delta_C(A)\); \(b\gets \delta_C(B)\)
- 3if \(a < b\) then Return \(A <_C B\)
- 4else if \(a > b\) then Return \(B <_C A\)
- 5else Return \(A = B\)
where \((E_v,\sqsubseteq,\sqcup,\bot)\) is a join-semilattice [18] (\(x\sqcup y=y\sqcup x\), \((x\sqcup y)\sqcup z=x\sqcup(y\sqcup z)\), \(x\sqcup x=x\), \(x\sqcup\bot=x\)), and placement satisfies
V-BCarrier State, HLC Timestamps, and Cryptographic Data Provenance#
A Rings data-topic carrier (dht::entry) is a 4-tuple
where \(V:\mathrm{Bytes}\times R\rightharpoonup\mathrm{Dot}\) maps live elements and their writer DIDs (dots plus multi-writer co_dots) to addition dots, \(D:\mathrm{Digest}\times R\rightharpoonup\mathrm{Dot}\) maps Keccak-256 element digests \(h(v)\) and writer DIDs \(o\in R\) to per-author removal dots (tombstones; unscoped \(D:\mathrm{Digest}\rightharpoonup\mathrm{Dot}\) is used only on single-recipient RelayMessage carriers), \(\rho:R\rightharpoonup\mathrm{Ver}\) maps each writer DID to its reset floor register (register plus co_registers), and \(\beta\in\mathbb{N}_\bot\) is the carrier liveness bound (joining by \(\max\) with \(\bot<t\)). Each version or dot \(d\) carries a Hybrid Logical Clock (HLC) timestamp [19]
ordered lexicographically by wall-clock time \(w=\tau(d)\), logical counter
\(c\in\mathbb{N}\), and writer/origin DID \(o\in R\). On EntryKind::Data, a removal \(((e,o),r)\in D\)
covers an addition \(((v,o'),d)\in V\) iff \(o=o'\land h(v)=e\land d\le r\), and reset floor \(\rho(o)\) covers only additions/removals authored by \(o\) with \(d\le\rho(o)\) (preserving strict non-interference across distinct writers \(o\neq o'\)). A carrier \(x\)
is normalized iff no addition in \(V\) is covered by \(D\) or \(\rho\), and
no removal in \(D\) is covered by \(\rho\). The delta-state join \(x\sqcup y\) [20, 21] is pointwise \(\max\)
followed by normalization.
DataProvenance)).#Every element addition (Append / Reset, i.e., Extend) and removal
tombstone (Retract, i.e., Tombstone) carries a per-writer cryptographic
provenance proof \(\pi_{\mathrm{prov}}\in\mathsf{DataProvenance}\) signed over the
canonical domain separator \(\mathtt{rings\text{-}core:data\text{-}entry:mutation}\)
and a Merkle batch claim \((\mathsf{did},\mathsf{kind},\mathsf{ver},\mathrm{leaf\_count},r_{\mathrm{merkle}})\):
where \(\mathsf{op}\in\{\mathsf{Reset},\mathsf{Append},\mathsf{Retract}\}\), \(k_{\mathrm{topic}}\in R\) is the placement key, \(r_{\mathrm{merkle}}\) commits to the batch of element digests \(e=h(v)\), and \(o=D(k_o)\) matches the HLC origin DID. Unauthenticated deltas or wall-clock timestamps exceeding local clock \(t+\sigma\) are rejected at admission.
V-CRemoval Stability Horizon, Factored Carrier, and Tombstone Bounds#
For data topics (EntryKind::Data), writes request default retention
\(\mathtt{DEFAULT\_TTL\_MS}=600\,\mathrm{s}\) up to element horizon
\(H=\mathtt{MAX\_TTL\_MS}=6\,000\,\mathrm{s}\) (\(6\cdot 10^6\,\mathrm{ms}\)) under
tight clock-skew tolerance \(\sigma=\mathtt{TS\_OFFSET\_TOLERANCE\_MS}=3\,\mathrm{s}\)
(whereas offline relay-inbox mail permits \(\mathtt{DEFAULT\_RELAY\_INBOX\_TTL\_MS}=86\,400\,\mathrm{s}\)
up to \(\mathtt{MAX\_RELAY\_INBOX\_TTL\_MS}=7\,\mathrm{d}\) bounded by signed hold instant).
A removal \((e,r)\) (or floor \(\rho\)) is stable at clock \(t\) iff
The retirement projection \(\operatorname{retire}_t(x)\) drops additions with \(t\ge\tau(d)+H\) and removals/registers with \(t\ge\tau(r)+H+\sigma\). Because the horizon \(H\) is uniform and \(d\le r\implies\tau(d)\le\tau(r)\), \(\operatorname{retire}_t\) never leaves a live addition covered by a retired removal and is a join-semilattice homomorphism satisfying \(\operatorname{retire}_t\circ\operatorname{retire}_s=\operatorname{retire}_{\max(s,t)}\) (distinct from the carrier-level expiry predicate \(\mathrm{retired\_at}(x,t)\), which empties surviving additions once \(t\ge\beta\) if \(\beta\neq\bot\)).
If \((e,r)\) is stable at the clock \(t_p\) of some node \(p\), then every addition \((v,d)\) covered by \((e,r)\) is already retired at the clock \(t_q\) of every node \(q\) at the same instant (\(t_q\ge t_p-\sigma\ge\tau(r)+H\ge\tau(d)+H\)).
Since removal \((e,r)\) covers addition \((v,d)\), Definition 24 gives \(d\le r\) in lexicographic HLC order, hence \(\tau(d)\le\tau(r)\). By clock-skew admissibility, any two synchronized honest clocks \(t_p,t_q\) at the same physical instant differ by at most \(\sigma\), so \(t_q\ge t_p-\sigma\). Combining stability at \(p\) (\(t_p\ge\tau(r)+H+\sigma\)) yields \(t_q\ge\tau(r)+H\ge\tau(d)+H\), so \(\operatorname{retire}_{t_q}\) removes \((v,d)\) on every read, join, or sync at \(q\).
An unstable remove or register leaves a holder's replica only by (i) \(\operatorname{retire}_t\) at stability, (ii) an ack-gated range handoff whose receiver holds it, or (iii) a platform loss event—never by storage eviction, cap, or truncation. To enforce this, every normalized carrier \(x\) factors into an element side and a remove side:
\(\mathsf{E}(x)\) is stored in the data store at authority \((\mathsf{Cch},\mathsf{Reb})\),
whereas \(\mathsf{R}(x)\) is persisted in the dedicated removal store
(dht-removals) at \((\mathsf{Dur},\mathsf{Ret})\) (RecordAuthority::Retained).
Byte-budget eviction maps \(x\mapsto\mathsf{R}(x)\) (dropping only \(\mathsf{E}(x)\)),
\(\mathrm{put}(k,x)\) flushes \(\mathsf{R}(x)\) before writing \(\mathsf{E}(x)\), and
reads project \(\mathrm{get}_t(k)=\operatorname{retire}_t(\mathsf{E}_k\sqcup\mathsf{R}_k)\).
Under Law 7, if holder \(p\) holds \((e,r)\) at \(t_0\) and experiences no loss event before \(\tau(r)+H+\sigma\), then across any sequence of joins, evictions, and crashes, no read at \(p\) after \(t_0\) ever serves an addition covered by \((e,r)\).
Before stability (\(t<\tau(r)+H+\sigma\)), Law 7 keeps \(D_p(e)\ge r\) in the durable removal store across evictions and crashes, so \(\mathrm{get}_t(k)=\operatorname{retire}_t(\mathsf{E}_k\sqcup\mathsf{R}_k)\) normalizes away any covered addition. At and after stability, Lemma 4 guarantees that every covered addition has \(t\ge\tau(d)+H\) and is stripped by \(\operatorname{retire}_t\).
Lemma 4 and Theorem 2 rely on bounded physical clock skew \(|t_p-t_q|\le\sigma=3\,\mathrm{s}\) across synchronized honest holders. When a browser device wakes from sleep with wall-clock drift exceeding \(\sigma\), Law 6 temporarily rejects skewed writes until OS/NTP time resynchronizes, prioritizing strict no-resurrection safety over skewed liveness. Without read fencing, a pure wall-clock projection \(t_q\mapsto\operatorname{retire}_{t_q}(c[k])\) at a waking node \(q\) whose wall clock lags a synchronized peer \(p\) by more than \(\sigma\) (\(t_q<t_p-\sigma\)) would fail to retire and transiently surface an unretired addition \((v,d)\) whose covering tombstone \((e,r)\) has already reached stability and been garbage-collected at \(p\). Fencing local reads against a combined monotonic and Byzantine-safe admitted-HLC lower bound (\(\tau-\sigma\le t_{\mathrm{admit}}\) under Law 6) prevents backward wall-clock jumps and awake clock stalls from resurrecting retired additions; if OS/browser suspension pauses both wall and monotonic clocks prior to NTP resynchronization, no single untrusted peer can safely advance \(q\)'s read floor past \(t_q\) without risking premature-retirement DoS, so read fencing complements rather than replaces OS/NTP clock resynchronization.
Storage Tombstone Full)).#Each data carrier is bounded by \(T_{\max}=D_{\max}=\mathtt{ENTRY\_DATA\_MAX\_LEN}=1024\)
removes. Any peer delta \(\delta\) with \(|D_\delta|>T_{\max}\) is inadmissible,
and any operation or join whose retired result \(y=\operatorname{retire}_t(x\sqcup\delta)\)
has \(|D_y|>T_{\max}\) is refused with \(\mathsf{Err}(\mathsf{Exhausted})\)
(Storage Tombstone Full), leaving the stored carrier unchanged. Every
admitted carrier encodes in at most \(W=w_0+D_{\max}(P_{\max}+\lambda+w_D)+T_{\max}w_T+w_\rho=33\,731\,696\,\text{B}\) (\(w_0=47\), \(P_{\max}=32\,768\), \(\lambda=3\), \(w_D=69\), \(w_T=101\), \(w_\rho=65\,\text{B}\); \(33.73\,\text{MB}\le \tfrac{3}{4}\mathtt{TRANSPORT\_MAX\_SIZE} =45\,\text{MB}\le 60\,\text{MB}\)), and any admissible sync delta simulates a sequence of \(\le 2|D_\delta|+|V_\delta|+1\) writer operations.
V-DFetch Cache Linearization and Signed Lease Heartbeats#
The local fetch cache \(c:K\rightharpoonup X\) is a \((\mathsf{Vol},\mathsf{Reb})\) mirror whose mutations (\(\mathrm{put},\mathrm{obs},\mathrm{evict}\)) execute atomically under the cache lock while reads are pure projections \(t\mapsto\operatorname{retire}_t(c[k])\) that perform zero store writes or deletions. Consequently, every cache transition linearizes [22] at its store put and every read at its store get, eliminating concurrent read-retire lost-update races.
LeaseHeartbeat)).#To eliminate the \(120\) tombstones per hour per service (\(3\,600\,\mathrm{s}/I\)) and \(O(N_{\mathrm{reg}}\cdot\mathrm{churn})\) read-modify-write overhead generated
when registrants overwrite timestamped descriptors every \(I=30\,\mathrm{s}\),
a registrant signs a fixed lease descriptor \(d\) under the unified SignedDescriptor
domain family (rings-node:{online-node, service, mail}-descriptor and
rings-turn:service-descriptor) binding its
identity, process epoch, capabilities, freshness window \(T=90\,\mathrm{s}\), and
lease expiration \(\ell=t+\Lambda\) (\(\Lambda=10\,\mathrm{min}\)). Each heartbeat at
clock \(t\) emits only \(\mathrm{Extend}([d])\) (writing zero tombstones and
performing zero registry reads), rotating \(d\mapsto d'\) only when \(t+2I\ge\ell\)
or capabilities change. Readers at clock \(t\) accept the verified descriptor of
greatest \(\ell\) satisfying \(\ell\le t+\Lambda+\sigma\), \(T\le\Lambda\), \(t\le\ell\),
and \(t\le\tau^*(d)+T+\sigma\).
VI.Durable Local Stores and Replicated Custody#
VI-AAuthority Lattice, Presence Markers, and Platform Crash Durability#
A Rings node persists replay windows, onion entry guards, removal records, and
relay mail across native file systems and browser IndexedDB backends. We unify
their presence and crash-survival guarantees via a product authority lattice
(RecordAuthority) [23].
The crash chain \(C=\mathsf{Vol}\sqsubset\mathsf{Cch}\sqsubset\mathsf{Dur}\) and meaning chain \(M=\mathsf{Reb}\sqsubset\mathsf{Ret}\sqsubset\mathsf{Aut}\) form the componentwise lattice \(C\times M\) with monotone obligation map \(O(c,m)=O(c)\cup O(m)\):
By the Admissibility Law, a store may open at \((c,m)\) only if \(c\sqsupseteq\operatorname{req}(m)\), where \(\operatorname{req}(\mathsf{Reb})=\mathsf{Vol}\) and \(\operatorname{req}(\mathsf{Ret})=\operatorname{req}(\mathsf{Aut})=\mathsf{Dur}\). Table 2 details the authority levels assigned across Rings 1.0 local stores.
| Local Store | Auth. \((c,m)\) | Discharged Obligations |
|---|---|---|
| DHT Data Store | \((\mathsf{Cch},\mathsf{Reb})\) | Disposable / rebuildable |
| Fetch Cache / Measure | \((\mathsf{Vol},\mathsf{Reb})\) | Pure-read mirror |
| Onion Entry Guards | \((\mathsf{Dur},\mathsf{Reb})\) | A, D (DurableCache) |
| CRDT Removal Store | \((\mathsf{Dur},\mathsf{Ret})\) | A, D, N (Retained) |
| Relay Custody Carriers | \((\mathsf{Dur},\mathsf{Ret})\) | A, D, N (\(r\)-repl. on \(\mathsf{Dur}^\circ\)) |
| Transaction Replay | \((\mathsf{Dur},\mathsf{Aut})\) | A, D, N, W, F (Authoritative) |
.p) and Per-Platform Crash Durability).#Presence markers (
.p): In an authoritative native store, each record \(n=\mathrm{hex}(\mathrm{SHA1}(k))\) (used strictly as a fixed-width local filesystem key over canonical internal storage keys; SHA-256 is a drop-in substitute if untrusted external keys are exposed) has an empty witness marker \(n.\mathtt{p}\) created and directory-synced only after \(n.\mathtt{tmp}\to n\) is flushed and directory-synced. On deletion, removing \(n.\mathtt{p}\) is followed by a parent-directory sync barrier before unlinking \(n\) and syncing the directory again, preserving \(P\subseteq R\) across arbitrary OS crash points. At restore (open), unmarked data records \(n\in R\setminus P\) are repaired in place by re-creating \(n.\mathtt{p}\), whereas any \(n\in P\setminus R\) is classified as \(\mathsf{Missing}(n)\) and fails stream \(n\) closed (discharging W for every partial loss \(\lambda_{\mathrm{part}}\), whereas total directory loss \(\lambda_{\mathrm{tot}}\) leaves \(P=R=\varnothing\) and serves as the documented operator reset).macOS / iOS: File data and directory entries are flushed via \(\mathtt{fcntl}(\mathtt{F\_FULLFSYNC})\) [24].
Windows: Temporary file data flushes via
FlushFileBuffersand directory mutations execute viaMoveFileExWusing theMOVEFILE_REPLACE_EXISTINGandMOVEFILE_WRITE_THROUGHflags [25].Linux / Unix: Data files flush via \(\mathtt{fsync}\) followed by parent directory \(\mathtt{fsync}\) after atomic rename [23].
Browsers (IndexedDB): Read-write transactions at \(\mathsf{Dur}\) open with explicit \(\{\mathit{durability}:\text{``\texttt{strict}''}\}\) (forcing OS buffer flush / SQLite
EXTRAor full WAL checkpoint across Chromium, Gecko, and WebKit [26, 27, 28, 29, 30]) combined with \(\mathtt{navigator.storage.persist()}\) [31]. Because browsers delete origin storage whole (\(P=\varnothing\)) and ephemeral contexts can only claim durability (\(\mathsf{Dur}^\circ\)), node-local stores open at \((\mathsf{Dur}^\circ,m)\) with session end as \(\lambda_{\mathrm{tot}}\), while custody of other nodes' mail requires \(r\ge 2\) replicated holders.
VI-BGroup Commit and Link-Local Volatile Replay Windows#
put*)).#Replay transitions \(t_1<t_2<\dots\) execute in lock order on speculative tables
\(\hat{T}\) with undo log entries \(u_i\) and coalesce into batches \(B_j\) whose distinct
write-set \(W_j\) is committed by
a single \(\mathrm{put}^*(W_j)\) (with concurrent readers isolated from uncommitted \(\hat{T}\) until commit):
on native targets, all \(n.\mathtt{tmp}\) files are
pushed before a single drive-cache barrier (\(\mathtt{F\_FULLFSYNC}\)), renamed,
and directory-synced once, after which Authoritative batches run witness_batch to create missing \(n.\mathtt{p}\) markers and perform a final directory sync;
on IndexedDB, all puts share one strict
read-write transaction. Callers are released only after \(\mathrm{put}^*(W_j)=\mathsf{Ok}\)
(latency \(\le 2\phi\)); on \(\mathsf{Err}\), \(\hat{T}\) rolls back via \(u_i\) to the
last durable state \(T\).
Direct neighbor control traffic (Join|Sync|Leave|Send) and application
namespaces registered in \(D_r\) as delegating replay (such as Sphinx onion cells,
which enforce at-most-once admission in their own Bloom filter \(R_i\) and process
epoch \(e_i\)) are classified by \(\mathrm{ll}(t,c)\) on authenticated connection
\(c\) of live generation \(g\) and admitted against an in-memory per-generation
window \(\mathcal{W}_{s,g}\) instead of the durable store \(\mathcal{W}_s\).
This eliminates durable disk flushes on the onion/control hot path while
preserving per-generation duplicate/fork detection and cross-restart replay
immunity.
VI-CReceiver Custody Set and Age-Gated Replicated Relay Custody#
To prevent relay mail admitted into \(\mathcal{W}_s\) from being lost if the node restarts before the application consumes it from the volatile inbox, the receiver record of stream \(s\) co-persists \((\mathcal{W}_s,\mathcal{K}_s)\) atomically in a single \((\mathsf{Dur},\mathsf{Aut})\) record, where \(\mathcal{K}_s\subseteq\mathbb{N}\times\mathrm{Digest}\times\mathbb{N}\) holds admitted but untaken deliveries \((q,h,x)\) with spent horizon \(x=\mathit{ts}+\mathit{ttl}+H_I+2\epsilon\) (for clock-skew safety margin \(\epsilon>0\) and \(|\bigcup_s\mathcal{K}_s|\le\mathtt{RELAY\_INBOX\_MAX\_LEN}=64\)).
Custody drain and release: On drain after \(\mathrm{put}^*\), an element \((s,q,h)\) already in \(\mathcal{K}_s\) is requeued without re-checking \(\mathcal{W}_s\); a new element commits \((\mathcal{W}'_s,\mathcal{K}_s\cup\{(q,h,x)\})\) before queueing; and the carrier tombstone/Ack is issued only after the application takes the message and commits \((\mathcal{W}_s,\mathcal{K}_s\setminus\{(q,h,x)\})\). By information-theoretic indistinguishability, no bounded-window receiver can safely admit un-custodied mail that has fallen behind live traffic (\(q<\operatorname{rmin}(\mathcal{W}_s)\), where \(\operatorname{rmin}(\mathcal{W}_s)\) is the lowest sequence tracked by \(\mathcal{W}_s\)).
Age-gated replicated custody ( MATH0 ): Because browser holders operate at claimed durability \(\mathsf{Dur}^\circ\) and experience high churn [32], a node advertises relay custody only after surviving an online age gate \(A_{\min}\) (\(\mathtt{DEFAULT\_RELAY\_AGE\_GATE\_MS}=2\,\mathrm{min}\) floored at \(\ge 4\) stabilization periods, and \(A_{\min}=30\,\mathrm{min}\) in production relay profiles). Each mail key \(k\) is replicated across a chain \(\mathcal{M}_r(k)\) of the first \(r\) age-gated holders clockwise from \(\operatorname{owner}_N(k)\) (\(r=4\) to \(\mathtt{DEFAULT\_RELAY\_INBOX\_REPLICAS}=8\)).
Chain replication and digest repair: Holders forward head-to-tail along \(\mathcal{M}_r(k)\) (digest first, payload on miss) and acknowledge tail-to-head only after all \(q(k)\le r\) members persist the element. Adjacent chain members probe liveness every \(P_c=2.5\,\mathrm{s}\) (suspect after \(\tau_c=7.5\,\mathrm{s}\)) and repair via bundled carrier digest-set comparison on membership change or periodic pass, restoring \(r\) copies within \(D\le T_d+r\delta\) (where \(T_d=P_c+\tau_c=10\,\mathrm{s}\) is worst-case silent failure detection and \(\delta\) is per-hop repair transfer time).
VII.Fair Admission, Slot Accounting, and Load Bounds#
VII-ACleanest-First Slot Roster and Fair Slot Accounting#
Because a Rings DID is a free public-key digest, any node-wide table keyed solely by origin DID can be exhausted by one adversary minting thousands of identities. Rings anchors resource accounting to the authenticated transport connection slot.
SlotRoster)).#A node's connection registry holds at most
active neighbour edges, where \(F=160\) is the finger table size and \(s\) is the
successor capacity (\(\mathcal{R}(4)=330\) at \(s=4\); \(\mathcal{R}(3)=328\) at \(s=3\)).
The SlotRoster indexes slots \(\kappa\in\{0,\dots,\mathcal{R}(s)-1\}\), tracking
per-slot metadata \((\mathit{epoch},\mathit{strikes},\mathit{last\_seen\_ms})\)
and live floor utilization across shared tables \(T\):
When a new edge \(e\) is admitted, it is assigned the cleanest free slot \(\kappa(e)=\arg\min_{\kappa\in F_t}w_t(\kappa)\) (ties broken by least index), and charges in table \(T\) remain bound to \(\kappa\) until they expire by \(T\)'s own horizon law.
Every shared table \(T\) is parameterized by a per-slot guaranteed floor \(f_T\), a shared overflow pool \(\mathcal{P}_T\), a local share \(L_T\) for principal \(\lambda\), and dedicated shares \(S_d\) for \(d\in D_T\), yielding the hard node-wide bound
With slot usage \(\operatorname{use}_\kappa\), pool overflow \(o_\kappa=\max(0,\operatorname{use}_\kappa-f_T)\), and active claimant set \(\mathcal{A}(t)=\{\kappa:o_\kappa>0\text{ or }\kappa\text{ has a queued/pending overflow request}\}\) of size \(n(\mathcal{A}(t))=|\mathcal{A}(t)|\ge 1\) (waiting claimants persist in \(\mathcal{A}(t)\) until served or withdrawn), an item introduced by slot \(\kappa\) is admitted iff either:
\(\operatorname{use}_\kappa<f_T\) (within the slot's guaranteed floor), or
\(\sum_{\kappa'}o_{\kappa'}<\mathcal{P}_T\) and \(o_\kappa<\bigl\lceil\mathcal{P}_T / n(\mathcal{A}(t))\bigr\rceil\) (within the slot's fair pool claim).
Across all five shared node tables—(1) Application Inbox / Mailbox Ledger (\(S_\mu\)-bounded), (2) Relay Store (\(S_\mu\)-bounded), (3) CRDT Removal Store (\(f=128\), \(\mathcal{P}=16\,384\), \(L=7\,168\), \(S_{\mathrm{custody}}=16\,384\), yielding \(B_{\mathrm{rem}}(4)=82\,176\) items at default \(s=4\); \(81\,920\) at \(s=3\)), (4) Transaction Replay Table (\(B_{\mathrm{rep}}(4)=15\,680\le 16\,384\)) and per-lane Origin Quota (\(f=1\), \(\mathcal{P}=2\,048\), \(L=1\,056\), \(S_{\mathrm{inbox}}=640\), yielding \(B_{\mathrm{orig}}(4)=4\,074\le 4\,096\)), and (5) Chunk Reassembly Buffer \(O\)—Law 15 and Definition 28 guarantee:
\(|T|\le B_T(s)\) in all reachable states;
any edge holding slot \(\kappa\) with \(\operatorname{use}_\kappa<f_T\) is never refused, regardless of how many origins, edges, or slots other parties control;
an over-floor slot is guaranteed at least \(f_T+\lfloor\mathcal{P}_T/\mathcal{R}(s)\rfloor\) items as prior claimants expire;
under cleanest-first assignment (
SlotRoster), an adversary rotating Sybil connections cannot degrade a newcomer's floor with a single departure-and-rejoin (unlike least-free-index selection), multiplying the single-attacker floor-pollution threshold by \(\mathcal{R}(s)-c\) (\(300\times\) at \(\mathcal{R}(4)=330, c=30\)) distinct admissions within one horizon \(h\) (while sustained high-rate Sybil flooding past \(\mathcal{R}(s)-c\) relies on connection rate limiting or DRanking 2.0 admission filtering; Section IX).
Items (1)–(3) follow because floor checks read \(\operatorname{use}_\kappa\) alone, departures never erase slot charges, and with \(n\le\mathcal{R}(s)\) active claimants, any slot below \(\lfloor\mathcal{P}_T/\mathcal{R}(s)\rfloor\) satisfies \(o_\kappa<\lceil\mathcal{P}_T/n\rceil\) and can refill once draining items drop overflow below \(\mathcal{P}_T\). Item (4) holds because a free slot with \(w_t(\kappa)=0\) is always selected before any partially charged slot \(\kappa'\) with \(w_t(\kappa')>0\).
VII-BReplay Stream Eviction and Credit Reclaim#
A receiver replay stream \(s\) with maximum admitted transaction expiry \(x_s=\max(\mathit{ts}+\mathit{ttl})\) is spent at clock \(t\) once \(t\ge x_s+\iota+\sigma\) (for default control/storage/E2E traffic, the spent horizon is \(H_{\text{spent}}=600\,\mathrm{s}\); for offline-capable application streams, \(\iota=H_I+\sigma\) where \(H_I=7\,\mathrm{d}\)). Because transactions past \(x_s+\iota+\sigma\) are rejected by envelope TTL and relay hold-horizon checks prior to replay lookup, spent streams holding no custody \(\mathcal{K}_s\) are lazily evicted without reopening replay. With \(f=32\), \(\mathcal{P}=3\,328\), \(L=1\,024\), and inbox share \(S_\mu=768\), no honest slot can be permanently locked out.
Credit/Shrink/Returned) and Hard Frame Bound).#Each edge has four lanes \(\ell\) (one priority control lane with floor \(g_{\mathrm{prio}}=W=16\), and three data lanes with floor \(g_\ell=1\) and cap \(W=16\)). To bound total in-flight and buffered frames node-wide without dropping frames, credit frames carry a lane generation \(g\) tracking receiver-consumed frames \(R_{\mathrm{rx}}\) and sender-committed frames \(c_{\mathrm{tx}}\):
\(\mathsf{Credit}(A,g)\): receiver grants limit \(A\) in generation \(g\);
\(\mathsf{Shrink}(L',g)\): receiver reclaims unused pooled credit on an idle (\(T_{\mathrm{idle}}=1\,\mathrm{s}\)) or over-share lane down to \(L'=\min(R_{\mathrm{rx}}+g_\ell,A)\);
\(\mathsf{Returned}(B,g)\): sender commits at most \(B=\max(c_{\mathrm{tx}},L')\) frames and ignores older generations.
With frame pool \(\mathcal{P}_F=256\) frames (\(16\,\mathrm{MiB}\)), where \(c(s)=\mathcal{R}(s)(W+3)\) sums per-slot guaranteed floors across the four lanes and \(W_{\text{shrink}}=\mathcal{P}_F\) reserves reclaimed pooled credits until \(\mathsf{Returned}(B,g)\) clears, total node frame liability satisfies the hard bound
(\(6\,488\) frames at \(s=3\); \(6\,526\) at \(s=4\)), with zero honest frame drops and guaranteed per-edge pooled throughput \(\ge\min(3(W-1),\lfloor\mathcal{P}_F/n\rfloor)\).
VII-CSingle-Charge Chunk Reassembly and Per-Category Barrier#
A chunked message \([0,n)\) of chunk size \(d_0\) reserves its full footprint
\(m=2n d_0\) once on its first chunk in both the mailbox ledger and the open-message
table \(O\) (\(f_O=256\,\mathrm{KiB}\), \(\mathcal{P}_O=128\,\mathrm{MiB}\),
\(B_O(s)=\mathcal{R}(s)f_O+\mathcal{P}_O\), i.e. \(210.5\,\mathrm{MiB}\le 256\,\mathrm{MiB}\) at \(s=4\)), waiting in ResourceOrderedQueue
order (\(O((g+k+r)\log n)\) per event, where \(g\) is granted requests, \(k\) displaced waiters moved to another blocker, and \(r\) named resources) and moving into dispatch at completion
without re-charging. To prevent slowloris reservation pinning without penalizing
receiver-throttled links, the receiver tracks credit-time \(\hat{\tau}\) for the active
head-of-line message on lane \(\ell\),
which advances over \([t_k,t_{k+1})\) by \(\min(t_{k+1}-t_k,\,c_k d_0/r_{\mathrm{floor}})\) only
while the sender holds \(c_k=A-N>0\) unused credits. Messages must maintain a
streaming rate floor (\(r_{\mathrm{floor}}\in[r_{\min},10\,\mathrm{B/ms}]\) with \(r_{\min}=1\,024\,\mathrm{B/s}\))
with grace window \(G=15\,\mathrm{s}\) (up to \((W+1)d_0/r_{\mathrm{floor}}+\Delta\), where \(\Delta\) bounds link/RTT slack), expiring
attributably if received bytes fall below \(b<r_{\mathrm{floor}}\hat{\tau}-W d_0\).
Control | Interactive | Bulk)).#Inbound dispatch maintains independent ordering barriers per traffic category \(\kappa\in\{\mathsf{Control},\mathsf{Interactive},\mathsf{Bulk}\}\) (mapped to protocol lanes \(\{\mathit{ctl},\mathit{sto},\mathit{e2e},\mathit{app}\}\)): a frame \(f\) of category \(\kappa\) waits only behind unfinished reassembly events \(u\in U\) with \(\mathit{seq}(u)<\mathit{seq}(f)\land\kappa(u)=\kappa\). This guarantees exact sequence order within every category (including chunked control frames) while preventing bulk data reassembly from blocking control or interactive lanes.
VIII.Privacy Layer — Cryptographic Carriers and Sphinx Onion Kleisli Pipeline#
VIII-ASeparate Cryptographic Carriers#
End-to-end encryption (ElGamal \((g^k, m\cdot h^k)\) on prime-order group \(\mathbb{G}\neq R\)) and Shamir threshold secret sharing over \(\mathbb{F}_q[X]\) [33] operate strictly off the routing carrier:
Here \(m_f\) is the canonical serialization of \((sid,seq,last,cipher)\), and payloads exceeding link \(d_0\) are sliced deterministically into \(total=\lceil|data|/d_0\rceil\) indexed chunks carried inside authenticated frames before reassembly.
VIII-BOperation Signature and Kleisli Pipeline Composition#
Rings 1.0 replaces legacy relay framing with the Sphinx Onion Kleisli
Pipeline (rings-node::onion), generalizing onion circuits from
simple exit tunnels to client-sealed loops over a static operation signature
\(\Sigma\) composed in the Kleisli category \(\mathbf{Kl}(M)\) [34, 35, 36, 37, 38, 39, 40].
The static shape signature is
containing \(1+3+120=124\) rows, where \(\Sigma_W=\{\mathsf{tcp},\mathsf{https},\mathsf{udp}\}\) is the set of world-facing exit stream symbols, \(\Sigma_{\mathsf{invoke}}=\{\mathsf{invoke}\langle\mathrm{In},\mathrm{Out},L\rangle:\mathrm{In}\in\{0\}\cup\mathcal{W},\,\mathrm{Out}\in\mathcal{W},\,L\in\mathcal{L}\}\) has fixed output width \(W(f)=\mathrm{Out}\) across discrete width classes \(\mathcal{W}=\{32,64,256,1024,16384\}\,\mathrm{B}\) and latency classes \(\mathcal{L}=\{10,100,500,2000\}\,\mathrm{ms}\), and open invoke backends \(\omega\in\Omega\) (\(|\omega|\le 32\)) include:
dht.find_successor, dht.notify, dht.sync,
storage.lookup, storage.store, service.lookup,
service.register, direct.message.Each node \(n\) publishes signed registrations \(\mathrm{Reg}_n\subseteq\{\mathsf{relay}\}\cup\Sigma_W\cup(\Sigma_{\mathsf{invoke}}\times\Omega)\) (via rings-node:onion-{exit,invoke}-descriptor) carrying its 128-bit process epoch \(e_n\) and quota \(\operatorname{quota}(n,f,\omega)\), acting as a partial \(\Sigma\)-algebra with generic effect [38, 41]
A pipeline \(P=(f_1,\bar{a}_1)\mathbin{\ggg}\cdots\mathbin{\ggg}(f_n,\bar{a}_n)\) is a well-formed morphism of the free category \(\mathcal{F}(G_\Sigma)\) iff \(1\le n\le n_{\max}=4\), \(\mathrm{Out}_{f_k}=\mathrm{In}_{f_{k+1}}\) for all \(k<n\), intermediate symbols satisfy \(\mathsf{Intermediate}\in\operatorname{pos}(f_k)\), and world-facing stream symbols (\(\mathsf{tcp},\mathsf{https},\mathsf{udp}\)) appear only at \(n=1\). Placed on nodes \(h_1,\dots,h_n\), \(P\) denotes the Kleisli composite in \(\mathbf{Kl}(M)\):
satisfying Law L1 (Identity): \([\![\mathsf{relay}]\!]=\eta\) and \(\operatorname{Loop}(\mathsf{relay}\mathbin{\ggg}P)\overset{d}{=}\operatorname{Loop}(P)\) via normal-form \(\operatorname{nf}\) reduction, and Law L2 (Associativity): \((f\mathbin{\ggg}g)\mathbin{\ggg}h=f\mathbin{\ggg}(g\mathbin{\ggg}h)\).
VIII-CClient-Sealed Loops, Uniform Sphinx Header, and AEZ v5 Carry#
For client \(\diamond\), entry guard \(g\), and \(n\in[1,4]\) symbol hops \(h_1,\dots,h_n\), each segment \(k\in[0,n]\) inserts \(s=2\) relays \(r_{k,1},r_{k,2}\) (the minimal \(s\) such that no node is adjacent to both \(\diamond\) and a symbol hop):
with total hops \(H(n,s)=(s+1)n+s\le\hat{H}=14\) (\(H\in\{5,8,11,14\}\)) and \(H-1\) distinct peer DIDs (Law L7: Guard Closure). Route selection draws \(h_1,\dots,h_n\) first, then guard \(g\), then remaining relays \(r_{k,j}\) using a bipartite-matching Hall filter \(\mathcal{F}(\pi,p)\) (retaining candidates at position \(p\) for partial placement \(\pi\) only if extending \(\pi\) admits a complete system of distinct mutually routable representatives across the remaining \(\{1,\dots,H\}\) role slots) so that if the first draw succeeds, no subsequent draw can fail, and exit marginals over the Hall-admissible exit candidate set \(N_{h_1}\) equal exact quality weights \(q(d)/q(N_{h_1})\).
Every hop \(i\in[1,H]\) across all roles (HopRole::Transit | Terminal | GuardReturn)
peels an identical 205-byte layer
from a fixed-length Sphinx header [34] \(\chi_i=\alpha_i\Vert\beta_i\Vert\gamma_i\) with blinded SEC1 group element \(|\alpha_i|=33\,\mathrm{B}\), padded routing block \(|\beta_i|=\hat{H}\ell=14\times 205=2870\,\mathrm{B}\), and MAC \(|\gamma_i|=16\,\mathrm{B}\) (\(|\chi_i|=2919\,\mathrm{B}\)), where \(x=\lceil t_{\mathrm{build}}/Q\rceil Q+X_0\) (\(Q=30\,\mathrm{s}\), \(X_0=120\,\mathrm{s}\), \(V=150\,\mathrm{s}\)) and \(\kappa_i=(\sigma_{\mathrm{in}},\sigma_{\mathrm{out}})\in\{0,1\}^{256}\times\{0,1\}^{256}\) partitions the 64-byte carry field into a 32-byte inbound carry seed \(\sigma_{\mathrm{in}}\) and a 32-byte outbound segment seed \(\sigma_{\mathrm{out}}\) (filled with uniform dummy bytes at pure transit relays). Each loop selects a cell bucket class \(b\in[16\,\mathrm{KiB},12\,\mathrm{MiB}]\) with uniform carry slot width \(C_b=b-2919\,\mathrm{B}\) (\(C_{16\,\mathrm{KiB}}=13\,465\,\mathrm{B}\), \(82\%\) payload efficiency, Law L3) and deterministic release time \(t^{\mathrm{dep}}_i=t^{\mathrm{arr}}_i+L(f_i)\) (Law L4).
OnionBodyCipher)).#For each segment \(k\), the client draws a 32-byte seed \(\sigma_k\) (delivered as \(\sigma_{\mathrm{out}}\) to symbol producer \(p_k=h_k\) for intermediate segments \(k\ge 1\)) and derives 48-byte AEZ v5 keys [36, 42] \(k_{r_{k,j}}\) and \(k_{c_k}\) via HKDF-SHA256. Producer \(p_k\) applies one authenticated wide-block encipherment \(\mathrm{E}^{\tau}_{k_{c_k}}\) (\(\tau=16\) zero-byte authenticator) over canonical serialization \(\operatorname{enc}(v_k)\) followed by \(s=2\) length-preserving wide-block encipherments \(\mathrm{E}^0_{k_{r_{k,j}}}\) (\(\tau=0\)):
VIII-DSURB Batching, Cover Loops, Replay Admission, and Security Laws#
SURB batching: A Single-Use Reply Block for world-facing session \(\varsigma\) is the \(2\,979\)-byte (\(20+2\,919+32+8=2\,979\,\mathrm{B}\)) client-sealed suffix \(\upsilon=(\mathrm{next},\chi_\upsilon,\sigma_\upsilon, x_\upsilon)\) [43, 44]. After deducting the \(16\,\mathrm{B}\) AEZ authenticator (\(C_0=C_{16\,\mathrm{KiB}}-16=13\,449\,\mathrm{B}\)) and \(6\,\mathrm{B}\) credit-frame overhead, a \(16\,\mathrm{KiB}\) credit loop leaves \(13\,443\,\mathrm{B}\) for SURBs—batching \(k=\lfloor 13\,443/2979\rfloor=4\) SURBs plus its own suffix (\(k+1=5\) reply credits per forward loop, \(Q_{\max}=256\))—whereas a \(7\,\mathrm{B}\)-framed stream data cell carries up to \(C_0-7=13\,442\,\mathrm{B}\) of application payload.
Dormant-by-default constant-rate cover loops: Outbound onion lanes open in dormant mode (
open_dormant, emitting zero unsolicited cover cells on non-participating DHT links) and wake automatically when real onion cells arrive or depart. Across active bursts and their bounded dwell window \([t,t+D)\) (\(D=Q=30\,\mathrm{s}\)), links emit at constant rate \(r=\rho B/V\approx 98.3\,\mathrm{units/s}\) (\(\rho=0.9\), substituting cover cells when no real cell is queued), parking at zero idle overhead outside active dwell windows by default (OnionIdleFloor::OFF, with optional configurable background cover up to \(r_{\mathrm{idle}}=1\,\mathrm{unit/s}\) viaOnionIdleFloor::DEFAULT). This yields an analytical single-link paced emission ceiling of \(98.3\times 13\,442\,\mathrm{B}\approx 1.32\,\mathrm{MB/s}\) at \(b=16\,\mathrm{KiB}\) (sustaining \(1.045\pm 0.003\,\mathrm{MB/s}\) end-to-end across a 5-node live WebRTC loopback, above the \(1.00\,\mathrm{MB/s}\) CI throughput floor; Section X).SlotRoster-backed sliced-Bloom replay admission (Law L9): Every received cell is charged \(u(b)=b/16\,\mathrm{KiB}\) units against the sender DID's ledger \(\Lambda_i(d)\) (\(|\operatorname{dom}\Lambda_i|\le 2\mathcal{R}\), per-sender budget \(B=16\,384\) units, global budget \(G=64B\) over \(V/Q=5\) quanta) before SEC1 decoding and ECDH. Valid tags \(\nu_i\) are recorded in expiry-quantized sliced Bloom filters [45, 46] \(R_i[x]\), structured as a scalable chain of \(76\,960\,\mathrm{B}\) blocks (\(K=26\) slices of \(M=23\,680\) bits, sealing \(B=16\,384\) tags per block up to \(64\) global blocks) queried via process-secret-keyed \(\mathrm{Keccak\text{-}256}(\kappa\Vert\nu_i\Vert j)\) probes (per-block false-positive rate \(\le 2^{-26}\), union FP \(\le 2^{-20}\), max memory \(\approx 4.70\,\mathrm{MiB}\) at 64 blocks), ensuring every AEZ key is used at most once across restarts and clock rollbacks.
Under the Gap-DDH assumption over secp256k1 in the Random Oracle Model (modeling HKDF as a random oracle against active header-peeling queries [34]), together with ChaCha20 PRG, HMAC-SHA256 EUF-CMA, and AEZ v5 strong PRP / robust AEAD assumptions [36, 47], let \(\pi_i(P)\) denote hop \(i\)'s local interface projection (role, adjacent links, symbol \(f_i\), arguments \(\bar{a}_i\), expiry \(x\), and cell class \(b\)), \(\pi^\circ_i\) its position-erased projection (identical to \(\pi_i(P)\) with hop index \(i\) omitted), \(\sigma(P)\) the visible loop class, and \(D_i\) the cumulative deterministic delay from client build time \(t_{\mathrm{build}}\) to arrival \(t^{\mathrm{arr}}_i=t_{\mathrm{build}}+D_i\) modulo \(Q\). Every loop built by Definitions 32–34 satisfies:
Law L5 (Noninterference): \(\pi_i(P)=\pi_i(P')\land\sigma(P)=\sigma(P')\implies\operatorname{view}_i(P)\approx_c\operatorname{view}_i(P')\): no hop learns another hop's arguments \(\bar{a}_j\), invoke backend name \(\omega_j\), or segment value \(v_k\neq\hat{v}_i\) [48].
Law L5 MATH0 (Position Hiding): For loops \(P,P'\) of arbitrary lengths \(H,H'\le\hat{H}=14\), a hop's distinguishing advantage between positions \(i\) and \(i'\) with matching local projection \(\pi^\circ_i\) under uniform build-phase quantization modulo \(Q\) is bounded by
\[\begin{aligned} \mathrm{Adv}_i\;\le{}&\hat{H}\bigl(\epsilon_{\mathrm{Gap\text{-}DDH}}+\epsilon_{\mathrm{PRG}}+\epsilon_{\mathrm{MAC}}\bigr)\\ &+\min\bigl(1,\,|D_i-D'_{i'}|/Q\bigr). \end{aligned}\]Law L6 (Client Path Authority): \(\mathrm{next}_i\) is sealed in \(\lambda_i\) by \(\diamond\) independently of runtime values \(v_k\), admitting the Arrow composition fragment (\(\mathbin{\ggg}\)) while excluding promiscuous monadic bind (\(\gg\!\!=\)) [40].
Law L8 (Byte Unlinkability and Tagging Resistance): Consecutive edges carry independent uniform ciphertexts against external link observers and pure transit relays (\(\chi_i\neq\chi_{i+1}\), \(y_{i-1}\neq y_i\); on intermediate segments \(k\ge 1\), a corrupted symbol producer \(p_k=h_k\) holds segment seed \(\sigma_{\mathrm{out}}\) and can correlate ciphertexts on segment \(k\) only if colluding with a downstream link observer), class relabeling fails \(\gamma_i=\mathrm{MAC}_{K_i}(b\Vert\beta_i)\), and any modification \(\tilde{y}\neq y_{k,j}\) is rejected by consumer \(\mathrm{D}^{16}_{k_{c_k}}\) with probability \(\ge 1-q\cdot 2^{-128}-\epsilon_{\mathrm{AEZ}}\) across \(q\) active forgery queries (\(\ge 1-2^{-128}-\epsilon_{\mathrm{AEZ}}\) per single attempt) [47].
We outline the hybrid sequence across an \(H\)-hop loop (\(H\le\hat{H}=14\)), adapting the Sphinx and AEZ reductions of Danezis–Goldberg [34], Hoang et al. [36], and Degabriele–Stam [47]:
Game MATH2 (Gap-DDH Blinding & Random-Oracle Key Schedule): Under Gap-DDH over secp256k1 and random-oracle HKDF, even an active adversary submitting chosen group elements \(\alpha\) to honest header-peeling relays cannot distinguish an uncorrupted hop \(j\)'s ephemeral shared secret and derived keys \((k^{\mathrm{enc}}_j,k^{\mathrm{mac}}_j,k^{\mathrm{blind}}_j)\) from uniform independent keys except with advantage \(\hat{H}\epsilon_{\mathrm{Gap\text{-}DDH}}\), ensuring fresh unlinkable \(\alpha_j\neq\alpha_{j+1}\) across re-blinded segments.
Game MATH8 (PRG Pad & Fixed-Width Position Hiding): Replacing ChaCha20 keystream expansions over \(|\beta|=\hat{H}\ell=2\,870\,\mathrm{B}\) at each uncorrupted hop incurs advantage at most \(\hat{H}\epsilon_{\mathrm{PRG}}\) over \(\hat{H}\) peeling steps. Because all three HopRole variants pack identical \(205\)-byte slots shifted and padded to constant width \(2\,870\,\mathrm{B}\), the decrypted header tail after hop \(i\) is uniform noise for both \(H\) and \(H'\), isolating only the local arrival-to-expiry offset \((x-t^{\mathrm{arr}}_i)\) under uniform build phase \(t_{\mathrm{build}}\bmod Q\) (absent external inter-hop timing observation of deterministic releases \(L(f_i)\)): with \(t^{\mathrm{arr}}_i=t_{\mathrm{build}}+D_i\), this offset at positions \((i,D_i)\) and \((i',D'_{i'})\) has statistical distance at most \(\min(1,|D_i-D'_{i'}|/Q)\), establishing Law L5\('\).
Game MATH25 (Header MAC & Path Authority): Under EUF-CMA security of HMAC-SHA256 (\(\hat{H}\epsilon_{\mathrm{MAC}}\)), no adversary without \(k^{\mathrm{mac}}_j\) can forge \(\gamma_j=\mathrm{MAC}_{k^{\mathrm{mac}}_j}(b\Vert\beta_j)\) or substitute another hop class \(b\) or routing descriptor \(\lambda_j\); thus \(\mathrm{next}_j\) and \(\bar{a}_j\) remain fixed by client \(\diamond\) independently of intermediate payload values \(v_k\) (Law L6), while hops \(j\neq i\) see only uniform XORed/encrypted slots for \(\pi_i(P)=\pi_i(P')\) (Law L5).
Game MATH37 (Wide-Block Body Carry): For any segment \(k\), the producer wraps fixed-width padded plaintext \(\operatorname{pad}(\operatorname{enc}(v_k))\) through \(\mathrm{E}^{16}_{k_{c_k}}\) and \(s=2\) passes of \(\mathrm{E}^0_{k_{r_{k,j}}}\), with keys derived from fresh nonce-protected seed \(\sigma_k\) and replay protection enforced once via \(R_i[x]\) (Law 20). By AEZ v5 strong PRP security (\(\tau=0\)) at relays and robust AEAD security (\(\tau=16\)) at the consumer [36, 47], intermediate ciphertexts \(y_{k,j}\) are pseudorandom permutations over \(\{0,1\}^{8C_b}\) (yielding segment-\(k\) byte unlinkability \(y_{i-1}\neq y_i\) against external observers and transit relays that lack \(\sigma_k\)), and any bit-flip, truncation, or tagging \(\tilde{y}\neq y_{k,j}\) anywhere on the segment causes consumer \(\mathrm{D}^{16}_{k_{c_k}}\) to fail its \(0^{128}\) authenticator check with advantage at most \(q\cdot 2^{-128}+\epsilon_{\mathrm{AEZ}}\) across \(q\) forgery queries (Law L8).
IX.Decentralized Trust and Ranking — DRanking Bridge#
IX-ASidecar Witness Ordering#
where \(\operatorname{Include}(H(msg),w.root)\) checks a canonical inclusion proof against a finalized sidecar state root and \(\chi\) provides a deterministic cross-domain ordering comparator reconciling witnesses from distinct domains.
IX-BCounterparty-Signed Service Receipts and the DRanking 2.0 Bridge#
In an open network where identity creation is free (\(\mathsf{cost}(\mathsf{did})=0\)),
unsigned local behavior counters or naive median/trimmed-mean votes over unverified
peer reports are vulnerable to Sybil amplification [49]. Rings 1.0
therefore establishes a cryptographic evidence primitive on the wire—the
counterparty-signed Service Receipt (ServiceReceipt)—which bridges
directly into the companion DRanking 2.0 verifiable distributed ranking and
admission protocol [10].
ServiceReceipt)).#A service receipt is a dual-authenticated tuple
implemented on live probe transcripts with distinct provider/beneficiary tags (rings-core: service-receipt: provisional:{provider, beneficiary}) and bridging into DRanking 2.0 under the finalized epoch separator \(\mathtt{rings\text{-}service\text{-}receipt\text{-}v1\backslash 0}\), where:
\(\mathsf{srv}\in\{\mathsf{relay},\mathsf{store},\mathsf{probe}\}\) names the metered service kind;
\(a\in R\) is the service provider DID and \(b\in R\) (\(b\neq a\)) is the served beneficiary DID;
\(k\in\mathbb{N}\) is the epoch index and \(n\) is a fresh per-epoch nonce;
\(d_{\mathrm{req}},d_{\mathrm{rsp}}\) are the cryptographic digests of the exact signed request and completion transactions; and
\(\sigma_a,\sigma_b\) verify under the distinct account keys of \(a\) and \(b\) over \(\mathtt{rings\text{-}service\text{-}receipt\text{-}v1\backslash 0}\Vert\mathsf{ver}\Vert\mathsf{srv}\Vert a\Vert b\Vert k\Vert n\Vert d_{\mathrm{req}}\Vert d_{\mathrm{rsp}}\).
Because forging \(\sigma_b\) for an honest beneficiary \(b\notin\mathsf{Adv}\) is cryptographically infeasible, manufacturable receipts are restricted to adversarial self-dealing (\(b\in\mathsf{Adv}\)). In the companion DRanking 2.0 protocol [10], distinct-nonce receipts \((k,n)\) for pair \((a,b)\) fold into a cap-budgeted receipt matrix \(W_k[b,a]\le w_{\max}\) with normalized stochastic flow \(C_k[b,a]=W_k[b,a]/\max(w_{\max},W_k[b,\cdot]\mathbf{1})\). Assuming honest seed support (\(\operatorname{supp}(s)\subseteq H\)), uniformly bounded attenuation (\(\sup_k\alpha_k\le\alpha<1\)), and initial adversarial weight \(T_0(\mathsf{Adv})\le\frac{\alpha g}{1-\alpha}\), the seed-anchored attenuated PageRank/EigenTrust [50, 51] epoch evolution preserves
for all \(k\ge 0\), where \(g=\sup_k\sum_{b\in H,a\in\mathsf{Adv}}C_k[b,a]t_k(b)\) is the honest endorsement leakage. Soulbound rank \(\hat{t}_k(v)\) then weights VRF committee sortition and is folded across epochs via Nova-family Incrementally Verifiable Computation (IVC) [52] so browser nodes verify global admission state in \(O(1)\) time.
IX-CSecurity Predicates and Controls#
Table 3 maps each primary threat class in Rings 1.0 to its failure predicate and cross-layer enforcement mechanism.
| Attack | Predicate | Rings 1.0 + 2.0 Control |
|---|---|---|
| Sybil | many DIDs, one actor | SlotRoster cleanest-first floors + fair pool (Section VII); DRanking receipts [10] |
| Replay | stale valid \(\sigma\) | durable \((\mathcal{W}_s,\mathcal{K}_s)\), link-local \(\mathcal{W}_{s,g}\), onion sliced-Bloom \(R_i[x]\) |
| MITM | wrong key for DID | DID proof, rings-delegation-v1, rings-core: data-entry: mutation |
| DoS | unbounded resource use | 5-table slot accounting, credit reclaim \(\mathsf{Shrink}\), credit-time \(\hat{\tau}\) floor |
| Tagging | onion byte correlation | Sphinx 2870\,B header + AEZ v5 wide-block carry (\(\tau=16\)) |
X.Evaluations and Formal Verification#
X-AExperimental Setup and Reproducibility#
All empirical benchmarks and formal-verification explorers in this section were executed directly against the shipped Rust transition reducers and networking crates of Rings 1.0 (workspace version 1.0.0-pre.8, commit 6b5a3434; source and reproduction commands in papers/README.md at https://github.com/RingsNetwork/rings) on an Apple M1 Max workstation (10 ARM64 cores, \(64\,\text{GiB}\) RAM, Darwin 27.0.0) using rustc 1.97.0 and hardware ARMv8 AES/POLYVAL instructions enabled via .cargo/config.toml (--cfg aes_armv8 --cfg polyval_armv8). Pure overlay/CRDT/storage benchmarks and all 16 Stateright/BFS model-checking reporters ran under --profile ci (opt-level=3, release assertion semantics preserved), whereas AEZ v5 cipher microbenchmarks (rings-aez), multi-flow gateway harnesses (rings-gateway), and Sphinx/Bloom/live 5-node WebRTC loopback tests (rings-node) ran sequentially (--test-threads=1) under full --release (opt-level=3, fat LTO).
X-BStateright State Relation and Quantitative Formal Verification#
The exploration relation follows TLA+ style and Stateright finite-state model checking [53, 8] directly over the pure transition functions of rings-core, rings-transport, rings-node, and rings-turn-service.
Across all four model-checked workspace crates, exhaustive BFS state-space exploration verified 9,496,521 reachable finite states (plus 102,400 seeded Horizon simulation transitions and \(1\,931\) official AEZ v5 known-answer test vectors [42]) and refuted 54 deliberately injected safety mutants via replayable counterexample traces (Table 4). Critically, all 16 suites directly execute the shipped production Rust state types and transition reducers (PeerRing, topology::step, EntryCrdt, RecordAuthority, AdmissionLedger, CreditWindow, IceGatherState, OnionReorder, TurnAllocationCore, OnionUdpPinholeTable), abstracting only the asynchronous network scheduler, frame drop/duplication, and storage crash prefixes. In core::dht_stateright, Stage 2 verifies Always safety and Sometimes reachable convergence while intentionally recording a negative bounded-convergence counterexample (no-conv CE: 519,886 states), reproducing Zave's impossibility result [6] that asynchronous Chord lacks worst-case bounded-step convergence under unconstrained adversarial scheduling. Table 5 details the six Stage-6 Rejoin BFS configurations covering simultaneous link flaps, suffix restarts, and churn chains across \(2\,474\,679\) states up to depth 60, while every Rejoin mutant triggers a minimal counterexample within \(10\)–\(788\) states (\(9.41\,\mathrm{ms}\) total).
--profile ci) #| Crate / Harness | Scope / Configurations | States | Mutants | Time (ms) | Verified Invariants & Bounds |
|---|---|---|---|---|---|
core::dht_stateright | Stages 1–4 (Notify \(N{=}3,4\); Disc.; CRDT SEC; ABA) | 618,155 | — | 19,359.27 | CorrectChord, SEC merge, ABA safety (no-conv CE: 519,886 states) |
core::finger_retry | Stage 5 resource-law explorer (depth 9) | 134,371 | — | 839.98 | Single owner, monotone epochs, \(\le K{+}1\) stab fan-out (479,544 trans.) |
core::rejoin_model | Stage 6 (6 overlays; Table 5) | 2,474,679 | 4 / 4 | 53,091.65 | Inert retired gens, unavailable-head swap, repair on vacate (CE: 10–788) |
core::relay_custody | Stage 7 storage-less run | 192 | — | 37.32 | Single-use query token, 2,496 transitions, ack-gated leave handoff |
core::repair_model | Virtual (1c) + Handoff (1c, 2c crashes) | 21,105 | 4 / 4 | 880.39 | Replicated mail handoff safety, \(r\)-member convergence |
core::horizon_model | 512 seeds \(\times\) 200 interleaved steps | (102,400 trans.) | 7 / 7 | 5,042.84 | Theorem 2 (No Resurrection) under \(t\ge\tau(r)+H+\sigma\) |
core::durability | 4 auth. modes \(\times\) put/rem/batch | 53 pfx (80 out.) | — | 0.015 | Lattice \(C\times M\), .p presence witness, \(\mathrm{put}^*\) undo rollback |
core::resource_order | Unbounded (49,542) + Capped-2 (58,506) | 108,048 | 7 / 7 | 1,482.72 | Bounded priority fair scheduling across control/interactive/bulk |
transport::credit | 24 configs (dup, honest, windows) | 5,916,645 | 5 / 5 | 18,973.67 | Generational Credit/Shrink/Returned zero-drop hard frame bound |
transport::ice_gather | 3 ICE tiers (Host, Reflexive, Relay) | 330 | 5 / 5 | 0.92 | 1-RTT SDP/ICE completion & tier-monotonic candidate freeze |
transport::turn_tcp | Native WebRTC TURN/TCP bridge | 16 | 7 / 7 | 1.09 | Framed TURN-TCP relay admission & close-order safety |
node::onion_admission | Replay/unit ledger BFS (depth 3) | 3,616 | 3 / 3 | 92.12 | Law L9 pre-ECDH unit charge, \(K{=}26\) Bloom & epoch-reset safety |
node::exit_and_lanes | ExitQuota (2,540) + OutboxLanes (10,559) | 13,099 | 2 / 2 | 123.97 | Per-link exit budget isolation & outbox lane ordering |
node::session_order | Reorder (16,481) + SurbPool (2,540) | 19,021 | 2 / 2 | 737.42 | Exact forward/reply sequence delivery & least-expiry SURB drain |
node::lease_readiness | LeaseFresh (179,574) + ReadinessLatch (4,897) | 184,471 | 2 / 2 | 460.41 | Admissible SignedDescriptor bounds & startup readiness latch |
turn_service::bridge | TURN-Onion UDP bridge BFS (depth 6) | 2,773 | 6 / 6 | 10.97 | UDP session binding, allocation expiry, & byte-cap safety |
| Total / Aggregate | 16 model suites + 1,931 AEZ v5 KATs | 9,496,521 | 54 / 54 | 101,134.76 | Zero invariant violations across production reducers |
horizon_model's \(102{,}400\) seeded simulation transitions and durability's \(53\) crash prefixes with \(80\) outcomes); BFS models instantiate scaled-down finite bounds (\(N\in\{3,4\}\), small credit/queue windows) directly over the shipped production Rust reducers.test_rejoin_model) #| Configuration | States | Depth | Premise (Unstable) | Time (ms) |
|---|---|---|---|---|
departure | 4,862 | 21 | — | 51.33 |
replacement | 109,840 | 35 | 91,312 (25,472) | 2,821.23 |
truncation | 237,328 | 36 | 219,664 (174,048) | 5,972.63 |
restart | 542,589 | 47 | 464,848 (408,404) | 9,860.47 |
chain | 545,796 | 60 | 545,796 (531,172) | 12,694.39 |
lossy_flap | 1,034,264 | 42 | 890,762 (653,760) | 21,682.19 |
| 4 Rejoin Mutants | Refuted at 788, 43, 10, and 21 states | 9.41 | ||
X-COverlay Convergence and Non-Transitive WebRTC Routing#
Figure 8 evaluates range-proved finger convergence across uniformly distributed random \(160\)-bit DID rings of size \(N\in\{16,32,64,128,256,512,1024\}\) (\(30\) seeded trials per size; \(15\) at \(N=1024\)). By Lemma 2, stabilization with the immediate clockwise head automatically confirms an average of \(156.20\) slots at \(N=16\) (still \(149.40\) slots at \(N=1024\)) with zero lookups. Across all remaining outer slots, Rings converges cleanly in \(\mathbf{3.13}\)–\(\mathbf{9.20}\) routed lookups on average (\(\text{p95}=5\)–\(10\), worst-case \(12\) at \(N=1024\)), yielding a