Skip to content

Commit

Permalink
Add information to enable the Engine API. (#1199)
Browse files Browse the repository at this point in the history
Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
  • Loading branch information
bgravenorst authored Nov 1, 2022
1 parent 48ebf26 commit 6b179bf
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/public-networks/get-started/connect/mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ besu \
--rpc-ws-host=0.0.0.0 \
--host-allowlist=<IP of Besu node>,127.0.0.1,localhost \
--engine-host-allowlist=<IP of Besu node>,127.0.0.1,localhost \
--engine-rpc-enabled \
--engine-jwt-secret=<path to jwtsecret.hex>
```

Expand All @@ -74,6 +75,8 @@ Also, in the command:
service.
- [`--rpc-ws-host`](../../reference/cli/options.md#rpc-ws-host) is set to `0.0.0.0` to allow remote
RPC connections.
- [`--engine-rpc-enabled`](../../reference/cli/options.md#engine-rpc-enabled) enables the
[Engine API](../../reference/engine-api/index.md).

You can modify the option values and add other [command line options](../../reference/cli/options.md)
as needed.
Expand Down
2 changes: 2 additions & 0 deletions docs/public-networks/get-started/connect/testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Run the following command or specify the options in a
--rpc-ws-host=0.0.0.0 \
--host-allowlist="*" \
--engine-host-allowlist="*" \
--engine-rpc-enabled \
--engine-jwt-secret=<path to jwtsecret.hex>
```

Expand All @@ -69,6 +70,7 @@ Run the following command or specify the options in a
--rpc-ws-host=0.0.0.0 \
--host-allowlist="*" \
--engine-host-allowlist="*" \
--engine-rpc-enabled \
--engine-jwt-secret=<path to jwtsecret.hex>
```

Expand Down
12 changes: 11 additions & 1 deletion docs/public-networks/how-to/use-engine-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ These API methods are a separate subsection of the [JSON-RPC API](../how-to/use-

To configure the Engine API:

- [Enable the Engine API](#enable-the-engine-api) (it's disabled by default).
- [Enable the JSON-RPC API](use-besu-api/index.md#enable-api-access).
Ensure the [`ETH` method is enabled](use-besu-api/json-rpc.md#api-methods-enabled-by-default) (it's enabled by default).
- Specify the [service ports](#service-ports).
Expand All @@ -20,9 +21,18 @@ To configure the Engine API:
!!! example "Example Engine API configuration"

```bash
besu --rpc-http-enabled --engine-rpc-port=8551 --engine-host-allowlist=localhost,127.0.0.1 --engine-jwt-secret=jwt.hex
besu --engine-rpc-enabled --rpc-http-enabled --engine-rpc-port=8551 --engine-host-allowlist=localhost,127.0.0.1 --engine-jwt-secret=jwt.hex
```

### Enable the Engine API

Enable the Engine API with the [`--engine-rpc-enabled`](../reference/cli/options.md#engine-rpc-enabled) CLI option.

!!! note

The `--engine-rpc-enabled` CLI option enables the Engine API even if no consensus client
configuration exists.

### Service ports

To specify the port the Engine API service listens on for HTTP and WebSocket, use the
Expand Down
29 changes: 29 additions & 0 deletions docs/public-networks/reference/cli/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,35 @@ Contents of file must be at least 32 hex-encoded bytes and not begin with `0x`.
May be a relative or absolute path.
See an [example of how to generate this](../../get-started/connect/mainnet.md#1-generate-the-shared-secret).
### `engine-rpc-enabled`
=== "Syntax"
```bash
--engine-rpc-enabled[=<true|false]>
```
=== "Example"
```bash
--engine-rpc-enabled
```
=== "Environment variable"
```bash
BESU_ENGINE_RPC_ENABLED=true
```
=== "Configuration file"
```bash
engine-rpc-enabled=true
```
Enables or disables the [Engine API](../engine-api/index.md).
The default is `false`.
### `engine-rpc-port`
=== "Syntax"
Expand Down
4 changes: 4 additions & 0 deletions docs/public-networks/reference/engine-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ communicate with each other using the Engine API.
When running Besu as an execution client, [use these API calls](../../how-to/use-engine-api.md) to
communicate with a consensus client.

!!! important

Ensure you enable the Engine API methods with the [`--engine-rpc-enabled`](../cli/options.md#engine-rpc-enabled) CLI option.

See the [Ethereum Engine API specification](https://github.com/ethereum/execution-apis/blob/0b965fb714ccd3faa3c939fdce1726e56679cdec/src/engine/specification.md) for more information.

## Methods
Expand Down
3 changes: 3 additions & 0 deletions docs/public-networks/tutorials/besu-teku-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ besu \
--rpc-ws-host="0.0.0.0" \
--host-allowlist=<IP of Besu node>,127.0.0.1,localhost \
--engine-host-allowlist=<IP of Besu node>,127.0.0.1,localhost \
--engine-rpc-enabled \
--engine-jwt-secret=<path to jwtsecret.hex>
```

Expand All @@ -66,6 +67,8 @@ Also, in the command:
service.
- [`--rpc-ws-host`](../reference/cli/options.md#rpc-ws-host) is set to `0.0.0.0` to allow remote RPC
connections.
- [`--engine-rpc-enabled`](../reference/cli/options.md#engine-rpc-enabled) enables the
[Engine API](../reference/engine-api/index.md).

You can modify the option values and add other [command line options](../reference/cli/options.md)
as needed.
Expand Down
2 changes: 2 additions & 0 deletions docs/public-networks/tutorials/besu-teku-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Run the following command or specify the options in a [configuration file](../ho
--rpc-ws-host=0.0.0.0 \
--host-allowlist="*" \
--engine-host-allowlist="*" \
--engine-rpc-enabled \
--engine-jwt-secret=<path to jwtsecret.hex>
```

Expand All @@ -69,6 +70,7 @@ Run the following command or specify the options in a [configuration file](../ho
--rpc-ws-host=0.0.0.0 \
--host-allowlist="*" \
--engine-host-allowlist="*" \
--engine-rpc-enabled \
--engine-jwt-secret=<path to jwtsecret.hex>
```

Expand Down

0 comments on commit 6b179bf

Please sign in to comment.