Skip to content

Commit 5161601

Browse files
author
Robert Spigler
authored
Merge pull request bitcoin#2 from bitcoin/master
Update local
2 parents 333fc69 + dacd6a2 commit 5161601

File tree

9 files changed

+567
-98
lines changed

9 files changed

+567
-98
lines changed

README.mediawiki

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,13 @@ Those proposing changes should consider that ultimately consent may rest with th
994994
| Pieter Wuille
995995
| Standard
996996
| Draft
997+
|-
998+
| [[bip-0370.mediawiki|370]]
999+
| Applications
1000+
| PSBT Version 2
1001+
| Andrew Chow
1002+
| Standard
1003+
| Draft
9971004
|}
9981005

9991006
<!-- IMPORTANT! See the instructions at the top of this page, do NOT JUST add BIPs here! -->

bip-0002.mediawiki

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ A BIP may only change status from Draft (or Rejected) to Proposed, when the auth
192192

193193
BIPs should be changed from Draft or Proposed status, to Rejected status, upon request by any person, if they have not made progress in three years. Such a BIP may be changed to Draft status if the champion provides revisions that meaningfully address public criticism of the proposal, or to Proposed status if it meets the criteria required as described in the previous paragraph.
194194

195-
An Proposed BIP may progress to Final only when specific criteria reflecting real-world adoption has occurred. This is different for each BIP depending on the nature of its proposed changes, which will be expanded on below. Evaluation of this status change should be objectively verifiable, and/or be discussed on the development mailing list.
195+
A Proposed BIP may progress to Final only when specific criteria reflecting real-world adoption has occurred. This is different for each BIP depending on the nature of its proposed changes, which will be expanded on below. Evaluation of this status change should be objectively verifiable, and/or be discussed on the development mailing list.
196196

197197
When a Final BIP is no longer relevant, its status may be changed to Replaced or Obsolete (which is equivalent to Replaced). This change must also be objectively verifiable and/or discussed.
198198

@@ -326,7 +326,7 @@ For example, a preamble might include the following License header:
326326
327327
In this case, the BIP text is fully licensed under both the OSI-approved BSD 2-clause license as well as the GNU All-Permissive License, and anyone may modify and redistribute the text provided they comply with the terms of *either* license. In other words, the license list is an "OR choice", not an "AND also" requirement.
328328

329-
It is also possible to license source code differently from the BIP text. A optional License-Code header is placed after the License header. Again, each license must be referenced by their respective abbreviation given below.
329+
It is also possible to license source code differently from the BIP text. An optional License-Code header is placed after the License header. Again, each license must be referenced by their respective abbreviation given below.
330330

331331
For example, a preamble specifying the optional License-Code header might look like:
332332

bip-0008.mediawiki

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Each soft fork deployment is specified by the following per-chain parameters (fu
3939
# The '''startheight''' specifies the height of the first block at which the bit gains its meaning.
4040
# The '''timeoutheight''' specifies a block height at which the miner signalling ends. Once this height has been reached, if the soft fork has not yet locked in (excluding this block's bit state), the deployment is considered failed on all descendants of the block.
4141
# The '''threshold''' specifies the minimum number of block per retarget period which indicate lock-in of the soft fork during the subsequent period.
42+
# The '''minimum_activation_height''' specifies the height of the first block at which the soft fork is allowed to become active.
4243
# The '''lockinontimeout''' boolean if set to true, blocks are required to signal in the final period, ensuring the soft fork has locked in by timeoutheight.
4344
4445
===Selection guidelines===
@@ -47,15 +48,16 @@ The following guidelines are suggested for selecting these parameters for a soft
4748

4849
# '''name''' should be selected such that no two softforks, concurrent or otherwise, ever use the same name. For deployments described in a single BIP, it is recommended to use the name "bipN" where N is the appropriate BIP number.
4950
# '''bit''' should be selected such that no two concurrent softforks use the same bit. The bit chosen should not overlap with active usage (legitimately or otherwise) for other purposes.
50-
# '''startheight''' should be set to some block height in the future when a majority of economic activity is expected to have upgraded to a software release including the activation parameters. Some allowance should be made for potential release delays. It should be rounded up to the next height which begins a retarget period for simplicity.
51+
# '''startheight''' should be set to some block height in the future. It should be rounded up to the next height which begins a retarget period for simplicity. If '''minimum_activation_height''' is not going to be set, then '''startheight''' should be set to a height when a majority of economic activity is expected to have upgraded to software including the activation parameters. Some allowance should be made for potential release delays. If '''minimum_activation_height''' is going to be set, then '''startheight''' can be set to be soon after software with parameters is expected to be released. This shifts the time for upgrading from before signaling begins to during the LOCKED_IN state.
5152
# '''timeoutheight''' should be set to a block height when it is considered reasonable to expect the entire economy to have upgraded by, probably at least 1 year, or 52416 blocks (26 retarget intervals) after '''startheight'''.
5253
# '''threshold''' should be 1815 blocks (90% of 2016), or 1512 (75%) for testnet.
54+
# '''minimum_activation_height''' should be set to several retarget periods in the future if the '''startheight''' is to be very soon after software with parameters is expected to be released. '''minimum_activation_height''' should be set to a height when a majority of economic activity is expected to have upgraded to software including the activation parameters. This allows more time to be spent in the LOCKED_IN state so that nodes can upgrade. This may be set to 0 to have the LOCKED_IN state be a single retarget period.
5355
# '''lockinontimeout''' should be set to true for any softfork that is expected or found to have political opposition from a non-negligible percent of miners. (It can be set after the initial deployment, but cannot be cleared once set.)
5456
5557
A later deployment using the same bit is possible as long as the startheight is after the previous one's
5658
timeoutheight or activation, but it is discouraged until necessary, and even then recommended to have a pause in between to detect buggy software.
5759

58-
'''startheight''' and '''timeoutheight''' must be an exact multiple of 2016 (ie, at a retarget boundary), and '''timeoutheight''' must be at least 4096 blocks (2 retarget intervals) after '''startheight'''.
60+
'''startheight''', '''timeoutheight''', and '''minimum_activation_height''' must be an exact multiple of 2016 (ie, at a retarget boundary), and '''timeoutheight''' must be at least 4096 blocks (2 retarget intervals) after '''startheight'''.
5961

6062
===States===
6163

@@ -64,8 +66,8 @@ With each block and soft fork, we associate a deployment state. The possible sta
6466
# '''DEFINED''' is the first state that each soft fork starts out as. The genesis block is by definition in this state for each deployment.
6567
# '''STARTED''' for blocks at or beyond the startheight.
6668
# '''MUST_SIGNAL''' for one retarget period prior to the timeout, if LOCKED_IN was not reached and '''lockinontimeout''' is true.
67-
# '''LOCKED_IN''' for one retarget period after the first retarget period with STARTED (or MUST_SIGNAL) blocks of which at least threshold have the associated bit set in nVersion.
68-
# '''ACTIVE''' for all blocks after the LOCKED_IN retarget period.
69+
# '''LOCKED_IN''' for at least one retarget period after the first retarget period with STARTED (or MUST_SIGNAL) blocks of which at least threshold have the associated bit set in nVersion. A soft fork remains in LOCKED_IN until at least '''minimum_activation_height''' is reached.
70+
# '''ACTIVE''' for all blocks after the LOCKED_IN state.
6971
# '''FAILED''' for all blocks after the timeoutheight if LOCKED_IN is not reached.
7072
7173
===Bit flags===
@@ -93,7 +95,8 @@ During the MUST_SIGNAL phase, if '''(2016 - threshold)''' blocks in the retarget
9395

9496
<img src="bip-0008/states.png" align="middle"></img>
9597

96-
Note that when '''lockinontimeout''' is true, the LOCKED_IN state will be reached no later than at a height of '''timeoutheight''', and ACTIVE will be reached no later than at a height of '''timeoutheight + 2016'''.
98+
Note that when '''lockinontimeout''' is true, the LOCKED_IN state will be reached no later than at a height of '''timeoutheight'''.
99+
Regardless of the value of '''lockinontimeout''', if LOCKED_IN is reached, ACTIVE will be reached either one retarget period later, or at '''minimum_activation_height''', whichever comes later.
97100

98101
The genesis block has state DEFINED for each deployment, by definition.
99102

@@ -153,10 +156,14 @@ If we have finished a period of MUST_SIGNAL, we transition directly to LOCKED_IN
153156
case MUST_SIGNAL:
154157
return LOCKED_IN;
155158
156-
After a retarget period of LOCKED_IN, we automatically transition to ACTIVE.
159+
After at least one retarget period of LOCKED_IN, we automatically transition to ACTIVE if the minimum activation height is reached. Otherwise LOCKED_IN continues.
157160

158161
case LOCKED_IN:
159-
return ACTIVE;
162+
if (block.height >= minimum_activation_height) {
163+
return ACTIVE;
164+
} else {
165+
return LOCKED_IN;
166+
}
160167
161168
And ACTIVE and FAILED are terminal states, which a deployment stays in once they're reached.
162169

bip-0008/states.dot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ digraph {
77
"DEFINED" -> "STARTED" [label="height >= start_height"];
88
"STARTED" -> "MUST_SIGNAL" [label="height + 2016 >= timeoutheight AND lockinontimeout"];
99
"STARTED" -> "FAILED" [label="height >= timeoutheight\nAND\nNOT lockinontimeout"];
10-
"LOCKED_IN" -> "ACTIVE" [label="always"];
10+
"LOCKED_IN" -> "ACTIVE" [label="height >= minimum_activation_height"];
11+
"LOCKED_IN":se -> "LOCKED_IN":ne [label="height < minimum_activation_height"];
1112
"MUST_SIGNAL" -> "LOCKED_IN" [label="always"];
1213

1314
edge [weight = 1];

bip-0008/states.png

14.1 KB
Loading

0 commit comments

Comments
 (0)