Skip to content

Commit

Permalink
Merge pull request #134 from rsksmart/update_devportal_for_release
Browse files Browse the repository at this point in the history
Updating DevPortal for upcoming release ARROWHEAD-6.4
  • Loading branch information
owans authored Oct 29, 2024
2 parents 09f9df1 + b7b8328 commit 881662c
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion docs/03-node-operators/04-setup/03-configuration/03-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -347,9 +348,60 @@ 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.

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
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**: 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

**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.
A string that describes the name of the configuration.
We use:

| | `blockchain.config.name` |
Expand Down

0 comments on commit 881662c

Please sign in to comment.