Skip to content

nimbus t8n to support vmtrace #1544

Closed
@winsvega

Description

@winsvega

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions