livepeer / livepeer/go-livepeer
Live runner: rename internal pixel terminology to pricing/time units (follow-up to #3952, #3942)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 586
- Forks
- 226
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 19
Description
Context
After livepeer/go-livepeer#3952 the live runner is priced and metered per second of compute (nanoseconds), and livepeer/go-livepeer#3942 renames the user-facing -pixelsPerUnit flag to -pricingUnitSize. The internal code on the live runner path still uses "pixels" terminology (PixelsPerUnit, inPixels, pixels), which is now a misnomer: the metered quantity is time, not pixels. It only remains for wire compatibility and leftover naming.
Why
Readability and consistency. A developer reading the live runner pricing/payment code sees pixels for what is actually per-second / nanosecond metering, and the names diverge from the pricingUnitSize terminology adopted in livepeer/go-livepeer#3942. This is a naming/cleanup task with no behavior change.
Scope: live-runner-specific (safe to rename)
ai/runner/live_runner.go:LiveRunnerPriceInfo.PixelsPerUnitand its JSON tagpixels_per_unit->PricingUnitSize/pricing_unit_size; the converter andconvertedPriceInfolocals.- SDK
livepeer-python-gatewaylive_runner.py: thepixels_per_unitdataclass field ->pricing_unit_size(aligns with livepeer/livepeer-python-gateway#27). server/remote_signer.golive runner (lv2v) path: the localpixelsvariable, theInPixelsfield /inPixelsJSON tag and its "Number of pixels..." comment, and the"pixels"metrics label.
Shared / wire: needs coordination (likely separate)
server/live_payment.go(calculateFee(inPixels, ...),inPixelsfields) andserver/live_payment_processor.go(processSegmentFunc(inPixels int64)) are shared with the realtime-AI / transcoding payment paths; rename only if done across all callers.net.PriceInfo.pixelsPerUnit(proto field 2) is the wire field shared across transcoding/AI. This is the coordinated, versioned rename already noted as a follow-up in ENG-113 and is out of scope here.
Preconditions (do not start until merged)
- livepeer/go-livepeer#3952 merged (per-second live runner pricing).
- livepeer/go-livepeer#3942 merged (
-pricingUnitSizeflag).
Related: ENG-113 (pricing flag/term rename).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Wait for go-livepeer#3952 and #3942 to merge, then inspect ai/runner/live_runner.go, live_runner.py in the livepeer-python-gateway SDK, and the live-runner path in server/remote_signer.go. Rename only the listed live-runner-specific identifiers and comments, preserve shared wire fields and payment paths, and confirm the changes are naming-only with no behavior change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100