You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Node-local client acceptance policy: de-prioritize / rate-limit / reject keys with elevated voucher-withhold history #482
ADR 003 §Corrupted delivery (per PR #480) frames per-encounter wire risk as bounded by voucher_interval on each side, with node-local acceptance policy as the right place to handle persistent client misbehavior:
Both sides set local acceptance policies — nodes refuse continued service to keys with elevated voucher-withhold rates and may cap total bytes for keys without established history […] without protocol-level coordination. Client reputation is a node-local concern; this ADR does not specify a wire format or on-chain surface for it.
This issue tracks the node-side implementation so the framing in ADR 003 has a concrete realization.
Goals
Track per-channel-funder reputation locally and apply progressively stricter responses to bad actors:
Track voucher-completion ratio per channel.client address over a sliding window (e.g. last 100 streams or last 7 days, whichever is smaller). A "withheld" stream = bytes shipped, no voucher returned for the corresponding window.
Three-tier response:
Trusted (high completion ratio, established history): full service.
Untrusted-new (no history, or borderline ratio): cap total bytes per encounter (e.g. 1 GB before requiring a completed voucher cycle), apply a small admission rate-limit.
Sybil resistance is structural (channel-open cost on L2 + minimum funded amount), so the policy doesn't need cryptographic anti-Sybil — just persistent local accounting.
Suggested implementation seam
crates/node's admission path. Probably a small new struct in crates/incentive (since vouchers live there) — e.g. ClientReputationLedger keyed by Address with:
completion_ratio_ewma: f32 (alpha ~0.1, similar to ADR 008's reputation EWMA)
Activity
feat(incentive): add ClientReputationLedger building block (#482) (#663)