Skip to content

Latest commit

 

History

History
81 lines (54 loc) · 3.08 KB

zip-0209.rst

File metadata and controls

81 lines (54 loc) · 3.08 KB
ZIP: 209
Title: Prohibit Negative Shielded Chain Value Pool Balances
Owners: Sean Bowe <[email protected]>
Status: Final
Category: Consensus
Created: 2019-02-25
License: MIT

Terminology

The key words "MUST", "SHOULD", and "MAY" in this document are to be interpreted as described in RFC 2119. [1]

The term "block chain" and "network upgrade" are to be interpreted as defined in [3].

The "Sprout chain value pool balance" for a given block chain is the sum of all vpub_old fields for transactions in the block chain, minus the sum of all vpub_new fields for 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.

The terms "Testnet" and "Mainnet" are to be interpreted as described in section 3.11 of the Zcash Protocol Specification [2].

Abstract

This proposal defines how the consensus rules are altered such that blocks that produce negative shielded chain value pool balances are prohibited.

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.

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.

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.

Nodes MAY relay transactions even if one or more of them cannot be mined due to the aforementioned restriction.

Deployment

This consensus rule is not deployed as part of a network upgrade as defined in ZIP-200 [3] 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.

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.

This specification was deployed in zcashd v2.0.4 for Testnet, and in zcashd v2.0.5 for Mainnet.

References

[1]RFC 2119: Key words for use in RFCs to Indicate Requirement Levels
[2]Zcash Protocol Specification, Version 2020.1.15 or later. Section 3.11: Mainnet and Testnet
[3](1, 2) ZIP 200: Network Upgrade Mechanism