Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Release 1.0.0 ✨ #6877

Merged
merged 19 commits into from
Jun 14, 2023
Merged

✨ Release 1.0.0 ✨ #6877

merged 19 commits into from
Jun 14, 2023

Conversation

dconnolly
Copy link
Contributor

@dconnolly dconnolly commented Jun 8, 2023

Prepare for the Release

These release steps can be done a week before the release, in separate PRs.
They can be skipped for urgent releases.

Checkpoints

For performance and security, we want to update the Zebra checkpoints in every release.

Missed Dependency Updates

Sometimes dependabot misses some dependency updates, or we accidentally turned them off.

Here's how we make sure we got everything:

  • Run cargo update on the latest main branch, and keep the output
  • If needed, update deny.toml
  • Open a separate PR with the changes
  • Add the output of cargo update to that PR as a comment

Make Release Changes

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

  • Make sure the PRs with the new checkpoint hashes and missed dependencies are already merged

Versioning

How to Increment Versions

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

Choose a release level for zebrad based on the changes in the release that users will see:

  • mainnet network upgrades are major releases
  • new features, large changes, deprecations, and removals are minor releases
  • otherwise, it is a patch release

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:
  • Update crate versions and do a release dry-run:
    • cargo release version --verbose --workspace --exclude zebrad beta
    • cargo release version --verbose --package zebrad [ major | minor | patch ]
    • cargo release publish --verbose --workspace --dry-run
  • Commit the version changes to your release PR branch using git: cargo release commit --verbose --workspace

README

README updates can be skipped for urgent releases.

Update the README to:

  • Remove any "Known Issues" that have been fixed since the last release.
  • Update the "Build and Run Instructions" with any new dependencies.
    Check for changes in the Dockerfile since the last tag: git diff <previous-release-tag> docker/Dockerfile.
  • If Zebra has started using newer Rust language features or standard library APIs, update the known working Rust version in the README, book, and Cargo.tomls

You can use a command like:

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

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:

  • Copy the latest draft changelog into CHANGELOG.md (there can be multiple draft releases)
  • Delete any trivial changes
    • Put the list of deleted changelog entries in a PR comment to make reviewing easier
  • Combine duplicate changes
  • Edit change descriptions so they will make sense to Zebra users
  • Check the category for each change
    • Prefer the "Fix" category if you're not sure

Update End of Support

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

  • Find where the Zcash blockchain tip is now by using a Zcash explorer or other tool.
  • Replace ESTIMATED_RELEASE_HEIGHT in end_of_support.rs with the height you estimate the release will be tagged.
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

Create the Release PR

  • Push the version increments, the updated changelog, and the release constants into a branch,
    for example: bump-v1.0.0 - this needs to be different to the tag name
  • Create a release PR by adding &template=release-checklist.md to the comparing url (Example).
  • Freeze the batched queue using Mergify.
  • Mark all the release PRs as Critical priority, so they go in the urgent Mergify queue.

Release Zebra

Create the GitHub Pre-Release

  • Wait for all the release PRs to be merged
  • Create a new release using the draft release as a base, by clicking the Edit icon in the draft release
  • Set the tag name to the version tag,
    for example: v1.0.0
  • Set the release to target the main branch
  • Set the release title to Zebra followed by the version tag,
    for example: Zebra 1.0.0
  • Replace the prepopulated draft changelog in the release description with the final changelog you created;
    starting just after the title ## [Zebra ... of the current version being released,
    and ending just before the title of the previous release.
  • Mark the release as 'pre-release', until it has been built and tested
  • Publish the pre-release to GitHub using "Publish Release"
  • Delete all the draft releases from the list of releases

Test the Pre-Release

Publish Release

Publish Crates

  • Run cargo login
  • Publish the crates to crates.io: cargo release publish --verbose --workspace --execute
  • Check that Zebra can be installed from crates.io:
    cargo install --force --version 1.0.0 zebrad && ~/.cargo/bin/zebrad

Publish Docker Images

Release Failures

If building or running fails after tagging:

  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

Close #6692
Close #6149
Close #6939

@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Jun 8, 2023
@dconnolly dconnolly added A-docs Area: Documentation A-dependencies Area: Dependency file updates P-Critical 🚑 labels Jun 8, 2023
@dconnolly

This comment was marked as off-topic.

teor2345

This comment was marked as resolved.

teor2345

This comment was marked as duplicate.

@teor2345

This comment was marked as resolved.

@codecov

This comment was marked as off-topic.

@teor2345

This comment was marked as outdated.

teor2345

This comment was marked as off-topic.

@mpguerra mpguerra requested a review from upbqdn June 12, 2023 12:48
@teor2345

This comment was marked as resolved.

@dconnolly dconnolly changed the base branch from main to publish-tower-batch-control June 13, 2023 03:59
@dconnolly dconnolly force-pushed the publish-tower-batch-control branch from c55c71e to a003b9f Compare June 13, 2023 04:12
Base automatically changed from publish-tower-batch-control to main June 13, 2023 08:46
@dconnolly dconnolly marked this pull request as ready for review June 13, 2023 20:14
@dconnolly dconnolly requested review from a team as code owners June 13, 2023 20:14
@dconnolly dconnolly requested review from arya2 and teor2345 and removed request for a team June 13, 2023 20:14
@dconnolly
Copy link
Contributor Author

Release Drafter draft:


## [Zebra 1.0.0](https://github.com/ZcashFoundation/zebra/releases/tag/v1.0.0) - *TODO*: date

This release *TODO*: a summary of the significant user-visible changes in the release

### Breaking Changes

This release has the following breaking changes:
- *TODO*: Check the `Removed` section for any breaking changes
- *TODO*: Add a short description of the user impact of each breaking change, and any actions users need to take
  
- build(deps): update locked dependencies ([#6878](https://github.com/ZcashFoundation/zebra/pull/6878))

### Security

- fix(deploy): Stop doing another full sync on every main branch push ([#6895](https://github.com/ZcashFoundation/zebra/pull/6895))
- fix(net): Avoid potential concurrency bugs in outbound handshakes ([#6869](https://github.com/ZcashFoundation/zebra/pull/6869))

### Added

- add(doc): Add instructions for doing mass renames easily ([#6865](https://github.com/ZcashFoundation/zebra/pull/6865))
- docs(readme): add user support section ([#6873](https://github.com/ZcashFoundation/zebra/pull/6873))

### Changed

- add(doc): Add instructions for doing mass renames easily ([#6865](https://github.com/ZcashFoundation/zebra/pull/6865))
- build(deps): bump tj-actions/changed-files from 36.0.18 to 36.1.0 ([#6874](https://github.com/ZcashFoundation/zebra/pull/6874))
- change(cd): Deploy testnet instances for every main branch push and release ([#6842](https://github.com/ZcashFoundation/zebra/pull/6842))
- change(checkpoints): Update checkpoints for 1.0.0 ([#6884](https://github.com/ZcashFoundation/zebra/pull/6884))
- change(crates): Prepare for publishing crates to crates.io ([#6908](https://github.com/ZcashFoundation/zebra/pull/6908))
- change: Rename tower-batch to tower-batch-control ([#6907](https://github.com/ZcashFoundation/zebra/pull/6907))

### Fixed

- ci(tests): run network syncs on a weekly schedule ([#6920](https://github.com/ZcashFoundation/zebra/pull/6920))
- fix(app): Stop panicking at startup when parsing the app version - release blocker ([#6888](https://github.com/ZcashFoundation/zebra/pull/6888))
- fix(ci): Disable scheduled testnet full sync by default ([#6930](https://github.com/ZcashFoundation/zebra/pull/6930))
- fix(deploy): Stop doing another full sync on every main branch push ([#6895](https://github.com/ZcashFoundation/zebra/pull/6895))
- fix(deploy): allow the container to raise in MIGs ([#6893](https://github.com/ZcashFoundation/zebra/pull/6893))
- fix(deployment): Fix log file path and log colour ([#6890](https://github.com/ZcashFoundation/zebra/pull/6890))
- fix(net): Avoid potential concurrency bugs in outbound handshakes ([#6869](https://github.com/ZcashFoundation/zebra/pull/6869))
- fix(release): Fix incorrect commands in release-checklist.md ([#6883](https://github.com/ZcashFoundation/zebra/pull/6883))
- fix(rust): Declare the correct compatibility with older Rust versions ([#6892](https://github.com/ZcashFoundation/zebra/pull/6892))
- fix(test): Avoid a race condition in testing modified JoinSplits ([#6921](https://github.com/ZcashFoundation/zebra/pull/6921))
- release(docs): Refactor bug report template ([#6858](https://github.com/ZcashFoundation/zebra/pull/6858))

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

- add(doc): Add instructions for doing mass renames easily ([#6865](https://github.com/ZcashFoundation/zebra/pull/6865))
- build(deps): Upgrade to ed25519-zebra 4.0.0 ([#6881](https://github.com/ZcashFoundation/zebra/pull/6881))
- build(deps): bump actions/checkout from 3.5.2 to 3.5.3 ([#6901](https://github.com/ZcashFoundation/zebra/pull/6901))
- build(deps): bump clap from 4.3.2 to 4.3.3 ([#6904](https://github.com/ZcashFoundation/zebra/pull/6904))
- build(deps): bump docker/build-push-action from 4.0.0 to 4.1.0 ([#6902](https://github.com/ZcashFoundation/zebra/pull/6902))
- build(deps): bump docker/login-action from 2.1.0 to 2.2.0 ([#6849](https://github.com/ZcashFoundation/zebra/pull/6849))
- build(deps): bump docker/metadata-action from 4.4.0 to 4.5.0 ([#6850](https://github.com/ZcashFoundation/zebra/pull/6850))
- build(deps): bump serde from 1.0.163 to 1.0.164 ([#6875](https://github.com/ZcashFoundation/zebra/pull/6875))
- build(deps): bump tj-actions/changed-files from 36.0.18 to 36.1.0 ([#6874](https://github.com/ZcashFoundation/zebra/pull/6874))
- change(cd): Deploy testnet instances for every main branch push and release ([#6842](https://github.com/ZcashFoundation/zebra/pull/6842))
- change(checkpoints): Update checkpoints for 1.0.0 ([#6884](https://github.com/ZcashFoundation/zebra/pull/6884))
- ci(tests): run network syncs on a weekly schedule ([#6920](https://github.com/ZcashFoundation/zebra/pull/6920))
- docs: Prep release checklist for stable ([#6876](https://github.com/ZcashFoundation/zebra/pull/6876))
- fix(ci): Disable scheduled testnet full sync by default ([#6930](https://github.com/ZcashFoundation/zebra/pull/6930))
- fix(deploy): Stop doing another full sync on every main branch push ([#6895](https://github.com/ZcashFoundation/zebra/pull/6895))
- fix(deploy): allow the container to raise in MIGs ([#6893](https://github.com/ZcashFoundation/zebra/pull/6893))
- fix(deployment): Fix log file path and log colour ([#6890](https://github.com/ZcashFoundation/zebra/pull/6890))
- fix(release): Fix incorrect commands in release-checklist.md ([#6883](https://github.com/ZcashFoundation/zebra/pull/6883))
- release(docs): Refactor bug report template ([#6858](https://github.com/ZcashFoundation/zebra/pull/6858))

### Contributors

Thank you to everyone who contributed to this release, we couldn't make Zebra without you:
@dconnolly, @dependabot[bot], @gustavovalverde, @oxarbitrage, @teor2345 and @upbqdn

@dconnolly dconnolly requested a review from teor2345 June 14, 2023 00:02
@dconnolly dconnolly requested a review from teor2345 June 14, 2023 00:37
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, let's do this!

mergify bot added a commit that referenced this pull request Jun 14, 2023
@mergify mergify bot merged commit fe859bd into main Jun 14, 2023
@mergify mergify bot deleted the release-1.0.0 branch June 14, 2023 04:35
@dconnolly
Copy link
Contributor Author

docker run --tty --interactive zfnd/zebra:v1.0.0 looks good:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: Dependency file updates A-docs Area: Documentation C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
3 participants