From 5da41a6bbb44290e353ee4b38bcafe37ffe79ce8 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Mon, 22 May 2023 12:59:50 -0600 Subject: [PATCH 1/6] Upgrade incrementalmerkletree deps for pre-dag-sync --- Cargo.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 124bf9cf..41d8a8f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,3 +90,7 @@ debug = true [profile.bench] debug = true + +[patch.crates-io] +bridgetree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "082109deacf8611ee7917732e19b56158bda96d5" } +incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "082109deacf8611ee7917732e19b56158bda96d5" } From 6ef89d5f154de2cf7b7dd87edb8d8c49158beebb Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 6 Jul 2023 21:58:09 +0000 Subject: [PATCH 2/6] Update incrementalmerkletree deps again with bugfixes --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 41d8a8f5..dd5d9fd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,5 +92,5 @@ debug = true debug = true [patch.crates-io] -bridgetree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "082109deacf8611ee7917732e19b56158bda96d5" } -incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "082109deacf8611ee7917732e19b56158bda96d5" } +bridgetree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "67111e29403c33f2e36d6924167f1d5f04ad0fc2" } +incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "67111e29403c33f2e36d6924167f1d5f04ad0fc2" } From 213b11a7adf4d9a77ab240c6f4e9bb92e3908f32 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 8 Sep 2023 17:16:42 +0000 Subject: [PATCH 3/6] Migrate to published `incrementalmerkletree 0.5` --- CHANGELOG.md | 2 ++ Cargo.toml | 10 +++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05ac4429..91156e53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to Rust's notion of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Migrated to `incrementalmerkletree 0.5`. ## [0.5.0] - 2023-06-06 ### Changed diff --git a/Cargo.toml b/Cargo.toml index dd5d9fd2..c1a59214 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ nonempty = "0.7" serde = { version = "1.0", features = ["derive"] } subtle = "2.3" zcash_note_encryption = "0.4" -incrementalmerkletree = "0.4" +incrementalmerkletree = "0.5" # Logging tracing = "0.1" @@ -52,13 +52,13 @@ image = { version = ">= 0.24, < 0.24.5", optional = true } # 0.24.5 has MSRV 1.6 plotters = { version = "0.3.0", optional = true } [dev-dependencies] -bridgetree = "0.3" +bridgetree = "0.4" criterion = "0.3" halo2_gadgets = { version = "0.3", features = ["test-dependencies"] } hex = "0.4" proptest = "1.0.0" zcash_note_encryption = { version = "0.4", features = ["pre-zip-212"] } -incrementalmerkletree = { version = "0.4", features = ["test-dependencies"] } +incrementalmerkletree = { version = "0.5", features = ["test-dependencies"] } [target.'cfg(unix)'.dev-dependencies] inferno = ">= 0.11, < 0.11.15" @@ -90,7 +90,3 @@ debug = true [profile.bench] debug = true - -[patch.crates-io] -bridgetree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "67111e29403c33f2e36d6924167f1d5f04ad0fc2" } -incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "67111e29403c33f2e36d6924167f1d5f04ad0fc2" } From 1ff53e963c892abb429de1662f3f12e44cf6e48f Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 8 Sep 2023 17:34:38 +0000 Subject: [PATCH 4/6] CI: Use `rust-toolchain.toml` for MSRV checks --- .github/workflows/bench.yml | 4 --- .github/workflows/ci.yml | 50 +++--------------------------- .github/workflows/lints-stable.yml | 9 ++---- 3 files changed, 7 insertions(+), 56 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index e8e26384..47bc9092 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -14,10 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.56.1 - override: true - name: Run benchmark run: cargo bench -- --output-format bencher | tee output.txt - name: Store benchmark result diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48892ff8..32377b4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,15 +12,8 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.60.0 - override: true - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --verbose + run: cargo test --verbose build: name: Build target ${{ matrix.target }} @@ -41,29 +34,17 @@ jobs: bitrot: name: Bitrot check runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.60.0 - override: true # Build benchmarks to prevent bitrot - name: Build benchmarks - uses: actions-rs/cargo@v1 - with: - command: build - args: --benches + run: cargo build --benches book: name: Book tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.60.0 - override: true - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: @@ -100,25 +81,12 @@ jobs: doc-links: name: Intra-doc links runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.60.0 - override: true - - name: cargo fetch - uses: actions-rs/cargo@v1 - with: - command: fetch - - # Ensure intra-documentation links all resolve correctly + - run: cargo fetch # Requires #![deny(intra_doc_link_resolution_failure)] in crates. - name: Check intra-doc links - uses: actions-rs/cargo@v1 - with: - command: doc - args: --document-private-items + run: cargo doc --document-private-items fmt: name: Rustfmt @@ -126,12 +94,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.60.0 - override: true - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check + - run: cargo fmt -- --check diff --git a/.github/workflows/lints-stable.yml b/.github/workflows/lints-stable.yml index 69d6e15c..ca42fcca 100644 --- a/.github/workflows/lints-stable.yml +++ b/.github/workflows/lints-stable.yml @@ -5,19 +5,14 @@ on: pull_request jobs: clippy: - name: Clippy (1.60.0) + name: Clippy (MSRV) timeout-minutes: 30 runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.60.0 - components: clippy - override: true - name: Run Clippy uses: actions-rs/clippy-check@v1 with: - name: Clippy (1.60.0) + name: Clippy (MSRV) token: ${{ secrets.GITHUB_TOKEN }} args: --all-features --all-targets -- -D warnings From 7fa0edbd988ef543934fb29d96fe82bd5aed71a6 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 8 Sep 2023 17:40:03 +0000 Subject: [PATCH 5/6] Bump MSRV to 1.65 `reddsa 0.5.1` has MSRV 1.65. --- CHANGELOG.md | 1 + Cargo.toml | 10 +++++----- README.md | 2 +- rust-toolchain.toml | 2 +- src/circuit.rs | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91156e53..1c1cd2c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to Rust's notion of ## [Unreleased] ### Changed +- MSRV is now 1.65.0. - Migrated to `incrementalmerkletree 0.5`. ## [0.5.0] - 2023-06-06 diff --git a/Cargo.toml b/Cargo.toml index c1a59214..380098a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ authors = [ "Kris Nuttycombe ", ] edition = "2021" -rust-version = "1.60" +rust-version = "1.65" description = "The Orchard shielded transaction protocol" license-file = "LICENSE-BOSL" repository = "https://github.com/zcash/orchard" @@ -48,12 +48,12 @@ incrementalmerkletree = "0.5" tracing = "0.1" # Developer tooling dependencies -image = { version = ">= 0.24, < 0.24.5", optional = true } # 0.24.5 has MSRV 1.61 +image = { version = "0.24", optional = true } plotters = { version = "0.3.0", optional = true } [dev-dependencies] bridgetree = "0.4" -criterion = "0.3" +criterion = "0.4" # 0.5 depends on clap 4 which has MSRV 1.70 halo2_gadgets = { version = "0.3", features = ["test-dependencies"] } hex = "0.4" proptest = "1.0.0" @@ -61,8 +61,8 @@ zcash_note_encryption = { version = "0.4", features = ["pre-zip-212"] } incrementalmerkletree = { version = "0.5", features = ["test-dependencies"] } [target.'cfg(unix)'.dev-dependencies] -inferno = ">= 0.11, < 0.11.15" -pprof = { version = "0.9", features = ["criterion", "flamegraph"] } # MSRV 1.56 +inferno = { version = "0.11", default-features = false, features = ["multithreaded", "nameattr"] } +pprof = { version = "0.11", features = ["criterion", "flamegraph"] } [lib] bench = false diff --git a/README.md b/README.md index babbd341..94e9f4f3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # orchard [![Crates.io](https://img.shields.io/crates/v/orchard.svg)](https://crates.io/crates/orchard) # -Requires Rust 1.60+. +Requires Rust 1.65+. ## Documentation diff --git a/rust-toolchain.toml b/rust-toolchain.toml index e06e5ca5..5ecda6e4 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.60.0" +channel = "1.65.0" components = [ "clippy", "rustfmt" ] diff --git a/src/circuit.rs b/src/circuit.rs index fa41b833..36c0bf3d 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -1103,8 +1103,8 @@ mod tests { w.write_all(&<[u8; 32]>::from(instance.rk.clone()))?; w.write_all(&instance.cmx.to_bytes())?; w.write_all(&[ - if instance.enable_spend { 1 } else { 0 }, - if instance.enable_output { 1 } else { 0 }, + u8::from(instance.enable_spend), + u8::from(instance.enable_output), ])?; w.write_all(proof.as_ref())?; From bb6e3afc0822f390b493bf07fd6733007ba3e9eb Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 8 Sep 2023 17:44:13 +0000 Subject: [PATCH 6/6] orchard 0.6.0 --- CHANGELOG.md | 2 ++ Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c1cd2c3..c0bc6b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to Rust's notion of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.6.0] - 2023-09-08 ### Changed - MSRV is now 1.65.0. - Migrated to `incrementalmerkletree 0.5`. diff --git a/Cargo.toml b/Cargo.toml index 380098a8..3a5c5867 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "orchard" -version = "0.5.0" +version = "0.6.0" authors = [ "Sean Bowe ", "Jack Grigg ",