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.
Round1Work
A round-1 response together with the chunk bytes spent producing it.

Enums§

SubtreeAuditOrigin
Local subsystem that launched a storage-commitment audit.

Functions§

handle_subtree_challenge
Handle an incoming subtree audit challenge (responder side).
handle_subtree_challenge_measured
handle_subtree_challenge, additionally reporting the read-and-hash work it performed so the caller can charge it on every exit path.
handle_subtree_challenge_measured_with_pointers
handle_subtree_challenge_measured for a node that also commits pointers (ADR-0016): committed pointer leaves are answered from pointers.
handle_subtree_slice_challenge
Handle a round-2 slice challenge (responder side), ADR-0002 / V2-685.
handle_subtree_slice_challenge_with_pointer_bindings
handle_subtree_slice_challenge for a node that also commits pointers (ADR-0016): a committed pointer is answered with its whole signed record, the one bound says round 1 read (ADR-0019).
handle_subtree_slice_challenge_with_pointers
handle_subtree_slice_challenge for a node that also commits pointers (ADR-0016), without what round 1 bound for them.
pointer_bindings
The pointer bindings a round-1 response reports. Only a proof reports any.
run_subtree_audit
Run one gossip-triggered subtree audit against challenged_peer, pinned to the commitment hash the peer just gossiped (expected_commitment_hash).

Type Aliases§

PointerBindings
What round 1 bound for each committed pointer it proved, by address.