-
Notifications
You must be signed in to change notification settings - Fork 22
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
WEB3-68: feat: Add EIP4788 commitments #180
Conversation
c8d2d77
to
9b14c9b
Compare
Marked draft, as it is dependent on switching from Ethers to Alloy. Once that PR is in, this PR will be ready to go. |
e23f77b
to
47b4829
Compare
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.
As we discussed on Slack, it would be nice to integrate this such that it's easy to switch from execution block commitments to consensus. In particular, it would be nice to avoid maintaining a separate example. Do you think this is possible in this PR?
This PR adds a version to the commitments generated by Steel. This allows us to distinguish between regular block commits (verified using the `blockhash` opcode) and beacon commits (verified using the EIP-4788 beacon roots contract) based on the commitment data alone. It uses the top 2 bytes of the commitment's `blockID` field as the version. This leaves a `uint240` for the actual identifier, which is more than sufficient for the block number or block timestamp.
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.
Overall, looks good to me!
Adds the option to commit to a Beacon (Consensus) block instead of an Execution block. --------- Co-authored-by: capossele <angelocapossele@gmail.com> Co-authored-by: Victor Graf <victor@risczero.com>
Adds the option to commit to a Beacon (Consensus) block instead of an Execution block. --------- Co-authored-by: capossele <angelocapossele@gmail.com> Co-authored-by: Victor Graf <victor@risczero.com>
Adds the option to commit to a Beacon (Consensus) block instead of an Execution block.