-
Notifications
You must be signed in to change notification settings - Fork 107
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 arkworks to 0.4.2 (master) #2588
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
483bd5b
Update arkworks to 0.4.2 (only up to kimchi) (p-s develop/mina compat…
chiro-hiro 4bb1e61
Update to arkworks 0.4.2: arrabiata,folding,ivc,msm,o1vm
volhovm e0d92f4
Fix serialization? (what? why?)
volhovm 2aabe69
Clarify situation with Fp/Fq/Ff1 in msm fec/serialization
volhovm ac5e9a9
Remove irrelevant old comment
volhovm 3c6e2eb
KZG: use multi_pairing() and is_zero()
volhovm b05067c
Switch to workspace deps for circuit-construction and export_test_vec…
volhovm 3ce142b
Poseidon/Test Vectors: Fix wrong serialization & add regression test
volhovm 47bcd2d
Merge branch 'master' into volhovm/arkworks042-develop
volhovm 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
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,47 @@ | ||
[package] | ||
dannywillems marked this conversation as resolved.
Show resolved
Hide resolved
|
||
name = "circuit-construction" | ||
version = "0.1.0" | ||
description = "A simple circuit writer for kimchi" | ||
repository = "https://github.com/o1-labs/proof-systems" | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
homepage = "https://o1-labs.github.io/proof-systems/" | ||
documentation = "https://o1-labs.github.io/proof-systems/rustdoc/" | ||
readme = "../README.md" | ||
|
||
[lib] | ||
path = "src/lib.rs" | ||
bench = false # needed for criterion (https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options) | ||
|
||
[dependencies] | ||
ark-ff.workspace = true | ||
ark-ec.workspace = true | ||
ark-poly.workspace = true | ||
ark-serialize.workspace = true | ||
blake2.workspace = true | ||
num-derive.workspace = true | ||
num-traits.workspace = true | ||
itertools.workspace = true | ||
rand.workspace = true | ||
rand_core.workspace = true | ||
rayon.workspace = true | ||
rmp-serde.workspace = true | ||
serde.workspace = true | ||
serde_with.workspace = true | ||
thiserror.workspace = true | ||
|
||
poly-commitment.workspace = true | ||
groupmap.workspace = true | ||
mina-curves.workspace = true | ||
o1-utils.workspace = true | ||
mina-poseidon.workspace = true | ||
kimchi.workspace = true | ||
|
||
[dev-dependencies] | ||
proptest.workspace = true | ||
proptest-derive.workspace = true | ||
colored.workspace = true | ||
|
||
# benchmarks | ||
criterion.workspace = true | ||
iai.workspace = true |
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,44 @@ | ||
use ark_ec::AffineRepr; | ||
use ark_ff::Field; | ||
use kimchi::curve::KimchiCurve; | ||
use mina_curves::pasta::{Fp, Fq, Pallas as PallasAffine, Vesta as VestaAffine}; | ||
use mina_poseidon::poseidon::ArithmeticSpongeParams; | ||
use poly_commitment::{commitment::CommitmentCurve, srs::endos}; | ||
|
||
/// The type of possible constants in the circuit | ||
#[derive(Clone)] | ||
pub struct Constants<F: Field + 'static> { | ||
pub poseidon: &'static ArithmeticSpongeParams<F>, | ||
pub endo: F, | ||
pub base: (F, F), | ||
} | ||
|
||
/// Constants for the base field of Pallas | ||
/// /// | ||
/// # Panics | ||
/// | ||
/// Will panic if `PallasAffine::generator()` returns None. | ||
pub fn fp_constants() -> Constants<Fp> { | ||
let (endo_q, _endo_r) = endos::<PallasAffine>(); | ||
let base = PallasAffine::generator().to_coordinates().unwrap(); | ||
Constants { | ||
poseidon: VestaAffine::sponge_params(), | ||
endo: endo_q, | ||
base, | ||
} | ||
} | ||
|
||
/// Constants for the base field of Vesta | ||
/// | ||
/// # Panics | ||
/// | ||
/// Will panic if `VestaAffine::generator()` returns None. | ||
pub fn fq_constants() -> Constants<Fq> { | ||
let (endo_q, _endo_r) = endos::<VestaAffine>(); | ||
let base = VestaAffine::generator().to_coordinates().unwrap(); | ||
Constants { | ||
poseidon: PallasAffine::sponge_params(), | ||
endo: endo_q, | ||
base, | ||
} | ||
} |
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,33 @@ | ||
#![doc = include_str!("../../README.md")] | ||
|
||
/// Definition of possible constants in circuits | ||
pub mod constants; | ||
/// This contains the prover functions, ranging from curves definitions to prover index and proof generation | ||
pub mod prover; | ||
/// This is the actual writer with all of the available functions to set up a circuit and its corresponding constraint system | ||
pub mod writer; | ||
|
||
#[cfg(test)] | ||
mod tests; | ||
|
||
/// This contains the Kimchi dependencies being used | ||
pub mod prologue { | ||
pub use super::constants::{fp_constants, fq_constants, Constants}; | ||
pub use super::prover::{generate_prover_index, prove, CoordinateCurve}; | ||
pub use super::writer::{Cs, Var}; | ||
pub use ark_ec::{AffineRepr, CurveGroup}; | ||
pub use ark_ff::{FftField, PrimeField, UniformRand}; | ||
pub use ark_poly::{EvaluationDomain, Radix2EvaluationDomain}; | ||
pub use groupmap::GroupMap; | ||
pub use kimchi::verifier::verify; | ||
pub use mina_curves::pasta::{ | ||
Fp, Pallas as PallasAffine, Vesta as VestaAffine, VestaParameters, | ||
}; | ||
pub use mina_poseidon::{ | ||
constants::*, | ||
poseidon::{ArithmeticSponge, Sponge}, | ||
sponge::{DefaultFqSponge, DefaultFrSponge}, | ||
}; | ||
pub use poly_commitment::{commitment::CommitmentCurve, srs::SRS}; | ||
pub use std::sync::Arc; | ||
} |
Oops, something went wrong.
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.
Yes it is fine. And it is a test.
I'll remove the comment in a follow-up