From 50da62ce66ffb438d82624ce107b925030327993 Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Fri, 15 Nov 2024 12:37:12 +0100 Subject: [PATCH] docs: improve scientific format pricing This commit ensures that people know how to use scientific format when setting prices. --- orchestrators/guides/get-started.mdx | 3 +-- orchestrators/guides/set-pricing.mdx | 4 +--- references/go-livepeer/cli-reference.mdx | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/orchestrators/guides/get-started.mdx b/orchestrators/guides/get-started.mdx index aeebfe19..1c5e6b36 100644 --- a/orchestrators/guides/get-started.mdx +++ b/orchestrators/guides/get-started.mdx @@ -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 diff --git a/orchestrators/guides/set-pricing.mdx b/orchestrators/guides/set-pricing.mdx index df82d356..1bbdc7c5 100644 --- a/orchestrators/guides/set-pricing.mdx +++ b/orchestrators/guides/set-pricing.mdx @@ -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. @@ -102,7 +100,7 @@ e.g.: -pricePerUnit 0.0665USD ``` -Notice that the `-pixelsPerUnit` flag supports the exponential notation, so it’s 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. diff --git a/references/go-livepeer/cli-reference.mdx b/references/go-livepeer/cli-reference.mdx index f261223d..dcb1fc6f 100644 --- a/references/go-livepeer/cli-reference.mdx +++ b/references/go-livepeer/cli-reference.mdx @@ -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