mirror of https://github.com/zcash/halo2.git
Clean up and config lints for halo2_proofs
This commit is contained in:
parent
1fce6f327b
commit
da9d34e78b
|
@ -11,11 +11,11 @@ authors = [
|
|||
edition = "2021"
|
||||
rust-version = "1.66.0"
|
||||
description = """
|
||||
TODO
|
||||
Halo2 backend implementation. This package implements the halo2 proof system which includes setup (key generation), proving and verifying.
|
||||
"""
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "TODO"
|
||||
documentation = "TODO"
|
||||
repository = "https://github.com/zcash/halo2"
|
||||
documentation = "https://docs.rs/halo2_proofs"
|
||||
readme = "README.md"
|
||||
categories = ["cryptography"]
|
||||
keywords = ["halo", "proofs", "zkp", "zkSNARKs"]
|
||||
|
@ -40,20 +40,12 @@ rayon = "1.8"
|
|||
halo2_middleware = { path = "../middleware" }
|
||||
halo2_common = { path = "../common" }
|
||||
|
||||
# Developer tooling dependencies
|
||||
plotters = { version = "0.3.0", default-features = false, optional = true }
|
||||
tabbycat = { version = "0.1", features = ["attributes"], optional = true }
|
||||
|
||||
# Legacy circuit compatibility
|
||||
halo2_legacy_pdqsort = { version = "0.1.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.5"
|
||||
criterion = "0.3"
|
||||
gumdrop = "0.8"
|
||||
proptest = "1"
|
||||
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||
dhat = "0.3.2"
|
||||
serde_json = "1"
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies]
|
||||
|
@ -61,20 +53,12 @@ getrandom = { version = "0.2", features = ["js"] }
|
|||
|
||||
[features]
|
||||
default = ["batch", "bits"]
|
||||
dev-graph = ["plotters", "tabbycat"]
|
||||
test-dev-graph = [
|
||||
"dev-graph",
|
||||
"plotters/bitmap_backend",
|
||||
"plotters/bitmap_encoder",
|
||||
"plotters/ttf",
|
||||
]
|
||||
bits = ["halo2curves/bits"]
|
||||
gadget-traces = ["backtrace"]
|
||||
thread-safe-region = []
|
||||
sanity-checks = []
|
||||
batch = ["rand_core/getrandom"]
|
||||
circuit-params = []
|
||||
heap-profiling = []
|
||||
cost-estimator = ["serde", "serde_derive"]
|
||||
derive_serde = ["halo2curves/derive_serde"]
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@ authors = [
|
|||
edition = "2021"
|
||||
rust-version = "1.66.0"
|
||||
description = """
|
||||
TODO
|
||||
Halo2 frontend-backend common functions and types. This package is meant for internal usage only.
|
||||
"""
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "TODO"
|
||||
documentation = "TODO"
|
||||
repository = "https://github.com/zcash/halo2"
|
||||
documentation = "https://docs.rs/halo2_proofs"
|
||||
readme = "README.md"
|
||||
categories = ["cryptography"]
|
||||
keywords = ["halo", "proofs", "zkp", "zkSNARKs"]
|
||||
|
@ -29,29 +29,19 @@ backtrace = { version = "0.3", optional = true }
|
|||
group = "0.13"
|
||||
halo2curves = { version = "0.6.0", default-features = false }
|
||||
rand_core = { version = "0.6", default-features = false }
|
||||
tracing = "0.1"
|
||||
blake2b_simd = "1" # MSRV 1.66.0
|
||||
sha3 = "0.9.1"
|
||||
rand_chacha = "0.3"
|
||||
serde = { version = "1", optional = true, features = ["derive"] }
|
||||
serde_derive = { version = "1", optional = true}
|
||||
rayon = "1.8"
|
||||
halo2_middleware = { path = "../middleware" }
|
||||
|
||||
# Developer tooling dependencies
|
||||
plotters = { version = "0.3.0", default-features = false, optional = true }
|
||||
tabbycat = { version = "0.1", features = ["attributes"], optional = true }
|
||||
|
||||
# Legacy circuit compatibility
|
||||
halo2_legacy_pdqsort = { version = "0.1.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.5"
|
||||
criterion = "0.3"
|
||||
gumdrop = "0.8"
|
||||
proptest = "1"
|
||||
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||
dhat = "0.3.2"
|
||||
serde_json = "1"
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies]
|
||||
|
@ -59,21 +49,11 @@ getrandom = { version = "0.2", features = ["js"] }
|
|||
|
||||
[features]
|
||||
default = ["batch", "bits"]
|
||||
dev-graph = ["plotters", "tabbycat"]
|
||||
test-dev-graph = [
|
||||
"dev-graph",
|
||||
"plotters/bitmap_backend",
|
||||
"plotters/bitmap_encoder",
|
||||
"plotters/ttf",
|
||||
]
|
||||
bits = ["halo2curves/bits"]
|
||||
gadget-traces = ["backtrace"]
|
||||
thread-safe-region = []
|
||||
sanity-checks = []
|
||||
batch = ["rand_core/getrandom"]
|
||||
circuit-params = []
|
||||
heap-profiling = []
|
||||
cost-estimator = ["serde", "serde_derive"]
|
||||
derive_serde = ["halo2curves/derive_serde"]
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -11,11 +11,11 @@ authors = [
|
|||
edition = "2021"
|
||||
rust-version = "1.66.0"
|
||||
description = """
|
||||
TODO
|
||||
Halo2 frontend implementation. This package implements an API to write circuits, handles witness generation and contains the MockProver.
|
||||
"""
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "TODO"
|
||||
documentation = "TODO"
|
||||
repository = "https://github.com/zcash/halo2"
|
||||
documentation = "https://docs.rs/halo2_proofs"
|
||||
readme = "README.md"
|
||||
categories = ["cryptography"]
|
||||
keywords = ["halo", "proofs", "zkp", "zkSNARKs"]
|
||||
|
@ -29,14 +29,10 @@ backtrace = { version = "0.3", optional = true }
|
|||
ff = "0.13"
|
||||
group = "0.13"
|
||||
halo2curves = { version = "0.6.0", default-features = false }
|
||||
rand_core = { version = "0.6", default-features = false }
|
||||
tracing = "0.1"
|
||||
blake2b_simd = "1" # MSRV 1.66.0
|
||||
sha3 = "0.9.1"
|
||||
rand_chacha = "0.3"
|
||||
serde = { version = "1", optional = true, features = ["derive"] }
|
||||
serde_derive = { version = "1", optional = true}
|
||||
rayon = "1.8"
|
||||
halo2_middleware = { path = "../middleware" }
|
||||
halo2_common = { path = "../common" }
|
||||
|
||||
|
@ -44,23 +40,16 @@ halo2_common = { path = "../common" }
|
|||
plotters = { version = "0.3.0", default-features = false, optional = true }
|
||||
tabbycat = { version = "0.1", features = ["attributes"], optional = true }
|
||||
|
||||
# Legacy circuit compatibility
|
||||
halo2_legacy_pdqsort = { version = "0.1.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.5"
|
||||
criterion = "0.3"
|
||||
gumdrop = "0.8"
|
||||
proptest = "1"
|
||||
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||
dhat = "0.3.2"
|
||||
serde_json = "1"
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies]
|
||||
getrandom = { version = "0.2", features = ["js"] }
|
||||
|
||||
[features]
|
||||
default = ["batch", "bits"]
|
||||
default = ["bits"]
|
||||
dev-graph = ["plotters", "tabbycat"]
|
||||
test-dev-graph = [
|
||||
"dev-graph",
|
||||
|
@ -72,7 +61,6 @@ bits = ["halo2curves/bits"]
|
|||
gadget-traces = ["backtrace"]
|
||||
thread-safe-region = []
|
||||
sanity-checks = []
|
||||
batch = ["rand_core/getrandom"]
|
||||
circuit-params = []
|
||||
heap-profiling = []
|
||||
cost-estimator = ["serde", "serde_derive"]
|
||||
|
|
|
@ -49,36 +49,23 @@ name = "fft"
|
|||
harness = false
|
||||
|
||||
[dependencies]
|
||||
backtrace = { version = "0.3", optional = true }
|
||||
ff = "0.13"
|
||||
group = "0.13"
|
||||
halo2curves = { version = "0.6.0", default-features = false }
|
||||
rand_core = { version = "0.6", default-features = false }
|
||||
tracing = "0.1"
|
||||
blake2b_simd = "1" # MSRV 1.66.0
|
||||
sha3 = "0.9.1"
|
||||
rand_chacha = "0.3"
|
||||
serde = { version = "1", optional = true, features = ["derive"] }
|
||||
serde_derive = { version = "1", optional = true}
|
||||
rayon = "1.8"
|
||||
halo2_middleware = { path = "../middleware" }
|
||||
halo2_common = { path = "../common" }
|
||||
halo2_backend = { path = "../backend" }
|
||||
halo2_frontend = { path = "../frontend" }
|
||||
|
||||
# Developer tooling dependencies
|
||||
plotters = { version = "0.3.0", default-features = false, optional = true }
|
||||
tabbycat = { version = "0.1", features = ["attributes"], optional = true }
|
||||
|
||||
# Legacy circuit compatibility
|
||||
halo2_legacy_pdqsort = { version = "0.1.0", optional = true }
|
||||
halo2curves = { version = "0.6.0", default-features = false }
|
||||
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||
|
||||
[dev-dependencies]
|
||||
ff = "0.13"
|
||||
group = "0.13"
|
||||
tracing = "0.1"
|
||||
rand_chacha = "0.3"
|
||||
rayon = "1.8"
|
||||
assert_matches = "1.5"
|
||||
criterion = "0.3"
|
||||
gumdrop = "0.8"
|
||||
proptest = "1"
|
||||
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||
dhat = "0.3.2"
|
||||
serde_json = "1"
|
||||
|
||||
|
@ -87,21 +74,16 @@ getrandom = { version = "0.2", features = ["js"] }
|
|||
|
||||
[features]
|
||||
default = ["batch", "bits"]
|
||||
dev-graph = ["plotters", "tabbycat"]
|
||||
test-dev-graph = [
|
||||
"dev-graph",
|
||||
"plotters/bitmap_backend",
|
||||
"plotters/bitmap_encoder",
|
||||
"plotters/ttf",
|
||||
]
|
||||
dev-graph = ["halo2_frontend/dev-graph"]
|
||||
test-dev-graph = ["halo2_frontend/test-dev-graph"]
|
||||
bits = ["halo2curves/bits"]
|
||||
gadget-traces = ["backtrace"]
|
||||
gadget-traces = ["halo2_common/gadget-traces"]
|
||||
thread-safe-region = []
|
||||
sanity-checks = []
|
||||
batch = ["rand_core/getrandom"]
|
||||
circuit-params = []
|
||||
heap-profiling = []
|
||||
cost-estimator = ["serde", "serde_derive"]
|
||||
cost-estimator = ["halo2_frontend/cost-estimator"]
|
||||
derive_serde = ["halo2curves/derive_serde"]
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -3,34 +3,51 @@
|
|||
//! module structure so that projects depending on halo2 can update their dependency towards it
|
||||
//! without breaking.
|
||||
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
// The actual lints we want to disable.
|
||||
#![allow(clippy::op_ref, clippy::many_single_char_names)]
|
||||
#![deny(rustdoc::broken_intra_doc_links)]
|
||||
#![deny(missing_debug_implementations)]
|
||||
#![deny(missing_docs)]
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
pub mod plonk;
|
||||
|
||||
/// Traits and structs for implementing circuit components.
|
||||
pub mod circuit {
|
||||
pub use halo2_common::circuit::floor_planner;
|
||||
pub use halo2_common::circuit::{
|
||||
AssignedCell, Cell, Chip, Layouter, Region, SimpleFloorPlanner, Value,
|
||||
};
|
||||
}
|
||||
///! This module provides common utilities, traits and structures for group,
|
||||
///! field and polynomial arithmetic.
|
||||
pub mod arithmetic {
|
||||
pub use halo2_common::arithmetic::{
|
||||
best_fft, parallelize, small_multiexp, CurveAffine, CurveExt, Field,
|
||||
};
|
||||
}
|
||||
/// Tools for developing circuits.
|
||||
pub mod dev {
|
||||
pub use halo2_frontend::dev::{metadata, FailureLocation, MockProver, VerifyFailure};
|
||||
}
|
||||
/// Contains utilities for performing arithmetic over univariate polynomials in
|
||||
/// various forms, including computing commitments to them and provably opening
|
||||
/// the committed polynomials at arbitrary points.
|
||||
pub mod poly {
|
||||
pub use halo2_backend::poly::VerificationStrategy;
|
||||
pub use halo2_common::poly::{commitment, ipa, kzg};
|
||||
pub use halo2_middleware::poly::Rotation;
|
||||
}
|
||||
/// This module contains utilities and traits for dealing with Fiat-Shamir
|
||||
/// transcripts.
|
||||
pub mod transcript {
|
||||
pub use halo2_common::transcript::{
|
||||
Blake2bRead, Blake2bWrite, Challenge255, EncodedChallenge, TranscriptReadBuffer,
|
||||
TranscriptWriterBuffer,
|
||||
};
|
||||
}
|
||||
pub mod helpers {
|
||||
mod helpers {
|
||||
pub use halo2_common::helpers::SerdeFormat;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
pub mod keygen;
|
||||
pub mod prover;
|
||||
pub mod verifier {
|
||||
//! This module provides an implementation of a variant of (Turbo)[PLONK][plonk]
|
||||
//! that is designed specifically for the polynomial commitment scheme described
|
||||
//! in the [Halo][halo] paper.
|
||||
//!
|
||||
//! [halo]: https://eprint.iacr.org/2019/1021
|
||||
//! [plonk]: https://eprint.iacr.org/2019/953
|
||||
|
||||
mod keygen;
|
||||
mod prover;
|
||||
mod verifier {
|
||||
pub use halo2_backend::plonk::verifier::verify_proof;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,9 +30,6 @@ serde = { version = "1", optional = true, features = ["derive"] }
|
|||
serde_derive = { version = "1", optional = true}
|
||||
rayon = "1.8"
|
||||
|
||||
# Legacy circuit compatibility
|
||||
halo2_legacy_pdqsort = { version = "0.1.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
proptest = "1"
|
||||
group = "0.13"
|
||||
|
|
Loading…
Reference in New Issue