From ad55c72547635d8d65e4d5b922a445c480635c2e Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Thu, 24 Oct 2024 18:47:39 -0400 Subject: [PATCH 1/3] Updating DevPortal for upcoming release ARROWHEAD-6.4 --- .../04-setup/03-configuration/03-reference.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/03-node-operators/04-setup/03-configuration/03-reference.md b/docs/03-node-operators/04-setup/03-configuration/03-reference.md index ed19471c..9e3e195b 100644 --- a/docs/03-node-operators/04-setup/03-configuration/03-reference.md +++ b/docs/03-node-operators/04-setup/03-configuration/03-reference.md @@ -37,6 +37,7 @@ The following detail the most commonly used configuration fields parsed by RSKj. - [`wallet`](#wallet) - [`scoring`](#scoring) - [`miner`](#miner) +- [`miner.stableGasPrice`](#minerstablegasprice) - [`blockchain.config.name`](#blockchainconfigname) - [`bind_address`](#bind_address) - [`public.ip`](#publicip) @@ -347,6 +348,33 @@ scoring { Check out [Configure RSKj node for mining](/node-operators/merged-mining/configure-mining) for detailed information about the `miner` configuration. +## miner.stableGasPrice + +The `stableGasPrice` feature allows miners to set a predictable gas price for transactions, establishing a minimum rate that is less affected by market volatility and better aligned with fiat currency values like USD or EUR. This enhances cost management and improves overall transaction efficiency. + +**Example** +```plaintext +stableGasPrice { + enabled = true + + source { + method = "ETH_CALL" + params { + from = "0x0000000000000000000000000000000000000000" + to = "0xCA41630b09048b6f576459C34341cAB8Dc2cBE7E" + data = "0xdf16e52d" + } + } + + minStableGasPrice = 476190000000 # Minimum gas price + refreshRate = 6 hours # How often to check for updates +} +``` + +- **Source**: Gets the gas price from a specific smart contract +- **Minimum Gas Price**: Ensures the miner uses a baseline price to avoid setting it too low +- **Refresh Rate**: Updates the gas price + ## blockchain.config.name A string that describe the name of the configuration. From a5de9615bb90d0239f3ebb1773984b2de4032ee6 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Sun, 27 Oct 2024 14:17:08 -0400 Subject: [PATCH 2/3] Adding HTTP_GET support --- .../04-setup/03-configuration/03-reference.md | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/03-node-operators/04-setup/03-configuration/03-reference.md b/docs/03-node-operators/04-setup/03-configuration/03-reference.md index 9e3e195b..49c4ce84 100644 --- a/docs/03-node-operators/04-setup/03-configuration/03-reference.md +++ b/docs/03-node-operators/04-setup/03-configuration/03-reference.md @@ -352,7 +352,12 @@ for detailed information about the `miner` configuration. The `stableGasPrice` feature allows miners to set a predictable gas price for transactions, establishing a minimum rate that is less affected by market volatility and better aligned with fiat currency values like USD or EUR. This enhances cost management and improves overall transaction efficiency. -**Example** +The source configuration supports two methods: ETH_CALL and HTTP_GET. + +- **ETH_CALL**: This method retrieves the gas price directly from a specified smart contract, allowing for real-time adjustments based on the contract's logic. +- **HTTP_GET**: This method fetches gas price data from an external API, providing flexibility to pull market data from trusted sources. + +**Example of ETH_CALL** ```plaintext stableGasPrice { enabled = true @@ -375,6 +380,25 @@ stableGasPrice { - **Minimum Gas Price**: Ensures the miner uses a baseline price to avoid setting it too low - **Refresh Rate**: Updates the gas price +**Example of HTTP_GET** +```plaintext +stableGasPrice { + enabled = true + + source { + method = "HTTP_GET" + params { + url = "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd" + jsonPath = "/bitcoin/usd" + timeout = 5 seconds + } + } + + minStableGasPrice = 476190000000 # Minimum gas price + refreshRate = 6 hours # How often to check for updates +} +``` + ## blockchain.config.name A string that describe the name of the configuration. From b7b832821fbc161f5f63337adfb12d42c853fc48 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Tue, 29 Oct 2024 10:42:17 -0400 Subject: [PATCH 3/3] Addressing comments --- .../04-setup/03-configuration/03-reference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/03-node-operators/04-setup/03-configuration/03-reference.md b/docs/03-node-operators/04-setup/03-configuration/03-reference.md index 49c4ce84..86a5ec88 100644 --- a/docs/03-node-operators/04-setup/03-configuration/03-reference.md +++ b/docs/03-node-operators/04-setup/03-configuration/03-reference.md @@ -352,7 +352,7 @@ for detailed information about the `miner` configuration. The `stableGasPrice` feature allows miners to set a predictable gas price for transactions, establishing a minimum rate that is less affected by market volatility and better aligned with fiat currency values like USD or EUR. This enhances cost management and improves overall transaction efficiency. -The source configuration supports two methods: ETH_CALL and HTTP_GET. +The source configuration supports two methods: `ETH_CALL` and `HTTP_GET`. - **ETH_CALL**: This method retrieves the gas price directly from a specified smart contract, allowing for real-time adjustments based on the contract's logic. - **HTTP_GET**: This method fetches gas price data from an external API, providing flexibility to pull market data from trusted sources. @@ -376,7 +376,7 @@ stableGasPrice { } ``` -- **Source**: Gets the gas price from a specific smart contract +- **Source**: Retrieves the gas price from a specific smart contract - **Minimum Gas Price**: Ensures the miner uses a baseline price to avoid setting it too low - **Refresh Rate**: Updates the gas price @@ -401,7 +401,7 @@ stableGasPrice { ## blockchain.config.name -A string that describe the name of the configuration. +A string that describes the name of the configuration. We use: | | `blockchain.config.name` |