Skip to content

Commit

Permalink
feat: add makefile commands for ultra_honk. fix: fmt warning
Browse files Browse the repository at this point in the history
  • Loading branch information
LesterEvSe committed Oct 3, 2024
1 parent 2d1fae0 commit abe9638
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
21 changes: 18 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: fmt check execute prove verify zk
.PHONY: fmt check execute prove prove_ultra_honk verify verify_ultra_honk zk zk_ultra_honk

fmt:
nargo fmt
Expand All @@ -9,14 +9,29 @@ check:
execute:
nargo execute plume

prove:

prove_ultra_honk:
bb prove_ultra_honk -b ./target/use.json -w ./target/plume.gz -o ./target/proof

prove:
bb prove -b ./target/use.json -w ./target/plume.gz -o ./target/proof


verify_ultra_honk:
bb write_vk_ultra_honk -b ./target/use.json -o ./target/vk
bb verify_ultra_honk -k ./target/vk -p ./target/proof

verify:
bb write_vk -b ./target/use.json -o ./target/vk
bb verify -k ./target/vk -p ./target/proof


zk:
make execute
make prove
make verify
make verify

zk_ultra_honk:
make execute
make prove_ultra_honk
make verify_ultra_honk
5 changes: 2 additions & 3 deletions crates/use/src/main.nr
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ pub fn main(msg: [u8; MSG_LEN], c: [u8; 32], s: [u8; 32], pk: [[u8; 32]; 2], nul
let nullifier = (
Secpk1Fq::from_le_bytes(to_u8_arr(nullifier[0])), Secpk1Fq::from_le_bytes(to_u8_arr(nullifier[1]))
);

// Choose your plume variant and comment the other

// plume_v1(msg, c, s, pk, nullifier);
plume_v2(msg, c, s, pk, nullifier);
plume_v1(msg, c, s, pk, nullifier);
// plume_v2(msg, c, s, pk, nullifier);
}
4 changes: 2 additions & 2 deletions etc/main.sage
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def update_prover_toml(filepath, version1: bool, msg_len: int):

def update_plume_version(is_v1: bool):
path = "../crates/use/src/"
p1_line = 13
p2_line = 14
p1_line = 12
p2_line = 13

with open(path + 'main.nr', 'r') as file:
lines = file.readlines()
Expand Down

0 comments on commit abe9638

Please sign in to comment.