Skip to content

feat: delete voucher cadence negotiation outright (no replacement) #1676

Closed

Description

@alpergundogdu

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

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_mb from StreamRequestExt + StreamResponse, MAX_VOUCHER_INTERVAL_MB, VoucherIntervalOutOfRange + both validate() bounds (crates/protocol/src/client.rs)
  • Node: the min()/max(1) negotiation in dispatch.rs, window.rs; drop interval_bytes as 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 None proposer path in client-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).

Activity

  1. added this to the v0.1 milestone on Aug 13, 2026
  2. changed the title [-]feat: delete voucher cadence outright (no replacement)[/-] [+]feat: delete voucher cadence negotiation outright (no replacement)[/+] on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions