> ## Documentation Index
> Fetch the complete documentation index at: https://rexrex.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Engine

> Inspect authenticated Engine API capabilities and payload body data.

The engine commands talk to the authenticated Engine API used between a consensus client and an execution client.

This is a different endpoint from the normal public HTTP JSON-RPC port. A typical local Reth setup exposes:

* public Ethereum RPC on `http://127.0.0.1:8545`
* authenticated Engine API on `http://127.0.0.1:8551`

<CardGroup cols={2}>
  <Card title="Capabilities" icon="list-checks" href="/docs/engine/capabilities">
    Exchange and print the Engine API methods supported by the execution client.
  </Card>

  <Card title="Payload Bodies" icon="package-search" href="/docs/engine/payload-bodies">
    Fetch execution payload bodies by execution block hash.
  </Card>
</CardGroup>

## Prerequisites

Create a JWT secret and start Reth with the authenticated Engine API:

```sh theme={null}
openssl rand -hex 32 > ./jwt.hex

reth node \
  --dev \
  --http \
  --http.api eth,net,web3,txpool \
  --authrpc.addr 127.0.0.1 \
  --authrpc.port 8551 \
  --authrpc.jwtsecret ./jwt.hex \
  --datadir ./alice
```

Rex uses `http://127.0.0.1:8551` (`localhost:8551`) as the default Engine API
endpoint, so only the shared secret is required:

```sh theme={null}
rex engine \
  --jwt-secret ./jwt.hex \
  capabilities
```

Use the global `--rpc <URL>` flag if the authenticated Engine API is exposed at
a different endpoint.

## Endpoint Boundary

Use the normal HTTP RPC endpoint for [Chain](/docs/chain) and [TxPool](/docs/txpool) commands.

Use the auth RPC endpoint for `engine` commands. If you accidentally point an engine command at `:8545`, the node will usually respond as though the method is unavailable because the `engine` namespace is not exposed on that public endpoint.

## Troubleshooting

### Public RPC Endpoint

Public Ethereum RPC providers usually do not expose the authenticated Engine API.

If `engine capabilities` returns an HTTP error from an endpoint such as `https://eth.drpc.org`, switch to a local execution client auth RPC endpoint:

```sh theme={null}
rex engine \
  --jwt-secret ./jwt.hex \
  capabilities
```

The JWT secret must belong to the same node exposed by the `--rpc` auth endpoint. A valid JWT file from another Reth node is still the wrong credential for this endpoint.

### Missing JWT Secret

`--jwt-secret` must point to the same file passed to Reth through `--authrpc.jwtsecret`.

For a fresh local dev node:

```sh theme={null}
openssl rand -hex 32 > ./jwt.hex

reth node \
  --authrpc.addr 127.0.0.1 \
  --authrpc.port 8551 \
  --authrpc.jwtsecret ./jwt.hex
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.