Skip to content

Commit

Permalink
ZIPs 208, 250 and 251: keep `NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PE…
Browse files Browse the repository at this point in the history
…RIOD` the same

in terms of blocks, but it represents 1.5 days for the Heartwood upgrade onward.

Signed-off-by: Daira Hopwood <[email protected]>
  • Loading branch information
daira committed Mar 27, 2020
1 parent 90ab3de commit 7445069
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 14 deletions.
8 changes: 7 additions & 1 deletion zip-0208.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;</pre>
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;</pre>
</section>
</section>
</section>
Expand Down
7 changes: 6 additions & 1 deletion zip-0208.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ account of cases where the time period that needs to be estimated crosses Blosso
activation.



Other block-related constants
'''''''''''''''''''''''''''''

Expand All @@ -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
==========
Expand Down
9 changes: 6 additions & 3 deletions zip-0250.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@
</dl>
<p>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.</p>
<p>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.</p>
<p>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:</p>
<pre>/** 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;</pre>
<p>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:</p>
<pre>/**
* 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;</pre>
<p>The implementation is similar to that for Overwinter which was described in <a id="id11" class="footnote_reference" href="#zip-0201">4</a>.</p>
<p>Once Heartwood activates on testnet or mainnet, Heartwood nodes SHOULD take steps to:</p>
<ul>
Expand Down
9 changes: 6 additions & 3 deletions zip-0250.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,17 @@ Pre-Heartwood testnet nodes are defined as nodes on testnet advertising a protoc
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
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). */
static const int NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD = 24 * 24 * 3;
/**
* 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
[#zip-0201]_.
Expand Down
9 changes: 6 additions & 3 deletions zip-0251.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@
</dl>
<p>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.</p>
<p>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.</p>
<p>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:</p>
<pre>/** 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;</pre>
<p>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:</p>
<pre>/**
* 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;</pre>
<p>The implementation is similar to that for Overwinter which was described in <a id="id12" class="footnote_reference" href="#zip-0201">4</a>.</p>
<p>Once ${NU4} activates on testnet or mainnet, ${NU4} nodes SHOULD take steps to:</p>
<ul>
Expand Down
9 changes: 6 additions & 3 deletions zip-0251.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,17 @@ 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
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). */
static const int NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD = 24 * 24 * 3;
/**
* 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
[#zip-0201]_.
Expand Down

0 comments on commit 7445069

Please sign in to comment.