Skip to content

Commit

Permalink
Fix proof of work.
Browse files Browse the repository at this point in the history
  • Loading branch information
martun committed Sep 19, 2024
1 parent 1ba5e10 commit 5545316
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,11 @@ namespace nil {
if (!_skip_commitment_scheme_eval_proofs) {
_proof.eval_proof.eval_proof = _commitment_scheme.proof_eval(transcript);
} else {
// This is required for aggregated prover. If we do not run the LPC proof right now,
// we still need to push the merkle tree roots into the transcript.
_commitment_scheme.eval_polys_and_add_roots_to_transcipt(transcript);
if constexpr (nil::crypto3::zk::is_lpc<commitment_scheme_type>) {
// This is required for aggregated prover. If we do not run the LPC proof right now,
// we still need to push the merkle tree roots into the transcript.
_commitment_scheme.eval_polys_and_add_roots_to_transcipt(transcript);
}
}

return _proof;
Expand Down
2 changes: 1 addition & 1 deletion proof-producer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Compute aggregated FRI proof done once on the main prover. This is a part of the
```bash
./build/bin/proof-producer/proof-producer-single-threaded \
--stage="aggregated-FRI" \
--assignment-description-file="assignment-description.dat"
--assignment-description-file="assignment-description.dat" \
--aggregated-challenge-file="aggregated_challenge.dat" \
--input-combined-Q-polynomial-files "$CIRCUIT1-combined-Q.dat" "$CIRCUIT2_combined-Q.dat" \
--proof="aggregated_FRI_proof.bin" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace nil {
HashesVariant hash_type = type_identity<nil::crypto3::hashes::keccak_1600<256>>{};

std::size_t lambda = 9;
std::size_t grind = 69;
std::size_t grind = 0;
std::size_t expand_factor = 2;
std::size_t max_quotient_chunks = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ namespace nil {
// Lambdas and grinding bits should be passed through preprocessor directives
std::size_t table_rows_log = std::ceil(std::log2(table_description_->rows_amount));

lpc_scheme_.emplace(FriParams(1, table_rows_log, lambda_, expand_factor_));
lpc_scheme_.emplace(FriParams(1, table_rows_log, lambda_, expand_factor_, grind_!=0, grind_));
}

bool preprocess_public_data() {
Expand Down
2 changes: 1 addition & 1 deletion proof-producer/bin/proof-producer/src/arg_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace nil {
("elliptic-curve-type,e", make_defaulted_option(prover_options.elliptic_curve_type), "Elliptic curve type (pallas)")
("hash-type", make_defaulted_option(prover_options.hash_type), "Hash type (keccak, poseidon, sha256)")
("lambda-param", make_defaulted_option(prover_options.lambda), "Lambda param (9)")
("grind-param", make_defaulted_option(prover_options.grind), "Grind param (69)")
("grind-param", make_defaulted_option(prover_options.grind), "Grind param (0)")
("expand-factor,x", make_defaulted_option(prover_options.expand_factor), "Expand factor")
("max-quotient-chunks,q", make_defaulted_option(prover_options.max_quotient_chunks), "Maximum quotient polynomial parts amount")
("input-challenge-files,u", po::value<std::vector<boost::filesystem::path>>(&prover_options.input_challenge_files)->multitoken(),
Expand Down

0 comments on commit 5545316

Please sign in to comment.