cosmos / cosmos/evm

Support stateOverrides in debug_traceCall

Open
#1,180 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
164
Forks
215
Avg merge
3d 58m
Merged PRs (30d)
12

Description

Summary

Add stateOverrides support to debug_traceCall for geth-compatible JSON-RPC tracing.

Cosmos EVM already supports state overrides for eth_call and eth_estimateGas, but debug_traceCall does not currently pass state override data into the trace execution path.

Reproduction (for bugs)

Desired JSON-RPC usage:

{
  "method": "debug_traceCall",
  "params": [
    {
      "from": "0x...",
      "to": "0x..."
    },
    "latest",
    {
      "tracer": "callTracer",
      "stateOverrides": {
        "0x0000000000000000000000000000000000000101": {
          "code": "0x600160005260206000f3"
        }
      }
    }
  ]
}

Impact

This improves geth compatibility for debugging and tracing workflows.

Affected users include:

  • JSON-RPC clients relying on geth-compatible debug_traceCall
  • Bundler can run a simulation for eip-7702.
  • tracing/debugging tools

Related

https://github.com/cosmos/evm/pull/337

Checklist

  • Linked to a GitHub Issue (or this is the Issue)
  • Repro steps included (for bugs)
  • Impact described
  • I understand minor typo/style doc fixes will not be accepted

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the debug_traceCall JSON-RPC handler into the trace execution path, then compare it with the existing state override handling for eth_call and eth_estimateGas. Done means the supplied stateOverrides object reaches trace execution and the shown geth-compatible request works as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.