ZcashFoundation / zebra

Zcash - Financial Privacy in Rust 🦓
https://zfnd.org/zebra/
Apache License 2.0
413 stars 106 forks source link

Release Zebra (`v2.0.0-rc.0`) #8927

Closed oxarbitrage closed 1 month ago

oxarbitrage commented 1 month ago

name: 'Release Checklist Template' about: 'Checklist to create and publish a Zebra release' title: 'Release Zebra (version)' labels: 'A-release, C-trivial, P-Critical :ambulance:' assignees: ''


Prepare for the Release

Summarise Release Changes

These steps can be done a few days before the release, in the same PR:

Change Log

Important: Any merge into main deletes any edits to the draft changelog. Once you are ready to tag a release, copy the draft changelog into CHANGELOG.md.

We use the Release Drafter workflow to automatically create a draft changelog. We follow the Keep a Changelog format.

To create the final change log:

README

README updates can be skipped for urgent releases.

Update the README to:

You can use a command like:

fastmod --fixed-strings '1.58' '1.65'

Create the Release PR

Update Versions and End of Support

Update Zebra Version

Choose a Release Level

Zebra follows semantic versioning. Semantic versions look like: MAJOR.MINOR.PATCH[-TAG.PRE-RELEASE]

Choose a release level for zebrad. Release levels are based on user-visible changes from the changelog:

Zebra's Rust API doesn't have any support or stability guarantees, so we keep all the zebra-* and tower-* crates on a beta pre-release version.

Update Crate Versions

If you're publishing crates for the first time, log in to crates.io, and make sure you're a member of owners group.

Check that the release will work:

# Update everything except for alpha crates and zebrad:
cargo release version --verbose --execute --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 --allow-branch '*' --package zebra-scan 0.1.0-alpha.4
cargo release version --verbose --execute --allow-branch '*' --package zebra-grpc 0.1.0-alpha.2
# Update zebrad:
cargo release version --verbose --execute --allow-branch '*' --package zebrad patch # [ major | minor | patch ]
# Continue with the release process:
cargo release replace --verbose --execute --allow-branch '*' --package zebrad
cargo release commit --verbose --execute --allow-branch '*'

Crate publishing is automatically checked in CI using "dry run" mode, however due to a bug in cargo-release we need to pass exact versions to the alpha crates:

Update End of Support

The end of support height is calculated from the current blockchain height:

Optional: calculate the release tagging height - Add `1152` blocks for each day until the release - For example, if the release is in 3 days, add `1152 * 3` to the current Mainnet block height

Update the Release PR

Publish the Zebra Release

Create the GitHub Pre-Release

Test the Pre-Release

Publish Release

Publish Crates

Publish Docker Images

Release Failures

If building or running fails after tagging:

Tag a new release, following these instructions... 1. Fix the bug that caused the failure 2. Start a new `patch` release 3. Skip the **Release Preparation**, and start at the **Release Changes** step 4. Update `CHANGELOG.md` with details about the fix 5. Follow the release checklist for the new Zebra version
oxarbitrage commented 1 month ago

The following pull requests were not included in the changelog:

Trivial TODO: put this in a PR comment, not the CHANGELOG