diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e6a6c3ae..db2625946 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] - steps: - uses: actions/checkout@v4 - name: Run tests @@ -28,6 +27,8 @@ jobs: - uses: dtolnay/rust-toolchain@stable id: toolchain - run: rustup override set ${{steps.toolchain.outputs.name}} + - if: matrix.os == 'ubuntu-latest' + run: sudo apt-get -y install libfontconfig1-dev - name: Remove lockfile to build with latest dependencies run: rm Cargo.lock - name: Build crate @@ -79,7 +80,6 @@ jobs: container: image: xd009642/tarpaulin:develop-nightly options: --security-opt seccomp=unconfined - steps: - uses: actions/checkout@v4 - name: Generate coverage report @@ -94,6 +94,7 @@ jobs: - uses: actions/checkout@v4 - run: cargo fetch # Requires #![deny(rustdoc::broken_intra_doc_links)] in crates. + - run: sudo apt-get -y install libfontconfig1-dev - name: Check intra-doc links run: cargo doc --all-features --document-private-items diff --git a/CHANGELOG.md b/CHANGELOG.md index 72fda69df..60c5610be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to Rust's notion of ## [Unreleased] +## [0.10.2] - 2025-05-08 + +### Fixed +- Fixes problems in test compilation under `--no-default-features` + ## [0.10.1] - 2024-12-16 ### Added diff --git a/Cargo.lock b/Cargo.lock index 2cb57d90e..cab7af559 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1446,7 +1446,7 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "orchard" -version = "0.10.1" +version = "0.10.2" dependencies = [ "aes", "bitvec", diff --git a/Cargo.toml b/Cargo.toml index 6de0e327c..a810c25be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "orchard" -version = "0.10.1" +version = "0.10.2" authors = [ "Sean Bowe ", "Jack Grigg ", @@ -40,7 +40,7 @@ nonempty = "0.7" poseidon = { package = "halo2_poseidon", version = "0.1" } serde = { version = "1.0", default-features = false, features = ["derive"] } sinsemilla = "0.1" -subtle = { version = "2.3", default-features = false } +subtle = { version = "2.6", default-features = false } zcash_note_encryption = "0.4" incrementalmerkletree = { version = "0.7", default-features = false } zcash_spec = "0.1" diff --git a/src/builder.rs b/src/builder.rs index b370fb3c2..428bb057d 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -1134,7 +1134,7 @@ impl OutputView for OutputInfo { } /// Generators for property testing. -#[cfg(any(test, feature = "test-dependencies"))] +#[cfg(all(feature = "circuit", any(test, feature = "test-dependencies")))] #[cfg_attr(docsrs, doc(cfg(feature = "test-dependencies")))] pub mod testing { use alloc::vec::Vec; @@ -1274,7 +1274,7 @@ pub mod testing { } } -#[cfg(test)] +#[cfg(all(test, feature = "circuit"))] mod tests { use rand::rngs::OsRng; diff --git a/src/bundle.rs b/src/bundle.rs index c1d1c18b4..f081cf41c 100644 --- a/src/bundle.rs +++ b/src/bundle.rs @@ -533,10 +533,9 @@ pub mod testing { use proptest::prelude::*; use crate::{ - circuit::Proof, primitives::redpallas::{self, testing::arb_binding_signing_key}, value::{testing::arb_note_value_bounded, NoteValue, ValueSum, MAX_NOTE_VALUE}, - Anchor, + Anchor, Proof, }; use super::{Action, Authorized, Bundle, Flags}; diff --git a/src/constants.rs b/src/constants.rs index 7f40b5394..62548f9c1 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -3,7 +3,9 @@ pub mod fixed_bases; pub mod sinsemilla; pub mod util; +#[cfg(feature = "circuit")] pub use self::sinsemilla::{OrchardCommitDomains, OrchardHashDomains}; +#[cfg(feature = "circuit")] pub use fixed_bases::{NullifierK, OrchardFixedBases, OrchardFixedBasesFull, ValueCommitV}; /// $\mathsf{MerkleDepth^{Orchard}}$ diff --git a/src/constants/sinsemilla.rs b/src/constants/sinsemilla.rs index 84198f39e..34843fcca 100644 --- a/src/constants/sinsemilla.rs +++ b/src/constants/sinsemilla.rs @@ -132,7 +132,7 @@ impl CommitDomains for Or } } -#[cfg(test)] +#[cfg(all(test, feature = "circuit"))] mod tests { use super::*; use crate::constants::{ diff --git a/src/pczt.rs b/src/pczt.rs index 38cc0a757..c5ab397ee 100644 --- a/src/pczt.rs +++ b/src/pczt.rs @@ -301,7 +301,7 @@ pub struct Zip32Derivation { derivation_path: Vec, } -#[cfg(test)] +#[cfg(all(test, feature = "circuit"))] mod tests { use bridgetree::BridgeTree; use ff::{Field, PrimeField}; diff --git a/src/spec.rs b/src/spec.rs index b9702eead..187f5c073 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -318,13 +318,15 @@ pub fn i2lebsp(int: u64) -> [bool; NUM_BITS] { mod tests { use super::{i2lebsp, lebs2ip}; - use group::Group; - use halo2_proofs::arithmetic::CurveExt; - use pasta_curves::pallas; use rand::{rngs::OsRng, RngCore}; #[test] + #[cfg(feature = "circuit")] fn diversify_hash_substitution() { + use group::Group; + use halo2_proofs::arithmetic::CurveExt; + use pasta_curves::pallas; + assert!(!bool::from( pallas::Point::hash_to_curve("z.cash:Orchard-gd")(&[]).is_identity() )); diff --git a/tests/builder.rs b/tests/builder.rs index 8ce67e92a..0e0904cd7 100644 --- a/tests/builder.rs +++ b/tests/builder.rs @@ -1,3 +1,5 @@ +#![cfg(feature = "circuit")] + use bridgetree::BridgeTree; use incrementalmerkletree::Hashable; use orchard::{