Skip to content
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

fix bash cmd in readme #112

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cargo run --release --package zk-por-cli --bin zk-por-cli prove --cfg-path ${cfg

- verify global proof

Note: this cmd will rebuild the circuit, instead of using the circuit provided in the proof file. Hence, the latency is longer but is more secure, i.e, 30 minutes in 8GB memory, 10 minutes in 16GB, 3 minutes in 32GB.
Note: this cmd will rebuild the circuit, instead of using the circuit provided in the proof file. Hence, the latency is longer but is more secure, i.e, 30 minutes in 8GB memory, 10 minutes in 16GB, 3 minutes in 32GB.
```
global_proof_path="./test-data/proof/sum_proof_data.json"

Expand All @@ -56,22 +56,22 @@ cargo run --features zk-por-core/verifier --release --package zk-por-cli --bin z
user_proof_path_pattern="./test-data/proof/user_proofs/*.json"

# to verify one account with ${accountID}
# user_proof_path_pattern="./test-data/user_proofs/${accountID}.json"
# user_proof_path_pattern="./test-data/proof/user_proofs/${accountID}.json"

cargo run --features zk-por-core/verifier --release --package zk-por-cli --bin zk-por-cli verify-user --global-proof-path ${global_proof_path} --user-proof-path-pattern ${user_proof_path_pattern}
```

- verify both the global proof and a user proof

Note:
1. The cmd will NOT rebuild the circuit. Instead, it directly uses and trusts the circuit in the proof file. So the verification is fast, but a user needs to incur a weaker trust assumption.
2. The cmd will auto-detect sum_proof_data.json and *_inclusion_proof.json in the same directory of the binary for the verification.
Note:
1. The cmd will NOT rebuild the circuit. Instead, it directly uses and trusts the circuit in the proof file. So the verification is fast, but a user needs to incur a weaker trust assumption.
2. The cmd will auto-detect sum_proof_data.json and *_inclusion_proof.json in the same directory of the binary for the verification.

```
cargo build --features zk-por-core/verifier --release --package zk-por-cli --bin zk-por-cli
mkdir -p tmp/
cp target/release/zk-por-cli tmp/
cp test-data/proof/$(ls test-data/proof | head -n 1) tmp/user_inclusion_proof.json
cp test-data/proof/user_proofs/$(ls test-data/proof/user_proofs | head -n 1) tmp/user_inclusion_proof.json
cp $global_proof_path tmp/sum_proof_data.json
./tmp/zk-por-cli
rm -rf tmp
Expand Down