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

Change Merkle verify asserts to Result Errs #251

Merged
merged 5 commits into from Aug 23, 2022

Conversation

tzerrell
Copy link
Member

Replace assertion-based error handling in our Merkle verification code with Result-based error handling.

The intent is for VerificationError::InvalidProof to be used when we attempt to verify an alleged proof that is not actually a true proof, and to use other error types for issues not directly related to the validity of the proof.

Split off from #243 for clarity of purpose so that reviewers can more quickly give feedback on whether this is a good approach to handling verification errors.

@tzerrell tzerrell self-assigned this Aug 23, 2022
Copy link
Contributor

@shkoo shkoo left a comment

Choose a reason for hiding this comment

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

Neat!

Copy link
Member

@flaub flaub left a comment

Choose a reason for hiding this comment

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

Yay!

@tzerrell tzerrell merged commit 0d360c7 into main Aug 23, 2022
@tzerrell tzerrell deleted the tzerrell-merkle-verifier-error branch August 23, 2022 22:45
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.

None yet

3 participants