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

Add EXCHANGE test for EOF #673

Open
jochem-brouwer opened this issue Jul 4, 2024 · 0 comments
Open

Add EXCHANGE test for EOF #673

jochem-brouwer opened this issue Jul 4, 2024 · 0 comments

Comments

@jochem-brouwer
Copy link
Member

There is an exchange test in the latest EOF test releases, which we pass. However, our current implementation treats our stack in reverse (in case of a stack of 1024 items, it would still try to exchange items super deep into the stack instead of at the top).

EVMONE has this EOF test:

0xef000101000402000100120400000000800004600160026003e80060005560015560025500

It simply calls EXCHANGE[0], which thus means to exchange the item 1 position below the top with the item 2 positions below the top.

EthereumJS does not pass this test, which it clearly should. So apparently the current EXCHANGE test also works on reversed arrays (so if you would reverse the stack, so read either from the top or from the bottom) then it would still pass.

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

No branches or pull requests

1 participant