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
client-pull: pin the voucher-write terminal recovery on the gap-driven drive path #1995
UpstreamPull::next_chunk recovers a failed voucher write by reading one terminal message: a StreamEnd marks the stream ended and the chunk is still delivered, a StreamError surfaces as the typed rejection. The two loopback tests that cover it (client_completes_when_its_send_is_stopped_before_the_closing_voucher, client_surfaces_typed_rejection_when_its_send_is_stopped_before_the_closing_voucher) drive it through the test-utilstream_fetch wrapper, whose completion is decoder-based.
On the production driver::drive / PeerSource path completion is payment-based (driver.rs reads ledger.committed()), and a failed voucher write leaves that voucher armed, not committed (ledger.rs settle-high rule). After the recovery returns Ok and the leg finishes, the driver may see a paid frontier short of the gap end and re-open a leg at that frontier — a re-pull/re-pay of the residual, or an AmountRegression → reseed cycle if the node did receive the armed voucher. Nothing pins whether this converges or double-pays.
Suggested test (in crates/node/tests/client_loopback.rs beside the STOP_SENDING pair, or node_origin_pull.rs): a raw stop-then-StreamEnd server like serve_stop_send_then_signal that accepts multiple connections and honours [byte_offset, byte_len); run drive with PeerSource + ClientRangedStore (or Origin::fetch via provisioned_origin). Assert the fetch completes with correct bytes, ledger.settlement().bytes <= wire(blob) + one residual voucher, and connections accepted <= 2. Whatever the intended semantics, the test pins them.
Activity