Merge pull request #398 from zcash/update_incrementalmerkletree

Migrate to `incrementalmerkletree 0.5`
This commit is contained in:
str4d 2023-09-08 19:21:50 +01:00 committed by GitHub
commit c48247dd34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 69 deletions

View File

@ -14,10 +14,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.56.1
override: true
- name: Run benchmark - name: Run benchmark
run: cargo bench -- --output-format bencher | tee output.txt run: cargo bench -- --output-format bencher | tee output.txt
- name: Store benchmark result - name: Store benchmark result

View File

@ -12,15 +12,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
override: true
- name: Run tests - name: Run tests
uses: actions-rs/cargo@v1 run: cargo test --verbose
with:
command: test
args: --verbose
build: build:
name: Build target ${{ matrix.target }} name: Build target ${{ matrix.target }}
@ -41,29 +34,17 @@ jobs:
bitrot: bitrot:
name: Bitrot check name: Bitrot check
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
override: true
# Build benchmarks to prevent bitrot # Build benchmarks to prevent bitrot
- name: Build benchmarks - name: Build benchmarks
uses: actions-rs/cargo@v1 run: cargo build --benches
with:
command: build
args: --benches
book: book:
name: Book tests name: Book tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
override: true
- name: Setup mdBook - name: Setup mdBook
uses: peaceiris/actions-mdbook@v1 uses: peaceiris/actions-mdbook@v1
with: with:
@ -100,25 +81,12 @@ jobs:
doc-links: doc-links:
name: Intra-doc links name: Intra-doc links
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - run: cargo fetch
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
# Requires #![deny(intra_doc_link_resolution_failure)] in crates. # Requires #![deny(intra_doc_link_resolution_failure)] in crates.
- name: Check intra-doc links - name: Check intra-doc links
uses: actions-rs/cargo@v1 run: cargo doc --document-private-items
with:
command: doc
args: --document-private-items
fmt: fmt:
name: Rustfmt name: Rustfmt
@ -126,12 +94,4 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - run: cargo fmt -- --check
with:
toolchain: 1.60.0
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

View File

@ -5,19 +5,14 @@ on: pull_request
jobs: jobs:
clippy: clippy:
name: Clippy (1.60.0) name: Clippy (MSRV)
timeout-minutes: 30 timeout-minutes: 30
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
components: clippy
override: true
- name: Run Clippy - name: Run Clippy
uses: actions-rs/clippy-check@v1 uses: actions-rs/clippy-check@v1
with: with:
name: Clippy (1.60.0) name: Clippy (MSRV)
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings args: --all-features --all-targets -- -D warnings

View File

@ -7,6 +7,11 @@ and this project adheres to Rust's notion of
## [Unreleased] ## [Unreleased]
## [0.6.0] - 2023-09-08
### Changed
- MSRV is now 1.65.0.
- Migrated to `incrementalmerkletree 0.5`.
## [0.5.0] - 2023-06-06 ## [0.5.0] - 2023-06-06
### Changed ### Changed
- Migrated to `zcash_note_encryption 0.4`, `incrementalmerkletree 0.4`, `bridgetree 0.3`. - Migrated to `zcash_note_encryption 0.4`, `incrementalmerkletree 0.4`, `bridgetree 0.3`.

View File

@ -1,6 +1,6 @@
[package] [package]
name = "orchard" name = "orchard"
version = "0.5.0" version = "0.6.0"
authors = [ authors = [
"Sean Bowe <sean@electriccoin.co>", "Sean Bowe <sean@electriccoin.co>",
"Jack Grigg <jack@electriccoin.co>", "Jack Grigg <jack@electriccoin.co>",
@ -9,7 +9,7 @@ authors = [
"Kris Nuttycombe <kris@electriccoin.co>", "Kris Nuttycombe <kris@electriccoin.co>",
] ]
edition = "2021" edition = "2021"
rust-version = "1.60" rust-version = "1.65"
description = "The Orchard shielded transaction protocol" description = "The Orchard shielded transaction protocol"
license-file = "LICENSE-BOSL" license-file = "LICENSE-BOSL"
repository = "https://github.com/zcash/orchard" repository = "https://github.com/zcash/orchard"
@ -42,27 +42,27 @@ nonempty = "0.7"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
subtle = "2.3" subtle = "2.3"
zcash_note_encryption = "0.4" zcash_note_encryption = "0.4"
incrementalmerkletree = "0.4" incrementalmerkletree = "0.5"
# Logging # Logging
tracing = "0.1" tracing = "0.1"
# Developer tooling dependencies # 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 } plotters = { version = "0.3.0", optional = true }
[dev-dependencies] [dev-dependencies]
bridgetree = "0.3" 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"] } halo2_gadgets = { version = "0.3", features = ["test-dependencies"] }
hex = "0.4" hex = "0.4"
proptest = "1.0.0" proptest = "1.0.0"
zcash_note_encryption = { version = "0.4", features = ["pre-zip-212"] } 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] [target.'cfg(unix)'.dev-dependencies]
inferno = ">= 0.11, < 0.11.15" inferno = { version = "0.11", default-features = false, features = ["multithreaded", "nameattr"] }
pprof = { version = "0.9", features = ["criterion", "flamegraph"] } # MSRV 1.56 pprof = { version = "0.11", features = ["criterion", "flamegraph"] }
[lib] [lib]
bench = false bench = false

View File

@ -1,6 +1,6 @@
# orchard [![Crates.io](https://img.shields.io/crates/v/orchard.svg)](https://crates.io/crates/orchard) # # 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 ## Documentation

View File

@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "1.60.0" channel = "1.65.0"
components = [ "clippy", "rustfmt" ] components = [ "clippy", "rustfmt" ]

View File

@ -1103,8 +1103,8 @@ mod tests {
w.write_all(&<[u8; 32]>::from(instance.rk.clone()))?; w.write_all(&<[u8; 32]>::from(instance.rk.clone()))?;
w.write_all(&instance.cmx.to_bytes())?; w.write_all(&instance.cmx.to_bytes())?;
w.write_all(&[ w.write_all(&[
if instance.enable_spend { 1 } else { 0 }, u8::from(instance.enable_spend),
if instance.enable_output { 1 } else { 0 }, u8::from(instance.enable_output),
])?; ])?;
w.write_all(proof.as_ref())?; w.write_all(proof.as_ref())?;