Skip to main content

handle_audit_challenge

Function handle_audit_challenge 

Source
pub async fn handle_audit_challenge(
    challenge: &AuditChallenge,
    storage: &LmdbStorage,
    self_peer_id: &PeerId,
    is_bootstrapping: bool,
    stored_chunks: usize,
) -> AuditResponse
Expand description

Handle an incoming audit challenge (responder side).

Validates that the challenge targets this node, computes per-key digests, and returns the response. Rejects challenges where challenged_peer_id does not match self_peer_id to prevent an oracle attack where a malicious challenger forges digests for a different peer.