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

Tracking issue: Proposal #2

Open
11 of 12 tasks
TalDerei opened this issue Oct 23, 2023 · 1 comment
Open
11 of 12 tasks

Tracking issue: Proposal #2

TalDerei opened this issue Oct 23, 2023 · 1 comment

Comments

@TalDerei
Copy link
Collaborator

TalDerei commented Oct 23, 2023

Proposed Work: Implement a general-purpose, open-source WebGPU-based Groth16 prover to accelerate client-side proof generation for the Penumbra Protocol.

Phases: The end-to-end WebGPU POC will comprise three distinct, high-level phases described in greater detail below. Generally, phase (ii) scopes the open-source gluing / integration of the Penumbra web-code with a WebGPU backend, and phase (iii) scopes the closed-source zprize work based on a sparse-matrix MSM design (cuZK). Since (iii) is a single, sub-component in the larger system (ii) that can be built entirely independently and without conflict, then (ii) would be optimally structured to ease the eventual merging with (iii). For instance, hot-swapping the reference MSM algorithm in (ii) with the optimized MSM algorithm in (iii) using an API function call. Phases (ii) and (iii) would be concurrently built (in the open and closed-source), and remain independent until the codebases can be merged.

Phase (I): Architecture Code and Performance Review

  • Description: Conduct general architecture, code-review, and comprehensive performance pass comprising the scoped penumbra crates (arkworks groth16 prover, crypto-modules, penumbra-web-assembly.
  • Success: Measured by successfully understanding the system architecture design (e.g. transaction planning, proof generation, storage, etc.) and properly identifying the performance bottlenecks.

Phase (II): WebGPU Backend for Penumbra Web Code + Web Improvements

Phase (III): ZPrize Competition Related-Work

  • Description: Integration and adaptation of optimized WebGPU MSM with Penumbra WASM and web clients. As part of the Zprize submission collaboration, there will be a closed-source WebGPU MSM which will be open-sourced upon completion of the Zprize contest submission deadline (Early February). Upon open-sourcing, the optimized WebGPU MSM will be adapted and integrated into the Penumbra prover from phase (ii), swapping the new optimized MSM for the unoptimized MSM from the demox-labs repository. The MSM will be rewritten in WGSL (WebGPU shader language) and utilize web-workers for multi-threading, rather than using the existing variable-base MSM from Arkworks in the Penumbra monorepo.

  • Success: Measured by achieving sub-second MSM execution times.

@TalDerei
Copy link
Collaborator Author

Phase III is currently a post-mainnet task

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

No branches or pull requests

1 participant