Skip to main content

commitment_hash

Function commitment_hash 

Source
pub fn commitment_hash(c: &StorageCommitment) -> Option<[u8; 32]>
Expand description

The pin: BLAKE3(DOMAIN_COMMITMENT_HASH || postcard(commitment)).

Equal commitments produce equal hashes; any change to root, key_count, peer ID, pubkey, or signature changes the hash. A quote pins a commitment by this value; resolving the quote means finding a commitment that hashes to the pin.

§Errors

Returns None only if postcard fails to serialize the commitment — not reachable for a well-formed ML-DSA-65 commitment. Callers treat None as a malformed commitment and drop it.