Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve scientific format pricing #689

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions orchestrators/guides/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ livepeer \

- `-nvidia` is used to specify a comma delimited string of Nvidia GPU IDs. The
flag is only required when transcoding with Nvidia GPUs
- `-pricePerUnit` is used to specify the price (wei per pixel) for transcoding.
The flag is required on startup, but the value can be changed later.
- `-pricePerUnit` specifies the price for transcoding. It can be in wei per pixel (e.g., `1000`) or other currencies with exponential notation (e.g., `0.5e2USD`). This flag is required on startup but can be changed later.
- `-serviceAddr` is used to specify the publicly accessible address that the
orchestrator should receive requests at. Changing this requires a blockchain
transaction, so it's preferable to use a hostname for a domain you own, not an
Expand Down
4 changes: 1 addition & 3 deletions orchestrators/guides/set-pricing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ You can set the base price per pixel using the `livepeer_cli`:
7. To verify the price was updated, check the log from your node.
# Setting fiat-denominated price
With the release of go-livepeer version 0.8.0, we are introducing a feature to allow specifying the transcoding price per pixel in USD. This is a backward-compatible change, which still supports setting the price in Wei but now gives the option of using custom currencies instead, with USD being the default.
Expand Down Expand Up @@ -102,7 +100,7 @@ e.g.:
-pricePerUnit 0.0665USD
```
Notice that the `-pixelsPerUnit` flag supports the exponential notation, so its easier to understand the value being set. The `-pricePerUnit` does not support it though, so a standard decimal notation must be used. This is also an incentive to use the `-pixelsPerUnit` value in order to keep the `-pricePerUnit` as an easily readable value.
Notice that both the `-pixelsPerUnit` and `-pricePerUnit` flags support exponential notation, so it's easier to understand the value being set.
This feature is also supported by gateways, with the `-pixelsPerUnit` flag staying the same, while the `-maxPricePerUnit` should be set instead for the max price. The currency is specified in the same format.
Expand Down
6 changes: 2 additions & 4 deletions references/go-livepeer/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,13 @@ also contain instructions for using flags to enable certain functionality in
- depositMultiplier: The deposit multiplier used to determine max acceptable
faceValue for PM tickets. Default `1`

- pricePerUnit: The price per 'pixelsPerUnit' amount pixels. Must be greater
than 0. Error if not set.
- pricePerUnit: The price per 'pixelsPerUnit' amount pixels. Must be greater than 0. Can be specified in wei (e.g., `1000`) or other currencies with exponential notation (e.g., `0.5e2USD`). Error if not set.

- maxPricePerUnit: The maximum transcoding price (in wei) per 'pixelsPerUnit' a
gateway is willing to accept. If not set explicitly, gateway is willing to
accept ANY price. Default `0`

- pixelsPerUnit: Amount of pixels per unit. Set to '> 1' to have smaller price
granularity than 1 wei / pixel. Default `1`
- pixelsPerUnit: Amount of pixels per unit. Can be specified in scientific notation (e.g., `1e12`). Set to '> 1' to have smaller price granularity than 1 wei/pixel. Default `1`.

- pricePerGateway: json list of price per gateway or path to json config file.
Example:
Expand Down