optimism
optimism copied to clipboard
callTracer returns TypeError exception for certarin txs
Describe the bug
Some transactions raise an exception when using debug_traceTransaction
with the callTracer
tracer.
These transactions all have the same error in the Status at Etherscan:
Fail with error 'deployer address not whitelisted: 0xc6dbd69d69F22842832E93aE1Ede9995c583bFC1'
List of transactions detected:
- 0xc033250c5a45f9d104fc28640071a776d146d48403cf5e95ed0015c712e26cb6
- 0xcf6e46a1f41e1678fba10590f9d092690c5e8fd2e85a3614715fb21caa74655d
- 0x86f8c77cfa2b439e9b4e92a10f6c17b99fce1220edf4001e4158b57f41c576e5
- 0x0c38a734be0cd55ae21a9f40b7b7399cbbc957614a39e3e1ecd5e135496c6e9f
- 0x4ae94460e1550b430707d13f6c632422b89f2b8989fe50adeddb85464584b3a3
- 0x9305aa567670acee152774543136e1e2cb756c04083f643f69de75bceba150c7
- 0x177a8debf83f65daf7e9eb75d676262949d91dc8a5ef62a859a31b0e6167fd17
- 0xc033250c5a45f9d104fc28640071a776d146d48403cf5e95ed0015c712e26cb6
- 0xd171e2d41a1828f2986633ab004a613767811a962e6aa02b181ac1707e31212e
To Reproduce
Send debug_traceTransaction
to an archive node:
curl https://your-node \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"debug_traceTransaction","params":["0xc033250c5a45f9d104fc28640071a776d146d48403cf5e95ed0015c712e26cb6", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}'
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"TypeError: cannot read property 'toString' of undefined in server-side tracer function 'result'"}}
Expected behavior
Get a response without an exception which is similar to other callTracer
responses.
System Specs:
- OS: Ubuntu 20.04.3 LTS
- Package Version (or commit hash): 0.5.11
Additional context Add any other context about the problem here.
yeah, the default call tracer doesn't handle null values correctly. Until this is fixed, for the time being, might I suggest using this tracer. The script does the same thing as the default call_tracer. You can supply a custom tracer to debug_traceTransaction
by setting the "tracer" parameter to the script content.
@Inphi, thanks for the quick response!
How would be the way to send the code inside params/tracer
?
I've tried a few ways, but getting always:
{"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"failed to parse request"}}
It's tricky to do this directly on the cmd line as the tracer script has to be escaped. If you don't mind using python, you can use this convenient script that does it for you:
ETH_RPC_URL=https://your-node python3 trace_tx.py <txhash> <path_to_tracer.js>
@Inphi Great! It works like a charm :smile: Leaving this gist with a test request and the code escaped in case it is useful for anyone: https://gist.github.com/qk-santi/c73f01788c2bf75d09cc330efe4d730d
I would like to reopen that issue as @Inphi solution was really temporary Until this is fixed, for the time being, might I suggest
today we are trying to build a professional indexer which is compatible with 10s of EVMs chain and our indexer is stuck at block
{
"method": "debug_traceBlockByNumber",
"params": [
"0x15679",
{
"tracer": "callTracer"
}
],
"id": 0,
"jsonrpc": "2.0"
}
Getting incorrect response
{
"jsonrpc": "2.0",
"id": 0,
"result": [
{
"result": {
"type": "",
"from": "",
"gas": "",
"gasUsed": "",
"input": ""
}
}
]
}
This is how Etherscan see this https://optimistic.etherscan.io/tx/0xcf6e46a1f41e1678fba10590f9d092690c5e8fd2e85a3614715fb21caa74655d - we should have also some error information line deployer address not whitelisted: 0x6C3F14DA26556585706c02af737a44E67Dc6954D