8 releases (5 breaking)

0.11.0 Nov 17, 2023
0.10.0 Nov 8, 2023
0.9.0 Oct 31, 2023
0.8.0 Oct 23, 2023
0.6.0-alpha.0 Aug 28, 2023

#1395 in Network programming

Download history 12/week @ 2023-08-22 36/week @ 2023-08-29 46/week @ 2023-09-05 10/week @ 2023-09-12 32/week @ 2023-09-19 73/week @ 2023-09-26 104/week @ 2023-10-03 118/week @ 2023-10-10 157/week @ 2023-10-17 285/week @ 2023-10-24 176/week @ 2023-10-31 187/week @ 2023-11-07 63/week @ 2023-11-14 93/week @ 2023-11-21

563 downloads per month
Used in iroh


13K SLoC


Multi-dimensional key-value documents with an efficient synchronization protocol.

The crate operates on Replicas. A replica contains an unlimited number of Entrys. Each entry is identified by a key, its author, and the replica's namespace. Its value is the 32-byte BLAKE3 hash of the entry's content data, the size of this content data, and a timestamp. The content data itself is not stored or transfered through a replica.

All entries in a replica are signed with two keypairs:

  • The Namespace key, as a token of write capability. The public key is the NamespaceId, which also serves as the unique identifier for a replica.
  • The Author key, as a proof of authorship. Any number of authors may be created, and their semantic meaning is application-specific. The public key of an author is the [AuthorId].

Replicas can be synchronized between peers by exchanging messages. The synchronization algorithm is based on a technique called range-based set reconciliation, based on this paper by Aljoscha Meyer:

Range-based set reconciliation is a simple approach to efficiently compute the union of two sets over a network, based on recursively partitioning the sets and comparing fingerprints of the partitions to probabilistically detect whether a partition requires further work.

The crate exposes a generic storage interface with in-memory and persistent, file-based implementations. The latter makes use of redb, an embedded key-value store, and persists the whole store with all replicas to a single file.


This project is licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~889K SLoC