Resolve orchard via valar-orchard on crates.io#39
Closed
p0mvn wants to merge 3 commits into
Closed
Conversation
Co-Authored-By: roman <roman@osmosis.team> Co-Authored-By: Claude Code <noreply@anthropic.com> Remove duplicate shielded_sighash getter in pczt signer Bad merge left two identical methods. Keep the one with the fuller doc comment, fix stray braces in doc comments on nearby methods.
… generation WalletDb gains two new methods (not on traits — governance-specific): - get_unspent_orchard_notes_at_historical_height(account, height): returns all Orchard notes received at or before the given height and unspent as of that height. Backward-looking query for voting snapshots, unlike select_unspent_notes which is forward-looking. - generate_orchard_witnesses_at_historical_height(positions, frontier, height): copies wallet shard data to ephemeral in-memory DB, inserts the frontier as a checkpoint, and generates Merkle witnesses. Wallet DB is strictly read-only. Co-Authored-By: roman <roman@osmosis.team> Co-Authored-By: Claude Code <noreply@anthropic.com>
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
1bc3a27 to
6534482
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
Change the workspace-level
orcharddep from crates.ioorchard(patched tozcash/orchardgit rev6b12c77) 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
valar-orchard 0.12.0is upstream0.12.0+ the same post-release fixes (up tozcash/orchard6b12c77) that the existing[patch.crates-io] orchardentry points at, plus thepubvisibility additions thatvalargroup/voting-circuitsneeds for its shielded-voting Halo 2 circuits (constants, spec,shared_primitivesgadget).Before this PR, any workspace that depends on both this fork and
voting-circuits 0.2.0(most importantlyvalargroup/zcash_voting) ends up with two Orchard crates in the dep-graph:orchard(this fork, via[patch.crates-io] orchard)valar-orchard(pulled byvoting-circuitsfrom crates.io)Cargo treats them as different crates regardless of byte-equivalence, so consumer workspaces need a byte-round-trip
orchard_compatbridge at thezcash_keys/pcztboundary. Routing this fork throughvalar-orchardtoo collapses the graph to a single node and lets the consumer delete the bridge.Changes
No changes to any member's
Cargo.toml—orchard.workspace = truealready does the right thing.No changes to any
.rsfile —use orchard::…still compiles thanks to thepackage =alias.Reverting later
Once the governance-visibility changes land in upstream
zcash/orchard, flip the workspace dep back toorchard = { version = "0.12", default-features = false }(or the new semver) and this fork no longer needsvalar-orchardat all.Test plan
cargo check --workspace— clean. Build log showsChecking valar-orchard v0.12.0; noorchard v0.12.xnor anyzcash/orchard.gitentry.zcash_voting) update that drops[patch.crates-io] orchardand theorchard_upstream+orchard_compatplumbing — follow-up PR once this merges.cargo test --workspaceon this fork (CI).Related
Made with Cursor