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

Use VK from zkApp transaction to verify proofs in it #12122

Closed
deepthiskumar opened this issue Nov 4, 2022 · 1 comment · Fixed by #12248 or #12380
Closed

Use VK from zkApp transaction to verify proofs in it #12122

deepthiskumar opened this issue Nov 4, 2022 · 1 comment · Fixed by #12248 or #12380
Assignees

Comments

@deepthiskumar
Copy link
Member

deepthiskumar commented Nov 4, 2022

When verifying transactions in the pool, we currently verify all the zkapp proofs using the VK from the best tip ledger. If a zkapp transaction has an update that sets the VK then use that to verify subsequent account updates with proofs

@bkase
Copy link
Member

bkase commented Dec 13, 2022

Even after @mrmr1993 's fix to also ensure we're running this logic against the mempool, there's still an edge case in the mempool which @deepthiskumar pointed out today:

User_command.to_verifiable passes a ledger to use as a fallback to find the latest verification key to depend on, however, the mempool could have a stack of transactions with earlier nonces that change the verification key which we need to rely on instead.

So we need to change this "fallback lookup" logic to (in the mempool case) lookup the latest verification key in some smarter mempool-aware mechanism before falling back to ledger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants