Skip to content

Conversation

@easeev
Copy link
Contributor

@easeev easeev commented Oct 14, 2025

Summary

  • reorder discovery methods using a case-insensitive sort so namespaces keep stable alphabetical grouping

Testing

  • python -m json.tool chainbench/tools/discovery/methods.json

https://chatgpt.com/codex/tasks/task_b_68ec70a92e388324a9d60fe79c899469

Summary by CodeRabbit

  • New Features

    • Broad Reth support added across many RPCs (engine payload/blobs, Hardhat/Anvil controls, OTS, MEV bundle methods, miner settings, trace/debug endpoints, flashbots, eth private/bundle/send variants).
    • New public methods exposed (including admin_clearTxpool, additional engine/trace/debug and eth endpoints).
  • Refactor

    • Renamed/swapped endpoints: platform.getBlockchains ↔ platform.getBlockchainStatus, opp2p_peers ↔ opp2p_peerStats.
  • Chores

    • Updated Reth client version to 1.8.2.

@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Walkthrough

Updated the reth client version in clients.json and massively expanded methods.json: added many new RPC method entries and added "reth" to numerous existing methods across namespaces (anvil, engine, ots, hardhat, mev, miner, eth, trace, debug, platform, opp2p), plus a few endpoint renames/swaps.

Changes

Cohort / File(s) Summary
Client version bump
chainbench/tools/discovery/clients.json
Updated the reth client version from "0.1.0-alpha.13" to "1.8.2"; minor EOF newline change.
Add many reth RPCs (anvil & hardhat)
chainbench/tools/discovery/methods.json
Added numerous anvil_* and hardhat_* RPC entries (mining, state manipulation, impersonation, timing, snapshots, etc.) with "clients": ["reth"].
Add ots, mev, miner namespaces
chainbench/tools/discovery/methods.json
Added comprehensive ots_* endpoints, mev_sendBundle/mev_simBundle, and miner_* (setExtra/GasLimit/GasPrice) entries with "clients": ["reth"].
Engine API expansion (versioned blobs/payloads)
chainbench/tools/discovery/methods.json
Added/extended engine entries (e.g., engine_getBlobsV1/V2, engine_getPayloadV4/V5, engine_newPayloadV1–V4, engine_getPayloadBodiesByHashV*) and included "reth" in client lists.
Broadened eth_/trace_/debug coverage
chainbench/tools/discovery/methods.json
Added/updated many eth_*, trace_*, and debug_* entries (e.g., eth_blobBaseFee, eth_callBundle, eth_sendBundle, eth_getBlockReceipts, trace_blockOpcodeGas, trace_transactionOpcodeGas, debug_seedHash) and appended "reth" to numerous existing methods.
Raw tx / bundle / privacy & other eth additions
chainbench/tools/discovery/methods.json
Introduced eth_sendPrivateRawTransaction, eth_sendPrivateTransaction, eth_sendRawTransactionConditional/Sync, eth_callMany, eth_callBundle, eth_getRawTransactions, eth_getTransactionBySenderAndNonce, eth_config, and related entries including "reth".
Endpoint renames / mapping swaps
chainbench/tools/discovery/methods.json
Swapped/renamed mappings: platform.getBlockchainStatusplatform.getBlockchains and opp2p_peerStatsopp2p_peers.
Other versioned / miscellaneous additions
chainbench/tools/discovery/methods.json
Added flashbots validation endpoints, engine capability exchanges, debug/state-root updates, and assorted versioned endpoints; most include "clients": ["reth"].

Sequence Diagram(s)

Omitted (data-only changes)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

Thump-thump, I hop through JSON trails,
New RPCs sprout like carrot tails.
Reth leaps up to 1.8.2 with glee,
Anvil, Engine, Hardhat — all join me.
I twitch my nose — discovery grows free. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description does not follow the repository’s required template, as it uses “## Summary” and “## Testing” instead of the mandated “## Description” and “## Issues Resolved” sections and lacks explicit issue references. Please update the pull request description to match the standard template by renaming “## Summary” to “## Description” and detailing your changes there, then add a “## Issues Resolved” section listing the specific issues addressed by this pull request.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Add support for all Reth methods” accurately captures the primary change of extending Reth support across the RPC methods and updating the Reth client version, making it concise and specific about the pull request’s main purpose.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/add-reth-rpc-method-checker-to-chainbench

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bdfc0a4 and 7604897.

📒 Files selected for processing (1)
  • chainbench/tools/discovery/methods.json (84 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@easeev easeev changed the title Sort discovery methods catalog case-insensitively Add support for all Reth methods Oct 14, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
chainbench/tools/discovery/methods.json (1)

2287-2300: Deduplicate clients in eth_maxPriorityFeePerGas.

"avalanchego/ext/bc/C/rpc" appears twice.

       "bor",
-      "avalanchego/ext/bc/C/rpc",
-      "avalanchego/ext/bc/C/rpc",
+      "avalanchego/ext/bc/C/rpc",
       "optimism",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aab843f and bdfc0a4.

📒 Files selected for processing (2)
  • chainbench/tools/discovery/clients.json (1 hunks)
  • chainbench/tools/discovery/methods.json (85 hunks)
🔇 Additional comments (4)
chainbench/tools/discovery/methods.json (3)

3135-3146: Confirm opp2p_peers ↔ opp2p_peerStats swap intent.

If only ordering changed, OK. If semantics changed, ensure downstream expects new mapping.


275-279: Request validation of newly introduced or uncommon RPC names.

Please confirm these are intentional and documented:

  • anvil_mine_detailed
  • eth_cancelBundle
  • engine_getPayloadV5

If experimental/private, consider marking or gating accordingly.

Also applies to: 1769-1775, 1609-1618


1-4209: Update verification script
Use this to re-check JSON validity, case-insensitive top-level key sort, and duplicate clients per method:

#!/usr/bin/env bash
set -euo pipefail
FILE="chainbench/tools/discovery/methods.json"

# Validate JSON
jq empty "$FILE" && echo "JSON OK"

# Check case-insensitive sort of top-level keys
python3 - << 'PY'
import json
d = json.load(open("chainbench/tools/discovery/methods.json"))
keys = list(d.keys())
sorted_ci = sorted(keys, key=str.casefold)
if keys != sorted_ci:
    print("Top-level keys not case-insensitive sorted.")
    for i, (a, b) in enumerate(zip(keys, sorted_ci)):
        if a != b:
            print(f"{i}: file='{a}' vs sorted='{b}'")
            if i >= 20: break
    exit(1)
print("Top-level keys are case-insensitive sorted.")
PY

# Detect duplicate clients per method
python3 - << 'PY'
import json
d = json.load(open("chainbench/tools/discovery/methods.json"))
dups = [k for k, v in d.items() if len(v.get("clients", [])) != len(set(v.get("clients", [])))]
if dups:
    print("Methods with duplicate clients:")
    for k in dups: print("-", k)
    exit(1)
print("No duplicate clients found.")
PY
chainbench/tools/discovery/clients.json (1)

47-47: Confirm reth version bump. Version 1.8.2 matches the latest upstream release (v1.8.2) and the RPC mapping in methods.json remains unchanged.

@easeev easeev requested a review from erwin-wee October 14, 2025 13:30
@erwin-wee erwin-wee merged commit 59fa8b5 into main Oct 14, 2025
7 checks passed
@easeev easeev deleted the codex/add-reth-rpc-method-checker-to-chainbench branch October 14, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants