Skip to content

Rename valar-orchard back to orchard, bump to 0.12.1#19

Closed
p0mvn wants to merge 1 commit into
mainfrom
roman/rename-orchard-0.12.1
Closed

Rename valar-orchard back to orchard, bump to 0.12.1#19
p0mvn wants to merge 1 commit into
mainfrom
roman/rename-orchard-0.12.1

Conversation

@p0mvn

@p0mvn p0mvn commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Undo the crates.io publish rename from 2d66b14. The orchard fork goes back to [package] name = "orchard" so consumer workspaces (e.g. zcash_voting) can have a single Orchard crate in their dep-graph again — the pattern that worked pre-0.12.

Why revert the publish rename?

Keeping the fork as valar-orchard on crates.io seemed nice for consumers, but it produces two distinct orchard nodes in any workspace that also pulls zcash_keys / pczt / zcash_primitives (those transitively depend on the crates.io orchard package). Cargo treats orchard and valar-orchard as separate crates regardless of tags or revs, which forces a byte-round-trip orchard_compat bridge in zcash_voting. Going back to a single crate name lets [patch.crates-io] orchard = { git = …, tag = "voting-circuits-v0.12.1" } unify everything again.

Because orchard is a taken name on crates.io (upstream zcash/orchard), the fork is now consumed via git tag only. No cargo publish for the fork.

Changes

  • orchard/Cargo.toml:
    • name = "valar-orchard"orchard
    • version = "0.12.0"0.12.1
    • Drop [lib] name = "orchard" (redundant once [package] name = "orchard").
    • Drop crates.io-publish-only metadata: documentation = ".../valar-orchard", exclude = ["book"].
    • Description reverted to upstream-style, with a note that this is the Valar fork.
  • voting-circuits/Cargo.toml:
    • version = "0.2.0"0.12.1 (aligns with the orchard fork version line).
    • Drop package = "valar-orchard" alias from the orchard path-dep: orchard = { path = "../orchard", version = "0.12.1", features = ["circuit"] }.
  • voting-circuits/README.md: reword the valar-orchard section to describe the in-repo orchard/ crate consumed via git tag.
  • corez stays (vs upstream core2): core2 is yanked on crates.io and corez is a drop-in; swap back isn't required for git consumers.

Tags created (to be pushed alongside this PR merge):

  • orchard-v0.12.1
  • voting-circuits-v0.12.1

Test plan

  • cd orchard && cargo check --all-features — clean.
  • cd voting-circuits && cargo check --all-targets — clean (pre-existing warnings only).
  • In zcash_voting with [patch.crates-io] orchard = { path = "../voting-circuits/orchard" } and voting-circuits as a sibling path dep: cargo check --workspace --all-targets — clean.
  • cargo tree in zcash_voting shows a single orchard v0.12.1 node; no valar-orchard or duplicate orchard.
  • Consumer side (zcash_voting) flipped to tag = "voting-circuits-v0.12.1" once this PR merges and tags are pushed.

Follow-ups

  • Yank valar-orchard 0.12.0 and voting-circuits 0.2.0 on crates.io (they're now orphaned; no consumer should pick them up).
  • Decide whether the valar-orchard 0.11.0 crates.io artifact should also be yanked.

Made with Cursor

Drops the crates.io publish rename from 2d66b14. Consuming workspaces
(e.g. zcash_voting) can now go back to a single-orchard dependency
graph via `[patch.crates-io] orchard = { git = ..., tag = "v0.12.1" }`
without an orchard_compat byte-bridge layer for zcash_keys /
librustzcash types.

Changes:
- orchard/Cargo.toml: name valar-orchard -> orchard; version 0.12.0 ->
  0.12.1; drop valar-only description/documentation and the [lib]
  name = "orchard" override (redundant once [package] name = "orchard");
  drop the book/ publish-exclude (we don't publish this fork to
  crates.io; `orchard` is taken upstream by zcash/orchard).
- voting-circuits/Cargo.toml: version 0.2.0 -> 0.12.1 to align with the
  orchard fork version line; drop package = "valar-orchard" alias from
  the orchard path-dep.
- voting-circuits/README.md: reword the valar-orchard section to point
  at the in-repo orchard/ crate consumed via git tag.

The fork keeps corez (vs upstream core2) because core2 is yanked on
crates.io and the swap doesn't affect git consumers.

Verified: cargo check --all-features in orchard/ and cargo check
--all-targets in voting-circuits/ both clean (pre-existing warnings
only).

Made-with: Cursor
@p0mvn

p0mvn commented Apr 24, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of a cleaner fix in the valargroup/librustzcash fork: update its workspace-level orchard dep to package = "valar-orchard" so zcash_keys / pczt / zcash_primitives pull the same valar-orchard 0.12.0 crate that voting-circuits 0.2.0 already pulls. That collapses the dep graph to a single Orchard node without renaming anything on crates.io and without the orchard_compat bridge in zcash_voting.

valar-orchard and voting-circuits stay on crates.io as-is. Source code everywhere keeps use orchard::… via the package = alias.

See follow-up PR on valargroup/librustzcash (to be linked here once opened).

@p0mvn p0mvn closed this Apr 24, 2026
@p0mvn p0mvn deleted the roman/rename-orchard-0.12.1 branch April 24, 2026 16:40
p0mvn added a commit that referenced this pull request Apr 25, 2026
…sors, local assign_constant)

Catches voting-circuits up to the rest of the orchard 0.13 + valargroup
PR #19 surface area. The previous "Drop vendored valar-orchard fork"
commit only flipped the dependency edge over to orchard 0.13 via git;
this commit ports the call sites to the public APIs that orchard 0.13
exposes (or, in one case, replicates locally) instead of poking at
private fields:

* `Nullifier(rho)` → `Nullifier::from_inner(rho)`
  `nf.0` → `nf.inner()`
  The `Nullifier` tuple field is no longer accessible from outside the
  orchard crate; the new public `from_inner` constructor and `inner`
  accessor are the supported way in.

* `NoteValue::zero()` → `NoteValue::ZERO`
  `NoteValue::zero()` was crate-private in orchard 0.13.0 and stays
  that way. valargroup/orchard PR #19 stacks zcash/orchard #495 on
  top of the SpendAuthG branch, which retires `zero()` in favour of
  a `pub const ZERO: Self = NoteValue(0);` associated constant. All
  9 zero-value sites in the delegation builder/circuit (plus the
  signed-note-commitment-integrity plan markdown) are migrated to
  the constant.

* `orchard::circuit::gadget::assign_constant` is no longer re-exported
  by orchard 0.13 (it lives under module-private paths). Move our
  local copy into `crate::circuit::gadget::assign_constant`; the
  helper is generic halo2 plumbing (load a constant into a free
  advice cell so it's baked into the verifier key) with no
  orchard-specific dependencies, so it belongs here anyway.

The README is updated to drop the "depends on valar-orchard" wording
and explain the current pin: orchard 0.13 + valargroup/orchard PR #19,
which carries cherry-picks of zcash/orchard #489 (SpendAuthG fixed-base
multiplication) and zcash/orchard #495 (`NoteValue::ZERO`). The pin
collapses back to the published crate once both upstream PRs land and
an orchard 0.14 ships.

Cargo.lock is regenerated against the orchard 0.13 git pin (lock now
references commit 7fa213ae7057eb959e5aba4a4195d6ca2e26b252, the head
of `valar/0.13-spend-auth-g` / valargroup/orchard PR #19).

Verification:
* `cargo build --tests --benches --all-features` — clean (only the
  three pre-existing dead-code warnings in
  vote_proof::authority_decrement test scaffolding).
* No `NoteValue::zero(`, `_nf.0`, or `Nullifier(` constructor calls
  remain in `src/`.
* Downstream consumers (zcash_voting, vote-sdk circuits + e2e-tests,
  zcash-swift-wallet-sdk libzcashlc) all `cargo check` clean against
  this voting-circuits + orchard combination.

Made-with: Cursor
@p0mvn p0mvn mentioned this pull request Apr 25, 2026
3 tasks
greg0x added a commit that referenced this pull request Apr 25, 2026
Now that valargroup/orchard PR #19 is merged, repoint from the migration
branch valar/0.13-spend-auth-g to the merge commit on main. This retires
the migration branch as a manifest dependency and gives a deterministic
rev pin instead of a moving branch tip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant