From 26dc8a6c80c2c9a0dd8a010a8253d71761f50edb Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 09:11:05 +1000 Subject: [PATCH 01/28] Activate production features on docs.rs --- zebrad/Cargo.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index d104d4498ad..0d87a21536c 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -35,6 +35,21 @@ pre-release-replacements = [ {file="../book/src/user/docker.md", search="--branch [a-z0-9\\.-]+", replace="--branch {{version}}"}, ] +[package.metadata.docs.rs] + +# Publish Zebra's supported production and developer features on docs.rs. +# (Except for the log level features, because there are a lot of them.) +# +# +features = [ + "default-release-binaries", + "filter-reload", + "flamegraph", + "journald", + "prometheus", + "sentry", +] + [features] # In release builds, don't compile debug logging code, to improve performance. default = ["release_max_level_info"] From 0be237272a87c226c32c2e962ff7e0bfe87e9e02 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 09:11:46 +1000 Subject: [PATCH 02/28] Make version requirements more flexible to work around unpublished versions --- tower-batch-control/Cargo.toml | 3 ++- zebra-consensus/Cargo.toml | 32 +++++++++++++++++++++++++------- zebra-utils/Cargo.toml | 8 +++++--- zebrad/Cargo.toml | 17 ++++++++++------- 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/tower-batch-control/Cargo.toml b/tower-batch-control/Cargo.toml index a16ac617615..d099b14a0f1 100644 --- a/tower-batch-control/Cargo.toml +++ b/tower-batch-control/Cargo.toml @@ -43,8 +43,9 @@ rand = "0.8.5" tokio = { version = "1.29.1", features = ["full", "tracing", "test-util"] } tokio-test = "0.4.2" -tower-fallback = { path = "../tower-fallback/" } tower-test = "0.4.0" +tower-fallback = { path = "../tower-fallback/" } + zebra-consensus = { path = "../zebra-consensus/" } zebra-test = { path = "../zebra-test/" } diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index 6ea989ef321..29406f29d90 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -62,13 +62,31 @@ orchard = "0.4.0" zcash_proofs = { version = "0.11.0", features = ["local-prover", "multicore", "download-params"] } -tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.3" } -tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.3" } - -zebra-script = { path = "../zebra-script", version = "1.0.0-beta.27" } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.27" } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.27" } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.27" } +# Work around a `cargo` dependency resolution bug which causes publish dry run errors like: +# > error: failed to prepare local package for uploading +# > no matching package named `tower-batch-control` found +# > location searched: registry `crates-io` +# > required by package `zebra-consensus v1.0.0-beta.27 (/home/dev/zebra/zebra-consensus)` +# +# These errors happen because the crate isn't published yet. Normally, `cargo` would ignore missing +# crate versions that it's just about to publish. But Zebra triggers a bug in that code. +# +# To work around the bug, we allow a dependency on an earlier version of the crate. After the +# release, the correct version will be enforced by the Cargo.lock, path dependency, or `cargo`'s +# default "latest version" rule. +# +# If the earlier version is too old to compile, change it to the latest released version. +# +# +# +# By default, version requirements are "^" requirements, which means "any later compatible version". +tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.2" } +tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.2" } + +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.26" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.26" } +zebra-script = { path = "../zebra-script", version = "1.0.0-beta.26" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.26" } # prod feature progress-bar howudoin = { version = "0.1.2", optional = true } diff --git a/zebra-utils/Cargo.toml b/zebra-utils/Cargo.toml index 7ecbd146cc3..e0763a6f1a2 100644 --- a/zebra-utils/Cargo.toml +++ b/zebra-utils/Cargo.toml @@ -74,11 +74,13 @@ tracing-error = "0.2.0" tracing-subscriber = "0.3.17" thiserror = "1.0.40" -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.27" } -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.27" } +# Work around a `cargo` dependency resolution bug by depending on an older Zebra version. +# See zebra-consensus/Cargo.toml for details. +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.26" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.26" } # These crates are needed for the block-template-to-proposal binary -zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.27", optional = true } +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.26", optional = true } # These crates are needed for the zebra-checkpoints binary itertools = { version = "0.11.0", optional = true } diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 0d87a21536c..e4ac5c77f45 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -143,14 +143,17 @@ test_sync_past_mandatory_checkpoint_mainnet = [] test_sync_past_mandatory_checkpoint_testnet = [] [dependencies] -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.27" } -zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.27" } -zebra-network = { path = "../zebra-network", version = "1.0.0-beta.27" } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.27" } -zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.27" } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.27" } +# Work around a `cargo` dependency resolution bug by depending on an older Zebra version. +# See zebra-consensus/Cargo.toml for details. +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.26" } +zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.26" } +zebra-network = { path = "../zebra-network", version = "1.0.0-beta.26" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.26" } +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.26" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.26" } + # Required for crates.io publishing, but it's only used in tests -zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.27", optional = true } +zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.26", optional = true } abscissa_core = "0.7.0" clap = { version = "4.3.8", features = ["cargo"] } From 1090800fa1b8dbc83004e0dd80e0b3b95b27384a Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 10:11:54 +1000 Subject: [PATCH 03/28] Remove a redundant feature requirement that causes publishing issues --- zebrad/Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index e4ac5c77f45..65a1bfb0782 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -70,7 +70,6 @@ getblocktemplate-rpcs = [ elasticsearch = [ "zebra-state/elasticsearch", - "zebra-chain/elasticsearch", ] sentry = ["dep:sentry"] From 423fab3c1fce57084ab3d148faef3b7247b8a5df Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 10:27:27 +1000 Subject: [PATCH 04/28] fix release auto-replacement format --- zebrad/Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 65a1bfb0782..263d3739222 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -30,9 +30,9 @@ default-run = "zebrad" # `cargo release` settings [package.metadata.release] pre-release-replacements = [ - {file="../book/src/user/install.md", search="git checkout [a-z0-9\\.-]+", replace="git checkout {{version}}"}, - {file="../book/src/user/install.md", search="--tag [a-z0-9\\.-]+", replace="--tag {{version}}"}, - {file="../book/src/user/docker.md", search="--branch [a-z0-9\\.-]+", replace="--branch {{version}}"}, + {file="../book/src/user/install.md", search="git checkout [a-z0-9\\.-]+", replace="git checkout v{{version}}"}, + {file="../book/src/user/install.md", search="--tag [a-z0-9\\.-]+", replace="--tag v{{version}}"}, + {file="../book/src/user/docker.md", search="--branch [a-z0-9\\.-]+", replace="--branch v{{version}}"}, ] [package.metadata.docs.rs] From 491a39096cb9caf37a986a72e985b84c192721e4 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 10:27:43 +1000 Subject: [PATCH 05/28] cargo release replace --verbose --execute --package zebrad --- book/src/user/docker.md | 2 +- book/src/user/install.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/book/src/user/docker.md b/book/src/user/docker.md index e53c51aa6c3..462d5745d8a 100644 --- a/book/src/user/docker.md +++ b/book/src/user/docker.md @@ -17,7 +17,7 @@ docker run --detach zfnd/zebra:latest ### Build it locally ```shell -git clone --depth 1 --branch v1.0.0 https://github.com/ZcashFoundation/zebra.git +git clone --depth 1 --branch v1.0.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 c93790920ef..b70eed17f2b 100644 --- a/book/src/user/install.md +++ b/book/src/user/install.md @@ -20,7 +20,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 v1.0.0 +git checkout v1.0.1 ``` 3. Build and Run `zebrad` @@ -33,7 +33,7 @@ target/release/zebrad start ### Compiling from git using cargo install ```sh -cargo install --git https://github.com/ZcashFoundation/zebra --tag v1.0.0 zebrad +cargo install --git https://github.com/ZcashFoundation/zebra --tag v1.0.1 zebrad ``` ### Compiling on ARM From 04d8a33f912297e76e54ad809255fe7e3885c88b Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 10:47:03 +1000 Subject: [PATCH 06/28] Add a missing 1.0.1 changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 572babc2d72..202d00fc7b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ These platforms are no longer supported by the Zebra team: - Close new peer connections from the same IP and port, rather than replacing the older connection ([#6980](https://github.com/ZcashFoundation/zebra/pull/6980)) - Reduce inbound service overloads and add a timeout ([#6950](https://github.com/ZcashFoundation/zebra/pull/6950)) - Stop panicking when handling inbound connection handshakes ([#6984](https://github.com/ZcashFoundation/zebra/pull/6984)) +- Stop panicking on shutdown in the syncer and network ([#7104](https://github.com/ZcashFoundation/zebra/pull/7104)) ### Added From 7ab732442786828bb375cea240b89b7089167653 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 30 Jun 2023 11:48:57 +1000 Subject: [PATCH 07/28] Fix incorrect commands in the release checklist --- .../release-checklist.md | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index 71090a99407..155a1ab5279 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -55,6 +55,7 @@ fastmod --fixed-strings '1.58' '1.65' - [ ] Create a release PR by adding `&template=release-checklist.md` to the comparing url ([Example](https://github.com/ZcashFoundation/zebra/compare/bump-v1.0.0?expand=1&template=release-checklist.md)). - [ ] Freeze the [`batched` queue](https://dashboard.mergify.com/github/ZcashFoundation/repo/zebra/queues) using Mergify. - [ ] Mark all the release PRs as `Critical` priority, so they go in the `urgent` Mergify queue. +- [ ] Mark all non-release PRs with `do-not-merge`, because Mergify checks approved PRs against every commit, even when a queue is frozen. # Update Versions and End of Support @@ -76,19 +77,24 @@ Zebra's Rust API doesn't have any support or stability guarantees, so we keep al
-If you're publishing crates for the first time: +If you're publishing crates for the first time, click this triangle for extra steps - [ ] Install `cargo-release`: `cargo install cargo-release` - [ ] Make sure you are an owner of the crate or [a member of the Zebra crates.io `owners` group on GitHub](https://github.com/orgs/ZcashFoundation/teams/owners)
-- [ ] Update crate versions and do a release dry-run - - [ ] `cargo clean` (optional) - - [ ] `cargo release version --verbose --execute --workspace --exclude zebrad beta` - - [ ] `cargo release version --verbose --execute --package zebrad [ major | minor | patch ]` - - [ ] `cargo release publish --verbose --dry-run --workspace` -- [ ] Commit the version changes to your release PR branch using `git`: `cargo release commit --verbose --execute --workspace` +Check that the release will work: +- [ ] Update crate versions, commit the changes to the release branch, and do a release dry-run: + +```sh +cargo clean # optional +cargo release version --verbose --execute --workspace --exclude zebrad beta +cargo release version --verbose --execute --package zebrad patch # [ major | minor | patch ] +cargo release replace --verbose --execute --package zebrad +cargo release commit --verbose --execute +cargo release publish --verbose --dry-run --workspace +``` ## Update End of Support From d868089bb850f9d2cff9bfcf0839b09342241157 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 11:40:06 +1000 Subject: [PATCH 08/28] Check the crates.io release script in CI, to avoid release failures --- .github/workflows/release-crates-io.patch.yml | 28 +++++ .github/workflows/release-crates-io.yml | 114 ++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 .github/workflows/release-crates-io.patch.yml create mode 100644 .github/workflows/release-crates-io.yml diff --git a/.github/workflows/release-crates-io.patch.yml b/.github/workflows/release-crates-io.patch.yml new file mode 100644 index 00000000000..f946ea0d617 --- /dev/null +++ b/.github/workflows/release-crates-io.patch.yml @@ -0,0 +1,28 @@ +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 new file mode 100644 index 00000000000..adb37c4a8d8 --- /dev/null +++ b/.github/workflows/release-crates-io.yml @@ -0,0 +1,114 @@ +# 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.3.0 + + - name: Checkout git repository + uses: actions/checkout@v3.5.3 + with: + persist-credentials: false + + - name: Inject slug/short variables + uses: rlespinasse/github-slug-action@v4 + 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@v2.1.0 + with: + crate: cargo-release + + # Make sure Zebra can be released! + # + # These steps should be kept up to date with the release checklist. + # + # TODO: move these steps into a script which is run in the release checklist and CI + - name: Crate release dry run + run: | + set -ex + cargo release version --verbose --execute --workspace --exclude zebrad beta + cargo release version --verbose --execute --package zebrad patch + cargo release replace --verbose --execute --package zebrad + cargo release commit --verbose --execute + cargo release publish --verbose --dry-run --workspace + + + # 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: From cce23ec0b0b19f045c82d444c047338fe9a0ffb3 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 11:54:49 +1000 Subject: [PATCH 09/28] Fix release date in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 202d00fc7b7..4240c6514ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org). -## [Zebra 1.0.1](https://github.com/ZcashFoundation/zebra/releases/tag/v1.0.1) - 2023-06-29 +## [Zebra 1.0.1](https://github.com/ZcashFoundation/zebra/releases/tag/v1.0.1) - 2023-07-03 Zebra's first patch release fixes multiple peer connection security issues and panics. It also significantly reduces Zebra's CPU usage. We recommend that all users upgrade to Zebra 1.0.1 or later. From 6044f93f19f8f5b247a272c449d12a4fe241262a Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 12:25:58 +1000 Subject: [PATCH 10/28] Fix workflow typo --- .github/workflows/release-crates-io.patch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-crates-io.patch.yml b/.github/workflows/release-crates-io.patch.yml index f946ea0d617..e8f18d6c755 100644 --- a/.github/workflows/release-crates-io.patch.yml +++ b/.github/workflows/release-crates-io.patch.yml @@ -21,7 +21,7 @@ on: jobs: - check-release + check-release: name: Check crate release dry run runs-on: ubuntu-latest steps: From 7685433662243dbd4a6d45e5c521c25785d41000 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 12:28:37 +1000 Subject: [PATCH 11/28] Add --no-confirm to the workflow --- .github/workflows/release-crates-io.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index adb37c4a8d8..f65a1f23e39 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -97,10 +97,10 @@ jobs: - name: Crate release dry run run: | set -ex - cargo release version --verbose --execute --workspace --exclude zebrad beta - cargo release version --verbose --execute --package zebrad patch - cargo release replace --verbose --execute --package zebrad - cargo release commit --verbose --execute + cargo release version --verbose --execute --no-confirm --workspace --exclude zebrad beta + cargo release version --verbose --execute --no-confirm --package zebrad patch + cargo release replace --verbose --execute --no-confirm --package zebrad + cargo release commit --verbose --execute --no-confirm cargo release publish --verbose --dry-run --workspace From 23488afebfa4fb8d42b433861e1f6816ca6d2359 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 12:40:33 +1000 Subject: [PATCH 12/28] Fix outdated version in release check command --- .github/PULL_REQUEST_TEMPLATE/release-checklist.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index 155a1ab5279..faa4ee281a0 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -137,7 +137,6 @@ The end of support height is calculated from the current blockchain height: ## Test the Pre-Release - [ ] Wait until the [Docker binaries have been built on `main`](https://github.com/ZcashFoundation/zebra/actions/workflows/continous-integration-docker.yml), and the quick tests have passed. - (You can ignore the full sync and `lightwalletd` tests, because they take about a day to run.) - [ ] Wait until the [pre-release deployment machines have successfully launched](https://github.com/ZcashFoundation/zebra/actions/workflows/continous-delivery.yml) ## Publish Release @@ -150,7 +149,7 @@ The end of support height is calculated from the current blockchain height: - [ ] Run `cargo clean` in the zebra repo (optional) - [ ] Publish the crates to crates.io: `cargo release publish --verbose --workspace --execute` - [ ] Check that Zebra can be installed from `crates.io`: - `cargo install --locked --force --version 1.0.0 zebrad && ~/.cargo/bin/zebrad` + `cargo install --locked --force --version 1.minor.patch zebrad && ~/.cargo/bin/zebrad` and put the output in a comment on the PR. ## Publish Docker Images From 98b02556b1a2e9b6cdbf13c251088f5725db639a Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 13:08:15 +1000 Subject: [PATCH 13/28] After the release, add a "remove do-not-merge" step --- .github/PULL_REQUEST_TEMPLATE/release-checklist.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index faa4ee281a0..bf5ed687957 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -155,6 +155,7 @@ The end of support height is calculated from the current blockchain height: ## Publish Docker Images - [ ] Wait for the [the Docker images to be published successfully](https://github.com/ZcashFoundation/zebra/actions/workflows/release-binaries.yml). - [ ] Un-freeze the [`batched` queue](https://dashboard.mergify.com/github/ZcashFoundation/repo/zebra/queues) using Mergify. +- [ ] Remove `do-not-merge` from the PRs you added it to ## Release Failures From 158f72be3293a6a348a870a3242d40529d4e9487 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 3 Jul 2023 15:06:50 +1000 Subject: [PATCH 14/28] Set git identity before committing --- .github/workflows/release-crates-io.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index f65a1f23e39..1b4a6ebda90 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -100,6 +100,8 @@ jobs: cargo release version --verbose --execute --no-confirm --workspace --exclude zebrad beta cargo release version --verbose --execute --no-confirm --package zebrad patch cargo release replace --verbose --execute --no-confirm --package zebrad + git config --global user.email "release-tests-no-reply@zfnd.org" + git config --global user.name "Automated Release Test" cargo release commit --verbose --execute --no-confirm cargo release publish --verbose --dry-run --workspace From 06ae8c225e8974e9e05ac8c31f1c1f70f12b9313 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 06:29:15 +1000 Subject: [PATCH 15/28] Don't overwrite tweaked versions on upgrade --- .github/PULL_REQUEST_TEMPLATE/release-checklist.md | 5 +++-- .github/workflows/release-crates-io.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index bf5ed687957..dd2ee34d845 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -89,8 +89,9 @@ Check that the release will work: ```sh cargo clean # optional -cargo release version --verbose --execute --workspace --exclude zebrad beta -cargo release version --verbose --execute --package zebrad patch # [ major | minor | patch ] +cargo release version --verbose --execute --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta +cargo release version --verbose --execute --dependent-version fix --package zebra-consensus --package zebra-utils beta +cargo release version --verbose --execute --dependent-version fix --package zebrad patch # [ major | minor | patch ] cargo release replace --verbose --execute --package zebrad cargo release commit --verbose --execute cargo release publish --verbose --dry-run --workspace diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index 1b4a6ebda90..7e6dd487d46 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -97,8 +97,9 @@ jobs: - name: Crate release dry run run: | set -ex - cargo release version --verbose --execute --no-confirm --workspace --exclude zebrad beta - cargo release version --verbose --execute --no-confirm --package zebrad patch + cargo release version --verbose --execute --no-confirm --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta + cargo release version --verbose --execute --no-confirm --dependent-version fix --package zebra-consensus --package zebra-utils beta + cargo release version --verbose --execute --no-confirm --dependent-version fix --package zebrad patch cargo release replace --verbose --execute --no-confirm --package zebrad git config --global user.email "release-tests-no-reply@zfnd.org" git config --global user.name "Automated Release Test" From 7dcaf9606c8a3bea3b0d792268c47022589de8ad Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 09:12:01 +1000 Subject: [PATCH 16/28] cargo release version doesn't support --dependent-version --- .github/workflows/release-crates-io.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index 7e6dd487d46..e3431730fd1 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -97,12 +97,12 @@ jobs: - name: Crate release dry run run: | set -ex - cargo release version --verbose --execute --no-confirm --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta - cargo release version --verbose --execute --no-confirm --dependent-version fix --package zebra-consensus --package zebra-utils beta - cargo release version --verbose --execute --no-confirm --dependent-version fix --package zebrad patch - cargo release replace --verbose --execute --no-confirm --package zebrad git config --global user.email "release-tests-no-reply@zfnd.org" git config --global user.name "Automated Release Test" + cargo release version --verbose --execute --no-confirm --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta + cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --dependent-version fix --package zebra-consensus --package zebra-utils beta + cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --dependent-version fix --package zebrad patch + cargo release replace --verbose --execute --no-confirm --package zebrad cargo release commit --verbose --execute --no-confirm cargo release publish --verbose --dry-run --workspace From bd596c54ca77b7de5181c7b65a5b48f4c1947c5b Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 09:13:03 +1000 Subject: [PATCH 17/28] Update the same commands in the release checklist --- .github/PULL_REQUEST_TEMPLATE/release-checklist.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index dd2ee34d845..bc49788c38e 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -90,8 +90,8 @@ Check that the release will work: ```sh cargo clean # optional cargo release version --verbose --execute --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta -cargo release version --verbose --execute --dependent-version fix --package zebra-consensus --package zebra-utils beta -cargo release version --verbose --execute --dependent-version fix --package zebrad patch # [ major | minor | patch ] +cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --dependent-version fix --package zebra-consensus --package zebra-utils beta +cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --dependent-version fix --package zebrad patch # [ major | minor | patch ] cargo release replace --verbose --execute --package zebrad cargo release commit --verbose --execute cargo release publish --verbose --dry-run --workspace From 110064eef084ddf79c0b03d1a47c3d64a71749dc Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 09:17:03 +1000 Subject: [PATCH 18/28] Commit to git after each change --- .github/workflows/release-crates-io.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index e3431730fd1..7879a3f7b75 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -100,6 +100,7 @@ jobs: git config --global user.email "release-tests-no-reply@zfnd.org" git config --global user.name "Automated Release Test" cargo release version --verbose --execute --no-confirm --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta + cargo release commit --verbose --execute --no-confirm cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --dependent-version fix --package zebra-consensus --package zebra-utils beta cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --dependent-version fix --package zebrad patch cargo release replace --verbose --execute --no-confirm --package zebrad From caade18298edd5a3b210fe80c1ca2b4fbdfe6130 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 09:17:47 +1000 Subject: [PATCH 19/28] And in the checklist --- .github/PULL_REQUEST_TEMPLATE/release-checklist.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index bc49788c38e..50034c321c9 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -90,6 +90,7 @@ Check that the release will work: ```sh cargo clean # optional cargo release version --verbose --execute --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta +cargo release commit --verbose --execute cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --dependent-version fix --package zebra-consensus --package zebra-utils beta cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --dependent-version fix --package zebrad patch # [ major | minor | patch ] cargo release replace --verbose --execute --package zebrad From e2c3c071b1955e53a660bd97f2dc1fabeec92a0e Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 09:20:31 +1000 Subject: [PATCH 20/28] Add cargo release config --- release.toml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 release.toml diff --git a/release.toml b/release.toml new file mode 100644 index 00000000000..0cbcdd51772 --- /dev/null +++ b/release.toml @@ -0,0 +1,20 @@ +# Only allow releases from the main branch +allow-branch = [ 'main' ] + +# TODO: +# configure all zebra-* crates with a shared version, +# and all tower-* crates with a different one: +# https://github.com/crate-ci/cargo-release/blob/master/docs/reference.md#config-fields +#shared-version = "TODO named groups" + +# Verify releases with release features +# +# TODO: add this feature to all crates +#enable-features = [ 'default-release-binaries' ] + +# Don't do a git push or tag +push = false +tag = false + +# Owners for new crates +owners = [ 'dconnolly', 'teor2345', 'zcashfoundation/owners' ] From 3e39e5d6db15b3ba788cf3ac8f5ef683f1c1b28a Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 09:33:42 +1000 Subject: [PATCH 21/28] In CI, allow any branch and provide a fake previous tag name --- .github/workflows/release-crates-io.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index 7879a3f7b75..42dd5fc04e3 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -99,13 +99,13 @@ jobs: set -ex git config --global user.email "release-tests-no-reply@zfnd.org" git config --global user.name "Automated Release Test" - cargo release version --verbose --execute --no-confirm --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta - cargo release commit --verbose --execute --no-confirm - cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --dependent-version fix --package zebra-consensus --package zebra-utils beta - cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --dependent-version fix --package zebrad patch - cargo release replace --verbose --execute --no-confirm --package zebrad - cargo release commit --verbose --execute --no-confirm - cargo release publish --verbose --dry-run --workspace + cargo release version --verbose --execute --no-confirm --allow-branch '*' --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta + cargo release commit --verbose --execute --no-confirm --allow-branch '*' + cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --allow-branch '*' --prev-tag-name HEAD --dependent-version fix --package zebra-consensus --package zebra-utils beta + cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --allow-branch '*' --prev-tag-name HEAD --dependent-version fix --package zebrad patch + cargo release replace --verbose --execute --no-confirm --allow-branch '*' --package zebrad + cargo release commit --verbose --execute --no-confirm --allow-branch '*' + cargo release publish --verbose --dry-run --allow-branch '*' --workspace # TODO: actually do the release here From 19c9cee6d985bbe8a65fb00a56fba5cff84c03b4 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 09:40:19 +1000 Subject: [PATCH 22/28] Remove redundant `cargo release commit` --- .github/PULL_REQUEST_TEMPLATE/release-checklist.md | 1 - .github/workflows/release-crates-io.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index 50034c321c9..3dff172b33d 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -94,7 +94,6 @@ cargo release commit --verbose --execute cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --dependent-version fix --package zebra-consensus --package zebra-utils beta cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --dependent-version fix --package zebrad patch # [ major | minor | patch ] cargo release replace --verbose --execute --package zebrad -cargo release commit --verbose --execute cargo release publish --verbose --dry-run --workspace ``` diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index 42dd5fc04e3..840fac99959 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -104,7 +104,6 @@ jobs: cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --allow-branch '*' --prev-tag-name HEAD --dependent-version fix --package zebra-consensus --package zebra-utils beta cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --allow-branch '*' --prev-tag-name HEAD --dependent-version fix --package zebrad patch cargo release replace --verbose --execute --no-confirm --allow-branch '*' --package zebrad - cargo release commit --verbose --execute --no-confirm --allow-branch '*' cargo release publish --verbose --dry-run --allow-branch '*' --workspace From 499cf1b4fb601ac2b4e15be7ad6e11876ae76e88 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 12:07:16 +1000 Subject: [PATCH 23/28] Use a simpler release version process --- .github/PULL_REQUEST_TEMPLATE/release-checklist.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index 3dff172b33d..3a5bfaff985 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -89,14 +89,13 @@ Check that the release will work: ```sh cargo clean # optional -cargo release version --verbose --execute --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta -cargo release commit --verbose --execute -cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --dependent-version fix --package zebra-consensus --package zebra-utils beta -cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --dependent-version fix --package zebrad patch # [ major | minor | patch ] +cargo release version --verbose --execute --workspace --exclude zebrad beta +cargo release version --verbose --execute --package zebrad patch # [ major | minor | patch ] cargo release replace --verbose --execute --package zebrad -cargo release publish --verbose --dry-run --workspace ``` +Crate publishing is [automatically checked in CI](https://github.com/ZcashFoundation/zebra/actions/workflows/release-crates-io.yml) using "dry run" mode. + ## Update End of Support The end of support height is calculated from the current blockchain height: From e4e35c7b051bd798a56ef1e05307d442e861c64a Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 12:07:35 +1000 Subject: [PATCH 24/28] Start simplifying the release dry run in CI --- .github/workflows/release-crates-io.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index 840fac99959..1807a17ba62 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -99,11 +99,15 @@ jobs: set -ex git config --global user.email "release-tests-no-reply@zfnd.org" git config --global user.name "Automated Release Test" - cargo release version --verbose --execute --no-confirm --allow-branch '*' --workspace --exclude zebra-consensus --exclude zebra-utils --exclude zebrad beta - cargo release commit --verbose --execute --no-confirm --allow-branch '*' - cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --allow-branch '*' --prev-tag-name HEAD --dependent-version fix --package zebra-consensus --package zebra-utils beta - cargo release --no-publish --no-verify --no-tag --no-push --verbose --execute --no-confirm --allow-branch '*' --prev-tag-name HEAD --dependent-version fix --package zebrad patch - cargo release replace --verbose --execute --no-confirm --allow-branch '*' --package zebrad + # This script must be the same as: + # https://github.com/ZcashFoundation/zebra/blob/main/.github/PULL_REQUEST_TEMPLATE/release-checklist.md#update-crate-versions + cargo release version --verbose --execute --workspace --exclude zebrad beta + cargo release version --verbose --execute --package zebrad patch + cargo release replace --verbose --execute --package zebrad + # Workaround unpublished dependency version errors + # https://github.com/crate-ci/cargo-release/issues/691 + + # Check the release will work using a dry run cargo release publish --verbose --dry-run --allow-branch '*' --workspace From 5806ac4fa1760840df749ecb6403b87eba59d0e6 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 12:32:23 +1000 Subject: [PATCH 25/28] Fix a cargo dependency lint --- zebra-state/Cargo.toml | 2 +- zebrad/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index 210d89326ca..58697822711 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -55,7 +55,7 @@ metrics = "0.21.1" mset = "0.1.1" regex = "1.8.4" rlimit = "0.9.1" -rocksdb = { version = "0.21.0", default_features = false, features = ["lz4"] } +rocksdb = { version = "0.21.0", default-features = false, features = ["lz4"] } semver = "1.0.17" serde = { version = "1.0.164", features = ["serde_derive"] } tempfile = "3.5.0" diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 263d3739222..f6806b47f57 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -170,7 +170,7 @@ tokio = { version = "1.29.1", features = ["time", "rt-multi-thread", "macros", " tower = { version = "0.4.13", features = ["hedge", "limit"] } pin-project = "1.1.0" -color-eyre = { version = "0.6.2", default_features = false, features = ["issue-url"] } +color-eyre = { version = "0.6.2", default-features = false, features = ["issue-url"] } # This is a transitive dependency via color-eyre. # Enable a feature that makes tinyvec compile much faster. tinyvec = { version = "1.6.0", features = ["rustc_1_55"] } From c2f0f86f01008a2bb8b4eb405a73e8f99b9dae8a Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 12:39:41 +1000 Subject: [PATCH 26/28] just skip the failing crates for now --- .github/workflows/release-crates-io.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-crates-io.yml b/.github/workflows/release-crates-io.yml index 1807a17ba62..350bf4d4bc1 100644 --- a/.github/workflows/release-crates-io.yml +++ b/.github/workflows/release-crates-io.yml @@ -101,14 +101,18 @@ jobs: git config --global user.name "Automated Release Test" # This script must be the same as: # https://github.com/ZcashFoundation/zebra/blob/main/.github/PULL_REQUEST_TEMPLATE/release-checklist.md#update-crate-versions - cargo release version --verbose --execute --workspace --exclude zebrad beta - cargo release version --verbose --execute --package zebrad patch - cargo release replace --verbose --execute --package zebrad - # Workaround unpublished dependency version errors - # https://github.com/crate-ci/cargo-release/issues/691 - + # with an extra `--no-confirm` argument for non-interactive testing. + cargo release version --verbose --execute --no-confirm --allow-branch '*' --workspace --exclude zebrad beta + cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebrad patch + cargo release replace --verbose --execute --no-confirm --allow-branch '*' --package zebrad + cargo release commit --verbose --execute --no-confirm --allow-branch '*' # Check the release will work using a dry run - cargo release publish --verbose --dry-run --allow-branch '*' --workspace + # + # Workaround unpublished dependency version errors by skipping those crates: + # 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 # TODO: actually do the release here From 0a27b54ace5fe91bbfa78cf46cc32a8e38d049bc Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 12:44:22 +1000 Subject: [PATCH 27/28] Fix the release checklist to match CI --- .github/PULL_REQUEST_TEMPLATE/release-checklist.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index 3a5bfaff985..b60584b88ae 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -88,10 +88,10 @@ Check that the release will work: - [ ] Update crate versions, commit the changes to the release branch, and do a release dry-run: ```sh -cargo clean # optional -cargo release version --verbose --execute --workspace --exclude zebrad beta -cargo release version --verbose --execute --package zebrad patch # [ major | minor | patch ] -cargo release replace --verbose --execute --package zebrad +cargo release version --verbose --execute --allow-branch '*' --workspace --exclude zebrad beta +cargo release version --verbose --execute --allow-branch '*' --package zebrad patch # [ major | minor | patch ] +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. From f6329b4823d5b4722669d1ded856d179e81dd639 Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 4 Jul 2023 12:47:28 +1000 Subject: [PATCH 28/28] Use the latest versions of all Zebra dependencies --- tower-batch-control/Cargo.toml | 3 +-- zebra-consensus/Cargo.toml | 32 +++++++------------------------- zebra-utils/Cargo.toml | 8 +++----- zebrad/Cargo.toml | 16 +++++++--------- 4 files changed, 18 insertions(+), 41 deletions(-) diff --git a/tower-batch-control/Cargo.toml b/tower-batch-control/Cargo.toml index d099b14a0f1..a16ac617615 100644 --- a/tower-batch-control/Cargo.toml +++ b/tower-batch-control/Cargo.toml @@ -43,9 +43,8 @@ rand = "0.8.5" tokio = { version = "1.29.1", features = ["full", "tracing", "test-util"] } tokio-test = "0.4.2" -tower-test = "0.4.0" - tower-fallback = { path = "../tower-fallback/" } +tower-test = "0.4.0" zebra-consensus = { path = "../zebra-consensus/" } zebra-test = { path = "../zebra-test/" } diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index 29406f29d90..6ea989ef321 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -62,31 +62,13 @@ orchard = "0.4.0" zcash_proofs = { version = "0.11.0", features = ["local-prover", "multicore", "download-params"] } -# Work around a `cargo` dependency resolution bug which causes publish dry run errors like: -# > error: failed to prepare local package for uploading -# > no matching package named `tower-batch-control` found -# > location searched: registry `crates-io` -# > required by package `zebra-consensus v1.0.0-beta.27 (/home/dev/zebra/zebra-consensus)` -# -# These errors happen because the crate isn't published yet. Normally, `cargo` would ignore missing -# crate versions that it's just about to publish. But Zebra triggers a bug in that code. -# -# To work around the bug, we allow a dependency on an earlier version of the crate. After the -# release, the correct version will be enforced by the Cargo.lock, path dependency, or `cargo`'s -# default "latest version" rule. -# -# If the earlier version is too old to compile, change it to the latest released version. -# -# -# -# By default, version requirements are "^" requirements, which means "any later compatible version". -tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.2" } -tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.2" } - -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.26" } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.26" } -zebra-script = { path = "../zebra-script", version = "1.0.0-beta.26" } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.26" } +tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.3" } +tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.3" } + +zebra-script = { path = "../zebra-script", version = "1.0.0-beta.27" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.27" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.27" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.27" } # prod feature progress-bar howudoin = { version = "0.1.2", optional = true } diff --git a/zebra-utils/Cargo.toml b/zebra-utils/Cargo.toml index e0763a6f1a2..7ecbd146cc3 100644 --- a/zebra-utils/Cargo.toml +++ b/zebra-utils/Cargo.toml @@ -74,13 +74,11 @@ tracing-error = "0.2.0" tracing-subscriber = "0.3.17" thiserror = "1.0.40" -# Work around a `cargo` dependency resolution bug by depending on an older Zebra version. -# See zebra-consensus/Cargo.toml for details. -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.26" } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.26" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.27" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.27" } # These crates are needed for the block-template-to-proposal binary -zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.26", optional = true } +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.27", optional = true } # These crates are needed for the zebra-checkpoints binary itertools = { version = "0.11.0", optional = true } diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index f6806b47f57..e65b3c44a46 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -142,17 +142,15 @@ test_sync_past_mandatory_checkpoint_mainnet = [] test_sync_past_mandatory_checkpoint_testnet = [] [dependencies] -# Work around a `cargo` dependency resolution bug by depending on an older Zebra version. -# See zebra-consensus/Cargo.toml for details. -zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.26" } -zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.26" } -zebra-network = { path = "../zebra-network", version = "1.0.0-beta.26" } -zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.26" } -zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.26" } -zebra-state = { path = "../zebra-state", version = "1.0.0-beta.26" } +zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.27" } +zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.27" } +zebra-network = { path = "../zebra-network", version = "1.0.0-beta.27" } +zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.27" } +zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.27" } +zebra-state = { path = "../zebra-state", version = "1.0.0-beta.27" } # Required for crates.io publishing, but it's only used in tests -zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.26", optional = true } +zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.27", optional = true } abscissa_core = "0.7.0" clap = { version = "4.3.8", features = ["cargo"] }