Skip to content

chore(crypto): CRP-1799 Don't panic on invalid ZK proof instances in NIDKG#10015

Open
randombit wants to merge 1 commit intomasterfrom
jack/crp-1799
Open

chore(crypto): CRP-1799 Don't panic on invalid ZK proof instances in NIDKG#10015
randombit wants to merge 1 commit intomasterfrom
jack/crp-1799

Conversation

@randombit
Copy link
Copy Markdown
Contributor

Previously in NIDKG a proof instance type could be instantiated even if manifestly invalid; then check_instance would return an error. In some cases this error would propagate to the caller, but in others it would simply panic.

Change this so that creating a ZK proof instance is falliable, and handle the error directly. This also eliminates any possibility of forgetting to call check_instance in the right spot.

…NIDKG

Previously in NIDKG a proof instance type could be instantiated even if
manifestly invalid; then check_instance would return an error. In some cases
this error would propagate to the caller, but in others it would simply panic.

Change this so that creating a ZK proof instance is falliable, and handle the
error directly. This also eliminates any possibility of forgetting to call
check_instance in the right spot.
@randombit randombit requested a review from andreacerulli April 24, 2026 19:01
@randombit randombit requested a review from a team as a code owner April 24, 2026 19:01
@github-actions github-actions Bot added the chore label Apr 24, 2026
@randombit
Copy link
Copy Markdown
Contributor Author

Claude banged this out based on a 4 year old incomplete branch I had lying around, plus the ticket description. It looks good to me, and these panics were on the top of my list of remaining NIDKG nits. Merge or not as you please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant