Skip to content

fix(remote_signer): fix ticket value calculation for capability-constraint pricing#3859

Closed
eliteprox wants to merge 3 commits intoja/remote-signer-ticketsfrom
jm/capability-constraint-pricing
Closed

fix(remote_signer): fix ticket value calculation for capability-constraint pricing#3859
eliteprox wants to merge 3 commits intoja/remote-signer-ticketsfrom
jm/capability-constraint-pricing

Conversation

@eliteprox
Copy link
Collaborator

@eliteprox eliteprox commented Jan 22, 2026

What does this pull request do? Explain your changes. (required)

This PR updates the remote signer's ticket value calculation to use capability/model-specific pricing from the gateway, so that accurate price info can be provided to the signer.

The change removes the Type field in favor of PriceInfo.Capability for capability and sets model_id to PriceInfo.Constraint which matches how orchestrators advertise pricing for live-video-to-video

Specific updates (required)

Removes the Type field in favor of PriceInfo.Capability for capability and sets model_id to PriceInfo.Constraint which matches how orchestrators advertise pricing for live-video-to-video

  • Gateway now fetches capability/model–scoped OrchestratorInfo (including matching TicketParams) before requesting payments, and sends that alongside the selected PriceInfo to the signer.
  • Remote signer trusts the provided OrchestratorInfo/PriceInfo, no longer performs its own GetOrchestratorInfo refresh, and normalizes defaults for capability/constraint.
  • Updated RemotePaymentRequest to replace the Type field with PriceInfo which contains pricing for all capabilities. OrchestratorInfo.Capability and PriceInfo.Constraint are used for ticket valuation on lv2v requests, matching how orchestrators advertise pricing for live-video-to-video
  • Added a safeguard to always issue at least one ticket in the first payment to avoid zero-balance rejections, and updated Python client helpers to request scoped orchestrator info via capabilities.

How did you test each of these updates (required)

  • Tested with on-chain remote signer and orchestrator (excluding -pricePerPixel and -pricePerUnit flag along with this models config:
[
    {
      "currency": "USD",
      "model_id": "noop",
      "pipeline": "live-video-to-video",
      "pixels_per_unit": 995328000000,
      "price_per_unit": 5,
      "warm": true,
      "capacity": 1
    }
]

Does this pull request close any open issues?

Fixes how remote signer calculates ticket value, by ensuring it uses the correct capability/constraint price
Removes unintended requirement that orchestrator have -pricePerPixel and -pricePerPixel flags set

Checklist:

…nsure correct price is requested from orch

- Update tests to reflect new ticket parameters and capabilities for lv2v transactions
… video payments

- Updated the payment request structure to include price information directly.
- Adjusted logic to derive capabilities and constraints based on provided price info.
- Removed outdated tests related to LV2V capabilities and pricing.
- Ensured proper handling of missing or zero price information in payment generation.
@github-actions github-actions bot added go Pull requests that update Go code AI Issues and PR related to the AI-video branch. labels Jan 22, 2026
@eliteprox eliteprox changed the title Jm/capability constraint pricing fix(remote_signer): fix ticket value calculation for capability-constraint pricing Jan 22, 2026
@eliteprox eliteprox requested a review from j0sh January 22, 2026 20:29
@eliteprox eliteprox marked this pull request as ready for review January 22, 2026 20:29
…date payment request structure

- Eliminated modelID from SegmentInfoSender to streamline payment processing.
- Updated payment request to utilize priceInfo from orchestrator for better pricing accuracy.
@eliteprox
Copy link
Collaborator Author

Closing PR as it not needed

  • Pricing is encoded into ticketParams, provided by OrchestratorInfo response, can't be modified at any point
  • OrchestratorInfo request simply needed the correct capability and model to return the correct ticketparams/price, I had been modifying it on the gateway side before sending to signer, which was incorrect.

@eliteprox eliteprox closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Issues and PR related to the AI-video branch. go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant