Repository navigation
fix(client): bound the stream rate by the probe quote the node was selected on - #2859
Conversation
…lected on LaneSources harvests each candidate's signed probe rate and builds every lane with effective_rate_ceiling(probe_rate, max_rate_per_mb) in place of the bare config value (CLI default 0, which disabled the stream-rate check entirely), the same bound the daemon's node-to-node miss pull applies. A late-joining holder's rate is captured too. Pulls that harvest no probe (the peer-store fast path, a pinned --node-id) keep the config bound only. Closes #2840 Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Code coverage overviewLanguages: Rust Rust / code-coverage/cargo-llvm-cov
View coverage of the 7 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Docs: the probe rate is the quote the node was selected on, not a rank key (selection ranks on RTT only); the max_rate_per_mb knobs on LaneDeps and the bundle builder are the absolute cap folded with the probed rate, not the only ceiling; RateAboveCeiling and ADR 037/039 describe the probe-relative bound on both built-in pull paths. Tests: a lane built through LaneSources from a probed candidate carries the probed rate as its PeerSource ceiling at config 0 (pins the build_fresh → lane_source splice); the two-holder fixture's samples carry distinct rates so a rate keyed to the wrong node fails; a re-probe overwrites a node's recorded rate. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Review pass (code / tests / comments) applied in 8dfe41e:
Reviewers confirmed no behavioral issues: honest nodes pass ( |
The daemon's node-to-node miss pull bounds the stream-signed rate by the probe rate (
effective_rate_ceiling); the CLI and SDK lanes did not.lane_sourcepassed the baremax_rate_per_mb(CLI default 0, and a 0 ceiling disables the stream-rate check entirely), while each candidate's signed probe rate was harvested into the peer store and never compared. A node that signs a low probe rate — the onedecdn quoteprints and selection ranks on — and a higher stream rate was paid the stream rate, up to MAX_RATE_PER_MB.LaneSourcesnow remembers each candidate's probed rate and builds every lane witheffective_rate_ceiling(probe_rate, max_rate_per_mb), the same bound the daemon applies and the SDK docs already prescribe. Honest nodes sign one startup-fixed rate on both paths and are unaffected. The bundle engine and gateway build lanes throughLaneSources, so they inherit the bound with no change. Pulls that harvest no probe (the peer-store fast path, a pinned node) keep the config bound only, as before.Closes #2840
🤖 Generated with Claude Code