iden3 / snarkjs

zkSNARK implementation in JavaScript & WASM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Merge chunking in for better memory use on frontends

Divide-By-0 opened this issue · comments

commented

There are a few forks that do chunking, including:

https://github.com/sampritipanda/snarkjs - Frontend snarkjs with chunking working
https://github.com/vb7401/snarkjs/ - Backend proofgen with chunking working
https://github.com/nalinbhardwaj/snarkjs - Original chunking repo, less up to date than both of the above

This is the idea that you can split the zkey into 10 parts so that when you prove in browser, you can prove up to 4M size circuits because these parts help you not exceed standard memory limits. It would be great to merge these into snarkjs; maybe one method is to put the functionality under some argument i.e. with chunked = true as an argument to fullProve and --chunked as an argument to the zkey generators. You can see scripts needed to use chunking for zkeygen here. Would be awesome to get some help here to clean it up and merge it to specifications!

As discussed with @nalinbhardwaj previously, this should be done inside fastfile, not inside snarkjs itself.