Skip to main content

verify_commitment_signature

Function verify_commitment_signature 

Source
pub fn verify_commitment_signature(c: &StorageCommitment) -> bool
Expand description

Verify a commitment’s signature using the embedded sender_public_key.

Returns true iff the signature is valid for (root, key_count, sender_peer_id, sender_public_key) under c.sender_public_key and DOMAIN_COMMITMENT. Returns false on key-format or signature-format errors so the caller can simply drop the gossip.

Verifying against the embedded key removes the need for an external PeerId → MlDsaPublicKey lookup. The peer-id binding gate in ingest_peer_commitment (and the auditor’s evaluate_subtree_structure) still ensures the embedded key belongs to the claimed peer.