> ## 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.

# Replay a Transaction

> Replay one transaction with `debug_traceTransaction` and summarize the call tree.

Use `execution replay-tx` to inspect the call tree produced by a transaction.

The command calls `debug_traceTransaction` with the `callTracer`, flattens the nested calls, and prints gas, value, calldata size, and any call errors.

## Command

```sh theme={null}
rex execution replay-tx \
  --tx 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

## Example Output

```text theme={null}
EXECUTION REPLAY TX

Tx:           0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Calls:        3
Failed calls: 0
Max depth:    1

DEPTH TYPE         FROM                                       TO                                           VALUE        GAS   GAS USED IN BYTES OUT BYTES ERROR
    0 CALL         0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 0x5fbdb2315678afecb367f032d93f642f64180aa3 0 wei     150000      48672       68         32 -
    1 STATICCALL   0x5fbdb2315678afecb367f032d93f642f64180aa3 0x0000000000000000000000000000000000000001 -          42112       3120        0         32 -
```

## How It Works

`debug_traceTransaction` replays the transaction from the node's stored chain state. The transaction must be available to the node, and the RPC endpoint must expose the `debug` namespace.

Start a local Reth node with debug RPC enabled:

```sh theme={null}
reth node \
  --dev \
  --http \
  --http.api eth,net,web3,debug \
  --datadir ./alice
```

## Field Notes

* `Calls` counts the flattened root call and all nested calls.
* `Failed calls` counts call frames with an `error` field.
* `IN BYTES` is calldata size for the call frame.
* `OUT BYTES` is returndata size for the call frame.
* `VALUE` is shown in wei or gwei using the same formatting as other Rex reports.


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