Repository navigation
Conversation
Split fixed-price quotes across the fewest tickets that fit the signer’s limits. For metered jobs, target three seconds of quoted usage per ticket and keep billing based on elapsed time and carried credit. Size the winning payout from recent redemption fees and payer funding, then derive the odds from ticket EV. Ensure the payer’s reserve can cover every ticket winning in the fixed-price or metered opening batch.
Base the Arbitrum example on finalized redemption costs. Remove fee sampling and the public estimate route while retaining quote-based EV and payer funding checks.
There was a problem hiding this comment.
🟡 Changes recommended
Ticket sizing rejects valid exact-limit quotes due to rounding, while a settlement race can overstate available reserve and produce terms that fail receipt-time funding checks.
2 open issues
What changed in this PR
Makes job-specific ticket sizing the default for paid sessions, adapting payouts and odds to payer funding and signer limits.
Changes:
- Sizes fixed-price and metered tickets from quoted usage.
- Adds recipient reserve checks and shared payment constants.
- Updates configuration, documentation, and tests.
| File | Description |
|---|---|
| signer/payment.go | Uses shared opening-duration constant. |
| signer/payment_test.go | Tests adaptive quotes and signer payments. |
| redemption/state.go | Adds recipient-specific liability queries. |
| redemption/redeemer_db.go | Checks reserve during receipt storage. |
| redemption/redeemer_db_test.go | Tests winning-ticket reserve checks. |
| redemption/http_test.go | Checks unsupported fee-estimate route. |
| pm/remotepayment.go | Defines shared payment limits. |
| pm/payerpolicy.go | Uses shared batch limit. |
| orchestrator/ticket_sizing.go | Implements funding-aware ticket sizing. |
| orchestrator/ticket_sizing_test.go | Tests sizing and funding limits. |
| orchestrator/redemption.go | Passes funding into receipt storage. |
| orchestrator/payment.go | Handles challenge funding errors. |
| orchestrator/payment_engine.go | Integrates adaptive quotes and receipt checks. |
| orchestrator/metrics.go | Classifies unpayable quotes as rejected. |
| orchestrator/metrics_test.go | Updates receipt-storage test arguments. |
| orchestrator/app.go | Enables adaptive sizing and configuration. |
| orchestrator/app_test.go | Verifies adaptive startup parameters. |
| docs/orchestrator.md | Documents sizing and funding semantics. |
| configs/orchestrator/config.example.toml | Updates commented payment configuration examples. |
| cmd/livepeer/testdata/cli/orchestrator-help.golden | Updates expected sizing flag help. |
Review effort: Balanced
Check the collateral watermark with pending liability before quoting. If normal quotes fail at a signer ceiling, use the largest funded face value that can encode the exact EV.
Check failed challenge and refresh responses over HTTP. Clarify that fixed quotes keep the funded face value when a batch fits within signer limits.
Use the whole signed batch to check funding and queue capacity. Persist liability only for winning tickets.
There was a problem hiding this comment.
🟡 Changes recommended
Ticket sizing can produce payouts below redemption costs, preventing credited wins from being redeemed; final payouts need minimum-value validation, including the exact-EV fallback.
1 open issue
1 resolved since last review
Review effort: Balanced
Use the fixed redemption estimate on Arbitrum One when sizing initial quotes and exact-EV fallbacks. Keep the transaction-specific cost check at redemption.
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because recipient-only quoting can exceed payer-wide collateral limits, causing receipt admission to reject tickets even without a funding change.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Account for outstanding wins across recipients when quoting available payer collateral, using the same calculation as receipt admission.
|
|
There was a problem hiding this comment.
🔵 Needs a closer look
Payment-domain review is needed to validate cross-recipient TicketBroker collateral assumptions and the fixed Arbitrum redemption-cost floor before deploying the default-on payment-sizing and commitment changes.
No open issues 🎉
Review effort: Balanced


Node sizes payment tickets by default for all paid sessions. At the funded face value, fixed-price jobs use the fewest tickets that cover the quote within the signer limits. Metered tickets target three seconds of quoted usage while the signer bills elapsed time and applies carried credit.
TicketFaceValuesets the baseline winning payout. The example uses 0.0024 ETH based on recent Arbitrum redemption receipts. On Arbitrum One, payouts must exceed the fixed 0.000012 ETH redemption estimate. Node caps the payout by payer funding and derives the odds from the job's EV. Receipt admission checks funding and queue space for the full signed batch.Fixes #91
Fixes #101