-
Notifications
You must be signed in to change notification settings - Fork 13
Snark setup - script for generating params, reorg structure #4
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
Conversation
| snarkjs zkey new ../artifacts/circuits/withdraw.r1cs pot12_final.ptau circuit_0000.zkey | ||
| snarkjs zkey contribute circuit_0000.zkey circuit_final.zkey --name="1st Contributor Name" -v | ||
| if [ ! -f $OUTPUT_DIR/circuit_0000.zkey ]; then | ||
| echo "snarkjs groth16 setup "${R1CS_PATH}" $OUTPUT_DIR/pot12_final.ptau $OUTPUT_DIR/circuit_0000.zkey\n" |
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.
looks like snarkjs doesn't have a function for 'groth16 setup'
|
The weird part is if you run it manually it works if each command is done
one at a time. Still haven’t figured out how to get the full thing working
at once. Does it work for you as an isolated command?
…On Wed, Jul 21, 2021 at 10:58 PM nepoche ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In scripts/generate_trusted_setup_withdraw.sh
<#4 (comment)>
:
>
# Start a new zkey and make a contribution (enter some random text)
-snarkjs zkey new ../artifacts/circuits/withdraw.r1cs pot12_final.ptau circuit_0000.zkey
-snarkjs zkey contribute circuit_0000.zkey circuit_final.zkey --name="1st Contributor Name" -v
+if [ ! -f $OUTPUT_DIR/circuit_0000.zkey ]; then
+ echo "snarkjs groth16 setup "${R1CS_PATH}" $OUTPUT_DIR/pot12_final.ptau $OUTPUT_DIR/circuit_0000.zkey\n"
looks like snarkjs doesn't have a function for 'groth16 setup'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADELLFZUSLVTFNFCNI6ER73TY4YGXANCNFSM5AYBHGUA>
.
|
|
I haven't gotten the script to work properly either, with an error for |
|
If running one by one you don’t need wait commands.
…On Thu, Jul 22, 2021 at 2:11 AM Drew Stone ***@***.***> wrote:
The weird part is if you run it manually it works if each command is done
one at a time. Still haven’t figured out how to get the full thing working
at once. Does it work for you as an isolated command?
On Wed, Jul 21, 2021 at 10:58 PM nepoche ***@***.***> wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In scripts/generate_trusted_setup_withdraw.sh
> <#4 (comment)>
> :
>
> >
> # Start a new zkey and make a contribution (enter some random text)
> -snarkjs zkey new ../artifacts/circuits/withdraw.r1cs pot12_final.ptau circuit_0000.zkey
> -snarkjs zkey contribute circuit_0000.zkey circuit_final.zkey --name="1st Contributor Name" -v
> +if [ ! -f $OUTPUT_DIR/circuit_0000.zkey ]; then
> + echo "snarkjs groth16 setup "${R1CS_PATH}" $OUTPUT_DIR/pot12_final.ptau $OUTPUT_DIR/circuit_0000.zkey\n"
>
> looks like snarkjs doesn't have a function for 'groth16 setup'
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#4 (review)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADELLFZUSLVTFNFCNI6ER73TY4YGXANCNFSM5AYBHGUA>
> .
>
|
|
Right. When executing line by line, attempting to execute: |
|
Try without npx? Maybe install snarkjs globally.
…On Thu, Jul 22, 2021 at 2:59 PM nepoche ***@***.***> wrote:
Right. When executing line by line, attempting to execute: npx snarkjs
groth16 setup ./artifacts/circuits/t ornado/withdraw_30.r1cs
./build/tornado/pot12_final.ptau ./build/tornado/circuit_0000.zkey yields
an output of Invalid command.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADELLFZVU5TWXG6OO4LPN63TZAI2BANCNFSM5AYBHGUA>
.
|
|
Could we update the package.json snarkjs version to the version which we expect? Seems like 0.3.59 does not have support for the command but 0.4.6 does. |
|
Yep 👍
…On Thu, Jul 22, 2021 at 3:12 PM nepoche ***@***.***> wrote:
Could we update the package.json snarkjs version to the version which we
expect? Seems like 0.3.59 does not have support for the command but 0.4.6
does.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADELLF7X5VHHUKXY7XZ3PQLTZAKL3ANCNFSM5AYBHGUA>
.
|
Snark setup updates
This PR adds a bunch of things that currently do not work. Nonetheless, as we debug to improve tests passing we can add more tools to improve how the snark setup works for any end developer. In this PR there should be some verifier.sol files generated for each type of circuit (Poseidon Bridge and Tornado Cash withdrawals) as well as a trusted setup script (which fails, but can be run line by line manually) that generates the parameters and verifiers needed for these circuits.