Skip to content

Implement probe-time stake-lane eligibility in probe handler #757

Closed

Description

@yigitdot

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_holds pressure, reserve probe-acceptance headroom for requesters with bondOf >= 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

References

Activity

  1. added
    rust
    on Jun 1, 2026
  2. github-actions commented on Jun 1, 2026

    @github-actions

    🎯 Triage report

    This is a well-scoped implementation task to add stake-lane prioritization in crates/node/src/handlers/probe.rs. Under max_probe_holds pressure, registered operators (node-to-node cache-miss probes) should get reserved headroom by consulting ChainStakerSet, which is already wired up in the DHT handler. The out-of-scope boundaries are clearly defined and the required infrastructure already exists.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Concrete implementation with defined scope and existing infrastructure
    Labels technical, rust Rust implementation in crates/node; technical already applied
    Coding agent Suitable Clear target file, existing ChainStakerSet to reuse, well-defined success criteria, operator-tunable defaults

    🔗 Similar issues

    💡 Notes and suggestions

    Key implementation points:

    1. Target file: crates/node/src/handlers/probe.rs — add stake check at the probe-acceptance decision point where has_blob: true is signed.
    2. ChainStakerSet reuse: Located at crates/node/src/dht/chain_staker_set.rs. Check bondOf(requester_address) >= bond_required(declared_capacity) to determine lane. No new chain wiring needed — just inject a reference into the probe handler.
    3. NodeId→address resolution: The probe carries a NodeId↔address binding; resolve it to an Ethereum address before consulting ChainStakerSet. If resolution fails or the requester isn't a registered operator, fall through to the non-stake lane.
    4. Config shape: Add operator-tunable fields (e.g., stake_lane_reserved_headroom: Option<u32>) to the node config, defaulting to None/zero so existing single-lane operators are unaffected.
    5. Anti-panic policy: Use ChainStakerSet::get() or equivalent fallible accessor; don't unwrap/expect — clippy will reject it.

    Sub-tasks:

    • Inject ChainStakerSet handle into the probe handler context
    • Add NodeId→address resolution helper (may already exist in DHT handler — check for reuse)
    • Implement lane decision: stake check → reserved headroom logic
    • Add config fields with serde defaults to preserve single-lane behavior
    • Unit tests: stake lane reserves headroom; non-registered requester → regular lane; config disabled → no change in behavior

    Generated by Agentic Triage for issue #757 · sonnet46 463.7K · ◷

    Add this agentic workflows to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. self-assigned this
    on Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

rust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions