-
Notifications
You must be signed in to change notification settings - Fork 584
Check sok message outside of verifier #18329
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
base: develop
Are you sure you want to change the base?
Check sok message outside of verifier #18329
Conversation
Sok message has to be checked against digest, but it's better to be done on a different level (not in verifier executed in parallel process). This commit only removes the check, it is reintroduced in the follow-up commit.
Ensure that sok message is checked against the digests in all of the contexts where it was validated previously. Check is not reintroduced into scan state checking, because follow-up commits will remove the sok message from scan state's merge nodes.
|
!ci-build-me |
| Deferred.Or_error.return | ||
| (Or_error.error_string | ||
| "Transaction_snark.verify: Mismatched sok_message" ) | ||
| Deferred.Or_error.return (Ok ()) |
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.
It's possible that some tests might be failing because I didn't attempt to preserve dummy's behavior
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.
And so they failed: https://buildkite.com/o-1-labs-2/mina-o-1-labs/builds/40027/steps/canvas?jid=019bc356-5a4c-42ca-a519-67fb0d56c896
Error: { \"string\": \"proof's sok message digest does not match the sok message\" }"
|
!ci-build-me |
1 similar comment
|
!ci-build-me |
d25f8f3 to
d5ce79c
Compare
|
!ci-build-me |
| (Ledger_proof.Cached.read_proof_from_disk p, msg) ) ) | ||
| ) ) | ||
| in | ||
| let check_sok_digests () = |
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.
nit: why take () here
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.
I just followed the semantics used below with check (). I agree both check () and check_sok_digests () can be computed eagerly, with no () argument.
Feel free to make a follow-up PR after it's merged to develop @martyall !
|
!ci-bypass-changelog |
The sok message was previously passed to the verifier process solely to perform a lightweight check that's better handled in the main process. This forced the sok message to remain in the scan state structure despite having no other use there.
This PR moves the sok message digest check to the main process, removing it from the verifier interface and enabling future removal of the sok message field from scan state merge nodes.
This PR is split into two parts. First part removes the digest check completely:
Second part reintroduces the digest check in all places which call the transaction snark verifier:
The sok message digest check is not re-introduced into verification of scan state in anticipation of #18325 being merged shortly after this PR.
Explain how you tested your changes:
Checklist: