Zcash in Simplified Technical English

This page is the Simplified Technical English version of ZIP 236. The source ZIP is the normative text. Read the writing rules to understand the marked words.

ZIP 236: Blocks should balance exactly

ZIP: 236
Title: Blocks should balance exactly
Owners: Daira-Emma Hopwood <daira@jacaranda.org>
Credits: Jack Grigg
         Kris Nuttycombe
Status: Final
Category: Consensus
Created: 2024-07-02
License: MIT
Discussions-To: <https://github.com/zcash/zips/issues/864>

Terminology

On this page, STE words are in the place of the BCP 14 key words of the source. Refer to the key word table.

In this document, the term "network upgrade" has the definition in ZIP 200 [zip-0200].

In this document, the terms "Testnet" and "Mainnet" have the definitions in section 3.12 of the Zcash Protocol Specification [protocol-networks].

In this document, the character § is used for references to sections of the Zcash Protocol Specification [protocol].

Abstract

The available amount for a coinbase transaction is the total miner subsidy plus the fees from the other transactions in the block. In the Zcash protocol before this ZIP, the miner of a coinbase transaction can claim a maximum of this amount. It is not necessary for the miner to claim the full amount.

With this ZIP, it is necessary to collect the full amount of the miner subsidy and fees in coinbase transactions.

Motivation

With the semantics of coinbase transactions before this ZIP, miners can calculate an incorrect total amount of miner subsidy plus fees in a block. If miners claim an amount that is higher than the actual miner subsidy plus total fees, the block is invalid. If miners claim a lower amount, the excess is effectively burnt. Thus the effective ZEC issuance can be less than the amount that is calculated from the intended issuance curve.

Because of this problem, the question of the quantity of issued ZEC is more complex than necessary. If the definition of issuance does not include the amounts that miners did not claim, the issuance is difficult to calculate. With this definition, it is not possible to predict the issuance exactly in advance for any given block height.

As an alternative, the definition of issuance can include these amounts. With this definition, there can be differences between different definitions of issuance or total supply. These differences can be a cause of confusion.

Requirements

These conditions must apply to the consensus rule change in this ZIP:

Non-requirements

This ZIP is intended to activate in a network upgrade that is not expected to support a new transaction version. Thus this ZIP cannot solve this issue: the amounts of fees are implicit in non-coinbase transactions. Because of this issue, different security difficulties are possible. Also, the wallets of users can pay too much fee by accident. But to solve this issue, an explicit "fee" field is necessary.

Note: Technically, it is possible to encode the fee as a transparent output. But that change is more disruptive than is desirable, for two reasons. First, to prevent a spend of this output, it is necessary to change other consensus rules. Second, existing consumers of the transaction format can interpret such outputs incorrectly.

This consensus change is not intended to prevent other methods to remove ZEC from the circulating supply in a provable way. An example is to send ZEC to an address whose spending key is demonstrably infeasible to find.

Specification

From the activation block of this ZIP onward, coinbase transactions must claim all of the available miner subsidy plus fees in their block.

Changes to the Zcash Protocol Specification

A sentence in § 3.4 ‘Transactions and Treestates’ [protocol-transactions] is clarified. This is the sentence before the change:

The remaining value in the transparent transaction value pool of a coinbase transaction is destroyed.

This is the sentence after the change:

The remaining value in the transparent transaction value pool of coinbase transactions in blocks before NU6 is destroyed. From activation of NU6, it is necessary that this remaining value is zero. That is, all of the available balance must be consumed by outputs of the coinbase transaction.

In § 7.1.2 ‘Transaction Consensus Rules’ [protocol-txnconsensus], as changed by [zip-2001], this rule is replaced:

The total output value of a coinbase transaction must not be greater than its total input value.

These are the rules after the change:

[Pre-NU6] The total output value of a coinbase transaction must not be greater than its total input value.

[NU6 onward] The total output value of a coinbase transaction must be equal to its total input value.

These changes apply to Mainnet and Testnet in the same way.

Deployment

This ZIP was deployed with NU6 [zip-0253].

The change to the words of § 7.1.2 depends on [zip-2001]. ZIP 2001 was also deployed with NU6 [zip-0253].

Reference implementation

Acknowledgements

The author thanks Jack Grigg and Kris Nuttycombe for the discussions that led to the submission of this ZIP.

References

[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"
[protocol]
Zcash Protocol Specification, Version 2024.5.1 or later
[protocol-transactions]
Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 3.4: Transactions and Treestates
[protocol-networks]
Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 3.12: Mainnet and Testnet
[protocol-txnconsensus]
Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 7.1.2: Transaction Consensus Rules
[zip-0200]
ZIP 200: Network Upgrade Mechanism
[zip-0253]
ZIP 253: Deployment of the NU6 Network Upgrade
[zip-2001]
ZIP 2001: Lockbox Funding Streams