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

debug_traceCall does not support state override (behavior different from Geth) #3495

Closed
zzh1996 opened this issue Feb 12, 2022 · 0 comments
Closed

Comments

@zzh1996
Copy link

zzh1996 commented Feb 12, 2022

Erigon version: 2022.02.02-beta
OS & Version: Linux

Request:

$ curl http://127.0.0.1:8546/ -H "Content-Type: application/json" --data '{
        "method": "debug_traceCall",
        "params" :[
                {
                    "from": "0xda9dfa130df4de4673b89022ee50ff26f6ea73cf",
                    "to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "data": "0x",
                    "value": "0x0",
                    "gasPrice": "0x9184e72a000"
                },
                "latest", {"tracer": "callTracer", "stateOverrides": {"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": {"code": "0xfd"}}}
        ],
        "id": 0,
        "jsonrpc": "2.0"
}'

Erigon response:

{"jsonrpc":"2.0","id":0,"result":{"type":"CALL","from":"0xda9dfa130df4de4673b89022ee50ff26f6ea73cf","to":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","value":"0x0","gas":"0x2fa9e78","gasUsed":"0xef7","input":"0x","output":"0x","time":"1.296625ms"}}

Geth response:

{"jsonrpc":"2.0","id":0,"result":{"type":"CALL","from":"0xda9dfa130df4de4673b89022ee50ff26f6ea73cf","to":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","value":"0x0","gas":"0x2fa9e78","gasUsed":"0x2fa9e78","input":"0x","error":"stack underflow (0 \u003c=\u003e 2)"}}

I hope state override can be added to every trace_* RPC command

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

2 participants