Compare commits

...

4 Commits

Author SHA1 Message Date
Roland Tyler 2b85372607 Consistency edits 3 years ago
rolandtyler 9f5718149e Update API documentation (#958) 3 years ago
achraf17 27c600fb53 Remove IBFT 1.0 from docs (#962) 3 years ago
Justin Florentine b3d5b7e52b added descriptions of CLI args for configuring Execution Engine options 3 years ago
  1. 3
      CI/linkchecker/link_check_conf.json
  2. 15
      docs/Concepts/Consensus-Protocols/Overview-Consensus.md
  3. 36
      docs/HowTo/Configure/Consensus-Protocols/QuorumIBFT.md
  4. 277
      docs/Reference/API-Methods.md
  5. 13
      docs/Reference/API-Objects.md
  6. 145
      docs/Reference/CLI/CLI-Syntax.md
  7. 2
      mkdocs.yml
  8. 9790
      package-lock.json

@ -17,6 +17,9 @@
},
{
"pattern": "^http(s)?://.+.zendesk.com"
},
{
"pattern": "^http(s)?://consensys.net"
}
],
"aliveStatusCodes":[200, 206],

@ -9,7 +9,6 @@ Besu implements the following consensus protocols:
* Ethash (proof of work)
* [Clique](../../HowTo/Configure/Consensus-Protocols/Clique.md) (proof of authority)
* [IBFT 2.0](../../HowTo/Configure/Consensus-Protocols/IBFT.md) (proof of authority)
* [Quorum IBFT 1.0](../../HowTo/Configure/Consensus-Protocols/QuorumIBFT.md) (proof of authority).
* [QBFT](../../HowTo/Configure/Consensus-Protocols/QBFT.md) (proof of authority).
The `config` property in the genesis file specifies the consensus protocol for a chain.
@ -58,20 +57,6 @@ The `config` property in the genesis file specifies the consensus protocol for a
}
```
=== "IBFT 1.0"
```json
{
"config": {
...
"ibft": {
...
}
},
...
}
```
=== "QBFT"
```json

@ -1,36 +0,0 @@
---
description: Hyperledger Besu consensus protocols
---
# IBFT 1.0
Besu nodes can operate (that is, submit transactions and receive blocks) in a Quorum
[IBFT 1.0](https://github.com/ethereum/EIPs/issues/650) network, but cannot be validators.
To connect to a Quorum IBFT 1.0 network:
1. In the [Quorum IBFT 1.0 genesis file](https://consensys.net/docs/goquorum/en/stable/configure-and-manage/configure/consensus-protocols/ibft/#genesis-file):
- Update the consensus protocol specified in the `config` item from `istanbul` to `ibft`.
- In the `ibft` item:
- Change `epoch` to `epochlength`.
- Add `blockperiodseconds`, the minimum block time in seconds.
- Add `requesttimeoutseconds`, the timeout for each consensus round before a round change, in seconds.
- Remove `policy`.
Besu always uses a round-robin validator selection policy.
- Remove the configuration item `isQuorum: true`.
```json
"config": {
...
"ibft": {
"epochlength": 30000,
"blockperiodseconds": 2,
"requesttimeoutseconds": 4,
"policy": 0,
"ceil2Nby3Block": 0
}
```
1. When starting Besu, specify the IBFT 1.0 genesis file using the
[`--genesis-file`](../../../Reference/CLI/CLI-Syntax.md#genesis-file) option.

@ -787,6 +787,90 @@ We recommend using the [`TRACE` API](#trace-methods) for production use over the
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.
### `debug_accountAt`
Returns account information at the specified index of the specified block.
#### Parameters
* `blockHashOrNumber`: *string* - block hash or number at which to retrieve account information
* `txIndex`: *number* - transaction index at which to retrieve account information
* `address`: *string* - contract or account address for which to retrieve information
#### Returns
`result`: *object* - account details object with the following fields:
* `code`: *data* - code for the account. Displays `0x0` if the address is an externally owned account.
* `nonce`: *quantity* - number of transactions made by the account before this one
* `balance`: *quantity* - balance of the account in Wei
* `codehash`: *data* - code hash for the account
!!! example
This example uses an externally owned account address for the `address` parameter.
=== "curl HTTP request"
```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"debug_accountAt","params":["0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", 0, "0xbcde5374fce5edbc8e2a8697c15331677e6ebf0b"],"id":1}' http://127.0.0.1:8545
```
=== "wscat WS request"
```bash
{"jsonrpc":"2.0","method":"debug_accountAt","params":["0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", 0, "0xbcde5374fce5edbc8e2a8697c15331677e6ebf0b"],"id":1}
```
=== "JSON result"
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"code": "0x0",
"nonce": "0x5",
"balance": "0xad78ebc5ac6200000",
"codehash" : "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
}
}
```
This example uses a contract address for the `address` parameter.
=== "curl HTTP request"
```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"debug_accountAt","params":["0x2b76b3a2fc44c0e21ea183d06c846353279a7acf12abcc6fb9d5e8fb14ae2f8c", 0, "0x0e0d2c8f7794e82164f11798276a188147fbd415"],"id":1}' http://127.0.0.1:8545
```
=== "wscat WS request"
```bash
{"jsonrpc":"2.0","method":"debug_accountAt","params":["0x2b76b3a2fc44c0e21ea183d06c846353279a7acf12abcc6fb9d5e8fb14ae2f8c", 0, "0x0e0d2c8f7794e82164f11798276a188147fbd415"],"id":1}
```
=== "JSON result"
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"code": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b27b880414610030575b600080fd5b61004a60048036038101906100459190610108565b61004c565b005b60606000806000604051935036600085376000803686885af490503d9150816000853e806000811461007d57610093565b60008311156100925761012085019350836040525b5b5060008114156100ec578473ffffffffffffffffffffffffffffffffffffffff167f410d96db3f80b0f89b36888c4d8a94004268f8d42309ac39b7bcba706293e099856040516100e3919061016e565b60405180910390a25b5050505050565b60008135905061010281610227565b92915050565b60006020828403121561011e5761011d610211565b5b600061012c848285016100f3565b91505092915050565b600061014082610190565b61014a818561019b565b935061015a8185602086016101de565b61016381610216565b840191505092915050565b600060208201905081810360008301526101888184610135565b905092915050565b600081519050919050565b600082825260208201905092915050565b60006101b7826101be565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60005b838110156101fc5780820151818401526020810190506101e1565b8381111561020b576000848401525b50505050565b600080fd5b6000601f19601f8301169050919050565b610230816101ac565b811461023b57600080fd5b5056fea2646970667358221220fdfb5c371055342507b8fb9ca7b0c234f79819bd5cb05c0d467fb605de979eb564736f6c63430008060033",
"nonce": "0x1",
"balance": "0x0",
"codehash" : "0xf5f334d41776ed2828fc910d488a05c57fe7c2352aab2d16e30539d7726e1562"
}
}
```
### `debug_accountRange`
[Retesteth](https://github.com/ethereum/retesteth/wiki/Retesteth-Overview) uses
@ -796,9 +880,9 @@ Returns the accounts for a specified block.
#### Parameters
* `blockHashOrNumber`: *string* - block hash or number
* `blockHashOrNumber`: *string* - block hash or number at which to retrieve account information
* `txIndex`: *number* - transaction index from which to start
* `txIndex`: *number* - transaction index at which to retrieve account information
* `address`: *string* - address hash from which to start
@ -5105,10 +5189,51 @@ command line option.
}
```
### `miner_setCoinbase`
Sets the coinbase, the address for the mining rewards.
!!! note
You can also use `miner_setEtherbase` as an alternative method. They both work the same way.
Etherbase is a historic name for coinbase.
#### Parameters
`coinbase`: *string* - Account address you pay mining rewards to
#### Returns
`result`: *boolean* - `true` when address is set
!!! example
=== "curl HTTP request"
```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"miner_setCoinbase","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"],"id":1}' http://127.0.0.1:8545
```
=== "wscat WS request"
```bash
{"jsonrpc":"2.0","method":"miner_setCoinbase","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"],"id":1}
```
=== "JSON result"
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
```
### `miner_start`
Starts the mining process. To start mining, you must first specify a miner coinbase using the
[`--miner-coinbase`](CLI/CLI-Syntax.md#miner-coinbase) command line option.
[`--miner-coinbase`](CLI/CLI-Syntax.md#miner-coinbase) command line option or using [`miner_setCoinbase`](#miner_setcoinbase).
#### Parameters
@ -7052,6 +7177,152 @@ the returned list items include the [revert reason](../HowTo/Send-Transactions/R
}
```
### `trace_call`
Executes the given call and returns a number of possible traces for it.
#### Parameters
* `call`: *object* - [transaction call object](API-Objects.md#transaction-call-object)
* `blockNumber`: *string* - integer representing a block number or one of the string tags `latest`,
`earliest`, or `pending`, as described in
[Block Parameter](../HowTo/Interact/APIs/Using-JSON-RPC-API.md#block-parameter)
* `options`: *array* of *strings* - list of tracing options; tracing options are
[`trace`, `vmTrace`, and `stateDiff`](Trace-Types.md). Specify any
combination of the three options including none of them.
#### Returns
`result`: *array* of *objects* - list of [calls to other contracts](Trace-Types.md#trace) containing
one object per call, in transaction execution order
!!! example
=== "curl HTTP request"
```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"trace_call","params":[{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","to":0x0010000000000000000000000000000000000000","gas":"0xfffff2","gasPrice":"0xef","value":"0x0","data":"0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002","nonce":"0x0"}["trace"],"latest"],"id":1}' http://127.0.0.1:8545
```
=== "wscat WS request"
```bash
{"jsonrpc":"2.0","method":"trace_call","params":[{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","to":0x0010000000000000000000000000000000000000","gas":"0xfffff2","gasPrice":"0xef","value":"0x0","data":"0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002","nonce":"0x0"}["trace"],"latest"],"id":1}
```
=== "JSON result"
```json
{
"jsonrpc": "2.0",
"result": {
"output" : "0x",
"stateDiff" : null,
"trace" : [ {
"action" : {
"callType" : "call",
"from" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"gas" : "0xffabba",
"input" : "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002",
"to" : "0x0010000000000000000000000000000000000000",
"value" : "0x0"
},
"result" : {
"gasUsed" : "0x9c58",
"output" : "0x"
},
"subtraces" : 0,
"traceAddress" : [ ],
"type" : "call"
} ],
"vmTrace" : null
},
"id" : 2
},
```
### `trace_filter`
Returns traces matching the specified filter.
#### Parameters
`traceFilterOptions`: *object* - [trace filter options object](API-Objects.md#trace-filter-options-object)
#### Returns
`result`: *array* of *objects* - list of [calls to other contracts](Trace-Types.md#trace) containing
one object per call, in transaction execution order
!!! example
=== "curl HTTP request"
```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x1","toBlock":"0x21","after":2,"count":2,"fromAddress":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}],"id":415}' http://127.0.0.1:8545
```
=== "wscat WS request"
```bash
{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x1","toBlock":"0x21","after":2,"count":2,"fromAddress":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}],"id":415}
```
=== "JSON result"
```json
{
"jsonrpc": "2.0",
"result": [
{
"action": {
"callType": "call",
"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"gas": "0xffad82",
"input": "0x0000000000000000000000000000000000000999",
"to": "0x0020000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0xcd5d9c7acdcbd3fb4b24a39e05a38e32235751bb0c9e4f1aa16dc598a2c2a9e4",
"blockNumber": 6,
"result": {
"gasUsed": "0x7536",
"output": "0x"
},
"subtraces": 1,
"traceAddress": [],
"transactionHash": "0x91eeabc671e2dd2b1c8ddebb46ba59e8cb3e7d189f80bcc868a9787728c6e59e",
"transactionPosition": 0,
"type": "call"
},
{
"action": {
"callType": "call",
"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
"gas": "0xffad52",
"input": "0xf000000000000000000000000000000000000000000000000000000000000001",
"to": "0x0030000000000000000000000000000000000000",
"value": "0x0"
},
"blockHash": "0xeed85fe57db751442c826cfe4fdf43b10a5c2bc8b6fd3a8ccced48eb3fb35885",
"blockNumber": 7,
"result": {
"gasUsed": "0x1b",
"output": "0xf000000000000000000000000000000000000000000000000000000000000002"
},
"subtraces": 0,
"traceAddress": [],
"transactionHash": "0x47f4d445ea1812cb1ddd3464ab23d2bfc6ed408a8a9db1c497f94e8e06e85286",
"transactionPosition": 0,
"type": "call"
}
],
"id": 415
}
```
### `trace_replayBlockTransactions`
Provides transaction processing tracing per block.

@ -181,6 +181,19 @@ Returned by [`debug_traceBlock`](API-Methods.md#debug_traceblock),
| **returnValue** | String | Bytes returned from transaction execution (without a `0x` prefix). |
| **structLogs** | Array | Array of structured log objects. |
## Trace filter options object
Parameter for [`trace_filter`](API-Methods.md#trace_filter). All parameters are optional.
| Key | Type | Value |
|-----|:----:|-------|
| **fromBLock** | String | Tag | Trace starts at this block. |
| **toBlock** | String | Tag | Trace stops at this block. |
| **fromAddress** | String | Include only traces sent from this address. |
| **toAddress** | String | Include only traces with this destination address. |
| **after** | Quantity | The offset trace number. |
| **count** | Integer | Number of traces to display in a batch. |
## Transaction object
Returned by [`eth_getTransactionByHash`](API-Methods.md#eth_gettransactionbyhash),

@ -394,6 +394,151 @@ The default is `true`.
You can override the default DNS server if it's unreliable or doesn't serve TCP DNS requests, using the
[experimental option](#xhelp) `--Xp2p-dns-discovery-server=<HOST>`.
### `engine-rpc-http-port`
=== "Syntax"
```bash
--engine-rpc-http-port=<PORT>
```
=== "Example"
```bash
--engine-rpc-http-port=8550
```
=== "Environment variable"
```bash
BESU_ENGINE_RPC_HTTP_PORT=8550
```
=== "Configuration file"
```bash
engine-rpc-http-port=8550
```
The listening port for the Engine API calls (`ENGINE`, `ETH`) for JSON-RPC over HTTP.
### `engine-rpc-ws-port`
=== "Syntax"
```bash
--engine-rpc-ws-port=<PORT>
```
=== "Example"
```bash
--engine-rpc-ws-port=8551
```
=== "Environment variable"
```bash
BESU_ENGINE_RPC_WS_PORT=8551
```
=== "Configuration file"
```bash
engine-rpc-ws-port=8551
```
The listening port for the Engine API calls (`ENGINE`, `ETH`) for JSON-RPC over WebSockets.
### `engine-host-allowlist`
=== "Syntax"
```bash
--engine-host-allowlist=<hostname>[,<hostname>...]... or "*"
```
=== "Example"
```bash
--engine-host-allowlist=localhost,127.0.0.1
```
=== "Environment variable"
```bash
BESU_ENGINE_HOST_ALLOWLIST=localhost,127.0.0.1
```
=== "Configuration file"
```bash
engine-host-allowlist=localhost,127.0.0.1
```
A comma separated list of hostnames to allow for `ENGINE` API access (applies to both HTTP and WebSockets).
!!!tip
To allow all hostnames, use `"*"`. We don't recommend allowing all hostnames for production
environments.
### `engine-jwt-enabled`
=== "Syntax"
```bash
--engine-jwt-enabled
```
=== "Example"
```bash
--engine-jwt-enabled=true
```
=== "Environment variable"
```bash
BESU_ENGINE_JWT_ENABLED=true
```
=== "Configuration file"
```bash
engine-jwt-enabled=true
```
Enables or disables authentication for Engine APIs. The default is `false`.
### `engine-jwt-secret`
=== "Syntax"
```bash
--engine-jwt-secret=<FILE>
```
=== "Example"
```bash
--engine-jwt-secret=jwt.hex
```
=== "Environment variable"
```bash
BESU_ENGINE_JWT_SECRET="publicKey.pem"
```
=== "Configuration file"
```bash
engine-jwt-secret="jwt.hex"
```
The shared secret used for JSON-RPC (both HTTP and WebSocket) authentication of Engine API clients.
Contents of file must be at least 32 hex encoded bytes and not begin with `0x`. May be a relative or absolute path.
### `ethstats`
=== "Syntax"

@ -75,7 +75,6 @@ nav:
- IBFT 2.0: HowTo/Configure/Consensus-Protocols/IBFT.md
- QBFT: HowTo/Configure/Consensus-Protocols/QBFT.md
- Clique: HowTo/Configure/Consensus-Protocols/Clique.md
- Quorum IBFT 1.0 network: HowTo/Configure/Consensus-Protocols/QuorumIBFT.md
- Add and remove validators: HowTo/Configure/Consensus-Protocols/Add-Validators.md
- Create a genesis file: HowTo/Configure/Genesis-File.md
- Specify options in a configuration file: HowTo/Configure/Using-Configuration-File.md
@ -312,3 +311,4 @@ plugins:
HowTo/Configure/Configure-TLS.md: HowTo/Configure/TLS/Configure-TLS.md
HowTo/Deploy/Lite-Block-Explorer.md: https://github.com/Alethio/ethereum-lite-explorer
HowTo/Deploy/Lite-Network-Monitor.md: https://github.com/Alethio/ethstats-network-dashboard
HowTo/Configure/Consensus-Protocols/QuorumIBFT.md: HowTo/Configure/Consensus-Protocols/QBFT.md

9790
package-lock.json generated

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save