Skip to content
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

remove uncontrollable printing #10

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ edition = "2021"
blake2b_simd = "1"
halo2_proofs = { git = "https://github.com/DelphinusLab/halo2-gpu-specific.git", default-features = true }
halo2ecc-s = { git = "https://github.com/lanbones/halo2ecc-s.git", tag = "bisect-lookup-0.3.3" }
ark-std = { version = "0.3", features = ["print-trace"] }
ark-std = { version = "0.4.0" }
poseidon = { git = "https://github.com/lanbones/poseidon" }
num-integer = "0.1"
num-bigint = { version = "0.4", features = ["rand"] }
@@ -19,5 +19,6 @@ lazy_static = "1.4.0"

[features]
default = []
profile = ["ark-std/print-trace"]
cuda = ["halo2_proofs/cuda", "halo2ecc-s/cuda"]
unsafe = []
5 changes: 0 additions & 5 deletions src/circuits/utils.rs
Original file line number Diff line number Diff line change
@@ -84,7 +84,6 @@ pub fn load_or_build_vkey<E: MultiMillerLoop, C: Circuit<E::Scalar>>(
let verify_circuit_vk = keygen_vk(&params, circuit).expect("keygen_vk should not fail");

if let Some(cache_file) = &cache_file_opt {
println!("write vkey to {:?}", cache_file);
let mut fd = std::fs::File::create(&cache_file).unwrap();
verify_circuit_vk.write(&mut fd).unwrap();
};
@@ -94,7 +93,6 @@ pub fn load_or_build_vkey<E: MultiMillerLoop, C: Circuit<E::Scalar>>(

pub fn load_instance<E: MultiMillerLoop>(n_rows: &[u32], cache_file: &Path) -> Vec<Vec<E::Scalar>> {
assert!(Path::exists(&cache_file));
println!("read instance from {:?}", cache_file);
let mut fd = std::fs::File::open(&cache_file).unwrap();
let mut instances = vec![];
for n_row in n_rows {
@@ -108,7 +106,6 @@ pub fn load_instance<E: MultiMillerLoop>(n_rows: &[u32], cache_file: &Path) -> V
}

pub fn store_instance<F: FieldExt>(instances: &Vec<Vec<F>>, cache_file: &Path) {
println!("write instance to {:?}", cache_file);
let mut fd = std::fs::File::create(&cache_file).unwrap();
for instance_col in instances.iter() {
for instance in instance_col {
@@ -139,7 +136,6 @@ pub fn instance_to_instance_commitment<E: MultiMillerLoop>(
}

pub fn load_proof(cache_file: &Path) -> Vec<u8> {
println!("read transcript from {:?}", cache_file);
let mut fd = std::fs::File::open(&cache_file).unwrap();
let mut buf = vec![];
fd.read_to_end(&mut buf).unwrap();
@@ -157,7 +153,6 @@ pub fn load_or_create_proof<E: MultiMillerLoop, C: Circuit<E::Scalar>>(
) -> Vec<u8> {
if let Some(cache_file) = &cache_file_opt {
if try_load_proof && Path::exists(&cache_file) {
println!("read transcript from {:?}", cache_file);
return load_proof(&cache_file);
}
}