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

cmd/evm: make evm statetest accept non-json files #30927

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Dec 17, 2024

This fixes a regression introduced recently. Without this fix, it's not possible to use statetests without .json suffix.

This is problematic for goevmlab minimizer, which appends the suffix .min during processing.

Without fix

[user@work go-ethereum]$ go run ./cmd/evm/ statetest --trace --trace.format=json ./00155493-mixed-6.json.min.min
null

With fix

[user@work go-ethereum]$ go run ./cmd/evm/ statetest --trace --trace.format=json ./00155493-mixed-6.json.min.min
{"pc":0,"op":127,"gas":"0x19e701","gasCost":"0x3","memSize":0,"stack":[],"depth":1,"refund":0,"opName":"PUSH32"}
{"pc":33,"op":95,"gas":"0x19e6fe","gasCost":"0x2","memSize":0,"stack":["0xc159603ab9942405d1c9c45c46403949f0540852afe082105fc3a18449358973"],"depth":1,"refund":0,"opName":"PUSH0"}

@fjl fjl merged commit 1321a42 into ethereum:master Dec 17, 2024
3 checks passed
@fjl fjl added this to the 1.14.13 milestone Dec 17, 2024
GrapeBaBa pushed a commit to optimism-java/shisui that referenced this pull request Dec 23, 2024
This fixes a regression introduced recently. Without this fix, it's not
possible to use statetests without `.json` suffix. This is problematic for
goevmlab `minimizer`, which appends the suffix `.min` during processing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants