Expand description
Tunable parameters for the replication subsystem.
All values below are a reference profile used for logic validation. Parameter safety constraints (Section 4):
1 <= QUORUM_THRESHOLD <= CLOSE_GROUP_SIZE- Effective paid-list threshold is per-key dynamic:
ConfirmNeeded(K) = floor(PaidGroupSize(K)/2)+1 - If constraints are violated at runtime reconfiguration, node MUST reject the config.
Structs§
- Replication
Config - Runtime-configurable replication parameters.
Constants§
- AUDIT_
FAILURE_ TRUST_ WEIGHT - Trust event weight for confirmed audit failures.
- AUDIT_
ON_ GOSSIP_ COOLDOWN_ SECS - Per-peer cooldown between gossip-triggered subtree audits (ADR-0002), in seconds. Bounds how often any one peer is audited regardless of gossip rate.
- AUDIT_
ON_ GOSSIP_ PROBABILITY - Probability of launching a subtree audit when a peer’s changed commitment is ingested via gossip (ADR-0002). Keeps audits occasional surprise exams.
- AUDIT_
RESPONDER_ SUMMARY_ INTERVAL - Cadence of audit-responder capacity and slow-processing summaries.
- AUDIT_
RESPONDER_ TOP_ ORIGINS - Number of busiest source peers included in each responder summary window.
- AUDIT_
SPOTCHECK_ COUNT - Number of subtree leaves spot-checked against real chunk bytes per audit (ADR-0002 real-bytes layer).
- AUDIT_
TICK_ INTERVAL_ MAX - Audit scheduler cadence range (max).
- AUDIT_
TICK_ INTERVAL_ MIN - Audit scheduler cadence range (min).
- BOOTSTRAP_
CLAIM_ GRACE_ PERIOD - Maximum duration a peer may claim bootstrap status before penalties apply.
- FETCH_
REQUEST_ TIMEOUT - Fetch request timeout.
- FIRST_
AUDIT_ BUDGET_ BURST - ADR-0004 Amendment 2: token-bucket capacity for monetized first-audit launches.
- FIRST_
AUDIT_ COUNT_ JUMP_ DEN - Denominator of the count-jump override ratio. See
FIRST_AUDIT_COUNT_JUMP_NUM. - FIRST_
AUDIT_ COUNT_ JUMP_ NUM - ADR-0004 Amendment 2: committed-count jump that overrides the per-peer
re-audit window, as a ratio (
new > old * NUM / DEN, integer math). - FIRST_
AUDIT_ DRAIN_ BATCH - ADR-0004: max monetized-pin events the first-audit drainer drains from its channel per wake before it must run the audit-launch phase.
- FIRST_
AUDIT_ INGRESS_ CAPACITY - ADR-0004 Amendment 2: capacity of the bounded verifier-to-drainer monetized-pin channel.
- FIRST_
AUDIT_ LAUNCH_ INTERVAL - ADR-0004 Amendment 2: token-bucket refill interval for monetized first-audit launches — one launch token per interval, per node.
- FIRST_
AUDIT_ LAUNCH_ JITTER_ MAX - ADR-0004 Amendment 2: max uniform random delay applied before sending a monetized first-audit challenge.
- FIRST_
AUDIT_ MAX_ INFLIGHT - ADR-0004 Amendment 2: max concurrently in-flight monetized first audits per node.
- FIRST_
AUDIT_ PEER_ REAUDIT_ INTERVAL - ADR-0004 Amendment 2: per-peer suppression window between monetized first audits, across commitment rotations.
- FIRST_
AUDIT_ RETRY_ INTERVAL - ADR-0004: first-audit drainer retry cadence for cooldown-pending pins.
- FIRST_
AUDIT_ SUMMARY_ INTERVAL - Interval for the cumulative first-audit scheduler observability summary.
- FRESH_
REPLICATION_ DELIVERY_ MAX_ RETRIES - Best-effort delivery retries for a fresh-replication push, per peer.
- K_
BUCKET_ SIZE - Maximum number of peers per k-bucket in the Kademlia routing table.
- MAX_
AUDIT_ RESPONSES_ PER_ PEER - Maximum concurrent in-flight audit-responder tasks from any SINGLE peer.
- MAX_
CONCURRENT_ AUDIT_ RESPONSES - Maximum number of concurrent in-flight audit-responder tasks.
- MAX_
CONCURRENT_ REPLICATION_ SENDS - Maximum number of concurrent outbound replication sends.
- MAX_
CONCURRENT_ SUBTREE_ ROUN D1 - Dedicated global concurrency cap for the HEAVY subtree-audit round 1.
- MAX_
CONCURRENT_ VERIFICATION_ REQUESTS - Maximum simultaneous verification request/response exchanges. Larger rounds remain fully batched but wait for a permit instead of launching hundreds or thousands of network requests at once.
- MAX_
DIGEST_ AUDIT_ RESPONSES_ PER_ PEER - Maximum concurrent digest-only
AuditChallengeresponses from any single source peer. - MAX_
FAST_ PRUNE_ DELETIONS_ PER_ PASS - Maximum mature records deleted through the complete width-20 fast path per pass.
- MAX_
INCOMING_ VERIFICATION_ KEYS - Maximum keys accepted in one incoming verification request.
- MAX_
PIN_ FETCHES_ PER_ BUNDLE - ADR-0004: max unresolved quote pins to fetch per payment bundle.
- MAX_
PRUNE_ AUDIT_ CANDIDATES_ PER_ PASS - Maximum mature records selected for prune-confirmation auditing per pass.
- MAX_
PRUNE_ AUDIT_ REQUESTS_ PER_ PASS - Maximum initial prune-confirmation audit requests sent per pass.
- MAX_
REPLICATION_ MESSAGE_ SIZE - Maximum replication wire message size.
- MAX_
SLICE_ OPENINGS - Maximum block openings per round-2
SubtreeSliceChallenge. - MAX_
SUBTREE_ AUDIT_ MESSAGE_ SIZE - Maximum wire size for a message in the subtree-audit protocol family.
- MAX_
SUBTREE_ ROUN D1_ PER_ PEER - Per-peer concurrency cap for the heavy subtree-audit round 1. One in-flight round-1 proof per source at a time (an honest auditor never needs more).
- MAX_
SUBTREE_ SESSIONS - Capacity backstop on the live round-1 session map (bounds memory if many peers open sessions; oldest are evicted past this).
- MAX_
VERIFICATION_ KEYS_ PER_ CYCLE - Maximum ready hints processed by one verification cycle.
- MERKLE_
PARITY_ ENFORCED_ FROM_ UNIX - Instant from which a merkle batch payment must carry the same 3x settlement multiplier the single-node path has always applied (ADR-0008). Unix seconds.
- NEIGHBOR_
SYNC_ COOLDOWN - Per-peer minimum spacing between successive syncs with the same peer.
- NEIGHBOR_
SYNC_ INTERVAL_ MAX - Neighbor sync cadence range (max).
- NEIGHBOR_
SYNC_ INTERVAL_ MIN - Neighbor sync cadence range (min).
- NEIGHBOR_
SYNC_ PEER_ COUNT - Number of close-neighbor peers synced concurrently per round-robin repair round.
- NEIGHBOR_
SYNC_ SCOPE - Number of closest peers to self eligible for neighbor sync.
- PAID_
LIST_ ABSOLUTE_ CONFIRM_ FLOOR - Minimum
Confirmedpaid-list votes required to authorize a key, whatever the flexible edge does to the denominator. - PAID_
LIST_ CLOSE_ GROUP_ SIZE - Maximum number of closest nodes tracking paid status for a key.
- PAID_
LIST_ FLEX_ EDGE_ COUNT - Maximum number of furthest paid-list close-group peers treated as churny edge voters.
- PENDING_
VERIFY_ MAX_ AGE - Maximum age for pending-verification entries before stale eviction.
- PIN_
FETCH_ NEGATIVE_ CACHE_ CAPACITY - ADR-0004: capacity of the per-peer negative cache for unresolved pin fetches.
- PIN_
FETCH_ TIMEOUT - ADR-0004: timeout for a
GetCommitmentByPinfetch. - POSSESSION_
CHECK_ DELAY_ MAX - Upper bound of the possession-check delay (ADR-0003).
- POSSESSION_
CHECK_ DELAY_ MIN - Lower bound of the delay before a fresh-replication possession check runs (ADR-0003).
- PRUNE_
HYSTERESIS_ DURATION - Minimum continuous out-of-range duration before pruning a key.
- QUORUM_
THRESHOLD - Full-network target for required positive presence votes.
- QUOTE_
ARITHMETIC_ RECHECK_ ENABLED - Rollout gate for ADR-0004 quote-arithmetic enforcement.
- QUOTE_
COMMITMENT_ MISMATCH_ TRUST_ ENABLED - Rollout gate for ADR-0004 quote/commitment mismatch trust reporting.
- RELEASE_
SUSPEND_ CLOSE_ GROUP_ STORAGE_ PENALTY - Whether this build penalises a peer for not holding a chunk it was supposed to hold.
- REPAIR_
HINT_ MIN_ AGE - Minimum age for a replica repair hint before the hinted peer can be audited for that key.
- REPLICATION_
PROTOCOL_ ID - Protocol identifier for core replication operations, including the digest-based responsible-chunk, possession, and prune-confirmation audits.
- SELF_
LOOKUP_ INTERVAL_ MAX - Periodic self-lookup cadence range (max).
- SELF_
LOOKUP_ INTERVAL_ MIN - Periodic self-lookup cadence range (min) to keep close neighborhood current.
- STORAGE_
ADMISSION_ MARGIN - Extra local-routing-table positions accepted for local chunk storage admission and stored-record pruning.
- SUBTREE_
AUDIT_ PROTOCOL_ ID - Protocol identifier for the subtree storage-commitment audit (ADR-0002 /
V2-685), both rounds:
SubtreeAuditChallenge/Response(round 1) andSubtreeSliceChallenge/Response(round 2). - SUBTREE_
AUDIT_ TIMEOUT_ LEAF_ HINT - Conservative leaf-count hint for sizing the subtree-audit response deadline.
- SUBTREE_
ROUN D1_ LEAF_ WORK_ FLOOR_ BYTES - Floor charged against the round-1 work budget per leaf attempted, in bytes.
- SUBTREE_
ROUN D1_ RESPONDER_ COOLDOWN - Per-peer responder-side cooldown between heavy subtree round-1 proofs.
- SUBTREE_
ROUN D1_ WORK_ BURST_ BYTES - Burst capacity of the round-1 work budget, in bytes of chunk content.
- SUBTREE_
ROUN D1_ WORK_ REFILL_ BYTES_ PER_ SEC - Sustained rate at which the responder-wide round-1 work budget refills, in bytes of chunk content per second.
- SUBTREE_
SESSION_ TTL - Lifetime of a single-use round-1 → round-2 session.
- SUSPEND_
CLOSE_ GROUP_ STORAGE_ PENALTY_ ENV - Environment override for
RELEASE_SUSPEND_CLOSE_GROUP_STORAGE_PENALTY, for a canary. - VERIFICATION_
REQUEST_ TIMEOUT - Verification request timeout (per-batch).
- VERIFICATION_
RETRY_ BACKOFF_ MAX - Ceiling on the exponential backoff applied to an unresolved pending key.
Functions§
- apply_
close_ group_ storage_ penalty_ policy - Apply this release’s decision. Called once, before anything can audit.
- close_
group_ storage_ penalty_ suspended - Whether failing to hold a close-group chunk currently penalises.
- max_
parallel_ fetch - Returns the number of hardware threads available, used as the fetch concurrency limit.
- penalise_
unheld_ close_ group_ chunk - Penalise
peeratweightfor not holding a chunk it was supposed to be holding, unless this release withholds that particular penalty. - set_
close_ group_ storage_ penalty_ suspended - Set whether failing to hold a close-group chunk penalises.
- storage_
admission_ width - Width used when deciding whether this node may locally store or retain a chunk.