Repository navigation
refactor(incentive): remove unenforceable client-reputation ledger (#1552) - #1606
Conversation
…1552) The ADR 003 client-reputation ledger was dead code — no constructor, no consumer, only the lib.rs re-exports. Rather than wire it into the cdn/client/v1 admission path, remove it: the abandoning-client threat it guarded is already bounded to one credit window per encounter by the self-enforcing pause and the seller-side pre-flight deposit guard (ADR 037 / #856), the bound is per-channel so a new wallet defeats any accumulated penalty, and the client already sinks its USDC deposit on openChannel with no free credit facility. A client-bound penalty would also mis-punish an honest crashed client resuming a stream. - delete crates/incentive/src/client_reputation.rs and its lib.rs exports - ADR 003 §Voucher withholding: state the channel-bound, resume-safe self-enforcing pause explicitly (next higher-nonce voucher on the same channel; no cross-connection accumulation) - ADR 003 §Corrupted delivery: drop the client-reputation acceptance policy framing; node-selection reputation is unchanged Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Warning Review limit reached
Next review available in: 39 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Pull request overview
This PR removes the unused/unenforceable client-reputation ledger from the decdn-incentive crate and updates ADR 003 to document the current, per-channel mechanical bounding behavior for voucher withholding and corruption scenarios.
Changes:
- Remove the
client_reputationmodule and all public re-exports fromcrates/incentive. - Delete the (previously dead-code)
ClientReputation*ledger implementation. - Update ADR 003 to describe the per-channel credit-window pause as the bounding mechanism, and drop the client-reputation framing for corrupted delivery.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/incentive/src/lib.rs | Removes client_reputation module declaration and re-exports. |
| crates/incentive/src/client_reputation.rs | Deletes the unused client-reputation ledger implementation. |
| adr/003-payments.md | Updates threat-model text to reflect per-channel mechanical bounds and removes client-reputation admission framing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage reportTotal: 80.26% (was 80.47%, ▼ 0.21%) — 57087/71130 lines
History
|
Copilot review on #1606: the "bytes already pulled are served from cache, not re-fetched" claim overstates. On the cache-miss window pull-through path a downstream drop calls abandon_window_serve → tee.abandon() (crates/node/src/handlers/client/window.rs:851), dropping the partial fill, so a reconnect re-pulls upstream. Only the direct-serve path resumes from the store. Reword to state the client is not penalized (pays only vouchered bytes, no accumulated black mark) without claiming zero re-fetch; the node's per-window cost bound is unchanged either way. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Closes #1552.
The triage for #1552 scoped the fix as wiring the ADR 003 client-reputation ledger into the
cdn/client/v1admission path. This PR does the opposite — it removes the ledger — because the admission control does not earn its place.Why remove instead of wire in
channel.clientaccumulates against a wallet address; wallets are free, so a client at its reject threshold opens a fresh channel from a new key and resets. It only taxes clients too naive to rotate.openChannellocks USDC and costs gas — no free credit facility. An abandoning client has already sunk its deposit and downstream bandwidth; there is nothing left to deter.Changes
crates/incentive/src/client_reputation.rs(1603 lines — no constructor, no consumer; only thelib.rsre-exports referenced it) and its exports.Verification
cargo build/cargo clippyclean acrossincentive,node,cli.ClientReputation/client_reputationreferences outsideadr/_history/.🤖 Generated with Claude Code