-
Notifications
You must be signed in to change notification settings - Fork 84
WEB3-386: feat: consensus commitment #506
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
Conversation
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.
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.
crates/steel/src/host/builder.rs
Outdated
/// Creates a consensus commitment instead of a beacon commitment that can be verified using the | ||
/// EIP-4788 beacon root contract. |
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.
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?
/// 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. |
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.
addressed in d2f9b9a
- 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).
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.