Commit db34ab8
feat(wasm-utxo): add orchard (no-circuit) dep + Ironwood PCZT serialization
Introduce the `orchard` crate WITHOUT the `circuit` feature (Sinsemilla /
pasta / note-encryption only — no halo2 prover) plus `rand`, `postcard`,
and `ff`, and add the `zcash::ironwood_pczt` module that (de)serializes an
`orchard::pczt::Bundle`.
`orchard::pczt::Bundle` is not serde-serializable, so this bridges it to a
compact wire form: a 1-byte format version + a `postcard`-encoded mirror
struct whose fields are exactly what orchard's `Bundle/Action/Spend/
Output::parse(...)` consume. Serialize reads the bundle's public getters;
deserialize reconstructs via `parse(...)`. This is the witness payload
exchanged with the external Ironwood proof service and carried through the
PSBT (proving is delegated; no halo2 in wasm-utxo).
Notes:
- `>32`-byte fields are stored as `Vec<u8>` (serde derives arrays only up
to length 32) and length-checked on the way back in.
- `note_version` is derived from the bundle version rather than carried on
the wire; `zip32_derivation` (wallet metadata the prover doesn't need) is
dropped.
- `serde` is now a non-optional dependency (the module derives
Serialize/Deserialize); the `inspect` feature drops its `dep:serde`.
Verified: compiles for wasm32-unknown-unknown and native; a build ->
serialize -> deserialize -> re-serialize round-trip is byte-stable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent eba18e5 commit db34ab8
4 files changed
Lines changed: 585 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
| |||
0 commit comments