ethereum / ethereum/execution-specs
✨(gentest): use `evm_bytes` to generate python opcode in tests
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 505
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 116
Description
Currently, evm code is written as a hex string in the generated test. This could be made more readable by converting the bytecode to the `Opcodes` mini-lang using `evm_bytes` (as used here):
https://github.com/ethereum/execution-spec-tests/blob/802467c890e55cac89ad903585f01e440f701728/tests/shanghai/eip3855_push0/test_push0.py#L61
The first todo would be probably to check whether `gentest` correctly generates tests that have a smart contract interaction :slightly_smiling_face:
I think it should be enabled by default, but can be disabled via an option.
Note: `evm_bytes_to_python` was renamed to `evm_bytes` in ethereum/execution-spec-tests#844
Contributor guide
Assessment
This issue has not been assessed yet.