Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into issue7727
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Oct 26, 2023
2 parents d10940e + 879fd5f commit 6f8fe4c
Show file tree
Hide file tree
Showing 30 changed files with 374 additions and 551 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci-coverage.patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ on:
jobs:
coverage:
name: Coverage on stable
# The large timeout is to accommodate:
# - nightly builds (75 minutes, typically 30-50 minutes)
# - parameter downloads (40 minutes, but only when the cache expires)
timeout-minutes: 115
runs-on: ubuntu-latest

steps:
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/ci-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ concurrency:

on:
workflow_dispatch:

# we build Rust caches on main,
# so they can be shared by all branches:
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
push:
branches:
- main
Expand All @@ -28,6 +32,7 @@ on:
# workflow definitions
- 'codecov.yml'
- '.github/workflows/ci-coverage.yml'

pull_request:
paths:
- '**/*.rs'
Expand All @@ -51,9 +56,8 @@ jobs:
coverage:
name: Coverage on stable
# The large timeout is to accommodate:
# - stable builds (typically 30-50 minutes), and
# - parameter downloads (an extra 90 minutes, but only when the cache expires)
timeout-minutes: 140
# - stable builds (typically 50-90 minutes), and
timeout-minutes: 120
runs-on: ubuntu-latest-xl

steps:
Expand Down Expand Up @@ -84,24 +88,6 @@ jobs:
echo "PROPTEST_CASES=1" >> $GITHUB_ENV
echo "PROPTEST_MAX_SHRINK_ITERS=0" >> $GITHUB_ENV
# Modified from:
# https://github.com/zcash/librustzcash/blob/c48bb4def2e122289843ddb3cb2984c325c03ca0/.github/workflows/ci.yml#L20-L33
- name: Fetch path to Zcash parameters
working-directory: ./zebra-consensus
shell: bash
# cargo-llvm-cov doesn't have a silent mode, so we have to extract the path from stderr
run: echo "ZCASH_PARAMS=$(cargo llvm-cov --lcov --no-report run --example get-params-path 2>&1 >/dev/null | tail -1)" >> $GITHUB_ENV
- name: Cache Zcash parameters
id: cache-params
uses: actions/cache@v3
with:
path: ${{ env.ZCASH_PARAMS }}
key: ${{ runner.os }}-sprout-and-sapling-params
- name: Fetch Zcash parameters
if: steps.cache-params.outputs.cache-hit != 'true'
working-directory: ./zebra-consensus
run: cargo llvm-cov --lcov --no-report run --example download-params

- name: Run Zebra tests
run: cargo llvm-cov --lcov --no-report

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-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@v39.2.3
uses: tj-actions/changed-files@v39.2.4
with:
files: |
**/*.rs
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Workflow files
id: changed-files-workflows
uses: tj-actions/changed-files@v39.2.3
uses: tj-actions/changed-files@v39.2.4
with:
files: |
.github/workflows/*.yml
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=stable --profile=default
- uses: Swatinem/rust-cache@v2.7.0
- uses: Swatinem/rust-cache@v2.7.1
with:
shared-key: "clippy-cargo-lock"

Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
# We don't cache `fmt` outputs because the job is quick,
# and we want to use the limited GitHub actions cache space for slower jobs.
#- uses: Swatinem/rust-cache@v2.7.0
#- uses: Swatinem/rust-cache@v2.7.1

- run: |
cargo fmt --all -- --check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-unit-tests-os.patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
rust: [stable, beta]
features: [""]
exclude:
Expand Down
41 changes: 8 additions & 33 deletions .github/workflows/ci-unit-tests-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ concurrency:

on:
workflow_dispatch:
# we build Rust and Zcash parameter caches on main,
# so they can be shared by all branches:
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache

pull_request:
paths:
Expand All @@ -31,6 +28,9 @@ on:
# workflow definitions
- '.github/workflows/ci-unit-tests-os.yml'

# we build Rust caches on main,
# so they can be shared by all branches:
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
push:
branches:
- main
Expand Down Expand Up @@ -67,16 +67,14 @@ jobs:
test:
name: Test ${{ matrix.rust }} on ${{ matrix.os }}${{ matrix.features }}
# The large timeout is to accommodate:
# - macOS and Windows builds (90 minutes, typically 30-70 minutes), and
# - parameter downloads (an extra 100 minutes, but only when the cache expires)
timeout-minutes: 190
# - macOS and Windows builds (typically 50-90 minutes), and
timeout-minutes: 120
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# TODO: Windows was removed for now, see https://github.com/ZcashFoundation/zebra/issues/3801
# TODO: macOS tests were removed for now, see https://github.com/ZcashFoundation/zebra/issues/6824
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
rust: [stable, beta]
# TODO: When vars.EXPERIMENTAL_FEATURES has features in it, add it here.
# Or work out a way to trim the space from the variable: GitHub doesn't allow empty variables.
Expand Down Expand Up @@ -110,7 +108,7 @@ jobs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=${{ matrix.rust }} --profile=minimal
- uses: Swatinem/rust-cache@v2.7.0
- uses: Swatinem/rust-cache@v2.7.1
# TODO: change Rust cache target directory on Windows,
# or remove this workaround once the build is more efficient (#3005).
#with:
Expand Down Expand Up @@ -159,29 +157,6 @@ jobs:
echo "PROPTEST_CASES=1" >> $GITHUB_ENV
echo "PROPTEST_MAX_SHRINK_ITERS=1024" >> $GITHUB_ENV
# Modified from:
# https://github.com/zcash/librustzcash/blob/c48bb4def2e122289843ddb3cb2984c325c03ca0/.github/workflows/ci.yml#L20-L33
#
# TODO:
# - split Fetch/Cache Zcash parameters into their own job,
# and use `concurrency:` to limit it to one job per OS
# - split get-params-path and download-params examples into their own crate,
# to speed up compilation
- name: Fetch path to Zcash parameters
working-directory: ./zebra-consensus
shell: bash
run: echo "ZCASH_PARAMS=$(cargo run --release --example get-params-path)" >> $GITHUB_ENV
- name: Cache Zcash parameters
id: cache-params
uses: actions/cache@v3
with:
path: ${{ env.ZCASH_PARAMS }}
key: ${{ runner.os }}-sprout-and-sapling-params
- name: Fetch Zcash parameters
if: steps.cache-params.outputs.cache-hit != 'true'
working-directory: ./zebra-consensus
run: cargo run --release --example download-params

# Run unit and basic acceptance tests, only showing command output if the test fails.
#
# If some tests hang, add "-- --nocapture" for just that test, or for all the tests.
Expand Down Expand Up @@ -242,7 +217,7 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=stable --profile=minimal
- uses: Swatinem/rust-cache@v2.7.0
- uses: Swatinem/rust-cache@v2.7.1
with:
shared-key: "clippy-cargo-lock"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-deploy-firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=beta --profile=default
- uses: Swatinem/rust-cache@v2.7.0
- uses: Swatinem/rust-cache@v2.7.1

- name: Build external docs
run: |
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=beta --profile=default
- uses: Swatinem/rust-cache@v2.7.0
- uses: Swatinem/rust-cache@v2.7.1

- name: Build internal docs
run: |
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/sub-build-zcash-params.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/sub-test-zebra-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
jobs:
test-docker-config:
name: Test ${{ inputs.test_id }} in Docker
timeout-minutes: 15
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
Expand Down
31 changes: 27 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org).

## [Zebra 1.4.0](https://github.com/ZcashFoundation/zebra/releases/tag/v1.4.0) - TODO: DATE

Zebra's mining RPCs are now available in release builds. TODO: rest of intro
Zebra's mining RPCs are now available in release builds. Our Docker images are significantly smaller,
because the smaller Zcash verification parameters are now built into the `zebrad` binary.
TODO: rest of intro

This release contains the following changes:

### Mining RPCs in Production Builds

Zebra's mining RPCs are now available in release builds (#7740). Any Zebra instance can be used
Expand All @@ -21,6 +23,27 @@ read our [mining blog post](https://zfnd.org/experimental-mining-support-in-zebr
Please [let us know](https://github.com/ZcashFoundation/zebra/issues/new?assignees=&labels=C-enhancement%2CS-needs-triage&projects=&template=feature_request.yml&title=feature%3A+)
if your mining pool needs extra RPC methods or fields.

### Zcash Parameters in `zebrad` Binary

`zebrad` now bundles zk-SNARK parameters directly into its binary. This increases the binary size
by a few megabytes, but reduces the size of the Docker image by around 600 MB because
the parameters don't contain the Sprout proving key anymore. The `zebrad download`
command does nothing, so it has been removed.

Previously, parameters were stored by default in these locations:

* `~/.zcash-params` (on Linux); or
* `~/Library/Application Support/ZcashParams` (on Mac); or
* `C:\Users\Username\AppData\Roaming\ZcashParams` (on Windows)

If you have upgraded `zebrad` to 1.4.0 or later, and `zcashd` to 5.7.0 or later, you can delete the
parameter files in these directories to save approximately 700 MB disk space.

[`zcashd` have deprecated their `fetch-params.sh` script](https://github.com/zcash/zcash/blob/master/doc/release-notes/release-notes-5.7.0.md#deprecation-of-fetch-paramssh),
so it can't be used to retry failed downloads in `zebrad` 1.3.0 and earlier.

We recommend upgrading to the latest Zebra release to avoid download issues in new installs.

### Security

TODO: rest of changelog
Expand All @@ -32,9 +55,9 @@ and fixes performance issues and bugs in the mining solution rate RPCs. Progress
bars can now be enabled using a config, please help us test them!

It contains the following updates:

### User Testing: Progress Bars

Zebra has progress bars! When progress bars are enabled, you can see Zebra's blocks,
transactions, and peer connections in your terminal. We're asking Zebra users to test this
feature, and give us [feedback on the forums](https://forum.zcashcommunity.com/t/zebra-progress-bars/44485).
Expand Down
Loading

0 comments on commit 6f8fe4c

Please sign in to comment.