Skip to content

Revert "Call standalone witness generation instead of wallet_db method"#19

Merged
p0mvn merged 2 commits into
shielded-votefrom
revert/decouple-witness-generation
Apr 11, 2026
Merged

Revert "Call standalone witness generation instead of wallet_db method"#19
p0mvn merged 2 commits into
shielded-votefrom
revert/decouple-witness-generation

Conversation

@p0mvn

@p0mvn p0mvn commented Apr 11, 2026

Copy link
Copy Markdown

Summary

Made with Cursor

p0mvn added 2 commits April 10, 2026 21:27
This reverts merge commit 71a6e0f (PR #16).

Restores the call to wallet_db.generate_orchard_witnesses_at_frontier()
instead of the standalone function in voting::orchard_witnesses. The
Cargo.lock is left as-is since subsequent PRs (#17, #18) already
updated it.

Made-with: Cursor
Pick up the merged revert PRs:
- librustvoting#17 (revert Orchard witness generation)
- librustzcash#26 (revert exposed commitment-tree primitives)

Made-with: Cursor
@p0mvn p0mvn merged commit 0444fff into shielded-vote Apr 11, 2026
3 checks passed
greg0x pushed a commit that referenced this pull request Apr 13, 2026
…tion

Revert "Call standalone witness generation instead of wallet_db method"
p0mvn added a commit that referenced this pull request Apr 25, 2026
…brustzcash zcash/main

Companion to the previous "Migrate libzcashlc to orchard 0.13 +
librustzcash zcash/main" commit (which only flipped the Cargo.toml
version pins and `[patch.crates-io]` entries). Regenerate Cargo.lock
from scratch against the live git URL pins so a fresh `cargo build`
reproduces the exact dependency graph that the migration was tested
against and that the workspace `mise run wire:local` overrides resolve
to:

  Cargo.lock pins
    orchard          7fa213ae   valargroup/orchard         valar/0.13-spend-auth-g
                                = orchard 0.13.0
                                + cherry-picks of zcash/orchard zcash#489
                                  (SpendAuthG fixed-base multiplication)
                                + zcash/orchard zcash#495
                                  (NoteValue::ZERO public associated constant)
                                (tracked by valargroup/orchard PR #19)
    voting-circuits  84726847   valargroup/voting-circuits valar/orchard-0.13
                                = valargroup/voting-circuits PR #20 head:
                                  - Drop vendored valar-orchard 0.12 fork
                                  - Migrate to orchard 0.13 public APIs
                                    (NoteValue::ZERO, Nullifier accessors,
                                     local assign_constant)
    zcash_voting     214163da   valargroup/zcash_voting    valar/orchard-0.13
                                = valargroup/zcash_voting PR #22 head
                                  (Migrate to orchard 0.13 + librustzcash
                                   zcash/main + lock against PR #19/#20)
    pczt / transparent / zcash_address / zcash_client_backend
    / zcash_client_sqlite / zcash_encoding / zcash_keys / zcash_primitives
    / zcash_proofs / zcash_protocol
                     976efa76ca zcash/librustzcash         main (commit-pinned)

The lockfile diff is large because this is the first lockfile commit
since the major version bumps in `96849be7` (zcash_address 0.10→0.11,
zcash_protocol 0.7→0.8, zcash_primitives 0.26→0.27, transparent
0.6→0.7, sapling-crypto 0.6.2→0.7, orchard 0.12 valar-fork → 0.13).
The whole `valargroup/librustzcash` fork branch and the previous
sapling-crypto git pin are gone from the resolved graph — sapling
is back on crates.io 0.7.0 and every governance librustzcash PR
(#2281, #2283, #2284) is merged into zcash/main.

Verification:
* `cargo check --tests --all-features` clean.
* No drift between Cargo.toml [patch.crates-io] entries and the
  resolved [[package]] sources in Cargo.lock.
* Downstream consumer (zodl-ios xcframework build) verified earlier
  in this migration against this exact orchard / voting-circuits /
  zcash_voting stack.

Made-with: Cursor
greg0x added a commit that referenced this pull request Apr 25, 2026
p0mvn added a commit that referenced this pull request Apr 26, 2026
…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)

This produces:

    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 the form PR #25's
body specified, and regenerates `Cargo.lock` so the resolver collapses
to a single-version graph:

  orchard          7fa213ae    valargroup/orchard          valar/0.13-spend-auth-g
                               = orchard 0.13.0 + cherry-picks of
                                 zcash/orchard zcash#489 (SpendAuthG fixed-base)
                                 + zcash#495 (NoteValue::ZERO)
                                 (tracked by valargroup/orchard PR #19)
  voting-circuits  84726847    valargroup/voting-circuits  valar/orchard-0.13
                               = drop vendored valar-orchard, port to
                                 orchard 0.13 public APIs
                                 (= valargroup/voting-circuits PR #20)
  zcash_voting     d351e9dc    valargroup/zcash_voting     main (rev-pinned)
                               = merge of valargroup/zcash_voting PR #22
                                 (zcash_voting / vote-commitment-tree[-client]
                                 on orchard 0.13 + librustzcash zcash/main)

`zcash_voting` is rev-pinned (rather than branch-tracked) at the merged
`main` tip `d351e9dc13baa623b95883e0815b194358604c54` so the resolved
dep graph is reproducible across rebuilds even as `main` advances.

The previous `[patch.crates-io] orchard` entry pointing at `zcash/orchard`
rev `6b12c77` is also dropped, since 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`.
* Matches the workspace `.wiring/states/current/zcash-swift-wallet-sdk.patch`'s
  assumed upstream state for the orchard / voting-circuits / zcash_voting
  patch entries (modulo the rev pin), so `mise run wire:local` against a
  fresh checkout will apply cleanly again.

Made-with: Cursor
p0mvn added a commit that referenced this pull request Apr 26, 2026
…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
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