ZIP: 206 Title: Deployment of the Blossom Network Upgrade Owners: Daira Hopwood <[email protected]> Credits: Simon Liu Status: Final Category: Consensus / Network Created: 2019-07-29 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. [3]
The terms below are to be interpreted as follows:
- Blossom
- Code-name for the third Zcash network upgrade, also known as Network Upgrade 2.
- Testnet
- The Zcash test network, as defined in [2].
- Mainnet
- The Zcash production network, as defined in [2].
This proposal defines the deployment of the Blossom network upgrade.
The primary sources of information about Blossom consensus protocol changes are:
- The Zcash Protocol Specification [2].
- Shorter Block Target Spacing [5].
- Network Upgrade Activation Mechanism [3].
The network handshake and peer management mechanisms defined in [4] also apply to this upgrade.
The following network upgrade constants [3] are defined for the Blossom upgrade:
- CONSENSUS_BRANCH_ID
0x2BB40E60
- ACTIVATION_HEIGHT (Blossom)
Testnet: 584000
Mainnet: 653600
Nodes compatible with Blossom activation on testnet MUST advertise protocol version 170008 or later. Nodes compatible with Blossom activation on mainnet MUST advertise protocol version 170009 or later. The minimum peer protocol version that Blossom-compatible nodes will connect to is 170002.
Pre-Blossom testnet nodes are defined as nodes on testnet advertising a protocol version less than 170008. Pre-Blossom mainnet nodes are defined as nodes on mainnet advertising a protocol version less than 170009.
For each network (testnet and mainnet), approximately three days (defined in terms of block height) before the corresponding Blossom activation height, nodes compatible with Blossom activation on that network will change the behaviour of their peer connection logic in order to prefer pre-Blossom 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). */ static const int NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD = 24 * 24 * 3;
The implementation is similar to that for Overwinter which was described in [4].
Once Blossom activates on testnet or mainnet, Blossom nodes SHOULD take steps to:
- reject new connections from pre-Blossom nodes on that network;
- disconnect any existing connections to pre-Blossom nodes on that network.
Prior to the network upgrade activating on each network, Blossom and pre-Blossom nodes are compatible and can connect to each other. However, Blossom nodes will have a preference for connecting to other Blossom nodes, so pre-Blossom nodes will gradually be disconnected in the run up to activation.
Once the network upgrades, even though pre-Blossom nodes can still accept the numerically larger protocol version used by Blossom as being valid, Blossom nodes will always disconnect peers using lower protocol versions.
Unlike Overwinter and Sapling, Blossom does not define a new transaction version. Blossom transactions are therefore in the same v4 format as Sapling transactions, and use the same version group ID, i.e. 0x892F2085 as defined in [2] section 7.1. This does not imply that transactions are valid across the Blossom activation, since signatures MUST use the appropriate consensus branch ID.
Support for Blossom on testnet is implemented in zcashd
version 2.0.7, which
advertises protocol version 170008. Support for Blossom on mainnet is implemented
in zcashd
version 2.1.0, which advertises protocol version 170009.
[1] | RFC 2119: Key words for use in RFCs to Indicate Requirement Levels |
[2] | (1, 2, 3, 4) Zcash Protocol Specification, Version 2020.1.15 or later |
[3] | (1, 2, 3) ZIP 200: Network Upgrade Activation Mechanism |
[4] | (1, 2) ZIP 201: Network Peer Management for Overwinter |
[5] | ZIP 208: Shorter Block Target Spacing |