Skip to content

Enable on-chain payments for single-shot streaming (SSE) sessions #42

Description

@rickstaa

What

Wire the session payment streamer (#30 / #31) onto the single-shot streaming path so a held-open SSE single-shot call keeps paying for the duration of the stream, not just an upfront 402.

The pieces exist but aren't connected for single-shot:

Single-shot has no reserve_session, so the loop must be drivable off the call's challenge/stream.

Scope

  • Drive the payment streamer off call_runner's 402 challenge / LiveRunnerCallStream (session id = manifest_id), not a reserved LiveRunnerSession.
  • POST to the session-scoped endpoint …/apps/{runner}/session/{id}/payment (fix the current {origin}/payment target in send_payment).
  • Run the loop as a background asyncio task started after call_runner(stream=True) opens the stream; drain the stream concurrently (the async for yields so the loop ticks).
  • Drive cadence from the challenge's payment_interval (requires go-livepeer to surface it in the 402 challenge).
  • End-to-end paid-SSE test: 402 → open stream → concurrent interval payments → stream completes past the upfront amount.

Depends on / relates to

Part of the Live Runner: Single-Shot Pipelines project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions