Skip to content

Commit e74b56c

Browse files
committed
WIP
1 parent 69c5c30 commit e74b56c

14 files changed

Lines changed: 199 additions & 112 deletions

README.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ and the following additional ZIPs:
6363
- `ZIP 2006: Restricting Transfers to the Orchard Pool <zips/zip-2006.rst>`__
6464
- `ZIP 318: Orchard to Ironwood Migration <zips/zip-0318.rst>`__
6565
- `ZIP 326: NU6.3 Consequences for Wallets <zips/zip-0326.rst>`__
66-
67-
`ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances <zips/zip-0209.rst>`__
68-
and `ZIP 317: Proportional Transfer Fee Mechanism <zips/zip-0317.rst>`__ will be updated.
66+
- `ZIP 209: Prohibit Out-of-Range Chain Value Pool Balances <zips/zip-0209.rst>`__ (updated)
67+
- `ZIP 213: Shielded Coinbase <zips/zip-0213.rst>`__ (updated)
68+
- `ZIP 317: Proportional Transfer Fee Mechanism <zips/zip-0317.rst>`__ (updated).
6969

7070

7171
NU7 Candidate ZIPs

protocol/protocol.tex

Lines changed: 129 additions & 72 deletions
Large diffs are not rendered by default.

protocol/zcash.bib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,10 +1321,10 @@ @misc{ZIP-208
13211321
@misc{ZIP-209,
13221322
presort={ZIP-0209},
13231323
author={Sean Bowe and {Daira\nbh{}Emma} Hopwood},
1324-
title={Prohibit Negative Shielded Value Pool Balances},
1324+
title={Prohibit Out-of-Range Chain Value Pool Balances},
13251325
howpublished={Zcash Improvement Proposal 209. Created February~25, 2019.},
13261326
url={https://zips.z.cash/zip-0209},
1327-
urldate={2020-11-05}
1327+
urldate={2020-07-06}
13281328
}
13291329

13301330
@misc{ZIP-211,

zips/zip-0209.rst

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
::
22

33
ZIP: 209
4-
Title: Prohibit Negative Shielded Chain Value Pool Balances
4+
Title: Prohibit Out-of-Range Chain Value Pool Balances
55
Owners: Sean Bowe <ewillbefull@gmail.com>
66
Daira-Emma Hopwood <daira@jacaranda.org>
77
Status: Final
@@ -29,6 +29,10 @@ The "Orchard chain value pool balance" for a given block chain is the negation o
2929
``valueBalanceOrchard`` fields for transactions in the block chain. (Before NU5 has activated,
3030
the Orchard chain value pool balance is zero.)
3131

32+
The "Ironwood chain value pool balance" for a given block chain is the negation of the sum of all
33+
``valueBalanceIronwood`` fields for transactions in the block chain. (Before NU6.3 has activated,
34+
the Ironwood chain value pool balance is zero.)
35+
3236
The terms "Testnet" and "Mainnet" are to be interpreted as described in section 3.12 of the
3337
Zcash Protocol Specification [#protocol-networks]_.
3438

@@ -37,35 +41,33 @@ Abstract
3741
========
3842

3943
This proposal defines how the consensus rules are altered such that blocks that produce negative
40-
shielded chain value pool balances are prohibited.
44+
shielded chain value pool balances, or that cause total supply to exceed $\mathsf{MAX\_MONEY}$
45+
zatoshi, are prohibited.
4146

4247

4348
Motivation
4449
==========
4550

46-
It is possible for nodes to monitor the total value of notes that are shielded to, or unshielded from,
47-
each of the Sprout, Sapling, and Orchard value pools. If the total value that is unshielded exceeds the
48-
total value that was shielded for a given pool, a balance violation has occurred in the corresponding
49-
shielded transaction protocol.
51+
It is possible for nodes to monitor the total value of notes that are shielded to, or unshielded
52+
from, each of the *Sprout*, *Sapling*, *Orchard*, and *Ironwood chain value pools*. If the total
53+
value that is unshielded exceeds the total value that was shielded for a given pool, a balance
54+
violation has occurred in the corresponding shielded transaction protocol.
5055

51-
It would be preferable for the network to reject blocks that result in the aforementioned balance violation.
52-
However, nodes do not currently react to such an event. Remediation may therefore require chain rollbacks
53-
and other disruption.
56+
It would be preferable for the network to reject blocks that result in the aforementioned balance
57+
violation. However, nodes do not currently react to such an event. Remediation may therefore
58+
require chain rollbacks and other disruption.
5459

5560

5661
Specification
5762
=============
5863

59-
If any of the Sprout chain value pool balance, Sapling chain value pool balance,
60-
Orchard chain value pool balance, transparent chain value pool balance, or
61-
deferred development fund chain value pool balance would become negative in the
62-
block chain created as a result of accepting a block, then all nodes MUST reject
63-
the block as invalid.
64+
If the chain value pool balance for any of the *Sprout*, *Sapling*, *Orchard*, *Ironwood*,
65+
*transparent*, or *deferred development fund pools* would become negative in the block chain
66+
created as a result of accepting a block, then all nodes MUST reject the block as invalid.
6467

65-
If the sum of these chain value pool balances (i.e. the total supply, computed
66-
without possibility of overflow) would become greater than $\mathsf{MAX\_MONEY}$
67-
zatoshis in the block chain created as a result of accepting a block, then all
68-
nodes MUST reject the block as invalid.
68+
If the sum of these chain value pool balances (i.e. the total supply, computed without possibility
69+
of overflow) would become greater than $\mathsf{MAX\_MONEY}$ zatoshis in the block chain created
70+
as a result of accepting a block, then all nodes MUST reject the block as invalid.
6971

7072
Nodes MAY relay transactions even if one or more of them cannot be mined due to the aforementioned
7173
restriction.
@@ -83,8 +85,10 @@ will be produced that violate it, potentially leading to network fragmentation.
8385
sufficiently unlikely that the benefits of enforcing this consensus rule sooner are overwhelming.
8486

8587
This specification was deployed in zcashd v2.0.4 for Testnet, and in zcashd v2.0.5 for Mainnet.
86-
The application to the Orchard chain value pool balance will be deployed from NU5 activation
87-
[#zip-0252]_.
88+
The application to the *Orchard chain value pool balance* will be deployed from NU5 activation
89+
[#zip-0252]_. A tightening of the rules applied by zcashd was deployed as described in [#zip-0256]_.
90+
The application to the *Ironwood chain value pool balance* will be deployed from NU6.3 activation
91+
[#zip-0258]_.
8892

8993

9094
References

zips/zip-0211.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ References
147147
.. [#protocol] `Zcash Protocol Specification, Version 2021.2.16 or later <protocol/protocol.pdf>`_
148148
.. [#zip-0200] `ZIP 200: Network Upgrade Mechanism <zip-0200.rst>`_
149149
.. [#zip-0205] `ZIP 205: Deployment of the Sapling Network Upgrade <zip-0205.rst>`_
150-
.. [#zip-0209] `ZIP 209: Prohibit Negative Shielded Value Pool <zip-0209.rst>`_
150+
.. [#zip-0209] `ZIP 209: Prohibit Out-of-Range Chain Value Pool Balances <zip-0209.rst>`_
151151
.. [#zip-0251] `ZIP 251: Deployment of the Canopy Network Upgrade <zip-0251.rst>`_
152152
.. [#zip-0308] `ZIP 308: Sprout to Sapling Migration <zip-0308.rst>`_
153153
.. [#zerocash] `Zerocash: Decentralized Anonymous Payments from Bitcoin (extended version) <https://eprint.iacr.org/2014/349>`_

zips/zip-0213.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ rules preventing coinbase transactions from containing shielded outputs were ext
5858
cover Sapling outputs. Therefore, it is now necessary to modify the consensus rules in
5959
order to enable miners to start using Sapling addresses. It will also be possible for
6060
miners to use Orchard addresses starting from activation of the NU5 upgrade [#zip-0252]_.
61+
After the NU6.3 upgrade, it is only possible to mine to an Orchard address by sending the
62+
funds to the *Ironwood pool*.
6163

6264

6365
Specification
@@ -105,11 +107,16 @@ Once the Heartwood network upgrade activates:
105107

106108
Once the NU5 network upgrade activates:
107109

108-
- Coinbase transactions MAY contain Sapling and/or Orchard outputs.
110+
- Coinbase transactions MAY contain Sapling-pool and/or Orchard-pool outputs.
109111

110112
This does not require any change to the consensus rule given above; it is a consequence
111113
of other rules as of NU5 activation.
112114

115+
Once the NU6.3 network upgrade activates:
116+
117+
- Coinbase transactions MAY contain Sapling-pool and/or Ironwood-pool outputs.
118+
- Coinbase transactions MUST NOT contain any Orchard-pool component.
119+
113120

114121
Interaction with the Founders' Reward
115122
-------------------------------------

zips/zip-0226.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ References
443443

444444
.. [#BCP14] `Information on BCP 14 — "RFC 2119: Key words for use in RFCs to Indicate Requirement Levels" and "RFC 8174: Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words" <https://www.rfc-editor.org/info/bcp14>`_
445445
.. [#zip-0200] `ZIP 200: Network Upgrade Mechanism <zip-0200.rst>`_
446-
.. [#zip-0209] `ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances <zip-0209.rst>`_
446+
.. [#zip-0209] `ZIP 209: Prohibit Out-of-Range Chain Value Pool Balances <zip-0209.rst>`_
447447
.. [#zip-0224] `ZIP 224: Orchard <zip-0224.rst>`_
448448
.. [#zip-0227] `ZIP 227: Issuance of Zcash Shielded Assets <zip-0227.rst>`_
449449
.. [#zip-0227-specification-global-issuance-state] `ZIP 227: Issuance of Zcash Shielded Assets — Specification: Global Issuance State <zip-0227.rst#specification-global-issuance-state>`_

zips/zip-0227.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ References
685685
.. [#zip-0032-key-path-levels] `ZIP 32: Shielded Hierarchical Deterministic Wallets — Key path levels <zip-0032.rst#key-path-levels>`_
686686
.. [#zip-0032-orchard-key-path] `ZIP 32: Shielded Hierarchical Deterministic Wallets — Orchard key path <zip-0032.rst#orchard-key-path>`_
687687
.. [#zip-0200] `ZIP 200: Network Upgrade Mechanism <zip-0200.rst>`_
688-
.. [#zip-0209] `ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances <zip-0209.rst>`_
688+
.. [#zip-0209] `ZIP 209: Prohibit Out-of-Range Shielded Chain Value Pool Balances <zip-0209.rst>`_
689689
.. [#zip-0224] `ZIP 224: Orchard <zip-0224.rst>`_
690690
.. [#zip-0226] `ZIP 226: Transfer and Burn of Zcash Shielded Assets <zip-0226.rst>`_
691691
.. [#zip-0226-note-structure-and-commitment] `ZIP 226: Transfer and Burn of Zcash Shielded Assets — Note Structure and Commitment <zip-0226.rst#note-structure-and-commitment>`_

zips/zip-0229.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ treating the note commitment tree anchor as authorizing data rather than effecti
483483

484484
[^zip-0203]: [ZIP 203: Transaction Expiry](zip-0203.rst)
485485

486-
[^zip-0209]: [ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances](zip-0209.rst)
486+
[^zip-0209]: [ZIP 209: Prohibit Out-of-Range Shielded Chain Value Pool Balances](zip-0209.rst)
487487

488488
[^zip-0224]: [ZIP 224: Orchard Shielded Protocol](zip-0224.rst)
489489

zips/zip-0252.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The following ZIPs have been updated in varying degrees to take into account Orc
5959

6060
- ZIP 32: Shielded Hierarchical Deterministic Wallets [#zip-0032]_
6161
- ZIP 203: Transaction Expiry [#zip-0203]_
62-
- ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances [#zip-0209]_
62+
- ZIP 209: Prohibit Out-of-Range Chain Value Pool Balances [#zip-0209]_
6363
- ZIP 212: Allow Recipient to Derive Ephemeral Secret from Note Plaintext [#zip-0212]_
6464
- ZIP 213: Shielded Coinbase [#zip-0213]_
6565
- ZIP 221: FlyClient - Consensus-Layer Changes [#zip-0221]_
@@ -230,7 +230,7 @@ References
230230
.. [#zip-0200] `ZIP 200: Network Upgrade Mechanism <zip-0200.rst>`_
231231
.. [#zip-0201] `ZIP 201: Network Peer Management for Overwinter <zip-0201.rst>`_
232232
.. [#zip-0203] `ZIP 203: Transaction Expiry <zip-0203.rst>`_
233-
.. [#zip-0209] `ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances <zip-0209.rst>`_
233+
.. [#zip-0209] `ZIP 209: Prohibit Out-of-Range Chain Value Pool Balances <zip-0209.rst>`_
234234
.. [#zip-0212] `ZIP 212: Allow Recipient to Derive Ephemeral Secret from Note Plaintext <zip-0212.rst>`_
235235
.. [#zip-0213] `ZIP 213: Shielded Coinbase <zip-0213.rst>`_
236236
.. [#zip-0216] `ZIP 216: Require Canonical Point Encodings <zip-0216.rst>`_

0 commit comments

Comments
 (0)