Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-run-block: new debug tool #13575

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions op-chain-ops/cmd/op-run-block/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# op-run-block

This tool enables local op-geth EVM debugging,
to re-run bad blocks in a controlled local environment,
where arbitrary tracers can be attached, and experimental changes can be tested quickly.

This helps debug why these blocks may fail or diverge in unexpected ways.
E.g. a block produced by op-reth that does not get accepted by op-geth
can be replayed in a debugger to find what is happening.

## Usage

```bash
go run . --rpc=http://my-debug-geth-endpoint:8545 --block=badblock.json --out=trace.txt
```

Where `badblock.json` looks like:

```json
[
{
"block": {
"timestamp": ...
"number": ...
"transactions": [ ... ],
...
}
}
]
```

This type of block can be collected with:

```bash
cast rpc --rpc-url=http://localhost:8545 debug_getBadBlocks
```

See Go-ethereum `debug` RPC namespace docs: https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug
Loading