-
Notifications
You must be signed in to change notification settings - Fork 105
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
feat(tests): port ethereum/tests test cases (tracking issue) #972
Comments
I still remain quite skeptical about automated port. I would rather focus on rewriting the tests. there are not so many if you take combinations and vector tests (precompile inputs) and random tests out. (which are easy to do in python too) |
OK, how about the 3 |
Please can I take on swapFiller.yml? @danceratopz |
Yes, @bomanaps! Please make an issue when you get started and I can link it in the tracker here to avoid anyone else working on it :) |
Hi @winsvega Sorry I haven't written in so long, but I got sick and then Christmas..As I see from docs the best idea will be to start with tag: 'good first issue'. In this case can I take for example: https://github.com/ethereum/tests/tree/develop/src/GeneralStateTestsFiller/stEIP150singleCodeGasPrices or maybe rc/GeneralStateTestsFiller/stRandom and src/GeneralStateTestsFiller/stRandom2? Or maybe there is something more important ? |
That seems to only check the gas price of individual opcodes. That should be already covered in pyspec. Take a look at #1016 |
So maybe this one stWalletTest |
@danceratopz @winsvega If the Edit: Focusing solely on precompiled contracts. ZK tests can be worked by someone else or I can circle back once I've nailed things down. |
stWallet test is not an evm test. This is a legacy test for a smart contract, I just kept it as a legacy, and it probably doesn't cover anything evm related. |
hm so in this case @winsvega can you suggest which one I can take? maybe it will be easier to choose correct one ;) |
StRandom |
This is a top-level issue for tracking the manual porting of ethereum/tests test cases to execution-spec-tests:
If you're already familiar with ethereum/tests and execution-spec-tests, jump to the issue tracker below!
Background
ethereum/tests was the repository used to define EVM test cases from Frontier up to and including The Merge. The test cases are defined as YAML (and sometimes JSON) files in the ./src/ sub-directory and the JSON "test fixtures" (fully-populated tests that can be executed against clients) are generated using ethereum/retesteth. These JSON artifacts are regenerated when required and added to the repository, for example, in the ./GeneralStateTests/ sub-directory.
From Shanghai on, new test cases (in particular for new features included in hard-forks) have been defined in Python in this repository (execution-spec-tests). The existing test cases are still important to execute against clients, however, and porting ethereum/tests to execution-spec-tests ensures that the test cases can be continually maintained and filled (generated) for newer forks. It also has the advantage that client teams will only need to obtain test fixture releases from one source.
Automated Port to Python
Although there will be an effort to automate ("transpile") the remaining test cases from YAML (respectively JSON) to Python; contributions to manually port individual test cases can be very beneficial and are welcome!
The benefits of manual porting are:
./tests
folder in execution-spec-tests by the fork and the EIP in which the functionality was introduced.Process
a. Add the list of ported YAML files to converted-ethereum-tests.txt.
b. If the tests can't currently be filled, please explain the issue (feel free to also open a Discussion).
Help with ethereum/tests
The test formats are described in the ethereum/tests online docs. Note that state filler test cases in YAML can be parametrized, see the docs here.
Hints to Get Started with ethereum/execution-spec-tests
uv run et make test
to create a template test module (currently a WIP in ✨ feat(et): addet make test
for interactively creating new tests #950).test_chainid()
- there are other examples in the tests.Feel free to reach out for help or guidance in the Ethereum R&D discord or via DM; see Getting Help in the docs.
Test Cases
Some Examples of Ported Tests
The text was updated successfully, but these errors were encountered: