Skip to content

Commit a83c8c2

Browse files
CHANGELOG: Note optional shielded bundle anchors in pczt
1 parent f8ec33e commit a83c8c2

1 file changed

Lines changed: 40 additions & 2 deletions

File tree

pczt/CHANGELOG.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ workspace.
1818
Creator, `Creator::build_from_parts`, the serialization formats, and the IO
1919
Finalizer, so that copies of a PCZT that take different serialization paths
2020
continue to merge successfully:
21-
- `Creator::build_from_parts` now uses an all-zeroes anchor (rather than the
22-
empty-tree root) for absent Sapling and Orchard bundles.
21+
- `Creator::build_from_parts` now leaves the anchor absent (rather than
22+
using the empty-tree root or an all-zeroes sentinel) for a Sapling,
23+
Orchard, or Ironwood bundle that the built transaction does not use.
2324
- The Creator now initializes empty bundle value sums as non-negative zero.
2425
- The IO Finalizer no longer sets `bsk` on an empty Orchard-protocol bundle.
2526
- An Orchard-protocol bundle whose fields differ from the canonical empty
@@ -71,6 +72,27 @@ workspace.
7172
add, remove, or reorder actions; doing so now returns the new
7273
`pczt::roles::low_level_signer::OrchardParseError::SigningClosureModifiedActions`
7374
error and leaves the PCZT unmodified.
75+
- The `anchor` field of `pczt::sapling::Bundle` and `pczt::orchard::Bundle`
76+
(shared by the Orchard and Ironwood bundles) is now `Option<[u8; 32]>`
77+
rather than `[u8; 32]`, matching the optional anchors of the PCZT version 2
78+
encoding ([ZIP 374](https://zips.z.cash/zip-0374#anchors-and-pre-authorization)).
79+
A v5 transaction's shielded bundle anchors are always set and immutable; a
80+
v6 transaction's anchors may be absent until the Prover runs, and may be set
81+
or replaced by an Updater at any earlier point.
82+
- `pczt::roles::creator::Creator::new` now takes `sapling_anchor` and
83+
`orchard_anchor` as `Option<[u8; 32]>`. Passing `None` for a v5
84+
transaction returns the new `pczt::roles::creator::Error::AnchorRequiredForV5`.
85+
- `pczt::roles::creator::Creator::with_ironwood_anchor` leaves the Ironwood
86+
anchor unset if not called, rather than defaulting it to all-zeroes.
87+
- The v1 serialization format requires every non-empty shielded bundle's
88+
anchor to be set, returning the new `pczt::EncodingError::MissingAnchor`
89+
otherwise; a v1-encoded anchor always parses back to `Some`.
90+
- The Prover now verifies, before creating a Sapling, Orchard, or Ironwood
91+
proof, that every non-zero-valued spend's witness roots to the bundle's
92+
anchor, and requires the anchor to be set for a non-empty bundle.
93+
- The Combiner merges anchors using the existing optional-field convention:
94+
an absent anchor merges with a set one, and two different set anchors
95+
fail the merge.
7496

7597
### Added
7698
- `pczt::roles::creator::Error`, the error type returned by the now-fallible
@@ -101,6 +123,22 @@ workspace.
101123
- `pczt::roles::low_level_signer::OrchardParseError`
102124
- `UnsupportedConsensusBranchId` variants of `pczt::roles::updater::OrchardError`,
103125
`pczt::roles::verifier::OrchardError`, and `pczt::roles::prover::OrchardError`.
126+
- `pczt::EncodingError::MissingAnchor`
127+
- `pczt::sapling::v1`, a module providing the version 1 Sapling bundle
128+
serialization format.
129+
- `pczt::sapling::ParseError`, `pczt::sapling::AnchorConsistencyError`
130+
- `pczt::orchard::ParseError`, `pczt::orchard::AnchorConsistencyError`
131+
- `pczt::roles::creator::Error::AnchorRequiredForV5`
132+
- `pczt::roles::updater::Updater::{set_sapling_anchor, set_orchard_anchor,
133+
set_ironwood_anchor}`, for setting or replacing a v6 transaction's shielded
134+
bundle anchors.
135+
- `pczt::roles::updater::SaplingError::{AnchorImmutableForV5,
136+
InconsistentWitness, InvalidAnchor}`
137+
- `pczt::roles::updater::OrchardError::{AnchorImmutableForV5,
138+
InconsistentWitness, InvalidAnchor}`
139+
- `pczt::roles::prover::SaplingError::InconsistentWitness`
140+
- `pczt::roles::prover::OrchardError::InconsistentWitness`
141+
- `pczt::roles::prover::IronwoodError::InconsistentWitness`
104142

105143
## [0.7.0] - 2026-06-02
106144

0 commit comments

Comments
 (0)