-
Notifications
You must be signed in to change notification settings - Fork 700
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_traceBlockByHash returns method handler crashed for a certain block #2235
Comments
Thanks for reporting @tibineacsu95 , I tried reproducing this and get block not found. Checking against Snowtrace and AvaScan, I don't see any of those block hashes showing up and see different block hashes at those heights on both Fuji and Mainnet. The block format for Coreth and Subnet-EVM are slightly different from go-ethereum, so it's possible that if the library they are using is re-calculating the block hash they may do so incorrectly resulting in making a query for a block hash that doesn't exist. For the block hash that you got by using That being said, running the first query I get:
Could you share logs from the node you sent that request to? It should contain a stacktrace from the method handler crash. |
This could be caused by ethereum/go-ethereum#27691 which has not been migrated from upstream into coreth yet, but I'd need to see the stacktrace / be able to reproduce to confirm it's the same issue. |
Hi @aaronbuchwald! First of all, let me attach the call used to extract the block and its response:
The resulted number corresponds to the block here: https://testnet.snowtrace.io/block/8876308 Another behaviour we've observed is that the following call works (tracing by block number instead of block hash):
Will not attach the output as it is quite long. On another note, I have tried removing one of our Testnet nodes from Load Balancing in order to isolate the issue, and extracted a stacktrace logged when sending queries using Here are the lines: Please let me know if this is helpful in any way. Thank you! |
Thanks for posting the stacktrace, this is very helpful and looks like the same issue that I mentioned has already been fixed upstream. Creating an issue on Coreth to track this: ava-labs/coreth#369. |
Btw it looks like the reason that tracing by block number does not trigger the same error is that the API call that you pasted there is running the I'll put up a PR to migrate the geth change from upstream to coreth and this should be included in the next release. |
Thanks a lot for your help and time spent in troubleshooting! Really appreciate it. We'll wait for the new release of avalanchego and update as soon as possible. Have a nice rest of the week! |
Quick update: after updating to |
Hello,
One of our customers is trying to perform the following query:
curl -s -X POST -H "Content-Type: application/json" --data '{"method":"debug_traceBlockByHash","params":["0xaf4beb8295889cbbe4760f4114730e46126e6b719f370e8387723c770eca0c85", {"tracer": "prestateTracer", "tracerConfig": {"onlyTopCall":false,"diffMode":true}}],"id":1,"jsonrpc":"2.0"}' localhost:9650/ext/bc/C/rpc
And the response is:
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"method handler crashed"}}
We have tried tracing the the next block hash in history:
getBlockByHash
on0xaf4beb8295889cbbe4760f4114730e46126e6b719f370e8387723c770eca0c85
and got0x877114
as block number in hex for the current block, so we are taking0x877115
as the following blocketh_getBlockByNumber
on0x877115
and got the following block hash0xecbb1db71a133c2959ff56018fc611b0ffa3daa71ebf0e89c98172652a35d117
debug_traceBlockByHash
on the above extracted hash renders the expected resultConclusion: It seems like some blocks are having problems when being traced by hash - the above is just one of the examples, another block number with the same behaviour would be 8876292.
Avalanchego version:
avalanche/1.10.13 [database=v1.4.5, rpcchainvm=29, commit=2d8222da82114088a2a99d8d69f40846f1ea6208, go=1.20.10]
We've also tried updating to
v1.10.14
but we faced the same behaviour.Could anyone be able to shed some light on the above issues, whenever you get the time, please?
Thanks a lot!
P.S: This is a similar issue we've opened in the past, attaching it for traceability: #1689, which opened ava-labs/coreth#282 and was ultimately fixed.
The text was updated successfully, but these errors were encountered: