Skip to main content

Module probe_hold

Module probe_hold 

Source
Expand description

Probe-triggered eviction-hold constants (ADR 005 §Probe-triggered eviction hold, §Hold budget; ADR 040 §Pinning, durable operator-evict, and the probe-hold stay engine-enforced).

When a node signs has_blob: true in a ProbeResponse it tries to keep the blob eviction-exempt for PROBE_HOLD_DURATION so it is still resident when the probing client’s follow-up pull arrives. The hold is best-effort, not a guarantee: presence governs the advertisement, and a hold is placed only if a slot is free (see ProbeHoldOutcome::BudgetExhausted). All three timing parameters derive from a single base value PROBE_SLASH_WINDOW, which remains the on-chain rate-manipulation probe↔stream window (ADR 014).

Enums§

ProbeHoldOutcome
Outcome of crate::CacheEngine::try_probe_hold, carrying two independent facts (ADR 005 §Probe-triggered eviction hold):

Constants§

DEFAULT_MAX_PROBE_HOLDS
Default maximum number of concurrently held (eviction-exempt) blobs (ADR 005 §Hold budget). Holds are per-blob: many peers probing one hash share a single slot. The canonical definition lives in the decdn-config-types leaf crate (#578) so the config default (decdn_common::config) and the cache engine default cannot drift apart; re-exported here as crate::probe_hold::DEFAULT_MAX_PROBE_HOLDS. Default ceiling on concurrently-held probe slots before the cache engine starts rejecting new probe holds (#276 / ADR 005). Shared so the config default and the cache engine’s own default cannot drift.
PROBE_HOLD_DURATION
How long a blob stays eviction-exempt after the node signs has_blob: true for it: PROBE_SLASH_WINDOW plus PROBE_HOLD_MARGIN (35s) — long enough to cover the probe→pull round trip. Derived from the slashing window because the two share a timescale, not because a hold has any slashing consequence (ADR 005 §Derived constants).
PROBE_HOLD_MARGIN
Extra margin over PROBE_SLASH_WINDOW absorbing network latency between signing and the requester opening a stream.
PROBE_SLASH_WINDOW
The on-chain probe↔stream window SlashJudge enforces for rate manipulation (ADR 014; surfaced in ADR 005 §Derived constants). The single base value the other timing parameters derive from.