livepeer / livepeer/go-livepeer

Rename -pixelsPerUnit to a clearer -pricingUnitSize flag

Open
#3,949 1 comment 0 reactions 1 assignee View on GitHub

@rickstaa is already working on this.

Since Jun 15, 2026.

status: triage
Dominant language
Go
Stars
586
Forks
226
Avg merge
1d 17h
Merged PRs (30d)
19

Description

## What

Add `-pricingUnitSize` as the clearer primary flag for the pricing scale factor, and keep `-pixelsPerUnit` as a deprecated alias writing to the same config value (following the existing `datadir`/`dataDir` deprecation pattern).

`pixelsPerUnit` is really just a pricing scale factor: the number of work units that one quoted price covers (`price_per_work_unit = pricePerUnit / pixelsPerUnit`). The "pixels" name is transcoding-era legacy and is confusing for non-video / BYOC / general-runner workloads, where there are no pixels.

## Why

The value is the size of one pricing unit, measured in work units. `-pricingUnitSize` reads as a matched set with `-pricePerUnit` / `-maxPricePerUnit`, makes the direction unambiguous (a larger value means a coarser price bucket), and stays self-documenting in config files and run commands. This matters for the live runner and other BYOC workloads where "pixels" has no meaning.

## Changes

- `-pricingUnitSize` flag (primary) + `-pixelsPerUnit` kept as a `[Deprecated]` alias to the same `cfg.PixelsPerUnit`.
- Updated `-pricePerUnit` / `-maxPricePerUnit` help text to reference `pricingUnitSize`.
- Unit test asserting both flags set `PixelsPerUnit`.

## Compatibility

No wire or config-format changes. The proto field (`PriceInfo.pixelsPerUnit`), the config struct field, discovery JSON, and the `pixels_per_unit` / `pixelsperunit` keys in `-maxPricePerCapability` / `-pricePerGateway` JSON are all untouched. Only the user-facing flag is renamed, with the old name still accepted. A coordinated, versioned rename of the proto/JSON field is intentionally out of scope.

## Implementation

Implemented in livepeer/go-livepeer#3942.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.