-
Notifications
You must be signed in to change notification settings - Fork 154
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
refactor: move alphas generation to oink #5515
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ std::array<typename Flavor::GroupElement, 2> UltraRecursiveVerifier_<Flavor>::ve | |
auto sumcheck = Sumcheck(log_circuit_size, transcript); | ||
RelationSeparator alpha; | ||
for (size_t idx = 0; idx < alpha.size(); idx++) { | ||
alpha[idx] = transcript->template get_challenge<FF>("Sumcheck:alpha_" + std::to_string(idx)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. have to make all the ultra/goblin_ultra manifest names for alphas the same now that they're shared |
||
alpha[idx] = transcript->template get_challenge<FF>("alpha_" + std::to_string(idx)); | ||
} | ||
|
||
auto gate_challenges = std::vector<FF>(log_circuit_size); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,12 @@ template <IsUltraFlavor Flavor> OinkProverOutput<Flavor> OinkProver<Flavor>::pro | |
// Compute grand product(s) and commitments. | ||
execute_grand_product_computation_round(); | ||
|
||
// Generate relation separators alphas for sumcheck/combiner computation | ||
RelationSeparator alphas = generate_alphas_round(); | ||
|
||
return OinkProverOutput<Flavor>{ | ||
.relation_parameters = std::move(relation_parameters), | ||
.alphas = std::move(alphas), | ||
}; | ||
} | ||
|
||
|
@@ -149,6 +153,15 @@ template <IsUltraFlavor Flavor> void OinkProver<Flavor>::execute_grand_product_c | |
transcript->send_to_verifier(domain_separator + commitment_labels.z_lookup, witness_commitments.z_lookup); | ||
} | ||
|
||
template <IsUltraFlavor Flavor> typename Flavor::RelationSeparator OinkProver<Flavor>::generate_alphas_round() | ||
{ | ||
RelationSeparator alphas; | ||
for (size_t idx = 0; idx < alphas.size(); idx++) { | ||
alphas[idx] = transcript->template get_challenge<FF>(domain_separator + "alpha_" + std::to_string(idx)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to make sure I understand, the transcript will now generate arbitrarily many new challenges from the same underlying data? Its adding some additional content internally or something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the transcript will generate a challenge based on the previous challenge, but there won't be any other new content when we generate challenges consecutively |
||
} | ||
return alphas; | ||
} | ||
|
||
template class OinkProver<UltraFlavor>; | ||
template class OinkProver<GoblinUltraFlavor>; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update benchmarks