Skip to content
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

Test EVM EE with basic test case #43

Merged
merged 9 commits into from
Dec 17, 2019
Merged

Test EVM EE with basic test case #43

merged 9 commits into from
Dec 17, 2019

Conversation

s1na
Copy link
Collaborator

@s1na s1na commented Dec 13, 2019

I set out to create a basic test case to run the evm EE and have it pass. To get there I had to fix a few other things to. Therefore this PR is a combination of a few changes:

  • It adds a new relayer that generates scout config files for a test case similar to the add11 state test. With the difference that instead of SSTORE it checks the expected value (sent to EE as part of block data) against value returned by evm code. Additionally the postStateRoot only takes value transfers into account, and no other state change (including metering).
  • To achieve that it adds initial logic for MSTORE8 and RETURN opcodes. They only consider the last byte of offset though, this needs to be fixed.
  • Modifies encodeAccount to accept account's state root and code hash, instead of encoding the default values.
  • It also re-adds npm run evm to CI
  • It makes the EE inputs codeHashes, bytecode and returnValue mandatory, since we now have the token logic in a different file and don't need to maintain backwards-compatibility.

Fixes #34

@s1na s1na requested a review from hugo-dc December 13, 2019 15:00
@lgtm-com
Copy link

lgtm-com bot commented Dec 13, 2019

This pull request introduces 1 alert and fixes 1 when merging aeda90b into a3c8cb2 - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

fixed alerts:

  • 1 for Unused variable, import, function or class

assembly/evm.ts Show resolved Hide resolved
assembly/main.ts Show resolved Hide resolved
assembly/evm.ts Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Dec 17, 2019

This pull request fixes 1 alert when merging 6ad200f into 585a957 - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

@s1na s1na merged commit a76f319 into master Dec 17, 2019
@s1na s1na deleted the basic-evm-test branch December 17, 2019 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate a simpler test case than add11
2 participants