Skip to content

Commit

Permalink
docs: improve scientific format pricing
Browse files Browse the repository at this point in the history
This commit ensures that people know how to use scientific format when
setting prices.
  • Loading branch information
rickstaa committed Nov 15, 2024
1 parent c8166a7 commit 50da62c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
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
3 changes: 1 addition & 2 deletions references/go-livepeer/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ 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
Expand Down

0 comments on commit 50da62c

Please sign in to comment.