Skip to content

Commit

Permalink
Add ability to update target gas price. (#604)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
bgravenorst authored Feb 24, 2021
1 parent 10a5072 commit 09cca9f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/Reference/API-Methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -4578,6 +4578,43 @@ Returns full trace of all invoked opcodes of all transactions included in the bl
methods, use the [`--rpc-http-api`](CLI/CLI-Syntax.md#rpc-http-api) or
[`--rpc-ws-api`](CLI/CLI-Syntax.md#rpc-ws-api) options.

### miner_changeTargetGasLimit

Updates the target gas limit set using the [`--target-gas-limit`](CLI/CLI-Syntax.md#target-gas-limit)
command line option.

#### Parameters

`integer` : `quantity` - The target gas price in Wei.

#### Returns

`result` - `Success` or `error`.

!!! example

=== "curl HTTP request"

```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_changeTargetGasLimit","params":[800000], "id":1}' http://127.0.0.1:8545
```

=== "wscat WS request"

```bash
{"jsonrpc":"2.0","method":"miner_changeTargetGasLimit","params":[800000], "id":1}
```

=== "JSON result"

```json
{
"jsonrpc" : "2.0",
"id" : 1,
"result" : "Success"
}
```

### `miner_start`

Starts the mining process. To start mining, you must first specify a miner coinbase using the
Expand Down
4 changes: 4 additions & 0 deletions docs/Reference/CLI/CLI-Syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -3189,6 +3189,10 @@ within that constraint.
If a value for `target-gas-limit` is not specified, the block gas limit remains at the value
specified in the [genesis file](../Config-Items.md#genesis-block-parameters).

Use the [`miner_changeTargetGasLimit`](../API-Methods.md#miner_changetargetgaslimit) API to update
the `target-gas-limit` while Besu is running. Alternatively restart Besu with an updated
`target-gas-limit` value.

### `tx-pool-max-size`

=== "Syntax"
Expand Down

0 comments on commit 09cca9f

Please sign in to comment.