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
fix(node): serve_leg hoists its credit window once and never re-ramps #1769
crates/node/src/handlers/client/serve_leg.rs resolves its window ONCE before the delivery loop:
let chunk_bytes = CHUNK_BYTES;
let window = window.max(chunk_bytes);
and never recomputes it. Its twin on the cache-hit path, delivery.rs, recomputes per iteration:
let window = self.credit_window(chunk_bytes, paid);
So on the cache-miss serve leg the downstream window stays pinned at the ramp floor for the whole stream, however much the client pays — only the upstream pull leg ramps, via RampPacer reading served_paid_frontier. On the cache-hit path the same client ramps toward credit_max as ADR 003 §Credit Window describes.
The consequence is throughput, not safety: a paying client served through a miss stays at strict stop-and-wait, one chunk per round trip, so a high-RTT link is capped where the hit path would saturate it.
Pre-existing since #1669; unrelated to PayWord. Noticed while re-flooring both loops onto CHUNK_BYTES in #1752.
Activity
feat(payments): implement PayWord hash-chained per-MB meter (#1752)