Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Use correct CHAINID in EVM #947

Conversation

DavePearce
Copy link
Collaborator

This updates the ToyExecutionEnvironment to use the correct CHAINID when constructing the EVM. Previously, this was not done correctly and meant that the CHAINID bytecode was returning an invalid value, which in turn mean that storage addresses were being computed incorrectly (i.e. because they incorporated the CHAINID into the hash).

@DavePearce DavePearce requested a review from powerslider August 17, 2024 09:19
@DavePearce DavePearce linked an issue Aug 17, 2024 that may be closed by this pull request
@DavePearce
Copy link
Collaborator Author

DavePearce commented Aug 17, 2024

@powerslider I am not so certain about changes to the ToyExecutionEnvironmentV2. As far as I can tell, this doesn't read the chainID out of the tx like the original ToyExecutionEnvironment. So, it seems to me that it will always have the default value of 1337 for the chainID which will not be correct for some of the GeneralStateTests.

@DavePearce DavePearce force-pushed the fix/issue-940/incorrect-chainid-used-in-toyexecutionenvironment branch from 56885d0 to c9575cf Compare August 17, 2024 19:05
This updates the `ToyExecutionEnvironment` to use the correct CHAINID
when constructing the EVM.  Previously, this was not done correctly and
meant that the `CHAINID` bytecode was returning an invalid value, which
in turn mean that storage addresses were being computed incorrectly
(i.e. because they incorporated the CHAINID into the hash).
@DavePearce DavePearce force-pushed the fix/issue-940/incorrect-chainid-used-in-toyexecutionenvironment branch from c9575cf to b206f8a Compare August 17, 2024 19:06
@powerslider powerslider merged commit 862fee6 into arith-dev Aug 19, 2024
5 checks passed
@powerslider powerslider deleted the fix/issue-940/incorrect-chainid-used-in-toyexecutionenvironment branch August 19, 2024 17:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect CHAINID used in ToyExecutionEnvironment
3 participants