Skip to content

Commit 16741b9

Browse files
committed
Merge branch 'zcash-v2.4.2' into zsa1-v2.4.2-conflicts-new
2 parents 161a294 + 21a22ab commit 16741b9

File tree

692 files changed

+37974
-20112
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

692 files changed

+37974
-20112
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[codespell]
2-
ignore-words-list = crate,Sur,inout,Groth,groth,re-use,
2+
ignore-words-list = crate,Sur,inout,Groth,groth,re-use,abl,
33
exclude-file = book/mermaid.min.js
44
skip = ./zebra-rpc/qa/rpc-tests,./supply-chain

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
!zebra-*
2222
!zebrad
2323
!docker/entrypoint.sh
24+
!docker/default-zebra-config.toml

.github/ISSUE_TEMPLATE/release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: "🚀 Zebra Release"
33
about: 'Zebra team use only'
44
title: 'Publish next Zebra release: (version)'
5-
labels: 'A-release, C-trivial, P-Medium :zap:'
5+
labels: 'A-release, C-exclude-from-changelog, P-Medium :zap:'
66
assignees: ''
77

88
---
@@ -16,7 +16,7 @@ They can be skipped for urgent releases.
1616

1717
To check consensus correctness, we want to test that the state format is valid after a full sync. (Format upgrades are tested in CI on each PR.)
1818

19-
- [ ] Make sure there has been [at least one successful full sync test](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-integration-tests-gcp.yml?query=event%3Aschedule) since the last state change, or
19+
- [ ] Make sure there has been [at least one successful full sync test](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml?query=event%3Aschedule) since the last state change, or
2020
- [ ] Start a manual workflow run with a Zebra and `lightwalletd` full sync.
2121

2222
State format changes can be made in `zebra-state` or `zebra-chain`. The state format can be changed by data that is sent to the state, data created within the state using `zebra-chain`, or serialization formats in `zebra-state` or `zebra-chain`.

.github/ISSUE_TEMPLATE/usability_testing_plan.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ assignees: ''
3131

3232
### Method
3333

34-
<!-- Explain whether the tests will be co-located or reomte, moderated or unmoderated, and who will attend the sessions (e.g a moderator and a note-taker) -->
34+
<!-- Explain whether the tests will be co-located or remote, moderated or unmoderated, and who will attend the sessions (e.g a moderator and a note-taker) -->
3535

3636
### Test environment, equipment and logistics
3737

@@ -56,7 +56,7 @@ assignees: ''
5656

5757
## Session Outline and timing
5858

59-
<!-- The following sections provide some space to plan out the script and and tasks for your participants -->
59+
<!-- The following sections provide some space to plan out the script and tasks for your participants -->
6060

6161
### 1.Introduction to the session (5\')
6262

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
name: 'Hotfix Release Checklist Template'
3+
about: 'Checklist to create and publish a hotfix Zebra release'
4+
title: 'Release Zebra (version)'
5+
labels: 'A-release, C-exclude-from-changelog, P-Critical :ambulance:'
6+
assignees: ''
7+
8+
---
9+
10+
A hotfix release should only be created when a bug or critical issue is discovered in an existing release, and waiting for the next scheduled release is impractical or unacceptable.
11+
12+
## Create the Release PR
13+
14+
- [ ] Create a branch to fix the issue based on the tag of the release being fixed (not the main branch).
15+
for example: `hotfix-v2.3.1` - this needs to be different to the tag name
16+
- [ ] Make the required changes
17+
- [ ] Create a hotfix release PR by adding `&template=hotfix-release-checklist.md` to the comparing url ([Example](https://github.com/ZcashFoundation/zebra/compare/bump-v1.0.0?expand=1&template=hotfix-release-checklist.md)).
18+
- [ ] Add the `C-exclude-from-changelog` label so that the PR is omitted from the next release changelog
19+
- [ ] Add the `A-release` tag to the release pull request in order for the `check_no_git_refs_in_cargo_lock` to run.
20+
- [ ] Ensure the `check_no_git_refs_in_cargo_lock` check passes.
21+
- [ ] Add a changelog entry for the release summarizing user-visible changes.
22+
23+
## Update Versions
24+
25+
The release level for a hotfix should always follow semantic versioning as a `patch` release.
26+
27+
<details>
28+
<summary>Update crate versions, commit the changes to the release branch, and do a release dry-run:</summary>
29+
30+
```sh
31+
# Update everything except for alpha crates and zebrad:
32+
cargo release version --verbose --execute --allow-branch '*' --workspace --exclude zebrad beta
33+
# Due to a bug in cargo-release, we need to pass exact versions for alpha crates:
34+
# Update zebrad:
35+
cargo release version --verbose --execute --allow-branch '*' --package zebrad patch
36+
# Continue with the release process:
37+
cargo release replace --verbose --execute --allow-branch '*' --package zebrad
38+
cargo release commit --verbose --execute --allow-branch '*'
39+
```
40+
41+
</details>
42+
43+
## Update the Release PR
44+
45+
- [ ] Push the version increments and the release constants to the hotfix release branch.
46+
47+
# Publish the Zebra Release
48+
49+
## Create the GitHub Pre-Release
50+
51+
- [ ] Wait for the hotfix release PR to be reviewed, approved, and merged into main.
52+
- [ ] Create a new release
53+
- [ ] Set the tag name to the version tag,
54+
for example: `v2.3.1`
55+
- [ ] Set the release to target the hotfix release branch
56+
- [ ] Set the release title to `Zebra ` followed by the version tag,
57+
for example: `Zebra 2.3.1`
58+
- [ ] Populate the release description with the final changelog you created;
59+
starting just _after_ the title `## [Zebra ...` of the current version being released,
60+
and ending just _before_ the title of the previous release.
61+
- [ ] Mark the release as 'pre-release', until it has been built and tested
62+
- [ ] Publish the pre-release to GitHub using "Publish Release"
63+
64+
## Test the Pre-Release
65+
66+
- [ ] Wait until the Docker binaries have been built on the hotfix release branch, and the quick tests have passed:
67+
- [ ] [ci-tests.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml)
68+
- [ ] Wait until the [pre-release deployment machines have successfully launched](https://github.com/ZcashFoundation/zebra/actions/workflows/cd-deploy-nodes-gcp.yml?query=event%3Arelease)
69+
70+
## Publish Release
71+
72+
- [ ] [Publish the release to GitHub](https://github.com/ZcashFoundation/zebra/releases) by disabling 'pre-release', then clicking "Set as the latest release"
73+
74+
## Publish Crates
75+
76+
- [ ] Checkout the hotfix release branch
77+
- [ ] [Run `cargo login`](https://zebra.zfnd.org/dev/crate-owners.html#logging-in-to-cratesio)
78+
- [ ] Run `cargo clean` in the zebra repo
79+
- [ ] Publish the crates to crates.io: `cargo release publish --verbose --workspace --execute --allow-branch {hotfix-release-branch}`
80+
- [ ] Check that the published version of Zebra can be installed from `crates.io`:
81+
`cargo install --locked --force --version 2.minor.patch zebrad && ~/.cargo/bin/zebrad`
82+
and put the output in a comment on the PR.
83+
84+
## Publish Docker Images
85+
86+
- [ ] Wait for the [the Docker images to be published successfully](https://github.com/ZcashFoundation/zebra/actions/workflows/release-binaries.yml?query=event%3Arelease).
87+
- [ ] Wait for the new tag in the [dockerhub zebra space](https://hub.docker.com/r/zfnd/zebra/tags)
88+
89+
## Merge hotfix into main
90+
91+
- [ ] Review and merge the hotfix branch into the main branch. The changes and the update to the changelog must be included in the next release from main as well.
92+
- [ ] If there are conflicts between the hotfix branch and main, the conflicts should be resolved after the hotfix release is tagged and published.
93+
94+
## Release Failures
95+
96+
If building or running fails after tagging:
97+
98+
<details>
99+
1. Create a new hotfix release, starting from the top of this document.
100+
</details>

.github/PULL_REQUEST_TEMPLATE/release-checklist.md

Lines changed: 64 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,32 @@
22
name: 'Release Checklist Template'
33
about: 'Checklist to create and publish a Zebra release'
44
title: 'Release Zebra (version)'
5-
labels: 'A-release, C-trivial, P-Critical :ambulance:'
5+
labels: 'A-release, C-exclude-from-changelog, P-Critical :ambulance:'
66
assignees: ''
77

88
---
99

1010
# Prepare for the Release
1111

12-
- [ ] Make sure there has been [at least one successful full sync test](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-integration-tests-gcp.yml?query=event%3Aschedule) since the last state change, or start a manual full sync.
13-
- [ ] Make sure the PRs with the new checkpoint hashes and missed dependencies are already merged.
14-
(See the release ticket checklist for details)
12+
- [ ] Make sure there has been [at least one successful full sync test in the main branch](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml?query=branch%3Amain) since the last state change, or start a manual full sync.
1513

14+
# Checkpoints
15+
16+
For performance and security, we want to update the Zebra checkpoints in every release.
17+
- [ ] You can copy the latest checkpoints from CI by following [the zebra-checkpoints README](https://github.com/ZcashFoundation/zebra/blob/main/zebra-utils/README.md#zebra-checkpoints).
18+
19+
# Missed Dependency Updates
20+
21+
Sometimes `dependabot` misses some dependency updates, or we accidentally turned them off.
22+
23+
This step can be skipped if there is a large pending dependency upgrade. (For example, shared ECC crates.)
24+
25+
Here's how we make sure we got everything:
26+
- [ ] Run `cargo update` on the latest `main` branch, and keep the output
27+
- [ ] If needed, [add duplicate dependency exceptions to deny.toml](https://github.com/ZcashFoundation/zebra/blob/main/book/src/dev/continuous-integration.md#fixing-duplicate-dependencies-in-check-denytoml-bans)
28+
- [ ] If needed, remove resolved duplicate dependencies from `deny.toml`
29+
- [ ] Open a separate PR with the changes
30+
- [ ] Add the output of `cargo update` to that PR as a comment
1631

1732
# Summarise Release Changes
1833

@@ -26,7 +41,9 @@ Once you are ready to tag a release, copy the draft changelog into `CHANGELOG.md
2641
We use [the Release Drafter workflow](https://github.com/marketplace/actions/release-drafter) to automatically create a [draft changelog](https://github.com/ZcashFoundation/zebra/releases). We follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.
2742

2843
To create the final change log:
29-
- [ ] Copy the **latest** draft changelog into `CHANGELOG.md` (there can be multiple draft releases)
44+
- [ ] Copy the [**latest** draft
45+
changelog](https://github.com/ZcashFoundation/zebra/releases) into
46+
`CHANGELOG.md` (there can be multiple draft releases)
3047
- [ ] Delete any trivial changes
3148
- [ ] Put the list of deleted changelog entries in a PR comment to make reviewing easier
3249
- [ ] Combine duplicate changes
@@ -57,7 +74,13 @@ fastmod --fixed-strings '1.58' '1.65'
5774
- [ ] Freeze the [`batched` queue](https://dashboard.mergify.com/github/ZcashFoundation/repo/zebra/queues) using Mergify.
5875
- [ ] Mark all the release PRs as `Critical` priority, so they go in the `urgent` Mergify queue.
5976
- [ ] Mark all non-release PRs with `do-not-merge`, because Mergify checks approved PRs against every commit, even when a queue is frozen.
77+
- [ ] Add the `A-release` tag to the release pull request in order for the `check-no-git-dependencies` to run.
78+
79+
## Zebra git sources dependencies
6080

81+
- [ ] Ensure the `check-no-git-dependencies` check passes.
82+
83+
This check runs automatically on pull requests with the `A-release` label. It must pass for crates to be published to crates.io. If the check fails, you should either halt the release process or proceed with the understanding that the crates will not be published on crates.io.
6184

6285
# Update Versions and End of Support
6386

@@ -72,38 +95,39 @@ Choose a release level for `zebrad`. Release levels are based on user-visible ch
7295
- significant new features or behaviour changes; changes to RPCs, command-line, or configs; and deprecations or removals are `minor` releases
7396
- otherwise, it is a `patch` release
7497

75-
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.
76-
77-
### Update Crate Versions
98+
### Update Crate Versions and Crate Change Logs
7899

79-
If you're publishing crates for the first time, [log in to crates.io](https://github.com/ZcashFoundation/zebra/blob/doc-crate-own/book/src/dev/crate-owners.md#logging-in-to-cratesio),
100+
If you're publishing crates for the first time, [log in to crates.io](https://zebra.zfnd.org/dev/crate-owners.html#logging-in-to-cratesio),
80101
and make sure you're a member of owners group.
81102

82103
Check that the release will work:
83-
- [ ] Update crate versions, commit the changes to the release branch, and do a release dry-run:
104+
105+
- [ ] Determine which crates require release. Run `git diff --stat <previous_tag>`
106+
and enumerate the crates that had changes.
107+
- [ ] Determine which type of release to make. Run `semver-checks` to list API
108+
changes: `cargo semver-checks -p <crate> --default-features`. If there are
109+
breaking API changes, do a major release, or try to revert the API change
110+
if it was accidental. Otherwise do a minor or patch release depending on
111+
whether a new API was added. Note that `semver-checks` won't work
112+
if the previous realase was yanked; you will have to determine the
113+
type of release manually.
114+
- [ ] Update the crate `CHANGELOG.md` listing the API changes or other
115+
relevant information for a crate consumer. It might make sense to copy
116+
entries from the `zebrad` changelog.
117+
- [ ] Update crate versions:
84118

85119
```sh
86-
# Update everything except for alpha crates and zebrad:
87-
cargo release version --verbose --execute --allow-branch '*' --workspace --exclude zebrad --exclude zebra-scan --exclude zebra-grpc beta
88-
# Due to a bug in cargo-release, we need to pass exact versions for alpha crates:
89-
cargo release version --verbose --execute --allow-branch '*' --package zebra-scan 0.1.0-alpha.4
90-
cargo release version --verbose --execute --allow-branch '*' --package zebra-grpc 0.1.0-alpha.2
91-
# Update zebrad:
92-
cargo release version --verbose --execute --allow-branch '*' --package zebrad patch # [ major | minor | patch ]
93-
# Continue with the release process:
94-
cargo release replace --verbose --execute --allow-branch '*' --package zebrad
95-
cargo release commit --verbose --execute --allow-branch '*'
120+
cargo release version --verbose --execute --allow-branch '*' -p <crate> patch # [ major | minor ]
121+
cargo release replace --verbose --execute --allow-branch '*' -p <crate>
96122
```
97123

98-
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:
99-
100-
- [ ] 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)
101-
- [ ] Push the above version changes to the release branch.
124+
- [ ] Update the crate `CHANGELOG.md`
125+
- [ ] Commit and push the above version changes to the release branch.
102126

103127
## Update End of Support
104128

105129
The end of support height is calculated from the current blockchain height:
106-
- [ ] Find where the Zcash blockchain tip is now by using a [Zcash explorer](https://zcashblockexplorer.com/blocks) or other tool.
130+
- [ ] Find where the Zcash blockchain tip is now by using a [Zcash Block Explorer](https://mainnet.zcashexplorer.app/) or other tool.
107131
- [ ] Replace `ESTIMATED_RELEASE_HEIGHT` in [`end_of_support.rs`](https://github.com/ZcashFoundation/zebra/blob/main/zebrad/src/components/sync/end_of_support.rs) with the height you estimate the release will be tagged.
108132

109133
<details>
@@ -141,8 +165,7 @@ The end of support height is calculated from the current blockchain height:
141165
## Test the Pre-Release
142166

143167
- [ ] Wait until the Docker binaries have been built on `main`, and the quick tests have passed:
144-
- [ ] [ci-unit-tests-docker.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-unit-tests-docker.yml?query=branch%3Amain)
145-
- [ ] [ci-integration-tests-gcp.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-integration-tests-gcp.yml?query=branch%3Amain)
168+
- [ ] [ci-tests.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml?query=branch%3Amain)
146169
- [ ] Wait until the [pre-release deployment machines have successfully launched](https://github.com/ZcashFoundation/zebra/actions/workflows/cd-deploy-nodes-gcp.yml?query=event%3Arelease)
147170

148171
## Publish Release
@@ -151,15 +174,25 @@ The end of support height is calculated from the current blockchain height:
151174

152175
## Publish Crates
153176

154-
- [ ] [Run `cargo login`](https://github.com/ZcashFoundation/zebra/blob/doc-crate-own/book/src/dev/crate-owners.md#logging-in-to-cratesio)
155-
- [ ] Run `cargo clean` in the zebra repo (optional)
156-
- [ ] Publish the crates to crates.io: `cargo release publish --verbose --workspace --execute`
177+
- [ ] [Run `cargo login`](https://zebra.zfnd.org/dev/crate-owners.html#logging-in-to-cratesio)
178+
- [ ] It is recommended that the following step be run from a fresh checkout of
179+
the repo, to avoid accidentally publishing files like e.g. logs that might
180+
be lingering around
181+
- [ ] Publish the crates to crates.io; edit the list to only include the crates that
182+
have been changed, but keep their overall order:
183+
184+
```
185+
for c in zebra-test tower-fallback zebra-chain tower-batch-control zebra-node-services zebra-script zebra-state zebra-consensus zebra-network zebra-rpc zebra-utils zebrad; do cargo release publish --verbose --execute -p $c; done
186+
```
187+
157188
- [ ] Check that Zebra can be installed from `crates.io`:
158-
`cargo install --locked --force --version 1.minor.patch zebrad && ~/.cargo/bin/zebrad`
189+
`cargo install --locked --force --version <version> zebrad && ~/.cargo/bin/zebrad`
159190
and put the output in a comment on the PR.
160191

161192
## Publish Docker Images
193+
162194
- [ ] Wait for the [the Docker images to be published successfully](https://github.com/ZcashFoundation/zebra/actions/workflows/release-binaries.yml?query=event%3Arelease).
195+
- [ ] Wait for the new tag in the [dockerhub zebra space](https://hub.docker.com/r/zfnd/zebra/tags)
163196
- [ ] Un-freeze the [`batched` queue](https://dashboard.mergify.com/github/ZcashFoundation/repo/zebra/queues) using Mergify.
164197
- [ ] Remove `do-not-merge` from the PRs you added it to
165198

.github/dependabot.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ updates:
33
# Rust section
44
- package-ecosystem: cargo
55
directory: '/'
6+
# Update only the lockfile. We shouldn't update Cargo.toml unless it's for
7+
# a security issue, or if we need a new feature of the dependency.
8+
versioning-strategy: lockfile-only
69
# serde, clap, and other dependencies sometimes have multiple updates in a week
710
schedule:
8-
interval: weekly
11+
interval: monthly
912
day: monday
1013
timezone: America/New_York
1114
# Limit dependabot to 1 PR per reviewer
1215
open-pull-requests-limit: 6
1316
labels:
14-
- 'C-trivial'
17+
- 'C-exclude-from-changelog'
1518
- 'A-rust'
1619
- 'A-dependencies'
1720
- 'P-Low :snowflake:'
@@ -46,11 +49,11 @@ updates:
4649
timezone: America/New_York
4750
open-pull-requests-limit: 4
4851
labels:
49-
- 'C-trivial'
52+
- 'C-exclude-from-changelog'
5053
- 'A-devops'
5154
- 'A-dependencies'
5255
- 'P-Low :snowflake:'
5356
groups:
5457
devops:
5558
patterns:
56-
- "*"
59+
- "*"

0 commit comments

Comments
 (0)