Expand description
Tile coordinates, store paths and the widths a tree size gives each level, as C2SP tlog-tiles (https://c2sp.org/tlog-tiles) fixes them.
A tile at level l holds up to 256 hashes; hash i of tile n is the
RFC 9162 root over leaves [(n * 256 + i) * 256^l, (n * 256 + i + 1) * 256^l).
Level 0 holds leaf hashes. A full tile has 256 hashes; a partial tile has
1 to 255 and is never hashed into the level above.
Structs§
- Layout
- The tiles a tree of one size is stored as.
- Tile
- One tile: its level, its index within the level and how many hashes it
holds.
widthis 256 for a full tile and 1 to 255 for a partial one.
Constants§
- CHECKPOINT
- Store path of the signed checkpoint.
- HASH_
SIZE - Bytes per hash.
- MANIFEST
- Store path of the manifest over the sealed bundles.
- MAX_
ENTRY_ LEN - The longest entry a bundle can length-prefix.
- PUBLISH_
LOCK - Store path of the checkpoint lock.
- TILE_
HEIGHT log2(TILE_WIDTH): the tree height one tile level covers.- TILE_
WIDTH - Hashes per full tile, and entries per full bundle.
- TREE_
STATE - Store path of the mutable tree state (size and root), written last.
- TREE_
STATE_ LOCK - Store path of the writer lock.
Functions§
- entries_
path tile/entries/<N>for a full bundle,tile/entries/<N>.p/<W>for the partial one.- index_
path tile/index/<N>, the key sidecar of sealed bundleN.- parse_
entries_ path - The (bundle index, width) an entries path names.
- parse_
index_ path - The bundle index a sidecar path names.
- parse_
path_ elements - The index
path_elementswrote, or nothing when the text is not that. - path_
elements <N>as zero-padded 3-digit elements, all but the last prefixedx: 1234067 isx001/x234/067.