Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge queue: embarking main (3983428) and [#9051 + #9050] together #9054

Closed
wants to merge 5 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 22, 2024

🎉 This combination of pull requests has been checked successfully and will be merged soon. 🎉

Branch main (3983428) and [#9051 + #9050] are embarked together for merge.

This pull request has been created by Mergify to speculatively check the mergeability of [#9051 + #9050].
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue urgent for merge:

  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #approved-reviews-by >= 1 [🛡 GitHub repository ruleset rule]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub repository ruleset rule]
  • #review-threads-unresolved = 0 [🛡 GitHub repository ruleset rule]
  • any of [🛡 GitHub branch protection]:
    • check-success = Test stable on ubuntu-latest
    • check-neutral = Test stable on ubuntu-latest
    • check-skipped = Test stable on ubuntu-latest
  • any of [🛡 GitHub branch protection]:
    • check-success = Test CD custom Docker config file / Test custom-conf in Docker
    • check-neutral = Test CD custom Docker config file / Test custom-conf in Docker
    • check-skipped = Test CD custom Docker config file / Test custom-conf in Docker
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Rustfmt
    • check-neutral = Rustfmt
    • check-skipped = Rustfmt
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = mergefreeze
    • check-neutral = mergefreeze
    • check-skipped = mergefreeze
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Clippy
    • check-neutral = Clippy
    • check-skipped = Clippy
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test with fake activation heights
    • check-neutral = Test with fake activation heights
    • check-skipped = Test with fake activation heights
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test all
    • check-neutral = Test all
    • check-skipped = Test all
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check deny.toml bans
    • check-neutral = Check deny.toml bans
    • check-skipped = Check deny.toml bans
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check deny.toml bans --all-features
    • check-neutral = Check deny.toml bans --all-features
    • check-skipped = Check deny.toml bans --all-features
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check deny.toml bans --features default-release-binaries
    • check-neutral = Check deny.toml bans --features default-release-binaries
    • check-skipped = Check deny.toml bans --features default-release-binaries
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check deny.toml sources
    • check-neutral = Check deny.toml sources
    • check-skipped = Check deny.toml sources
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check deny.toml sources --all-features
    • check-neutral = Check deny.toml sources --all-features
    • check-skipped = Check deny.toml sources --all-features
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check deny.toml sources --features default-release-binaries
    • check-neutral = Check deny.toml sources --features default-release-binaries
    • check-skipped = Check deny.toml sources --features default-release-binaries
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check Cargo.lock is up to date
    • check-neutral = Check Cargo.lock is up to date
    • check-skipped = Check Cargo.lock is up to date
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Install zebrad from lockfile without cache on ubuntu-latest
    • check-neutral = Install zebrad from lockfile without cache on ubuntu-latest
    • check-skipped = Install zebrad from lockfile without cache on ubuntu-latest
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test checkpoint sync from empty state
    • check-neutral = Test checkpoint sync from empty state
    • check-skipped = Test checkpoint sync from empty state
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Zebra checkpoint update / Run sync-past-checkpoint test
    • check-neutral = Zebra checkpoint update / Run sync-past-checkpoint test
    • check-skipped = Zebra checkpoint update / Run sync-past-checkpoint test
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Zebra tip JSON-RPC / Run fully-synced-rpc test
    • check-neutral = Zebra tip JSON-RPC / Run fully-synced-rpc test
    • check-skipped = Zebra tip JSON-RPC / Run fully-synced-rpc test
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build tower-batch-control crate
    • check-neutral = Build tower-batch-control crate
    • check-skipped = Build tower-batch-control crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-chain crate
    • check-neutral = Build zebra-chain crate
    • check-skipped = Build zebra-chain crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-consensus crate
    • check-neutral = Build zebra-consensus crate
    • check-skipped = Build zebra-consensus crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-grpc crate
    • check-neutral = Build zebra-grpc crate
    • check-skipped = Build zebra-grpc crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-network crate
    • check-neutral = Build zebra-network crate
    • check-skipped = Build zebra-network crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-node-services crate
    • check-neutral = Build zebra-node-services crate
    • check-skipped = Build zebra-node-services crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-rpc crate
    • check-neutral = Build zebra-rpc crate
    • check-skipped = Build zebra-rpc crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-scan crate
    • check-neutral = Build zebra-scan crate
    • check-skipped = Build zebra-scan crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-script crate
    • check-neutral = Build zebra-script crate
    • check-skipped = Build zebra-script crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build tower-fallback crate
    • check-neutral = Build tower-fallback crate
    • check-skipped = Build tower-fallback crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-state crate
    • check-neutral = Build zebra-state crate
    • check-skipped = Build zebra-state crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-test crate
    • check-neutral = Build zebra-test crate
    • check-skipped = Build zebra-test crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build zebra-utils crate
    • check-neutral = Build zebra-utils crate
    • check-skipped = Build zebra-utils crate
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Zebra tip update / Run update-to-tip test
    • check-neutral = Zebra tip update / Run update-to-tip test
    • check-skipped = Zebra tip update / Run update-to-tip test
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test beta on ubuntu-latest
    • check-neutral = Test beta on ubuntu-latest
    • check-skipped = Test beta on ubuntu-latest
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test stable on ubuntu-latest
    • check-neutral = Test stable on ubuntu-latest
    • check-skipped = Test stable on ubuntu-latest
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build CI Docker / Build images
    • check-neutral = Build CI Docker / Build images
    • check-skipped = Build CI Docker / Build images
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = submit block / Run submit-block test
    • check-neutral = submit block / Run submit-block test
    • check-skipped = submit block / Run submit-block test
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = get block template / Run get-block-template test
    • check-neutral = get block template / Run get-block-template test
    • check-skipped = get block template / Run get-block-template test
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check if cached state disks exist for Mainnet / Check if cached state disks exist
    • check-neutral = Check if cached state disks exist for Mainnet / Check if cached state disks exist
    • check-skipped = Check if cached state disks exist for Mainnet / Check if cached state disks exist
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test integration with lightwalletd
    • check-neutral = Test integration with lightwalletd
    • check-skipped = Test integration with lightwalletd
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = lightwalletd GRPC tests / Run lwd-grpc-wallet test
    • check-neutral = lightwalletd GRPC tests / Run lwd-grpc-wallet test
    • check-skipped = lightwalletd GRPC tests / Run lwd-grpc-wallet test
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = lightwalletd tip send / Run lwd-send-transactions test
    • check-neutral = lightwalletd tip send / Run lwd-send-transactions test
    • check-skipped = lightwalletd tip send / Run lwd-send-transactions test
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = lightwalletd tip update / Run lwd-update-sync test
    • check-neutral = lightwalletd tip update / Run lwd-update-sync test
    • check-skipped = lightwalletd tip update / Run lwd-update-sync test
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test CD custom Docker config file / Test custom-conf in Docker
    • check-neutral = Test CD custom Docker config file / Test custom-conf in Docker
    • check-skipped = Test CD custom Docker config file / Test custom-conf in Docker
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test CD default Docker config file / Test default-conf in Docker
    • check-neutral = Test CD default Docker config file / Test default-conf in Docker
    • check-skipped = Test CD default Docker config file / Test default-conf in Docker
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test CI custom Docker config file / Test custom-conf in Docker
    • check-neutral = Test CI custom Docker config file / Test custom-conf in Docker
    • check-skipped = Test CI custom Docker config file / Test custom-conf in Docker
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test CI default Docker config file / Test default-conf in Docker
    • check-neutral = Test CI default Docker config file / Test default-conf in Docker
    • check-skipped = Test CI default Docker config file / Test default-conf in Docker
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Test stable on macos-latest
    • check-neutral = Test stable on macos-latest
    • check-skipped = Test stable on macos-latest
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build and Deploy Zebra Book Docs
    • check-neutral = Build and Deploy Zebra Book Docs
    • check-skipped = Build and Deploy Zebra Book Docs
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Build and Deploy Zebra Internal Docs
    • check-neutral = Build and Deploy Zebra Internal Docs
    • check-skipped = Build and Deploy Zebra Internal Docs
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = Check crate release dry run
    • check-neutral = Check crate release dry run
    • check-skipped = Check crate release dry run
  • any of [🛡 GitHub repository ruleset rule]:
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections
    • check-success = Mergify Merge Protections
  • any of [🛡 GitHub repository ruleset rule]:
    • check-success = mergefreeze
    • check-neutral = mergefreeze
    • check-skipped = mergefreeze

Required conditions to stay in the queue:

---
previous_failed_batches: []
pull_requests:
  - number: 9051
  - number: 9050
...

oxarbitrage and others added 5 commits November 21, 2024 19:04
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.
@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Nov 22, 2024
@mergify mergify bot closed this Nov 22, 2024
@mergify mergify bot deleted the mergify/merge-queue/e95a5fd55e branch November 22, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants