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_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_READ_RETRY_BACKOFF_FACTOR
Growth of the pause between successive read-back retries.
FRESH_READ_RETRY_DELAY
Pause before the first retry of a failed chunk read-back in the offer dispatcher; each later retry waits FRESH_READ_RETRY_BACKOFF_FACTOR times longer than the one before.
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_ROUND1
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 AuditChallenge responses from any single source peer.
MAX_FRESH_READ_ATTEMPTS
How many times the offer dispatcher tries to read an accepted chunk back from storage before giving up on its fresh offers.
MAX_INCOMING_VERIFICATION_KEYS
Maximum keys accepted in one incoming verification request.
MAX_PAID_EVICTIONS_PER_PASS
Most paid-list entries one prune pass evicts.
MAX_PENDING_FRESH_OFFERS
Maximum number of encoded fresh-replication offers held in memory.
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_SESSION_POINTER_BINDINGS
Most pointer bindings every live round-1 session holds together (ADR-0019): 4 MiB of keys and roots at the cap, before the maps’ own overhead.
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_ROUND1_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_HINT_FULL_SCAN_ENTRIES
Paid-list entries up to which a sync hint build reads every entry.
PAID_LIST_ABSOLUTE_CONFIRM_FLOOR
Minimum Confirmed paid-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_EVICT_START_ENTRIES
Paid-list entry count above which prune passes evict entries (ADR-0028).
PAID_LIST_FLEX_EDGE_COUNT
Maximum number of furthest paid-list close-group peers treated as churny edge voters.
PAID_LIST_MAP_SIZE
LMDB map size for the paid list: 1 GiB.
PAID_LIST_NEAR_MARGIN_BITS
Bits beyond the distance to this node’s farthest paid-close-group peer within which a key still counts as near this node.
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 GetCommitmentByPin fetch.
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.
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) and SubtreeSliceChallenge/Response (round 2).
SUBTREE_AUDIT_TIMEOUT_LEAF_HINT
Conservative leaf-count hint for sizing the subtree-audit response deadline.
SUBTREE_ROUND1_LEAF_WORK_FLOOR_BYTES
Floor charged against the round-1 work budget per leaf attempted, in bytes.
SUBTREE_ROUND1_RESPONDER_COOLDOWN
Per-peer responder-side cooldown between heavy subtree round-1 proofs.
SUBTREE_ROUND1_WORK_BURST_BYTES
Burst capacity of the round-1 work budget, in bytes of chunk content.
SUBTREE_ROUND1_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.
VERIFICATION_REQUEST_TIMEOUT
Verification request timeout (per-batch).
VERIFICATION_RETRY_BACKOFF_MAX
Ceiling on the exponential backoff applied to an unresolved pending key.

Functions§

fresh_read_retry_delay
Pause before retrying a read-back that has failed failed_attempts times.
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.