Repository navigation
Description
Summary
Delete the voucher cadence mechanism outright, with no replacement. voucher_interval_mb was only ever a performance optimization — a way to amortize per-voucher signature/ack cost by paying every N MB instead of continuously. It is not structurally required.
Why it's deletable
The only thing the seller must enforce mid-stream is the credit window: delivered − paid stays within bound. A voucher is a cumulative claim over exact bytesDelivered, so:
- Payment granularity is emergent buyer behavior, not a protocol parameter — the buyer issues cumulative vouchers whenever it wants delivery to keep flowing, self-pacing to stay under the window. No negotiated or configured interval.
- Metering stays byte-exact at any payment frequency (the voucher carries exact bytes), so nothing about per-MB accounting needs a cadence.
Under the PayWord hash-chain the per-interval negotiation is also structurally impossible — one chain per lane fixes one granularity — so the concurrent-stream arbitration rules were unrepresentable anyway.
Together with the linked issues this is already fast
- docs(adr): land just PayWord (hash-chained per-MB meter) into ADR 003 #1670 (PayWord) — per-tick payment cost drops to ~one keccak, no ack, no per-tick signature.
- feat: credit-slow-start — fixed-ramp credit window (start slow, ramp quick) #1669 (credit-slow-start) — the ramped credit window (
credit_maxBDP-derived,credit_ramp_speed) is the throughput knob: a lane ramps to a large window and runs link-bound (throughput ≈ window / RTT).
A fixed cadence plus a ramping credit window already gets a connection to line rate for the RTTs that matter — the cadence knob adds nothing on top.
Delete
- Wire:
voucher_interval_mbfromStreamRequestExt+StreamResponse,MAX_VOUCHER_INTERVAL_MB,VoucherIntervalOutOfRange+ bothvalidate()bounds (crates/protocol/src/client.rs) - Node: the
min()/max(1)negotiation indispatch.rs,window.rs; dropinterval_bytesas a distinct knob — the serve loop pauses purely on the credit window - Config + reload:
voucher_interval_mb, its restart-only reload gate +[payment]notice test - Client: the already-dead
Noneproposer path inclient-pull - ADRs: 003 §Voucher Interval Negotiation + §Concurrent Streams rules 1 & 3; 005 wire; 012 cadence line; 013 frozen field; 038 framing text. Rewrite 003 §Credit window / 1669's floor language to drop "cadence/chunk" — the ramp floor is just a small starting window in bytes.
Depends on
Sequence after / alongside #1670 and #1669 (both re-home what little the interval touched: the credit-window floor and the group-commit batch cap).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
[-]feat: delete voucher cadence outright (no replacement)[/-][+]feat: delete voucher cadence negotiation outright (no replacement)[/+]feat(payments): delete voucher_interval_mb negotiation (#1676) (#1688)
Merge origin/main into claude/issue-1682-spec-impl-a29324