referrerpolicy=no-referrer-when-downgrade

streams_root_from_proof

Function streams_root_from_proof 

Source
pub fn streams_root_from_proof(
    stream: StreamId,
    stream_root: Hash,
    membership: &StreamProof,
) -> Option<StreamsRoot>
Expand description

Fold a membership proof for (stream, stream_root) up to the StreamsRoot it implies, or None on a malformed step. Callers compare the root themselves (the requires-lift records it, the fetch checks it against under). Each branch direction is stream’s bit at split_bit, so a proof built for another stream folds the siblings on the wrong sides and yields a different root.