-
Notifications
You must be signed in to change notification settings - Fork 102
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
convert calldatacopy test #1056
Conversation
ada2d17
to
a8cb99b
Compare
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.
Thanks for this! I've left some comments to make the code more readable, I can fully review once these are applied 👍
This could potentially be due to the
We could use the permalink to the file: https://github.com/ethereum/tests/blob/ae4791077e8fcf716136e70fe8392f1a1f1495fb/src/GeneralStateTestsFiller/VMTests/vmTests/calldatacopyFiller.yml
This might be because of the way the code is compiled for the ethereum/tests version of the test, so there's a difference between the opcodes used, but we could analyze the result and if deemed unimportant we can merge as is, no problem. |
c5aa077
to
1f652aa
Compare
or you can reference legacy test file. because ethereum/tests:: develop tests are essentially a copy of tests in legacytests/cancun. |
dd2223f
to
a011f44
Compare
34e9230
to
83f2ab6
Compare
83f2ab6
to
1a2026b
Compare
OK! I've addressed all the comments. Last questions from the checklist:
Also, I got the last failing tests to run by raising the gas limit in the tx from 100_000 to 100_000_000, but didn't try anything in between. Is it important here to try to be specific in the gas amount, or is just adding a bunch OK? |
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.
Hey looks good so far, I have a couple more comments.
The gas issue I haven't been able to figure out but one thing that we could to is just limit the test to be filled only on Byzantium and after.
Let me know what you think.
Figured out the gas issue: It seems like passing something above the current available gas results in the The solution seems to be something along the lines of: Op.CALL(
gas=Op.SUB(Op.GAS(), 0x100),
address=code_address,
value=0x0,
args_offset=0xF,
args_size=0x10,
ret_offset=0x20,
ret_size=0x40,
) so the call does not try to send a gas amount higher than it currently gas. With this change, sending the transaction with a gas limit of |
OK! All requested updates pushed. I found them in docs, just didn't know where to look 😄 |
the only missing coverage is |
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.
LGTM, thanks!
Thanks for updating the gas, @marioevz - guess I got it in the one place and missed the other. |
I've verified the coverage loss and it's down to a couple of things:
We should be able to merge without issues 👍 |
* convert calldatacopy from yml * adding gas to tx gets everything passing * review updates * Update tests/frontier/opcodes/test_calldatacopy.py * Update docs/CHANGELOG.md --------- Co-authored-by: winsvega <[email protected]> Co-authored-by: Mario Vega <[email protected]>
🗒️ Description
Converts
calldatacopy
tests from herePR to delete from
ethereum/tests
is hereTests pass run against
evm statetest
andevm blocktest
geth version 1.14.12-stable-293a300d
Questions:
🔗 Related Issues
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.