Skip to content

Statetest execution: missing stateroot on stderr #21080

@holiman

Description

@holiman

System information

Commit hash: erigon_vm version 3.5.0-dev-a9a3c6d4

Actual behaviour

With the changes in statetest execution, (I assume this issue stems from #21058 some there are a few differences.

When doing tracing, the bulk of the trace is emitted on stderr, in jsonl format, whereas the json result is emitted on the stdout. This is a neat way to divide things, a json-reader can be used on stdout, and for details, a streaming jsonl-parser can be used on stderr.

However, the most recent change happened to drop the stateroot element from the stderr trace. Which means that a reader wanting to do differential fuzzing and compare results, it now needs to read both stderr and stdout, instead of only stdout.

See diff of before and after:

Image

Tangentially

Also, the statetest executed in that screenshot is here: https://github.com/holiman/goevmlab/blob/master/evms/testdata/cases/eofcode.json. It appears that the stateRoot from executing that is different now versus before (0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 vs 53f6733a696cb3bbf77b635d96ace97f25ffee2d08d3e3d4ae1e566bfc060d6f)

Now:

[
  {
    "name": "00161676-mixed-1",
    "pass": false,
    "stateRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "fork": "Cancun",
    "error": "unexpected error: intrinsic gas too low: have 0, want 21016"
  }
]

Previously:

[
  {
    "name": "00161676-mixed-1",
    "pass": false,
    "stateRoot": "0x53f6733a696cb3bbf77b635d96ace97f25ffee2d08d3e3d4ae1e566bfc060d6f",
    "fork": "Cancun",
    "error": "post state root mismatch: got 53f6733a696cb3bbf77b635d96ace97f25ffee2d08d3e3d4ae1e566bfc060d6f, want 0000000000000000000000000000000000000000000000000000000000000000"
  }
]

Is this second part expected behaviour?

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions