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

Implement a Halo2Verifier async service #2104

Closed
dconnolly opened this issue May 4, 2021 · 6 comments · Fixed by #2645
Closed

Implement a Halo2Verifier async service #2104

dconnolly opened this issue May 4, 2021 · 6 comments · Fixed by #2645
Assignees
Labels
A-rust Area: Updates to Rust code NU-5 Network Upgrade: NU5 specific tasks

Comments

@dconnolly
Copy link
Contributor

dconnolly commented May 4, 2021

Similar to our other async tower-based verifier services, such as the Groth16Verifier. We should depend on the same version of the halo2 crate as we do in zebra-chain.

While we don't have batch math available yet for Halo2, the async service will decouple the verification requests from the fullfillment, allowing us to swap out the original single-verification implementation here with a more efficient batch verification implementation that is oblivious at the API level.

Testing:

Generate test vectors for halo2 proofs from zcash-hackworks; if they give trouble in our full validation pipeline, punt this full integration until we get the first NU5 block with an Action in it for testnet.

Additional context
#1951

@dconnolly dconnolly added A-rust Area: Updates to Rust code NU-5 Network Upgrade: NU5 specific tasks P-Medium labels May 4, 2021
@dconnolly dconnolly self-assigned this May 4, 2021
@mpguerra mpguerra mentioned this issue May 5, 2021
53 tasks
@teor2345 teor2345 added P-Low and removed P-Medium labels May 6, 2021
@teor2345
Copy link
Contributor

teor2345 commented May 6, 2021

Moving this out of NU5 because it's not strictly required for activation

@dconnolly
Copy link
Contributor Author

It's not? Otherwise halo2 verification will block everything else in the transaction verifier

@teor2345
Copy link
Contributor

teor2345 commented May 6, 2021

It's not? Otherwise halo2 verification will block everything else in the transaction verifier

We could just spawn a non-blocking tokio task, and await its completion.

@teor2345
Copy link
Contributor

@dconnolly and I discussed this issue, and we decided that we should continue to use the same architecture as the other verifiers.

(Otherwise, we risk breaking other fragile async code.)

@daira
Copy link
Contributor

daira commented May 31, 2021

While we don't have batch math available yet for Halo2 [...]

zcash/halo2#282 ("Document how to do simple (not aggregated) batch verification for Halo 2")

@dconnolly dconnolly added P-Medium and removed P-Low labels Jun 7, 2021
@teor2345 teor2345 added this to the 2021 Sprint 14 milestone Jun 22, 2021
@mpguerra mpguerra added the S-blocked Status: Blocked on other tasks label Jul 26, 2021
@mpguerra
Copy link
Contributor

blocked on circuit from ECC

@mpguerra mpguerra removed the S-blocked Status: Blocked on other tasks label Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code NU-5 Network Upgrade: NU5 specific tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants