Expand description
The core of the Sedimentree data partitioning scheme.
This core library only defines the metadata tracking features of Sedimentree. We assume that the actual data described by this metadata is not legible to the Sedimentree (regardless of whether or not it’s encrypted).
Sedimentree is a way of organizing data into a series of layers, or strata, each of which contains a set of checkpoints (hashes) that represent some fragment of a larger file or log. For example, an Automerge document might be partitioned, and each fragment encrypted. Sedimentree tracks just enough metadata to allow efficient diffing and synchronization of these fragments.
§Wire-format validity
Commit and fragment metadata must fit the counts encoded by the wire format:
| Metadata | Count encoding | Maximum unique entries |
|---|---|---|
| Commit parents | u8 | 255 |
| Fragment boundary IDs | u8 | 255 |
| Fragment checkpoints | u16 | 65,535 |
Counts apply to deduplicated sets. Full checkpoint IDs are first truncated to 12-byte prefixes, then deduplicated; IDs sharing a prefix count as one checkpoint. This normalization only affects transport metadata, never opaque blob bytes.
LooseCommit::new,
Fragment::new, and
Fragment::from_parts reject oversized sets
with InvalidLooseCommit or
InvalidFragment. Serde deserialization and
HasBlobMeta::from_args enforce the
same limits, so successfully constructed values have representable wire counts.
Wire-format validity does not establish application-level validity. In particular, it does not verify that a fragment describes the claimed history or belongs at the claimed depth. The application remains responsible for interpreting and validating its opaque payloads.
Modules§
- blob
- Binary objects.
- codec
- Canonical binary codec for signed payloads.
- collections
- Conditional collection types that use
HashMap/HashSetwhenstdis enabled, and fall back toBTreeMap/BTreeSetforno_stdenvironments. - commit
- Abstractions for working with commits.
- crypto
- Cryptographic primitives for Sedimentree.
- depth
- Stratum depth.
- fragment
- Fragment types for Sedimentree data partitioning.
- hex
- Helpers for working with hexadecimal strings.
- id
- Unique identifier for Sedimentree data.
- loose_
commit - Loose commit metadata for Sedimentree.
- sedimentree
- The main Sedimentree data structure and related types.
- topsorted
- Topologically sorted sequence witness type.