Skip to content

Commit

Permalink
Merge branch 'main' into gbt-proposal-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 11, 2023
2 parents 9ce7d8a + 6e61066 commit 5a0850c
Show file tree
Hide file tree
Showing 36 changed files with 1,300 additions and 162 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Flags that apply to all Zebra crates and configurations
[target.'cfg(all())']
rustflags = [
# Zebra standard lints for Rust 1.58+
# Zebra standard lints for Rust 1.65+

# High-risk code
"-Dunsafe_code",
Expand Down
35 changes: 19 additions & 16 deletions .github/PULL_REQUEST_TEMPLATE/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ assignees: ''

### How to Increment Versions

Zebra follows [semantic versioning](https://semver.org).
Semantic versions look like: MAJOR`.`MINOR`.`PATCH[`-`TAG`.`PRE-RELEASE]
Zebra follows [semantic versioning](https://semver.org). Semantic versions look like: MAJOR`.`MINOR`.`PATCH[`-`TAG`.`PRE-RELEASE]

The [draft `zebrad` changelog](https://github.com/ZcashFoundation/zebra/releases) will have an automatic version bump. This version is based on [the labels on the PRs in the release](https://github.com/ZcashFoundation/zebra/blob/main/.github/release-drafter.yml).

Expand Down Expand Up @@ -44,7 +43,7 @@ zebrad (rc):
- [ ] `README.md`
- [ ] `book/src/user/docker.md`

crates (pre-release):
crates (beta):
- [ ] zebra-* `Cargo.toml`s

tower (patch):
Expand All @@ -59,9 +58,10 @@ You can use `fastmod` to interactively find and replace versions.

For example, you can do something like:
```
fastmod --extensions rs,toml,md --fixed-strings '1.0.0-rc.0' '1.0.0-rc.1' zebrad README.md zebra-network/src/constants.rs
fastmod --extensions rs,toml,md --fixed-strings '1.0.0-rc.0' '1.0.0-rc.1' zebrad README.md zebra-network/src/constants.rs book/src/user/docker.md
fastmod --extensions rs,toml,md --fixed-strings '1.0.0-beta.15' '1.0.0-beta.16' zebra-*
fastmod --extensions rs,toml,md --fixed-strings '0.2.30' '0.2.31' tower-batch tower-fallback
cargo build
```

If you use `fastmod`, don't update versions in `CHANGELOG.md` or `zebra-dependencies-for-audit.md`.
Expand All @@ -72,10 +72,16 @@ Update the README to:
- [ ] Remove any "Known Issues" that have been fixed
- [ ] 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.toml`s

You can use a command like:
```sh
fastmod --fixed-strings '1.58' '1.65'
```

## Checkpoints

With every release and for performance reasons, we want to update the zebra checkpoints. More information on how to do this can be found in [the zebra-checkpoints README](https://github.com/ZcashFoundation/zebra/blob/main/zebra-consensus/src/checkpoint/README.md).
With every release and for performance reasons, we want to update the Zebra checkpoints. More information on how to do this can be found in [the zebra-checkpoints README](https://github.com/ZcashFoundation/zebra/blob/main/zebra-consensus/src/checkpoint/README.md).

To do this you will need a synchronized `zcashd` node. You can request help from other zebra team members to submit this PR if you can't make it yourself at the moment of the release.

Expand All @@ -84,9 +90,7 @@ To do this you will need a synchronized `zcashd` node. You can request help from
**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](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.
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.

To create the final change log:
- [ ] Copy the **latest** draft changelog into `CHANGELOG.md` (there can be multiple draft releases)
Expand Down Expand Up @@ -119,8 +123,7 @@ After you have the version increments, the updated checkpoints and the updated c
- [ ] Make sure the PR with the new checkpoint hashes is already merged, or make it part of the changelog PR
- [ ] Push the version increments and the updated changelog into a branch
(for example: `bump-v1.0.0-rc.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](https://github.com/ZcashFoundation/zebra/compare/v1.0.0-rc.0-release?expand=1&template=release-checklist.md)).
- [ ] Create a release PR by adding `&template=release-checklist.md` to the comparing url ([Example](https://github.com/ZcashFoundation/zebra/compare/v1.0.0-rc.0-release?expand=1&template=release-checklist.md)).
- [ ] Add the list of deleted changelog entries as a comment to make reviewing easier.
- [ ] Turn on [Merge Freeze](https://www.mergefreeze.com/installations/3676/branches).
- [ ] Once the PR is ready to be merged, unfreeze it [here](https://www.mergefreeze.com/installations/3676/branches).
Expand All @@ -130,17 +133,15 @@ After you have the version increments, the updated checkpoints and the updated c

### Create the Release

- [ ] Once the PR has been merged, create a new release using the draft release as a base,
by clicking the Edit icon in the [draft release](https://github.com/ZcashFoundation/zebra/releases)
- [ ] Once the PR has been merged, create a new release using the draft release as a base, by clicking the Edit icon in the [draft release](https://github.com/ZcashFoundation/zebra/releases)
- [ ] Set the tag name to the version tag,
for example: `v1.0.0-rc.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-rc.0`
- [ ] Replace the prepopulated draft changelog in the release description by 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.
- [ ] 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](https://github.com/ZcashFoundation/zebra/releases)
Expand All @@ -160,6 +161,8 @@ After you have the version increments, the updated checkpoints and the updated c
If the release contains new features (`major` or `minor`), or high-priority bug fixes:
- [ ] Ask the team about doing a blog post

## Release Failures

If building or running fails after tagging:
1. Fix the bug that caused the failure
2. Increment versions again, following these instructions from the start
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-crates-individually.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ jobs:
persist-credentials: false

- name: Install last version of Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v1.1.2
with:
version: '3.x'
# TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed
version: '3.20.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-rs/toolchain@v1
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/continous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ jobs:
if: ${{ !cancelled() && !failure() && ((github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'release') }}

steps:
- uses: actions/[email protected]
with:
persist-credentials: false

- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
with:
Expand Down Expand Up @@ -189,6 +193,10 @@ jobs:
if: github.event_name == 'workflow_dispatch'

steps:
- uses: actions/[email protected]
with:
persist-credentials: false

- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4
with:
Expand Down Expand Up @@ -217,8 +225,9 @@ jobs:
--container-stdin \
--container-tty \
--container-image ${{ env.GAR_BASE }}/zebrad@${{ needs.build.outputs.image_digest }} \
--create-disk=name=auto-delete=yes,size=300GB,type=pd-ssd \
--container-mount-disk=mount-path='/zebrad-cache' \
--create-disk=auto-delete=yes,size=300GB,type=pd-ssd \
--create-disk=name=zebrad-cache-${{ env.GITHUB_SHA_SHORT }},auto-delete=yes,size=300GB,type=pd-ssd \
--container-mount-disk=mount-path='/zebrad-cache',name=zebrad-cache-${{ env.GITHUB_SHA_SHORT }} \
--machine-type ${{ env.MACHINE_TYPE }} \
--zone ${{ env.ZONE }} \
--labels=app=zebrad,environment=qa,network=${NETWORK},github_ref=${{ env.GITHUB_REF_SLUG_URL }} \
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/continous-integration-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ jobs:
persist-credentials: false

- name: Install last version of Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v1.1.2
with:
version: '3.x'
# TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed
version: '3.20.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -224,9 +225,10 @@ jobs:
persist-credentials: false

- name: Install last version of Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v1.1.2
with:
version: '3.x'
# TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed
version: '3.20.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-rs/toolchain@v1
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ jobs:
persist-credentials: false

- name: Install last version of Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v1.1.2
with:
version: '3.x'
# TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed
version: '3.20.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install latest beta
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Rust files
id: changed-files-rust
uses: tj-actions/changed-files@v35.2.1
uses: tj-actions/changed-files@v35.4.0
with:
files: |
**/*.rs
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Workflow files
id: changed-files-workflows
uses: tj-actions/changed-files@v35.2.1
uses: tj-actions/changed-files@v35.4.0
with:
files: |
.github/workflows/*.yml
Expand All @@ -67,9 +67,10 @@ jobs:
persist-credentials: false

- name: Install last version of Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v1.1.2
with:
version: '3.x'
# TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed
version: '3.20.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check workflow permissions
Expand Down Expand Up @@ -117,9 +118,10 @@ jobs:
persist-credentials: false

- name: Install last version of Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v1.1.2
with:
version: '3.x'
# TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed
version: '3.20.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-rs/[email protected]
Expand Down Expand Up @@ -157,9 +159,10 @@ jobs:
persist-credentials: false

- name: Install last version of Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v1.1.2
with:
version: '3.x'
# TODO: increase to latest version after https://github.com/arduino/setup-protoc/issues/33 is fixed
version: '3.20.1'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-rs/[email protected]
Expand Down
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,48 @@ All notable changes to Zebra are documented in this file.

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.0-rc.3](https://github.com/ZcashFoundation/zebra/releases/tag/v1.0.0-rc.3) - 2023-01-10

This release continues our work on mining pool RPCs, and brings Zebra up to date with the latest [ZIP-317](https://zips.z.cash/zip-0317) changes. It also fixes a minor network protocol compatibility bug.

As part of this release, we upgraded `tokio` to fix potential hangs and performance issues. We encourage all users to upgrade to the latest Zebra version to benefit from these fixes.

### Breaking Changes

- Zebra now requires at least Rust 1.65, because we have started using new language features.
Any Zebra release can increase the required Rust version: only the latest stable Rust version is supported.

### Security

- Upgrade tokio from 1.22.0 to 1.23.0 to fix potential hangs and performance issues ([#5802](https://github.com/ZcashFoundation/zebra/pull/5802))
- Refactor block subsidy to handle Height::MAX without panicking ([#5787](https://github.com/ZcashFoundation/zebra/pull/5787))
- Update ZIP-317 transaction selection algorithm in the `getblocktemplate` RPC ([#5776](https://github.com/ZcashFoundation/zebra/pull/5776))

### Added

- Add the `getmininginfo`, `getnetworksolps` and `getnetworkhashps` RPC methods ([#5808](https://github.com/ZcashFoundation/zebra/pull/5808))
- Add long polling support to the `getblocktemplate` RPC ([#5772](https://github.com/ZcashFoundation/zebra/pull/5772), [#5796](https://github.com/ZcashFoundation/zebra/pull/5796), [#5837](https://github.com/ZcashFoundation/zebra/pull/5837), [#5843](https://github.com/ZcashFoundation/zebra/pull/5843), [#5862](https://github.com/ZcashFoundation/zebra/pull/5862))
- Populate `blockcommitmenthash` and `defaultroot` fields in the getblocktemplate RPC ([#5751](https://github.com/ZcashFoundation/zebra/pull/5751))
- Support transparent p2pkh miner addresses in the `getblocktemplate` RPC ([#5827](https://github.com/ZcashFoundation/zebra/pull/5827))

### Changed

- Automatically re-verify mempool transactions after a chain fork, rather than re-downloading them all ([#5841](https://github.com/ZcashFoundation/zebra/pull/5841))
- Try to match `zcashd`'s `getblocktemplate` exactly ([#5867](https://github.com/ZcashFoundation/zebra/pull/5867))
- Accept a hash or a height as the first parameter of the `getblock` RPC ([#5861](https://github.com/ZcashFoundation/zebra/pull/5861))
- Wait for 3 minutes to check Zebra is synced to the tip, rather than 2 ([#5840](https://github.com/ZcashFoundation/zebra/pull/5840))
- Update mainnet and testnet checkpoints ([#5928](https://github.com/ZcashFoundation/zebra/pull/5928))

### Fixed

- Allow peers to omit the `relay` flag in `version` messages ([#5835](https://github.com/ZcashFoundation/zebra/pull/5835))

### Contributors

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


## [Zebra 1.0.0-rc.2](https://github.com/ZcashFoundation/zebra/releases/tag/v1.0.0-rc.2) - 2022-12-06

Zebra's latest release continues work on mining pool RPCs, fixes a rare RPC crash that could lead to memory corruption, and uses the ZIP-317 conventional fee for mempool size limits.
Expand Down
Loading

0 comments on commit 5a0850c

Please sign in to comment.