Przeglądaj źródła

sdk: Enable halo2_gadgets dev feature used for constants tests.

parazyd 2 lat temu
rodzic
commit
31a5f28d66
3 zmienionych plików z 83 dodań i 5 usunięć
  1. 78 0
      Cargo.lock
  2. 4 4
      Makefile
  3. 1 1
      src/sdk/Cargo.toml

+ 78 - 0
Cargo.lock

@@ -569,6 +569,21 @@ version = "1.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
 
+[[package]]
+name = "bit-set"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
+dependencies = [
+ "bit-vec",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
+
 [[package]]
 name = "bitflags"
 version = "1.3.2"
@@ -2866,6 +2881,7 @@ dependencies = [
  "halo2_proofs",
  "lazy_static",
  "pasta_curves",
+ "proptest",
  "rand 0.8.5",
  "subtle",
  "uint",
@@ -4059,6 +4075,26 @@ dependencies = [
  "unicode-ident",
 ]
 
+[[package]]
+name = "proptest"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65"
+dependencies = [
+ "bit-set",
+ "bitflags 1.3.2",
+ "byteorder",
+ "lazy_static",
+ "num-traits",
+ "rand 0.8.5",
+ "rand_chacha 0.3.1",
+ "rand_xorshift",
+ "regex-syntax 0.6.29",
+ "rusty-fork",
+ "tempfile",
+ "unarray",
+]
+
 [[package]]
 name = "ptr_meta"
 version = "0.1.4"
@@ -4162,6 +4198,12 @@ dependencies = [
  "syn 1.0.109",
 ]
 
+[[package]]
+name = "quick-error"
+version = "1.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
+
 [[package]]
 name = "quote"
 version = "1.0.33"
@@ -4248,6 +4290,15 @@ dependencies = [
  "rand_core 0.5.1",
 ]
 
+[[package]]
+name = "rand_xorshift"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
+dependencies = [
+ "rand_core 0.6.4",
+]
+
 [[package]]
 name = "rayon"
 version = "1.7.0"
@@ -4609,6 +4660,18 @@ version = "1.0.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
 
+[[package]]
+name = "rusty-fork"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f"
+dependencies = [
+ "fnv",
+ "quick-error",
+ "tempfile",
+ "wait-timeout",
+]
+
 [[package]]
 name = "ryu"
 version = "1.0.15"
@@ -6349,6 +6412,12 @@ dependencies = [
  "static_assertions",
 ]
 
+[[package]]
+name = "unarray"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94"
+
 [[package]]
 name = "unicase"
 version = "2.7.0"
@@ -6509,6 +6578,15 @@ version = "1.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
 
+[[package]]
+name = "wait-timeout"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
+dependencies = [
+ "libc",
+]
+
 [[package]]
 name = "waker-fn"
 version = "1.1.0"

+ 4 - 4
Makefile

@@ -77,19 +77,19 @@ fmt:
 	$(CARGO) fmt
 
 check: $(PROOFS_BIN) contracts
-	$(CARGO) hack check --release --feature-powerset --all
+	$(CARGO) hack check --release --feature-powerset --workspace
 
 clippy: $(PROOFS_BIN) contracts
-	$(CARGO) clippy --release --all-features --all --tests
+	$(CARGO) clippy --release --all-features --workspace --tests
 
 fix: $(PROOFS_BIN) contracts
-	$(CARGO) clippy --release --all-features --fix --allow-dirty --all
+	$(CARGO) clippy --release --all-features --fix --allow-dirty --workspace
 
 rustdoc: $(PROOFS_BIN) contracts
 	$(CARGO) doc --release --all-features --workspace --document-private-items --no-deps
 
 test: $(PROOFS_BIN) contracts
-	$(CARGO) test --release --all-features --all
+	$(CARGO) test --release --all-features --workspace
 
 coverage: $(PROOFS_BIN) contracts
 	$(CARGO) llvm-cov --release --all-features --workspace --html

+ 1 - 1
src/sdk/Cargo.toml

@@ -42,5 +42,5 @@ subtle = "2.5.0"
 
 [dev-dependencies]
 halo2_proofs = {version = "0.3.0", features = ["dev-graph", "sanity-checks"]}
-halo2_gadgets = "0.3.0"
+halo2_gadgets = {version = "0.3.0", features = ["test-dependencies"]}
 rand = "0.8.5"