-
Notifications
You must be signed in to change notification settings - Fork 517
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
Out-of-SNARK, use dummy vk hash when verification key is omitted #13394
Conversation
!ci-build-me |
@@ -1003,8 +1003,12 @@ module Make_str (A : Wire_types.Concrete) = struct | |||
} | |||
|
|||
let verification_key_hash (a : t) : Verification_key_hash.t = | |||
verification_key a |> Zkapp_basic.Flagged_option.data | |||
|> Data_as_hash.hash |
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.
The default hash is set here when converting between in-snark and outside-snark values.
The other side of the mismatch is here, the default is set to Field.zero in account updates.
It seems like we should update in either of these two places and not add a separate check as done in the PR. I'm leaning more towards updating the default value in account updates and have it be consistent across rest of the code base (use dummy vk hash) everywhere else.
Was that something you explored but found not to be suitable/working?
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.
Using the dummy vk hash is a better idea, thanks.
I'll update this PR.
!ci-build-me |
!ci-build-me |
!ci-build-me |
!approved-for-mainnet |
In the zkApp transaction logic when running in-SNARK, there was a mismatch between the account update verification key hash and the account verification key hash when the vk was omitted (because the authorization was not Proof). Use
dummy_vk_hash
in both cases.