Skip to content

Reuse go-livepeer activity tracking for local payment recipient checks #35

Closed

Description

@j0sh

Problem

Challenge creation and payment receipt each resolve BondingManager and call isActiveTranscoder, contributing four synchronous RPC calls per paid request at the baseline in builder-core #89. See PaymentChain.IsActiveAt.

go-livepeer uses OrchestratorWatcher to maintain activation/deactivation information, then orchestrator.isActive checks the local database against the cached initialized round. Adapt this existing mechanism to node, reusing only the storage/watcher pieces needed for payment admission.

Work and acceptance

  • Make warm challenge and receipt activity checks local. Initialize missing state through bounded work and update it from activation/deactivation and round events. Handle missed events, removed logs/reorgs, and BondingManager address changes through the shared observer/binding infrastructure.
  • Keep the explicit ticket recipient distinct from the orchestrator's signing/node address. Check the recipient's activity at the same observation used for the payment's other chain checks; do not mix a newer activity/round result with older payer funds.
  • Retain useful additions from BlueClawNetwork/livepeer-node PR #1: observe the configured recipient during initialization, isolate an entry failure from unrelated entries, pin cold reads to the observation block, and apply freshness/refusal rules to paid readiness. Its full ChainView implementation need not be imported to obtain those properties.
  • Test warm challenges and receipts without recipient-activity RPCs, active/inactive and future activation/deactivation rounds, a recipient distinct from the node key, round rollover, reorgs, contract replacement, and unavailable/stale state. Unknown or unverifiable state must not authorize paid work. Readiness and payment admission should use the same state.

Uses shared block/round state #31 and retained contract bindings #32.

Reuse and attribution

Incorporate existing go-livepeer code and relevant tests as much as possible. Inspect originating git history; preserve original authorship and git-level provenance with suitable cherry-pick -x commits or a history-preserving import where practical. Where adaptation prevents that, retain license/copyright notices and add inline attribution naming the source repository, file, commit, and author(s). Preserve equivalent attribution for any code or tests taken from PR #1.

Activity

  1. added a commit that references this issue on Nov 6, 2026
    9cf4d8f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions