server: Report payment interval in payment challenges - #4001
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
livepeer/go-livepeer#4001 adds payment_interval_ms to payment challenges. Until it lands the client guesses a cadence against the orchestrator's default debit interval, so record what replaces the guess. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add payment_interval_ms to the live runner payment challenge JSON (reservation, scope, and refresh-payment responses) so paying clients know the orchestrator's debit cadence and can size and time payments to keep the session balance funded. Ported from #3998 (originally approved as #3975). Co-authored-by: Brad P <brad@ad-astra.video> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
b333b99 to
9e58323
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4001 +/- ##
===================================================
- Coverage 35.53014% 35.47615% -0.05399%
===================================================
Files 174 174
Lines 45111 45112 +1
===================================================
- Hits 16028 16004 -24
- Misses 27814 27837 +23
- Partials 1269 1271 +2
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
The orchestrator's debit interval does not bound it: both sides bill by elapsed time at the same rate, so cadence changes how much credit is banked when a debit lands, not what a session costs. What has to hold is that a payment arrives inside the signer's opening payment. Drops the pointer to livepeer/go-livepeer#4001 with it. Reading the reported interval would not change the cadence we pick, since the bound comes from the signer, so that PR is closed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Closing — the cadence this reports turns out not to be the number a paying client needs. Both sides of the ledger bill by elapsed time at the same rate. The signer charges for the seconds since the last payment ( Working that through, the safety condition is So a client that read The rebase onto master is done, so if this is wanted later it is a clean 14-line diff to reopen. Credit to @ad-astra-video, whose original this ports (#3998, approved as #3975) — the close is about what the client can do with the value, not the change itself. |
The signer's opening payment bounds it, not the orchestrator's debit interval: both sides bill by elapsed time at the same rate. Drops the pointer to livepeer/go-livepeer#4001, closed for the same reason. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The signer's opening payment bounds it, not the orchestrator's debit interval: both sides bill by elapsed time at the same rate. Drops the pointer to livepeer/go-livepeer#4001, closed for the same reason. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
livepeer/go-livepeer#4001 adds payment_interval_ms to payment challenges. Until it lands the client guesses a cadence against the orchestrator's default debit interval, so record what replaces the guess. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The signer's opening payment bounds it, not the orchestrator's debit interval: both sides bill by elapsed time at the same rate. Drops the pointer to livepeer/go-livepeer#4001, closed for the same reason. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Stacked on #4000 (which is stacked on #3999).
What does this pull request do?
Adds
payment_interval_msto the payment challenge JSON so paying clients know the orchestrator's debit cadence and can size and time payments to keep the session balance funded. Without it, clients have no way to learn the interval and risk being released for underpayment between top-ups.Ports the challenge-interval change from #3998 by @ad-astra-video (originally approved as #3975), rebased onto the #3999/#4000 payment refactor. Credited as co-author.
Specific updates
payment_interval_mstoliveRunnerPaymentChallengeResponse, populated fromnode.LivePaymentIntervalin all three challenge producers: session reservation / single-shot challenge (runnerChallenge), scope challenge (scopePaymentChallenge), and the remote signer refresh path (RefreshPaymentin rpc.go).TestLiveRunnerReserveSessionOnchainReturnsPaymentChallenge.doc/live-runner.md.🤖 Generated with Claude Code