diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3baade425..5ac291c0d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -547,8 +547,6 @@ jobs: with: crate: cargo-nextest locked: true - - name: Download MNIST - run: sh data.sh - name: Examples run: cargo nextest run --release tests_examples diff --git a/.gitignore b/.gitignore index a05479b20..cbebdcf1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ target pkg -data *.csv !examples/notebooks/eth_price.csv *.ipynb_checkpoints diff --git a/data.sh b/data.sh deleted file mode 100755 index 63ce9ffe7..000000000 --- a/data.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -mkdir data -cd data - -wget http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz -wget http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz -wget http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz -wget http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz - -gzip -d *.gz diff --git a/examples/conv2d_mnist/main.rs b/examples/conv2d_mnist/main.rs index e06e54f86..bd1dd8f85 100644 --- a/examples/conv2d_mnist/main.rs +++ b/examples/conv2d_mnist/main.rs @@ -308,6 +308,7 @@ pub fn runconv() { tst_lbl: _, .. } = MnistBuilder::new() + .base_path("examples/data") .label_format_digit() .training_set_length(50_000) .validation_set_length(10_000) diff --git a/examples/data/t10k-images-idx3-ubyte b/examples/data/t10k-images-idx3-ubyte new file mode 100644 index 000000000..1170b2cae Binary files /dev/null and b/examples/data/t10k-images-idx3-ubyte differ diff --git a/examples/data/t10k-labels-idx1-ubyte b/examples/data/t10k-labels-idx1-ubyte new file mode 100644 index 000000000..d1c3a9706 Binary files /dev/null and b/examples/data/t10k-labels-idx1-ubyte differ diff --git a/examples/data/train-images-idx3-ubyte b/examples/data/train-images-idx3-ubyte new file mode 100644 index 000000000..bbce27659 Binary files /dev/null and b/examples/data/train-images-idx3-ubyte differ diff --git a/examples/data/train-labels-idx1-ubyte b/examples/data/train-labels-idx1-ubyte new file mode 100644 index 000000000..d6b4c5db3 Binary files /dev/null and b/examples/data/train-labels-idx1-ubyte differ diff --git a/src/circuit/modules/polycommit.rs b/src/circuit/modules/polycommit.rs index fd1f7952c..3b31c5b5c 100644 --- a/src/circuit/modules/polycommit.rs +++ b/src/circuit/modules/polycommit.rs @@ -44,12 +44,11 @@ impl PolyCommitChip { /// Commit to the message using the KZG commitment scheme pub fn commit>( message: Vec, - degree: u32, num_unusable_rows: u32, params: &Scheme::ParamsProver, ) -> Vec { let k = params.k(); - let domain = halo2_proofs::poly::EvaluationDomain::new(degree, k); + let domain = halo2_proofs::poly::EvaluationDomain::new(2, k); let n = 2_u64.pow(k) - num_unusable_rows as u64; let num_poly = (message.len() / n as usize) + 1; let mut poly = vec![domain.empty_lagrange(); num_poly]; diff --git a/src/graph/modules.rs b/src/graph/modules.rs index 82eba5d62..94895ea84 100644 --- a/src/graph/modules.rs +++ b/src/graph/modules.rs @@ -314,7 +314,6 @@ impl GraphModules { let commitments = inputs.iter().fold(vec![], |mut acc, x| { let res = PolyCommitChip::commit::( x.to_vec(), - vk.cs().degree() as u32, (vk.cs().blinding_factors() + 1) as u32, srs, ); diff --git a/src/python.rs b/src/python.rs index cb1e4d216..8586cda25 100644 --- a/src/python.rs +++ b/src/python.rs @@ -547,7 +547,6 @@ fn kzg_commit( let output = PolyCommitChip::commit::>( message, - vk.cs().degree() as u32, (vk.cs().blinding_factors() + 1) as u32, &srs, ); @@ -606,7 +605,6 @@ fn ipa_commit( let output = PolyCommitChip::commit::>( message, - vk.cs().degree() as u32, (vk.cs().blinding_factors() + 1) as u32, &srs, ); diff --git a/src/wasm.rs b/src/wasm.rs index d4c28ca1a..d26b3b080 100644 --- a/src/wasm.rs +++ b/src/wasm.rs @@ -177,7 +177,6 @@ pub fn kzgCommit( let output = PolyCommitChip::commit::>( message, - vk.cs().degree() as u32, (vk.cs().blinding_factors() + 1) as u32, ¶ms, ); diff --git a/tests/wasm.rs b/tests/wasm.rs index c14b15aa8..d06b9e70c 100644 --- a/tests/wasm.rs +++ b/tests/wasm.rs @@ -130,7 +130,6 @@ mod wasm32 { serde_json::from_slice(&commitment_ser[..]).unwrap(); let reference_commitment = PolyCommitChip::commit::>( message, - vk.cs().degree() as u32, (vk.cs().blinding_factors() + 1) as u32, ¶ms, );