-
Notifications
You must be signed in to change notification settings - Fork 90
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
new(tests): Add generic precompile-absence test #1036
base: main
Are you sure you want to change the base?
Conversation
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.
But the call return 1 in either case if you call defined or undefined precompile?
I sent random bytes data to precompiles with the call. And if it's a precompile it consumes more gas than a call to empty account |
40c21a6
to
c192cd2
Compare
@winsvega I changed the call to have zero gas, so it will undoubtedly fail in case there's a precompile where it should not. It worked great. I checked by removing the BLS precompiles in the EEST's forks definitions but not in EELS, and this test failed as expected. |
Ah yes, can restrict the gas, I shall go an correct my test ) |
d15b12d
to
e5d05c8
Compare
🗒️ Description
Adds a simple test that, starting from Byzantium, calls all addresses less than or equal to
0x101
with:and expects success from every call.
Normally if a pre-compile is present in the address, it should return failure if the size is not what it expects, so in this test we use three different sizes to try to ensure that at least one of them is an invalid size to a would-be accidentally-active pre-compile in one of these addresses.
We also check the
RETURNDATASIZE
to be zero.🔗 Related Issues
ethereum/EIPs#8945
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.