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
| # 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.
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.
Solidity already compiles yul to eof in a branch, see #1103 (comment)
There was a problem hiding this comment.
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.
| - 'Shanghai' | ||
| result: | ||
| a94f5374fce5edbc8e2a8697c15331677e6ebf0b: | ||
| nonce: 1 |
There was a problem hiding this comment.
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.
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