Skip to main content

Module storage_commitment_audit

Module storage_commitment_audit 

Source
Expand description

Gossip-triggered contiguous-subtree storage audit (ADR-0002).

A node commits to what it stores (a signed Merkle StorageCommitment gossiped to neighbours). On receiving a peer’s changed commitment, a neighbour may audit it: pin the just-gossiped root, send a fresh nonce that deterministically selects one contiguous subtree, and require the peer to prove that subtree (structure + real bytes) within a deadline. This module owns the auditor entry point run_subtree_audit and the responder handler handle_subtree_challenge; the pure proof maths live in crate::replication::subtree.

Structs§

AuditCredit
Holder-eligibility cache the auditor credits on a passing audit.

Functions§

handle_subtree_byte_challenge
Handle a round-2 byte challenge (responder side), ADR-0002.
handle_subtree_challenge
Handle an incoming subtree audit challenge (responder side).
run_subtree_audit
Run one gossip-triggered subtree audit against challenged_peer, pinned to the commitment hash the peer just gossiped (expected_commitment_hash).