Skip to content

Commit f8a75f5

Browse files
dairaclaude
andcommitted
Move the "Changes to ZIP 221" section from ZIP 229 into ZIP 258
The NU6.3 deployment ZIP (258) already absorbed the "Changes to ZIP 209" and the corresponding § 4.17 protocol-spec changes in zcash#1301; move the "Changes to ZIP 221" (Ironwood history-tree metadata) there too, so that all of the cross-ZIP consensus/spec edits live in the deployment ZIP rather than the transaction-format ZIP. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
1 parent fdbf706 commit f8a75f5

2 files changed

Lines changed: 71 additions & 67 deletions

File tree

zips/zip-0229.md

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -412,71 +412,6 @@ digest — which now includes the Ironwood auth digest, and (per the change abov
412412
no further structural change.
413413

414414

415-
## Changes to ZIP 221
416-
417-
The history tree that commits to chain history [^zip-0221] gains Ironwood metadata, exactly
418-
as it gained Orchard metadata at NU5. The new fields are computed and aggregated identically
419-
to the corresponding `...Orchard...` fields.
420-
421-
In the "Tree Node specification" section, after field 14 `nOrchardTxCount`, add:
422-
423-
> 15. [NU6.3 onward] `hashEarliestIronwoodRoot`
424-
>
425-
> Leaf node
426-
> Calculated as the note commitment root of the final Ironwood treestate
427-
> (similar to `hashEarliestOrchardRoot`).
428-
>
429-
> Internal or root node
430-
> Inherited from the left child.
431-
>
432-
> Serialized as `char[32]`.
433-
>
434-
> 16. [NU6.3 onward] `hashLatestIronwoodRoot`
435-
>
436-
> Leaf node
437-
> Calculated as the note commitment root of the final Ironwood treestate
438-
> (similar to `hashLatestOrchardRoot`).
439-
>
440-
> Internal or root node
441-
> Inherited from the right child.
442-
>
443-
> Serialized as `char[32]`.
444-
>
445-
> 17. [NU6.3 onward] `nIronwoodTxCount`
446-
>
447-
> Leaf node
448-
> The number of transactions in the leaf block where `vActionsIronwood`
449-
> is non-empty.
450-
>
451-
> Internal or root node
452-
> The sum of the `nIronwoodTxCount` field of both children.
453-
>
454-
> Serialized as `CompactSize uint`.
455-
456-
Replace
457-
458-
> The fields marked "[NU5 onward]" are omitted before NU5 activation [^zip-0252].
459-
>
460-
> Each node, when serialized, is between 147 and 171 bytes long (between 212 and 244 bytes
461-
> after NU5 activation). [...]
462-
463-
with
464-
465-
> The fields marked "[NU5 onward]" are omitted before NU5 activation [^zip-0252]. The fields
466-
> marked "[NU6.3 onward]" are omitted before NU6.3 activation.
467-
>
468-
> Each node, when serialized, is between 147 and 171 bytes long (between 212 and 244 bytes
469-
> after NU5 activation, and between 277 and 317 bytes after NU6.3 activation). [...]
470-
471-
The pseudocode node structure and `serialize` / `make_leaf` / `make_parent` functions are
472-
extended with `hashEarliestIronwoodRoot`, `hashLatestIronwoodRoot`, and `nIronwoodTxCount`
473-
in the same way the "# NU5 only" Orchard fields were added (present iff NU6.3 has activated;
474-
the roots inherited from the left/right child and the count summed, in internal nodes).
475-
476-
`hashChainHistoryRoot` continues to be the BLAKE2b-256 digest of the serialized root node;
477-
its value changes at NU6.3 only through the added node fields. The `hashBlockCommitments`
478-
header field [^zip-0244] is unaffected beyond this.
479-
480415
# Rationale
481416

482417
The main purpose of the NU6.3 network upgrade is to bolster confidence in Zcash's supply
@@ -540,8 +475,6 @@ treating the note commitment tree anchor as authorizing data rather than effecti
540475

541476
[^zip-0209]: [ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances](zip-0209.rst)
542477

543-
[^zip-0221]: [ZIP 221: FlyClient - Consensus-Layer Changes](zip-0221.rst)
544-
545478
[^zip-0224]: [ZIP 224: Orchard Shielded Protocol](zip-0224.rst)
546479

547480
[^zip-0225]: [ZIP 225: Version 5 Transaction Format](zip-0225.rst)

zips/zip-0258.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,71 @@ Changes corresponding to the [ZIP 209 changes above](#changestozip209) are requi
146146
pool balance alongside those for the existing *Sprout*, *Sapling*, and *Orchard pools*. These
147147
mirror the changes above and are not spelled out here.
148148

149+
## Changes to ZIP 221
150+
151+
The history tree that commits to chain history [^zip-0221] gains Ironwood metadata, exactly
152+
as it gained Orchard metadata at NU5. The new fields are computed and aggregated identically
153+
to the corresponding `...Orchard...` fields.
154+
155+
In the "Tree Node specification" section, after field 14 `nOrchardTxCount`, add:
156+
157+
> 15. [NU6.3 onward] `hashEarliestIronwoodRoot`
158+
>
159+
> Leaf node
160+
> Calculated as the note commitment root of the final Ironwood treestate
161+
> (similar to `hashEarliestOrchardRoot`).
162+
>
163+
> Internal or root node
164+
> Inherited from the left child.
165+
>
166+
> Serialized as `char[32]`.
167+
>
168+
> 16. [NU6.3 onward] `hashLatestIronwoodRoot`
169+
>
170+
> Leaf node
171+
> Calculated as the note commitment root of the final Ironwood treestate
172+
> (similar to `hashLatestOrchardRoot`).
173+
>
174+
> Internal or root node
175+
> Inherited from the right child.
176+
>
177+
> Serialized as `char[32]`.
178+
>
179+
> 17. [NU6.3 onward] `nIronwoodTxCount`
180+
>
181+
> Leaf node
182+
> The number of transactions in the leaf block where `vActionsIronwood`
183+
> is non-empty.
184+
>
185+
> Internal or root node
186+
> The sum of the `nIronwoodTxCount` field of both children.
187+
>
188+
> Serialized as `CompactSize uint`.
189+
190+
Replace
191+
192+
> The fields marked "[NU5 onward]" are omitted before NU5 activation [^zip-0252].
193+
>
194+
> Each node, when serialized, is between 147 and 171 bytes long (between 212 and 244 bytes
195+
> after NU5 activation). [...]
196+
197+
with
198+
199+
> The fields marked "[NU5 onward]" are omitted before NU5 activation [^zip-0252]. The fields
200+
> marked "[NU6.3 onward]" are omitted before NU6.3 activation.
201+
>
202+
> Each node, when serialized, is between 147 and 171 bytes long (between 212 and 244 bytes
203+
> after NU5 activation, and between 277 and 317 bytes after NU6.3 activation). [...]
204+
205+
The pseudocode node structure and `serialize` / `make_leaf` / `make_parent` functions are
206+
extended with `hashEarliestIronwoodRoot`, `hashLatestIronwoodRoot`, and `nIronwoodTxCount`
207+
in the same way the "# NU5 only" Orchard fields were added (present iff NU6.3 has activated;
208+
the roots inherited from the left/right child and the count summed, in internal nodes).
209+
210+
`hashChainHistoryRoot` continues to be the BLAKE2b-256 digest of the serialized root node;
211+
its value changes at NU6.3 only through the added node fields. The `hashBlockCommitments`
212+
header field [^zip-0244] is unaffected beyond this.
213+
149214
## ZIP 2005 activation
150215

151216
ZIP 2005 [^zip-2005] activates at NU6.3: its $\mathsf{ZIP2005ActivationHeight}$ (also referenced
@@ -188,8 +253,14 @@ lower protocol versions.
188253

189254
[^zip-0209]: [ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances](zip-0209.rst)
190255

256+
[^zip-0221]: [ZIP 221: FlyClient - Consensus-Layer Changes](zip-0221.rst)
257+
191258
[^zip-0229]: [ZIP 229: Version 6 Transaction Format](zip-0229.md)
192259

260+
[^zip-0244]: [ZIP 244: Transaction Identifier Non-Malleability](zip-0244.rst)
261+
262+
[^zip-0252]: [ZIP 252: Deployment of the NU5 Network Upgrade](zip-0252.rst)
263+
193264
[^zip-0256]: [ZIP 256: Deployment of Consensus Bug Fixes Between NU6.1 and NU6.2](zip-0256.md)
194265

195266
[^zip-0318]: [ZIP 318: Orchard to Ironwood Migration](zip-0318)

0 commit comments

Comments
 (0)