Repository navigation
Closed
Labels
rustDependabot: a Cargo update; use area: labels for Rust code otherwise
Description
Follow-up to #446 (corrected admission design) and #756 (ADR 003 §Admission and Priority correction).
The corrected design establishes that node-side congestion control happens at probe time — declining to sign has_blob: true, gated by the max_probe_holds hold budget — and that stake-lane eligibility is determinable only for requesters that are themselves registered operators (i.e. node-to-node cache-miss probes). The probe handler does not yet consult stake.
Scope
Implement optional stake-lane prioritization at probe-acceptance time in crates/node/src/handlers/probe.rs:
- Under
max_probe_holdspressure, reserve probe-acceptance headroom for requesters withbondOf >= bond_required(declared_capacity), so registered-operator (node-to-node) cache-miss probes are not starved by end-client load. - Reuse
ChainStakerSet(crates/node/src/dht/chain_staker_set.rs) — already bootstrapped + event-followed and consumed by the DHT handler — to resolve the requester's registered/active status and stake. No new chain wiring should be needed. - Resolve the requester address from the probe's NodeId↔address binding; if the requester is not a registered operator, treat as the non-stake (end-client) lane.
- Node-policy parameters (lane split / reserved headroom) should be operator-tunable, defaulting to a no-op so single-lane operators are unaffected.
Out of scope
- End-client probe lane eligibility (reputation / region / allow-list) — separate, no stake signal available.
- Any
cdn/client/v1stream-time admission logic — the paid-delivery handler does not exist yet (Implement cdn/client/v1 paid delivery protocol (StreamRequest, StreamResponse, ChunkData, vouchers) #317), and committed voucher rate is a mid-stream ordering signal, not an admission key.
References
- Corrected design: Implementation guidance: node admission and queueing policy #446 (corrected-design comment)
- ADR 003 §Admission and Priority (as corrected in docs(adr-003): correct §Admission and Priority to probe-time congestion control (#446) #756)
- ADR 005 §Hold budget; ADR 026 §Operator economics
Reacted by github-actions
Activity
github-actions commentedon Jun 1, 2026
🎯 Triage report
This is a well-scoped implementation task to add stake-lane prioritization in
crates/node/src/handlers/probe.rs. Undermax_probe_holdspressure, registered operators (node-to-node cache-miss probes) should get reserved headroom by consultingChainStakerSet, which is already wired up in the DHT handler. The out-of-scope boundaries are clearly defined and the required infrastructure already exists.📊 Assessment
technical,rustcrates/node;technicalalready appliedChainStakerSetto reuse, well-defined success criteria, operator-tunable defaults🔗 Similar issues
💡 Notes and suggestions
Key implementation points:
crates/node/src/handlers/probe.rs— add stake check at the probe-acceptance decision point wherehas_blob: trueis signed.ChainStakerSetreuse: Located atcrates/node/src/dht/chain_staker_set.rs. CheckbondOf(requester_address) >= bond_required(declared_capacity)to determine lane. No new chain wiring needed — just inject a reference into the probe handler.NodeId↔address binding; resolve it to an Ethereum address before consultingChainStakerSet. If resolution fails or the requester isn't a registered operator, fall through to the non-stake lane.stake_lane_reserved_headroom: Option<u32>) to the node config, defaulting toNone/zero so existing single-lane operators are unaffected.ChainStakerSet::get()or equivalent fallible accessor; don'tunwrap/expect— clippy will reject it.Sub-tasks:
ChainStakerSethandle into the probe handler contextNodeId→addressresolution helper (may already exist in DHT handler — check for reuse)serdedefaults to preserve single-lane behaviorAdd this agentic workflows to your repo
To install this agentic workflow, run
feat(node): surface ChainStakerSet watcher drift via metrics (#783)
feat(node): surface ChainStakerSet watcher drift via metrics (#783) (#…
refactor: two protocol simplifications — probe-hold reason label, ADR…
fix: correct the best-effort-hold rationale and close its doc/test gaps
refactor(slashing): retire the phantom-announcement offense (#1512)