-
Notifications
You must be signed in to change notification settings - Fork 273
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
chore: Remove Params concept #1541
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d565353
move comm and ver keys to separate classes
ledwards2225 b2cea8f
remove CK and VK from Params altogether
ledwards2225 0dc738e
everything templated by Curve instead of Params
ledwards2225 3a5d5f0
commitment key.hpp erradicated
ledwards2225 675d6fd
fix build error
ledwards2225 aa180a4
some cleanup and comments
ledwards2225 9e52249
comments and naming in response to review
ledwards2225 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
some cleanup and comments
- Loading branch information
commit aa180a4867ec80b2faba8bd1241813da588aaa0b
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,51 +23,45 @@ | |
|
||
namespace proof_system::honk::pcs { | ||
|
||
// using Curve = curve::BN254; | ||
|
||
/** | ||
* @brief CommitmentKey object over a pairing group 𝔾₁, using a structured reference string (SRS). | ||
* The SRS is given as a list of 𝔾₁ points { [xʲ]₁ }ⱼ where 'x' is unknown. The SRS stored in the commitment key is | ||
* after applying the pippenger_point_table thus being double the size of what is loaded from path. | ||
* | ||
* | ||
*/ | ||
template <class Curve> | ||
class CommitmentKey { | ||
* @brief CommitmentKey object over a pairing group 𝔾₁, using a structured reference string (SRS). | ||
* The SRS is given as a list of 𝔾₁ points { [xʲ]₁ }ⱼ where 'x' is unknown. The SRS stored in the commitment key is | ||
* after applying the pippenger_point_table thus being double the size of what is loaded from path. | ||
* | ||
*/ | ||
template <class Curve> class CommitmentKey { | ||
|
||
using Fr = typename Curve::ScalarField; | ||
using Commitment = typename Curve::AffineElement; | ||
|
||
public: | ||
public: | ||
CommitmentKey() = delete; | ||
|
||
/** | ||
* @brief Construct a new Kate Commitment Key object from existing SRS | ||
* | ||
* @param n | ||
* @param path | ||
* | ||
*/ | ||
CommitmentKey(const size_t num_points, | ||
std::shared_ptr<barretenberg::srs::factories::CrsFactory<Curve>> crs_factory) | ||
* @brief Construct a new Kate Commitment Key object from existing SRS | ||
* | ||
* @param n | ||
* @param path | ||
* | ||
*/ | ||
CommitmentKey(const size_t num_points, std::shared_ptr<barretenberg::srs::factories::CrsFactory<Curve>> crs_factory) | ||
: pippenger_runtime_state(num_points) | ||
, srs(crs_factory->get_prover_crs(num_points)) | ||
{} | ||
|
||
// Note: This constructor is used only by Plonk; For Honk the CommitmentKey is solely responsible for extracting | ||
// the srs. | ||
CommitmentKey(const size_t num_points, | ||
std::shared_ptr<barretenberg::srs::factories::ProverCrs<Curve>> prover_crs) | ||
CommitmentKey(const size_t num_points, std::shared_ptr<barretenberg::srs::factories::ProverCrs<Curve>> prover_crs) | ||
: pippenger_runtime_state(num_points) | ||
, srs(prover_crs) | ||
{} | ||
|
||
/** | ||
* @brief Uses the ProverSRS to create a commitment to p(X) | ||
* | ||
* @param polynomial a univariate polynomial p(X) = ∑ᵢ aᵢ⋅Xⁱ () | ||
* @return Commitment computed as C = [p(x)] = ∑ᵢ aᵢ⋅[xⁱ]₁ where x is the secret trapdoor | ||
*/ | ||
* @brief Uses the ProverSRS to create a commitment to p(X) | ||
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. Same here, there are comments about the SRS for IPA in the 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. Corrected. thanks |
||
* | ||
* @param polynomial a univariate polynomial p(X) = ∑ᵢ aᵢ⋅Xⁱ () | ||
* @return Commitment computed as C = [p(x)] = ∑ᵢ aᵢ⋅[xⁱ]₁ where x is the secret trapdoor | ||
*/ | ||
Commitment commit(std::span<const Fr> polynomial) | ||
{ | ||
const size_t degree = polynomial.size(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is only applicable for KZG, for IPA the srs is random points in G_1