Skip to main content

merkle_root

Function merkle_root 

Source
pub fn merkle_root(chunk_hashes: &[[u8; 32]]) -> [u8; 32]
Expand description

Fold per-chunk hashes into one value for the file.

A flat BLAKE3 over the file would require hashing in order, which would serialise a pipeline whose entire point is that chunks complete out of order. Hashing the ordered concatenation of chunk hashes gives an equally strong end-to-end check that each side can compute in parallel.