Skip to content

Negotiate payment before streaming uploads - #90

Merged
j0sh merged 2 commits into
mainfrom
ja/streaming-payment-negotiation
Nov 5, 2026
Merged

j0sh merged 2 commits into
mainfrom
ja/streaming-payment-negotiation

Conversation

@j0sh

@j0sh j0sh commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Acquire challenges without consuming input for single-shot runners, then sign payment and upload immediately.

Remove Expect handling while preserving replay buffering, retry checks, and cancellation cleanup.

Closes #82

Acquire challenges without consuming input for single-shot
runners, then sign payment and upload immediately.

Remove Expect handling while preserving replay buffering, retry checks,
and cancellation cleanup.
Copilot AI balanced review requested due to automatic review settings November 5, 2026 03:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The documentation omits the single-shot mode and finite positive price required for preflight, overstating the unread-source guarantee for URL-only configurations that can consume the source and prevent payment retry when retry buffering is disabled.

1 open issue
What changed in this PR

This PR replaces Expect: 100-continue handling with payment negotiation before streamed uploads to runners identified as on-chain single-shot runners.

Changes:

  • Acquires payment challenges using empty requests before reading upload sources.
  • Removes continuation handling while retaining replay checks and cancellation cleanup.
  • Updates upload tests and documentation for negotiation and timeout behavior.
File Description
tests/​test_call_runner_uploads.py Tests payment negotiation, source preservation, retries, and upload timeouts.
src/​livepeer_gateway/​runner_payload.py Removes expect100 and houses writer cancellation cleanup.
src/​livepeer_gateway/​live_runner.py Adds metadata-gated payment negotiation before uploads.
src/​livepeer_gateway/​http.py Removes continuation sessions and supports empty challenge requests.
src/​livepeer_gateway/​_http_continue.py Deletes obsolete continuation-handshake support.
docs/​runner-payloads.md Documents payment negotiation, replay requirements, and revised timeouts.

Review effort: Balanced

Comment thread docs/runner-payloads.md Resolved
Copilot AI balanced review requested due to automatic review settings November 5, 2026 04:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the payment-first streamed upload changes.

1 open issue

Review effort: Balanced

@j0sh
j0sh merged commit e52ad26 into main Nov 5, 2026
6 checks passed
@j0sh
j0sh deleted the ja/streaming-payment-negotiation branch November 5, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CF Tunnels responds to 100 Expect

2 participants