Skip to content

EIP-3540: Unified Spec Tests#1127

Merged
winsvega merged 1 commit intoethereum:developfrom
ipsilon:eof
Jan 3, 2023
Merged

EIP-3540: Unified Spec Tests#1127
winsvega merged 1 commit intoethereum:developfrom
ipsilon:eof

Conversation

@hugo-dc
Copy link
Copy Markdown
Member

@hugo-dc hugo-dc commented Dec 29, 2022

Contains tests in #1112 , updated based on latest EOF Unified Spec

@hugo-dc hugo-dc changed the title EOF Unified Spec Tests EIP-3540: Unified Spect Tests Dec 29, 2022
@hugo-dc hugo-dc changed the title EIP-3540: Unified Spect Tests EIP-3540: Unified Spec Tests Dec 29, 2022
@gumb0
Copy link
Copy Markdown
Member

gumb0 commented Dec 29, 2022

@winsvega Is it ok if we leave expectations with Shanghai fork name here?

@winsvega
Copy link
Copy Markdown

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.

@winsvega
Copy link
Copy Markdown

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)

@gumb0
Copy link
Copy Markdown
Member

gumb0 commented Dec 30, 2022

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.

@hugo-dc hugo-dc marked this pull request as ready for review January 2, 2023 15:04
# 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'
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member

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)

Copy link
Copy Markdown
Collaborator

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.

- 'Shanghai'
result:
a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
nonce: 1
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Member

@gumb0 gumb0 Jan 3, 2023

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

@winsvega winsvega merged commit b63ca72 into ethereum:develop Jan 3, 2023
@gumb0 gumb0 deleted the eof branch January 3, 2023 15:24
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.

4 participants