This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
Treat output length as a maximum length for CALL operations #236
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR description
For call-type operations when the output data is shorter than the specified output length, the extra unused memory should be left unchanged, not zeroed out. By chance Pantheon gets this right for the most common case when the output data is empty but not for other cases.
So fix the corner case in Memory so that it consistently zeros out all the memory in the range (which is the right behaviour for other operations like CODECOPY), then change
AbstractCallOperation
to explicitly treat output length as a maximum length.New ethereum reference tests are being contributed to cover these cases: ethereum/tests#538
Issues with this behaviour were encountered on ropsten in block 1715984 and block 465128.