fixes for test script
This commit is contained in:
parent
21c3c6115e
commit
a3f53aec44
1
phase2/.gitignore
vendored
1
phase2/.gitignore
vendored
@ -7,5 +7,4 @@ phase1radix2m*
|
||||
/*.json
|
||||
/*.bin
|
||||
/*.params
|
||||
/*.circom
|
||||
/verifier.sol
|
15
phase2/circuit.circom
Normal file
15
phase2/circuit.circom
Normal file
@ -0,0 +1,15 @@
|
||||
template Num2Bits(n) {
|
||||
signal input in;
|
||||
signal output out[n];
|
||||
var lc1=0;
|
||||
|
||||
for (var i = 0; i<n; i++) {
|
||||
out[i] <-- (in >> i) & 1;
|
||||
out[i] * (out[i] -1 ) === 0;
|
||||
lc1 += out[i] * 2**i;
|
||||
}
|
||||
|
||||
lc1 === in;
|
||||
}
|
||||
|
||||
component main = Num2Bits(253);
|
1
phase2/input.json
Normal file
1
phase2/input.json
Normal file
@ -0,0 +1 @@
|
||||
{"in": 42}
|
@ -29,7 +29,7 @@ cargo run --release --bin verify_contribution circuit.json circom3.params circom
|
||||
# generate resulting keys
|
||||
cargo run --release --bin export_keys circom4.params vk.json pk.json
|
||||
# create dummy keys in circom format
|
||||
echo "generating dummy key files..."
|
||||
echo "Generating dummy key files..."
|
||||
npx snarkjs setup --protocol groth
|
||||
# patch dummy keys with actual keys params
|
||||
cargo run --release --bin copy_json proving_key.json pk.json transformed_pk.json
|
||||
|
Loading…
Reference in New Issue
Block a user