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

EOF Implementers Call #62 #1192

Closed
poojaranjan opened this issue Oct 30, 2024 · 9 comments
Closed

EOF Implementers Call #62 #1192

poojaranjan opened this issue Oct 30, 2024 · 9 comments

Comments

@poojaranjan
Copy link
Contributor

poojaranjan commented Oct 30, 2024

Meeting Info

Nov 27, 2024 , 15:00 UTC

Duration: 60 minutes

Zoom: https://us02web.zoom.us/j/88940506383?pwd=aTdsbHVyMTNDSUFHYmhTWlI2ZEVldz09

📅 Subscribe to the Ethereum Protocol Call calendar for calendar invites

Resources

Agenda

Please add other agenda items or links to discuss.

Next call on Dec 11, 2024

@kuzdogan
Copy link
Member

kuzdogan commented Nov 20, 2024

Proposing the agenda item "separate contract metadata data section"

TLDR: We believe it'd make sense to have a data section for contract metadata: data that won't be used by and is unreachable to the contract's code.

Our main use case is the Solidity's contract metadata hash + the Solidity version, which are appended to the bytecode in CBOR encoding (See it in action at playground.sourcify.dev). This wouldn't be the only use case as other languages and tools might want to add various metadata to the contract's bytecode.

With its current form putting any metadata in the data section would cause changes in the contract's code because of shifting offsets. Any change in the contract metadata should not cause changes in the code. This is particularly important for source code verification, which is sensitive to changes in the bytecode. Having a designated place for the metadata would also make things a lot easier for verifiers, as this data has to be omitted during verification and it's difficult to find where it is in the bytecode (See the blog post for more info)

cc: @cameel @ekpyron

@pdobacz
Copy link

pdobacz commented Nov 27, 2024

I'd like to discuss an alternative proposed EOFCREATE hashing scheme ipsilon/eof#162 (comment)

Also pls reopen, this call is scheduled for today

@frangio
Copy link

frangio commented Nov 27, 2024

I'd also like to discuss generic factory contracts.

@shemnon
Copy link
Contributor

shemnon commented Nov 27, 2024

Here's the list of potential Pectra-0 upgrades, for reference. I don't think we need to re-hash any of it until osaka-0 launces

@shemnon
Copy link
Contributor

shemnon commented Nov 27, 2024

One idea for a tempurature check: change the data section number to something higher like 0x7f or 0xff, so it will always sort near or at the end of section numbers.

@shemnon
Copy link
Contributor

shemnon commented Nov 27, 2024

Also, state tests with invalid EOF, what to do?

@shemnon
Copy link
Contributor

shemnon commented Nov 27, 2024

Testing Update

  • How to handle State tests with invalid EOF?
    • state tests - reject test if any EOF is invalid
    • Block tests - only an issue in genesis? Abort if EOF in genesis is invalid.
    • Imported blocks - presume valid as create TXes are how they are added, so invalid EOF should result in an failed transactions.
    • Extends to 7702 - 0xEF01 validation?
  • EOFWrap Tests

Client and Compiler Updates

Spec Updates

  • Compiler Metadata Section
    • Kaan from Sourcify Team
    • Current practice is to just append
    • would want a separate metadata section in EOF.
      • Unreachable by code (a good thing)
      • contains the CBOR data solidity produces
    • Current status of appended to data and behind constructor fields makes it hard to find
    • Experimental Solidity EOF handling is to put CBOR metadata at the beginning of the data section.
    • Would insulate code/data indexes from variable CBOR sizes, such as if experimental flags are logged.
    • Next step is an EIP

Brief discussion on header section numbers

EOFCREATE hash - ipsilon/eof#162 (comment)

  • danno wants a "0xef01" hash added
  • Solidity has concerns about the genericness, would prefer container index
  • Bad salt management could prohibit multiple deployments
  • Should hash include auxdata, not just code data?
  • possible issues with cross-chain deployment. The more mandatory data makes same address contracts difficult.
  • note: some people don't like metadata has in CREATE2, would compiler metadata be excluded from address derivation?
  • Are there security implications? Would the "code hash" guarantees be forgotten about? Could compilers compensate?
  • Please add comments to the thread.

@poojaranjan
Copy link
Contributor Author

Recording: https://youtu.be/yzYUWpa-1QM

@poojaranjan
Copy link
Contributor Author

Closed in favor of #1205

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

6 participants