From 6eb09f6dda3eedd930ffff405ecb30ffa647a8b4 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Thu, 21 Nov 2024 19:04:07 -0300 Subject: [PATCH 1/3] fix links in release templates --- .github/ISSUE_TEMPLATE/release.md | 2 +- .../release-checklist.md | 19 +++++++++++++------ book/src/SUMMARY.md | 1 + 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index 0e2ee30b7b1..080bc385c20 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -16,7 +16,7 @@ They can be skipped for urgent releases. To check consensus correctness, we want to test that the state format is valid after a full sync. (Format upgrades are tested in CI on each PR.) -- [ ] Make sure there has been [at least one successful full sync test](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-integration-tests-gcp.yml?query=event%3Aschedule) since the last state change, or +- [ ] Make sure there has been [at least one successful full sync test](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml?query=event%3Aschedule) since the last state change, or - [ ] Start a manual workflow run with a Zebra and `lightwalletd` full sync. State format changes can be made in `zebra-state` or `zebra-chain`. The state format can be changed by data that is sent to the state, data created within the state using `zebra-chain`, or serialization formats in `zebra-state` or `zebra-chain`. diff --git a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md index 5445834df3e..8679a37154f 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release-checklist.md +++ b/.github/PULL_REQUEST_TEMPLATE/release-checklist.md @@ -9,7 +9,7 @@ assignees: '' # Prepare for the Release -- [ ] Make sure there has been [at least one successful full sync test](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-integration-tests-gcp.yml?query=event%3Aschedule) since the last state change, or start a manual full sync. +- [ ] Make sure there has been [at least one successful full sync test in the main branch](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml?query=branch%3Amain) since the last state change, or start a manual full sync. - [ ] Make sure the PRs with the new checkpoint hashes and missed dependencies are already merged. (See the release ticket checklist for details) @@ -57,7 +57,13 @@ fastmod --fixed-strings '1.58' '1.65' - [ ] Freeze the [`batched` queue](https://dashboard.mergify.com/github/ZcashFoundation/repo/zebra/queues) using Mergify. - [ ] Mark all the release PRs as `Critical` priority, so they go in the `urgent` Mergify queue. - [ ] Mark all non-release PRs with `do-not-merge`, because Mergify checks approved PRs against every commit, even when a queue is frozen. +- [ ] Add the `A-release` tag to the release pull request in order for the `check_no_git_refs_in_cargo_lock` to run. +## Zebra git sources dependencies + +- [ ] Ensure the `check_no_git_refs_in_cargo_lock` check passes. + +This check runs automatically on pull requests with the `A-release` label. It must pass for crates to be published to crates.io. If the check fails, you should either halt the release process or proceed with the understanding that the crates will not be published on crates.io. # Update Versions and End of Support @@ -76,7 +82,7 @@ Zebra's Rust API doesn't have any support or stability guarantees, so we keep al ### Update Crate Versions -If you're publishing crates for the first time, [log in to crates.io](https://github.com/ZcashFoundation/zebra/blob/doc-crate-own/book/src/dev/crate-owners.md#logging-in-to-cratesio), +If you're publishing crates for the first time, [log in to crates.io](https://zebra.zfnd.org/dev/crate-owners.html#logging-in-to-cratesio), and make sure you're a member of owners group. Check that the release will work: @@ -103,7 +109,7 @@ Crate publishing is [automatically checked in CI](https://github.com/ZcashFounda ## Update End of Support The end of support height is calculated from the current blockchain height: -- [ ] Find where the Zcash blockchain tip is now by using a [Zcash explorer](https://zcashblockexplorer.com/blocks) or other tool. +- [ ] Find where the Zcash blockchain tip is now by using a [Zcash Block Explorer](https://mainnet.zcashexplorer.app/) or other tool. - [ ] Replace `ESTIMATED_RELEASE_HEIGHT` in [`end_of_support.rs`](https://github.com/ZcashFoundation/zebra/blob/main/zebrad/src/components/sync/end_of_support.rs) with the height you estimate the release will be tagged.
@@ -141,8 +147,7 @@ The end of support height is calculated from the current blockchain height: ## Test the Pre-Release - [ ] Wait until the Docker binaries have been built on `main`, and the quick tests have passed: - - [ ] [ci-unit-tests-docker.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-unit-tests-docker.yml?query=branch%3Amain) - - [ ] [ci-integration-tests-gcp.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-integration-tests-gcp.yml?query=branch%3Amain) + - [ ] [ci-tests.yml](https://github.com/ZcashFoundation/zebra/actions/workflows/ci-tests.yml?query=branch%3Amain) - [ ] Wait until the [pre-release deployment machines have successfully launched](https://github.com/ZcashFoundation/zebra/actions/workflows/cd-deploy-nodes-gcp.yml?query=event%3Arelease) ## Publish Release @@ -151,7 +156,7 @@ The end of support height is calculated from the current blockchain height: ## Publish Crates -- [ ] [Run `cargo login`](https://github.com/ZcashFoundation/zebra/blob/doc-crate-own/book/src/dev/crate-owners.md#logging-in-to-cratesio) +- [ ] [Run `cargo login`](https://zebra.zfnd.org/dev/crate-owners.html#logging-in-to-cratesio) - [ ] Run `cargo clean` in the zebra repo (optional) - [ ] Publish the crates to crates.io: `cargo release publish --verbose --workspace --execute` - [ ] Check that Zebra can be installed from `crates.io`: @@ -159,7 +164,9 @@ The end of support height is calculated from the current blockchain height: and put the output in a comment on the PR. ## Publish Docker Images + - [ ] Wait for the [the Docker images to be published successfully](https://github.com/ZcashFoundation/zebra/actions/workflows/release-binaries.yml?query=event%3Arelease). +- [ ] Wait for the new tag in the [dockerhub zebra space](https://hub.docker.com/r/zfnd/zebra/tags) - [ ] Un-freeze the [`batched` queue](https://dashboard.mergify.com/github/ZcashFoundation/repo/zebra/queues) using Mergify. - [ ] Remove `do-not-merge` from the PRs you added it to diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index a7b018a2b9a..9f8715a8806 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -37,6 +37,7 @@ - [Doing Mass Renames](dev/mass-renames.md) - [Updating the ECC dependencies](dev/ecc-updates.md) - [Running a Private Testnet Test](dev/private-testnet.md) + - [Zebra crates](dev/crate-owners.md) - [Zebra RFCs](dev/rfcs.md) - [Pipelinable Block Lookup](dev/rfcs/0001-pipelinable-block-lookup.md) - [Parallel Verification](dev/rfcs/0002-parallel-verification.md) From 8d73c15de2f3ff6fb99c76f00eb08d9d1043d976 Mon Sep 17 00:00:00 2001 From: Marek Date: Thu, 21 Nov 2024 17:05:47 +0100 Subject: [PATCH 2/3] Update the reference Sapling treestate Zebra's treestate serialization differs from `zcashd` in the following way: `zcashd` omits the serialization of empty trailing ommers, while Zebra doesn't. This means that `zcashd` serializes the Sapling treestate for height 419_201 as 019eb30778ddeea84c72e69e07a1689f3c8def3dc0a1939f0edcbe47279069d9310002000150715810d52caf35471d10feb487213fbd95ff209122225b7b65d27a7fb1a44d Whereas Zebra serializes it as 019eb30778ddeea84c72e69e07a1689f3c8def3dc0a1939f0edcbe47279069d931001f000150715810d52caf35471d10feb487213fbd95ff209122225b7b65d27a7fb1a44d0000000000000000000000000000000000000000000000000000000000 Serialization Format ==================== The serialized treestate consists of optional, hex-encoded, 32-byte hashes. If the hash is not present, it is serialized as byte 0, i.e., `0x00`. If the hash is present, it is prefixed by byte 1, i.e. `0x01`. The first two hashes in the serialized treestate are the treestate's left and right leaves. These are followed by the serialized length of the vector of ommers. This length is serialized as 1, 3, 5, or 9 bytes. If the length is less than 253, it is serialized as a single byte. The length is then followed by the serialized ommers. We can now parse the first string, produced by `zcashd`: - `0119eb30778ddeea84c72e69e07a1689f3c8def3dc0a1939f0edcbe47279069d931` is the serialized left leaf, - `00` is the serialized right leaf, - `02` is the serialized length of the vector of ommers, - `00` is the serialized first ommer, - `0150715810d52caf35471d10feb487213fbd95ff209122225b7b65d27a7fb1a44d` is the serialized second ommer. And the second one, produced by Zebra: - `0119eb30778ddeea84c72e69e07a1689f3c8def3dc0a1939f0edcbe47279069d931` is the serialized left leaf, - `00` is the serialized right leaf, - `1f` is the serialized length of the vector of ommers, - `00` is the serialized first ommer, - `0150715810d52caf35471d10feb487213fbd95ff209122225b7b65d27a7fb1a44d` is the serialized second ommer - `0000000000000000000000000000000000000000000000000000000000` are the remaining 29 serialized ommers. Note that both serializations represent the same treestate. --- zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt b/zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt index c6cd1b532c0..1fbaf976145 100644 --- a/zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt +++ b/zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt @@ -1 +1 @@ -019eb30778ddeea84c72e69e07a1689f3c8def3dc0a1939f0edcbe47279069d9310002000150715810d52caf35471d10feb487213fbd95ff209122225b7b65d27a7fb1a44d \ No newline at end of file +019eb30778ddeea84c72e69e07a1689f3c8def3dc0a1939f0edcbe47279069d931001f000150715810d52caf35471d10feb487213fbd95ff209122225b7b65d27a7fb1a44d0000000000000000000000000000000000000000000000000000000000 From 7c1a61783318e19c0fa8f68778f4542ae44119a4 Mon Sep 17 00:00:00 2001 From: Marek Date: Fri, 22 Nov 2024 02:36:33 +0100 Subject: [PATCH 3/3] Remove a new line char --- zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt b/zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt index 1fbaf976145..7ce9416012a 100644 --- a/zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt +++ b/zebra-test/src/vectors/sapling-treestate-main-0-419-201.txt @@ -1 +1 @@ -019eb30778ddeea84c72e69e07a1689f3c8def3dc0a1939f0edcbe47279069d931001f000150715810d52caf35471d10feb487213fbd95ff209122225b7b65d27a7fb1a44d0000000000000000000000000000000000000000000000000000000000 +019eb30778ddeea84c72e69e07a1689f3c8def3dc0a1939f0edcbe47279069d931001f000150715810d52caf35471d10feb487213fbd95ff209122225b7b65d27a7fb1a44d0000000000000000000000000000000000000000000000000000000000 \ No newline at end of file