pub const CHUNK_GROUP_BYTES: u64 = _ /* 16_384u64 */;Expand description
Bao chunk-group granularity (16 KiB, ADR 038), re-exported because it is a
billing-visible property of CacheEngine::export_bao_range_stream: the
export snaps a requested range out to the enclosing group boundaries and the
serve path does not trim back, so the payer is charged for the aligned
superset. Any caller pricing a range before serving it must align first or it
under-reserves by up to two groups.
Bytes per chunk group, derived from IROH_BLOCK_SIZE (2^chunk_log 1 KiB
chunks) — the granularity an origin range must snap to, because a bao proof
anchors whole chunk groups to the root.
Public so a caller that must snap an offset to a group boundary WITHOUT
knowing the blob’s size can do so from the shared constant rather than
re-deriving it (the resumable client fetch, #1120: it picks its resume offset
before the signed response reveals total_bytes). Prefer align_range when
the size is known — it also bound-checks.