BUIP061: Demonstration of Phase in Full Network Upgrade Activated by Miners
Proposer: LIN Zheming
Submitted on: 2017-06-13
Status: draft


Summary

This idea was not created by an individual but is a product of
collaboration in the Chinese bitcoin community between different
interest groups.

This method is put forth to incentivize and to protect mining nodes and
non-mining nodes during protocol upgrading. With this incentive
mechanism, the non-mining nodes will not suffer monetary loss from chain
splitting.

After the activation condition is met, majority miners will set a new
block versionbits after the first grace period(a difficulty change of
2016 blocks). The blocks with lower versionbits will be orphaned. In
terms of the Nakamoto Consensus, the end of the first grace period will
force all mining nodes upgraded to signal a new version of consensus.
After the second grace period ( a difficulty change of 2016 blocks),
mining nodes will only accept transactions with new versionbits.
Transactions from nodes not upgrading will not be relayed nor included
in blocks with new versionbits. This will protect funds of non-mining
nodes from utilizing replay attack and will function as a notification
nodes will vote to activate the protocol upgrade and this will achieve

The protocol upgrade depends on its activate condition independently
even after the change deployed among nodes.

Motivation

In view of the fact that the original Bitcoin consensus did not consider
the non-mining wallet nodes(as mentioned above), the result is that
upgrading the consensus of these wallet nodes is passive and lazy. When
there is disagreement in the direction of the upgrade, the miners have
no mechanism to ensure that the chain being extended is the chain widely
accepted by the wallet nodes. This also adversely affects the security
of the wallet nodes.

Apart from ensuring the asset security of wallet nodes, this method can
be used to provide additional incentives to upgrade the protocol for the
wallet nodes. Once the wallet nodes upgrade their protocol, the miners’
nodes can be guaranteed to work - not only on the longest chain, but
also on the longest chain used by other wallet nodes in the broader
bitcoin sphere. Under the Nakamoto Consensus, there will be no
persistent forks as protocol upgrades can be phased in.

Proposal

1. 挖矿节点将使用 versionbits 版本位来定义支持信号。BUIP

2. 挖矿节点将使用 tx version 来定义当前的交易版本。当前的 tx version 是
1，将允许 tx version 为 2 的交易，并在第二个宽限期之后，使 tx version 为
1 的交易非法。
3. 在可选的第四阶段时，可以重新允许 tx version 是 1 的交易。

1. Mining nodes signal by setting a version bit. While this BUIP is
active, all blocks must set the chosen nVersion.
2. Mining nodes will use tx version to define current version
transactions. Current tx version is 1, and tx version 2 will be allowed.
After the second grace period, tx version 1 will be regarded as
invalid.
3. TX version 1 can be re-enable in fourth stage described below.

Protocol upgrading will phase in over three stages. We can have an
optional fourth stage to integrate codes of protocol upgrade.

1. 信号阶段。挖矿节点使用 versionbits 发送支持信号。挖矿节点在监测到 55%
的区块即前 1109/2016 个区块均发送了相同的支持信号，进入下一阶段。
2. 矿工节点升级。经过了第一个宽限期 2016 的区块后，且总信号区块超过了
2218/4032，就开始使用新的区块版本打包区块，并同时开始孤立旧版本。此时所有节点和钱包，将可以使用新版本号发送交易，同时兼容旧版本号交易。
3. 钱包节点升级。在挖矿节点监测到第二个宽限期 4032
个连续的新版本的区块后，开始拒绝旧版本号的交易，只打包／转播新版本号的交易。同时将从内存池中删除旧版本号的交易。

（可选的）协议升级。在第三阶段中包含有第四阶段的升级代码。当我们确保钱包节点升级到支持新版本交易后，必然包含了第四阶段的升级代码。则此时可以通过矿工节点投票的方式完成全网络的协议升级。

1. Signal stage: Mining nodes signal using BIP9. The next stage will be
activated after 55% (1109) of 2016 blocks has the signal.
2. Mining nodes upgrade stage: After a first grace period of 2016 blocks
and total signalling blocks passed 2218 of 4032 blocks, miners
blocks with old versionbits. At this stage all nodes can send
transactions with new versionbits, and transactions with old versionbits
will be compatible.
3. Non-mining nodes upgrade stage: after 4032 continuous blocks with new
versionbits, mining nodes will start to refuse transactions with old
versionbits. Only transactions with new versionbits can be relayed and
included in blocks. Transactions with old versionbits can be safely
purged from memory pools.
4. (Optional)Protocol Upgrade stage: The codes dealing with protocol
upgrade can be integrated in the third stage. After the non-mining nodes
protocol upgrade must be included and now we can use miner vote to

At this point, the protocol upgrade have phased in.

Benefits

1. 仅需要多数的矿工发信号后即可激活。在中本聪的比特币论文中，99.9%

51% 后，挖矿节点将迅速的在第一个宽限期内进行升级。
2. 在两个宽限期内，钱包节点交易不受影响，有足够的时间升级钱包软件。
3. 版本信息包含在 block header 中，并不影响 SPV

4.

5.

6.

1. The activation only requires majority miners signal. As described in
the paper by Satoshi Nakamoto, 55% miners will be in the longest chain
after 340 blocks, with 99.9% certainty. This will minimize the
possibility of delaying network upgrades by controlling a small number
of hashing power. We can foresee that after 51% signalling, all miners
will upgrade within the first grace period.
2. During the first two grace periods, non-mining nodes will not be
affected. They have enough time to upgrade their software.
3. Versionbits included in block header, not influencing the SPY
mining.
4. After two grace periods, all nodes must be upgraded. Otherwise they
cannot send transactions or get any confirmations. Compared with forming
new consensus among nodes, the situation is not worse than before.
5. The ledger in non-mining wallet nodes is honored and reserved. Users
of off-chain wallet services can decide whether or not to follow the
service providers after they got the public notification from the
service providers.
6. Protocol upgrades in the future can be bonded with the upgrades of
nodes, and the upgrades activate through miners vote independently.
There would be enough time for nodes to be upgraded in order to support
new protocols. Even in case of failing in miner activation, the
situation will not worsen and the status quo will remain.

Risks

1.

2.

3.

4.

1. The fluctuation of the hashing power will affect the result of the
longest chain. Higher activating requirement means a lower risk of
temporary fork.
2. Miners could simply signal to avoid being orphaned, but from the
perspective of non-mining wallet nodes, they can’t distinguish the false
signal from the true signal. They must upgrade with the assumption that
the signals are all true. After all the non-mining nodes have upgraded,
the miners signalling false signal should follow.
3. Non-mining wallet nodes could false signal without supporting the new
protocol but since the total number of nodes cannot be distinguished,
genuine nodes should follow the proven result provided by miners vote.
4. Miners and non-mining nodes could conspire to fork using old protocol
consensus. It can’t be eliminated, just like in the past but through
most passive non-mining nodes being upgraded, their benefit is
reduced.

___TBD___