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

Calculate class_commitment from proof #460

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

notlesh
Copy link
Collaborator

@notlesh notlesh commented Jan 8, 2025

This works around an issue introduced when Pathfinder removed class_commitment from its class proof.

Any proof starts with the root node, and hashing that root node gives the Merkle root of that tree. class_commitment is really just the Merkle root of the class tree, so this is all we need to reconstruct it.

Note, however, that this is redundant -- verify_proof() ultimately hashes the root node and compares that to class_commitment, which is exactly what this PR does. It would be just as good to make class_commitment an Option an only verify it then; but this PR at least makes the problem clear.

Type

  • feature
  • bugfix
  • dev (no functional changes, no API changes)
  • fmt (formatting, renaming)
  • build
  • docs
  • testing

Description

Breaking changes?

  • yes
  • no

@notlesh notlesh requested a review from HermanObst as a code owner January 8, 2025 00:10
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.

1 participant