Skip to content

commands #1

@sigridjineth

Description

@sigridjineth
// compile
circom sample_circuit.circom --r1cs --wasm --sym —c

// witness
node generate_witness.js sample_circuit.wasm ../input.json witness.wtns

// phase 1
snarkjs powersoftau new bn128 12 pot12_0000.ptau -v
snarkjs powersoftau contribute pot12_0000.ptau pot12_0001.ptau --name="First contribution" -v

// phase 2
snarkjs powersoftau prepare phase2 pot12_0001.ptau pot12_final.ptau -v
snarkjs groth16 setup sample_circuit.r1cs ./sample_circuit_js/pot12_final.ptau sample_circuit_0000.zkey
snarkjs zkey contribute sample_circuit_0000.zkey sample_circuit_0001.zkey --name="boom labs”
snarkjs zkey export verificationkey sample_circuit_0001.zkey verfication_key.json

// generate a proof
snarkjs groth16 prove ../sample_circuit_0001.zkey witness.wtns proof.json public.json
snarkjs groth16 verify ../verfication_key.json public.json proof.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions