ZIP: 251 Title: Deployment of the Canopy Network Upgrade Owners: Daira Hopwood <firstname.lastname@example.org> Status: Final Category: Consensus / Network Created: 2020-02-28 License: MIT
The key words "MUST", "MUST NOT", "SHOULD", and "MAY" in this document are to be interpreted as described in RFC 2119. 1
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 3.
"Canopy" is the code-name for the fifth Zcash network upgrade, also known as Network Upgrade 4.
This proposal defines the deployment of the Canopy network upgrade.
The primary sources of information about Canopy consensus protocol changes are:
The network handshake and peer management mechanisms defined in ZIP 201 6 also apply to this upgrade.
The following network upgrade constants 5 are defined for the Canopy upgrade:
Nodes compatible with Canopy activation on testnet MUST advertise protocol version 170012 or later. Nodes compatible with Canopy activation on mainnet MUST advertise protocol version 170013 or later. The minimum peer protocol version that Canopy-compatible nodes will connect to is 170002.
Pre-Canopy testnet nodes are defined as nodes on testnet advertising a protocol version less than 170012. Pre-Canopy mainnet nodes are defined as nodes on mainnet advertising a protocol version less than 170013.
For each network (testnet and mainnet), approximately 1.5 days (defined in terms of block height) before the corresponding Canopy activation height, nodes compatible with Canopy activation on that network will change the behaviour of their peer connection logic in order to prefer pre-Canopy peers on that network for eviction from the set of peer connections:
/** * The period before a network upgrade activates, where connections to upgrading peers are preferred (in blocks). * This was three days for upgrades up to and including Blossom, and is 1.5 days from Heartwood onward. */ static const int NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD = 1728;
The implementation is similar to that for Overwinter which was described in 6.
Once Canopy activates on testnet or mainnet, Canopy nodes SHOULD take steps to:
Prior to the network upgrade activating on each network, Canopy and pre-Canopy nodes are compatible and can connect to each other. However, Canopy nodes will have a preference for connecting to other Canopy nodes, so pre-Canopy nodes will gradually be disconnected in the run up to activation.
Once the network upgrades, even though pre-Canopy nodes can still accept the numerically larger protocol version used by Canopy as being valid, Canopy nodes will always disconnect peers using lower protocol versions.
Unlike Overwinter and Sapling, and like Blossom and Heartwood, Canopy does not define a new transaction version. Canopy transactions are therefore in the same v4 format as Sapling transactions; use the same version group ID, i.e. 0x892F2085 as defined in 4; and use the same transaction digest algorithm as defined in 12. This does not imply that transactions are valid across the Canopy activation, since signatures MUST use the appropriate consensus branch ID. 12
Support for Canopy on testnet will be implemented in
zcashd version 3.1.0, which will advertise protocol version 170012. Support for Canopy on mainnet will be implemented in
zcashd version 4.0.0, which will advertise protocol version 170013.
|1||RFC 2119: Key words for use in RFCs to Indicate Requirement Levels|
|2||Zcash Protocol Specification, Version 2021.2.16 or later|
|3||Zcash Protocol Specification, Version 2021.2.16. Section 3.12: Mainnet and Testnet|
|4||Zcash Protocol Specification, Version 2021.2.16. Section 7.1: Transaction Encoding and Consensus|
|5||ZIP 200: Network Upgrade Mechanism|
|6||ZIP 201: Network Peer Management for Overwinter|
|7||ZIP 207: Funding Streams|
|8||ZIP 211: Disabling Addition of New Value to the Sprout Value Pool|
|9||ZIP 212: Allow Recipient to Derive Sapling Ephemeral Secret from Note Plaintext|
|10||ZIP 214: Consensus rules for a Zcash Development Fund|
|11||ZIP 215: Explicitly Defining and Modifying Ed25519 Validation Rules|
|12||ZIP 243: Transaction Signature Validation for Sapling|
|13||ZIP 1014: Establishing a Dev Fund for ECC, ZF, and Major Grants|