fix(byoc): use gRPC for PM ticket generation#5
Open
seanhanca wants to merge 2 commits intofeat/support-byoc-batchfrom
Open
fix(byoc): use gRPC for PM ticket generation#5seanhanca wants to merge 2 commits intofeat/support-byoc-batchfrom
seanhanca wants to merge 2 commits intofeat/support-byoc-batchfrom
Conversation
BYOC payment was broken because _create_byoc_payment() expected an orchestrator_info field from /process/token, which the BYOC orch never returns. This meant no PM tickets were ever generated. Fix: get OrchestratorInfo via gRPC on port 8935 (same mechanism LV2V uses), serialize it, and pass to signer /generate-live-payment. Also change payment type from "byoc" to "lv2v" since the signer only accepts that type for auto pixel calculation. Verified on staging: BYOC jobs now generate PM tickets with faceValue=2413920000000000 WEI, signer signs and tracks balance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Livepeer-Capability header to /generate-live-payment requests so the signer forwards it to the remote signer webhook (api.daydream.live/webhooks/remote-signer). This lets Daydream know which capability (e.g. flux-dev, nano-banana) was used and bill accordingly — no go-livepeer changes needed since r.Header is already forwarded to the webhook body. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OrchestratorInfovia gRPC (port 8935) instead of expecting it from/process/tokenwhich never returns it"byoc"to"lv2v"since the signer only acceptslv2vfor auto pixel calculationurlparseimport for deriving gRPC URL from BYOC HTTP originRoot Cause
BYOC payment was silently skipped because
_create_byoc_payment()expected anorchestrator_infofield from the/process/tokenresponse, but the BYOC orch never includes it. The SDK logged"BYOC token missing orchestrator_info, trying without payment"and sent jobs without PM tickets — making all BYOC inference free.Fix
Use the same gRPC
get_orch_info()call that LV2V uses to get the serializedOrchestratorInfoprotobuf, then pass it to the signer's/generate-live-paymentendpoint. The BYOC orch serves gRPC on port 8935 (via Caddy) alongside its HTTP API on port 8936.Verified on staging
faceValue=2413920000000000 WEI,Signed numTickets=1oldBalance → newBalanceLivepeer-Balanceheaderprice_per_unitto wei value)Test plan
Livepeer-Balanceheader is non-zero in response🤖 Generated with Claude Code