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

Support for BLOBHASH from EIP-4844 #14740

Closed
ekpyron opened this issue Dec 20, 2023 · 6 comments · Fixed by #14759
Closed

Support for BLOBHASH from EIP-4844 #14740

ekpyron opened this issue Dec 20, 2023 · 6 comments · Fixed by #14759
Assignees
Labels
feature low effort There is not much implementation work to be done. The task is very easy or tiny. medium impact Default level of impact selected for development It's on our short-term development
Milestone

Comments

@ekpyron
Copy link
Member

ekpyron commented Dec 20, 2023

Part of #14739
Two steps, first PR:

Second PR:

Remark:
Testing this may mean to add bogus values in EVMHost. I.e. check if we can inject values at all - otherwise the hashes may just end up as zero in testing.

Also needs to take care of this not being breaking: #11763

@ekpyron ekpyron added selected for development It's on our short-term development low effort There is not much implementation work to be done. The task is very easy or tiny. medium impact Default level of impact feature labels Dec 20, 2023
@ekpyron ekpyron added this to the 0.8.24 milestone Dec 20, 2023
@ekpyron ekpyron mentioned this issue Dec 20, 2023
9 tasks
@nikola-matic nikola-matic moved this from To do to In Progress in Solidity Focus Board Dec 27, 2023
@r0qs
Copy link
Member

r0qs commented Jan 4, 2024

Just as a side note, the eip mentions a point evaluation precompile, which I'm not sure we need to implement considering that we lack of support for BLS pairings. Should we also implement this, @ekpyron? For reference, the verify_kzg_proof function is defined here if needed.

@cameel
Copy link
Member

cameel commented Jan 4, 2024

I don't think we have to do anything about precompiles. They don't need special language support like the opcodes, since they can be invoked with a generic call(). We do have global built-in functions for some of the precompiles added in the past, but not even all of them. We're heading in the direction of having less hard-coded stuff so I doubt we'll be adding high-level wrappers for precompiles in the future. At best we might provide them as a part of stdlib.

You might just need to add some hard-coded results from the precompile for testing (IIRC we have them for other precompiles in EVMHost? Or in some similar file), but that's only if you need to use that precompile in some test.

@ekpyron
Copy link
Member Author

ekpyron commented Jan 8, 2024

Yeah, we're aiming for minimal Cancun support only for the next release, for which being able to low-level call the precompile is perfectly fine. It's not like it's a major issue to add high-level support per se, but we won't do it for now and only after strong demand (it's indeed better done via stdlib later on)

@qizhou
Copy link

qizhou commented Jan 16, 2024

FYI: we have implemented a blob hash getter contract via Assembly code and test it against devnet-12: https://github.com/ethstorage/eip4844-blob-hash-getter

@qizhou
Copy link

qizhou commented Jan 18, 2024

Remark: Testing this may mean to add bogus values in EVMHost. I.e. check if we can inject values at all - otherwise the hashes may just end up as zero in testing.

Also needs to take care of this not being breaking: #11763

My two cents: could we introduce blobhash assembly code rather than a global function? Therefore, we don't need to deal with the overridden case if a user-defined function happens to be the same.

@cameel
Copy link
Member

cameel commented Jan 18, 2024

A Yul builtin is being added by #14757 so it's not either-or. We'll have both.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Solidity Focus Board Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature low effort There is not much implementation work to be done. The task is very easy or tiny. medium impact Default level of impact selected for development It's on our short-term development
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants