-
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
EIP-3540: Unified Spec Tests #1127
Conversation
@winsvega Is it ok if we leave expectations with |
Yes, but also put a comment in info comment section with url to the geth/client generated the test and its branch and what eips are activated. |
Also checkout /src/README.md There we put map of ids and test vector descriptions. The ids then can be found in tests (also in comments section) |
This still needs to move cases with CREATE/CREATE2 in EOF code with leagacy initcode to Invalid files, and refill it with implementation that fails such CREATEs. |
bd60429
to
40245c1
Compare
nonce: 0 | ||
storage: {} | ||
344f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
balance: 0 | ||
# EOF code STATICCALLs legacy code | ||
# code: ':yul { sstore(0, staticcall(100000, 0xd94f5374fce5edbc8e2a8697c15331677e6ebf0b, 0, 0, 0, 1)) sstore(1, mload(0)) sstore(2, 2) stop()}' | ||
code: ':raw 0xEF000101003100600160006000600073d94f5374fce5edbc8e2a8697c15331677e6ebf0b620186a0fa600055600051600155600260025500' | ||
code: ':raw 0xef000101000402000100310300000000000006600160006000600073d94f5374fce5edbc8e2a8697c15331677e6ebf0b620186a0fa600055600051600155600260025500' |
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.
Ori is working on a script that will convert normal yul into eof code. But it is good to have it defined explicitly here for now
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.
Solidity already compiles yul to eof in a branch, see #1103 (comment)
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.
Ori is working on a script that will convert normal yul into eof code. But it is good to have it defined explicitly here for now
I gave up on that idea (it was to convert bytecode, not yul). It's a lot harder than it appears, because of the way jumps changed and the way you need to track maxStackHeight.
@@ -498,7 +413,7 @@ EOF1_Calls: | |||
- indexes: | |||
data: ':label eof_staticcall_eof' | |||
network: | |||
- 'Merge+3540+3670' | |||
- 'Shanghai' | |||
result: | |||
a94f5374fce5edbc8e2a8697c15331677e6ebf0b: | |||
nonce: 1 |
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.
Would be nice to have a little comment for the storage values below, what they intent to indicate.
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.
Where exacty would you like this? In every expectation in every filler? If we add a a comment in every expectation, it will be very repetitive. It's basically everywhere:
- slot 0 - result of CALL/CREATE/CREATE2
- slot 1 - always 1 when not OOG
Contains tests in #1112 , updated based on latest EOF Unified Spec