Expand description
gpp-sync — CRDT-based, offline-first P2P synchronization (layer 8).
Transport is TCP + Noise_XX (mutual static-key auth, TOFU). Peers exchange a state vector (object id set, branch tips, policy set) then transfer only what the other lacks:
- Objects — content-addressed, add-only set; verified on receipt.
- Refs — adopt missing branches; divergent same-name branches are
preserved as
name@peerforks (no silent merge — seegpp merge). - Policies — add-only union by name.
- Graphex — optional zero-knowledge index sync (encrypted blobs ride the object set; metadata merges OR-Set / LWW).
Trust and timeline are never synced (per docs/SYNC_PROTOCOL.md).
Structs§
- Sync
Options - Sync
Report - Transport
- An established, encrypted session.
Enums§
Functions§
- connect
- Drive a sync as the connecting peer.
- ensure_
identity - Persistent Noise static keypair for this repo:
(private, public). - ensure_
repo_ id - Stable repository id (shared by all replicas). Created on first use;
set_repo_idlets a fresh clone adopt a peer’s id. - generate_
keypair - Generate a persistent X25519 static keypair
(private, public). - serve
- Handle one inbound sync on an accepted stream (responder role).
Trust-on-first-use only; see
serve_with_authto additionally gate on an authorized-keys allowlist. - serve_
with_ auth - Like
serve, but reject any peer whose Noise static key is not inallowimmediately after the handshake — before the repo-id exchange, TOFU pinning, or any object data.Nonedisables the check (TOFU only). - set_
repo_ id