-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Patch of src/aztec applied. Patch was generated on aztec2-internal by running the command `git diff --relative=barretenberg a036fb7c1..72704faec -- src/aztec/` from within barretenberg/. * Update .circleci/config.yml * Patch of src/aztec/plonk applied. Wasn't applied before? * Temporarily ignore code-workspace file and .clangd * Fix gcc compilation.
- Loading branch information
1 parent
991985c
commit 804647e
Showing
74 changed files
with
3,296 additions
and
41 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# to be unignored when we finalize one of these | ||
.vscode/*.code-workspace |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
.cache/ | ||
build*/ | ||
src/wasi-sdk-* | ||
src/aztec/plonk/proof_system/proving_key/fixtures | ||
src/aztec/proof_system/proving_key/fixtures | ||
src/aztec/rollup/proofs/*/fixtures | ||
srs_db/ignition/transcript* | ||
srs_db/lagrange | ||
srs_db/coset_lagrange | ||
srs_db/modified_lagrange | ||
.vscode | ||
# to be unignored when we agree on clang-tidy rules | ||
.clangd |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
set(CMAKE_C_COMPILER "gcc") | ||
set(CMAKE_CXX_COMPILER "g++") | ||
set(CMAKE_CXX_COMPILER "g++") | ||
# TODO(Cody): git rid of this when Adrian's work goes in | ||
add_compile_options(-Wno-uninitialized) |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
set(CMAKE_C_COMPILER "gcc-10") | ||
set(CMAKE_CXX_COMPILER "g++-10") | ||
set(CMAKE_CXX_COMPILER "g++-10") | ||
# TODO(Cody): git rid of this when Adrian's work goes in | ||
add_compile_options(-Wno-uninitialized) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
barretenberg_module(honk numeric ecc srs plonk proof_system) |
101 changes: 101 additions & 0 deletions
101
barretenberg/cpp/src/aztec/honk/commitment_scheme/commitment_scheme.hpp
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 |
---|---|---|
@@ -0,0 +1,101 @@ | ||
#pragma once | ||
#include <vector> | ||
|
||
// TODO: this needs to be a C++20 concept! | ||
// i.e. we don't want to inherit from CommitmentScheme, but rather this thing defines an interface | ||
// that we want multiple classes to conform | ||
|
||
/** | ||
* @brief describes information (minus challenges) required to create a Kate opening proof. | ||
* Conforms to the OpeningSchema concept | ||
* | ||
* @param polynomials Polynomials being opened | ||
* @param shifted_polynomials Shifted polynomials being opened. Should be size ZERO for Kate as shifts are | ||
* represented by modifying the evaluation points | ||
* @param commitments Commitments to the polynomials being opened | ||
* @param variables The set of points that the polynomials are being opened at | ||
* @param evaluations The claimed evaluations of the committed polynomials when evaluated at points described by | ||
* `variables` | ||
* @param evaluations The claimed evaluations of the shifted polynomials. Should be size ZERO for Kate as shfits are | ||
* represented by modifying the evaluation points | ||
* @param n the number of coefficients in our polynomials (assumed all polynomials are of size n) | ||
*/ | ||
template <typename Fr, typename Commitment> struct OpeningSchema { | ||
std::vector<Fr*> polynomials; | ||
std::vector<Fr*> shifted_polynomials; | ||
std::vector<Commitment> commitments; | ||
// 2d vector. First vector = number of variables, second vector = number of point openings for each variable. I | ||
// think we can assume we open all polynomials at all points to keep things simplish... | ||
std::vector<std::vector<Fr>> variables; | ||
|
||
// 2d vector. First vector = evaluations for a specific polynomial. Second vector = evaluations for a specific | ||
// polynomial given a specific opening point | ||
std::vector<std::vector<Fr>> evaluations; | ||
std::vector<std::vector<Fr>> shifted_evaluations; | ||
|
||
const size_t n; | ||
}; | ||
|
||
/** | ||
* @brief describes information (minus challenges) required to verify a Kate opening proof. | ||
* Conforms to the OpeningProof concept | ||
* | ||
* @param commitments Commitments to the polynomials being opened | ||
* @param variables The set of points that the polynomials are being opened at | ||
* @param evaluations The claimed evaluations of the committed polynomials when evaluated at points described by | ||
* `variables` | ||
* @param PI the opening proof group elements. One for every variable | ||
*/ | ||
template <typename Fr, typename Commitment> struct OpeningProof { | ||
std::vector<Commitment> commitments; | ||
// variables we're opening our polynomials at, and their opening proofs | ||
std::vector<Fr> variables; | ||
// 2d vector. First vector = evaluations for a specific polynomial. Second vector = evaluations for a specific | ||
// polynomial given a specific opening point | ||
std::vector<std::vector<Fr>> evaluations; | ||
std::vector<Commitment> PI; | ||
}; | ||
|
||
// namespace commitment_scheme_types | ||
// template <typename CommitmentSchemeData> class CommitmentScheme { | ||
// public: | ||
// typedef typename CommitmentSchemeData::Fr Fr; | ||
// typedef typename CommitmentSchemeData::Commitment Commitment; | ||
// typedef typename CommitmentSchemeData::SRS SRS; | ||
// typedef typename CommitmentSchemeData::OpeningProof OpeningProof; | ||
|
||
// using ChallengeGenerator = Fr (*)(const std::vector<Fr>&); | ||
|
||
// static std::vector<Commitment> commit(const std::vector<Fr*>& , std::shared_ptr<SRS> const&) = 0; | ||
|
||
// struct OpeningSchema { | ||
// std::vector<Fr*> polynomials; | ||
// std::vector<Fr*> shifted_polynomials; | ||
// std::vector<Commitment> commitments; | ||
// // 2d vector. First vector = number of variables, second vector = number of point openings for each variable. | ||
|
||
// // think we can assume we open all polynomials at all points to keep things simplish... | ||
// std::vector<std::vector<Fr>> variables; | ||
|
||
// // 2d vector. First vector = evaluations for a specific polynomial. Second vector = evaluations for a | ||
// specific | ||
// // polynomial given a specific opening point | ||
// std::vector<std::vector<Fr>> evaluations; | ||
// std::vector<std::vector<Fr>> shifted_evaluations; | ||
|
||
// const size_t n; | ||
// }; | ||
|
||
// static virtual OpeningProof batch_open(const OpeningSchema& committed_polynomials, | ||
// std::shared_ptr<SRS> const& srs, | ||
// ChallengeGenerator& challenge_generator); | ||
|
||
// static virtual bool batch_verify(const OpeningProof& opening_proof, | ||
// std::shared_ptr<SRS> const& srs, | ||
// ChallengeGenerator& challenge_generator); | ||
|
||
// // virtual AggregatedProof aggregate(const OpeningProof& opening_proof, | ||
// // const AggregatedProof& input_aggregation, | ||
// // std::shared_ptr<SRS> const& srs, | ||
// // ChallengeGenerator& challenge_generator); | ||
// }; |
Empty file.
Oops, something went wrong.