SwarmNet¶
Peer-to-peer replication, ordering and proofs for signed events.
Alpha
SwarmNet is alpha software. APIs, data formats and defaults can change between releases. Test it thoroughly before relying on it, and keep backups of keys and data.
SwarmNet connects relays and aggregators directly with each other. Nodes find each other on a distributed hash table, connect through NATs over encrypted streams, replicate append-only logs, agree on one order, and prove what they answer.
What you can do¶
- Run a relay cluster across sites without a central database or a public address for every node.
- Know when an event is final, and keep working during a partition.
- Gossip events to aggregators that confirm durable storage.
- Search with proofs: every result is checked against a root that a majority of the aggregators attested.
- Prove deletion and absence, not only presence.
Building blocks¶
| Block | Role |
|---|---|
| Hyperswarm | Discovery on a DHT and encrypted, NAT-traversing connections |
| Corestore and Hypercore | Append-only logs, one per writer |
| Autobase | Merges the logs of all writers into one order and finalizes it |
| Hyperbee | Key-value state derived from the order |
| Sparse Merkle tree | Proofs of presence, deletion and absence |
Two modes¶
| Replicated relays | Gossip and aggregation | |
|---|---|---|
| Clients connect to | A normal relay | A gossip node to write, an aggregator to read |
| Log | One | One for each shard |
| Reads | From the local relay | With proofs and a quorum of attestations |
| Use it for | A highly available relay | Verifiable search over many authors |
Where to go next¶
Getting Started starts both modes. Swarm Concepts explains identity, membership, order and failure. Architecture shows every component.