-
Notifications
You must be signed in to change notification settings - Fork 72
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
EIP 6780 Tests #122
EIP 6780 Tests #122
Conversation
Hi @jwasinger, I just struggled to fill these myself. It turns out that you need to specify tf --latest-fork Cancun --test-categories eips.eip6780 If I run this using the
I get further, but the filler's post condition fails, if I run it against the version of go-ethereum (mdehoog/go-ethereum@ac64c44) that was used for the execution-spec-tests v0.2.5 release), but mdehoog/go-ethereum@ac64c44 is focussed on 4844 and hasn't implemented 6780. @marioevz or @spencer-tb, perhaps you've already cleared this up? If not, could you help further? |
Had a proper look at this! Thanks for contributing - we are hoping to make it much easier to write tests very soon :D I believe in order to fully fill a valid test fixture here we need a combination of the mdehoog/go-ethereum@ac64c44 branch and the jwasinger/go-ethereum@06c795d for now in order to use the appropriate fork. But as far as I am aware the mdehoog/go-ethereum@ac64c44 branch is mostly a test branch for 4844. As there were a lot of merge conflicts between the two I manually added the changes from jwasinger/go-ethereum@06c795d to mdehoog/go-ethereum@ac64c44 here -> https://github.com/spencer-tb/go-ethereum/tree/eip-6780-test. So many branches :D This successfully created a fixture for the first test
I believe the expected outcome here is for account After some debugging I made a small change here: It looked like the account was being marked as deleted if it called selfdestruct, regardless of whether it was created in the same transaction. After adding the extra logic here: Hopefully this helps moving forward :D |
One thing I just realized is that the new selfdestruct behaviour will change the outcome of this test: https://github.com/ethereum/execution-spec-tests/blob/main/fillers/security/selfdestruct_balance_bug.py I am thinking we could run the security tests in a different scope, or have a method of specifying a specific |
@spencer-tb @danceratopz thanks for taking a further look into this.
This is the existing behavior for The reason the test was failing to fill is that the Cancun instruction set wasn't being enabled. I've added that to jwasinger/go-ethereum@0aebb62 and removed spencer-tb/go-ethereum@5a1923d . The tests now fill for me.
IMO it should be sufficient to just disable filling this test for post-cancun/6780 forks. |
IMO, a way to make it easier to fill tests for feature branches included with upcoming hard-forks (where the fork timestamp is unknown) would be to allow |
Hey @jwasinger, we recently made a lot of changes to the repo with the inclusion of the pytest framework, if you need any help running your tests with the new changes, just let me, @danceratopz or @spencer-tb and we can help you out :) |
Hi @jwasinger, I just rebased this on main and refactored the tests to run with the new pytest-based execution-spec-tests framework - we can pick up work on these tests again! You can run the tests with: fill tests/cancun/eip6780_selfdestruct/ --fork=Shanghai --evm-bin=/path/to/jwasinger/go-ethereum/build/bin/evm -v --runxfail The test Couple of comments:
There's no rush on 2., as it currently stands we can resume work on these tests. |
Thanks for updating this @danceratopz . I have pushed a change to the 6780 geth branch to make the EIP available as an extra eip via |
Perfect, thanks for the fast repsonse @jwasinger, we'll get that running on our side soon! |
@jwasinger I added the fixture so the tests run both with I'll be adding some more tests to this branch in the next couple of hours if you don't mind :) |
Some test ideas:
cc @winsvega |
New test idea, since sending ether to a non-existant account creates it:
Variation of the above, but self destruct is in the initcode, skipping the call test but keeping the assert. |
Added more tests and packaged them all in here: eip-6780-blockchain-tests.tar.gz More tests are still missing but these should provide a nice start point for implementations. |
Great that this is coming along. I'll try to check it out in more detail, but some of the things I'd like to ensure have coverage are:
|
I believe all points should be covered now:
|
Current implementation assumes all clarifications indicated by ethereum/EIPs#7308 are accepted. |
Besu passes all the tests for self destruct. One question, is there a way to flag this warning as "expected" and not output it?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@shemnon, you can suppress this warning on the command line using the following flag:
We could certainly consider removing this warning, because, as you mention, it's expected (if any tests use Yul) for forks under development (as solc typically won't add support for the fork until after it's deployed). |
I'm unsure how to fill these. I have tried:
After a bit of digging, I figured out that the filler is not detected because it is configured for an upcoming fork (have also tried using
Cancun
with the same result).