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

chore: Release v2.0.1 #8979

Merged
merged 6 commits into from
Oct 30, 2024
Merged

chore: Release v2.0.1 #8979

merged 6 commits into from
Oct 30, 2024

Conversation

upbqdn
Copy link
Member

@upbqdn upbqdn commented Oct 29, 2024


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


Prepare for the Release

  • Make sure there has been at least one successful full sync test since the last state change, or start a manual full sync.
  • Make sure the PRs with the new checkpoint hashes and missed dependencies are already merged.
    (See the release ticket checklist for details)

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:

  • 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

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'

Create the Release PR

  • Push the updated changelog and README into a new 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.
  • 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

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:

  • Mainnet Network Upgrades are major releases
  • significant new features or behaviour changes; changes to RPCs, command-line, or configs; and deprecations or 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, log in to crates.io,
and make sure you're a member of owners group.

Check that the release will work:

  • Update crate versions, commit the changes to the release branch, and do a release dry-run:
# 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:

  • 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

Update the Release PR

  • Push the version increments and the release constants to the release branch.

Publish the Zebra Release

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
  • 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.minor.patch zebrad && ~/.cargo/bin/zebrad
    and put the output in a comment on the PR.

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

@upbqdn upbqdn self-assigned this Oct 29, 2024
@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Oct 29, 2024
@upbqdn upbqdn added NU-6 Network Upgrade: NU6 specific tasks A-release Area: Zebra releases and release management P-Critical 🚑 labels Oct 29, 2024
@upbqdn
Copy link
Member Author

upbqdn commented Oct 29, 2024

Output from cargo update:

    Updating crates.io index
     Locking 9 packages to latest compatible versions
    Updating hyper-util v0.1.9 -> v0.1.10
    Updating insta v1.40.0 -> v1.41.0
    Updating libm v0.2.8 -> v0.2.11
    Updating quinn-udp v0.5.5 -> v0.5.6
    Updating reqwest v0.12.8 -> v0.12.9
    Updating rustix v0.38.37 -> v0.38.38
    Updating rustls v0.23.15 -> v0.23.16
    Updating serde v1.0.213 -> v1.0.214
    Updating serde_derive v1.0.213 -> v1.0.214
note: pass `--verbose` to see 125 unchanged dependencies behind latest

Copy link

github-actions bot commented Oct 29, 2024

🔍 Vulnerabilities of us-docker.pkg.dev/zfnd-dev-zebra/zebra/zebrad:pr-8979

📦 Image Reference us-docker.pkg.dev/zfnd-dev-zebra/zebra/zebrad:pr-8979
digestsha256:fcc690ac8031c2f8792b2e1b2ce220a7f27d8108fb43be1fc6405e62eb747a86
vulnerabilitiescritical: 2 high: 13 medium: 0 low: 0
size106 MB
packages114
📦 Base Image debian:12-slim
also known as
  • 12.7-slim
  • bookworm-20241016-slim
  • bookworm-slim
digestsha256:d83056144b2dd301730d2739635c8cbdeaaae20d6887146434184f8c060f03ce
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 23
critical: 2 high: 13 medium: 0 low: 0 stdlib 1.19.8 (golang)

pkg:golang/[email protected]

# Dockerfile (219:219)
COPY --from=release /usr/local/bin/zebrad /usr/local/bin

critical : CVE--2024--24790

Affected range<1.21.11
Fixed version1.21.11
EPSS Score0.06%
EPSS Percentile28th percentile
Description

The various Is methods (IsPrivate, IsLoopback, etc) did not work as expected for IPv4-mapped IPv6 addresses, returning false for addresses which would return true in their traditional IPv4 forms.

critical : CVE--2023--24540

Affected range<1.19.9
Fixed version1.19.9
EPSS Score0.28%
EPSS Percentile69th percentile
Description

Not all valid JavaScript whitespace characters are considered to be whitespace. Templates containing whitespace characters outside of the character set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain actions may not be properly sanitized during execution.

high : CVE--2023--29403

Affected range<1.19.10
Fixed version1.19.10
EPSS Score0.08%
EPSS Percentile35th percentile
Description

On Unix platforms, the Go runtime does not behave differently when a binary is run with the setuid/setgid bits. This can be dangerous in certain cases, such as when dumping memory state, or assuming the status of standard i/o file descriptors.

If a setuid/setgid binary is executed with standard I/O file descriptors closed, opening any files can result in unexpected content being read or written with elevated privileges. Similarly, if a setuid/setgid program is terminated, either via panic or signal, it may leak the contents of its registers.

high : CVE--2024--34158

Affected range<1.22.7
Fixed version1.22.7
EPSS Score0.04%
EPSS Percentile17th percentile
Description

Calling Parse on a "// +build" build tag line with deeply nested expressions can cause a panic due to stack exhaustion.

high : CVE--2024--34156

Affected range<1.22.7
Fixed version1.22.7
EPSS Score0.04%
EPSS Percentile17th percentile
Description

Calling Decoder.Decode on a message which contains deeply nested structures can cause a panic due to stack exhaustion. This is a follow-up to CVE-2022-30635.

high : CVE--2024--24791

Affected range<1.21.12
Fixed version1.21.12
EPSS Score0.04%
EPSS Percentile17th percentile
Description

The net/http HTTP/1.1 client mishandled the case where a server responds to a request with an "Expect: 100-continue" header with a non-informational (200 or higher) status. This mishandling could leave a client connection in an invalid state, where the next request sent on the connection will fail.

An attacker sending a request to a net/http/httputil.ReverseProxy proxy can exploit this mishandling to cause a denial of service by sending "Expect: 100-continue" requests which elicit a non-informational response from the backend. Each such request leaves the proxy with an invalid connection, and causes one subsequent request using that connection to fail.

high : CVE--2024--24784

Affected range<1.21.8
Fixed version1.21.8
EPSS Score0.04%
EPSS Percentile11th percentile
Description

The ParseAddressList function incorrectly handles comments (text within parentheses) within display names. Since this is a misalignment with conforming address parsers, it can result in different trust decisions being made by programs using different parsers.

high : CVE--2023--45288

Affected range<1.21.9
Fixed version1.21.9
EPSS Score0.04%
EPSS Percentile14th percentile
Description

An attacker may cause an HTTP/2 endpoint to read arbitrary amounts of header data by sending an excessive number of CONTINUATION frames.

Maintaining HPACK state requires parsing and processing all HEADERS and CONTINUATION frames on a connection. When a request's headers exceed MaxHeaderBytes, no memory is allocated to store the excess headers, but they are still parsed.

This permits an attacker to cause an HTTP/2 endpoint to read arbitrary amounts of header data, all associated with a request which is going to be rejected. These headers can include Huffman-encoded data which is significantly more expensive for the receiver to decode than for an attacker to send.

The fix sets a limit on the amount of excess header frames we will process before closing a connection.

high : CVE--2023--45287

Affected range<1.20.0
Fixed version1.20.0
EPSS Score0.07%
EPSS Percentile32nd percentile
Description

Before Go 1.20, the RSA based TLS key exchanges used the math/big library, which is not constant time. RSA blinding was applied to prevent timing attacks, but analysis shows this may not have been fully effective. In particular it appears as if the removal of PKCS#1 padding may leak timing information, which in turn could be used to recover session key bits.

In Go 1.20, the crypto/tls library switched to a fully constant time RSA implementation, which we do not believe exhibits any timing side channels.

high : CVE--2023--45283

Affected range<1.20.11
Fixed version1.20.11
EPSS Score0.11%
EPSS Percentile46th percentile
Description

The filepath package does not recognize paths with a ??\ prefix as special.

On Windows, a path beginning with ??\ is a Root Local Device path equivalent to a path beginning with \?. Paths with a ??\ prefix may be used to access arbitrary locations on the system. For example, the path ??\c:\x is equivalent to the more common path c:\x.

Before fix, Clean could convert a rooted path such as \a..??\b into the root local device path ??\b. Clean will now convert this to .??\b.

Similarly, Join(, ??, b) could convert a seemingly innocent sequence of path elements into the root local device path ??\b. Join will now convert this to .??\b.

In addition, with fix, IsAbs now correctly reports paths beginning with ??\ as absolute, and VolumeName correctly reports the ??\ prefix as a volume name.

UPDATE: Go 1.20.11 and Go 1.21.4 inadvertently changed the definition of the volume name in Windows paths starting with ?, resulting in filepath.Clean(?\c:) returning ?\c: rather than ?\c:\ (among other effects). The previous behavior has been restored.

high : CVE--2023--44487

Affected range<1.20.10
Fixed version1.20.10
EPSS Score83.78%
EPSS Percentile99th percentile
Description

A malicious HTTP/2 client which rapidly creates requests and immediately resets them can cause excessive server resource consumption. While the total number of requests is bounded by the http2.Server.MaxConcurrentStreams setting, resetting an in-progress request allows the attacker to create a new request while the existing one is still executing.

With the fix applied, HTTP/2 servers now bound the number of simultaneously executing handler goroutines to the stream concurrency limit (MaxConcurrentStreams). New requests arriving when at the limit (which can only happen after the client has reset an existing, in-flight request) will be queued until a handler exits. If the request queue grows too large, the server will terminate the connection.

This issue is also fixed in golang.org/x/net/http2 for users manually configuring HTTP/2.

The default stream concurrency limit is 250 streams (requests) per HTTP/2 connection. This value may be adjusted using the golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams setting and the ConfigureServer function.

high : CVE--2023--39325

Affected range<1.20.10
Fixed version1.20.10
EPSS Score0.42%
EPSS Percentile75th percentile
Description

A malicious HTTP/2 client which rapidly creates requests and immediately resets them can cause excessive server resource consumption. While the total number of requests is bounded by the http2.Server.MaxConcurrentStreams setting, resetting an in-progress request allows the attacker to create a new request while the existing one is still executing.

With the fix applied, HTTP/2 servers now bound the number of simultaneously executing handler goroutines to the stream concurrency limit (MaxConcurrentStreams). New requests arriving when at the limit (which can only happen after the client has reset an existing, in-flight request) will be queued until a handler exits. If the request queue grows too large, the server will terminate the connection.

This issue is also fixed in golang.org/x/net/http2 for users manually configuring HTTP/2.

The default stream concurrency limit is 250 streams (requests) per HTTP/2 connection. This value may be adjusted using the golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams setting and the ConfigureServer function.

high : CVE--2022--30635

Affected range<1.22.7
Fixed version1.22.7
EPSS Score0.19%
EPSS Percentile56th percentile
Description

Calling Decoder.Decode on a message which contains deeply nested structures can cause a panic due to stack exhaustion. This is a follow-up to CVE-2022-30635.

high : CVE--2023--29400

Affected range<1.19.9
Fixed version1.19.9
EPSS Score0.14%
EPSS Percentile50th percentile
Description

Templates containing actions in unquoted HTML attributes (e.g. "attr={{.}}") executed with empty input can result in output with unexpected results when parsed due to HTML normalization rules. This may allow injection of arbitrary attributes into tags.

high : CVE--2023--24539

Affected range<1.19.9
Fixed version1.19.9
EPSS Score0.14%
EPSS Percentile50th percentile
Description

Angle brackets (<>) are not considered dangerous characters when inserted into CSS contexts. Templates containing multiple actions separated by a '/' character can result in unexpectedly closing the CSS context and allowing for injection of unexpected HTML, if executed with untrusted input.

Copy link

github-actions bot commented Oct 29, 2024

Recommended fixes for image us-docker.pkg.dev/zfnd-dev-zebra/zebra/zebrad:pr-8979

Base image is debian:bookworm-slim

Namebookworm-20241016-slim
Digestsha256:d83056144b2dd301730d2739635c8cbdeaaae20d6887146434184f8c060f03ce
Vulnerabilitiescritical: 0 high: 0 medium: 0 low: 23
Pushed1 week ago
Size29 MB
Packages125
Flavordebian
OS12
Slim
The base image is also available under the supported tag(s): 12-slim, 12.7-slim, bookworm-20241016-slim

Refresh base image

Rebuild the image using a newer base image version. Updating this may result in breaking changes.

✅ This image version is up to date.

Change base image

TagDetailsPushedVulnerabilities
stable-slim
Tag is preferred tag
Also known as:
  • stable-20241016-slim
Benefits:
  • Same OS detected
  • Tag is preferred tag
  • Tag was pushed more recently
  • Image has similar size
  • Image has same number of vulnerabilities
  • Image contains equal number of packages
  • Tag is using slim variant
  • stable-slim is the fourth most popular tag with 46K pulls per month
Image details:
  • Size: 29 MB
  • Flavor: debian
  • OS: 12
  • Slim: ✅
1 week ago



stable
Image has same number of vulnerabilities
Also known as:
  • stable-20241016
Benefits:
  • Same OS detected
  • Tag was pushed more recently
  • Image has same number of vulnerabilities
  • Image contains equal number of packages
  • stable is the 7th most popular tag with 32K pulls per month
Image details:
  • Size: 50 MB
  • Flavor: debian
  • OS: 12
1 week ago



bookworm
Tag is latest
Also known as:
  • 12.7
  • 12
  • bookworm-20241016
  • latest
Benefits:
  • Same OS detected
  • Tag is latest
  • Image has same number of vulnerabilities
  • Image contains equal number of packages
  • bookworm is the 10th most popular tag with 14K pulls per month
Image details:
  • Size: 50 MB
  • Flavor: debian
  • OS: 12
1 week ago



testing-slim
Major OS version update
Also known as:
  • testing-20241016-slim
Benefits:
  • Same OS detected
  • Tag was pushed more recently
  • Image has similar size
  • Major OS version update
  • Image contains similar number of packages
  • Tag is using slim variant
  • testing-slim is the sixth most popular tag with 33K pulls per month
Image details:
  • Size: 32 MB
  • Flavor: debian
  • OS: 13
  • Slim: ✅
1 week ago



sid-slim
Major OS version update
Also known as:
  • sid-20241016-slim
Benefits:
  • Same OS detected
  • Tag was pushed more recently
  • Image has similar size
  • Major OS version update
  • Image contains similar number of packages
  • Tag is using slim variant
  • sid-slim is the 9th most popular tag with 15K pulls per month
Image details:
  • Size: 32 MB
  • Flavor: debian
  • OS: 13
  • Slim: ✅
1 week ago



Copy link

github-actions bot commented Oct 29, 2024

Overview

Image reference zfnd/zebra:latest us-docker.pkg.dev/zfnd-dev-zebra/zebra/zebrad:pr-8979
- digest 64630802fdcb fcc690ac8031
- tag latest pr-8979
- provenance f45f6f2 4c5b559
- vulnerabilities critical: 2 high: 13 medium: 7 low: 32 unspecified: 5 critical: 2 high: 13 medium: 7 low: 32 unspecified: 5
- platform linux/amd64 linux/amd64
- size 106 MB 106 MB (+8.4 kB)
- packages 114 114
Base Image debian:bookworm-slim
also known as:
12-slim
12.7-slim
bookworm-20241016-slim
debian:bookworm-slim
also known as:
12-slim
12.7-slim
bookworm-20241016-slim
- vulnerabilities critical: 0 high: 0 medium: 0 low: 23 critical: 0 high: 0 medium: 0 low: 23
Labels (3 changes)
  • ± 3 changed
  • 5 unchanged
-org.opencontainers.image.created=2024-10-25T23:14:55.621Z
+org.opencontainers.image.created=2024-10-30T08:57:33.145Z
 org.opencontainers.image.description=Zcash - Financial Privacy in Rust 🦓
 org.opencontainers.image.licenses=Apache-2.0
-org.opencontainers.image.revision=f45f6f282c7b1b3e82594de328a2d4f1849bc99a
+org.opencontainers.image.revision=4c5b5590b811ef84ae8985d6334387b44690f06d
 org.opencontainers.image.source=https://github.com/ZcashFoundation/zebra
 org.opencontainers.image.title=zebra
 org.opencontainers.image.url=https://github.com/ZcashFoundation/zebra
-org.opencontainers.image.version=2.0.0
+org.opencontainers.image.version=pr-8979

@upbqdn upbqdn force-pushed the v2.0.1 branch 2 times, most recently from a902776 to f1a48be Compare October 30, 2024 08:42
@upbqdn upbqdn marked this pull request as ready for review October 30, 2024 08:58
@upbqdn upbqdn requested review from a team as code owners October 30, 2024 08:58
@upbqdn upbqdn requested review from arya2 and conradoplg and removed request for a team October 30, 2024 08:58
@arya2
Copy link
Contributor

arya2 commented Oct 30, 2024

The test_grpc_response_data test seemed to hang here:
https://github.com/ZcashFoundation/zebra/actions/runs/11589846881/job/32266208300?pr=8979#step:12:2012

Re-running it, I expect it'll pass now since the other unit test jobs did.

@mpguerra mpguerra enabled auto-merge (squash) October 30, 2024 14:26
@conradoplg conradoplg enabled auto-merge (squash) October 30, 2024 14:31
@conradoplg conradoplg merged commit fef500a into main Oct 30, 2024
203 of 206 checks passed
@conradoplg conradoplg deleted the v2.0.1 branch October 30, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-release Area: Zebra releases and release management C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG NU-6 Network Upgrade: NU6 specific tasks P-Critical 🚑
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants