-
Notifications
You must be signed in to change notification settings - Fork 320
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
Tests where data is copied to a memory range longer than the data itself #538
Conversation
…r than the data itself.
Note that there are some other opcodes that may need tests like these too (at minimum CODECOPY). Wanted to check this is a sensible approach to this kind of test before going too far. |
Hi @ajsutton, to follow up the mail exchange: great that you also want to help along the PR to improve documentation! I have just submitted a PR with a transition of the creation docs to this repository and some initial updates #539, this is nevertheless just a starting point. Feel free to write initial questions you have directly in the code of the PR, I will try to update the PR accordingly. We can nevertheless also do subsequent PRs once this initial PR is merged. |
Oh, tests are passing, great! 👍 |
Yeah I misinterpreted the error message - it was actually telling me that I’d missed refilling one test so just had to do that and I also generated the blockchain variants based on the intructions in the PR you mentioned. |
@@ -0,0 +1,60 @@ | |||
{ | |||
"CallEcrecoverInvalidSignature" : { | |||
"env" : { |
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.
could you please add
"_info" : {
"comment" : " Test Description "
}
section describing the logic behind LLL code. please?
in other test fillers too.
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.
I didn't know that was possible but definitely good to have. I've added some, let me know if they explain things well enough.
ready to merge? |
Yep I’m happy if you are. |
We just did a first test run with your tests added and directly stumbled over, thanks for catching this! 👍 |
Well I'm glad it's not just me that got this wrong then. :) |
Adds tests to cover cases where the result of an EVM opcode is written to a specified memory range and the result is shorter than the specified range. This includes:
These cover cases where Pantheon behaviour differed from other clients - initially because EXTCODECOPY did not zero out memory beyond the end of the data and then we fixed that which broke CALL which expects the output length to be treated as a maximum length so remaining memory is not zeroed out. The reference tests don't appear to have any coverage of this category of behaviour.