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

stateOverrides not applied in debug_traceCallMany #13705

Open
lwedge99 opened this issue Feb 5, 2025 · 1 comment
Open

stateOverrides not applied in debug_traceCallMany #13705

lwedge99 opened this issue Feb 5, 2025 · 1 comment
Assignees

Comments

@lwedge99
Copy link

lwedge99 commented Feb 5, 2025

System information

Erigon version: main branch

OS & Version: Linux

Commit hash: 8e4d8b7

Erigon Command (with flags/config):

Consensus Layer:

Consensus Layer Command (with flags/config):

Chain/Network:

Expected behaviour

debug_traceCallMany apply stateOverrides before transaction execution

Actual behaviour

stateOverrides not applied

Steps to reproduce the behaviour

#12593 added this line:

ibs.Reset()

stateOverrides use state objects, but ibs.Reset() clears state objects before execution, so stateOverrides take no effect.

Example: make this rpc request to the node, got error tracing failed: insufficient funds for gas * price + value: address 0x01230334cDEB19cB0f3B017E46994e393312c3C6 have 0 want 1. The account balance was not overridden.

{
    "jsonrpc": "2.0",
    "method": "debug_traceCallMany",
    "params": [
        [
            {
                "transactions": [
                    {
                        "value": "0x1",
                        "from": "0x01230334cdeb19cb0f3b017e46994e393312c3c6",
                        "to": "0x01230334cdeb19cb0f3b017e46994e393312c3c7"
                    }
                ]
            }
        ],
        {
            "blockNumber": "latest"
        },
        {
            "stateOverrides": {
                "0x01230334cdeb19cb0f3b017e46994e393312c3c6": {
                    "balance": "0x1"
                }
            }
        }
    ],
    "id": 1
}

Backtrace

[backtrace]
@akegaviar
Copy link
Contributor

akegaviar commented Feb 7, 2025

+ 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants