Restore voting-stack [patch.crates-io] entries dropped during PR #25 port#28
Closed
p0mvn wants to merge 3 commits into
Closed
Restore voting-stack [patch.crates-io] entries dropped during PR #25 port#28p0mvn wants to merge 3 commits into
p0mvn wants to merge 3 commits into
Conversation
A bundle of changes that depend on the valargroup forks. Grouped under one [REVERT_ME] commit so the whole overlay can be reverted in one step once the upstream story is complete. The overlay covers: * Cargo.toml — patches orchard, voting-circuits, and zcash_voting at specific valargroup main revs. Unblock: zcash/orchard PRs zcash#489 and zcash#495 land upstream and ship in the next orchard release; voting-circuits and zcash_voting then publish versions that depend on it and the patches go away. * Package.swift — points the binaryTarget at the valargroup fork's xcframework release that bundles the voting FFI symbols, plus a SystemConfiguration linker setting macOS builds need. * Scripts/{prepare,publish}-fork-release.sh — automate the fork xcframework build + GitHub release + Package.swift binaryTarget rewrite, so a fork release PR can land with zero Rust setup for reviewers. publish-fork-release.sh refuses to run when Package.swift is wired local. * Scripts/rebuild-local-ffi.sh — adds an ios-all target so a single run produces both device and simulator arm64 slices in one xcframework.
…eases" This reverts commit c14275d.
5 tasks
3cd0852 to
3911f38
Compare
…port When PR #25 ("Migrate libzcashlc to orchard 0.13 + librustzcash zcash/main") was force-ported into `shielded-vote-2.4.10` instead of being merged, two of the three voting-stack `[patch.crates-io]` entries were dropped and the `orchard` patch was re-pointed at the wrong source. Result: the FFI build fails on every PR against this base because the dep graph contains **three different `orchard` versions simultaneously**: orchard 0.11.0 (crates.io) ← pulled in by `zcash_voting 0.1.0` (crates.io, no patch) orchard 0.12.0 (zcash/orchard rev 6b12c77) ← from the broken `[patch.crates-io] orchard` entry pointing at upstream `zcash/orchard` instead of `valargroup/orchard` orchard 0.13.0 (crates.io) ← libzcashlc's direct dep (no patch matched because the patch resolves to 0.12) Producing: error[E0277]: the trait bound `zcash_primitives::consensus::TestNetwork: zcash_protocol::consensus::Parameters` is not satisfied error[E0308]: mismatched types expected `orchard::keys::SpendingKey`, found a different `orchard::keys::SpendingKey` note: there are multiple different versions of crate `orchard` in the dependency graph inside `zcash_voting-0.1.0/src/zkp2.rs` and `orchard_compat.rs`. This commit restores the `[patch.crates-io]` block to a self-consistent single-version graph, with all three voting-stack crates rev-pinned at the post-merge `main` tips (so the resolved dep graph is reproducible across rebuilds even as `main` advances): orchard c26a6ec6 valargroup/orchard main = orchard 0.13.0 + cherry-picks of zcash/orchard zcash#489 (SpendAuthG fixed-base) + zcash#495 (NoteValue::ZERO) (= valargroup/orchard PR #19, merged) voting-circuits 66777e27 valargroup/voting-circuits main = drop vendored valar-orchard, port to orchard 0.13 public APIs (= valargroup/voting-circuits PR #20, merged; internally pins orchard to c26a6ec6) zcash_voting d351e9dc valargroup/zcash_voting main = zcash_voting / vote-commitment-tree[-client] on orchard 0.13 + librustzcash zcash/main (= valargroup/zcash_voting PR #22, merged) The orchard rev (c26a6ec6) is chosen to match what voting-circuits at 66777e27 internally pins to (its `05f98aa` "Pin orchard to valargroup/ orchard main" commit), so cargo collapses libzcashlc's direct orchard dep and voting-circuits' transitive orchard dep into a single source. The previous `[patch.crates-io] orchard` entry pointing at `zcash/orchard` rev `6b12c77` is dropped — plain upstream `orchard 0.12.0` is incompatible with the rest of the orchard-0.13 voting stack. Verification: * `cargo check --target aarch64-apple-darwin` clean. * `Cargo.lock` resolves to **one** version each of `orchard`, `voting-circuits`, `zcash_voting`, `zcash_protocol`, `zcash_primitives` (no stale `valar-orchard` rename left in the graph either). * No drift between `Cargo.toml` `[patch.crates-io]` entries and the resolved `[[package]]` sources in `Cargo.lock`. Made-with: Cursor
3911f38 to
c9ab79d
Compare
6678f6e to
8ccd2f9
Compare
8ccd2f9 to
8ee7106
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-applies PR #25's
Cargo.toml+Cargo.lockchanges onto the currentshielded-vote-2.4.10HEAD, with all three voting-stack patches rev-pinned at the post-mergemaintips ofvalargroup/orchard,valargroup/voting-circuits, andvalargroup/zcash_voting.When PR #25 ("Migrate libzcashlc to orchard 0.13 + librustzcash zcash/main") was force-ported into this base instead of being merged, two of its three voting-stack
[patch.crates-io]entries were dropped and theorchardpatch was re-pointed at the wrong source. As a result the FFI build fails on every PR againstshielded-vote-2.4.10(e.g. PR #27 run #146, PR #24 run #143).Why does the build fail today?
The dep graph on
shielded-vote-2.4.10HEAD currently resolves to three differentorchardversions simultaneously:orchardresolved as0.11.0(crates.io)zcash_voting 0.1.0(crates.io — no patch entry)0.12.0(zcash/orchardrev6b12c77)[patch.crates-io] orchardline on this base0.13.0(crates.io)libzcashlc's directorchard = "0.13"dep (no patch matched, since the patch resolves to a 0.12 rev)Compiler output:
The workspace
.wiring/states/current/zcash-swift-wallet-sdk.patchalready assumes the three voting-stack patch entries this PR restores exist on the upstream side, so todaymise run wire:localagainst a clean checkout would also fail to apply.What this PR does
Cargo.toml:Cargo.lock: regenerated from scratch against the new patch entries. Diff is large because it's the first lockfile commit since the major version bumps in9dae462acollided with the missing patches.After this PR, the lockfile resolves to a single version of every voting-stack crate:
orchard0.13.0c26a6ec6valargroup/orchardmain(= PR #19 merged — orchard0.13.0+ cherry-picks of zcash/orchard #489 + #495)voting-circuits0.2.066777e27valargroup/voting-circuitsmain(= PR #20 merged)zcash_voting0.1.0d351e9dcvalargroup/zcash_votingmain(= PR #22 merged)The orchard rev (
c26a6ec6) is chosen to match what voting-circuits at66777e27internally pins to (its05f98aa"Pin orchard to valargroup/orchard main" commit). Without this alignment, libzcashlc's direct orchard dep and voting-circuits' transitive orchard dep would resolve to two separate git sources andzcash_votingwould once again see "expectedSpendingKey, found a differentSpendingKey".Test plan
cargo generate-lockfileresolves successfully.cargo check --target aarch64-apple-darwinclean (no warnings).orchard 0.11,orchard 0.12,valar-orchard,voting-circuits 0.1.0,zcash_voting 0.1.0(crates.io) leftovers inCargo.lock— single version of every voting-stack crate.Cargo.toml[patch.crates-io]↔ resolved[[package]]sources inCargo.lockare in sync.buildjob is the actual end-to-end verification).What this unblocks
Every open PR currently red on
shielded-vote-2.4.10'sbuildjob, including:buildjob is the only red check; once this lands and ZCA-229 Filter PIR endpoints by exact snapshot match before delegation #27 rebases, itsbuildwill turn green via the FFI cache hit).Made with Cursor