diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index 8679a37154f..d71683b04ba 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -101,9 +101,6 @@ cargo release replace --verbose --execute --allow-branch '*' --package zebrad cargo release commit --verbose --execute --allow-branch '*' ``` -Crate publishing is [automatically checked in CI](https://github.com/ZcashFoundation/zebra/actions/workflows/release-crates-io.yml) using "dry run" mode, however due to a bug in `cargo-release` we need to pass exact versions to the alpha crates: - -- [ ] Update `zebra-scan` and `zebra-grpc` alpha crates in the [release-crates-dry-run workflow script](https://github.com/ZcashFoundation/zebra/blob/main/.github/workflows/scripts/release-crates-dry-run.sh) - [ ] Push the above version changes to the release branch. ## Update End of Support diff --git a/.github/workflows/release-crates-io.patch.yml b/.github/workflows/release-crates-io.patch.yml deleted file mode 100644 index e8f18d6c755..00000000000 --- a/.github/workflows/release-crates-io.patch.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Release crates - -on: - # Only patch the Release PR test job - pull_request: - paths-ignore: - # code and tests - - '**/*.rs' - # hard-coded checkpoints (and proptest regressions, which are not actually needed) - - '**/*.txt' - # dependencies - - '**/Cargo.toml' - - '**/Cargo.lock' - # configuration files - - '.cargo/config.toml' - - '**/clippy.toml' - # READMEs, which are shown on the crate page - - '**/README.md' - # workflow definitions - - '.github/workflows/release-crates.io.yml' - - -jobs: - check-release: - name: Check crate release dry run - runs-on: ubuntu-latest - steps: - - run: 'echo "No check required"' diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml deleted file mode 100644 index 32586ce5fbe..00000000000 --- a/.github/workflows/release-crates-io.yml +++ /dev/null @@ -1,126 +0,0 @@ -# This workflow checks that Zebra's crates.io release script works. -# -# We use a separate action, because the changed files are different to a Continuous Deployment -# or Docker release. -# -# This workflow is triggered when: -# - A PR that changes Rust files, a README, or this workflow is opened or updated -# - A change is pushed to the main branch -# -# TODO: -# If we decide to automate crates.io releases, we can also publish crates using this workflow, when: -# - A release is published -# - A pre-release is changed to a release - -name: Release crates - -# Ensures that only one workflow task will run at a time. Previous releases, if -# already in process, won't get cancelled. Instead, we let the first release complete, -# then queue the latest pending workflow, cancelling any workflows in between. -# -# Since the different event types do very different things (test vs release), -# we can run different event types concurrently. -# -# For pull requests, we only run the tests from this workflow, and don't do any releases. -# So an in-progress pull request gets cancelled, just like other tests. -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - - -on: -# disabled for now -# release: -# types: -# - released - - # Only runs the release tests, doesn't release any crates. - # - # We test all changes on the main branch, just in case the PR paths are too strict. - push: - branches: - - main - - pull_request: - paths: - # code and tests - - '**/*.rs' - # hard-coded checkpoints (and proptest regressions, which are not actually needed) - - '**/*.txt' - # dependencies - - '**/Cargo.toml' - - '**/Cargo.lock' - # configuration files - - '.cargo/config.toml' - - '**/clippy.toml' - # READMEs, which are shown on the crate page - - '**/README.md' - # workflow definitions - - '.github/workflows/release-crates.io.yml' - - -jobs: - # Test that Zebra can be released to crates.io using `cargo`. - # This checks that Zebra's dependencies and release configs are correct. - check-release: - name: Check crate release dry run - timeout-minutes: 15 - runs-on: ubuntu-latest - steps: - - uses: r7kamura/rust-problem-matchers@v1.5.0 - - - name: Checkout git repository - uses: actions/checkout@v4.2.2 - with: - persist-credentials: false - - - name: Inject slug/short variables - uses: rlespinasse/github-slug-action@v5 - with: - short-length: 7 - - # Setup Rust with stable toolchain and minimal profile - - name: Setup Rust - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=stable --profile=minimal - - - name: Install cargo-release - uses: baptiste0928/cargo-install@v3.3.0 - with: - crate: cargo-release - - # Make sure Zebra can be released! - # - # These steps should be kept up to date with the release checklist. - # - - name: Crate release dry run - run: | - ./.github/workflows/scripts/release-crates-dry-run.sh - - # TODO: actually do the release here - #release-crates: - # name: Release Zebra Crates - # needs: [ check-release ] - # runs-on: ubuntu-latest - # timeout-minutes: 30 - # if: ${{ !cancelled() && !failure() && github.event_name == 'release' }} - # steps: - # ... - - failure-issue: - name: Open or update issues for release crates failures - # When a new job is added to this workflow, add it to this list. - needs: [ check-release ] - # Only open tickets for failed or cancelled jobs that are not coming from PRs. - # (PR statuses are already reported in the PR jobs list, and checked by GitHub's Merge Queue.) - if: (failure() && github.event.pull_request == null) || (cancelled() && github.event.pull_request == null) - runs-on: ubuntu-latest - steps: - - uses: jayqi/failed-build-issue-action@v1 - with: - title-template: "{{refname}} branch CI failed: {{eventName}} in {{workflow}}" - # New failures open an issue with this label. - label-name: S-ci-fail-release-crates-auto-issue - # If there is already an open issue with this label, any failures become comments on that issue. - always-create-new-issue: false - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/scripts/release-crates-dry-run.sh b/.github/workflows/scripts/release-crates-dry-run.sh deleted file mode 100755 index c83b068f5bd..00000000000 --- a/.github/workflows/scripts/release-crates-dry-run.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -set -ex - -# Check if necessary tools are installed -if ! command -v git &>/dev/null || ! command -v cargo &>/dev/null; then - echo "ERROR: Required tools (git, cargo) are not installed." - exit 1 -fi - -git config --global user.email "release-tests-no-reply@zfnd.org" -git config --global user.name "Automated Release Test" - -# Ensure cargo-release is installed -if ! cargo release --version &>/dev/null; then - echo "ERROR: cargo release must be installed." - exit 1 -fi - -# Release process -# We use the same commands as the [release drafter](https://github.com/ZcashFoundation/zebra/blob/main/.github/PULL_REQUEST_TEMPLATE/release-checklist.md#update-crate-versions) -# with an extra `--no-confirm` argument for non-interactive testing. -# Update everything except for alpha crates and zebrad: -cargo release version --verbose --execute --no-confirm --allow-branch '*' --workspace --exclude zebrad --exclude zebra-scan --exclude zebra-grpc beta - -# Due to a bug in cargo-release, we need to pass exact versions for alpha crates: -cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebra-scan 0.1.0-alpha.13 -cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebra-grpc 0.1.0-alpha.11 - -# Update zebrad: -cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebrad patch -# Continue with the release process: -cargo release replace --verbose --execute --no-confirm --allow-branch '*' --package zebrad -cargo release commit --verbose --execute --no-confirm --allow-branch '*' - -# Dry run to check the release -# Workaround for unpublished dependency version errors: https://github.com/crate-ci/cargo-release/issues/691 -# TODO: check all crates after fixing these errors -cargo release publish --verbose --dry-run --allow-branch '*' --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad --exclude zebra-scan - -echo "Release process completed." diff --git a/Cargo.lock b/Cargo.lock index 30273b8d3f2..53b5a13ba46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4626,7 +4626,7 @@ dependencies = [ [[package]] name = "tower-batch-control" -version = "0.2.41-beta.19" +version = "0.2.41-beta.20" dependencies = [ "color-eyre", "ed25519-zebra", @@ -4649,7 +4649,7 @@ dependencies = [ [[package]] name = "tower-fallback" -version = "0.2.41-beta.19" +version = "0.2.41-beta.20" dependencies = [ "futures-core", "pin-project", @@ -5718,7 +5718,7 @@ dependencies = [ [[package]] name = "zebra-chain" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "bitflags 2.6.0", "bitflags-serde-legacy", @@ -5783,7 +5783,7 @@ dependencies = [ [[package]] name = "zebra-consensus" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "bellman", "blake2b_simd", @@ -5829,7 +5829,7 @@ dependencies = [ [[package]] name = "zebra-grpc" -version = "0.1.0-alpha.10" +version = "0.1.0-alpha.11" dependencies = [ "color-eyre", "futures-util", @@ -5851,7 +5851,7 @@ dependencies = [ [[package]] name = "zebra-network" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "bitflags 2.6.0", "byteorder", @@ -5892,7 +5892,7 @@ dependencies = [ [[package]] name = "zebra-node-services" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "color-eyre", "jsonrpc-core", @@ -5905,7 +5905,7 @@ dependencies = [ [[package]] name = "zebra-rpc" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "base64 0.22.1", "chrono", @@ -5946,7 +5946,7 @@ dependencies = [ [[package]] name = "zebra-scan" -version = "0.1.0-alpha.12" +version = "0.1.0-alpha.13" dependencies = [ "bls12_381", "chrono", @@ -5992,7 +5992,7 @@ dependencies = [ [[package]] name = "zebra-script" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "hex", "lazy_static", @@ -6004,7 +6004,7 @@ dependencies = [ [[package]] name = "zebra-state" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "bincode", "chrono", @@ -6049,7 +6049,7 @@ dependencies = [ [[package]] name = "zebra-test" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "color-eyre", "futures", @@ -6077,7 +6077,7 @@ dependencies = [ [[package]] name = "zebra-utils" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" dependencies = [ "color-eyre", "hex", @@ -6108,7 +6108,7 @@ dependencies = [ [[package]] name = "zebrad" -version = "2.1.0" +version = "2.1.1" dependencies = [ "abscissa_core", "atty", diff --git a/book/src/user/docker.md b/book/src/user/docker.md index 6dc852a57ac..bee81533175 100644 --- a/book/src/user/docker.md +++ b/book/src/user/docker.md @@ -37,7 +37,7 @@ docker run -d --platform linux/amd64 \ ### Build it locally ```shell -git clone --depth 1 --branch v2.1.0 https://github.com/ZcashFoundation/zebra.git +git clone --depth 1 --branch v2.1.1 https://github.com/ZcashFoundation/zebra.git docker build --file docker/Dockerfile --target runtime --tag zebra:local . docker run --detach zebra:local ``` diff --git a/book/src/user/install.md b/book/src/user/install.md index c72cfbf38c2..f9e0b03c5c9 100644 --- a/book/src/user/install.md +++ b/book/src/user/install.md @@ -76,7 +76,7 @@ To compile Zebra directly from GitHub, or from a GitHub release source archive: ```sh git clone https://github.com/ZcashFoundation/zebra.git cd zebra -git checkout v2.1.0 +git checkout v2.1.1 ``` 3. Build and Run `zebrad` @@ -89,7 +89,7 @@ target/release/zebrad start ### Compiling from git using cargo install ```sh -cargo install --git https://github.com/ZcashFoundation/zebra --tag v2.1.0 zebrad +cargo install --git https://github.com/ZcashFoundation/zebra --tag v2.1.1 zebrad ``` ### Compiling on ARM diff --git a/tower-batch-control/Cargo.toml b/tower-batch-control/Cargo.toml index 9f9dd5661f6..fb76c19f499 100644 --- a/tower-batch-control/Cargo.toml +++ b/tower-batch-control/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tower-batch-control" -version = "0.2.41-beta.19" +version = "0.2.41-beta.20" authors = ["Zcash Foundation ", "Tower Maintainers "] description = "Tower middleware for batch request processing" # # Legal @@ -43,10 +43,10 @@ rand = "0.8.5" tokio = { version = "1.42.0", features = ["full", "tracing", "test-util"] } tokio-test = "0.4.4" -tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.19" } +tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.20" } tower-test = "0.4.0" -zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.43" } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.44" } [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } diff --git a/tower-fallback/Cargo.toml b/tower-fallback/Cargo.toml index bc20a49ef7a..61a0258d4d4 100644 --- a/tower-fallback/Cargo.toml +++ b/tower-fallback/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tower-fallback" -version = "0.2.41-beta.19" +version = "0.2.41-beta.20" authors = ["Zcash Foundation "] description = "A Tower service combinator that sends requests to a first service, then retries processing on a second fallback service if the first service errors." license = "MIT OR Apache-2.0" @@ -24,4 +24,4 @@ tracing = "0.1.41" [dev-dependencies] tokio = { version = "1.42.0", features = ["full", "tracing", "test-util"] } -zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.43" } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.44" } diff --git a/zebra-chain/Cargo.toml b/zebra-chain/Cargo.toml index b7a9b5d9d32..eb8f098dcf0 100644 --- a/zebra-chain/Cargo.toml +++ b/zebra-chain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-chain" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation "] description = "Core Zcash data structures" license = "MIT OR Apache-2.0" @@ -145,7 +145,7 @@ proptest-derive = { version = "0.5.0", optional = true } rand = { version = "0.8.5", optional = true } rand_chacha = { version = "0.3.1", optional = true } -zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.43", optional = true } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.44", optional = true } [dev-dependencies] # Benchmarks @@ -168,7 +168,7 @@ rand_chacha = "0.3.1" tokio = { version = "1.42.0", features = ["full", "tracing", "test-util"] } -zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.43" } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.44" } [[bench]] name = "block" diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index aac5cfc0c06..a6d86e30a60 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-consensus" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation "] description = "Implementation of Zcash consensus checks" license = "MIT OR Apache-2.0" @@ -63,13 +63,13 @@ orchard.workspace = true zcash_proofs = { workspace = true, features = ["multicore" ] } wagyu-zcash-parameters = "0.2.0" -tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.19" } -tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.19" } +tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.20" } +tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.20" } -zebra-script = { path = "../zebra-script", version = "1.0.0-beta.43" } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.43" } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.43" } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43" } +zebra-script = { path = "../zebra-script", version = "1.0.0-beta.44" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.44" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.44" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44" } # prod feature progress-bar howudoin = { version = "0.1.2", optional = true } @@ -94,6 +94,6 @@ tokio = { version = "1.42.0", features = ["full", "tracing", "test-util"] } tracing-error = "0.2.1" tracing-subscriber = "0.3.19" -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.43", features = ["proptest-impl"] } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43", features = ["proptest-impl"] } -zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.43" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.44", features = ["proptest-impl"] } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44", features = ["proptest-impl"] } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.44" } diff --git a/zebra-grpc/Cargo.toml b/zebra-grpc/Cargo.toml index cf01365553f..cef52a4c584 100644 --- a/zebra-grpc/Cargo.toml +++ b/zebra-grpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-grpc" -version = "0.1.0-alpha.10" +version = "0.1.0-alpha.11" authors = ["Zcash Foundation "] description = "Zebra gRPC interface" license = "MIT OR Apache-2.0" @@ -28,8 +28,8 @@ color-eyre = "0.6.3" zcash_primitives.workspace = true -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.43", features = ["shielded-scan"] } -zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.43" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.44", features = ["shielded-scan"] } +zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.44" } [build-dependencies] tonic-build = "0.12.3" diff --git a/zebra-network/Cargo.toml b/zebra-network/Cargo.toml index 86d373fa8d9..7ccf4f1f259 100644 --- a/zebra-network/Cargo.toml +++ b/zebra-network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-network" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation ", "Tower Maintainers "] description = "Networking code for Zebra" # # Legal @@ -83,7 +83,7 @@ howudoin = { version = "0.1.2", optional = true } proptest = { version = "1.4.0", optional = true } proptest-derive = { version = "0.5.0", optional = true } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43", features = ["async-error"] } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44", features = ["async-error"] } [dev-dependencies] proptest = "1.4.0" diff --git a/zebra-network/src/protocol/external/codec.rs b/zebra-network/src/protocol/external/codec.rs index 1df72aecaef..2ed3673107e 100644 --- a/zebra-network/src/protocol/external/codec.rs +++ b/zebra-network/src/protocol/external/codec.rs @@ -224,7 +224,7 @@ impl Codec { writer.write_u64::(nonce.0)?; - if user_agent.as_bytes().len() > MAX_USER_AGENT_LENGTH { + if user_agent.len() > MAX_USER_AGENT_LENGTH { // zcashd won't accept this version message return Err(Error::Parse( "user agent too long: must be 256 bytes or less", @@ -248,7 +248,7 @@ impl Codec { reason, data, } => { - if message.as_bytes().len() > MAX_REJECT_MESSAGE_LENGTH { + if message.len() > MAX_REJECT_MESSAGE_LENGTH { // zcashd won't accept this reject message return Err(Error::Parse( "reject message too long: must be 12 bytes or less", @@ -259,7 +259,7 @@ impl Codec { writer.write_u8(*ccode as u8)?; - if reason.as_bytes().len() > MAX_REJECT_REASON_LENGTH { + if reason.len() > MAX_REJECT_REASON_LENGTH { return Err(Error::Parse( "reject reason too long: must be 111 bytes or less", )); diff --git a/zebra-node-services/Cargo.toml b/zebra-node-services/Cargo.toml index d9fcbba5bdd..6aa11ad45e9 100644 --- a/zebra-node-services/Cargo.toml +++ b/zebra-node-services/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-node-services" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation "] description = "The interfaces of some Zebra node services" license = "MIT OR Apache-2.0" @@ -37,7 +37,7 @@ rpc-client = [ shielded-scan = [] [dependencies] -zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.43" } +zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.44" } # Optional dependencies diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index d180f049dc5..270d7a63ecf 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-rpc" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation "] description = "A Zebra JSON Remote Procedure Call (JSON-RPC) interface" license = "MIT OR Apache-2.0" @@ -106,16 +106,16 @@ zcash_address = { workspace = true, optional = true} # Test-only feature proptest-impl proptest = { version = "1.4.0", optional = true } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43", features = [ +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44", features = [ "json-conversion", ] } -zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.43" } -zebra-network = { path = "../zebra-network", version = "1.0.0-beta.43" } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.43", features = [ +zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.44" } +zebra-network = { path = "../zebra-network", version = "1.0.0-beta.44" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.44", features = [ "rpc-client", ] } -zebra-script = { path = "../zebra-script", version = "1.0.0-beta.43" } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.43" } +zebra-script = { path = "../zebra-script", version = "1.0.0-beta.44" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.44" } [build-dependencies] tonic-build = { version = "0.12.3", optional = true } @@ -128,17 +128,17 @@ proptest = "1.4.0" thiserror = "2.0.6" tokio = { version = "1.42.0", features = ["full", "tracing", "test-util"] } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43", features = [ +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44", features = [ "proptest-impl", ] } -zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.43", features = [ +zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.44", features = [ "proptest-impl", ] } -zebra-network = { path = "../zebra-network", version = "1.0.0-beta.43", features = [ +zebra-network = { path = "../zebra-network", version = "1.0.0-beta.44", features = [ "proptest-impl", ] } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.43", features = [ +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.44", features = [ "proptest-impl", ] } -zebra-test = { path = "../zebra-test", version = "1.0.0-beta.43" } +zebra-test = { path = "../zebra-test", version = "1.0.0-beta.44" } diff --git a/zebra-rpc/src/server/http_request_compatibility.rs b/zebra-rpc/src/server/http_request_compatibility.rs index ebbf49c05d3..5eb03b1c4fc 100644 --- a/zebra-rpc/src/server/http_request_compatibility.rs +++ b/zebra-rpc/src/server/http_request_compatibility.rs @@ -73,7 +73,7 @@ impl HttpRequestMiddleware { .and_then(|encoded| URL_SAFE.decode(encoded).ok()) .and_then(|decoded| String::from_utf8(decoded).ok()) .and_then(|request_cookie| request_cookie.split(':').nth(1).map(String::from)) - .map_or(false, |passwd| internal_cookie.authenticate(passwd)) + .is_some_and(|passwd| internal_cookie.authenticate(passwd)) }) } diff --git a/zebra-scan/Cargo.toml b/zebra-scan/Cargo.toml index 17bd29baed7..42cf878a8e6 100644 --- a/zebra-scan/Cargo.toml +++ b/zebra-scan/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-scan" -version = "0.1.0-alpha.12" +version = "0.1.0-alpha.13" authors = ["Zcash Foundation "] description = "Shielded transaction scanner for the Zcash blockchain" license = "MIT OR Apache-2.0" @@ -77,11 +77,11 @@ zcash_primitives.workspace = true zcash_address.workspace = true sapling-crypto.workspace = true -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43", features = ["shielded-scan"] } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.43", features = ["shielded-scan"] } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.43", features = ["shielded-scan"] } -zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.10" } -zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.43" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44", features = ["shielded-scan"] } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.44", features = ["shielded-scan"] } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.44", features = ["shielded-scan"] } +zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.11" } +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.44" } chrono = { version = "0.4.39", default-features = false, features = ["clock", "std", "serde"] } @@ -96,7 +96,7 @@ jubjub = { version = "0.10.0", optional = true } rand = { version = "0.8.5", optional = true } zcash_note_encryption = { version = "0.4.0", optional = true } -zebra-test = { path = "../zebra-test", version = "1.0.0-beta.43", optional = true } +zebra-test = { path = "../zebra-test", version = "1.0.0-beta.44", optional = true } # zebra-scanner binary dependencies tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } @@ -107,7 +107,7 @@ serde_json = "1.0.133" jsonrpc = { version = "0.18.0", optional = true } hex = { version = "0.4.3", optional = true } -zebrad = { path = "../zebrad", version = "2.1.0" } +zebrad = { path = "../zebrad", version = "2.1.1" } [dev-dependencies] insta = { version = "1.41.1", features = ["ron", "redactions"] } @@ -125,6 +125,6 @@ zcash_note_encryption = "0.4.0" toml = "0.8.19" tonic = "0.12.3" -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.43", features = ["proptest-impl"] } -zebra-test = { path = "../zebra-test", version = "1.0.0-beta.43" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.44", features = ["proptest-impl"] } +zebra-test = { path = "../zebra-test", version = "1.0.0-beta.44" } diff --git a/zebra-script/Cargo.toml b/zebra-script/Cargo.toml index e0d3094ef98..0a187676798 100644 --- a/zebra-script/Cargo.toml +++ b/zebra-script/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-script" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation "] description = "Zebra script verification wrapping zcashd's zcash_script library" license = "MIT OR Apache-2.0" @@ -16,11 +16,11 @@ categories = ["api-bindings", "cryptography::cryptocurrencies"] [dependencies] zcash_script = "0.2.0" -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44" } thiserror = "2.0.6" [dev-dependencies] hex = "0.4.3" lazy_static = "1.4.0" -zebra-test = { path = "../zebra-test", version = "1.0.0-beta.43" } +zebra-test = { path = "../zebra-test", version = "1.0.0-beta.44" } diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index 8ca769f6910..fc2a6505791 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-state" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation "] description = "State contextual verification and storage code for Zebra" license = "MIT OR Apache-2.0" @@ -77,13 +77,13 @@ tracing = "0.1.41" elasticsearch = { version = "8.16.0-alpha.1", default-features = false, features = ["rustls-tls"], optional = true } serde_json = { version = "1.0.133", package = "serde_json", optional = true } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43", features = ["async-error"] } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44", features = ["async-error"] } # prod feature progress-bar howudoin = { version = "0.1.2", optional = true } # test feature proptest-impl -zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.43", optional = true } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.44", optional = true } proptest = { version = "1.4.0", optional = true } proptest-derive = { version = "0.5.0", optional = true } @@ -108,5 +108,5 @@ jubjub = "0.10.0" tokio = { version = "1.42.0", features = ["full", "tracing", "test-util"] } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43", features = ["proptest-impl"] } -zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.43" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44", features = ["proptest-impl"] } +zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.44" } diff --git a/zebra-state/src/service/non_finalized_state/chain.rs b/zebra-state/src/service/non_finalized_state/chain.rs index eb00fbda3a5..0dfcd585c12 100644 --- a/zebra-state/src/service/non_finalized_state/chain.rs +++ b/zebra-state/src/service/non_finalized_state/chain.rs @@ -551,16 +551,14 @@ impl Chain { let anchor = tree.root(); trace!(?height, ?anchor, "adding sprout tree"); - // Don't add a new tree unless it differs from the previous one or there's no previous tree. + // Add the new tree only if: + // + // - it differs from the previous one, or + // - there's no previous tree. if height.is_min() || self - .sprout_tree( - height - .previous() - .expect("Already checked for underflow.") - .into(), - ) - .map_or(true, |prev_tree| prev_tree != tree) + .sprout_tree(height.previous().expect("prev height").into()) + .is_none_or(|prev_tree| prev_tree != tree) { assert_eq!( self.sprout_trees_by_height.insert(height, tree.clone()), @@ -756,16 +754,14 @@ impl Chain { let anchor = tree.root(); trace!(?height, ?anchor, "adding sapling tree"); - // Don't add a new tree unless it differs from the previous one or there's no previous tree. + // Add the new tree only if: + // + // - it differs from the previous one, or + // - there's no previous tree. if height.is_min() || self - .sapling_tree( - height - .previous() - .expect("Already checked for underflow.") - .into(), - ) - .map_or(true, |prev_tree| prev_tree != tree) + .sapling_tree(height.previous().expect("prev height").into()) + .is_none_or(|prev_tree| prev_tree != tree) { assert_eq!( self.sapling_trees_by_height.insert(height, tree), @@ -963,16 +959,14 @@ impl Chain { let anchor = tree.root(); trace!(?height, ?anchor, "adding orchard tree"); - // Don't add a new tree unless it differs from the previous one or there's no previous tree. + // Add the new tree only if: + // + // - it differs from the previous one, or + // - there's no previous tree. if height.is_min() || self - .orchard_tree( - height - .previous() - .expect("Already checked for underflow.") - .into(), - ) - .map_or(true, |prev_tree| prev_tree != tree) + .orchard_tree(height.previous().expect("prev height").into()) + .is_none_or(|prev_tree| prev_tree != tree) { assert_eq!( self.orchard_trees_by_height.insert(height, tree), diff --git a/zebra-test/Cargo.toml b/zebra-test/Cargo.toml index db111c88f35..d7e22448a7f 100644 --- a/zebra-test/Cargo.toml +++ b/zebra-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-test" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation "] description = "Test harnesses and test vectors for Zebra" license = "MIT OR Apache-2.0" diff --git a/zebra-utils/Cargo.toml b/zebra-utils/Cargo.toml index 2dc0a382a04..51929caff71 100644 --- a/zebra-utils/Cargo.toml +++ b/zebra-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zebra-utils" -version = "1.0.0-beta.43" +version = "1.0.0-beta.44" authors = ["Zcash Foundation "] description = "Developer tools for Zebra maintenance and testing" license = "MIT OR Apache-2.0" @@ -94,11 +94,11 @@ tracing-error = "0.2.1" tracing-subscriber = "0.3.19" thiserror = "2.0.6" -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.43" } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.44" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44" } # These crates are needed for the block-template-to-proposal binary -zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.43", optional = true } +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.44", optional = true } # These crates are needed for the zebra-checkpoints binary itertools = { version = "0.13.0", optional = true } diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 9cf2d1e4095..ce5fbde2a21 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -1,7 +1,7 @@ [package] # Crate metadata name = "zebrad" -version = "2.1.0" +version = "2.1.1" authors = ["Zcash Foundation "] description = "The Zcash Foundation's independent, consensus-compatible implementation of a Zcash node" license = "MIT OR Apache-2.0" @@ -157,15 +157,15 @@ test_sync_past_mandatory_checkpoint_mainnet = [] test_sync_past_mandatory_checkpoint_testnet = [] [dependencies] -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43" } -zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.43" } -zebra-network = { path = "../zebra-network", version = "1.0.0-beta.43" } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.43", features = ["rpc-client"] } -zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.43" } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.43" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44" } +zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.44" } +zebra-network = { path = "../zebra-network", version = "1.0.0-beta.44" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.44", features = ["rpc-client"] } +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.44" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.44" } # Required for crates.io publishing, but it's only used in tests -zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.43", optional = true } +zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.44", optional = true } abscissa_core = "0.7.0" clap = { version = "4.5.23", features = ["cargo"] } @@ -279,13 +279,13 @@ proptest-derive = "0.5.0" # enable span traces and track caller in tests color-eyre = { version = "0.6.3" } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.43", features = ["proptest-impl"] } -zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.43", features = ["proptest-impl"] } -zebra-network = { path = "../zebra-network", version = "1.0.0-beta.43", features = ["proptest-impl"] } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.43", features = ["proptest-impl"] } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.44", features = ["proptest-impl"] } +zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.44", features = ["proptest-impl"] } +zebra-network = { path = "../zebra-network", version = "1.0.0-beta.44", features = ["proptest-impl"] } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.44", features = ["proptest-impl"] } -zebra-test = { path = "../zebra-test", version = "1.0.0-beta.43" } -zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.10" } +zebra-test = { path = "../zebra-test", version = "1.0.0-beta.44" } +zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.11" } # Used by the checkpoint generation tests via the zebra-checkpoints feature # (the binaries in this crate won't be built unless their features are enabled). @@ -296,7 +296,7 @@ zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.10" } # When `-Z bindeps` is stabilised, enable this binary dependency instead: # https://github.com/rust-lang/cargo/issues/9096 # zebra-utils { path = "../zebra-utils", artifact = "bin:zebra-checkpoints" } -zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.43" } +zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.44" } [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }