Skip to content

Conversation

Wollac
Copy link
Contributor

@Wollac Wollac commented Mar 25, 2025

This PR introduces a new commitment version the "Consensus Commitment" which is a Steel commitment that can be validated against the beacon chain state directly.

@Wollac Wollac requested a review from a team as a code owner March 25, 2025 21:27
@github-actions github-actions bot changed the title feat: consensus commitment WEB3-386: feat: consensus commitment Mar 25, 2025
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.

Even though SteelVerifier.sol cannot handle version 2, can you add a check in that contract for when it is passed and return a specific error? It would be better for devex and UX to get something like "stateless SteelVerifier does support consensus slot commitments" (or something). Also, with 3-4 versions in use now I would like to have a list somewhere of what each version number is assigned to. The smart contract seems like a reasonable place, but anywhere else would do too.

Comment on lines 242 to 243
/// Creates a consensus commitment instead of a beacon commitment that can be verified using the
/// EIP-4788 beacon root contract.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a bit unclear which of the two, consensus or beacon, can be verified using the EIP-4788 beacon root contract. What about the following?

Suggested change
/// Creates a consensus commitment instead of a beacon commitment that can be verified using the
/// EIP-4788 beacon root contract.
/// Creates a consensus commitment, with a slot number as the identifier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in d2f9b9a

Wollac added 10 commits March 26, 2025 16:05
- Document each version in the CommitmentVersion enum:
  - 0: Block commitment.
  - 1: Beacon commitment (indexed by EIP-4788 timestamp).
  - 2: Consensus commitment (indexed by slot).
- Add #[non_exhaustive] to signal potential future versions.
- Derive the Copy trait alongside Clone, Debug, PartialEq, and Eq.
- Order attributes to follow Rust conventions (docs, non_exhaustive, repr, derive).
@Wollac Wollac merged commit 3192516 into main May 7, 2025
11 checks passed
@Wollac Wollac deleted the wollac/feat/consensus-commitment branch May 7, 2025 08:29
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.

2 participants