Skip to content

v0.1.3 — MerkleNode frozen; directory trees

Latest

Choose a tag to compare

@hartsock hartsock released this 15 Oct 22:24
94a282a

MerkleNode joins the frozen 0.1.x surface, and directory trees arrive as
experimental, default-off features. Every existing golden vector is
byte-identical, and every identifier minted under earlier 0.1.x releases
remains valid. The dir_tree breaking notes below apply only to the new,
non-frozen features.

Added

  • MerkleNode bytes are frozen (#112): cross-language vectors in
    tests/merkle_vectors.json, checked in Rust and Python. MerkleNode is in the
    default surface; unstable-merkle is now a deprecated no-op alias.

  • dir_tree single-file roots (#109): Link is now ContentAddressable, and
    snapshot / snapshot_with return the root Link (also stored), so a
    regular file is a root: resolve(store, &link.content_id()?, "") proves it
    and verify_file checks it, extra digests included. A file root and a
    directory root over the same bytes have different ids; DirNode bytes are
    unchanged. Breaking (experimental, non-frozen): snapshot returns Link
    not ContentId; resolve / Proof::verify take a Link id; Proof.nodes[0]
    is the root link's bytes, so nodes.len() is depth + 1.

  • structures::dir_tree behind the new default-off dir-tree feature
    (#105): DirNode / Link, snapshot, resolve and Proof. One root
    ContentId names a directory of files, and a path resolves to a file's id
    with an O(depth) proof that verifies against only the root. Bytes are
    NON-FROZEN until conformance vectors land (#33).

  • dir_tree multi-digest file links behind the new default-off multi-digest
    feature (#107): Link::File gains also, extra SHA-256 / MD5 digests of
    the same bytes that Proof::verify_file checks ALL of, alongside BLAKE3 and
    size. New DigestAlg, file_link, snapshot_with, and the typed errors
    InvalidDigest / UnsupportedDigest. A link with no also keeps its
    previous bytes and root. Link is no longer Copy.