Skip to main content

MAX_AUDIT_RESPONSES_PER_PEER

Constant MAX_AUDIT_RESPONSES_PER_PEER 

Source
pub const MAX_AUDIT_RESPONSES_PER_PEER: u32 = 2;
Expand description

Maximum concurrent in-flight audit-responder tasks from any SINGLE peer.

The global MAX_CONCURRENT_AUDIT_RESPONSES ceiling alone is not flood-fair: one peer spamming challenges could occupy every slot and starve honest auditors (whose dropped challenges convert to audit failures or timeout verdicts on the challenged peers). This per-peer cap guarantees no source holds more than its share, so a flood self-throttles. Audits are cooldown-gated (one gossip-triggered audit per peer per 30 min), so 2 in-flight per peer comfortably covers the legitimate round-1 + round-2 overlap.