Move examples to halo2_proofs. Breaks

This commit is contained in:
Eduard S 2024-01-26 13:59:01 +00:00
parent 36e82a19d1
commit ea8cd59268
14 changed files with 32 additions and 16 deletions

View File

@ -82,3 +82,11 @@ derive_serde = ["halo2curves/derive_serde"]
[lib] [lib]
bench = false bench = false
[[example]]
name = "circuit-layout"
required-features = ["test-dev-graph"]
[[example]]
name = "proof-size"
required-features = ["cost-estimator"]

View File

@ -6,19 +6,20 @@
pub mod plonk; pub mod plonk;
pub mod circuit { pub mod circuit {
pub use halo2_common::circuit::{Cell, Layouter, SimpleFloorPlanner, Value}; pub use halo2_common::circuit::floor_planner;
pub use halo2_common::circuit::{
AssignedCell, Cell, Chip, Layouter, Region, SimpleFloorPlanner, Value,
};
} }
pub mod arithmetic { pub mod arithmetic {
pub use halo2_common::arithmetic::Field; pub use halo2_common::arithmetic::{CurveAffine, Field};
} }
pub mod dev { pub mod dev {
pub use halo2_frontend::dev::MockProver; pub use halo2_frontend::dev::{metadata, FailureLocation, MockProver, VerifyFailure};
} }
pub mod poly { pub mod poly {
pub use halo2_backend::poly::VerificationStrategy; pub use halo2_backend::poly::VerificationStrategy;
pub use halo2_common::poly::commitment; pub use halo2_common::poly::{commitment, ipa, kzg};
pub use halo2_common::poly::ipa;
pub use halo2_common::poly::kzg;
pub use halo2_middleware::poly::Rotation; pub use halo2_middleware::poly::Rotation;
} }
pub mod transcript { pub mod transcript {
@ -27,3 +28,10 @@ pub mod transcript {
TranscriptWriterBuffer, TranscriptWriterBuffer,
}; };
} }
pub mod helpers {
pub use halo2_common::helpers::SerdeFormat;
}
pub use crate::helpers::SerdeFormat;
pub use halo2curves;

View File

@ -10,6 +10,9 @@ pub use prover::create_proof;
pub use verifier::verify_proof; pub use verifier::verify_proof;
pub use halo2_backend::plonk::{ProvingKey, VerifyingKey}; pub use halo2_backend::plonk::{ProvingKey, VerifyingKey};
pub use halo2_common::plonk::{Circuit, ConstraintSystem, Error, TableColumn}; pub use halo2_common::plonk::{
pub use halo2_middleware::circuit::{Advice, Column, Fixed, Instance}; Circuit, ConstraintSystem, Error, Expression, FirstPhase, SecondPhase, Selector, TableColumn,
ThirdPhase,
};
pub use halo2_middleware::circuit::{Advice, Challenge, Column, Fixed, Instance};
pub use halo2_middleware::plonk::Assigned; pub use halo2_middleware::plonk::Assigned;

View File

@ -102,11 +102,3 @@ derive_serde = ["halo2curves/derive_serde"]
[lib] [lib]
bench = false bench = false
[[example]]
name = "circuit-layout"
required-features = ["test-dev-graph"]
[[example]]
name = "proof-size"
required-features = ["cost-estimator"]

View File

@ -50,6 +50,11 @@ impl Challenge {
pub fn phase(&self) -> u8 { pub fn phase(&self) -> u8 {
self.phase self.phase
} }
/// Return Expression
pub fn expr<F: Field>(&self) -> ExpressionMid<F> {
ExpressionMid::Challenge(*self)
}
} }
/// Low-degree expression representing an identity that must hold over the committed columns. /// Low-degree expression representing an identity that must hold over the committed columns.