mirror of https://github.com/zcash/zips.git
Merge pull request #521 from daira/zip-209-orchard
ZIP 209: apply this ZIP to the Orchard chain value pool.
This commit is contained in:
commit
a893eca4d9
|
@ -46,6 +46,7 @@ This is the list of ZIPs relevant to the proposed NU5 Upgrade, which
|
|||
is planned to activate on Mainnet at the beginning of October 2021:
|
||||
|
||||
- `ZIP 32: Shielded Hierarchical Deterministic Wallets <zip-0032.rst>`__ (updated)
|
||||
- `ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances <zip-0209.rst>`__ (updated)
|
||||
- `ZIP 216: Require Canonical Jubjub Point Encodings <zip-0216.rst>`__
|
||||
- `ZIP 221: FlyClient - Consensus-Layer Changes <zip-0221.rst>`__ (updated)
|
||||
- `ZIP 224: Orchard Shielded Protocol <zip-0224.rst>`__
|
||||
|
|
|
@ -46,6 +46,7 @@ This is the list of ZIPs relevant to the proposed NU5 Upgrade, which
|
|||
is planned to activate on Mainnet at the beginning of October 2021:
|
||||
|
||||
- `ZIP 32: Shielded Hierarchical Deterministic Wallets <zip-0032.rst>`__ (updated)
|
||||
- `ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances <zip-0209.rst>`__ (updated)
|
||||
- `ZIP 216: Require Canonical Jubjub Point Encodings <zip-0216.rst>`__
|
||||
- `ZIP 221: FlyClient - Consensus-Layer Changes <zip-0221.rst>`__ (updated)
|
||||
- `ZIP 224: Orchard Shielded Protocol <zip-0224.rst>`__
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<p>This is the list of ZIPs relevant to the proposed NU5 Upgrade, which is planned to activate on Mainnet at the beginning of October 2021:</p>
|
||||
<ul>
|
||||
<li><a href="zip-0032">ZIP 32: Shielded Hierarchical Deterministic Wallets</a> (updated)</li>
|
||||
<li><a href="zip-0209">ZIP 209: Prohibit Negative Shielded Chain Value Pool Balances</a> (updated)</li>
|
||||
<li><a href="zip-0216">ZIP 216: Require Canonical Jubjub Point Encodings</a></li>
|
||||
<li><a href="zip-0221">ZIP 221: FlyClient - Consensus-Layer Changes</a> (updated)</li>
|
||||
<li><a href="zip-0224">ZIP 224: Orchard Shielded Protocol</a></li>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<pre>ZIP: 209
|
||||
Title: Prohibit Negative Shielded Chain Value Pool Balances
|
||||
Owners: Sean Bowe <sean@electriccoin.co>
|
||||
Daira Hopwood <daira@electriccoin.co>
|
||||
Status: Final
|
||||
Category: Consensus
|
||||
Created: 2019-02-25
|
||||
|
@ -17,24 +18,25 @@ License: MIT</pre>
|
|||
<p>The key words "MUST", "SHOULD", and "MAY" in this document are to be interpreted as described in RFC 2119. <a id="id1" class="footnote_reference" href="#rfc2119">1</a></p>
|
||||
<p>The term "block chain" and "network upgrade" are to be interpreted as defined in <a id="id2" class="footnote_reference" href="#zip-0200">3</a>.</p>
|
||||
<p>The "Sprout chain value pool balance" for a given block chain is the sum of all <code>vpub_old</code> fields for transactions in the block chain, minus the sum of all <code>vpub_new</code> fields for transactions in the block chain.</p>
|
||||
<p>The "Sapling chain value pool balance" for a given block chain is the negation of the sum of all <code>valueBalance</code> fields for transactions in the block chain.</p>
|
||||
<p>The "Sapling chain value pool balance" for a given block chain is the negation of the sum of all <code>valueBalanceSapling</code> fields for transactions in the block chain.</p>
|
||||
<p>The "Orchard chain value pool balance" for a given block chain is the negation of the sum of all <code>valueBalanceOrchard</code> fields for transactions in the block chain. (Before NU5 has activated, the Orchard chain value pool balance is zero.)</p>
|
||||
<p>The terms "Testnet" and "Mainnet" are to be interpreted as described in section 3.11 of the Zcash Protocol Specification <a id="id3" class="footnote_reference" href="#protocol-networks">2</a>.</p>
|
||||
</section>
|
||||
<section id="abstract"><h2><span class="section-heading">Abstract</span><span class="section-anchor"> <a rel="bookmark" href="#abstract"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
|
||||
<p>This proposal defines how the consensus rules are altered such that blocks that produce negative shielded chain value pool balances are prohibited.</p>
|
||||
</section>
|
||||
<section id="motivation"><h2><span class="section-heading">Motivation</span><span class="section-anchor"> <a rel="bookmark" href="#motivation"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
|
||||
<p>It is possible for nodes to monitor the total value of notes that are shielded to, or unshielded from, each of the Sprout or Sapling value pools. If the total value that is unshielded exceeds the total value that was shielded for a given pool, a balance violation has occurred in the corresponding shielded transaction protocol.</p>
|
||||
<p>It is possible for nodes to monitor the total value of notes that are shielded to, or unshielded from, each of the Sprout, Sapling, and Orchard value pools. If the total value that is unshielded exceeds the total value that was shielded for a given pool, a balance violation has occurred in the corresponding shielded transaction protocol.</p>
|
||||
<p>It would be preferable for the network to reject blocks that result in the aforementioned balance violation. However, nodes do not currently react to such an event. Remediation may therefore require chain rollbacks and other disruption.</p>
|
||||
</section>
|
||||
<section id="specification"><h2><span class="section-heading">Specification</span><span class="section-anchor"> <a rel="bookmark" href="#specification"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
|
||||
<p>If the "Sprout chain value pool balance" or "Sapling chain value pool balance" would become negative in the block chain created as a result of accepting a block, then all nodes MUST reject the block as invalid.</p>
|
||||
<p>If any of the "Sprout chain value pool balance", "Sapling chain value pool balance", or "Orchard chain value pool balance" would become negative in the block chain created as a result of accepting a block, then all nodes MUST reject the block as invalid.</p>
|
||||
<p>Nodes MAY relay transactions even if one or more of them cannot be mined due to the aforementioned restriction.</p>
|
||||
</section>
|
||||
<section id="deployment"><h2><span class="section-heading">Deployment</span><span class="section-anchor"> <a rel="bookmark" href="#deployment"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
|
||||
<p>This consensus rule is not deployed as part of a network upgrade as defined in ZIP-200 <a id="id4" class="footnote_reference" href="#zip-0200">3</a> and there is no mechanism by which the network will synchronize to enforce this rule. Rather, all nodes SHOULD begin enforcing this consensus rule upon acceptance of this proposal.</p>
|
||||
<p>There is a risk that before all nodes on the network begin enforcing this consensus rule that block(s) will be produced that violate it, potentially leading to network fragmentation. This is considered sufficiently unlikely that the benefits of enforcing this consensus rule sooner are overwhelming.</p>
|
||||
<p>This specification was deployed in zcashd v2.0.4 for Testnet, and in zcashd v2.0.5 for Mainnet.</p>
|
||||
<p>This specification was deployed in zcashd v2.0.4 for Testnet, and in zcashd v2.0.5 for Mainnet. The application to the Orchard chain value pool balance will be deployed from NU5 activation <a id="id5" class="footnote_reference" href="#zip-0252">4</a>.</p>
|
||||
</section>
|
||||
<section id="references"><h2><span class="section-heading">References</span><span class="section-anchor"> <a rel="bookmark" href="#references"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
|
||||
<table id="rfc2119" class="footnote">
|
||||
|
@ -61,6 +63,14 @@ License: MIT</pre>
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table id="zip-0252" class="footnote">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>4</th>
|
||||
<td><a href="zip-0252">ZIP 252: Deployment of the NU5 Network Upgrade</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
</body>
|
||||
|
|
22
zip-0209.rst
22
zip-0209.rst
|
@ -3,6 +3,7 @@
|
|||
ZIP: 209
|
||||
Title: Prohibit Negative Shielded Chain Value Pool Balances
|
||||
Owners: Sean Bowe <sean@electriccoin.co>
|
||||
Daira Hopwood <daira@electriccoin.co>
|
||||
Status: Final
|
||||
Category: Consensus
|
||||
Created: 2019-02-25
|
||||
|
@ -22,7 +23,11 @@ fields for transactions in the block chain, minus the sum of all ``vpub_new`` fi
|
|||
transactions in the block chain.
|
||||
|
||||
The "Sapling chain value pool balance" for a given block chain is the negation of the sum of all
|
||||
``valueBalance`` fields for transactions in the block chain.
|
||||
``valueBalanceSapling`` fields for transactions in the block chain.
|
||||
|
||||
The "Orchard chain value pool balance" for a given block chain is the negation of the sum of all
|
||||
``valueBalanceOrchard`` fields for transactions in the block chain. (Before NU5 has activated,
|
||||
the Orchard chain value pool balance is zero.)
|
||||
|
||||
The terms "Testnet" and "Mainnet" are to be interpreted as described in section 3.11 of the
|
||||
Zcash Protocol Specification [#protocol-networks]_.
|
||||
|
@ -39,9 +44,9 @@ Motivation
|
|||
==========
|
||||
|
||||
It is possible for nodes to monitor the total value of notes that are shielded to, or unshielded from,
|
||||
each of the Sprout or Sapling value pools. If the total value that is unshielded exceeds the total value
|
||||
that was shielded for a given pool, a balance violation has occurred in the corresponding shielded
|
||||
transaction protocol.
|
||||
each of the Sprout, Sapling, and Orchard value pools. If the total value that is unshielded exceeds the
|
||||
total value that was shielded for a given pool, a balance violation has occurred in the corresponding
|
||||
shielded transaction protocol.
|
||||
|
||||
It would be preferable for the network to reject blocks that result in the aforementioned balance violation.
|
||||
However, nodes do not currently react to such an event. Remediation may therefore require chain rollbacks
|
||||
|
@ -51,9 +56,9 @@ and other disruption.
|
|||
Specification
|
||||
=============
|
||||
|
||||
If the "Sprout chain value pool balance" or "Sapling chain value pool balance" would become negative
|
||||
in the block chain created as a result of accepting a block, then all nodes MUST reject the block as
|
||||
invalid.
|
||||
If any of the "Sprout chain value pool balance", "Sapling chain value pool balance", or
|
||||
"Orchard chain value pool balance" would become negative in the block chain created as a result of
|
||||
accepting a block, then all nodes MUST reject the block as invalid.
|
||||
|
||||
Nodes MAY relay transactions even if one or more of them cannot be mined due to the aforementioned
|
||||
restriction.
|
||||
|
@ -71,6 +76,8 @@ will be produced that violate it, potentially leading to network fragmentation.
|
|||
sufficiently unlikely that the benefits of enforcing this consensus rule sooner are overwhelming.
|
||||
|
||||
This specification was deployed in zcashd v2.0.4 for Testnet, and in zcashd v2.0.5 for Mainnet.
|
||||
The application to the Orchard chain value pool balance will be deployed from NU5 activation
|
||||
[#zip-0252]_.
|
||||
|
||||
|
||||
References
|
||||
|
@ -79,3 +86,4 @@ References
|
|||
.. [#RFC2119] `RFC 2119: Key words for use in RFCs to Indicate Requirement Levels <https://www.rfc-editor.org/rfc/rfc2119.html>`_
|
||||
.. [#protocol-networks] `Zcash Protocol Specification, Version 2020.1.15 or later. Section 3.11: Mainnet and Testnet <protocol/protocol.pdf#networks>`_
|
||||
.. [#zip-0200] `ZIP 200: Network Upgrade Mechanism <zip-0200.rst>`_
|
||||
.. [#zip-0252] `ZIP 252: Deployment of the NU5 Network Upgrade <zip-0252.rst>`_
|
||||
|
|
Loading…
Reference in New Issue