Merge branch 'zsa-integration-generics' into zsa-integration-proptest

This commit is contained in:
Dmitry Demin 2024-10-17 11:03:47 +02:00
commit b0cb801119
63 changed files with 2236 additions and 682 deletions

View File

@ -3,6 +3,9 @@
# Flags that apply to all Zebra crates and configurations # Flags that apply to all Zebra crates and configurations
[target.'cfg(all())'] [target.'cfg(all())']
rustflags = [ rustflags = [
# FIXME: Consider removing this line later (it's needed for the ZSA version of librustzcash crates)
"--cfg", "zcash_unstable=\"nu6\"",
# Zebra standard lints for Rust 1.65+ # Zebra standard lints for Rust 1.65+
# High-risk code # High-risk code

View File

@ -219,7 +219,7 @@ jobs:
if: ${{ !cancelled() && !failure() && ((github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'release') }} if: ${{ !cancelled() && !failure() && ((github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'release') }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
@ -242,7 +242,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'
@ -329,7 +329,7 @@ jobs:
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
@ -352,7 +352,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'

View File

@ -39,14 +39,14 @@ jobs:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'
@ -106,14 +106,14 @@ jobs:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'

View File

@ -23,7 +23,7 @@ jobs:
outputs: outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }} matrix: ${{ steps.set-matrix.outputs.matrix }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
# Setup Rust with stable toolchain and minimal profile # Setup Rust with stable toolchain and minimal profile
- name: Setup Rust - name: Setup Rust

View File

@ -60,7 +60,7 @@ jobs:
outputs: outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }} matrix: ${{ steps.set-matrix.outputs.matrix }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0
# Setup Rust with stable toolchain and minimal profile # Setup Rust with stable toolchain and minimal profile
@ -122,7 +122,7 @@ jobs:
matrix: ${{ fromJson(needs.matrix.outputs.matrix) }} matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0

View File

@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest-xl runs-on: ubuntu-latest-xl
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
@ -103,4 +103,4 @@ jobs:
run: cargo llvm-cov --lcov --no-run --output-path lcov.info run: cargo llvm-cov --lcov --no-run --output-path lcov.info
- name: Upload coverage report to Codecov - name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4.5.0 uses: codecov/codecov-action@v4.6.0

View File

@ -37,14 +37,14 @@ jobs:
rust: ${{ steps.changed-files-rust.outputs.any_changed == 'true' }} rust: ${{ steps.changed-files-rust.outputs.any_changed == 'true' }}
workflows: ${{ steps.changed-files-workflows.outputs.any_changed == 'true' }} workflows: ${{ steps.changed-files-workflows.outputs.any_changed == 'true' }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
fetch-depth: 0 fetch-depth: 0
- name: Rust files - name: Rust files
id: changed-files-rust id: changed-files-rust
uses: tj-actions/changed-files@v45.0.2 uses: tj-actions/changed-files@v45.0.3
with: with:
files: | files: |
**/*.rs **/*.rs
@ -56,7 +56,7 @@ jobs:
- name: Workflow files - name: Workflow files
id: changed-files-workflows id: changed-files-workflows
uses: tj-actions/changed-files@v45.0.2 uses: tj-actions/changed-files@v45.0.3
with: with:
files: | files: |
.github/workflows/*.yml .github/workflows/*.yml
@ -69,7 +69,7 @@ jobs:
if: ${{ needs.changed-files.outputs.rust == 'true' }} if: ${{ needs.changed-files.outputs.rust == 'true' }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
@ -119,7 +119,7 @@ jobs:
if: ${{ needs.changed-files.outputs.rust == 'true' }} if: ${{ needs.changed-files.outputs.rust == 'true' }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0
@ -149,7 +149,7 @@ jobs:
needs: changed-files needs: changed-files
if: ${{ needs.changed-files.outputs.workflows == 'true' }} if: ${{ needs.changed-files.outputs.workflows == 'true' }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
- name: actionlint - name: actionlint
uses: reviewdog/action-actionlint@v1.48.0 uses: reviewdog/action-actionlint@v1.48.0
with: with:
@ -166,7 +166,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: changed-files needs: changed-files
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
- uses: codespell-project/actions-codespell@v2.1 - uses: codespell-project/actions-codespell@v2.1
with: with:
only_warn: 1 only_warn: 1

View File

@ -94,7 +94,7 @@ jobs:
rust: beta rust: beta
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0
@ -183,7 +183,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0
@ -205,7 +205,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0
@ -248,7 +248,7 @@ jobs:
continue-on-error: ${{ matrix.checks == 'advisories' }} continue-on-error: ${{ matrix.checks == 'advisories' }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0
@ -269,7 +269,7 @@ jobs:
steps: steps:
- name: Checkout git repository - name: Checkout git repository
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0

View File

@ -85,7 +85,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout the source code - name: Checkout the source code
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
@ -106,7 +106,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_FIREBASE_SA }}' service_account: '${{ vars.GCP_FIREBASE_SA }}'
@ -138,7 +138,7 @@ jobs:
pull-requests: write pull-requests: write
steps: steps:
- name: Checkout the source code - name: Checkout the source code
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
@ -164,7 +164,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_FIREBASE_SA }}' service_account: '${{ vars.GCP_FIREBASE_SA }}'

View File

@ -17,7 +17,7 @@ jobs:
dockerHubDescription: dockerHubDescription:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false

View File

@ -29,7 +29,7 @@ jobs:
id-token: 'write' id-token: 'write'
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
@ -52,7 +52,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'

View File

@ -70,7 +70,7 @@ jobs:
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0
- name: Checkout git repository - name: Checkout git repository
uses: actions/checkout@v4.1.7 uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false

View File

@ -20,14 +20,15 @@ fi
# We use the same commands as the [release drafter](https://github.com/ZcashFoundation/zebra/blob/main/.github/PULL_REQUEST_TEMPLATE/release-checklist.md#update-crate-versions) # We use the same commands as the [release drafter](https://github.com/ZcashFoundation/zebra/blob/main/.github/PULL_REQUEST_TEMPLATE/release-checklist.md#update-crate-versions)
# with an extra `--no-confirm` argument for non-interactive testing. # with an extra `--no-confirm` argument for non-interactive testing.
# Update everything except for alpha crates and zebrad: # Update everything except for alpha crates and zebrad:
cargo release version --verbose --execute --no-confirm --allow-branch '*' --workspace --exclude zebrad --exclude zebra-scan --exclude zebra-grpc beta cargo release version --verbose --execute --no-confirm --allow-branch '*' --workspace --exclude zebrad --exclude zebra-scan --exclude zebra-grpc patch
# Due to a bug in cargo-release, we need to pass exact versions for alpha crates: # Due to a bug in cargo-release, we need to pass exact versions for alpha crates:
cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebra-scan 0.1.0-alpha.8 cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebra-scan 0.1.0-alpha.9
cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebra-grpc 0.1.0-alpha.6 cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebra-grpc 0.1.0-alpha.7
# Update zebrad: # Update zebrad:
cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebrad patch # TODO: Revert `2.0.0-rc.0` to `patch` in the next release candidate.
cargo release version --verbose --execute --no-confirm --allow-branch '*' --package zebrad 2.0.0-rc.0
# Continue with the release process: # Continue with the release process:
cargo release replace --verbose --execute --no-confirm --allow-branch '*' --package zebrad cargo release replace --verbose --execute --no-confirm --allow-branch '*' --package zebrad
cargo release commit --verbose --execute --no-confirm --allow-branch '*' cargo release commit --verbose --execute --no-confirm --allow-branch '*'

View File

@ -80,7 +80,7 @@ jobs:
env: env:
DOCKER_BUILD_SUMMARY: ${{ vars.DOCKER_BUILD_SUMMARY }} DOCKER_BUILD_SUMMARY: ${{ vars.DOCKER_BUILD_SUMMARY }}
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
- uses: r7kamura/rust-problem-matchers@v1.5.0 - uses: r7kamura/rust-problem-matchers@v1.5.0
@ -126,7 +126,7 @@ jobs:
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_ARTIFACTS_SA }}' service_account: '${{ vars.GCP_ARTIFACTS_SA }}'
@ -152,7 +152,7 @@ jobs:
# Setup Docker Buildx to use Docker Build Cloud # Setup Docker Buildx to use Docker Build Cloud
- name: Set up Docker Buildx - name: Set up Docker Buildx
id: buildx id: buildx
uses: docker/setup-buildx-action@v3.6.1 uses: docker/setup-buildx-action@v3.7.1
with: with:
version: "lab:latest" version: "lab:latest"
driver: cloud driver: cloud
@ -161,7 +161,7 @@ jobs:
# Build and push image to Google Artifact Registry, and possibly DockerHub # Build and push image to Google Artifact Registry, and possibly DockerHub
- name: Build & push - name: Build & push
id: docker_build id: docker_build
uses: docker/build-push-action@v6.7.0 uses: docker/build-push-action@v6.9.0
with: with:
target: ${{ inputs.dockerfile_target }} target: ${{ inputs.dockerfile_target }}
context: . context: .

View File

@ -113,6 +113,7 @@ jobs:
get-disk-name: get-disk-name:
name: Get disk name name: Get disk name
uses: ./.github/workflows/sub-find-cached-disks.yml uses: ./.github/workflows/sub-find-cached-disks.yml
if: ${{ inputs.needs_zebra_state || inputs.needs_lwd_state }}
with: with:
network: ${{ inputs.network || vars.ZCASH_NETWORK }} network: ${{ inputs.network || vars.ZCASH_NETWORK }}
disk_prefix: ${{ inputs.needs_lwd_state && 'lwd-cache' || inputs.needs_zebra_state && 'zebrad-cache' }} disk_prefix: ${{ inputs.needs_lwd_state && 'lwd-cache' || inputs.needs_zebra_state && 'zebrad-cache' }}
@ -139,7 +140,7 @@ jobs:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
fetch-depth: '2' fetch-depth: '2'
@ -171,7 +172,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'
@ -389,7 +390,7 @@ jobs:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
fetch-depth: '2' fetch-depth: '2'
@ -433,7 +434,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'
@ -685,7 +686,7 @@ jobs:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
fetch-depth: '2' fetch-depth: '2'
@ -699,7 +700,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'

View File

@ -58,7 +58,7 @@ jobs:
contents: 'read' contents: 'read'
id-token: 'write' id-token: 'write'
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false
fetch-depth: 0 fetch-depth: 0
@ -66,7 +66,7 @@ jobs:
# Setup gcloud CLI # Setup gcloud CLI
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
id: auth id: auth
uses: google-github-actions/auth@v2.1.5 uses: google-github-actions/auth@v2.1.6
with: with:
workload_identity_provider: '${{ vars.GCP_WIF }}' workload_identity_provider: '${{ vars.GCP_WIF }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}' service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'

View File

@ -38,7 +38,7 @@ jobs:
timeout-minutes: 30 timeout-minutes: 30
runs-on: ubuntu-latest-m runs-on: ubuntu-latest-m
steps: steps:
- uses: actions/checkout@v4.1.7 - uses: actions/checkout@v4.2.1
with: with:
persist-credentials: false persist-credentials: false

View File

@ -5,6 +5,42 @@ 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/), 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). and this project adheres to [Semantic Versioning](https://semver.org).
## [Zebra 2.0.0-rc.0](https://github.com/ZcashFoundation/zebra/releases/tag/v2.0.0-rc.0) - 2024-10-11
This version is a release candidate for the Zcash NU6 network upgrade on the Mainnet. While this version does not yet include the NU6 Mainnet activation height or current protocol version, all required functionality and tests are in place.
Please note that support for this release candidate is expected to conclude prior to the NU6 activation heights.
### Security
- Added Docker Scout vulnerabilities scanning ([#8871](https://github.com/ZcashFoundation/zebra/pull/8871))
### Added
- Added Regtest-only `generate` and `stop` RPC methods ([#8849](https://github.com/ZcashFoundation/zebra/pull/8849), [#8839](https://github.com/ZcashFoundation/zebra/pull/8839), [#8863](https://github.com/ZcashFoundation/zebra/pull/8863))
- Added fields to `getmininginfo` RPC method response ([#8860](https://github.com/ZcashFoundation/zebra/pull/8860))
- Copied the Python RPC test framework from zcashd into Zebra ([#8866](https://github.com/ZcashFoundation/zebra/pull/8866))
### Changed
- Regtest halving interval to match zcashd and added a configurable halving interval for custom testnets ([#8888](https://github.com/ZcashFoundation/zebra/pull/8888), [#8928](https://github.com/ZcashFoundation/zebra/pull/8928))
- Updates post-NU6 Major Grants funding stream address on Mainnet ([#8914](https://github.com/ZcashFoundation/zebra/pull/8914))
### Fixed
- Remove debugging output by default in Docker image ([#8870](https://github.com/ZcashFoundation/zebra/pull/8870))
- Fixes a typo in configuration file path of the docker-compose file ([#8893](https://github.com/ZcashFoundation/zebra/pull/8893))
- Return verification errors from `sendrawtransaction` RPC method ([#8788](https://github.com/ZcashFoundation/zebra/pull/8788))
- Respond to getheaders requests with a maximum of 160 block headers ([#8913](https://github.com/ZcashFoundation/zebra/pull/8913))
- Avoids panicking during contextual validation when a parent block is missing ([#8883](https://github.com/ZcashFoundation/zebra/pull/8883))
- Write database format version to disk atomically to avoid a rare panic ([#8795](https://github.com/ZcashFoundation/zebra/pull/8795))
### Contributors
Thank you to everyone who contributed to this release, we couldn't make Zebra without you:
@arya2, @dismad, @gustavovalverde, @oxarbitrage, @skyl and @upbqdn
## [Zebra 1.9.0](https://github.com/ZcashFoundation/zebra/releases/tag/v1.9.0) - 2024-08-02 ## [Zebra 1.9.0](https://github.com/ZcashFoundation/zebra/releases/tag/v1.9.0) - 2024-08-02
This release includes deployment of NU6 on Testnet, configurable funding streams on custom Testnets, and updates Zebra's end-of-support (EoS) This release includes deployment of NU6 on Testnet, configurable funding streams on custom Testnets, and updates Zebra's end-of-support (EoS)

File diff suppressed because it is too large Load Diff

View File

@ -104,14 +104,19 @@ panic = "abort"
lto = "thin" lto = "thin"
[patch.crates-io] [patch.crates-io]
#halo2_proofs = { version = "0.3.0", git = "https://github.com/QED-it/halo2", rev = "1195c9af90205829ba20662bdfaf20dcc878807d" }
#halo2_gadgets = { version = "0.3.0", git = "https://github.com/QED-it/halo2", rev = "1195c9af90205829ba20662bdfaf20dcc878807d" }
halo2_proofs = { version = "0.3.0", git = "https://github.com/QED-it/halo2", branch = "zsa1" } halo2_proofs = { version = "0.3.0", git = "https://github.com/QED-it/halo2", branch = "zsa1" }
halo2_gadgets = { version = "0.3.0", git = "https://github.com/QED-it/halo2", branch = "zsa1" }
zcash_note_encryption = { version = "0.4.0", git = "https://github.com/QED-it/zcash_note_encryption", branch = "zsa1" } zcash_note_encryption = { version = "0.4.0", git = "https://github.com/QED-it/zcash_note_encryption", branch = "zsa1" }
sapling-crypto = { version = "0.1.3", git = "https://github.com/QED-it/sapling-crypto", branch = "zsa1" } sapling-crypto = { version = "0.1.3", git = "https://github.com/QED-it/sapling-crypto", branch = "zsa1" }
orchard = { version = "0.8.0", git = "https://github.com/QED-it/orchard", branch = "zsa1" } orchard = { version = "0.8.0", git = "https://github.com/QED-it/orchard", branch = "zsa1" }
zcash_primitives = { version = "0.15.0", git = "https://github.com/QED-it/librustzcash", branch = "txv6-separate-bundles-rebased-dd2" } zcash_primitives = { version = "0.15.0", git = "https://github.com/QED-it/librustzcash", branch = "zebra-compat-enable-backend" }
zcash_protocol = { version = "0.1.1", git = "https://github.com/QED-it/librustzcash", branch = "txv6-separate-bundles-rebased-dd2" } zcash_protocol = { version = "0.1.1", git = "https://github.com/QED-it/librustzcash", branch = "zebra-compat-enable-backend" }
zcash_address = { version = "0.3.2", git = "https://github.com/QED-it/librustzcash", branch = "txv6-separate-bundles-rebased-dd2" } zcash_address = { version = "0.3.2", git = "https://github.com/QED-it/librustzcash", branch = "zebra-compat-enable-backend" }
zcash_encoding = { version = "0.2.0", git = "https://github.com/QED-it/librustzcash", branch = "txv6-separate-bundles-rebased-dd2" } zcash_encoding = { version = "0.2.0", git = "https://github.com/QED-it/librustzcash", branch = "zebra-compat-enable-backend" }
zcash_history = { version = "0.4.0", git = "https://github.com/QED-it/librustzcash", branch = "txv6-separate-bundles-rebased-dd2" } zcash_history = { version = "0.4.0", git = "https://github.com/QED-it/librustzcash", branch = "zebra-compat-enable-backend" }
zcash_client_backend = { version = "0.12.1", git = "https://github.com/QED-it/librustzcash", branch = "txv6-separate-bundles-rebased-dd2" } zcash_client_backend = { version = "0.12.1", git = "https://github.com/QED-it/librustzcash", branch = "zebra-compat-enable-backend" }
zcash_keys = { version = "0.2.0", git = "https://github.com/QED-it/librustzcash", branch = "txv6-separate-bundles-rebased-dd2" } zcash_keys = { version = "0.2.0", git = "https://github.com/QED-it/librustzcash", branch = "zebra-compat-enable-backend" }
#incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "ffe4234788fd22662b937ba7c6ea01535fcc1293" }
#shardtree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "ffe4234788fd22662b937ba7c6ea01535fcc1293" }

View File

@ -84,19 +84,26 @@ skip-tree = [
{ name = "http-body", version = "=0.4.6" }, { name = "http-body", version = "=0.4.6" },
{ name = "hyper", version = "=0.14.30" }, { name = "hyper", version = "=0.14.30" },
# TODO: Remove this after we upgrade ECC dependencies to a crates.io version (#8749)
{ name = "equihash", version = "=0.2.0" },
{ name = "f4jumble", version = "=0.1.0" },
{ name = "secp256k1", version = "=0.26.0" },
{ name = "zcash_address", version = "=0.5.0" },
{ name = "zcash_client_backend", version = "=0.13.0" },
# wait for structopt-derive to update heck # wait for structopt-derive to update heck
{ name = "heck", version = "=0.3.3" }, { name = "heck", version = "=0.3.3" },
# wait for librocksdb-sys to update bindgen to one that uses newer itertools # wait for librocksdb-sys to update bindgen to one that uses newer itertools
{ name = "itertools", version = "=0.12.1" } { name = "itertools", version = "=0.12.1" },
# wait for halo2_gadgets and primitive-types to update uint
{ name = "uint", version = "=0.9.5" },
# wait for dirs-sys to update windows-sys
{ name = "windows-sys", version = "=0.48.0" },
# Remove after release candicate period is over and the ECC crates are not patched anymore
{ name = "equihash", version = "=0.2.0" },
{ name = "f4jumble", version = "=0.1.0" },
{ name = "incrementalmerkletree", version = "=0.6.0" },
{ name = "zcash_address", version = "=0.4.0" },
{ name = "zcash_keys", version = "=0.3.0" },
{ name = "zcash_primitives", version = "=0.16.0" },
{ name = "zcash_protocol", version = "=0.2.0" }
] ]
# This section is considered when running `cargo deny check sources`. # This section is considered when running `cargo deny check sources`.
@ -114,7 +121,10 @@ unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"] allow-registry = ["https://github.com/rust-lang/crates.io-index"]
# List of URLs for allowed Git repositories # List of URLs for allowed Git repositories
allow-git = [ allow-git = [
"https://github.com/zcash/librustzcash.git" "https://github.com/zcash/librustzcash.git",
"https://github.com/zcash/incrementalmerkletree",
"https://github.com/zcash/orchard",
"https://github.com/zcash/sapling-crypto"
] ]
[sources.allow-org] [sources.allow-org]

View File

@ -42,7 +42,7 @@ configs:
zebra_config: zebra_config:
# Change the following line to point to a zebrad.toml on your host machine # Change the following line to point to a zebrad.toml on your host machine
# to allow for easy configuration changes without rebuilding the image # to allow for easy configuration changes without rebuilding the image
file: ../zebrad/tests/common/configs/v1.0.0-rc.2.toml/ file: ../zebrad/tests/common/configs/v1.0.0-rc.2.toml
volumes: volumes:
zebrad-cache: zebrad-cache:

View File

@ -1,6 +1,11 @@
# cargo-vet audits file # cargo-vet audits file
[[audits.anstyle]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.7 -> 1.0.8"
[[audits.axum]] [[audits.axum]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -11,6 +16,26 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.3.4 -> 0.4.3" delta = "0.3.4 -> 0.4.3"
[[audits.bip32]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.5.1 -> 0.5.2"
[[audits.bridgetree]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.4.0 -> 0.5.0"
[[audits.bridgetree]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.5.0 -> 0.6.0"
[[audits.bytemuck]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.16.3 -> 1.16.1"
[[audits.bytes]] [[audits.bytes]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -21,6 +46,11 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "1.6.1 -> 1.7.1" delta = "1.6.1 -> 1.7.1"
[[audits.cfg_aliases]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
version = "0.1.1"
[[audits.clap_derive]] [[audits.clap_derive]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -66,6 +96,18 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.3.0 -> 0.4.0" delta = "0.3.0 -> 0.4.0"
[[audits.equihash]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.2.0 -> 0.2.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.f4jumble]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.1.0 -> 0.1.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.git2]] [[audits.git2]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -81,11 +123,37 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "1.3.1 -> 1.4.1" delta = "1.3.1 -> 1.4.1"
[[audits.hyper-util]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.1.6 -> 0.1.9"
[[audits.incrementalmerkletree]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.5.1 -> 0.6.0"
[[audits.incrementalmerkletree]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.6.0 -> 0.7.0"
[[audits.incrementalmerkletree]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.7.0 -> 0.7.0@git:ffe4234788fd22662b937ba7c6ea01535fcc1293"
importable = false
[[audits.indexmap]] [[audits.indexmap]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "2.2.6 -> 2.3.0" delta = "2.2.6 -> 2.3.0"
[[audits.indexmap]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "2.3.0 -> 2.5.0"
[[audits.inferno]] [[audits.inferno]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -96,11 +164,26 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.11.20 -> 0.11.21" delta = "0.11.20 -> 0.11.21"
[[audits.insta]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.39.0 -> 1.40.0"
[[audits.libc]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.2.155 -> 0.2.159"
[[audits.libgit2-sys]] [[audits.libgit2-sys]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.16.2+1.7.2 -> 0.17.0+1.8.1" delta = "0.16.2+1.7.2 -> 0.17.0+1.8.1"
[[audits.libyml]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
version = "0.0.5"
[[audits.log]] [[audits.log]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -131,6 +214,32 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.8.11 -> 1.0.1" delta = "0.8.11 -> 1.0.1"
[[audits.nix]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
version = "0.15.0"
[[audits.orchard]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.8.0 -> 0.9.0"
[[audits.orchard]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.9.0 -> 0.10.0"
[[audits.orchard]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.10.0 -> 0.9.1@git:55fb089a335bbbc1cda186c706bc037073df8eb7"
importable = false
[[audits.owo-colors]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "4.0.0 -> 4.1.0"
[[audits.proptest-derive]] [[audits.proptest-derive]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -141,6 +250,11 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.12.6 -> 0.13.1" delta = "0.12.6 -> 0.13.1"
[[audits.prost]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.13.1 -> 0.13.3"
[[audits.prost-build]] [[audits.prost-build]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -151,6 +265,11 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.12.6 -> 0.13.1" delta = "0.12.6 -> 0.13.1"
[[audits.prost-derive]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.13.1 -> 0.13.3"
[[audits.prost-types]] [[audits.prost-types]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -161,6 +280,47 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "1.10.5 -> 1.10.6" delta = "1.10.5 -> 1.10.6"
[[audits.regex]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.10.6 -> 1.11.0"
[[audits.regex-automata]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.4.7 -> 0.4.8"
[[audits.regex-syntax]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.8.4 -> 0.8.5"
[[audits.rlimit]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.10.1 -> 0.10.2"
[[audits.rustix]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.38.34 -> 0.38.37"
[[audits.sapling-crypto]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.1.3 -> 0.2.0"
[[audits.sapling-crypto]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.2.0 -> 0.3.0"
[[audits.sapling-crypto]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.3.0 -> 0.2.0@git:b1ad3694ee13a2fc5d291ad04721a6252da0993c"
importable = false
[[audits.serde_spanned]] [[audits.serde_spanned]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -186,21 +346,57 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "3.8.3 -> 3.9.0" delta = "3.8.3 -> 3.9.0"
[[audits.serde_yml]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
version = "0.0.12"
[[audits.shardtree]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.3.1 -> 0.4.0"
[[audits.shardtree]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.4.0 -> 0.5.0"
[[audits.shardtree]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.5.0 -> 0.4.0@git:ffe4234788fd22662b937ba7c6ea01535fcc1293"
importable = false
[[audits.tempfile]] [[audits.tempfile]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "3.10.1 -> 3.11.0" delta = "3.10.1 -> 3.11.0"
[[audits.tempfile]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "3.11.0 -> 3.13.0"
[[audits.thiserror]] [[audits.thiserror]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "1.0.61 -> 1.0.62" delta = "1.0.61 -> 1.0.62"
[[audits.thiserror]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.63 -> 1.0.64"
[[audits.thiserror-impl]] [[audits.thiserror-impl]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "1.0.63 -> 1.0.62" delta = "1.0.63 -> 1.0.62"
[[audits.thiserror-impl]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.63 -> 1.0.64"
[[audits.tokio]] [[audits.tokio]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -216,6 +412,16 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "2.3.0 -> 2.4.0" delta = "2.3.0 -> 2.4.0"
[[audits.tokio-stream]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.1.15 -> 0.1.16"
[[audits.tokio-util]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.7.11 -> 0.7.12"
[[audits.toml]] [[audits.toml]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -261,6 +467,16 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.11.0 -> 0.12.0" delta = "0.11.0 -> 0.12.0"
[[audits.tonic]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.12.1 -> 0.12.3"
[[audits.tonic-build]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.12.1 -> 0.12.3"
[[audits.tonic-reflection]] [[audits.tonic-reflection]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -271,16 +487,280 @@ who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.12.0 -> 0.12.1" delta = "0.12.0 -> 0.12.1"
[[audits.tonic-reflection]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.12.1 -> 0.12.3"
[[audits.tower-batch-control]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.2.41-beta.14 -> 0.2.41-beta.15"
[[audits.tower-fallback]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.2.41-beta.14 -> 0.2.41-beta.15"
[[audits.tower-layer]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.3.2 -> 0.3.3"
[[audits.tower-service]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.3.2 -> 0.3.3"
[[audits.uint]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.9.5 -> 0.10.0"
[[audits.vergen]] [[audits.vergen]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "8.3.1 -> 8.3.2" delta = "8.3.1 -> 8.3.2"
[[audits.version_check]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.9.4 -> 0.9.5"
[[audits.windows-sys]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.0 -> 0.59.0"
[[audits.windows-targets]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.windows_aarch64_gnullvm]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.windows_aarch64_msvc]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.windows_i686_gnu]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.windows_i686_gnullvm]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.windows_i686_msvc]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.windows_x86_64_gnu]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.windows_x86_64_gnullvm]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.windows_x86_64_msvc]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.52.5 -> 0.52.6"
[[audits.winnow]] [[audits.winnow]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>" who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "0.6.13 -> 0.6.18" delta = "0.6.13 -> 0.6.18"
[[audits.zcash_address]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.4.0 -> 0.5.0"
[[audits.zcash_address]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.5.0 -> 0.5.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.zcash_address]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.5.0 -> 0.6.0"
[[audits.zcash_client_backend]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.12.1 -> 0.13.0"
[[audits.zcash_client_backend]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.13.0 -> 0.14.0"
[[audits.zcash_client_backend]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.14.0 -> 0.13.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.zcash_encoding]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.2.1 -> 0.2.1@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.zcash_history]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.4.0 -> 0.4.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.zcash_keys]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.3.0 -> 0.4.0"
[[audits.zcash_keys]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.4.0 -> 0.3.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.zcash_primitives]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.16.0 -> 0.17.0"
[[audits.zcash_primitives]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.17.0 -> 0.17.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.zcash_primitives]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.17.0 -> 0.19.0"
[[audits.zcash_proofs]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.16.0 -> 0.17.0"
[[audits.zcash_proofs]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.17.0 -> 0.17.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.zcash_proofs]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.17.0 -> 0.19.0"
[[audits.zcash_protocol]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.1.1 -> 0.2.0"
[[audits.zcash_protocol]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.1.1 -> 0.3.0"
[[audits.zcash_protocol]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.3.0 -> 0.4.0"
[[audits.zcash_protocol]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.4.0 -> 0.3.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[audits.zebra-chain]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebra-consensus]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebra-grpc]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.1.0-alpha.5 -> 0.1.0-alpha.6"
[[audits.zebra-network]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebra-node-services]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebra-rpc]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebra-script]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebra-state]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebra-test]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebra-utils]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.0.0-beta.38 -> 1.0.0-beta.39"
[[audits.zebrad]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "1.8.0 -> 1.9.0"
[[audits.zip321]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
version = "0.1.0"
[[audits.zip321]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.1.0 -> 0.2.0"
[[audits.zip321]]
who = "Alfredo Garcia <oxarbitrage@gmail.com>"
criteria = "safe-to-deploy"
delta = "0.2.0 -> 0.1.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"
importable = false
[[trusted.clap]] [[trusted.clap]]
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
user-id = 6743 # Ed Page (epage) user-id = 6743 # Ed Page (epage)

View File

@ -1,3 +1,4 @@
# cargo-vet config file # cargo-vet config file
[cargo-vet] [cargo-vet]
@ -15,12 +16,68 @@ url = "https://raw.githubusercontent.com/zcash/rust-ecosystem/main/supply-chain/
[imports.zcashd] [imports.zcashd]
url = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" url = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"
[policy."equihash:0.2.0"]
[policy."equihash:0.2.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"]
audit-as-crates-io = true
[policy."f4jumble:0.1.0"]
[policy."f4jumble:0.1.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"]
audit-as-crates-io = true
[policy."incrementalmerkletree:0.6.0"]
[policy."incrementalmerkletree:0.7.0@git:ffe4234788fd22662b937ba7c6ea01535fcc1293"]
audit-as-crates-io = true
[policy.orchard]
audit-as-crates-io = true
[policy.sapling-crypto]
audit-as-crates-io = true
[policy.shardtree]
audit-as-crates-io = true
[policy.tower-batch-control] [policy.tower-batch-control]
audit-as-crates-io = true audit-as-crates-io = true
[policy.tower-fallback] [policy.tower-fallback]
audit-as-crates-io = true audit-as-crates-io = true
[policy."zcash_address:0.4.0"]
[policy."zcash_address:0.5.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"]
audit-as-crates-io = true
[policy.zcash_client_backend]
audit-as-crates-io = true
[policy.zcash_encoding]
audit-as-crates-io = true
[policy.zcash_history]
audit-as-crates-io = true
[policy."zcash_keys:0.3.0"]
[policy."zcash_keys:0.3.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"]
audit-as-crates-io = true
[policy."zcash_primitives:0.16.0"]
[policy."zcash_primitives:0.17.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"]
audit-as-crates-io = true
[policy.zcash_proofs]
audit-as-crates-io = true
[policy."zcash_protocol:0.2.0"]
[policy."zcash_protocol:0.3.0@git:1410f1449100a417bfbc4f6c7167aa9808e38792"]
audit-as-crates-io = true
[policy.zebra-chain] [policy.zebra-chain]
audit-as-crates-io = true audit-as-crates-io = true
@ -57,6 +114,9 @@ audit-as-crates-io = true
[policy.zebrad] [policy.zebrad]
audit-as-crates-io = true audit-as-crates-io = true
[policy.zip321]
audit-as-crates-io = true
[[exemptions.abscissa_core]] [[exemptions.abscissa_core]]
version = "0.7.0" version = "0.7.0"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -69,10 +129,6 @@ criteria = "safe-to-deploy"
version = "0.21.0" version = "0.21.0"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.adler]]
version = "1.0.2"
criteria = "safe-to-deploy"
[[exemptions.aead]] [[exemptions.aead]]
version = "0.5.2" version = "0.5.2"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -89,10 +145,6 @@ criteria = "safe-to-deploy"
version = "1.1.3" version = "1.1.3"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.allocator-api2]]
version = "0.2.18"
criteria = "safe-to-deploy"
[[exemptions.android-tzdata]] [[exemptions.android-tzdata]]
version = "0.1.1" version = "0.1.1"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -197,14 +249,6 @@ criteria = "safe-to-deploy"
version = "1.3.3" version = "1.3.3"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.bip0039]]
version = "0.10.1"
criteria = "safe-to-deploy"
[[exemptions.bitflags]]
version = "1.3.2"
criteria = "safe-to-deploy"
[[exemptions.bitflags-serde-legacy]] [[exemptions.bitflags-serde-legacy]]
version = "0.1.1" version = "0.1.1"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -249,10 +293,6 @@ criteria = "safe-to-deploy"
version = "1.2.2" version = "1.2.2"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.byteorder]]
version = "1.5.0"
criteria = "safe-to-deploy"
[[exemptions.bytes]] [[exemptions.bytes]]
version = "1.6.0" version = "1.6.0"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -369,10 +409,6 @@ criteria = "safe-to-deploy"
version = "0.2.12" version = "0.2.12"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.crc32fast]]
version = "1.4.2"
criteria = "safe-to-deploy"
[[exemptions.criterion]] [[exemptions.criterion]]
version = "0.5.1" version = "0.5.1"
criteria = "safe-to-run" criteria = "safe-to-run"
@ -513,10 +549,6 @@ criteria = "safe-to-deploy"
version = "0.4.2" version = "0.4.2"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.flate2]]
version = "1.0.30"
criteria = "safe-to-deploy"
[[exemptions.flume]] [[exemptions.flume]]
version = "0.10.14" version = "0.10.14"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -621,10 +653,6 @@ criteria = "safe-to-deploy"
version = "7.5.4" version = "7.5.4"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.hdwallet]]
version = "0.4.1"
criteria = "safe-to-deploy"
[[exemptions.heck]] [[exemptions.heck]]
version = "0.3.3" version = "0.3.3"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -905,10 +933,6 @@ criteria = "safe-to-deploy"
version = "0.2.1" version = "0.2.1"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.miniz_oxide]]
version = "0.7.4"
criteria = "safe-to-deploy"
[[exemptions.mio]] [[exemptions.mio]]
version = "0.8.11" version = "0.8.11"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1033,18 +1057,10 @@ criteria = "safe-to-deploy"
version = "0.9.10" version = "0.9.10"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.password-hash]]
version = "0.3.2"
criteria = "safe-to-deploy"
[[exemptions.pasta_curves]] [[exemptions.pasta_curves]]
version = "0.5.1" version = "0.5.1"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.pbkdf2]]
version = "0.10.1"
criteria = "safe-to-deploy"
[[exemptions.percent-encoding]] [[exemptions.percent-encoding]]
version = "2.3.1" version = "2.3.1"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1265,10 +1281,6 @@ criteria = "safe-to-deploy"
version = "0.8.37" version = "0.8.37"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.ring]]
version = "0.16.20"
criteria = "safe-to-deploy"
[[exemptions.ring]] [[exemptions.ring]]
version = "0.17.8" version = "0.17.8"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1461,10 +1473,6 @@ criteria = "safe-to-deploy"
version = "0.1.1" version = "0.1.1"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.spin]]
version = "0.5.2"
criteria = "safe-to-deploy"
[[exemptions.spin]] [[exemptions.spin]]
version = "0.9.8" version = "0.9.8"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1481,10 +1489,6 @@ criteria = "safe-to-deploy"
version = "0.8.0" version = "0.8.0"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.strsim]]
version = "0.11.1"
criteria = "safe-to-deploy"
[[exemptions.structopt]] [[exemptions.structopt]]
version = "0.3.26" version = "0.3.26"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1633,10 +1637,6 @@ criteria = "safe-to-deploy"
version = "0.1.27" version = "0.1.27"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.tracing-core]]
version = "0.1.32"
criteria = "safe-to-deploy"
[[exemptions.tracing-error]] [[exemptions.tracing-error]]
version = "0.2.0" version = "0.2.0"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1713,14 +1713,6 @@ criteria = "safe-to-deploy"
version = "0.5.1" version = "0.5.1"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
[[exemptions.unsafe-libyaml]]
version = "0.2.11"
criteria = "safe-to-deploy"
[[exemptions.untrusted]]
version = "0.7.1"
criteria = "safe-to-deploy"
[[exemptions.untrusted]] [[exemptions.untrusted]]
version = "0.9.0" version = "0.9.0"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"

View File

@ -1,6 +1,10 @@
# cargo-vet imports lock # cargo-vet imports lock
[[unpublished.zebra-scan]]
version = "0.1.0-alpha.8"
audited_as = "0.1.0-alpha.7"
[[publisher.cexpr]] [[publisher.cexpr]]
version = "0.6.0" version = "0.6.0"
when = "2021-10-11" when = "2021-10-11"
@ -9,22 +13,22 @@ user-login = "emilio"
user-name = "Emilio Cobos Álvarez" user-name = "Emilio Cobos Álvarez"
[[publisher.clap]] [[publisher.clap]]
version = "4.5.13" version = "4.5.18"
when = "2024-07-31" when = "2024-09-20"
user-id = 6743 user-id = 6743
user-login = "epage" user-login = "epage"
user-name = "Ed Page" user-name = "Ed Page"
[[publisher.clap_builder]] [[publisher.clap_builder]]
version = "4.5.13" version = "4.5.18"
when = "2024-07-31" when = "2024-09-20"
user-id = 6743 user-id = 6743
user-login = "epage" user-login = "epage"
user-name = "Ed Page" user-name = "Ed Page"
[[publisher.clap_derive]] [[publisher.clap_derive]]
version = "4.5.13" version = "4.5.18"
when = "2024-07-31" when = "2024-09-20"
user-id = 6743 user-id = 6743
user-login = "epage" user-login = "epage"
user-name = "Ed Page" user-name = "Ed Page"
@ -44,8 +48,8 @@ user-login = "hsivonen"
user-name = "Henri Sivonen" user-name = "Henri Sivonen"
[[publisher.serde_json]] [[publisher.serde_json]]
version = "1.0.122" version = "1.0.128"
when = "2024-08-01" when = "2024-09-04"
user-id = 3618 user-id = 3618
user-login = "dtolnay" user-login = "dtolnay"
user-name = "David Tolnay" user-name = "David Tolnay"
@ -58,15 +62,15 @@ user-login = "dtolnay"
user-name = "David Tolnay" user-name = "David Tolnay"
[[publisher.syn]] [[publisher.syn]]
version = "2.0.72" version = "2.0.79"
when = "2024-07-21" when = "2024-09-27"
user-id = 3618 user-id = 3618
user-login = "dtolnay" user-login = "dtolnay"
user-name = "David Tolnay" user-name = "David Tolnay"
[[publisher.tokio]] [[publisher.tokio]]
version = "1.39.2" version = "1.40.0"
when = "2024-07-27" when = "2024-08-30"
user-id = 6741 user-id = 6741
user-login = "Darksonn" user-login = "Darksonn"
user-name = "Alice Ryhl" user-name = "Alice Ryhl"
@ -85,6 +89,19 @@ user-id = 1139
user-login = "Manishearth" user-login = "Manishearth"
user-name = "Manish Goregaokar" user-name = "Manish Goregaokar"
[[audits.google.audits.adler]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
version = "1.0.2"
notes = '''
Grepped for `-i cipher`, `-i crypto`, `'\bfs\b'`, `'\bnet\b'`, `'\bunsafe\b'`
and there were no hits (except in comments and in the `README.md` file).
Note that some additional, internal notes about an older version of this crate
can be found at go/image-crate-chromium-security-review.
'''
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.async-stream]] [[audits.google.audits.async-stream]]
who = "Tyler Mandry <tmandry@google.com>" who = "Tyler Mandry <tmandry@google.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -146,6 +163,22 @@ version = "0.13.1"
notes = "Skimmed the uses of `std` to ensure that nothing untoward is happening. Code uses `forbid(unsafe_code)` and, indeed, there are no uses of `unsafe`" notes = "Skimmed the uses of `std` to ensure that nothing untoward is happening. Code uses `forbid(unsafe_code)` and, indeed, there are no uses of `unsafe`"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.bitflags]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
version = "1.3.2"
notes = """
Security review of earlier versions of the crate can be found at
(Google-internal, sorry): go/image-crate-chromium-security-review
The crate exposes a function marked as `unsafe`, but doesn't use any
`unsafe` blocks (except for tests of the single `unsafe` function). I
think this justifies marking this crate as `ub-risk-1`.
Additional review comments can be found at https://crrev.com/c/4723145/31
"""
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.bitflags]] [[audits.google.audits.bitflags]]
who = "Lukasz Anforowicz <lukasza@chromium.org>" who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -179,30 +212,21 @@ aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_p
[[audits.google.audits.bytemuck]] [[audits.google.audits.bytemuck]]
who = "Lukasz Anforowicz <lukasza@chromium.org>" who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
version = "1.14.3" version = "1.16.3"
notes = "Additional review notes may be found in https://crrev.com/c/5362675." notes = """
Review notes from the original audit (of 1.14.3) may be found in
https://crrev.com/c/5362675. Note that this audit has initially missed UB risk
that was fixed in 1.16.2 - see https://github.com/Lokathor/bytemuck/pull/258.
Because of this, the original audit has been edited to certify version `1.16.3`
instead (see also https://crrev.com/c/5771867).
"""
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.bytemuck]] [[audits.google.audits.byteorder]]
who = "Adrian Taylor <adetaylor@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.14.3 -> 1.15.0"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.bytemuck]]
who = "danakj <danakj@chromium.org>" who = "danakj <danakj@chromium.org>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "1.15.0 -> 1.16.0" version = "1.5.0"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" notes = "Unsafe review in https://crrev.com/c/5838022"
[[audits.google.audits.bytemuck]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.16.0 -> 1.16.1"
notes = """
The delta only adds `f16` and `f128` support (with some other minor changes)
and has no impact on the audit criteria.
"""
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.cast]] [[audits.google.audits.cast]]
@ -217,6 +241,18 @@ criteria = "safe-to-deploy"
version = "1.0.0" version = "1.0.0"
aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT"
[[audits.google.audits.crc32fast]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
version = "1.4.2"
notes = """
Security review of earlier versions of the crate can be found at
(Google-internal, sorry): go/image-crate-chromium-security-review
Audit comments for 1.4.2 can be found at https://crrev.com/c/4723145.
"""
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.equivalent]] [[audits.google.audits.equivalent]]
who = "George Burgess IV <gbiv@google.com>" who = "George Burgess IV <gbiv@google.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -233,6 +269,41 @@ that the RNG here is not cryptographically secure.
""" """
aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT"
[[audits.google.audits.flate2]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
version = "1.0.30"
notes = '''
WARNING: This certification is a result of a **partial** audit. The
`any_zlib` code has **not** been audited. Ability to track partial
audits is tracked in https://github.com/mozilla/cargo-vet/issues/380
Chromium does use the `any_zlib` feature(s). Accidentally depending on
this feature in the future is prevented using the `ban_features` feature
of `gnrt` - see:
https://crrev.com/c/4723145/31/third_party/rust/chromium_crates_io/gnrt_config.toml
Security review of earlier versions of the crate can be found at
(Google-internal, sorry): go/image-crate-chromium-security-review
I grepped for `-i cipher`, `-i crypto`, `'\bfs\b'`, `'\bnet\b'`, `'\bunsafe\b'`.
All `unsafe` in `flate2` is gated behind `#[cfg(feature = "any_zlib")]`:
* The code under `src/ffi/...` will not be used because the `mod c`
declaration in `src/ffi/mod.rs` depends on the `any_zlib` config
* 7 uses of `unsafe` in `src/mem.rs` also all depend on the
`any_zlib` config:
- 2 in `fn set_dictionary` (under `impl Compress`)
- 2 in `fn set_level` (under `impl Compress`)
- 3 in `fn set_dictionary` (under `impl Decompress`)
All hits of `'\bfs\b'` are in comments, or example code, or test code
(but not in product code).
There were no hits of `-i cipher`, `-i crypto`, `'\bnet\b'`.
'''
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.futures]] [[audits.google.audits.futures]]
who = "George Burgess IV <gbiv@google.com>" who = "George Burgess IV <gbiv@google.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -311,6 +382,22 @@ delta = "1.4.0 -> 1.5.0"
notes = "Unsafe review notes: https://crrev.com/c/5650836" notes = "Unsafe review notes: https://crrev.com/c/5650836"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.miniz_oxide]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
version = "0.7.4"
notes = '''
Grepped for `-i cipher`, `-i crypto`, `'\bfs\b'`, `'\bnet\b'`, `'\bunsafe\b'`
and there were no hits, except for some mentions of "unsafe" in the `README.md`
and in a comment in `src/deflate/core.rs`. The comment discusses whether a
function should be treated as unsafe, but there is no actual `unsafe` code, so
the crate meets the `ub-risk-0` criteria.
Note that some additional, internal notes about an older version of this crate
can be found at go/image-crate-chromium-security-review.
'''
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.nom]] [[audits.google.audits.nom]]
who = "danakj@chromium.org" who = "danakj@chromium.org"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -432,6 +519,16 @@ criteria = "safe-to-deploy"
delta = "1.0.35 -> 1.0.36" delta = "1.0.35 -> 1.0.36"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.quote]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.0.36 -> 1.0.37"
notes = """
The delta just 1) inlines/expands `impl ToTokens` that used to be handled via
`primitive!` macro and 2) adds `impl ToTokens` for `CStr` and `CString`.
"""
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.rustversion]] [[audits.google.audits.rustversion]]
who = "Lukasz Anforowicz <lukasza@chromium.org>" who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -541,6 +638,32 @@ criteria = "safe-to-deploy"
delta = "1.0.203 -> 1.0.204" delta = "1.0.203 -> 1.0.204"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.serde]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.0.204 -> 1.0.207"
notes = "The small change in `src/private/ser.rs` should have no impact on `ub-risk-2`."
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.serde]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.0.207 -> 1.0.209"
notes = """
The delta carries fairly small changes in `src/private/de.rs` and
`src/private/ser.rs` (see https://crrev.com/c/5812194/2..5). AFAICT the
delta has no impact on the `unsafe`, `from_utf8_unchecked`-related parts
of the crate (in `src/de/format.rs` and `src/ser/impls.rs`).
"""
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.serde]]
who = "Adrian Taylor <adetaylor@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.0.209 -> 1.0.210"
notes = "Almost no new code - just feature rearrangement"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.serde_derive]] [[audits.google.audits.serde_derive]]
who = "Lukasz Anforowicz <lukasza@chromium.org>" who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -573,6 +696,32 @@ criteria = "safe-to-deploy"
delta = "1.0.203 -> 1.0.204" delta = "1.0.203 -> 1.0.204"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.serde_derive]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.0.204 -> 1.0.207"
notes = 'Grepped for \"unsafe\", \"crypt\", \"cipher\", \"fs\", \"net\" - there were no hits'
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.serde_derive]]
who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.0.207 -> 1.0.209"
notes = '''
There are no code changes in this delta - see https://crrev.com/c/5812194/2..5
I've neverthless also grepped for `-i cipher`, `-i crypto`, `\bfs\b`,
`\bnet\b`, and `\bunsafe\b`. There were no hits.
'''
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.serde_derive]]
who = "Adrian Taylor <adetaylor@chromium.org>"
criteria = "safe-to-deploy"
delta = "1.0.209 -> 1.0.210"
notes = "Almost no new code - just feature rearrangement"
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
[[audits.google.audits.static_assertions]] [[audits.google.audits.static_assertions]]
who = "Lukasz Anforowicz <lukasza@chromium.org>" who = "Lukasz Anforowicz <lukasza@chromium.org>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -746,6 +895,12 @@ end = "2024-05-03"
notes = "All code written or reviewed by Manish" notes = "All code written or reviewed by Manish"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.allocator-api2]]
who = "Nicolas Silva <nical@fastmail.com>"
criteria = "safe-to-deploy"
version = "0.2.18"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.android_system_properties]] [[audits.mozilla.audits.android_system_properties]]
who = "Nicolas Silva <nical@fastmail.com>" who = "Nicolas Silva <nical@fastmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -834,6 +989,13 @@ version = "0.6.3"
notes = "Another crate I own via contain-rs that is ancient and in maintenance mode but otherwise perfectly fine." notes = "Another crate I own via contain-rs that is ancient and in maintenance mode but otherwise perfectly fine."
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.cfg_aliases]]
who = "Alex Franchuk <afranchuk@mozilla.com>"
criteria = "safe-to-deploy"
delta = "0.1.1 -> 0.2.1"
notes = "Very minor changes."
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.core-foundation]] [[audits.mozilla.audits.core-foundation]]
who = "Teodor Tanasoaia <ttanasoaia@mozilla.com>" who = "Teodor Tanasoaia <ttanasoaia@mozilla.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -871,6 +1033,12 @@ criteria = "safe-to-deploy"
delta = "1.9.0 -> 2.0.0" delta = "1.9.0 -> 2.0.0"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.fastrand]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "2.0.1 -> 2.1.0"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.fnv]] [[audits.mozilla.audits.fnv]]
who = "Bobby Holley <bobbyholley@gmail.com>" who = "Bobby Holley <bobbyholley@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -943,6 +1111,47 @@ delta = "0.4.18 -> 0.4.20"
notes = "Only cfg attribute and internal macro changes and module refactorings" notes = "Only cfg attribute and internal macro changes and module refactorings"
aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml"
[[audits.mozilla.audits.nix]]
who = "Gabriele Svelto <gsvelto@mozilla.com>"
criteria = "safe-to-deploy"
delta = "0.15.0 -> 0.25.0"
notes = "Plenty of new bindings but also several important bug fixes (including buffer overflows). New unsafe sections are restricted to wrappers and are no more dangerous than calling the C functions."
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.nix]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "0.25.0 -> 0.25.1"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.nix]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "0.25.1 -> 0.26.2"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.nix]]
who = "Gabriele Svelto <gsvelto@mozilla.com>"
criteria = "safe-to-deploy"
delta = "0.26.2 -> 0.27.1"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.nix]]
who = "Alex Franchuk <afranchuk@mozilla.com>"
criteria = "safe-to-deploy"
delta = "0.27.1 -> 0.28.0"
notes = """
Many new features and bugfixes. Obviously there's a lot of unsafe code calling
libc, but the usage looks correct.
"""
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.nix]]
who = "Alex Franchuk <afranchuk@mozilla.com>"
criteria = "safe-to-deploy"
delta = "0.28.0 -> 0.29.0"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.num-conv]] [[audits.mozilla.audits.num-conv]]
who = "Alex Franchuk <afranchuk@mozilla.com>" who = "Alex Franchuk <afranchuk@mozilla.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -970,6 +1179,12 @@ version = "1.1.0"
notes = "Straightforward crate with no unsafe code, does what it says on the tin." notes = "Straightforward crate with no unsafe code, does what it says on the tin."
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.strsim]]
who = "Ben Dean-Kawamura <bdk@mozilla.com>"
criteria = "safe-to-deploy"
delta = "0.10.0 -> 0.11.1"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.synstructure]] [[audits.mozilla.audits.synstructure]]
who = "Nika Layzell <nika@thelayzells.com>" who = "Nika Layzell <nika@thelayzells.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1017,6 +1232,17 @@ criteria = "safe-to-deploy"
delta = "0.2.10 -> 0.2.18" delta = "0.2.10 -> 0.2.18"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.tracing-core]]
who = "Alex Franchuk <afranchuk@mozilla.com>"
criteria = "safe-to-deploy"
version = "0.1.30"
notes = """
Most unsafe code is in implementing non-std sync primitives. Unsafe impls are
logically correct and justified in comments, and unsafe code is sound and
justified in comments.
"""
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"
[[audits.mozilla.audits.zerocopy]] [[audits.mozilla.audits.zerocopy]]
who = "Alex Franchuk <afranchuk@mozilla.com>" who = "Alex Franchuk <afranchuk@mozilla.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1043,6 +1269,22 @@ criteria = "safe-to-deploy"
delta = "1.2.0 -> 1.3.0" delta = "1.2.0 -> 1.3.0"
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.bip32]]
who = "Jack Grigg <jack@electriccoin.co>"
criteria = "safe-to-deploy"
version = "0.5.1"
notes = """
- Crate has no unsafe code, and sets `#![forbid(unsafe_code)]`.
- Crate has no powerful imports. Only filesystem acces is via `include_str!`, and is safe.
"""
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.bytes]]
who = "Jack Grigg <jack@electriccoin.co>"
criteria = "safe-to-deploy"
delta = "1.7.1 -> 1.7.2"
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"
[[audits.zcash.audits.fastrand]] [[audits.zcash.audits.fastrand]]
who = "Jack Grigg <jack@electriccoin.co>" who = "Jack Grigg <jack@electriccoin.co>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1050,26 +1292,11 @@ delta = "2.0.0 -> 2.0.1"
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"
[[audits.zcash.audits.fastrand]] [[audits.zcash.audits.fastrand]]
who = "Daira-Emma Hopwood <daira@jacaranda.org>" who = "Jack Grigg <jack@electriccoin.co>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
delta = "2.0.1 -> 2.0.2" delta = "2.1.0 -> 2.1.1"
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"
[[audits.zcash.audits.fastrand]]
who = "Daira-Emma Hopwood <daira@jacaranda.org>"
criteria = "safe-to-deploy"
delta = "2.0.2 -> 2.1.0"
notes = """
As noted in the changelog, this version produces different output for a given seed.
The documentation did not mention stability. It is possible that some uses relying on
determinism across the update would be broken.
The new constants do appear to match WyRand v4.2 (modulo ordering issues that I have not checked):
https://github.com/wangyi-fudan/wyhash/blob/408620b6d12b7d667b3dd6ae39b7929a39e8fa05/wyhash.h#L145
I have no way to check whether these constants are an improvement or not.
"""
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.futures]] [[audits.zcash.audits.futures]]
who = "Jack Grigg <jack@electriccoin.co>" who = "Jack Grigg <jack@electriccoin.co>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1190,6 +1417,12 @@ be set correctly by `cargo`.
""" """
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"
[[audits.zcash.audits.secp256k1]]
who = "Jack Grigg <jack@electriccoin.co>"
criteria = "safe-to-deploy"
delta = "0.26.0 -> 0.27.0"
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.signature]] [[audits.zcash.audits.signature]]
who = "Daira Emma Hopwood <daira@jacaranda.org>" who = "Daira Emma Hopwood <daira@jacaranda.org>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1268,6 +1501,34 @@ criteria = "safe-to-deploy"
delta = "0.12.0 -> 0.12.1" delta = "0.12.0 -> 0.12.1"
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml" aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.tracing-core]]
who = "Jack Grigg <jack@electriccoin.co>"
criteria = "safe-to-deploy"
delta = "0.1.30 -> 0.1.31"
notes = """
The only new `unsafe` block is to intentionally leak a scoped subscriber onto
the heap when setting it as the global default dispatcher. I checked that the
global default can only be set once and is never dropped.
"""
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"
[[audits.zcash.audits.tracing-core]]
who = "Jack Grigg <jack@electriccoin.co>"
criteria = "safe-to-deploy"
delta = "0.1.31 -> 0.1.32"
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"
[[audits.zcash.audits.visibility]]
who = "Kris Nuttycombe <kris@nutty.land>"
criteria = "safe-to-deploy"
version = "0.1.1"
notes = """
- Crate has no unsafe code, and sets `#![forbid(unsafe_code)]`.
- Crate has no powerful imports, and exclusively provides a proc macro
that safely malleates a visibility modifier.
"""
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.wagyu-zcash-parameters]] [[audits.zcash.audits.wagyu-zcash-parameters]]
who = "Sean Bowe <ewillbefull@gmail.com>" who = "Sean Bowe <ewillbefull@gmail.com>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"
@ -1316,6 +1577,40 @@ criteria = "safe-to-deploy"
version = "0.2.92" version = "0.2.92"
aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"
[[audits.zcash.audits.zcash_address]]
who = "Kris Nuttycombe <kris@nutty.land>"
criteria = "safe-to-deploy"
delta = "0.3.2 -> 0.4.0"
notes = "This release contains no unsafe code and consists soley of added convenience methods."
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.zcash_encoding]]
who = "Kris Nuttycombe <kris@nutty.land>"
criteria = "safe-to-deploy"
delta = "0.2.0 -> 0.2.1"
notes = "This release adds minor convenience methods and involves no unsafe code."
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.zcash_keys]]
who = "Kris Nuttycombe <kris@nutty.land>"
criteria = "safe-to-deploy"
delta = "0.2.0 -> 0.3.0"
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.zcash_primitives]]
who = "Kris Nuttycombe <kris@nutty.land>"
criteria = "safe-to-deploy"
delta = "0.15.1 -> 0.16.0"
notes = "The primary change here is the switch from the `hdwallet` dependency to using `bip32`."
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.zcash_proofs]]
who = "Kris Nuttycombe <kris@nutty.land>"
criteria = "safe-to-deploy"
delta = "0.15.0 -> 0.16.0"
notes = "This release involves only updates of previously-vetted dependencies."
aggregated-from = "https://raw.githubusercontent.com/zcash/librustzcash/main/supply-chain/audits.toml"
[[audits.zcash.audits.zerocopy]] [[audits.zcash.audits.zerocopy]]
who = "Daira-Emma Hopwood <daira@jacaranda.org>" who = "Daira-Emma Hopwood <daira@jacaranda.org>"
criteria = "safe-to-deploy" criteria = "safe-to-deploy"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "tower-batch-control" name = "tower-batch-control"
version = "0.2.41-beta.15" version = "0.2.41-beta.16"
authors = ["Zcash Foundation <zebra@zfnd.org>", "Tower Maintainers <team@tower-rs.com>"] authors = ["Zcash Foundation <zebra@zfnd.org>", "Tower Maintainers <team@tower-rs.com>"]
description = "Tower middleware for batch request processing" description = "Tower middleware for batch request processing"
# # Legal # # Legal
@ -26,8 +26,8 @@ futures = "0.3.30"
futures-core = "0.3.28" futures-core = "0.3.28"
pin-project = "1.1.5" pin-project = "1.1.5"
rayon = "1.10.0" rayon = "1.10.0"
tokio = { version = "1.39.2", features = ["time", "sync", "tracing", "macros"] } tokio = { version = "1.40.0", features = ["time", "sync", "tracing", "macros"] }
tokio-util = "0.7.11" tokio-util = "0.7.12"
tower = { version = "0.4.13", features = ["util", "buffer"] } tower = { version = "0.4.13", features = ["util", "buffer"] }
tracing = "0.1.39" tracing = "0.1.39"
tracing-futures = "0.2.5" tracing-futures = "0.2.5"
@ -41,12 +41,12 @@ tinyvec = { version = "1.8.0", features = ["rustc_1_55"] }
ed25519-zebra = "4.0.3" ed25519-zebra = "4.0.3"
rand = "0.8.5" rand = "0.8.5"
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
tokio-test = "0.4.4" tokio-test = "0.4.4"
tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.15" } tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.16" }
tower-test = "0.4.0" tower-test = "0.4.0"
zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40" }
[lints.rust] [lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "tower-fallback" name = "tower-fallback"
version = "0.2.41-beta.15" version = "0.2.41-beta.16"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "A Tower service combinator that sends requests to a first service, then retries processing on a second fallback service if the first service errors." description = "A Tower service combinator that sends requests to a first service, then retries processing on a second fallback service if the first service errors."
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -22,6 +22,6 @@ futures-core = "0.3.28"
tracing = "0.1.39" tracing = "0.1.39"
[dev-dependencies] [dev-dependencies]
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40" }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-chain" name = "zebra-chain"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "Core Zcash data structures" description = "Core Zcash data structures"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -87,16 +87,16 @@ group = "0.13.0"
incrementalmerkletree.workspace = true incrementalmerkletree.workspace = true
jubjub = "0.10.0" jubjub = "0.10.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"
tempfile = "3.11.0" tempfile = "3.13.0"
dirs = "5.0.1" dirs = "5.0.1"
num-integer = "0.1.46" num-integer = "0.1.46"
primitive-types = "0.12.2" primitive-types = "0.12.2"
rand_core = "0.6.4" rand_core = "0.6.4"
ripemd = "0.1.3" ripemd = "0.1.3"
# Matches version used by hdwallet # Matches version used by hdwallet
secp256k1 = { version = "0.26.0", features = ["serde"] } secp256k1 = { version = "0.27.0", features = ["serde"] }
sha2 = { version = "0.10.7", features = ["compress"] } sha2 = { version = "0.10.7", features = ["compress"] }
uint = "0.9.5" uint = "0.10.0"
x25519-dalek = { version = "2.0.1", features = ["serde"] } x25519-dalek = { version = "2.0.1", features = ["serde"] }
# ECC deps # ECC deps
@ -119,12 +119,12 @@ humantime = "2.1.0"
# Error Handling & Formatting # Error Handling & Formatting
static_assertions = "1.1.0" static_assertions = "1.1.0"
thiserror = "1.0.63" thiserror = "1.0.64"
tracing = "0.1.39" tracing = "0.1.39"
# Serialization # Serialization
hex = { version = "0.4.3", features = ["serde"] } hex = { version = "0.4.3", features = ["serde"] }
serde = { version = "1.0.204", features = ["serde_derive", "rc"] } serde = { version = "1.0.210", features = ["serde_derive", "rc"] }
serde_with = "3.9.0" serde_with = "3.9.0"
serde-big-array = "0.5.1" serde-big-array = "0.5.1"
@ -139,10 +139,10 @@ redjubjub = "0.7.0"
reddsa = "0.5.1" reddsa = "0.5.1"
# Production feature json-conversion # Production feature json-conversion
serde_json = { version = "1.0.122", optional = true } serde_json = { version = "1.0.128", optional = true }
# Production feature async-error and testing feature proptest-impl # Production feature async-error and testing feature proptest-impl
tokio = { version = "1.39.2", optional = true } tokio = { version = "1.40.0", optional = true }
# Experimental feature shielded-scan # Experimental feature shielded-scan
zcash_client_backend = { workspace = true, optional = true } zcash_client_backend = { workspace = true, optional = true }
@ -154,7 +154,7 @@ proptest-derive = { version = "0.5.0", optional = true }
rand = { version = "0.8.5", optional = true } rand = { version = "0.8.5", optional = true }
rand_chacha = { version = "0.3.1", optional = true } rand_chacha = { version = "0.3.1", optional = true }
zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.39", optional = true } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40", optional = true }
[dev-dependencies] [dev-dependencies]
# Benchmarks # Benchmarks
@ -175,9 +175,9 @@ proptest-derive = "0.5.0"
rand = "0.8.5" rand = "0.8.5"
rand_chacha = "0.3.1" rand_chacha = "0.3.1"
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40" }
orchard = { workspace = true, features = ["test-dependencies"] } orchard = { workspace = true, features = ["test-dependencies"] }

View File

@ -48,7 +48,10 @@ pub const POST_BLOSSOM_HALVING_INTERVAL: HeightDiff =
/// as specified in [protocol specification §7.10.1][7.10.1] /// as specified in [protocol specification §7.10.1][7.10.1]
/// ///
/// [7.10.1]: https://zips.z.cash/protocol/protocol.pdf#zip214fundingstreams /// [7.10.1]: https://zips.z.cash/protocol/protocol.pdf#zip214fundingstreams
pub const FIRST_HALVING_TESTNET: Height = Height(1_116_000); pub(crate) const FIRST_HALVING_TESTNET: Height = Height(1_116_000);
/// The first halving height in the regtest is at block height `287`.
const FIRST_HALVING_REGTEST: Height = Height(287);
/// The funding stream receiver categories. /// The funding stream receiver categories.
#[derive(Deserialize, Clone, Copy, Debug, Eq, Hash, PartialEq)] #[derive(Deserialize, Clone, Copy, Debug, Eq, Hash, PartialEq)]
@ -234,8 +237,7 @@ lazy_static! {
), ),
( (
FundingStreamReceiver::MajorGrants, FundingStreamReceiver::MajorGrants,
// TODO: Update these addresses FundingStreamRecipient::new(8, POST_NU6_FUNDING_STREAM_FPF_ADDRESSES_MAINNET),
FundingStreamRecipient::new(8, FUNDING_STREAM_MG_ADDRESSES_MAINNET),
), ),
] ]
.into_iter() .into_iter()
@ -379,6 +381,20 @@ pub trait ParameterSubsidy {
/// ///
/// [7.10]: <https://zips.z.cash/protocol/protocol.pdf#fundingstreams> /// [7.10]: <https://zips.z.cash/protocol/protocol.pdf#fundingstreams>
fn height_for_first_halving(&self) -> Height; fn height_for_first_halving(&self) -> Height;
/// Returns the halving interval after Blossom
fn post_blossom_halving_interval(&self) -> HeightDiff;
/// Returns the halving interval before Blossom
fn pre_blossom_halving_interval(&self) -> HeightDiff;
/// Returns the address change interval for funding streams
/// as described in [protocol specification §7.10][7.10].
///
/// > FSRecipientChangeInterval := PostBlossomHalvingInterval / 48
///
/// [7.10]: https://zips.z.cash/protocol/protocol.pdf#zip214fundingstreams
fn funding_stream_address_change_interval(&self) -> HeightDiff;
} }
/// Network methods related to Block Subsidy and Funding Streams /// Network methods related to Block Subsidy and Funding Streams
@ -391,10 +407,35 @@ impl ParameterSubsidy for Network {
Network::Mainnet => NetworkUpgrade::Canopy Network::Mainnet => NetworkUpgrade::Canopy
.activation_height(self) .activation_height(self)
.expect("canopy activation height should be available"), .expect("canopy activation height should be available"),
// TODO: Check what zcashd does here, consider adding a field to `testnet::Parameters` to make this configurable. Network::Testnet(params) => {
Network::Testnet(_params) => FIRST_HALVING_TESTNET, if params.is_regtest() {
FIRST_HALVING_REGTEST
} else if params.is_default_testnet() {
FIRST_HALVING_TESTNET
} else {
height_for_halving(1, self).expect("first halving height should be available")
}
}
} }
} }
fn post_blossom_halving_interval(&self) -> HeightDiff {
match self {
Network::Mainnet => POST_BLOSSOM_HALVING_INTERVAL,
Network::Testnet(params) => params.post_blossom_halving_interval(),
}
}
fn pre_blossom_halving_interval(&self) -> HeightDiff {
match self {
Network::Mainnet => PRE_BLOSSOM_HALVING_INTERVAL,
Network::Testnet(params) => params.pre_blossom_halving_interval(),
}
}
fn funding_stream_address_change_interval(&self) -> HeightDiff {
self.post_blossom_halving_interval() / 48
}
} }
/// List of addresses for the Zcash Foundation funding stream in the Mainnet. /// List of addresses for the Zcash Foundation funding stream in the Mainnet.
@ -405,6 +446,18 @@ pub const FUNDING_STREAM_ZF_ADDRESSES_MAINNET: [&str; FUNDING_STREAMS_NUM_ADDRES
pub const FUNDING_STREAM_MG_ADDRESSES_MAINNET: [&str; FUNDING_STREAMS_NUM_ADDRESSES_MAINNET] = pub const FUNDING_STREAM_MG_ADDRESSES_MAINNET: [&str; FUNDING_STREAMS_NUM_ADDRESSES_MAINNET] =
["t3XyYW8yBFRuMnfvm5KLGFbEVz25kckZXym"; FUNDING_STREAMS_NUM_ADDRESSES_MAINNET]; ["t3XyYW8yBFRuMnfvm5KLGFbEVz25kckZXym"; FUNDING_STREAMS_NUM_ADDRESSES_MAINNET];
/// Number of addresses for each post-NU6 funding stream on Mainnet.
/// In the spec ([protocol specification §7.10][7.10]) this is defined as: `fs.addressindex(fs.endheight - 1)`
/// however we know this value beforehand so we prefer to make it a constant instead.
///
/// [7.10]: https://zips.z.cash/protocol/protocol.pdf#fundingstreams
pub const POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_MAINNET: usize = 12;
/// List of addresses for the Major Grants post-NU6 funding stream on Mainnet administered by the Financial Privacy Fund (FPF).
pub const POST_NU6_FUNDING_STREAM_FPF_ADDRESSES_MAINNET: [&str;
POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_MAINNET] =
["t3cFfPt1Bcvgez9ZbMBFWeZsskxTkPzGCow"; POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_MAINNET];
/// Number of addresses for each funding stream in the Testnet. /// Number of addresses for each funding stream in the Testnet.
/// In the spec ([protocol specification §7.10][7.10]) this is defined as: `fs.addressindex(fs.endheight - 1)` /// In the spec ([protocol specification §7.10][7.10]) this is defined as: `fs.addressindex(fs.endheight - 1)`
/// however we know this value beforehand so we prefer to make it a constant instead. /// however we know this value beforehand so we prefer to make it a constant instead.
@ -482,7 +535,7 @@ pub const FUNDING_STREAM_MG_ADDRESSES_TESTNET: [&str; FUNDING_STREAMS_NUM_ADDRES
/// [7.10]: https://zips.z.cash/protocol/protocol.pdf#fundingstreams /// [7.10]: https://zips.z.cash/protocol/protocol.pdf#fundingstreams
pub const POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_TESTNET: usize = 13; pub const POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_TESTNET: usize = 13;
/// List of addresses for the Major Grants post-NU6 funding stream in the Testnet administered by the Financial Privacy Fund (FPF). /// List of addresses for the Major Grants post-NU6 funding stream on Testnet administered by the Financial Privacy Fund (FPF).
pub const POST_NU6_FUNDING_STREAM_FPF_ADDRESSES_TESTNET: [&str; pub const POST_NU6_FUNDING_STREAM_FPF_ADDRESSES_TESTNET: [&str;
POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_TESTNET] = POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_TESTNET] =
["t2HifwjUj9uyxr9bknR8LFuQbc98c3vkXtu"; POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_TESTNET]; ["t2HifwjUj9uyxr9bknR8LFuQbc98c3vkXtu"; POST_NU6_FUNDING_STREAMS_NUM_ADDRESSES_TESTNET];
@ -503,10 +556,54 @@ pub fn funding_stream_address_period<N: ParameterSubsidy>(height: Height, networ
let height_after_first_halving = height - network.height_for_first_halving(); let height_after_first_halving = height - network.height_for_first_halving();
let address_period = (height_after_first_halving + POST_BLOSSOM_HALVING_INTERVAL) let address_period = (height_after_first_halving + network.post_blossom_halving_interval())
/ FUNDING_STREAM_ADDRESS_CHANGE_INTERVAL; / network.funding_stream_address_change_interval();
address_period address_period
.try_into() .try_into()
.expect("all values are positive and smaller than the input height") .expect("all values are positive and smaller than the input height")
} }
/// The first block height of the halving at the provided halving index for a network.
///
/// See `Halving(height)`, as described in [protocol specification §7.8][7.8]
///
/// [7.8]: https://zips.z.cash/protocol/protocol.pdf#subsidies
pub fn height_for_halving(halving: u32, network: &Network) -> Option<Height> {
if halving == 0 {
return Some(Height(0));
}
let slow_start_shift = i64::from(network.slow_start_shift().0);
let blossom_height = i64::from(
NetworkUpgrade::Blossom
.activation_height(network)
.expect("blossom activation height should be available")
.0,
);
let pre_blossom_halving_interval = network.pre_blossom_halving_interval();
let halving_index = i64::from(halving);
let unscaled_height = halving_index
.checked_mul(pre_blossom_halving_interval)
.expect("Multiplication overflow: consider reducing the halving interval");
let pre_blossom_height = unscaled_height
.min(blossom_height)
.checked_add(slow_start_shift)
.expect("Addition overflow: consider reducing the halving interval");
let post_blossom_height = 0
.max(unscaled_height - blossom_height)
.checked_mul(i64::from(BLOSSOM_POW_TARGET_SPACING_RATIO))
.expect("Multiplication overflow: consider reducing the halving interval")
.checked_add(slow_start_shift)
.expect("Addition overflow: consider reducing the halving interval");
let height = pre_blossom_height
.checked_add(post_blossom_height)
.expect("Addition overflow: consider reducing the halving interval");
let height = u32::try_from(height).ok()?;
height.try_into().ok()
}

View File

@ -2,7 +2,7 @@
use std::{collections::BTreeMap, fmt}; use std::{collections::BTreeMap, fmt};
use crate::{ use crate::{
block::{self, Height}, block::{self, Height, HeightDiff},
parameters::{ parameters::{
constants::{magics, SLOW_START_INTERVAL, SLOW_START_SHIFT}, constants::{magics, SLOW_START_INTERVAL, SLOW_START_SHIFT},
network_upgrade::TESTNET_ACTIVATION_HEIGHTS, network_upgrade::TESTNET_ACTIVATION_HEIGHTS,
@ -15,9 +15,11 @@ use crate::{
use super::{ use super::{
magic::Magic, magic::Magic,
subsidy::{ subsidy::{
FundingStreamReceiver, FundingStreamRecipient, FundingStreams, ParameterSubsidy, FundingStreamReceiver, FundingStreamRecipient, FundingStreams,
FIRST_HALVING_TESTNET, POST_NU6_FUNDING_STREAMS_MAINNET, POST_NU6_FUNDING_STREAMS_TESTNET, BLOSSOM_POW_TARGET_SPACING_RATIO, POST_BLOSSOM_HALVING_INTERVAL,
PRE_NU6_FUNDING_STREAMS_MAINNET, PRE_NU6_FUNDING_STREAMS_TESTNET, POST_NU6_FUNDING_STREAMS_MAINNET, POST_NU6_FUNDING_STREAMS_TESTNET,
PRE_BLOSSOM_HALVING_INTERVAL, PRE_NU6_FUNDING_STREAMS_MAINNET,
PRE_NU6_FUNDING_STREAMS_TESTNET,
}, },
}; };
@ -50,14 +52,9 @@ const REGTEST_GENESIS_HASH: &str =
const TESTNET_GENESIS_HASH: &str = const TESTNET_GENESIS_HASH: &str =
"05a60a92d99d85997cce3b87616c089f6124d7342af37106edc76126334a2c38"; "05a60a92d99d85997cce3b87616c089f6124d7342af37106edc76126334a2c38";
/// Used to validate number of funding stream recipient addresses on configured Testnets. /// The halving height interval in the regtest is 6 hours.
struct TestnetParameterSubsidyImpl; /// [zcashd regtest halving interval](https://github.com/zcash/zcash/blob/v5.10.0/src/consensus/params.h#L252)
const PRE_BLOSSOM_REGTEST_HALVING_INTERVAL: HeightDiff = 144;
impl ParameterSubsidy for TestnetParameterSubsidyImpl {
fn height_for_first_halving(&self) -> Height {
FIRST_HALVING_TESTNET
}
}
/// Configurable funding stream recipient for configured Testnets. /// Configurable funding stream recipient for configured Testnets.
#[derive(Deserialize, Clone, Debug)] #[derive(Deserialize, Clone, Debug)]
@ -92,9 +89,22 @@ pub struct ConfiguredFundingStreams {
} }
impl ConfiguredFundingStreams { impl ConfiguredFundingStreams {
/// Returns an empty [`ConfiguredFundingStreams`].
fn empty() -> Self {
Self {
height_range: None,
recipients: Some(Vec::new()),
}
}
/// Converts a [`ConfiguredFundingStreams`] to a [`FundingStreams`], using the provided default values /// Converts a [`ConfiguredFundingStreams`] to a [`FundingStreams`], using the provided default values
/// if `height_range` or `recipients` are None. /// if `height_range` or `recipients` are None.
fn convert_with_default(self, default_funding_streams: FundingStreams) -> FundingStreams { fn convert_with_default(
self,
default_funding_streams: FundingStreams,
parameters_builder: &ParametersBuilder,
) -> FundingStreams {
let network = parameters_builder.to_network_unchecked();
let height_range = self let height_range = self
.height_range .height_range
.unwrap_or(default_funding_streams.height_range().clone()); .unwrap_or(default_funding_streams.height_range().clone());
@ -116,43 +126,7 @@ impl ConfiguredFundingStreams {
let funding_streams = FundingStreams::new(height_range.clone(), recipients); let funding_streams = FundingStreams::new(height_range.clone(), recipients);
// check that receivers have enough addresses. check_funding_stream_address_period(&funding_streams, &network);
let expected_min_num_addresses =
1u32.checked_add(funding_stream_address_period(
height_range
.end
.previous()
.expect("end height must be above start height and genesis height"),
&TestnetParameterSubsidyImpl,
))
.expect("no overflow should happen in this sum")
.checked_sub(funding_stream_address_period(
height_range.start,
&TestnetParameterSubsidyImpl,
))
.expect("no overflow should happen in this sub") as usize;
for (&receiver, recipient) in funding_streams.recipients() {
if receiver == FundingStreamReceiver::Deferred {
// The `Deferred` receiver doesn't need any addresses.
continue;
}
assert!(
recipient.addresses().len() >= expected_min_num_addresses,
"recipients must have a sufficient number of addresses for height range, \
minimum num addresses required: {expected_min_num_addresses}"
);
for address in recipient.addresses() {
assert_eq!(
address.network_kind(),
NetworkKind::Testnet,
"configured funding stream addresses must be for Testnet"
);
}
}
// check that sum of receiver numerators is valid. // check that sum of receiver numerators is valid.
@ -172,6 +146,44 @@ impl ConfiguredFundingStreams {
} }
} }
/// Checks that the provided [`FundingStreams`] has sufficient recipient addresses for the
/// funding stream address period of the provided [`Network`].
fn check_funding_stream_address_period(funding_streams: &FundingStreams, network: &Network) {
let height_range = funding_streams.height_range();
let expected_min_num_addresses =
1u32.checked_add(funding_stream_address_period(
height_range
.end
.previous()
.expect("end height must be above start height and genesis height"),
network,
))
.expect("no overflow should happen in this sum")
.checked_sub(funding_stream_address_period(height_range.start, network))
.expect("no overflow should happen in this sub") as usize;
for (&receiver, recipient) in funding_streams.recipients() {
if receiver == FundingStreamReceiver::Deferred {
// The `Deferred` receiver doesn't need any addresses.
continue;
}
assert!(
recipient.addresses().len() >= expected_min_num_addresses,
"recipients must have a sufficient number of addresses for height range, \
minimum num addresses required: {expected_min_num_addresses}"
);
for address in recipient.addresses() {
assert_eq!(
address.network_kind(),
NetworkKind::Testnet,
"configured funding stream addresses must be for Testnet"
);
}
}
}
/// Configurable activation heights for Regtest and configured Testnets. /// Configurable activation heights for Regtest and configured Testnets.
#[derive(Deserialize, Default, Clone)] #[derive(Deserialize, Default, Clone)]
#[serde(rename_all = "PascalCase", deny_unknown_fields)] #[serde(rename_all = "PascalCase", deny_unknown_fields)]
@ -213,10 +225,17 @@ pub struct ParametersBuilder {
pre_nu6_funding_streams: FundingStreams, pre_nu6_funding_streams: FundingStreams,
/// Post-NU6 funding streams for this network /// Post-NU6 funding streams for this network
post_nu6_funding_streams: FundingStreams, post_nu6_funding_streams: FundingStreams,
/// A flag indicating whether to allow changes to fields that affect
/// the funding stream address period.
should_lock_funding_stream_address_period: bool,
/// Target difficulty limit for this network /// Target difficulty limit for this network
target_difficulty_limit: ExpandedDifficulty, target_difficulty_limit: ExpandedDifficulty,
/// A flag for disabling proof-of-work checks when Zebra is validating blocks /// A flag for disabling proof-of-work checks when Zebra is validating blocks
disable_pow: bool, disable_pow: bool,
/// The pre-Blossom halving interval for this network
pre_blossom_halving_interval: HeightDiff,
/// The post-Blossom halving interval for this network
post_blossom_halving_interval: HeightDiff,
} }
impl Default for ParametersBuilder { impl Default for ParametersBuilder {
@ -249,6 +268,9 @@ impl Default for ParametersBuilder {
disable_pow: false, disable_pow: false,
pre_nu6_funding_streams: PRE_NU6_FUNDING_STREAMS_TESTNET.clone(), pre_nu6_funding_streams: PRE_NU6_FUNDING_STREAMS_TESTNET.clone(),
post_nu6_funding_streams: POST_NU6_FUNDING_STREAMS_TESTNET.clone(), post_nu6_funding_streams: POST_NU6_FUNDING_STREAMS_TESTNET.clone(),
should_lock_funding_stream_address_period: false,
pre_blossom_halving_interval: PRE_BLOSSOM_HALVING_INTERVAL,
post_blossom_halving_interval: POST_BLOSSOM_HALVING_INTERVAL,
} }
} }
} }
@ -318,6 +340,10 @@ impl ParametersBuilder {
) -> Self { ) -> Self {
use NetworkUpgrade::*; use NetworkUpgrade::*;
if self.should_lock_funding_stream_address_period {
panic!("activation heights on ParametersBuilder must not be set after setting funding streams");
}
// # Correctness // # Correctness
// //
// These must be in order so that later network upgrades overwrite prior ones // These must be in order so that later network upgrades overwrite prior ones
@ -377,7 +403,8 @@ impl ParametersBuilder {
funding_streams: ConfiguredFundingStreams, funding_streams: ConfiguredFundingStreams,
) -> Self { ) -> Self {
self.pre_nu6_funding_streams = self.pre_nu6_funding_streams =
funding_streams.convert_with_default(PRE_NU6_FUNDING_STREAMS_TESTNET.clone()); funding_streams.convert_with_default(PRE_NU6_FUNDING_STREAMS_TESTNET.clone(), &self);
self.should_lock_funding_stream_address_period = true;
self self
} }
@ -387,7 +414,8 @@ impl ParametersBuilder {
funding_streams: ConfiguredFundingStreams, funding_streams: ConfiguredFundingStreams,
) -> Self { ) -> Self {
self.post_nu6_funding_streams = self.post_nu6_funding_streams =
funding_streams.convert_with_default(POST_NU6_FUNDING_STREAMS_TESTNET.clone()); funding_streams.convert_with_default(POST_NU6_FUNDING_STREAMS_TESTNET.clone(), &self);
self.should_lock_funding_stream_address_period = true;
self self
} }
@ -411,8 +439,20 @@ impl ParametersBuilder {
self self
} }
/// Sets the pre and post Blosssom halving intervals to be used in the [`Parameters`] being built.
pub fn with_halving_interval(mut self, pre_blossom_halving_interval: HeightDiff) -> Self {
if self.should_lock_funding_stream_address_period {
panic!("halving interval on ParametersBuilder must not be set after setting funding streams");
}
self.pre_blossom_halving_interval = pre_blossom_halving_interval;
self.post_blossom_halving_interval =
self.pre_blossom_halving_interval * (BLOSSOM_POW_TARGET_SPACING_RATIO as HeightDiff);
self
}
/// Converts the builder to a [`Parameters`] struct /// Converts the builder to a [`Parameters`] struct
pub fn finish(self) -> Parameters { fn finish(self) -> Parameters {
let Self { let Self {
network_name, network_name,
network_magic, network_magic,
@ -421,8 +461,11 @@ impl ParametersBuilder {
slow_start_interval, slow_start_interval,
pre_nu6_funding_streams, pre_nu6_funding_streams,
post_nu6_funding_streams, post_nu6_funding_streams,
should_lock_funding_stream_address_period: _,
target_difficulty_limit, target_difficulty_limit,
disable_pow, disable_pow,
pre_blossom_halving_interval,
post_blossom_halving_interval,
} = self; } = self;
Parameters { Parameters {
network_name, network_name,
@ -435,12 +478,29 @@ impl ParametersBuilder {
post_nu6_funding_streams, post_nu6_funding_streams,
target_difficulty_limit, target_difficulty_limit,
disable_pow, disable_pow,
pre_blossom_halving_interval,
post_blossom_halving_interval,
} }
} }
/// Converts the builder to a configured [`Network::Testnet`] /// Converts the builder to a configured [`Network::Testnet`]
fn to_network_unchecked(&self) -> Network {
Network::new_configured_testnet(self.clone().finish())
}
/// Checks funding streams and converts the builder to a configured [`Network::Testnet`]
pub fn to_network(self) -> Network { pub fn to_network(self) -> Network {
Network::new_configured_testnet(self.finish()) let network = self.to_network_unchecked();
// Final check that the configured funding streams will be valid for these Testnet parameters.
// TODO: Always check funding stream address period once the testnet parameters are being serialized (#8920).
#[cfg(not(any(test, feature = "proptest-impl")))]
{
check_funding_stream_address_period(&self.pre_nu6_funding_streams, &network);
check_funding_stream_address_period(&self.post_nu6_funding_streams, &network);
}
network
} }
/// Returns true if these [`Parameters`] should be compatible with the default Testnet parameters. /// Returns true if these [`Parameters`] should be compatible with the default Testnet parameters.
@ -453,8 +513,11 @@ impl ParametersBuilder {
slow_start_interval, slow_start_interval,
pre_nu6_funding_streams, pre_nu6_funding_streams,
post_nu6_funding_streams, post_nu6_funding_streams,
should_lock_funding_stream_address_period: _,
target_difficulty_limit, target_difficulty_limit,
disable_pow, disable_pow,
pre_blossom_halving_interval,
post_blossom_halving_interval,
} = Self::default(); } = Self::default();
self.activation_heights == activation_heights self.activation_heights == activation_heights
@ -465,6 +528,8 @@ impl ParametersBuilder {
&& self.post_nu6_funding_streams == post_nu6_funding_streams && self.post_nu6_funding_streams == post_nu6_funding_streams
&& self.target_difficulty_limit == target_difficulty_limit && self.target_difficulty_limit == target_difficulty_limit
&& self.disable_pow == disable_pow && self.disable_pow == disable_pow
&& self.pre_blossom_halving_interval == pre_blossom_halving_interval
&& self.post_blossom_halving_interval == post_blossom_halving_interval
} }
} }
@ -495,6 +560,10 @@ pub struct Parameters {
target_difficulty_limit: ExpandedDifficulty, target_difficulty_limit: ExpandedDifficulty,
/// A flag for disabling proof-of-work checks when Zebra is validating blocks /// A flag for disabling proof-of-work checks when Zebra is validating blocks
disable_pow: bool, disable_pow: bool,
/// Pre-Blossom halving interval for this network
pre_blossom_halving_interval: HeightDiff,
/// Post-Blossom halving interval for this network
post_blossom_halving_interval: HeightDiff,
} }
impl Default for Parameters { impl Default for Parameters {
@ -523,24 +592,32 @@ impl Parameters {
#[cfg(any(test, feature = "proptest-impl"))] #[cfg(any(test, feature = "proptest-impl"))]
let nu5_activation_height = nu5_activation_height.or(Some(100)); let nu5_activation_height = nu5_activation_height.or(Some(100));
let parameters = Self::build()
.with_genesis_hash(REGTEST_GENESIS_HASH)
// This value is chosen to match zcashd, see: <https://github.com/zcash/zcash/blob/master/src/chainparams.cpp#L654>
.with_target_difficulty_limit(U256::from_big_endian(&[0x0f; 32]))
.with_disable_pow(true)
.with_slow_start_interval(Height::MIN)
// Removes default Testnet activation heights if not configured,
// most network upgrades are disabled by default for Regtest in zcashd
.with_activation_heights(ConfiguredActivationHeights {
canopy: Some(1),
nu5: nu5_activation_height,
nu6: nu6_activation_height,
..Default::default()
})
.with_halving_interval(PRE_BLOSSOM_REGTEST_HALVING_INTERVAL);
// TODO: Always clear funding streams on Regtest once the testnet parameters are being serialized (#8920).
// #[cfg(not(any(test, feature = "proptest-impl")))]
let parameters = parameters
.with_pre_nu6_funding_streams(ConfiguredFundingStreams::empty())
.with_post_nu6_funding_streams(ConfiguredFundingStreams::empty());
Self { Self {
network_name: "Regtest".to_string(), network_name: "Regtest".to_string(),
network_magic: magics::REGTEST, network_magic: magics::REGTEST,
..Self::build() ..parameters.finish()
.with_genesis_hash(REGTEST_GENESIS_HASH)
// This value is chosen to match zcashd, see: <https://github.com/zcash/zcash/blob/master/src/chainparams.cpp#L654>
.with_target_difficulty_limit(U256::from_big_endian(&[0x0f; 32]))
.with_disable_pow(true)
.with_slow_start_interval(Height::MIN)
// Removes default Testnet activation heights if not configured,
// most network upgrades are disabled by default for Regtest in zcashd
.with_activation_heights(ConfiguredActivationHeights {
canopy: Some(1),
nu5: nu5_activation_height,
nu6: nu6_activation_height,
..Default::default()
})
.finish()
} }
} }
@ -568,6 +645,8 @@ impl Parameters {
post_nu6_funding_streams, post_nu6_funding_streams,
target_difficulty_limit, target_difficulty_limit,
disable_pow, disable_pow,
pre_blossom_halving_interval,
post_blossom_halving_interval,
} = Self::new_regtest(None, None); } = Self::new_regtest(None, None);
self.network_name == network_name self.network_name == network_name
@ -578,6 +657,8 @@ impl Parameters {
&& self.post_nu6_funding_streams == post_nu6_funding_streams && self.post_nu6_funding_streams == post_nu6_funding_streams
&& self.target_difficulty_limit == target_difficulty_limit && self.target_difficulty_limit == target_difficulty_limit
&& self.disable_pow == disable_pow && self.disable_pow == disable_pow
&& self.pre_blossom_halving_interval == pre_blossom_halving_interval
&& self.post_blossom_halving_interval == post_blossom_halving_interval
} }
/// Returns the network name /// Returns the network name
@ -629,6 +710,16 @@ impl Parameters {
pub fn disable_pow(&self) -> bool { pub fn disable_pow(&self) -> bool {
self.disable_pow self.disable_pow
} }
/// Returns the pre-Blossom halving interval for this network
pub fn pre_blossom_halving_interval(&self) -> HeightDiff {
self.pre_blossom_halving_interval
}
/// Returns the post-Blossom halving interval for this network
pub fn post_blossom_halving_interval(&self) -> HeightDiff {
self.post_blossom_halving_interval
}
} }
impl Network { impl Network {

View File

@ -139,7 +139,7 @@ fn activates_network_upgrades_correctly() {
let expected_default_regtest_activation_heights = &[ let expected_default_regtest_activation_heights = &[
(Height(0), NetworkUpgrade::Genesis), (Height(0), NetworkUpgrade::Genesis),
(Height(1), NetworkUpgrade::Canopy), (Height(1), NetworkUpgrade::Canopy),
// TODO: Remove this once the testnet parameters are being serialized. // TODO: Remove this once the testnet parameters are being serialized (#8920).
(Height(100), NetworkUpgrade::Nu5), (Height(100), NetworkUpgrade::Nu5),
]; ];

View File

@ -59,6 +59,7 @@ pub enum NetworkUpgrade {
#[serde(rename = "NU5")] #[serde(rename = "NU5")]
Nu5, Nu5,
/// The Zcash protocol after the NU6 upgrade. /// The Zcash protocol after the NU6 upgrade.
#[serde(rename = "NU6")]
Nu6, Nu6,
} }

View File

@ -457,10 +457,7 @@ impl ExpandedDifficulty {
/// Zebra displays difficulties in big-endian byte-order, /// Zebra displays difficulties in big-endian byte-order,
/// following the u256 convention set by Bitcoin and zcashd. /// following the u256 convention set by Bitcoin and zcashd.
pub fn bytes_in_display_order(&self) -> [u8; 32] { pub fn bytes_in_display_order(&self) -> [u8; 32] {
let mut reversed_bytes = [0; 32]; self.0.to_big_endian()
self.0.to_big_endian(&mut reversed_bytes);
reversed_bytes
} }
/// Convert bytes in big-endian byte-order into an [`ExpandedDifficulty`]. /// Convert bytes in big-endian byte-order into an [`ExpandedDifficulty`].

View File

@ -4,6 +4,7 @@
#![allow(clippy::all)] #![allow(clippy::all)]
#![allow(clippy::range_plus_one)] #![allow(clippy::range_plus_one)]
#![allow(clippy::fallible_impl_from)] #![allow(clippy::fallible_impl_from)]
#![allow(missing_docs)]
use uint::construct_uint; use uint::construct_uint;

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-consensus" name = "zebra-consensus"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "Implementation of Zcash consensus checks" description = "Implementation of Zcash consensus checks"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -53,13 +53,13 @@ rayon = "1.10.0"
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] } chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] }
lazy_static = "1.4.0" lazy_static = "1.4.0"
once_cell = "1.18.0" once_cell = "1.18.0"
serde = { version = "1.0.204", features = ["serde_derive"] } serde = { version = "1.0.210", features = ["serde_derive"] }
futures = "0.3.30" futures = "0.3.30"
futures-util = "0.3.28" futures-util = "0.3.28"
metrics = "0.23.0" metrics = "0.23.0"
thiserror = "1.0.63" thiserror = "1.0.64"
tokio = { version = "1.39.2", features = ["time", "sync", "tracing", "rt-multi-thread"] } tokio = { version = "1.40.0", features = ["time", "sync", "tracing", "rt-multi-thread"] }
tower = { version = "0.4.13", features = ["timeout", "util", "buffer"] } tower = { version = "0.4.13", features = ["timeout", "util", "buffer"] }
tracing = "0.1.39" tracing = "0.1.39"
tracing-futures = "0.2.5" tracing-futures = "0.2.5"
@ -70,13 +70,13 @@ orchard.workspace = true
zcash_proofs = { workspace = true, features = ["multicore" ] } zcash_proofs = { workspace = true, features = ["multicore" ] }
wagyu-zcash-parameters = "0.2.0" wagyu-zcash-parameters = "0.2.0"
tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.15" } tower-fallback = { path = "../tower-fallback/", version = "0.2.41-beta.16" }
tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.15" } tower-batch-control = { path = "../tower-batch-control/", version = "0.2.41-beta.16" }
zebra-script = { path = "../zebra-script", version = "1.0.0-beta.39" } zebra-script = { path = "../zebra-script", version = "1.0.0-beta.40" }
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.39" } zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40" }
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.39" } zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.40" }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39" } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40" }
# prod feature progress-bar # prod feature progress-bar
howudoin = { version = "0.1.2", optional = true } howudoin = { version = "0.1.2", optional = true }
@ -97,10 +97,10 @@ proptest = "1.4.0"
proptest-derive = "0.5.0" proptest-derive = "0.5.0"
spandoc = "0.2.2" spandoc = "0.2.2"
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
tracing-error = "0.2.0" tracing-error = "0.2.0"
tracing-subscriber = "0.3.18" tracing-subscriber = "0.3.18"
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.39", features = ["proptest-impl"] } zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40", features = ["proptest-impl"] }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39", features = ["proptest-impl"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = ["proptest-impl"] }
zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40" }

View File

@ -23,40 +23,39 @@ use crate::{block::SubsidyError, funding_stream_values};
/// ///
/// Returns `None` if the divisor would overflow a `u64`. /// Returns `None` if the divisor would overflow a `u64`.
pub fn halving_divisor(height: Height, network: &Network) -> Option<u64> { pub fn halving_divisor(height: Height, network: &Network) -> Option<u64> {
// Some far-future shifts can be more than 63 bits
1u64.checked_shl(num_halvings(height, network))
}
/// The halving index for a block height and network.
///
/// `Halving(height)`, as described in [protocol specification §7.8][7.8]
///
/// [7.8]: https://zips.z.cash/protocol/protocol.pdf#subsidies
pub fn num_halvings(height: Height, network: &Network) -> u32 {
let slow_start_shift = network.slow_start_shift();
let blossom_height = Blossom let blossom_height = Blossom
.activation_height(network) .activation_height(network)
.expect("blossom activation height should be available"); .expect("blossom activation height should be available");
if height < blossom_height { let halving_index = if height < slow_start_shift {
let pre_blossom_height = height - network.slow_start_shift(); 0
let halving_shift = pre_blossom_height / PRE_BLOSSOM_HALVING_INTERVAL; } else if height < blossom_height {
let pre_blossom_height = height - slow_start_shift;
let halving_div = 1u64 pre_blossom_height / network.pre_blossom_halving_interval()
.checked_shl(
halving_shift
.try_into()
.expect("already checked for negatives"),
)
.expect("pre-blossom heights produce small shifts");
Some(halving_div)
} else { } else {
let pre_blossom_height = blossom_height - network.slow_start_shift(); let pre_blossom_height = blossom_height - slow_start_shift;
let scaled_pre_blossom_height = let scaled_pre_blossom_height =
pre_blossom_height * HeightDiff::from(BLOSSOM_POW_TARGET_SPACING_RATIO); pre_blossom_height * HeightDiff::from(BLOSSOM_POW_TARGET_SPACING_RATIO);
let post_blossom_height = height - blossom_height; let post_blossom_height = height - blossom_height;
let halving_shift = (scaled_pre_blossom_height + post_blossom_height) / network.post_blossom_halving_interval()
(scaled_pre_blossom_height + post_blossom_height) / POST_BLOSSOM_HALVING_INTERVAL; };
// Some far-future shifts can be more than 63 bits halving_index
1u64.checked_shl( .try_into()
halving_shift .expect("already checked for negatives")
.try_into()
.expect("already checked for negatives"),
)
}
} }
/// `BlockSubsidy(height)` as described in [protocol specification §7.8][7.8] /// `BlockSubsidy(height)` as described in [protocol specification §7.8][7.8]
@ -503,4 +502,33 @@ mod test {
Ok(()) Ok(())
} }
#[test]
fn check_height_for_num_halvings() {
for network in Network::iter() {
for halving in 1..1000 {
let Some(height_for_halving) =
zebra_chain::parameters::subsidy::height_for_halving(halving, &network)
else {
panic!("could not find height for halving {halving}");
};
let prev_height = height_for_halving
.previous()
.expect("there should be a previous height");
assert_eq!(
halving,
num_halvings(height_for_halving, &network),
"num_halvings should match the halving index"
);
assert_eq!(
halving - 1,
num_halvings(prev_height, &network),
"num_halvings for the prev height should be 1 less than the halving index"
);
}
}
}
} }

View File

@ -12177,3 +12177,129 @@
2624406 0000000000d8c3a66ac5a0a8c3938f27537b734c7f35a5b6c4c9f3e9ef029cd8 2624406 0000000000d8c3a66ac5a0a8c3938f27537b734c7f35a5b6c4c9f3e9ef029cd8
2624806 00000000014e4268c9a2190fd52e4da77f6a887b966846d8f25aa6948a64d7a8 2624806 00000000014e4268c9a2190fd52e4da77f6a887b966846d8f25aa6948a64d7a8
2625206 0000000000e70fb2297446280d68e7263e155c548ce47c9eafa2ebb55ec35a98 2625206 0000000000e70fb2297446280d68e7263e155c548ce47c9eafa2ebb55ec35a98
2625606 00000000014f4e3c63d4a271f4ab19beffb6c680a98ab5d5265c6ed7224e96d7
2626006 00000000004be1b5b382402702ecd413d60deb1b8f3519e49ead6c187eeb5edd
2626406 00000000001425180f380fb03df0b0cdcf682a2d46dab03aca2eddcae4145c46
2626806 00000000008624d7b6d78cf1062a126645c403059e07a83550fa3346cac37664
2627206 000000000015f6d6e1795b16bd9bee7dc7b4cee491eb3c71f7e8da9be00a60b0
2627606 000000000101e9cdadd025d74ac82de012ed067913138ab8b86c515057a18cbd
2628006 0000000000249f3277f5bfef73fbb67debc2bdffb67ae844236b941421e35321
2628406 00000000003d20ba5ed506854cfbb9eae39c9e57f0d6fb9e632691b3a051eac5
2628806 0000000000d3d6f596e37413c3bad56e4c31baaf0627d9f73b6dbdc595f7880e
2629206 000000000075a542fec59d5d0b020b154e43aab3169da1b4a8425b7269bd653e
2629606 0000000000eeb9713c5e03aefa95696c038ba0ffde7e6ad9772c44a9a470e4b4
2630006 0000000000133e359d6e60fbc2d568959ed56b17123ccfbdd159f1aa4951ad22
2630406 0000000002245d9d2741a7892d64d6e9b4044e7d7f71560a8201595e298860a0
2630806 0000000001c1a365c6a07dc5d99ac874cc8595590a7fd4dd62dcb3bc246e1b5c
2631206 00000000002570be7f316695395d552040d1c82c89b8c5dde859b683c2a9d6af
2631606 00000000007773e7e3eebef9300a01cc9b620f17f31c0b92139155be50fb2c6e
2632006 0000000000c54ddff6249bbd5dd90055660e427f01449a52e744b6b35a966b1e
2632406 0000000001abf33764a6d32b88e07936ccdabca43d482c8be63d38d17b8464dc
2632806 0000000001b57c8c4f7b60458fb596d8a86ae771f1a335950673af77f3e80c06
2633206 0000000001a1202491a9ca9099b3e94c66028ff7ad0f1fbbb8100e27e41049f9
2633606 0000000001e75b12f152437b13a079fb8f4b8ce5a95bc439d8b67a02a73f4c9d
2634006 000000000176f27d9ab309ae3a64d289020005744b7aee4f65b7d5cf16280b47
2634406 00000000018c027107de01e1d3f1b9af5abb3ab52f53063c4d26ab7a4a9b7a2a
2634806 00000000007a9e53b36faecd9f411e1bd69ac9f48c18d7ad6b02074352cd639c
2635206 00000000011a33012b9ec50e0eac0495819531251d9f902b2c905387f238592d
2635606 0000000000358d644665a7adb57d890fe29cf4e0f9bc8108ab76df8b7b6ec65e
2636006 000000000070c7b0c258add3088d8d950f9f0165c0457efd219177ac5b032c8a
2636406 00000000014162f4bdca385858793e0cc0597ad9fedd7bfbdd1fe0ffae0e7a84
2636806 00000000009e8387c54398809453d6489cd673d6ef0d33040a706a1876e488a1
2637206 0000000001b6eb252c6fe78c7ad9c24559abb42cf7d34616c2ca2b5da3273fa2
2637606 000000000173649f52e37ea5d1fa8de0538875b645d74db4bb98bc8ff23c6659
2638006 0000000000538f7b7dfd18e5dc5dfed46a5c09a8de595838d82d9e965cdf4b36
2638406 00000000012dee8d0b2433cc06d1f9820c28d076864cd8ce5a602dfc9b477c80
2638806 000000000197ce6b2ba05b715e836f1a0a3e9b11eda2f14803987cfaff7bd9fc
2639206 0000000001c68825a4959681d07f64305f17b1d504d37423a86684d5cf5187b9
2639606 00000000009f7e8b638a6e8ca8ed85434c42ac1fb280806a9a6f7e335d8e973b
2640006 00000000001558caa2ccb0e9ae27aae0c286268b5f722898e8301f79ef7aea78
2640406 00000000013260c881a0711070837af189836627ce9998aeda0b82203db24ae4
2640806 000000000082fe2a1061bc6c1b323f5444b932b81fab63c97dd440adee66a752
2641206 0000000000d8e4eb37e7cb549112928b420d468b408c5aadb0a12f2f08108db8
2641606 0000000000a1d5ac6e3d8b0f498537f8722bb02ad02ec289330d89f897cad312
2642006 00000000025ab840bddbbb2caeb864889c099548f8be8744e4d743cbf7994a9e
2642406 0000000001bde94e940f10ef00990633eac776bee7ecd9752ddcace1b3e7f60b
2642806 00000000017b1aa7d94ff71496ef48fedd89eaa8816cc368e0c39ec989cb9b55
2643206 000000000131af29cba7406cac833d67538b5b70f76891a76277cfe873e26455
2643606 00000000008f42389bde6acd102d38510e7f9fed47b9e8410631a4c1e7b6e73a
2644006 0000000000f318f41fec3fb21e85eb25cab31d3cca14c78f09be15c7eb932c65
2644406 0000000000060ed5eaca03b133c7830e1235fdfb70ac30de8c6e91902216a734
2644806 000000000105ae213f8efaba6c882610a70741102399c493b3257c49ed3349ee
2645206 00000000000f1adce304a1b234f858301717be9782649e2212e3c0b820e6b12e
2645606 000000000005388844935f1ae0d1b1437832396a6a0ea1d7ca2aee2d2fb4fb2e
2646006 00000000018f5afcb6c97e0a9fae2ae4daff69147b52320344009d3a37beb220
2646406 0000000001671aafb84735f971ab5d0b6f6419de6279444d03f5be7e35456c73
2646806 000000000055de6c58155329b8e807c6c16ed6655e1a15a7a39b6e0d898ea548
2647206 000000000176b93f66fa7190a14f63764aa2320ae1167a31d25c2c2bc10836d9
2647606 00000000018032e1ecd0260c40ec9ce723cc32fab394162954a24ec9997cf6b5
2648006 000000000140e67c12607105f2fdb7da6782e2dd09052f9dc7ce6ac77cec2c5a
2648406 0000000000e0e92a1c15b010583334198671bdae6d65bc50d7f7d701334bc1ad
2648806 00000000011cb84c9074707c73648a7d8e9e2823e3110d20d083fde9113ce796
2649206 0000000000784bb776439b174c508282af2898bd876d11e595f3c1e59bca026a
2649606 0000000000f8d05e0633826998972f85be111c6d2520eebaadf15a3c44769725
2650006 000000000005ff8fc9d62923fcffd38b58ca30345a009a3ae0d44b1da5f7d5b1
2650406 00000000002054af7959069600f29b3845dcd1f5f27de2b3fd7bcd1a2f43838b
2650806 0000000001b50e2b3eb69094af355b1225e1c2a9962b3a0162e069459a6b9ed8
2651206 000000000169c5a4db126a40a68e4a50d61f85579e702c50123b2ad2122bafda
2651606 0000000000b41cc2ca140869c3215437a1c09a408bd0dc72b5effdbefb962e67
2652006 000000000124555a8e903be04bda53070b923f43cb2024aa22992775f2653f0e
2652406 0000000001558002fe04eaf473124328278d9fe2bf18dc813c8f5a8b050363c8
2652806 0000000001c3557aed4416d9c14a6d698b40c8e16226444fdabdf41aa1526d0d
2653206 0000000001b74f14c79d9de792a9a0dd1df2ce35f1b13055c7d430aff1822a2e
2653606 0000000001a2785cb10a797523e7cdbb88bca211256ebd946d71111e1a86472c
2654006 0000000000deac02824ca6591e0d1b66bf2891fb09c57bf3858d62aae27cb46c
2654406 0000000001666379a4b4c66263fb56c2f317bae2951bc7d35dc6bcf721303968
2654806 00000000007e593bbc26925ad6e56481bd1cb64c051c4deeddb89f9188760d9e
2655206 000000000172fa70e819f750f963651ed564c6ed719afd7415efd83268e670b8
2655606 00000000017d51fd805e1181026cfe89ae19c8f092b01e1ff352ceebd3f2428b
2656006 000000000185810960c4295874601ad1eaeaec7f90562500d6c6f2bc309552d2
2656406 000000000205514fd4d2202516ab6060b2d3a79a20bb50eda855e9efe921f461
2656806 0000000001dbf4b39d66c6e0b766aa11a1ef0896421180e0d4b6415ec5c2056a
2657206 000000000141640da893de1c2f2fe10f9990993e1c0ae04f2199f4a25c0c06f9
2657606 000000000111b1c350c3beb6c16e628b7da8e4e897fec0c2318be1a0a1e8b445
2658006 00000000019faefa1417f4a13ff0cd6e865af4ee3c262eb294325fe5f0c96383
2658406 000000000126e89df37808b0443aa804ee65e143158929f357b7071d6fa2fb70
2658806 0000000001a27d45f3892a3ff3ba3d559dc4cf3a7d6cf3606149e547fbf3e1a4
2659206 0000000001d42a455ff283dfdb2bb66083473b63a36c3ee440806de2dbe40846
2659606 00000000008842d5742bf1224a521b38fbecaf5b4162fba26f9f8739cbb59c0f
2660006 00000000012e8baef3d981f90eb6a74940b3fe222010278ed3e2cf67a3306459
2660406 0000000001b0a045708ee6d89c0d9444e23c48854a525146072b1dc73706f6b2
2660806 000000000154dec42b8febdd350b5b925b8cb25db43525382b087fe1dba292f5
2661206 0000000001ce18bddb0c49d2fb905a4d16ecb60b316b7041cd6554242c2f0205
2661606 0000000000f9b5b25d9c6e6908e40174e18eda6367c682c97d036419b33745a4
2662006 00000000014d6372cbbeeb054f20834e5faaddec3413c16f9e2c0ef996e1a9c4
2662406 0000000000ea0f41591f19d0b7d615a421fb17b7538b0494eea9d1c993ef237a
2662806 0000000001611c661c32ffff2b681d3ce612695b5b89bed1bc71633d5a8cc2db
2663206 00000000008018fb5e984d384041ac864676a7c53970777b0409afb2ad2920b7
2663606 00000000010805c3d6854f43bcfb3c17d6c018fd41b6a6d78f7d468b59fd94e7
2664006 00000000013c678433f116eaa67b98e6198c374cc3cdd172d73a9f6c602bc957
2664406 00000000004d34e909abea6990a5571207304d8d9d1799a9cdd4f2d15b7e3988
2664806 000000000174bf5fd65181b56a308a3e3d564f8277842e82f6c188249e07fec7
2665206 0000000001ec8c45ce6ee60b1921f6f72cba031ae7e51518bb4db5281101eca0
2665606 000000000043a7bb25e301a8f6880fad235d9a29ead7e3aa1ed4a5362a837891
2666006 00000000016416ec8c24b492b4f9a16b15f2bf1aedce1d90e875998cb577edba
2666406 00000000009f1c02edd6339af8e216f620ed32a6cb6ce4fb284d7bdf82305ee0
2666806 00000000013b50bb104f73cfaa00fd652e67b4a89588baa27dd95aab2a59a452
2667206 00000000003f0ae07948979983175156a732bb79610096dfbc0fa7a29eaf48ed
2667606 00000000001a94fdb7d9dd3eb37b3783ebc30864a304dd8ddad6802f94b7a3d9
2668006 0000000000d5d7aab1d70e2fdfa27586d2760d4d4ee234ffcf5136be94ced6bd
2668406 000000000156144469688a7399c479d1d80cb0ff30f49326bcfee27c372823a4
2668806 0000000000ab2254331ff5f51112bf8e08f7fc9bbadb3836e6dd070ab2d96718
2669206 00000000010496c02ac9094f9647c92d7be9b8fa18e8d73a82203009b52d3ac7
2669606 0000000000f8c1992cc04a608c8716748134e2b8d095ec03bd8d79e6935532c3
2670006 0000000000312d25ce5cd017d41bf3cdc26deafc073f11237b1df7c7c47f566f
2670406 00000000010d11aa21b44f48f6d44b5045128c3b36c3a05a5438776680615abe
2670806 00000000017f15485570574b715a2bafb80d35df6b9bcfc15f0a901ac806c47e
2671206 0000000000812c9f41ad666bca5d9d41bd37bf14c638940f983fb3960331c04a
2671606 00000000005d4d7d6a403a2a064b7ff117af665ded46f592cafed26aaf9b8ca4
2672006 00000000003f61a2bfc7715db9d7ac1720b98b504e504764a609e5ef1e02e9f0
2672406 000000000136c4e46ed63f4eb6409af4024952861ba95f372882c5251e0a249f
2672806 000000000173052e6bcc30a2af8792343bcf75b207cbcc2a9bcc2611b5c551f4
2673206 000000000146c90abab2bb4919cad89f10e198562a0e5c7a543ad8357facb667
2673606 00000000009364e3ec0954c9090a2db6b2be08ad1b679dfc0d429ed9e57bd972
2674006 000000000191a821de364efb3ca613dc20c2e1377734a841f2e88bfc825d5e3f
2674406 0000000001535fb080dea37cf6d973178f6a3014851ab26d1914456742163ef3
2674806 00000000014f2059c0d91a8ed6023b08294593de773268abb0b4ad79d9d20581
2675206 00000000003ebb8baab4ceaf73fde6753d4281edfa07c897458ce9a1c5ff57ee
2675606 0000000000065afdce346665ab6ca463930733149eaaf1e79033b08232f7a363

View File

@ -7434,3 +7434,102 @@
2973200 0032c83ee743bcfd5795caaa601d0275f6b54fb75574750a51e5d22c24b14ea8 2973200 0032c83ee743bcfd5795caaa601d0275f6b54fb75574750a51e5d22c24b14ea8
2973600 0012655ae0ade4590af7c05dd609415b422d33f7ceb1dbb15d2c381bf0576dd2 2973600 0012655ae0ade4590af7c05dd609415b422d33f7ceb1dbb15d2c381bf0576dd2
2974000 004a2810cfe2a2bd83c202a0311cff47c80364ee2a874a93bae34404380e2b98 2974000 004a2810cfe2a2bd83c202a0311cff47c80364ee2a874a93bae34404380e2b98
2974400 0022bbb634b3c87ba01cf9e88637eaf43cfa81641b82d33d9b362add0fd8c41b
2974800 00458fbb5c826bcda26fc5936915353df569091b51b335480b12031692a6d5a6
2975200 002c923c7ea37b4fdc0a4ae792ddf9b5087288512702891335c539c1910cd10c
2975600 00179853d41830957b6e4dada1d1bb709f4460497b7ae49e080d933efa201744
2976000 0017d56ed80077f45eb88f11d50f4306ee1fbf95892c9a9cb7a9538e72ceabc1
2976400 00584d9303c8817a82d09e2797b2cf488ed6c4efef322b915bdcfd230a42de2f
2976800 00160f1ba661be6e2d48099e3ff72345f6051a571b1d363df1382c8a6c422102
2977200 0022accee852fc0d84ac932773bc7b71d53f8ff8d4c439bd982cd6ff4747ac60
2977600 004554ac744c87257595f32dfa77e0446a0dad1e9193c12de3f14a4a29fb2045
2978000 0022e4822a5b6749d6dfc7fa90845e8d185d0fe04197c6fd4f0e18066006fa6f
2978400 0052824498a9414802d98e56ab3e48919f9397e3c0bc573283a4e4d471bf12bc
2978800 0046d673c6d74676bdcadc63a868c0886b16a4538f0d7045d6d61399b4292c4e
2979200 00dead16ec073ce4a919eff239f21508997232a9c598de0b6b10c8e00fd4e413
2979600 0031ee45acf915c0d36441583aedd05c36c10a3cf03ac090f6994f46bb359ace
2980000 00074a97178ddee1c90add32065c3dcba94026ed94a7abbad74d95754e4bca63
2980400 005f3be21f2c324b5c0f3014e8621e31ad9dbb146393208b0597191827bb8ed3
2980800 001eabd1939746320b0322a8e853ead97ff31537e167336dab15ffc3e5a76e25
2981200 00699b9d0952eb987e6a3907c56bd218401756b982d5adf5103f755176c09838
2981600 002a23f230985a0a6b5708837b21e930ee54f62c394b6fbb704ba5a7a8e48177
2982000 00d030142777ac5f04a38153b83ccc72a5bd4b1ef6a449b5acb5c86b64792e73
2982400 00264619ba50c766d638ed99b5b167edadfc3588bbfd3da7c63cf7a6f5048c97
2982800 00486d6ecfc4b9c13fe5c30275298308aa8344f33e37e5aaa9a80b97f2a815d1
2983200 002de3fea65b06c40080240a21d664b0dea224b146c6c2c00c3c6306a7297fab
2983600 06d4fffdd467139d9d2f80ed0a670a0eb27e2dddf863600d157b4d872aec469a
2984000 0009b56289a49bfca3c0fe9ed50d1f7eaeca7ba34258f73006f1420a41a32fc5
2984400 000532dfb34a7f7937eef7dd4bd87a9543057efea82506c42c9ac8f5a3454537
2984800 00323df998c2bc31631cf76cf832e577bc0d804ccdcc8680dfcd74c0953a866f
2985200 001be73a9c3c041da1bd6a2bfc26cfbd2cbde992e11b64c7b8e53c711d36ceab
2985600 0019d10c111c6031c24bf5381327731d3701da501f092e636f3a3f2c1be0eb93
2986000 0014687fc704f084257ccd48be14f4f8147aa5c8c1d6e518b041e5763dbb463c
2986400 0010521021fd245c6d4d0b5881c72d73cc9c7232bfb9648636af35519999e444
2986800 000ac5b70875bccf25fcdbbf7690c0d0c5f39133b3bc4c5a5489a4628e976bb0
2987200 006f4c27c6de76acf6942c0c6771679b23a983c27935aeb4b4db068400a6747c
2987600 001cf3cd65806efc218dca11184be3e34fbfdb9d9c66eecf79b451306fb08e42
2988000 00385974ef8716fe45a001bac4b9ba70e98e36e6d733f85842001d8361fb6ad1
2988400 00aa453bb6feebc5ca98e23cc3e50dde6b1bd9d2cb50cc07f10f1c2ab64eed1e
2988800 006456c1419697679b5fab7c75e540cdb4a3b55a244af57eede27f48ef37bbe1
2989200 00e183f9b91d77afb1fdddf6617ff015933b32b38632ff704bdbafcf0969abe3
2989600 008e8aec2cdfcd038a8124828bd1c7be65ae2927b520800a37e22f11c0c6c5c0
2990000 00af170515d9182896b815fd8fa7067ec32e7ae2d1013655203aab9035482cd5
2990400 00903b7b501a8a36fc381412b98ea7935075d5d36ad3412b3de70370bb835e26
2990800 002eabb0e34c2f5911ce9472b8a97a3591ba5fb9b5d699bad5ca7e8e7dff29ec
2991200 00e2e4839d4781d8b654791382ad762aca8fa2a9337a551aeaf65ff8469f949e
2991600 005a44c5e8d1ea2268df01d49f964c13c2b6c415e64a92982be877a51b9367f3
2992000 0048db0454853598652ea3e7975ae0678e3ab4f80b24d2d8eab5f4491aeae341
2992400 00604fa9e6e883419e67793510d61fd07c0c566a4357e5f236db4863909bca4c
2992800 009bc0379eb615cfa73a14252fe60e06ca8d677a850ffb216111a03a51f3d2ba
2993200 00262af418a3f14f6fd704eed3cbedb6feedab7ed1d336149ba60190dd8d5627
2993600 004c9599e33c92fcbff384f46dd2d32acfe67535bb7585c1e6aa20a45b0d9437
2994000 0035d3cd6c8fe730067378073189eb4d39b978664da0a227148d973ce4a2769d
2994400 005b3851f75804e4775f27a44775b09e1acd42d6f84a4b352f2ff9ee4d7445f5
2994800 001a326e8ab266490db69bad4b603fca01ec6c4014347c3ccabc8b470dc55fa7
2995200 000ddfb141559989861252d06883e6f85e882f344d49d39405c1a8b5da8a6973
2995600 0045c05ff5d9c2800762636813acf05d227a350c061d6ab9ed84b763c51ab443
2996000 007de7332473a328a114d2a1ea1760d133e6d7afc45d12fbcea5e060b5c0e0ad
2996400 0070f19bebf84c4d115999b02d30a792ffa234ccb49b4c3144beedbaffcdb35a
2996800 005c06bca5b702ddd66537882a1a960b140d72072f60d078b575d2d46af634fe
2997200 0055708e62124e1dabb01e2e6b808e8454774c0c358defcf896100c84e80a254
2997600 01cf554f19e2c3b3baf645ba0fed77029c74286f4361eaf401e6822d28a127e3
2998000 0006dc2e8b057c43a1b3aa9e565b3912b71614ccd83b96c64c7af7604bfc2afb
2998400 0013966207316fbb6c91606c32afbb937daac81a7927299d2697cf1e6dd52b2c
2998800 001147a0eaff7ece55c60087187767ef19a1c2c6e833cf8a8b84f4c457a8db4a
2999200 001ed62bd7508d0d529ab2bb129784eebb9e93ae920e7cf95b4952330e960dab
2999600 00975335c00f798a2a7e04707f763443d5644cd65d82de99ac076b679f3c2417
3000000 0031432018aa59e440804fa87974ec791ae174fa2909470f3c3a8a93842a659f
3000400 00b7d239d9ca1f3c12ab873fb8481bb1b2dbb217c9184c20d6bfed56bddc3e73
3000800 00fe4dcad3cede4648dc0145ef4739eafdd7ee5a917eebdb3039f939414909be
3001200 00156bd2823f54d74d16619385f784908f550cbd251a9e26eba7b75c008672dc
3001600 068d6954e2d9c83a16895c96b152c07d18e9ff9a72ae34da00d9ecf708d91843
3002000 0000e8a565bc879836b498a045bdfdd889c119ddc074233281db25fa5405c1dd
3002400 07031d3ff01c5bf5bdf488ec327a0912c667cfd6c65adb53df5d9c29ebeb77b2
3002800 07aaa1a5f9efe3b10b7d06f5cc6547d5086889b11c0403926a1506fd20f72d6d
3003200 00062726eecd4bde3da20713575797eeb6c131270114a5e4f478256997f91386
3003600 000b56fe1770444f38cfe6ab206351b012e6b2aef48bd97d7a1c9e9915f35c2c
3004000 0038d09a6031912f36207f8e14020e12989e9fa5c7405ee69f792ac07af04e38
3004400 009ef06fb016e582b0d286adb72f2b39b118f3193eb883733e5020fc4cc995eb
3004800 00508822b2e469b412628a7da879d4b302c867a7fbfb6c142776b2b30ea1f811
3005200 001ab12b2a505bedfcf9fa3d64480dbb977efe71940d7a8b0a738d2f97e6cb00
3005600 001257424eb2683058899922d185a8a8b955c217f10dc106f91cdeb38c3d1c66
3006000 000ee0de408e16df398189b18c5bd9fd3c6ee55fb28b7afaf0304627c5f13267
3006400 006d417c0a56b9a2aaf686360aa3c111671017a8dc493ef9e50f65768102a2d4
3006800 00561d7b3a8bcc57e2069996890f0074d7f0b3601a27688f44c24a83d3c6b4e8
3007200 010cb5a8e3e9ba661dd7ab7b087f5f55dc243bcd13481034ddf56efd8b643ed2
3007600 0037e87b458d6faf64750c8556b329eb11308d9a5cc921bec15053bf43985245
3008000 0010a31899ab3650a999a3eb98786ee59f2ed890d93f338f36194cd0c73511e6
3008400 003b99ec2366bdedb6811fcbaab13393a436eac72e68194acb725729984331d3
3008800 000659dfa07df7883d44fc58b2ddbcd930ee950698ee5d27b8f6faeea8a8382a
3009200 000f96accb21165fb5ea8c7da816f007116d3309412acad32fe28c269f652357
3009600 00533daa091bbcd0008035ddaa56f684be41d7fe66fea665ae8f4fd85cf4ea9d
3010000 00bf309a67faef45356683ee7aa30ec167854515b6aba1b05592385e5caf4652
3010400 00959a4d4f653186485b260ed851999f695a039f1ddf39e02b93adcb592fe812
3010800 00637c7b49f3d9a1bdc05c14939855d40c1de1f8273070be9f9c2518d5c3607e
3011200 005b320c531b36611ea3b718eb09a622a602a50a1bec93f475eac598ff8726d1
3011600 0020653b72946047c7afbfa3c74b28deff29c55627a862d8437ee7038b2ea92f
3012000 001717262f28c5ca078cffc7d8c1887a4c98a44f9e93eb841975294fcb3b3d65
3012400 0014b2b3692aade71cf14910d91181cd238a5ecd14f6344c69817c4349e8766c
3012800 00a5a4c7aa1e5120b05358100083165fdae6d3da4932391f806dc70b17de43b0
3013200 005816e627c296c77a1088915b359185349a4b4b345a325a889a4854c6598f71
3013600 0067f8576378bcfa73c91f734526234125ab0cc306bcbfc415359000f54908fe

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-grpc" name = "zebra-grpc"
version = "0.1.0-alpha.6" version = "0.1.0-alpha.7"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "Zebra gRPC interface" description = "Zebra gRPC interface"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -17,25 +17,25 @@ categories = ["cryptography::cryptocurrencies"]
[dependencies] [dependencies]
futures-util = "0.3.28" futures-util = "0.3.28"
tonic = "0.12.1" tonic = "0.12.3"
tonic-reflection = "0.12.1" tonic-reflection = "0.12.3"
prost = "0.13.1" prost = "0.13.3"
serde = { version = "1.0.204", features = ["serde_derive"] } serde = { version = "1.0.210", features = ["serde_derive"] }
tokio = { version = "1.39.2", features = ["macros", "rt-multi-thread"] } tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread"] }
tokio-stream = "0.1.15" tokio-stream = "0.1.16"
tower = { version = "0.4.13", features = ["util", "buffer", "timeout"] } tower = { version = "0.4.13", features = ["util", "buffer", "timeout"] }
color-eyre = "0.6.3" color-eyre = "0.6.3"
zcash_primitives.workspace = true zcash_primitives.workspace = true
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.39", features = ["shielded-scan"] } zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.40", features = ["shielded-scan"] }
zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.39" } zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.40" }
[build-dependencies] [build-dependencies]
tonic-build = "0.12.1" tonic-build = "0.12.3"
[dev-dependencies] [dev-dependencies]
insta = { version = "1.39.0", features = ["redactions", "json", "ron"] } insta = { version = "1.40.0", features = ["redactions", "json", "ron"] }
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] } zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }
zebra-state = { path = "../zebra-state" } zebra-state = { path = "../zebra-state" }

View File

@ -10,7 +10,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.protoc_arg("--experimental_allow_proto3_optional") .protoc_arg("--experimental_allow_proto3_optional")
.type_attribute(".", "#[derive(serde::Deserialize, serde::Serialize)]") .type_attribute(".", "#[derive(serde::Deserialize, serde::Serialize)]")
.file_descriptor_set_path(out_dir.join("scanner_descriptor.bin")) .file_descriptor_set_path(out_dir.join("scanner_descriptor.bin"))
.compile(&["proto/scanner.proto"], &[""])?; .compile_protos(&["proto/scanner.proto"], &[""])?;
Ok(()) Ok(())
} }

View File

@ -459,7 +459,7 @@ where
let service = ScannerRPC { scan_service }; let service = ScannerRPC { scan_service };
let reflection_service = tonic_reflection::server::Builder::configure() let reflection_service = tonic_reflection::server::Builder::configure()
.register_encoded_file_descriptor_set(crate::scanner::FILE_DESCRIPTOR_SET) .register_encoded_file_descriptor_set(crate::scanner::FILE_DESCRIPTOR_SET)
.build() .build_v1()
.unwrap(); .unwrap();
let tcp_listener = tokio::net::TcpListener::bind(listen_addr).await?; let tcp_listener = tokio::net::TcpListener::bind(listen_addr).await?;

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-network" name = "zebra-network"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>", "Tower Maintainers <team@tower-rs.com>"] authors = ["Zcash Foundation <zebra@zfnd.org>", "Tower Maintainers <team@tower-rs.com>"]
description = "Networking code for Zebra" description = "Networking code for Zebra"
# # Legal # # Legal
@ -42,12 +42,12 @@ proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl"]
[dependencies] [dependencies]
bitflags = "2.5.0" bitflags = "2.5.0"
byteorder = "1.5.0" byteorder = "1.5.0"
bytes = "1.7.1" bytes = "1.7.2"
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] } chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] }
dirs = "5.0.1" dirs = "5.0.1"
hex = "0.4.3" hex = "0.4.3"
humantime-serde = "1.1.1" humantime-serde = "1.1.1"
indexmap = { version = "2.3.0", features = ["serde"] } indexmap = { version = "2.5.0", features = ["serde"] }
itertools = "0.13.0" itertools = "0.13.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"
num-integer = "0.1.46" num-integer = "0.1.46"
@ -55,15 +55,15 @@ ordered-map = "0.4.2"
pin-project = "1.1.5" pin-project = "1.1.5"
rand = "0.8.5" rand = "0.8.5"
rayon = "1.10.0" rayon = "1.10.0"
regex = "1.10.6" regex = "1.11.0"
serde = { version = "1.0.204", features = ["serde_derive"] } serde = { version = "1.0.210", features = ["serde_derive"] }
tempfile = "3.11.0" tempfile = "3.13.0"
thiserror = "1.0.63" thiserror = "1.0.64"
futures = "0.3.30" futures = "0.3.30"
tokio = { version = "1.39.2", features = ["fs", "io-util", "net", "time", "tracing", "macros", "rt-multi-thread"] } tokio = { version = "1.40.0", features = ["fs", "io-util", "net", "time", "tracing", "macros", "rt-multi-thread"] }
tokio-stream = { version = "0.1.15", features = ["sync", "time"] } tokio-stream = { version = "0.1.16", features = ["sync", "time"] }
tokio-util = { version = "0.7.11", features = ["codec"] } tokio-util = { version = "0.7.12", features = ["codec"] }
tower = { version = "0.4.13", features = ["retry", "discover", "load", "load-shed", "timeout", "util", "buffer"] } tower = { version = "0.4.13", features = ["retry", "discover", "load", "load-shed", "timeout", "util", "buffer"] }
metrics = "0.23.0" metrics = "0.23.0"
@ -83,14 +83,14 @@ howudoin = { version = "0.1.2", optional = true }
proptest = { version = "1.4.0", optional = true } proptest = { version = "1.4.0", optional = true }
proptest-derive = { version = "0.5.0", optional = true } proptest-derive = { version = "0.5.0", optional = true }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39", features = ["async-error"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = ["async-error"] }
[dev-dependencies] [dev-dependencies]
proptest = "1.4.0" proptest = "1.4.0"
proptest-derive = "0.5.0" proptest-derive = "0.5.0"
static_assertions = "1.1.0" static_assertions = "1.1.0"
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
toml = "0.8.19" toml = "0.8.19"
zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] } zebra-chain = { path = "../zebra-chain", features = ["proptest-impl"] }

View File

@ -597,6 +597,7 @@ impl<'de> Deserialize<'de> for Config {
activation_heights: Option<ConfiguredActivationHeights>, activation_heights: Option<ConfiguredActivationHeights>,
pre_nu6_funding_streams: Option<ConfiguredFundingStreams>, pre_nu6_funding_streams: Option<ConfiguredFundingStreams>,
post_nu6_funding_streams: Option<ConfiguredFundingStreams>, post_nu6_funding_streams: Option<ConfiguredFundingStreams>,
pre_blossom_halving_interval: Option<u32>,
} }
#[derive(Deserialize)] #[derive(Deserialize)]
@ -686,6 +687,7 @@ impl<'de> Deserialize<'de> for Config {
activation_heights, activation_heights,
pre_nu6_funding_streams, pre_nu6_funding_streams,
post_nu6_funding_streams, post_nu6_funding_streams,
pre_blossom_halving_interval,
}), }),
) => { ) => {
let mut params_builder = testnet::Parameters::build(); let mut params_builder = testnet::Parameters::build();
@ -708,14 +710,6 @@ impl<'de> Deserialize<'de> for Config {
); );
} }
if let Some(funding_streams) = pre_nu6_funding_streams {
params_builder = params_builder.with_pre_nu6_funding_streams(funding_streams);
}
if let Some(funding_streams) = post_nu6_funding_streams {
params_builder = params_builder.with_post_nu6_funding_streams(funding_streams);
}
if let Some(target_difficulty_limit) = target_difficulty_limit.clone() { if let Some(target_difficulty_limit) = target_difficulty_limit.clone() {
params_builder = params_builder.with_target_difficulty_limit( params_builder = params_builder.with_target_difficulty_limit(
target_difficulty_limit target_difficulty_limit
@ -733,6 +727,20 @@ impl<'de> Deserialize<'de> for Config {
params_builder = params_builder.with_activation_heights(activation_heights) params_builder = params_builder.with_activation_heights(activation_heights)
} }
if let Some(halving_interval) = pre_blossom_halving_interval {
params_builder = params_builder.with_halving_interval(halving_interval.into())
}
// Set configured funding streams after setting any parameters that affect the funding stream address period.
if let Some(funding_streams) = pre_nu6_funding_streams {
params_builder = params_builder.with_pre_nu6_funding_streams(funding_streams);
}
if let Some(funding_streams) = post_nu6_funding_streams {
params_builder = params_builder.with_post_nu6_funding_streams(funding_streams);
}
// Return an error if the initial testnet peers includes any of the default initial Mainnet or Testnet // Return an error if the initial testnet peers includes any of the default initial Mainnet or Testnet
// peers and the configured network parameters are incompatible with the default public Testnet. // peers and the configured network parameters are incompatible with the default public Testnet.
if !params_builder.is_compatible_with_default_parameters() if !params_builder.is_compatible_with_default_parameters()

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-node-services" name = "zebra-node-services"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "The interfaces of some Zebra node services" description = "The interfaces of some Zebra node services"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -37,7 +37,7 @@ rpc-client = [
shielded-scan = [] shielded-scan = []
[dependencies] [dependencies]
zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.39" } zebra-chain = { path = "../zebra-chain" , version = "1.0.0-beta.40" }
# Optional dependencies # Optional dependencies
@ -46,14 +46,14 @@ color-eyre = { version = "0.6.3", optional = true }
jsonrpc-core = { version = "18.0.0", optional = true } jsonrpc-core = { version = "18.0.0", optional = true }
# Security: avoid default dependency on openssl # Security: avoid default dependency on openssl
reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls"], optional = true } reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls"], optional = true }
serde = { version = "1.0.204", optional = true } serde = { version = "1.0.210", optional = true }
serde_json = { version = "1.0.122", optional = true } serde_json = { version = "1.0.128", optional = true }
tokio = { version = "1.39.2", features = ["time", "sync"] } tokio = { version = "1.40.0", features = ["time", "sync"] }
[dev-dependencies] [dev-dependencies]
color-eyre = "0.6.3" color-eyre = "0.6.3"
jsonrpc-core = "18.0.0" jsonrpc-core = "18.0.0"
reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls"] } reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls"] }
serde = "1.0.204" serde = "1.0.210"
serde_json = "1.0.122" serde_json = "1.0.128"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-rpc" name = "zebra-rpc"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "A Zebra JSON Remote Procedure Call (JSON-RPC) interface" description = "A Zebra JSON Remote Procedure Call (JSON-RPC) interface"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -65,10 +65,10 @@ jsonrpc-derive = "18.0.0"
jsonrpc-http-server = "18.0.0" jsonrpc-http-server = "18.0.0"
# zebra-rpc needs the preserve_order feature in serde_json, which is a dependency of jsonrpc-core # zebra-rpc needs the preserve_order feature in serde_json, which is a dependency of jsonrpc-core
serde_json = { version = "1.0.122", features = ["preserve_order"] } serde_json = { version = "1.0.128", features = ["preserve_order"] }
indexmap = { version = "2.3.0", features = ["serde"] } indexmap = { version = "2.5.0", features = ["serde"] }
tokio = { version = "1.39.2", features = [ tokio = { version = "1.40.0", features = [
"time", "time",
"rt-multi-thread", "rt-multi-thread",
"macros", "macros",
@ -77,15 +77,15 @@ tokio = { version = "1.39.2", features = [
tower = "0.4.13" tower = "0.4.13"
# indexer-rpcs dependencies # indexer-rpcs dependencies
tonic = { version = "0.12.1", optional = true } tonic = { version = "0.12.3", optional = true }
tonic-reflection = { version = "0.12.1", optional = true } tonic-reflection = { version = "0.12.3", optional = true }
prost = { version = "0.13.1", optional = true } prost = { version = "0.13.3", optional = true }
tokio-stream = { version = "0.1.15", optional = true } tokio-stream = { version = "0.1.16", optional = true }
tracing = "0.1.39" tracing = "0.1.39"
hex = { version = "0.4.3", features = ["serde"] } hex = { version = "0.4.3", features = ["serde"] }
serde = { version = "1.0.204", features = ["serde_derive"] } serde = { version = "1.0.210", features = ["serde_derive"] }
# For the `stop` RPC method. # For the `stop` RPC method.
nix = { version = "0.29.0", features = ["signal"] } nix = { version = "0.29.0", features = ["signal"] }
@ -100,39 +100,39 @@ zcash_address = { workspace = true, optional = true}
# Test-only feature proptest-impl # Test-only feature proptest-impl
proptest = { version = "1.4.0", optional = true } proptest = { version = "1.4.0", optional = true }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39", features = [ zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = [
"json-conversion", "json-conversion",
] } ] }
zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.39" } zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.40" }
zebra-network = { path = "../zebra-network", version = "1.0.0-beta.39" } zebra-network = { path = "../zebra-network", version = "1.0.0-beta.40" }
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.39", features = [ zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.40", features = [
"rpc-client", "rpc-client",
] } ] }
zebra-script = { path = "../zebra-script", version = "1.0.0-beta.39" } zebra-script = { path = "../zebra-script", version = "1.0.0-beta.40" }
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.39" } zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40" }
[build-dependencies] [build-dependencies]
tonic-build = { version = "0.12.1", optional = true } tonic-build = { version = "0.12.3", optional = true }
[dev-dependencies] [dev-dependencies]
insta = { version = "1.39.0", features = ["redactions", "json", "ron"] } insta = { version = "1.40.0", features = ["redactions", "json", "ron"] }
proptest = "1.4.0" proptest = "1.4.0"
thiserror = "1.0.63" thiserror = "1.0.64"
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39", features = [ zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = [
"proptest-impl", "proptest-impl",
] } ] }
zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.39", features = [ zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.40", features = [
"proptest-impl", "proptest-impl",
] } ] }
zebra-network = { path = "../zebra-network", version = "1.0.0-beta.39", features = [ zebra-network = { path = "../zebra-network", version = "1.0.0-beta.40", features = [
"proptest-impl", "proptest-impl",
] } ] }
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.39", features = [ zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40", features = [
"proptest-impl", "proptest-impl",
] } ] }
zebra-test = { path = "../zebra-test", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test", version = "1.0.0-beta.40" }

View File

@ -8,7 +8,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure() tonic_build::configure()
.type_attribute(".", "#[derive(serde::Deserialize, serde::Serialize)]") .type_attribute(".", "#[derive(serde::Deserialize, serde::Serialize)]")
.file_descriptor_set_path(out_dir.unwrap().join("indexer_descriptor.bin")) .file_descriptor_set_path(out_dir.unwrap().join("indexer_descriptor.bin"))
.compile(&["proto/indexer.proto"], &[""])?; .compile_protos(&["proto/indexer.proto"], &[""])?;
} }
Ok(()) Ok(())

View File

@ -10,3 +10,7 @@ listen_addr = "127.0.0.1:0"
[state] [state]
cache_dir = "" cache_dir = ""
[network.testnet_parameters.activation_heights]
NU5 = 290
NU6 = 291

View File

@ -39,7 +39,8 @@ BASE_SCRIPTS= [
# Scripts that are run by the travis build process # Scripts that are run by the travis build process
# Longest test should go first, to favor running tests in parallel # Longest test should go first, to favor running tests in parallel
'reindex.py', 'reindex.py',
'getmininginfo.py'] 'getmininginfo.py',
'nuparams.py']
ZMQ_SCRIPTS = [ ZMQ_SCRIPTS = [
# ZMQ test can only be run if bitcoin was built with zmq-enabled. # ZMQ test can only be run if bitcoin was built with zmq-enabled.

View File

@ -0,0 +1,266 @@
#!/usr/bin/env python3
# Copyright (c) 2021 The Zcash developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://www.opensource.org/licenses/mit-license.php .
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
start_nodes,
nuparams,
nustr,
OVERWINTER_BRANCH_ID,
SAPLING_BRANCH_ID,
BLOSSOM_BRANCH_ID,
HEARTWOOD_BRANCH_ID,
CANOPY_BRANCH_ID,
NU5_BRANCH_ID,
NU6_BRANCH_ID,
)
from decimal import Decimal
class NuparamsTest(BitcoinTestFramework):
'''
Test that unspecified network upgrades are activated automatically;
this is really more of a test of the test framework.
'''
def __init__(self):
super().__init__()
self.num_nodes = 1
self.cache_behavior = 'clean'
def setup_network(self, split=False):
args = [[] * self.num_nodes]
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, args)
self.is_network_split = False
self.sync_all()
def run_test(self):
node = self.nodes[0]
# No blocks have been created, only the genesis block exists (height 0)
bci = node.getblockchaininfo()
print(bci)
assert_equal(bci['blocks'], 0)
upgrades = bci['upgrades']
overwinter = upgrades[nustr(OVERWINTER_BRANCH_ID)]
assert_equal(overwinter['name'], 'Overwinter')
assert_equal(overwinter['activationheight'], 1)
assert_equal(overwinter['status'], 'pending')
sapling = upgrades[nustr(SAPLING_BRANCH_ID)]
assert_equal(sapling['name'], 'Sapling')
assert_equal(sapling['activationheight'], 1)
assert_equal(sapling['status'], 'pending')
blossom = upgrades[nustr(BLOSSOM_BRANCH_ID)]
assert_equal(blossom['name'], 'Blossom')
assert_equal(blossom['activationheight'], 1)
assert_equal(blossom['status'], 'pending')
heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 1)
assert_equal(heartwood['status'], 'pending')
canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
assert_equal(canopy['name'], 'Canopy')
assert_equal(canopy['activationheight'], 1)
assert_equal(canopy['status'], 'pending')
nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 290)
assert_equal(nu5['status'], 'pending')
nu6 = upgrades[nustr(NU6_BRANCH_ID)]
assert_equal(nu6['name'], 'NU6')
assert_equal(nu6['activationheight'], 291)
assert_equal(nu6['status'], 'pending')
# Zebra can't call `getblocksubsidy` before the first halving.
# Zebra regtest mode hardcodes Canopy, Heartwood, Blossom, Sapling and Overwinter
# to activate at height 1.
node.generate(1)
bci = node.getblockchaininfo()
assert_equal(bci['blocks'], 1)
upgrades = bci['upgrades']
overwinter = upgrades[nustr(OVERWINTER_BRANCH_ID)]
assert_equal(overwinter['name'], 'Overwinter')
assert_equal(overwinter['activationheight'], 1)
assert_equal(overwinter['status'], 'active')
sapling = upgrades[nustr(SAPLING_BRANCH_ID)]
assert_equal(sapling['name'], 'Sapling')
assert_equal(sapling['activationheight'], 1)
assert_equal(sapling['status'], 'active')
blossom = upgrades[nustr(BLOSSOM_BRANCH_ID)]
assert_equal(blossom['name'], 'Blossom')
assert_equal(blossom['activationheight'], 1)
assert_equal(blossom['status'], 'active')
heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 1)
assert_equal(heartwood['status'], 'active')
canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
assert_equal(canopy['name'], 'Canopy')
assert_equal(canopy['activationheight'], 1)
assert_equal(canopy['status'], 'active')
nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 290)
assert_equal(nu5['status'], 'pending')
nu6 = upgrades[nustr(NU6_BRANCH_ID)]
assert_equal(nu6['name'], 'NU6')
assert_equal(nu6['activationheight'], 291)
assert_equal(nu6['status'], 'pending')
# Zebra can't call `getblocksubsidy` before the first halving.
# Activate First Halving
node.generate(287)
bci = node.getblockchaininfo()
assert_equal(bci['blocks'], 288)
upgrades = bci['upgrades']
overwinter = upgrades[nustr(OVERWINTER_BRANCH_ID)]
assert_equal(overwinter['name'], 'Overwinter')
assert_equal(overwinter['activationheight'], 1)
assert_equal(overwinter['status'], 'active')
sapling = upgrades[nustr(SAPLING_BRANCH_ID)]
assert_equal(sapling['name'], 'Sapling')
assert_equal(sapling['activationheight'], 1)
assert_equal(sapling['status'], 'active')
blossom = upgrades[nustr(BLOSSOM_BRANCH_ID)]
assert_equal(blossom['name'], 'Blossom')
assert_equal(blossom['activationheight'], 1)
assert_equal(blossom['status'], 'active')
heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 1)
assert_equal(heartwood['status'], 'active')
canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
assert_equal(canopy['name'], 'Canopy')
assert_equal(canopy['activationheight'], 1)
assert_equal(canopy['status'], 'active')
nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 290)
assert_equal(nu5['status'], 'pending')
nu6 = upgrades[nustr(NU6_BRANCH_ID)]
assert_equal(nu6['name'], 'NU6')
assert_equal(nu6['activationheight'], 291)
assert_equal(nu6['status'], 'pending')
# The founders' reward ends at Canopy and there are no funding streams
# configured by default for regtest.
assert_equal(node.getblocksubsidy()["miner"], Decimal("3.125"))
# Activate NU5
node.generate(2)
bci = node.getblockchaininfo()
assert_equal(bci['blocks'], 290)
upgrades = bci['upgrades']
overwinter = upgrades[nustr(OVERWINTER_BRANCH_ID)]
assert_equal(overwinter['name'], 'Overwinter')
assert_equal(overwinter['activationheight'], 1)
assert_equal(overwinter['status'], 'active')
sapling = upgrades[nustr(SAPLING_BRANCH_ID)]
assert_equal(sapling['name'], 'Sapling')
assert_equal(sapling['activationheight'], 1)
assert_equal(sapling['status'], 'active')
blossom = upgrades[nustr(BLOSSOM_BRANCH_ID)]
assert_equal(blossom['name'], 'Blossom')
assert_equal(blossom['activationheight'], 1)
assert_equal(blossom['status'], 'active')
heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 1)
assert_equal(heartwood['status'], 'active')
canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
assert_equal(canopy['name'], 'Canopy')
assert_equal(canopy['activationheight'], 1)
assert_equal(canopy['status'], 'active')
nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 290)
assert_equal(nu5['status'], 'active')
nu6 = upgrades[nustr(NU6_BRANCH_ID)]
assert_equal(nu6['name'], 'NU6')
assert_equal(nu6['activationheight'], 291)
assert_equal(nu6['status'], 'pending')
# Block subsidy remains the same after NU5
assert_equal(node.getblocksubsidy()["miner"], Decimal("3.125"))
# Activate NU6
node.generate(1)
bci = node.getblockchaininfo()
assert_equal(bci['blocks'], 291)
upgrades = bci['upgrades']
overwinter = upgrades[nustr(OVERWINTER_BRANCH_ID)]
assert_equal(overwinter['name'], 'Overwinter')
assert_equal(overwinter['activationheight'], 1)
assert_equal(overwinter['status'], 'active')
sapling = upgrades[nustr(SAPLING_BRANCH_ID)]
assert_equal(sapling['name'], 'Sapling')
assert_equal(sapling['activationheight'], 1)
assert_equal(sapling['status'], 'active')
blossom = upgrades[nustr(BLOSSOM_BRANCH_ID)]
assert_equal(blossom['name'], 'Blossom')
assert_equal(blossom['activationheight'], 1)
assert_equal(blossom['status'], 'active')
heartwood = upgrades[nustr(HEARTWOOD_BRANCH_ID)]
assert_equal(heartwood['name'], 'Heartwood')
assert_equal(heartwood['activationheight'], 1)
assert_equal(heartwood['status'], 'active')
canopy = upgrades[nustr(CANOPY_BRANCH_ID)]
assert_equal(canopy['name'], 'Canopy')
assert_equal(canopy['activationheight'], 1)
assert_equal(canopy['status'], 'active')
nu5 = upgrades[nustr(NU5_BRANCH_ID)]
assert_equal(nu5['name'], 'NU5')
assert_equal(nu5['activationheight'], 290)
assert_equal(nu5['status'], 'active')
nu6 = upgrades[nustr(NU6_BRANCH_ID)]
assert_equal(nu6['name'], 'NU6')
assert_equal(nu6['activationheight'], 291)
assert_equal(nu6['status'], 'active')
# Block subsidy remains the same after NU6 as there are not funding streams
# nor lockbox configured by default for regtest.
assert_equal(node.getblocksubsidy()["miner"], Decimal("3.125"))
if __name__ == '__main__':
NuparamsTest().main()

View File

@ -54,7 +54,7 @@ where
let reflection_service = tonic_reflection::server::Builder::configure() let reflection_service = tonic_reflection::server::Builder::configure()
.register_encoded_file_descriptor_set(crate::indexer::FILE_DESCRIPTOR_SET) .register_encoded_file_descriptor_set(crate::indexer::FILE_DESCRIPTOR_SET)
.build() .build_v1()
.unwrap(); .unwrap();
tracing::info!("Trying to open indexer RPC endpoint at {}...", listen_addr,); tracing::info!("Trying to open indexer RPC endpoint at {}...", listen_addr,);

View File

@ -66,7 +66,7 @@ expression: info
"status": "pending" "status": "pending"
}, },
"c8e71055": { "c8e71055": {
"name": "Nu6", "name": "NU6",
"activationheight": 2976000, "activationheight": 2976000,
"status": "pending" "status": "pending"
} }

View File

@ -66,7 +66,7 @@ expression: info
"status": "pending" "status": "pending"
}, },
"c8e71055": { "c8e71055": {
"name": "Nu6", "name": "NU6",
"activationheight": 2976000, "activationheight": 2976000,
"status": "pending" "status": "pending"
} }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-scan" name = "zebra-scan"
version = "0.1.0-alpha.8" version = "0.1.0-alpha.9"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "Shielded transaction scanner for the Zcash blockchain" description = "Shielded transaction scanner for the Zcash blockchain"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -61,28 +61,27 @@ results-reader = [
[dependencies] [dependencies]
color-eyre = "0.6.3" color-eyre = "0.6.3"
indexmap = { version = "2.3.0", features = ["serde"] } indexmap = { version = "2.5.0", features = ["serde"] }
itertools = "0.13.0" itertools = "0.13.0"
semver = "1.0.23" semver = "1.0.23"
serde = { version = "1.0.204", features = ["serde_derive"] } serde = { version = "1.0.210", features = ["serde_derive"] }
tokio = { version = "1.39.2", features = ["time"] } tokio = { version = "1.40.0", features = ["time"] }
tower = "0.4.13" tower = "0.4.13"
tracing = "0.1.39" tracing = "0.1.39"
futures = "0.3.30" futures = "0.3.30"
# ECC dependencies. # ECC dependencies.
# TODO: we can't use the workspace version for all ECC dependencies in this crate yet (#8809) zcash_client_backend.workspace = true
zcash_client_backend = { version = "0.12.1" }
zcash_keys = { workspace = true, features = ["sapling"] } zcash_keys = { workspace = true, features = ["sapling"] }
zcash_primitives = "0.15.0" zcash_primitives.workspace = true
zcash_address = "0.3.2" zcash_address.workspace = true
sapling-crypto.workspace = true sapling-crypto.workspace = true
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39", features = ["shielded-scan"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = ["shielded-scan"] }
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.39", features = ["shielded-scan"] } zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40", features = ["shielded-scan"] }
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.39", features = ["shielded-scan"] } zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.40", features = ["shielded-scan"] }
zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.6" } zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.7" }
zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.39" } zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.40" }
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std", "serde"] } chrono = { version = "0.4.38", default-features = false, features = ["clock", "std", "serde"] }
@ -97,22 +96,22 @@ jubjub = { version = "0.10.0", optional = true }
rand = { version = "0.8.5", optional = true } rand = { version = "0.8.5", optional = true }
zcash_note_encryption = { version = "0.4.0", optional = true } zcash_note_encryption = { version = "0.4.0", optional = true }
zebra-test = { path = "../zebra-test", version = "1.0.0-beta.39", optional = true } zebra-test = { path = "../zebra-test", version = "1.0.0-beta.40", optional = true }
# zebra-scanner binary dependencies # zebra-scanner binary dependencies
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
structopt = "0.3.26" structopt = "0.3.26"
lazy_static = "1.4.0" lazy_static = "1.4.0"
serde_json = "1.0.122" serde_json = "1.0.128"
jsonrpc = { version = "0.18.0", optional = true } jsonrpc = { version = "0.18.0", optional = true }
hex = { version = "0.4.3", optional = true } hex = { version = "0.4.3", optional = true }
zebrad = { path = "../zebrad", version = "1.8.1" } zebrad = { path = "../zebrad", version = "2.0.0-rc.0" }
[dev-dependencies] [dev-dependencies]
insta = { version = "1.39.0", features = ["ron", "redactions"] } insta = { version = "1.40.0", features = ["ron", "redactions"] }
tokio = { version = "1.39.2", features = ["test-util"] } tokio = { version = "1.40.0", features = ["test-util"] }
proptest = "1.4.0" proptest = "1.4.0"
proptest-derive = "0.5.0" proptest-derive = "0.5.0"
@ -121,11 +120,11 @@ ff = "0.13.0"
group = "0.13.0" group = "0.13.0"
jubjub = "0.10.0" jubjub = "0.10.0"
rand = "0.8.5" rand = "0.8.5"
tempfile = "3.11.0" tempfile = "3.13.0"
zcash_note_encryption = "0.4.0" zcash_note_encryption = "0.4.0"
toml = "0.8.19" toml = "0.8.19"
tonic = "0.12.1" tonic = "0.12.3"
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.39", features = ["proptest-impl"] } zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40", features = ["proptest-impl"] }
zebra-test = { path = "../zebra-test", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test", version = "1.0.0-beta.40" }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-script" name = "zebra-script"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "Zebra script verification wrapping zcashd's zcash_script library" description = "Zebra script verification wrapping zcashd's zcash_script library"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -16,11 +16,11 @@ categories = ["api-bindings", "cryptography::cryptocurrencies"]
[dependencies] [dependencies]
zcash_script = "0.2.0" zcash_script = "0.2.0"
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39" } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40" }
thiserror = "1.0.63" thiserror = "1.0.64"
[dev-dependencies] [dev-dependencies]
hex = "0.4.3" hex = "0.4.3"
lazy_static = "1.4.0" lazy_static = "1.4.0"
zebra-test = { path = "../zebra-test", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test", version = "1.0.0-beta.40" }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-state" name = "zebra-state"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "State contextual verification and storage code for Zebra" description = "State contextual verification and storage code for Zebra"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -61,36 +61,36 @@ hex = "0.4.3"
hex-literal = "0.4.1" hex-literal = "0.4.1"
humantime-serde = "1.1.1" humantime-serde = "1.1.1"
human_bytes = { version = "0.4.3", default-features = false } human_bytes = { version = "0.4.3", default-features = false }
indexmap = "2.3.0" indexmap = "2.5.0"
itertools = "0.13.0" itertools = "0.13.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"
metrics = "0.23.0" metrics = "0.23.0"
mset = "0.1.1" mset = "0.1.1"
regex = "1.10.6" regex = "1.11.0"
rlimit = "0.10.1" rlimit = "0.10.2"
rocksdb = { version = "0.22.0", default-features = false, features = ["lz4"] } rocksdb = { version = "0.22.0", default-features = false, features = ["lz4"] }
semver = "1.0.23" semver = "1.0.23"
serde = { version = "1.0.204", features = ["serde_derive"] } serde = { version = "1.0.210", features = ["serde_derive"] }
tempfile = "3.11.0" tempfile = "3.13.0"
thiserror = "1.0.63" thiserror = "1.0.64"
rayon = "1.10.0" rayon = "1.10.0"
tokio = { version = "1.39.2", features = ["rt-multi-thread", "sync", "tracing"] } tokio = { version = "1.40.0", features = ["rt-multi-thread", "sync", "tracing"] }
tower = { version = "0.4.13", features = ["buffer", "util"] } tower = { version = "0.4.13", features = ["buffer", "util"] }
tracing = "0.1.39" tracing = "0.1.39"
# elasticsearch specific dependencies. # elasticsearch specific dependencies.
# Security: avoid default dependency on openssl # Security: avoid default dependency on openssl
elasticsearch = { version = "8.5.0-alpha.1", default-features = false, features = ["rustls-tls"], optional = true } elasticsearch = { version = "8.5.0-alpha.1", default-features = false, features = ["rustls-tls"], optional = true }
serde_json = { version = "1.0.122", package = "serde_json", optional = true } serde_json = { version = "1.0.128", package = "serde_json", optional = true }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39", features = ["async-error"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = ["async-error"] }
# prod feature progress-bar # prod feature progress-bar
howudoin = { version = "0.1.2", optional = true } howudoin = { version = "0.1.2", optional = true }
# test feature proptest-impl # test feature proptest-impl
zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.39", optional = true } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40", optional = true }
proptest = { version = "1.4.0", optional = true } proptest = { version = "1.4.0", optional = true }
proptest-derive = { version = "0.5.0", optional = true } proptest-derive = { version = "0.5.0", optional = true }
@ -104,7 +104,7 @@ once_cell = "1.18.0"
spandoc = "0.2.2" spandoc = "0.2.2"
hex = { version = "0.4.3", features = ["serde"] } hex = { version = "0.4.3", features = ["serde"] }
insta = { version = "1.39.0", features = ["ron", "redactions"] } insta = { version = "1.40.0", features = ["ron", "redactions"] }
proptest = "1.4.0" proptest = "1.4.0"
proptest-derive = "0.5.0" proptest-derive = "0.5.0"
@ -113,7 +113,7 @@ rand = "0.8.5"
halo2 = { package = "halo2_proofs", version = "0.3.0" } halo2 = { package = "halo2_proofs", version = "0.3.0" }
jubjub = "0.10.0" jubjub = "0.10.0"
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39", features = ["proptest-impl"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = ["proptest-impl"] }
zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test/", version = "1.0.0-beta.40" }

View File

@ -107,20 +107,7 @@ pub const MAX_NON_FINALIZED_CHAIN_FORKS: usize = 10;
pub const MAX_FIND_BLOCK_HASHES_RESULTS: u32 = 500; pub const MAX_FIND_BLOCK_HASHES_RESULTS: u32 = 500;
/// The maximum number of block headers allowed in `getheaders` responses in the Zcash network protocol. /// The maximum number of block headers allowed in `getheaders` responses in the Zcash network protocol.
const MAX_FIND_BLOCK_HEADERS_RESULTS_FOR_PROTOCOL: u32 = 160; pub const MAX_FIND_BLOCK_HEADERS_RESULTS: u32 = 160;
/// The maximum number of block headers sent by Zebra in `getheaders` responses.
///
/// Older versions of Zcashd will blindly request more block headers as long as it
/// got 160 block headers in response to a previous query,
/// _even if those headers are already known_.
///
/// To avoid this behavior, return slightly fewer than the maximum,
/// so `zcashd` thinks it has reached our chain tip.
///
/// <https://github.com/bitcoin/bitcoin/pull/4468/files#r17026905>
pub const MAX_FIND_BLOCK_HEADERS_RESULTS_FOR_ZEBRA: u32 =
MAX_FIND_BLOCK_HEADERS_RESULTS_FOR_PROTOCOL - 2;
/// These database versions can be recreated from their directly preceding versions. /// These database versions can be recreated from their directly preceding versions.
pub const RESTORABLE_DB_VERSIONS: [u64; 1] = [26]; pub const RESTORABLE_DB_VERSIONS: [u64; 1] = [26];

View File

@ -25,7 +25,7 @@ use zebra_chain::{
/// will work with inline links. /// will work with inline links.
#[allow(unused_imports)] #[allow(unused_imports)]
use crate::{ use crate::{
constants::{MAX_FIND_BLOCK_HASHES_RESULTS, MAX_FIND_BLOCK_HEADERS_RESULTS_FOR_ZEBRA}, constants::{MAX_FIND_BLOCK_HASHES_RESULTS, MAX_FIND_BLOCK_HEADERS_RESULTS},
ReadResponse, Response, ReadResponse, Response,
}; };
@ -721,7 +721,7 @@ pub enum Request {
/// Stops the list of headers after: /// Stops the list of headers after:
/// * adding the best tip, /// * adding the best tip,
/// * adding the header matching the `stop` hash to the list, if it is in the best chain, or /// * adding the header matching the `stop` hash to the list, if it is in the best chain, or
/// * adding [`MAX_FIND_BLOCK_HEADERS_RESULTS_FOR_ZEBRA`] headers to the list. /// * adding [`MAX_FIND_BLOCK_HEADERS_RESULTS`] headers to the list.
/// ///
/// Returns an empty list if the state is empty. /// Returns an empty list if the state is empty.
/// ///
@ -925,7 +925,7 @@ pub enum ReadRequest {
/// Stops the list of headers after: /// Stops the list of headers after:
/// * adding the best tip, /// * adding the best tip,
/// * adding the header matching the `stop` hash to the list, if it is in the best chain, or /// * adding the header matching the `stop` hash to the list, if it is in the best chain, or
/// * adding [`MAX_FIND_BLOCK_HEADERS_RESULTS_FOR_ZEBRA`] headers to the list. /// * adding [`MAX_FIND_BLOCK_HEADERS_RESULTS`] headers to the list.
/// ///
/// Returns an empty list if the state is empty. /// Returns an empty list if the state is empty.
/// ///

View File

@ -44,8 +44,7 @@ use zebra_chain::{block::Height, serialization::ZcashSerialize};
use crate::{ use crate::{
constants::{ constants::{
MAX_FIND_BLOCK_HASHES_RESULTS, MAX_FIND_BLOCK_HEADERS_RESULTS_FOR_ZEBRA, MAX_FIND_BLOCK_HASHES_RESULTS, MAX_FIND_BLOCK_HEADERS_RESULTS, MAX_LEGACY_CHAIN_BLOCKS,
MAX_LEGACY_CHAIN_BLOCKS,
}, },
service::{ service::{
block_iter::any_ancestor_blocks, block_iter::any_ancestor_blocks,
@ -1476,7 +1475,7 @@ impl Service<ReadRequest> for ReadStateService {
&state.db, &state.db,
known_blocks, known_blocks,
stop, stop,
MAX_FIND_BLOCK_HEADERS_RESULTS_FOR_ZEBRA, MAX_FIND_BLOCK_HEADERS_RESULTS,
) )
}, },
); );

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-test" name = "zebra-test"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "Test harnesses and test vectors for Zebra" description = "Test harnesses and test vectors for Zebra"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -16,16 +16,16 @@ categories = ["command-line-utilities", "cryptography::cryptocurrencies"]
[dependencies] [dependencies]
hex = "0.4.3" hex = "0.4.3"
indexmap = "2.3.0" indexmap = "2.5.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"
insta = "1.39.0" insta = "1.40.0"
itertools = "0.13.0" itertools = "0.13.0"
proptest = "1.4.0" proptest = "1.4.0"
once_cell = "1.18.0" once_cell = "1.18.0"
rand = "0.8.5" rand = "0.8.5"
regex = "1.10.6" regex = "1.11.0"
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
tower = { version = "0.4.13", features = ["util"] } tower = { version = "0.4.13", features = ["util"] }
futures = "0.3.30" futures = "0.3.30"
@ -35,13 +35,13 @@ color-eyre = "0.6.3"
tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } tinyvec = { version = "1.8.0", features = ["rustc_1_55"] }
humantime = "2.1.0" humantime = "2.1.0"
owo-colors = "4.0.0" owo-colors = "4.1.0"
spandoc = "0.2.2" spandoc = "0.2.2"
thiserror = "1.0.63" thiserror = "1.0.64"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-error = "0.2.0" tracing-error = "0.2.0"
tracing = "0.1.39" tracing = "0.1.39"
[dev-dependencies] [dev-dependencies]
tempfile = "3.11.0" tempfile = "3.13.0"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "zebra-utils" name = "zebra-utils"
version = "1.0.0-beta.39" version = "1.0.0-beta.40"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "Developer tools for Zebra maintenance and testing" description = "Developer tools for Zebra maintenance and testing"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -89,27 +89,27 @@ tinyvec = { version = "1.8.0", features = ["rustc_1_55"] }
structopt = "0.3.26" structopt = "0.3.26"
hex = "0.4.3" hex = "0.4.3"
serde_json = "1.0.122" serde_json = "1.0.128"
tracing-error = "0.2.0" tracing-error = "0.2.0"
tracing-subscriber = "0.3.18" tracing-subscriber = "0.3.18"
thiserror = "1.0.63" thiserror = "1.0.64"
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.39" } zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.40" }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39" } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40" }
# These crates are needed for the block-template-to-proposal binary # These crates are needed for the block-template-to-proposal binary
zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.39", optional = true } zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.40", optional = true }
# These crates are needed for the zebra-checkpoints binary # These crates are needed for the zebra-checkpoints binary
itertools = { version = "0.13.0", optional = true } itertools = { version = "0.13.0", optional = true }
# These crates are needed for the search-issue-refs binary # These crates are needed for the search-issue-refs binary
regex = { version = "1.10.6", optional = true } regex = { version = "1.11.0", optional = true }
# Avoid default openssl dependency to reduce the dependency tree and security alerts. # Avoid default openssl dependency to reduce the dependency tree and security alerts.
reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls"], optional = true } reqwest = { version = "0.11.26", default-features = false, features = ["rustls-tls"], optional = true }
# These crates are needed for the zebra-checkpoints and search-issue-refs binaries # These crates are needed for the zebra-checkpoints and search-issue-refs binaries
tokio = { version = "1.39.2", features = ["full"], optional = true } tokio = { version = "1.40.0", features = ["full"], optional = true }
jsonrpc = { version = "0.18.0", optional = true } jsonrpc = { version = "0.18.0", optional = true }
@ -119,9 +119,9 @@ zcash_protocol.workspace = true
# For the openapi generator # For the openapi generator
rand = "0.8.5" rand = "0.8.5"
syn = { version = "2.0.72", features = ["full"], optional = true } syn = { version = "2.0.79", features = ["full"], optional = true }
quote = { version = "1.0.36", optional = true } quote = { version = "1.0.37", optional = true }
serde_yml = { version = "0.0.12", optional = true } serde_yml = { version = "0.0.12", optional = true }
serde = { version = "1.0.204", features = ["serde_derive"], optional = true } serde = { version = "1.0.210", features = ["serde_derive"], optional = true }
indexmap = "2.3.0" indexmap = "2.5.0"

View File

@ -1,7 +1,7 @@
[package] [package]
# Crate metadata # Crate metadata
name = "zebrad" name = "zebrad"
version = "1.9.0" version = "2.0.0-rc.0"
authors = ["Zcash Foundation <zebra@zfnd.org>"] authors = ["Zcash Foundation <zebra@zfnd.org>"]
description = "The Zcash Foundation's independent, consensus-compatible implementation of a Zcash node" description = "The Zcash Foundation's independent, consensus-compatible implementation of a Zcash node"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
@ -165,30 +165,30 @@ tx-v6 = [
] ]
[dependencies] [dependencies]
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39" } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40" }
zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.39" } zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.40" }
zebra-network = { path = "../zebra-network", version = "1.0.0-beta.39" } zebra-network = { path = "../zebra-network", version = "1.0.0-beta.40" }
zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.39", features = ["rpc-client"] } zebra-node-services = { path = "../zebra-node-services", version = "1.0.0-beta.40", features = ["rpc-client"] }
zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.39" } zebra-rpc = { path = "../zebra-rpc", version = "1.0.0-beta.40" }
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.39" } zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40" }
# Required for crates.io publishing, but it's only used in tests # Required for crates.io publishing, but it's only used in tests
zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.39", optional = true } zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.40", optional = true }
abscissa_core = "0.7.0" abscissa_core = "0.7.0"
clap = { version = "4.5.13", features = ["cargo"] } clap = { version = "4.5.18", features = ["cargo"] }
chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] } chrono = { version = "0.4.38", default-features = false, features = ["clock", "std"] }
humantime-serde = "1.1.1" humantime-serde = "1.1.1"
indexmap = "2.3.0" indexmap = "2.5.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"
semver = "1.0.23" semver = "1.0.23"
serde = { version = "1.0.204", features = ["serde_derive"] } serde = { version = "1.0.210", features = ["serde_derive"] }
toml = "0.8.19" toml = "0.8.19"
futures = "0.3.30" futures = "0.3.30"
rayon = "1.10.0" rayon = "1.10.0"
tokio = { version = "1.39.2", features = ["time", "rt-multi-thread", "macros", "tracing", "signal"] } tokio = { version = "1.40.0", features = ["time", "rt-multi-thread", "macros", "tracing", "signal"] }
tokio-stream = { version = "0.1.15", features = ["time"] } tokio-stream = { version = "0.1.16", features = ["time"] }
tower = { version = "0.4.13", features = ["hedge", "limit"] } tower = { version = "0.4.13", features = ["hedge", "limit"] }
pin-project = "1.1.5" pin-project = "1.1.5"
@ -197,7 +197,7 @@ color-eyre = { version = "0.6.3", default-features = false, features = ["issue-u
# Enable a feature that makes tinyvec compile much faster. # Enable a feature that makes tinyvec compile much faster.
tinyvec = { version = "1.8.0", features = ["rustc_1_55"] } tinyvec = { version = "1.8.0", features = ["rustc_1_55"] }
thiserror = "1.0.63" thiserror = "1.0.64"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-appender = "0.2.3" tracing-appender = "0.2.3"
@ -229,8 +229,8 @@ tracing-journald = { version = "0.3.0", optional = true }
# prod feature filter-reload # prod feature filter-reload
hyper = { version = "1.3.1", features = ["http1", "http2", "server"], optional = true } hyper = { version = "1.3.1", features = ["http1", "http2", "server"], optional = true }
http-body-util = { version = "0.1.2", optional = true } http-body-util = { version = "0.1.2", optional = true }
hyper-util = { version = "0.1.6", optional = true } hyper-util = { version = "0.1.9", optional = true }
bytes = { version = "1.7.1", optional = true } bytes = { version = "1.7.2", optional = true }
# prod feature prometheus # prod feature prometheus
metrics-exporter-prometheus = { version = "0.15.3", default-features = false, features = ["http-listener"], optional = true } metrics-exporter-prometheus = { version = "0.15.3", default-features = false, features = ["http-listener"], optional = true }
@ -256,7 +256,7 @@ console-subscriber = { version = "0.4.0", optional = true }
vergen = { version = "8.3.2", default-features = false, features = ["cargo", "git", "git2", "rustc"] } vergen = { version = "8.3.2", default-features = false, features = ["cargo", "git", "git2", "rustc"] }
# test feature lightwalletd-grpc-tests # test feature lightwalletd-grpc-tests
tonic-build = { version = "0.12.1", optional = true } tonic-build = { version = "0.12.3", optional = true }
[dev-dependencies] [dev-dependencies]
abscissa_core = { version = "0.7.0", features = ["testing"] } abscissa_core = { version = "0.7.0", features = ["testing"] }
@ -264,22 +264,22 @@ hex = "0.4.3"
hex-literal = "0.4.1" hex-literal = "0.4.1"
jsonrpc-core = "18.0.0" jsonrpc-core = "18.0.0"
once_cell = "1.18.0" once_cell = "1.18.0"
regex = "1.10.6" regex = "1.11.0"
insta = { version = "1.39.0", features = ["json"] } insta = { version = "1.40.0", features = ["json"] }
# zebra-rpc needs the preserve_order feature, it also makes test results more stable # zebra-rpc needs the preserve_order feature, it also makes test results more stable
serde_json = { version = "1.0.122", features = ["preserve_order"] } serde_json = { version = "1.0.128", features = ["preserve_order"] }
tempfile = "3.11.0" tempfile = "3.13.0"
hyper = { version = "1.3.1", features = ["http1", "http2", "server"]} hyper = { version = "1.3.1", features = ["http1", "http2", "server"]}
tracing-test = { version = "0.2.4", features = ["no-env-filter"] } tracing-test = { version = "0.2.4", features = ["no-env-filter"] }
tokio = { version = "1.39.2", features = ["full", "tracing", "test-util"] } tokio = { version = "1.40.0", features = ["full", "tracing", "test-util"] }
tokio-stream = "0.1.15" tokio-stream = "0.1.16"
# test feature lightwalletd-grpc-tests # test feature lightwalletd-grpc-tests
prost = "0.13.1" prost = "0.13.3"
tonic = "0.12.1" tonic = "0.12.3"
proptest = "1.4.0" proptest = "1.4.0"
proptest-derive = "0.5.0" proptest-derive = "0.5.0"
@ -287,13 +287,13 @@ proptest-derive = "0.5.0"
# enable span traces and track caller in tests # enable span traces and track caller in tests
color-eyre = { version = "0.6.3" } color-eyre = { version = "0.6.3" }
zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.39", features = ["proptest-impl"] } zebra-chain = { path = "../zebra-chain", version = "1.0.0-beta.40", features = ["proptest-impl"] }
zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.39", features = ["proptest-impl"] } zebra-consensus = { path = "../zebra-consensus", version = "1.0.0-beta.40", features = ["proptest-impl"] }
zebra-network = { path = "../zebra-network", version = "1.0.0-beta.39", features = ["proptest-impl"] } zebra-network = { path = "../zebra-network", version = "1.0.0-beta.40", features = ["proptest-impl"] }
zebra-state = { path = "../zebra-state", version = "1.0.0-beta.39", features = ["proptest-impl"] } zebra-state = { path = "../zebra-state", version = "1.0.0-beta.40", features = ["proptest-impl"] }
zebra-test = { path = "../zebra-test", version = "1.0.0-beta.39" } zebra-test = { path = "../zebra-test", version = "1.0.0-beta.40" }
zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.6" } zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.7" }
# Used by the checkpoint generation tests via the zebra-checkpoints feature # Used by the checkpoint generation tests via the zebra-checkpoints feature
# (the binaries in this crate won't be built unless their features are enabled). # (the binaries in this crate won't be built unless their features are enabled).
@ -304,7 +304,7 @@ zebra-grpc = { path = "../zebra-grpc", version = "0.1.0-alpha.6" }
# When `-Z bindeps` is stabilised, enable this binary dependency instead: # When `-Z bindeps` is stabilised, enable this binary dependency instead:
# https://github.com/rust-lang/cargo/issues/9096 # https://github.com/rust-lang/cargo/issues/9096
# zebra-utils { path = "../zebra-utils", artifact = "bin:zebra-checkpoints" } # zebra-utils { path = "../zebra-utils", artifact = "bin:zebra-checkpoints" }
zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.39" } zebra-utils = { path = "../zebra-utils", version = "1.0.0-beta.40" }
[lints.rust] [lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] } unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }

View File

@ -47,7 +47,7 @@ fn main() {
// so we can derive `Eq` as well as the default generated `PartialEq` derive. // so we can derive `Eq` as well as the default generated `PartialEq` derive.
// This fixes `clippy::derive_partial_eq_without_eq` warnings. // This fixes `clippy::derive_partial_eq_without_eq` warnings.
.message_attribute(".", "#[derive(Eq)]") .message_attribute(".", "#[derive(Eq)]")
.compile( .compile_protos(
&["tests/common/lightwalletd/proto/service.proto"], &["tests/common/lightwalletd/proto/service.proto"],
&["tests/common/lightwalletd/proto"], &["tests/common/lightwalletd/proto"],
) )

View File

@ -13,7 +13,7 @@ use zebra_chain::{
use crate::application::release_version; use crate::application::release_version;
/// The estimated height that this release will be published. /// The estimated height that this release will be published.
pub const ESTIMATED_RELEASE_HEIGHT: u32 = 2_626_500; pub const ESTIMATED_RELEASE_HEIGHT: u32 = 2_678_363;
/// The maximum number of days after `ESTIMATED_RELEASE_HEIGHT` where a Zebra server will run /// The maximum number of days after `ESTIMATED_RELEASE_HEIGHT` where a Zebra server will run
/// without halting. /// without halting.
@ -22,8 +22,8 @@ pub const ESTIMATED_RELEASE_HEIGHT: u32 = 2_626_500;
/// ///
/// - Zebra will exit with a panic if the current tip height is bigger than the `ESTIMATED_RELEASE_HEIGHT` /// - Zebra will exit with a panic if the current tip height is bigger than the `ESTIMATED_RELEASE_HEIGHT`
/// plus this number of days. /// plus this number of days.
/// - Currently set to 14 weeks. /// - Currently set to 5 weeks to end support before Mainnet Nu6 activation at block [`2_726_400`](https://zips.z.cash/zip-0253).
pub const EOS_PANIC_AFTER: u32 = 70; pub const EOS_PANIC_AFTER: u32 = 35;
/// The number of days before the end of support where Zebra will display warnings. /// The number of days before the end of support where Zebra will display warnings.
pub const EOS_WARN_AFTER: u32 = EOS_PANIC_AFTER - 14; pub const EOS_WARN_AFTER: u32 = EOS_PANIC_AFTER - 14;