-
Notifications
You must be signed in to change notification settings - Fork 437
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
Make nethermind trace format/structure uniform across modules and with geth #7408
Comments
The idea behind the investigation was to check if
The RPC in question is the the debug_traceBlock RPC For perspective, Automatic traces are the traces dumped when an error occurs. Which happens here The format of the traces we are concerned about is the geth format. This is used in the debug_* api, and when the dump options is set to also display Geth. steps to reproduce For quickly Comparing traces on The geth format as shown from a [
{
"txHash": <string of hex value of hash e,g "0xfa696615b3e0bdaf676ba3cbe90b4dc4caf1a086540ba003e61d80b3547cb3a3">,
"result": {
"gas": <long in dec format>,
"failed": <boolean>,
"returnValue": <hex string>,
"structLogs": [
{
"pc": <long in dec fromat>,
"op": <all caps string for op code eg "PUSH20">,
"gas": <long in dec format>,
"gasCost": <long in dec fromat>,
"depth": <long in dec format>
},
...
]
}
},
...
] While netherminds was [
{
"gas": <string of long in hex format e.g "0x1cd1d">,
"failed": <boolean>,
"returnValue": <string int in hex format e.g "0x">,
"structLogs": [
{
"pc": <long in dec format>,
"op": <all caps string for op code eg "PUSH20">,
"gas": <long in dec format>,
"gasCost": <long in dec format>,
"depth": <long in dec format>,
"error": <string>,
"storage": <map>
},
...
]
},
...
] Things to note. Differences
Similarities.
Also more, Auto Dump - Automatic tracessetting --Init.AutoDump to All or Geth gets these traces. On inspecting the code, you'll notice both the dubug module and the code block for auto dumping using geth dump options use the exact same tracer and converter. this Implies (much faster that) |
Description
Comparing traces especially debug_traces between nethermind and geth should be as direct as possible, seeing as debug_ endpoints are defined by geth it'd be a good idea to have nethermind debug_trace_block be in the same format as geth's.
Steps to Reproduce/Extra Info
There are at least two ways to get execution traces/bad blocks from nethermind client.
Note: Traces can be particularly large and require some ram to display/format in a more readable format by most text editors/formatting services.
Actual behavior
using a webservice like tracoor and say some random hash of
0x60354ac24a83666dca2fde27f728c6b80a0c3b67ebb54e66438a5558d60754a3
.You'd notice that the format/fields, structure and units (hex/dec) for representing similar fields across clients differ on netherimind vs geth.
Expected behavior
The goal on resolving this issue is to ensure the automatic traces produced (Init.AutoDump ) match the nethermind client debug_trace_block rpc call [which also match that of geth's] which matches the trace_block call of the trace module. With debug_trace_block [geth's] being the source of truth.
Any extra fields introduced by nethermind should be left in place as is or maybe moved around depending, in such cases discuss below. Relative order should also be made to match.
The text was updated successfully, but these errors were encountered: