-
Notifications
You must be signed in to change notification settings - Fork 1
Added service worker compatibility for snarkjs proof generation #72
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
Open
SergeyG-Solicy
wants to merge
4
commits into
main
Choose a base branch
from
feature/zk-service-worker-compatibility
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+226
−19
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
af63e2f
Added service worker compatibility for snarkjs proof generation
SergeyG-Solicy 1d4de46
Fixed qodo comments
SergeyG-Solicy 7ce051a
Fixed qodo comments
SergeyG-Solicy f9f2d30
Merge branch 'main' of https://github.com/kynesyslabs/sdks into featu…
SergeyG-Solicy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: kynesyslabs/sdks
Length of output: 2637
🏁 Script executed:
Repository: kynesyslabs/sdks
Length of output: 10900
🌐 Web query:
snarkjs 0.7.5 release notes singleThread prover option fullProve💡 Result:
In snarkjs v0.7.5 (released Oct 18, 2024), the release notes include “Support for wtns calc and prover options” (PR #517). This change adds the ability for
fullProve/fullproveto pass options through to:memorySize), andsingleThreadin the API; the PR text contains a minor typo). [1][2]Where it shows up: the v0.7.5 release notes list the PR, and the PR description explicitly says it “Pass[es] …
singleTreadoption to prover” and adds an options parameter togroth16FullProve(and similarly for PLONK/FFLONK full prove). [1][2]Sources:
[1] snarkjs v0.7.5 release notes (GitHub Releases) (github.com)
[2] PR
#517“Support for wtns calc and prover options” (github.com)Citations:
🌐 Web query:
@types/snarkjs 0.7.9 type definitions groth16 fullProve singleThread💡 Result:
In @types/snarkjs 0.7.9,
groth16.fullProveis typed as:fullProve(input, wasmFile, zkeyFileName, logger?)(no “options” parameter), sosingleThreadcan’t be passed without a TS error. [1]In snarkjs itself, the documented way to force single-threaded proving is not
fullProve, but:snarkjs.groth16.prove(zkeyFinal, wtns, undefined, { singleThread: true })[2]So in TS, the practical options are:
wtns.calculate(...)+groth16.prove(..., { singleThread: true })(instead offullProve). [2]anyor add module augmentation) to allow a 4th/5th parameter—because the published DT types don’t include it. [1][2]Sources: [1] [2]
Fix
@types/snarkjsversion mismatch with runtime API.[email protected]supportssingleThreadinfullProveproverOptions (added Oct 2024, PR#517), but@types/[email protected]type definitions do not include the proverOptions parameter. This causes TypeScript compilation errors despite runtime compatibility. Either upgrade@types/snarkjsto a version that includes proverOptions, or refactor to use separategroth16.prove(..., { singleThread: true })calls instead offullProve.🤖 Prompt for AI Agents