Skip to main content

Module config

Module config 

Source
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. 1 <= QUORUM_THRESHOLD <= CLOSE_GROUP_SIZE
  2. Effective paid-list threshold is per-key dynamic: ConfirmNeeded(K) = floor(PaidGroupSize(K)/2)+1
  3. If constraints are violated at runtime reconfiguration, node MUST reject the config.

Structs§

ReplicationConfig
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_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.
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_BYTE_CHALLENGE_KEYS
Maximum keys per round-2 SubtreeByteChallenge (per-batch cap).
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_PRUNE_AUDIT_CHALLENGES_PER_PASS
Maximum number of prune-confirmation audit challenges sent per prune pass.
MAX_REPLICATION_MESSAGE_SIZE
Maximum replication wire message size.
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_CLOSE_GROUP_SIZE
Maximum number of closest nodes tracking paid status for a key.
PENDING_VERIFY_MAX_AGE
Maximum age for pending-verification entries before stale eviction.
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.
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 replication operations.
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_TIMEOUT_LEAF_HINT
Conservative leaf-count hint for sizing the subtree-audit response deadline.
VERIFICATION_REQUEST_TIMEOUT
Verification request timeout (per-batch).

Functions§

max_parallel_fetch
Returns the number of hardware threads available, used as the fetch concurrency limit.
storage_admission_width
Width used when deciding whether this node may locally store or retain a chunk.