Expand description
CNodeCap — CNode cap.
Slot table is a SparseList of MissingOr entries: a sparse
materialized-on-demand map from SlotIdx to CapHashOrRef. The
merkle tree shape is fixed at depth 16 (= ceil_log2(MAX_CNODE_SLOTS))
regardless of size_log; size_log is runtime metadata used for
bounds-checking slot indices.
Empty slots contribute zero_hash at the depth-16 leaf level; a
Missing(h) placeholder substitutes losslessly for the materialized
contents whose hash_tree_root equals h. This is the load-bearing
property for sparse cnode loading from cold storage.
size_log is permitted in 0..=16 (the spec’s hard ceiling).
Structs§
- CNode
Cap - CNode
Slot Entry - One populated slot — retained as a serialisation helper for callers
that need a flat
(slot, target)pair (e.g.,CacheDirectory::publish_cnode).
Constants§
- MAX_
CNODE_ SLOTS - Maximum cnode capacity (
2^16slots). The SSZ merkle tree depth is fixed at 16 regardless of an individual cnode’s declaredsize_log.