Replication & Peer Discovery (Future)
Replication and peer discovery is the planned subsystem that lets the nodes hosting a space find each other and synchronize authorization state as a first-class peer-to-peer network — modeled on how Bitcoin and Ethereum nodes discover peers and gossip — rather than relying on manually configured hosts.
Why
A space's consistency model already defines how events are ordered (epoch-based, hash-linked DAG, LWW CRDT); replication defines how those epochs propagate across hosts, and discovery defines how a host finds the other hosts to propagate with. Making both first-class is what turns "trusted nodes you point at each other" into a self-organizing host network, so a user's data stays available and consistent without a central coordinator.
Current status
Planned. No replication module is in production Node 1.17.3 (05c6a93) or on node main (d7f511f). A peer-to-peer prototype (tinycloud-core/src/replication/) exists only on the unmerged feat/replication-e2e-bootstrap branch, and the current plan does not port it. Peer discovery is not implemented. The whitepaper sketches discovery via host-delegation multi-addresses, DID-document service endpoints, and a manifest registry, but no gossip/broadcast or epoch-sync exists. Treat both as design intent.
The work in progress is narrower: local read replicas on client devices (Linear TC-12, TC-502), built on the kv change feed tinycloud.kv/sync (node main, unreleased) and the SDK's kv.changes() (3.1.0 beta). The host node stays the only writer, so this needs neither peer discovery nor cross-node conflict resolution. See replication.
See also
The live concept covering both tracks is replication; it builds on consistency, the epoch DAG, and conflict resolution. The "Recon" light-client direction is a related but distinct line of work. Sits in Layer 1; see the roadmap.
Sources
tinycloud-node@05c6a93 / @d7f511f: noreplication/module; branchfeat/replication-e2e-bootstrap(unmerged):tinycloud-core/src/replication/{mod,recon}.rs(prototype); @d7f511fdocs/kv-sync.md(change feed)whitepaper:README.md§5 (peer-to-peer replication / host discovery)