Skip to content

Unimplemented JSON-RPC method 'debug_getBadBlocks' #16132

Closed
@Alleysira

Description

@Alleysira

Describe the bug

Hello developers,

I'm running a devnet chain for RPC testing. During testing, I noticed discrepancies in the JSON-RPC responses among geth, besu, nethermind, and reth.

According to the execution-api, the method debug_getBadBlocks should be implemented. This method is available in geth, besu, and nethermind, but reth treats the API as unavailable.

I also reviewed other debug_ methods in the execution API and found that only debug_getBadBlocks is missing in reth. I checked the related reth codebase as well.

/// Handler for `debug_getBadBlocks`
async fn bad_blocks(&self) -> RpcResult<Vec<RpcBlock>> {
Err(internal_rpc_err("unimplemented"))
}

Could you please clarify whether this is a bug or an intentional decision? Thank you for your time.

Steps to reproduce

Simply send the RPC request with:

curl localhost:56156 -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"debug_getBadBlocks","params":[],"id":0}' | jq

The response looks like:

{
  "jsonrpc": "2.0",
  "id": 0,
  "error": {
    "code": -32603,
    "message": "unimplemented"
  }
}

Node logs

# geth
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:56406"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:56638"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:57480"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:56074"}
# besu
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:55742"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:57334"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:56306"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:57584"}
# nethermind
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:57012"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:56956"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:57528"}
{"id": 1, "jsonrpc": "2.0", "result": [], "server": "http://127.0.0.1:56808"}
# reth
{"error": {"code": -32603, "message": "unimplemented"}, "id": 1, "jsonrpc": "2.0", "server": "http://127.0.0.1:56156"}
{"error": {"code": -32603, "message": "unimplemented"}, "id": 1, "jsonrpc": "2.0", "server": "http://127.0.0.1:57302"}
{"error": {"code": -32603, "message": "unimplemented"}, "id": 1, "jsonrpc": "2.0", "server": "http://127.0.0.1:57070"}
{"error": {"code": -32603, "message": "unimplemented"}, "id": 1, "jsonrpc": "2.0", "server": "http://127.0.0.1:56580"}

Platform(s)

Linux (x86)

Container Type

Docker

What version/commit are you on?

reth/v1.3.12-6f8e725/x86_64-unknown-linux-gnu

What database version are you on?

N/A

Which chain / network are you on?

Local devnet with 16 nodes.

What type of node are you running?

Archive (default)

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

Labels

A-rpcRelated to the RPC implementationC-bugAn unexpected or incorrect behavior

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions