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

Update proof producer to commit 00863ec9791a49cd50b094971117d4e03b973063 #12

Merged
merged 2 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
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
31 changes: 31 additions & 0 deletions proof-producer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,34 @@ proof-generator --circuit <circuit-file> --assignment <assignment-file> --proof
cmake ..
make -j $(nrpoc)
```

# Sample calls to proof-producer

In all the calls you can change the executable name from proof-producer-single-threaded to proof-producer-multi-threaded to run on all the CPUs of your machine.

Generate a proof and verify it:
```bash
./build/bin/proof-producer/proof-producer-single-threaded --circuit="circuit.crct" --assignment-table="assignment.tbl" --proof="proof.bin" -q 10
```

Making a call to preprocessor:

```bash
./build/bin/proof-producer/proof-producer-single-threaded --stage="preprocess" --circuit="circuit.crct" --assignment-table="assignment.tbl" --common-data="preprocessed_common_data.dat" --preprocessed-data="preprocessed.dat" --commitment-state-file="commitment_state.dat" --assignment-description-file="assignment-description.dat" -q 10
```

Making a call to prover:

```bash
./build/bin/proof-producer/proof-producer-single-threaded --stage="prove" --circuit="circuit.crct" --assignment-table="assignment.tbl" --common-data="preprocessed_common_data.dat" --preprocessed-data="preprocessed.dat" --commitment-state-file="commitment_state.dat" --proof="proof.bin" -q 10
```

Verify generated proof:
```bash
./build/bin/proof-producer/proof-producer-single-threaded --stage="verify" --circuit="circuit.crct" --common-data="preprocessed_common_data.dat" --proof="proof.bin" --assignment-description-file="assignment-description.dat" -q 10
```

Aggregate challenges
```bash
./build/bin/proof-producer/proof-producer-single-threaded --stage="generate-aggregated-challenge" --input-challenge-files challenge1.dat challenge2.dat --aggregated-challenge-file="aggregated_challenge.dat"
```
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ namespace nil {
typename tuple_to_variant<typename transform_tuple<HashTypes, to_type_identity>::type>::type;

struct ProverOptions {
std::string stage = "all";
boost::filesystem::path proof_file_path = "proof.bin";
boost::filesystem::path json_file_path = "proof.json";
boost::filesystem::path preprocessed_common_data_path = "preprocessed_common_data.dat";
boost::filesystem::path preprocessed_public_data_path = "preprocessed_data.dat";
boost::filesystem::path commitment_scheme_state_path = "commitment_scheme_state.dat";
boost::filesystem::path circuit_file_path;
boost::filesystem::path assignment_table_file_path;
boost::filesystem::path assignment_description_file_path;
std::vector<boost::filesystem::path> input_challenge_files;
boost::filesystem::path aggregated_challenge_file = "aggregated_challenge.dat";
boost::log::trivial::severity_level log_level = boost::log::trivial::severity_level::info;
bool skip_verification = false;
bool verification_only = false;
CurvesVariant elliptic_curve_type = type_identity<nil::crypto3::algebra::curves::pallas>{};
HashesVariant hash_type = type_identity<nil::crypto3::hashes::keccak_1600<256>>{};

Expand Down
Loading
Loading