|
| 1 | +--- |
| 2 | +tags: cyber, cyb, core |
| 3 | +crystal-type: process |
| 4 | +crystal-domain: cyber |
| 5 | +alias: cyb sync, sovereign sync, unified sync |
| 6 | +--- |
| 7 | + |
| 8 | +# sovereign sync — patches verified at every layer |
| 9 | + |
| 10 | +the unification of [[cyb/fs/patch|patch theory]] and [[structural sync]]. patches are the language of change. structural sync is the infrastructure of trust. together they produce a system where every file operation is a provably correct, provably complete, provably available morphism over the [[cybergraph]]. |
| 11 | + |
| 12 | +a [[patch]] IS a [[signal]]. a [[signal]] IS a patch. the same object described by two theories: |
| 13 | + |
| 14 | +| [[patch theory]] | [[structural sync]] | meaning | |
| 15 | +|---|---|---| |
| 16 | +| morphism P: S₁ → S₂ | signal s = (ν, l⃗, π_Δ, σ) | a change to the graph | |
| 17 | +| commutativity (P ⊥ Q) | [[CRDT]] merge (a ⊔ b = b ⊔ a) | order does not matter | |
| 18 | +| dependency DAG | [[hash chain]] (prev field) | causal history | |
| 19 | +| confluence theorem | [[Verified Eventual Consistency]] | convergence to unique state | |
| 20 | +| conflict object Conflict(P,Q) | competing [[particles]] in [[foculus]] π | disagreement as data | |
| 21 | + |
| 22 | +## five layers applied to patches |
| 23 | + |
| 24 | +each patch passes through five verification layers before it becomes part of the canonical [[cybergraph]]. no layer depends on another for its guarantee. a verifier can check any subset. |
| 25 | + |
| 26 | +### layer 1: validity — the patch is correct |
| 27 | + |
| 28 | +every patch carries a [[zheng]] proof σ covering all operations in the batch: |
| 29 | + |
| 30 | +- AddParticle — [[Hemera]] hash matches content |
| 31 | +- AddEdge — source and target particles exist (NMT membership proof) |
| 32 | +- RemoveEdge — edge exists and author has authority (conviction check) |
| 33 | +- ReplaceParticle — old particle referenced correctly, new hash valid |
| 34 | +- [[focus]] sufficient for conviction weight |
| 35 | + |
| 36 | +an invalid patch cannot be constructed. the constraint system is the security boundary — not the network, not validators, not honest majority. a single device offline for a year can verify a patch in 50 μs. |
| 37 | + |
| 38 | +### layer 2: ordering — the patch carries its own history |
| 39 | + |
| 40 | +every patch embeds its causal position: |
| 41 | + |
| 42 | +- `prev = H(author's previous patch)` — per-[[neuron]] [[hash chain]] |
| 43 | +- `merkle_clock = H(all patches the device has seen)` — compact causal state |
| 44 | +- `vdf_proof = VDF(prev, T_min)` — physical time since last patch. [[VDF]] prevents flood: each patch costs minimum T_min wall-clock seconds. equivocation (two patches with same prev) costs 2×T_min — detectable by any peer |
| 45 | +- `step` — monotonic counter, gap = missing patch = detectable |
| 46 | +- dependency closure — explicit set of patches this patch requires |
| 47 | + |
| 48 | +the [[patch theory]] dependency DAG and the structural sync [[hash chain]] unify here. dependent patches (P → Q) embed P's hash in Q's closure. independent patches (P ⊥ Q) have disjoint closures — application order irrelevant. |
| 49 | + |
| 50 | +deterministic total order from the set of patches, without coordination: |
| 51 | +1. causal order (A in B's deps → A before B) |
| 52 | +2. [[VDF]] time (lower elapsed → earlier) |
| 53 | +3. hash tiebreak (H(A) < H(B) → A before B) |
| 54 | + |
| 55 | +### layer 3: completeness — nothing was omitted |
| 56 | + |
| 57 | +each [[neuron]] commits its patch chain to a per-neuron [[NMT]] (namespaced by step): |
| 58 | + |
| 59 | +``` |
| 60 | +NMT[ step → patch_hash ] |
| 61 | +``` |
| 62 | + |
| 63 | +a peer requesting "all patches from neuron N in steps [100, 200]" receives a structural completeness proof. the tree's sorting invariant physically prevents omission — the neuron cannot hide a patch in the requested range. |
| 64 | + |
| 65 | +this closes the critical gap in pure [[patch theory]]: confluence guarantees correct state IF you have all patches in the dependency closure. [[NMT]] proves you DO have all patches. together: provably correct state from a provably complete set. |
| 66 | + |
| 67 | +### layer 4: availability — the data survives |
| 68 | + |
| 69 | +patch content (new [[particles]], modified files) is erasure-coded via 2D Reed-Solomon over [[Goldilocks field]]: |
| 70 | + |
| 71 | +- chunks distributed across device set (local) or neuron set (global) |
| 72 | +- any k-of-n chunks reconstruct the original |
| 73 | +- [[DAS]]: O(√n) random samples verify availability without downloading |
| 74 | + |
| 75 | +a device dies → patches survive in parity chunks across remaining devices. a neuron goes offline → other neurons holding erasure chunks reconstruct. [[patch theory]] says "if you have the patches, the state is correct." [[DAS]] says "the patches physically exist, even if some holders are gone." |
| 76 | + |
| 77 | +### layer 5: merge — convergence is algebraic |
| 78 | + |
| 79 | +two scales, one principle: |
| 80 | + |
| 81 | +local (devices of one [[neuron]]): [[CRDT]] merge. independent patches commute by the [[commutativity]] theorem. dependent patches apply in topological order from the dependency DAG. the [[G-Set]] of patches grows monotonically — union is the merge function. |
| 82 | + |
| 83 | +global ([[neurons]] in the network): [[foculus]] merge. when two neurons create conflicting patches (P ⊗ Q), both enter the [[cybergraph]]. π convergence assigns each a [[focus]] score weighted by stake. the patch crossing threshold τ becomes canonical. the other persists as history (axiom A3: append-only) but carries zero weight. |
| 84 | + |
| 85 | +the [[patch theory]] conflict resolution maps directly: a resolution patch R has both P and Q in its dependency closure. once R crosses τ, the conflict is resolved network-wide. no voting round. no leader. convergence from topology. |
| 86 | + |
| 87 | +## the lifecycle |
| 88 | + |
| 89 | +``` |
| 90 | +neuron creates patch on device |
| 91 | + ↓ |
| 92 | +device: zheng proof generated (layer 1, ~100ms) |
| 93 | + ↓ |
| 94 | +device: hash chain extended, VDF computed (layer 2, ~1s) |
| 95 | + ↓ |
| 96 | +device: NMT updated with new step (layer 3, O(log n)) |
| 97 | + ↓ |
| 98 | +device: content erasure-coded across device set (layer 4) |
| 99 | + ↓ |
| 100 | +local sync: CRDT merge with other devices (layer 5) |
| 101 | + ↓ |
| 102 | +network: signal submitted to validators |
| 103 | + ↓ |
| 104 | +global: foculus π-weighted merge (layer 5) |
| 105 | + ↓ |
| 106 | +canonical: patch enters BBG_root, indexed in NMT |
| 107 | + ↓ |
| 108 | +queryable: any light client verifies with one proof |
| 109 | +``` |
| 110 | + |
| 111 | +## what this enables |
| 112 | + |
| 113 | +### sovereign personal computing |
| 114 | + |
| 115 | +a [[neuron]] owns devices. devices run [[CybOS]]. every file operation is a patch. patches sync between devices via layers 1-5. no cloud account. no server. no permission from anyone. the five layers guarantee: if your devices have the patches, your state is correct (layer 1), ordered (layer 2), complete (layer 3), available even if a device dies (layer 4), and convergent (layer 5). |
| 116 | + |
| 117 | +### offline-first without compromise |
| 118 | + |
| 119 | +devices work offline for weeks. patches accumulate locally. when they reconnect: |
| 120 | +- [[merkle clock]] comparison: O(1) — one hash, equal means in sync |
| 121 | +- exchange missing patches with [[NMT]] completeness proofs — nothing hidden |
| 122 | +- [[CRDT]] merge — deterministic, no conflicts for independent changes |
| 123 | +- conflicts materialized as first-class objects — not "sync failed" |
| 124 | + |
| 125 | +### agent collaboration at scale |
| 126 | + |
| 127 | +multiple [[neurons]] and agents create patches simultaneously. no coordination required during creation — only the five layers at merge time. a [[GFlowNet]] agent proposes patches weighted by expected Δπ. an [[active inference]] agent stakes on patches that minimize [[free energy]]. [[foculus]] resolves disputes through π convergence — stake-weighted, mathematically determined, no politics. |
| 128 | + |
| 129 | +### verifiable version control |
| 130 | + |
| 131 | +every patch is provably correct (zheng), causally ordered (hash chain + VDF), complete in context (NMT), physically available (DAS), and deterministically merged (CRDT/foculus). this is [[git]] with mathematical guarantees instead of social trust. no force-push. no rebase that rewrites history. no "trust the server." the [[hash chain]] is append-only, the proofs are unforgeable, and the merge is algebraic. |
| 132 | + |
| 133 | +### light client repositories |
| 134 | + |
| 135 | +a new device joins a neuron's repository: |
| 136 | +1. download checkpoint (BBG_root + folding accumulator) |
| 137 | +2. verify ONE [[zheng]] proof — proves all history valid (~50 μs) |
| 138 | +3. sync namespaces of interest with [[NMT]] completeness proofs |
| 139 | +4. sample availability with [[DAS]] (~20 samples) |
| 140 | + |
| 141 | +no replay of all patches. no download of full repository. no trust in the peer serving data. the proof speaks for itself. |
| 142 | + |
| 143 | +## relationship to existing systems |
| 144 | + |
| 145 | +| system | patches | validity | ordering | completeness | availability | merge | |
| 146 | +|---|---|---|---|---|---|---| |
| 147 | +| [[git]] | snapshot diffs | hash integrity | DAG (no proof) | clone all | full replication | manual / 3-way | |
| 148 | +| [[IPFS]] | none | CID hash | none | none | DHT (best effort) | none | |
| 149 | +| [[Automerge]] | [[CRDT]] ops | type safety | Lamport clock | none | none | [[CRDT]] auto | |
| 150 | +| Pijul | categorical | hash integrity | dependency DAG | clone all | full replication | commutative | |
| 151 | +| [[Celestia]] | blobs | [[NMT]] + DA | Tendermint | [[NMT]] proofs | [[DAS]] | N/A (DA only) | |
| 152 | +| cyb/fs/sync | categorical | [[zheng]] proof | chain + [[VDF]] | [[NMT]] proof | [[DAS]] + erasure | [[CRDT]] / [[foculus]] | |
| 153 | + |
| 154 | +cyb/fs/sync is the first system combining categorical patch semantics with all five verification layers. Pijul has the algebra. Celestia has layers 3-4. Automerge has layer 5. git has social trust. cyb/fs/sync has all five, unified. |
| 155 | + |
| 156 | +see [[cyb/fs/patch]] for patch algebra and five primitive operations. see [[structural sync]] for the five-layer theory and consequences. see [[sync]] for the full protocol specification. see [[foculus-vs-crdt]] for why layer 5 splits at the local/global boundary. see [[cyb/fs]] for the filesystem model. see [[CybOS]] for the operating system |
0 commit comments