Skip to main content

verify_nonced_block

Function verify_nonced_block 

Source
pub fn verify_nonced_block(
    nonce: &[u8; 32],
    peer: &[u8; 32],
    key: &XorName,
    index: u32,
    block: &[u8],
    siblings: &[[u8; 32]],
    nonced_root: &[u8; 32],
    block_count: u32,
) -> bool
Expand description

Verify a nonced block opening (auditor, round 2): recompute the block leaf from the served bytes and fold it with siblings to the committed nonced_root.

block must be the Bao-verified block bytes for index, so this proves the responder committed a nonced root over the real content at round-1 time.