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

nimbus t8n to support vmtrace #1544

Closed
winsvega opened this issue Apr 12, 2023 · 1 comment · Fixed by #1671
Closed

nimbus t8n to support vmtrace #1544

winsvega opened this issue Apr 12, 2023 · 1 comment · Fixed by #1671
Labels
enhancement New feature or request

Comments

@winsvega
Copy link

geth vmtrace format:

VMTrace: (GeneralStateTests/stExample/add11, fork: Shanghai, TrInfo: d: 0, g: 0, v: 0, TrData: ` 0x..`)
Transaction number: 0, hash: 0xeda4d6763740fbccc99cc8873ff09b8504d192e83f73bd16ccf5feb053a4e3cd

{"pc":0,"op":96,"gas":"0x5c878","gasCost":"0x3","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"PUSH1"}
{"pc":2,"op":96,"gas":"0x5c875","gasCost":"0x3","memSize":0,"stack":["0x1"],"depth":1,"refund":0,"opName":"PUSH1"}
{"pc":4,"op":1,"gas":"0x5c872","gasCost":"0x3","memSize":0,"stack":["0x1","0x1"],"depth":1,"refund":0,"opName":"ADD"}
{"pc":5,"op":96,"gas":"0x5c86f","gasCost":"0x3","memSize":0,"stack":["0x2"],"depth":1,"refund":0,"opName":"PUSH1"}
{"pc":7,"op":85,"gas":"0x5c86c","gasCost":"0x5654","memSize":0,"stack":["0x2","0x0"],"depth":1,"refund":0,"opName":"SSTORE"}
{"pc":8,"op":0,"gas":"0x57218","gasCost":"0x0","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"STOP"}
{"output":"","gasUsed":"0x5660"}

t8n is supposed to produce vmtrace files in out directory

Trace file `trace-0-0xeda4d6763740fbccc99cc8873ff09b8504d192e83f73bd16ccf5feb053a4e3cd.jsonl` not found!
WARNING: Transaction trace not found! (0xeda4d6763740fbccc99cc8873ff09b8504d192e83f73bd16ccf5feb053a4e3cd)

trace-[txIndex]-[txHash].jsonl

t8n trace options:

--trace                        (default: false)
          Output full trace logs to files <txhash>.jsonl
    --trace.memory                 (default: false)
          Enable full memory dump in traces
    --trace.nomemory               (default: true)
          Disable full memory dump in traces (deprecated)
    --trace.noreturndata           (default: true)
          Disable return data output in traces (deprecated)
    --trace.nostack                (default: false)
          Disable stack output in traces
    --trace.returndata             (default: false)
          Enable return data output in traces

the trace format must be exactly the same as of issue: ethereum/tests#249
but better to compare to the outputs produced by geth.
if we have the same trace format we can use tools to find transaction execution bugs

@jangko jangko added the enhancement New feature or request label Jun 25, 2023
@winsvega
Copy link
Author

we have gasPrice disagreement on nimbus vs geth on this test
ethereum/go-ethereum#27721 (opcodeBlobhashOutOfRangeFiller.yml)
would be nice to see nimbus vm trace to compare it with geth

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

Successfully merging a pull request may close this issue.

2 participants