diff --git a/zip-0208.html b/zip-0208.html index 741b8ac41..87b3563ac 100644 --- a/zip-0208.html +++ b/zip-0208.html @@ -180,7 +180,13 @@ static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024; /** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of chainActive.Tip() will not be pruned. */ -static const unsigned int MIN_BLOCKS_TO_KEEP = 288; +static const unsigned int MIN_BLOCKS_TO_KEEP = 288; + +/** + * 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; diff --git a/zip-0208.rst b/zip-0208.rst index 4367f18db..18df47bf1 100644 --- a/zip-0208.rst +++ b/zip-0208.rst @@ -328,7 +328,6 @@ account of cases where the time period that needs to be estimated crosses Blosso activation. - Other block-related constants ''''''''''''''''''''''''''''' @@ -351,6 +350,12 @@ decision was made not to change them:: /** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of chainActive.Tip() will not be pruned. */ static const unsigned int MIN_BLOCKS_TO_KEEP = 288; + /** + * 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; + Deployment ========== diff --git a/zip-0250.html b/zip-0250.html index a651b7943..d309b0766 100644 --- a/zip-0250.html +++ b/zip-0250.html @@ -51,9 +51,12 @@
Nodes compatible with Heartwood activation on testnet MUST advertise protocol version 170010 or later. Nodes compatible with Heartwood activation on mainnet MUST advertise protocol version 170011 or later. The minimum peer protocol version that Heartwood-compatible nodes will connect to is 170002.
Pre-Heartwood testnet nodes are defined as nodes on testnet advertising a protocol version less than 170010. Pre-Heartwood mainnet nodes are defined as nodes on mainnet advertising a protocol version less than 170011.
-For each network (testnet and mainnet), approximately three days (defined in terms of block height) before the corresponding Heartwood activation height, nodes compatible with Heartwood activation on that network will change the behaviour of their peer connection logic in order to prefer pre-Heartwood 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;+
For each network (testnet and mainnet), approximately 1.5 days (defined in terms of block height) before the corresponding Heartwood activation height, nodes compatible with Heartwood activation on that network will change the behaviour of their peer connection logic in order to prefer pre-Heartwood 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 4.
Once Heartwood activates on testnet or mainnet, Heartwood nodes SHOULD take steps to:
Nodes compatible with ${NU4} activation on testnet MUST advertise protocol version TODO or later. Nodes compatible with ${NU4} activation on mainnet MUST advertise protocol version TODO or later. The minimum peer protocol version that ${NU4}-compatible nodes will connect to is 170002.
Pre-${NU4} testnet nodes are defined as nodes on testnet advertising a protocol version less than TODO. Pre-${NU4} mainnet nodes are defined as nodes on mainnet advertising a protocol version less than TODO.
-For each network (testnet and mainnet), approximately three days (defined in terms of block height) before the corresponding ${NU4} activation height, nodes compatible with ${NU4} activation on that network will change the behaviour of their peer connection logic in order to prefer pre-${NU4} 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;+
For each network (testnet and mainnet), approximately 1.5 days (defined in terms of block height) before the corresponding ${NU4} activation height, nodes compatible with ${NU4} activation on that network will change the behaviour of their peer connection logic in order to prefer pre-${NU4} 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 4.
Once ${NU4} activates on testnet or mainnet, ${NU4} nodes SHOULD take steps to: