Skip to content

Commit 09cca9f

Browse files
authoredFeb 24, 2021
Add ability to update target gas price. (#604)
* Rename whitelist to allowlist. Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net> * Additional updates. Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net> * Whitelist renaming. Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net> * Address reviewer feedback. Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net> * Fix typos. Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net> * Add ability to update target gas price. Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net>
1 parent 10a5072 commit 09cca9f

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
 

‎docs/Reference/API-Methods.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4578,6 +4578,43 @@ Returns full trace of all invoked opcodes of all transactions included in the bl
45784578
methods, use the [`--rpc-http-api`](CLI/CLI-Syntax.md#rpc-http-api) or
45794579
[`--rpc-ws-api`](CLI/CLI-Syntax.md#rpc-ws-api) options.
45804580

4581+
### miner_changeTargetGasLimit
4582+
4583+
Updates the target gas limit set using the [`--target-gas-limit`](CLI/CLI-Syntax.md#target-gas-limit)
4584+
command line option.
4585+
4586+
#### Parameters
4587+
4588+
`integer` : `quantity` - The target gas price in Wei.
4589+
4590+
#### Returns
4591+
4592+
`result` - `Success` or `error`.
4593+
4594+
!!! example
4595+
4596+
=== "curl HTTP request"
4597+
4598+
```bash
4599+
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_changeTargetGasLimit","params":[800000], "id":1}' http://127.0.0.1:8545
4600+
```
4601+
4602+
=== "wscat WS request"
4603+
4604+
```bash
4605+
{"jsonrpc":"2.0","method":"miner_changeTargetGasLimit","params":[800000], "id":1}
4606+
```
4607+
4608+
=== "JSON result"
4609+
4610+
```json
4611+
{
4612+
"jsonrpc" : "2.0",
4613+
"id" : 1,
4614+
"result" : "Success"
4615+
}
4616+
```
4617+
45814618
### `miner_start`
45824619

45834620
Starts the mining process. To start mining, you must first specify a miner coinbase using the

‎docs/Reference/CLI/CLI-Syntax.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3189,6 +3189,10 @@ within that constraint.
31893189
If a value for `target-gas-limit` is not specified, the block gas limit remains at the value
31903190
specified in the [genesis file](../Config-Items.md#genesis-block-parameters).
31913191

3192+
Use the [`miner_changeTargetGasLimit`](../API-Methods.md#miner_changetargetgaslimit) API to update
3193+
the `target-gas-limit` while Besu is running. Alternatively restart Besu with an updated
3194+
`target-gas-limit` value.
3195+
31923196
### `tx-pool-max-size`
31933197

31943198
=== "Syntax"

0 commit comments

Comments
 (0)