Skip to main content

Module sparse

Module sparse 

Source
Expand description

Canonical-tree witnesses for sparse checkout (SPEC-SPARSE-CHECKOUT v2).

A witness carries complete metadata for one tree. The verifier binds it to an independently trusted object ID and derives the selected entries locally. Directory entries authenticate child IDs; recursive consumers must verify a witness for every selected child before declaring the traversal complete.

Structs§

SparseManifest
SparseProof
SparseResponse
VerifiedSparseTree
Locally derived selection after witness and requested-context verification.

Enums§

SparseError
SparseWireError

Constants§

MAX_FILTER_BYTES
MAX_FILTER_PATHS
MAX_LEAVES
SPARSE_CACHE_DIR
SPARSE_CACHE_MAGIC
SPARSE_CACHE_VERSION
SPARSE_WIRE_MAGIC
SPARSE_WIRE_MAX_BYTES
SPARSE_WIRE_VERSION

Functions§

build_sparse
decode_sparse_cache
decode_sparse_response
encode_sparse_cache
encode_sparse_response
The wire contains only the root, filter commitment and full tree witness. Delivered entries are derived from that witness by verify_sparse consumers.
hash_filter
tree_hash
validate_filter
Filters are UTF-8 repository-relative literal path prefixes. . selects everything; an empty list selects nothing. Negation and globbing require the authenticated full-metadata fallback, never an approximate sparse filter.
verify_sparse
Authenticate the witness against the requested root and filter, then derive the complete selection locally. No server-selected list is accepted.
verify_sparse_hierarchy
Verify an entire selected hierarchy. Missing selected child witnesses fail; ancestors are followed using only IDs authenticated by their parent tree. Limits bound aggregate witness bytes, traversal count and path depth.