diff --git a/README.rst b/README.rst index b64cba687..32e67922e 100644 --- a/README.rst +++ b/README.rst @@ -124,6 +124,7 @@ written. 228 Asset Swaps for Zcash Shielded Assets Reserved 230 Version 6 Transaction Format Draft 231 Decouple Memos from Transaction Outputs Reserved + 236 Blocks should balance exactly Draft 245 Transaction Identifier Digests & Signature Validation for Transparent Zcash Extensions Draft 253 Deployment of the NU6 Network Upgrade Reserved 302 Standardized Memo Field Format Draft @@ -166,7 +167,6 @@ be deleted. - @@ -247,6 +247,7 @@ Index of ZIPs + diff --git a/rendered/draft-hopwood-coinbase-balance.html b/rendered/draft-hopwood-coinbase-balance.html index 462d7e74f..8c72eba08 100644 --- a/rendered/draft-hopwood-coinbase-balance.html +++ b/rendered/draft-hopwood-coinbase-balance.html @@ -1,129 +1,10 @@ - Draft hopwood-coinbase-balance: Blocks should balance exactly - - + ZIP 236: Blocks should balance exactly (redirect) + + -
-
ZIP: XXX
-Title: Blocks should balance exactly
-Owners: Daira-Emma Hopwood <daira-emma@electriccoin.co>
-Credits: Jack Grigg
-         Kris Nuttycombe
-Status: Draft
-Category: Consensus
-Created: 2024-07-02
-License: MIT
-Discussions-To: <https://github.com/zcash/zips/issues/864>
-

Terminology

-

The key word "MUST" in this document is to be interpreted as described in BCP 14 1 when, and only when, it appears in all capitals.

-

The term "network upgrade" in this document is to be interpreted as described in ZIP 200. 5

-

The terms "Testnet" and "Mainnet" are to be interpreted as described in section 3.12 of the Zcash Protocol Specification. 4

-

The character § is used when referring to sections of the Zcash Protocol Specification 2.

-
-

Abstract

-

In the current Zcash protocol, the miner of a coinbase transaction is permitted to claim up to and including the total amount of miner subsidy plus fees from other transactions in the block, but is not required to claim the full amount.

-

This proposal would require the full amount of miner subsidy and fees to be collected in coinbase transactions.

-
-

Motivation

-

The current semantics of coinbase transactions creates a potential for miners to miscalculate the total amount of miner subsidy plus fees in a block. If they claim a higher amount than the actual miner subsidy plus total fees, the block will be invalid, but if they claim a lower amount, the excess is effectively burnt. As a consequence, the effective ZEC issuance can fall short of the amount calculated from the intended issuance curve.

-

This unnecessarily complicates the question of how much ZEC has been issued: if it is defined as not including the amounts that were left unclaimed by miners, then it is difficult to calculate, and cannot be predicted exactly in advance for any given block height. Alternatively if it is defined to include those amounts, then that introduces potentially confusing discrepancies between different definitions of issuance or total supply.

-
-

Requirements

-

The consensus rule change specified in this ZIP must:

- -
-

Non-requirements

-

Since this ZIP is intended to activate in a network upgrade that is not expected to support a new transaction version, it cannot resolve the issue that the amounts of fees are implicit in non-coinbase transactions. That issue results in various potential security difficulties and the potential for users' wallets to inadvertently overpay the fee, but solving that would require an explicit "fee" field.

-

(It would technically be possible to encode the fee as a transparent output, but that would be a more disruptive change than is desirable, since other consensus rules would have to change in order to prevent this output from being spent, and since existing consumers of the transaction format could misinterpret such outputs.)

-

This consensus change is not intended to prevent other methods of provably removing ZEC from the circulating supply, such as sending it to an address for which it would be demonstrably infeasible to find the spending key.

-
-

Specification

-

From the activation block of this ZIP onward, coinbase transactions MUST claim all of the available miner subsidy plus fees in their block. More specifically, the following paragraph and consensus rule in § 3.4 "Transactions and Treestates" of the Zcash Protocol Specification 3:

-
-

Transparent inputs to a transaction insert value into a transparent transaction value pool associated with the transaction, and transparent outputs remove value from this pool. As in Bitcoin, the remaining value in the transparent transaction value pool of a non-coinbase transaction is available to miners as a fee. The remaining value in the transparent transaction value pool of a coinbase transaction is destroyed.

-

Consensus rule: The remaining value in the transparent transaction value pool MUST be nonnegative.

-
-

is modified to become:

-
-

Transparent inputs to a transaction insert value into a transparent transaction value pool associated with the transaction, and transparent outputs remove value from this pool. The effect of Sapling Spends and Outputs, and of Orchard Actions on the transaction value pool are specified in § 4.13 and § 4.14 respectively.

-

As in Bitcoin, the remaining value in the transparent transaction value pool of a non-coinbase transaction is available to miners as a fee. That is, the sum of those values for non-coinbase transactions in each block is treated as an implicit input to the transaction value balance of the block's coinbase transaction (in addition to the implicit input created by issuance).

-

The remaining value in the transparent transaction value pool of coinbase transactions in blocks prior to NU-X is destroyed. From activation of NU-X, this remaining value is required to be zero; that is, all of the available balance MUST be consumed by outputs of the coinbase transaction.

-

Consensus rules:

-
    -
  • The remaining value in the transparent transaction value pool of a non-coinbase transaction MUST be nonnegative.
  • -
  • [Pre-NU-X] The remaining value in the transparent transaction value pool of a coinbase transaction MUST be nonnegative.
  • -
  • [NU-X onward] The remaining value in the transparent transaction value pool of a coinbase transaction MUST be zero.
  • -
-
-

where "NU-X" is to be replaced by the designation of the network upgrade in which this ZIP will be activated.

-

Note that the differences in the first two paragraphs of the above replacement text are clarifications of the protocol, rather than consensus changes. Those could be made independently of this ZIP.

-

This change applies identically to Mainnet and Testnet.

-
-

Deployment

-

Subject to community agreement, this ZIP is proposed to be deployed with NU6. 6

-
-

Reference implementation

-

TODO

-
-

Acknowledgements

-

The author would like to thank Jack Grigg and Kris Nuttycombe for discussions leading to the submission of this ZIP.

-
-

References

-
Title
Blocks should balance exactly
Manufacturing Consent; Re-Establishing a Dev Fund for ECC, ZF, ZCG, Qedit, FPF, and ZecHub
Block Reward Allocation for Non-Direct Development Funding
Establishing a Hybrid Dev Fund for ZF, ZCG and a Dev Fund Reserve
228 Asset Swaps for Zcash Shielded Assets Reserved
230 Version 6 Transaction Format Draft
231 Decouple Memos from Transaction Outputs Reserved
236 Blocks should balance exactly Draft
239 Relay of Version 5 Transactions Final
243 Transaction Signature Validation for Sapling Final
244 Transaction Identifier Non-Malleability Final
- - - - - - -
1Information 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"
- - - - - - - -
2Zcash Protocol Specification, Version 2023.4.0 or later
- - - - - - - -
3Zcash Protocol Specification, Version 2023.4.0. Section 3.4: Transactions and Treestates
- - - - - - - -
4Zcash Protocol Specification, Version 2023.4.0. Section 3.12: Mainnet and Testnet
- - - - - - - -
5ZIP 200: Network Upgrade Mechanism
- - - - - - - -
6ZIP 253: Deployment of the NU6 Network Upgrade
- - +

This draft was assigned ZIP number 236.

\ No newline at end of file diff --git a/rendered/index.html b/rendered/index.html index fe6a43b20..da8567ad0 100644 --- a/rendered/index.html +++ b/rendered/index.html @@ -89,6 +89,7 @@ 228 Asset Swaps for Zcash Shielded Assets Reserved 230 Version 6 Transaction Format Draft 231 Decouple Memos from Transaction Outputs Reserved + 236 Blocks should balance exactly Draft 245 Transaction Identifier Digests & Signature Validation for Transparent Zcash Extensions Draft 253 Deployment of the NU6 Network Upgrade Reserved 302 Standardized Memo Field Format Draft @@ -122,7 +123,6 @@

These are works-in-progress, and may never be assigned ZIP numbers if their ideas become obsoleted or abandoned. Do not assume that these drafts will exist in perpetuity; instead assume that they will either move to a numbered ZIP, or be deleted.

- @@ -193,6 +193,7 @@ + diff --git a/rendered/zip-0236.html b/rendered/zip-0236.html new file mode 100644 index 000000000..7af767d39 --- /dev/null +++ b/rendered/zip-0236.html @@ -0,0 +1,129 @@ + + + + ZIP 236: Blocks should balance exactly + + + +
+
ZIP: 236
+Title: Blocks should balance exactly
+Owners: Daira-Emma Hopwood <daira-emma@electriccoin.co>
+Credits: Jack Grigg
+         Kris Nuttycombe
+Status: Draft
+Category: Consensus
+Created: 2024-07-02
+License: MIT
+Discussions-To: <https://github.com/zcash/zips/issues/864>
+

Terminology

+

The key word "MUST" in this document is to be interpreted as described in BCP 14 1 when, and only when, it appears in all capitals.

+

The term "network upgrade" in this document is to be interpreted as described in ZIP 200. 5

+

The terms "Testnet" and "Mainnet" are to be interpreted as described in section 3.12 of the Zcash Protocol Specification. 4

+

The character § is used when referring to sections of the Zcash Protocol Specification 2.

+
+

Abstract

+

In the current Zcash protocol, the miner of a coinbase transaction is permitted to claim up to and including the total amount of miner subsidy plus fees from other transactions in the block, but is not required to claim the full amount.

+

This proposal would require the full amount of miner subsidy and fees to be collected in coinbase transactions.

+
+

Motivation

+

The current semantics of coinbase transactions creates a potential for miners to miscalculate the total amount of miner subsidy plus fees in a block. If they claim a higher amount than the actual miner subsidy plus total fees, the block will be invalid, but if they claim a lower amount, the excess is effectively burnt. As a consequence, the effective ZEC issuance can fall short of the amount calculated from the intended issuance curve.

+

This unnecessarily complicates the question of how much ZEC has been issued: if it is defined as not including the amounts that were left unclaimed by miners, then it is difficult to calculate, and cannot be predicted exactly in advance for any given block height. Alternatively if it is defined to include those amounts, then that introduces potentially confusing discrepancies between different definitions of issuance or total supply.

+
+

Requirements

+

The consensus rule change specified in this ZIP must:

+ +
+

Non-requirements

+

Since this ZIP is intended to activate in a network upgrade that is not expected to support a new transaction version, it cannot resolve the issue that the amounts of fees are implicit in non-coinbase transactions. That issue results in various potential security difficulties and the potential for users' wallets to inadvertently overpay the fee, but solving that would require an explicit "fee" field.

+

(It would technically be possible to encode the fee as a transparent output, but that would be a more disruptive change than is desirable, since other consensus rules would have to change in order to prevent this output from being spent, and since existing consumers of the transaction format could misinterpret such outputs.)

+

This consensus change is not intended to prevent other methods of provably removing ZEC from the circulating supply, such as sending it to an address for which it would be demonstrably infeasible to find the spending key.

+
+

Specification

+

From the activation block of this ZIP onward, coinbase transactions MUST claim all of the available miner subsidy plus fees in their block. More specifically, the following paragraph and consensus rule in § 3.4 "Transactions and Treestates" of the Zcash Protocol Specification 3:

+
+

Transparent inputs to a transaction insert value into a transparent transaction value pool associated with the transaction, and transparent outputs remove value from this pool. As in Bitcoin, the remaining value in the transparent transaction value pool of a non-coinbase transaction is available to miners as a fee. The remaining value in the transparent transaction value pool of a coinbase transaction is destroyed.

+

Consensus rule: The remaining value in the transparent transaction value pool MUST be nonnegative.

+
+

is modified to become:

+
+

Transparent inputs to a transaction insert value into a transparent transaction value pool associated with the transaction, and transparent outputs remove value from this pool. The effect of Sapling Spends and Outputs, and of Orchard Actions on the transaction value pool are specified in § 4.13 and § 4.14 respectively.

+

As in Bitcoin, the remaining value in the transparent transaction value pool of a non-coinbase transaction is available to miners as a fee. That is, the sum of those values for non-coinbase transactions in each block is treated as an implicit input to the transaction value balance of the block's coinbase transaction (in addition to the implicit input created by issuance).

+

The remaining value in the transparent transaction value pool of coinbase transactions in blocks prior to NU-X is destroyed. From activation of NU-X, this remaining value is required to be zero; that is, all of the available balance MUST be consumed by outputs of the coinbase transaction.

+

Consensus rules:

+
    +
  • The remaining value in the transparent transaction value pool of a non-coinbase transaction MUST be nonnegative.
  • +
  • [Pre-NU-X] The remaining value in the transparent transaction value pool of a coinbase transaction MUST be nonnegative.
  • +
  • [NU-X onward] The remaining value in the transparent transaction value pool of a coinbase transaction MUST be zero.
  • +
+
+

where "NU-X" is to be replaced by the designation of the network upgrade in which this ZIP will be activated.

+

Note that the differences in the first two paragraphs of the above replacement text are clarifications of the protocol, rather than consensus changes. Those could be made independently of this ZIP.

+

This change applies identically to Mainnet and Testnet.

+
+

Deployment

+

Subject to community agreement, this ZIP is proposed to be deployed with NU6. 6

+
+

Reference implementation

+

TODO

+
+

Acknowledgements

+

The author would like to thank Jack Grigg and Kris Nuttycombe for discussions leading to the submission of this ZIP.

+
+

References

+
Title
Blocks should balance exactly
Manufacturing Consent; Re-Establishing a Dev Fund for ECC, ZF, ZCG, Qedit, FPF, and ZecHub
Block Reward Allocation for Non-Direct Development Funding
Establishing a Hybrid Dev Fund for ZF, ZCG and a Dev Fund Reserve
228 Asset Swaps for Zcash Shielded Assets Reserved
230 Version 6 Transaction Format Draft
231 Decouple Memos from Transaction Outputs Reserved
236 Blocks should balance exactly Draft
239 Relay of Version 5 Transactions Final
243 Transaction Signature Validation for Sapling Final
244 Transaction Identifier Non-Malleability Final
+ + + + + + +
1Information 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"
+ + + + + + + +
2Zcash Protocol Specification, Version 2023.4.0 or later
+ + + + + + + +
3Zcash Protocol Specification, Version 2023.4.0. Section 3.4: Transactions and Treestates
+ + + + + + + +
4Zcash Protocol Specification, Version 2023.4.0. Section 3.12: Mainnet and Testnet
+ + + + + + + +
5ZIP 200: Network Upgrade Mechanism
+ + + + + + + +
6ZIP 253: Deployment of the NU6 Network Upgrade
+ + + + \ No newline at end of file diff --git a/zips/draft-hopwood-coinbase-balance.rst b/zips/zip-0236.rst similarity index 99% rename from zips/draft-hopwood-coinbase-balance.rst rename to zips/zip-0236.rst index 1c63f12c1..9b672b758 100644 --- a/zips/draft-hopwood-coinbase-balance.rst +++ b/zips/zip-0236.rst @@ -1,6 +1,6 @@ :: - ZIP: XXX + ZIP: 236 Title: Blocks should balance exactly Owners: Daira-Emma Hopwood Credits: Jack Grigg