Resolve orchard via valar-orchard on crates.io (rebased onto PR #40)#41
Merged
p0mvn merged 2 commits intoApr 24, 2026
Conversation
Changes the workspace-level `orchard` dep from the crates.io `orchard`
package (patched to zcash/orchard git rev 6b12c77) to the
`valar-orchard` package on crates.io, aliased locally to `orchard` via
cargo's `package =` rename trick. Every member keeps its existing
`orchard.workspace = true` line and its source-level `use orchard::…`
imports — no other changes needed.
Why
---
`valar-orchard` is upstream 0.12.0 + the same post-release fixes up to
zcash/orchard 6b12c77 that the previous `[patch.crates-io] orchard`
entry pointed at, plus the `pub` visibility additions that
valargroup/voting-circuits needs for the shielded-voting Halo 2
circuits (constants, spec, shared_primitives gadget).
Before this change, consumers that also depend on `voting-circuits`
(e.g. `zcash_voting`) ended up with two distinct Orchard crates in
their dep-graph: `orchard` (from this fork, via our patch) and
`valar-orchard` (pulled by `voting-circuits` from crates.io). Cargo
treats them as different crates regardless of content, which forced a
byte-round-trip `orchard_compat` bridge at the zcash_keys / pczt
boundary. Routing our fork through `valar-orchard` too collapses that
back to a single node and deletes the bridge.
The `[patch.crates-io] orchard = { git = "zcash/orchard", rev = "6b12c77…" }`
entry is obsolete after this change (no dep resolves crates.io
`orchard` anymore) and is removed.
Verified: `cargo check --workspace` clean. `valar-orchard v0.12.0`
appears in the build graph; no `orchard v0.12.x` or git `orchard`
entry.
Made-with: Cursor
The workspace now resolves `orchard` through the `valar-orchard` package
on crates.io via `package = "valar-orchard"`. Two CI jobs keyed on the
original crate name and needed to learn about the rename:
- supply-chain/config.toml: add a `safe-to-deploy` exemption for
`valar-orchard 0.12.0` (matches the criteria previously granted to
`orchard 0.12.0@git:b0bf2670e2…`) and drop the now-unreachable
orchard@git exemption: nothing in Cargo.lock resolves to it anymore.
`corez 0.1.1` is already exempted via the upstream `core2 → corez`
migration on this base, so no change needed there.
- .github/helpers/check-dep-graph.py: add a `PACKAGE_NAME_REMAP` table
that maps cargo-tree's package names back to the aliases used in the
README mermaid graph, and apply it while building `cargo_edges`.
Without this, every README edge mentioning `orchard` looks stale
because `cargo tree -f ' {p}'` reports the real package name
(`valar-orchard`), and every real edge mentioning `valar-orchard` is
silently dropped because it is not in `CRATES_IN_GRAPH`.
Verified locally:
- `cargo vet --locked` → `Vetting Succeeded (262 fully audited,
120 partially audited, 294 exempted)`
- `python3 .github/helpers/check-dep-graph.py` → exit 0, no output
Made-with: Cursor
a8de87d
into
roman/shielded-vote-for-zodl-3.4.0-rebased
48 checks passed
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.
Remake of #39 rebased onto the head of #40 (
roman/shielded-vote-for-zodl-3.4.0-rebased).Same single commit, same logical change — swap the workspace-level
orcharddep from the crates.ioorchardpackage (patched tozcash/orchardgit revb0bf2670e2…, which is #40's current patch) to thevalar-orchardpackage on crates.io, aliased locally toorchardvia cargo'spackage =rename trick. Every member keepsorchard.workspace = trueand every.rsfile keepsuse orchard::…— no source changes.Why rebase it
#40 is already rebased onto upstream
zcash/mainat95b000e(pre-orchard 0.13/sapling-crypto 0.7), which picked up:[patch.crates-io] saplingrev (b8a81c22f034…vs the old4f95c2286d…in Resolve orchard via valar-orchard on crates.io #39)[patch.crates-io] orchardrev (b0bf2670e2…vs the old6b12c77…in Resolve orchard via valar-orchard on crates.io #39)core2→corezmigration — socorez 0.1.1is already inCargo.lockon the base and is not introduced by this PR (unlike Resolve orchard via valar-orchard on crates.io #39)Mechanically, the rebase was just a cherry-pick with a single manual resolution in
[patch.crates-io]:b8a81c22f034…)Cargo.lockwas regenerated from scratch viacargo check --workspaceagainst the newCargo.toml.Cargo.toml changes
Verification
cargo check --workspace— clean.cargo tree --all-features | grep -E 'orchard|corez'now shows onlyvalar-orchard v0.12.0andcorez v0.1.1; noorchard v0.12.xand nogit+https://github.com/zcash/orchard.gitentry.orchard 0.12.0@git:b0bf2670e2…is removed,valar-orchard 0.12.0from crates.io is added, and every consumer (pczt, zcash, zcash_client_backend, zcash_client_memory, zcash_client_sqlite, zcash_keys, zcash_primitives, zcash_proofs) now listsvalar-orchardin place oforchard.Known CI failures on this PR (carried over from #39, addressed separately)
The "Vet Rust dependencies" (
cargo vet --locked) and "Readme dependency graph" jobs will fail on this PR for the same reasons they fail on #39 — they need:[[exemptions.valar-orchard]] version = "0.12.0" criteria = "safe-to-deploy"entry insupply-chain/config.toml(corezis already covered by the upstreamcore2 → corezmigration commit on Governance wallet support for shielded voting (rebased onto 95b000e, pre-orchard 0.13) #40's base)..github/helpers/check-dep-graph.pysocargo tree'svalar-orchardpackage name maps back toorchardfor the README graph comparison.Both are trivial and I can layer them on as follow-up commits on this branch if you want one green-CI PR; keeping them out here to mirror #39's scope exactly.
The pre-existing
core2yank failures on the threeci-buildjobs (macOS-latest,wasm32-wasip1,thumbv7em-none-eabihf) are not caused by this PR and also affect #40's base.Related
orchard_compat+orchard_upstreaminzcash_voting.Made with Cursor