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

WEB3-68: feat: Add EIP4788 commitments #180

Merged
merged 32 commits into from
Aug 22, 2024
Merged

WEB3-68: feat: Add EIP4788 commitments #180

merged 32 commits into from
Aug 22, 2024

Conversation

Wollac
Copy link
Contributor

@Wollac Wollac commented Jul 19, 2024

Adds the option to commit to a Beacon (Consensus) block instead of an Execution block.

@Wollac Wollac changed the base branch from main to feat/alloy July 31, 2024 16:56
@nategraf
Copy link
Contributor

nategraf commented Aug 5, 2024

Marked draft, as it is dependent on switching from Ethers to Alloy. Once that PR is in, this PR will be ready to go.

Base automatically changed from feat/alloy to main August 7, 2024 10:09
@github-actions github-actions bot changed the title feat: Add slot commitments WEB3-68: feat: Add slot commitments Aug 7, 2024
Copy link
Contributor

@nategraf nategraf left a 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?

Cargo.toml Show resolved Hide resolved
examples/beacon-root/contracts/src/Beacon.sol Outdated Show resolved Hide resolved
examples/beacon-root/contracts/src/Beacon.sol Outdated Show resolved Hide resolved
@Wollac Wollac changed the title WEB3-68: feat: Add slot commitments WEB3-68: feat: Add EIP4788 commitments Aug 8, 2024
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.
@Wollac Wollac marked this pull request as ready for review August 14, 2024 15:30
@Wollac Wollac requested review from capossele and a team as code owners August 14, 2024 15:30
@Wollac Wollac requested a review from nategraf August 14, 2024 15:48
@nategraf nategraf self-assigned this Aug 16, 2024
Copy link
Contributor

@nategraf nategraf left a 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!

examples/README.md Outdated Show resolved Hide resolved
examples/erc20-counter/apps/src/bin/publisher.rs Outdated Show resolved Hide resolved
steel/src/lib.rs Outdated Show resolved Hide resolved
@nategraf nategraf removed their assignment Aug 16, 2024
@nategraf nategraf self-assigned this Aug 20, 2024
@nategraf nategraf enabled auto-merge (squash) August 22, 2024 23:37
@nategraf nategraf merged commit 270e57e into main Aug 22, 2024
9 checks passed
@nategraf nategraf deleted the feat/beacon-input branch August 22, 2024 23:47
nategraf added a commit that referenced this pull request Aug 23, 2024
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>
nategraf added a commit that referenced this pull request Aug 23, 2024
This PR cherry-picks #180 and #195 from `main` and bumps the version of
crates in this repo to 1.1.0-rc.2.
Dependency references to `risc0` crates are also bumped to `rc.2`.

---------

Co-authored-by: Wolfgang Welz <welzwo@gmail.com>
Co-authored-by: capossele <angelocapossele@gmail.com>
Wollac added a commit that referenced this pull request Oct 7, 2024
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>
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.

3 participants