网赚论坛

 找回密码
 免费注册
查看: 3000|回复: 0
打印 上一主题 下一主题

BCH的硬分叉升级内容

[复制链接]

17

主题

28

帖子

68

积分

Ⅰ级财主

Rank: 1

积分
68
跳转到指定楼层
楼主
发表于 2018-11-25 16:13:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Summary

When the median time past [1] of the most recent 11 blocks (MTP-11) is greater than or equal to UNIX timestamp 1542300000, Bitcoin Cash will execute an upgrade of the network consensus rules according to this specification. Starting from the next block these consensus rules changes will take effect:

Remove topological transaction order constraint, and enforce canonical transaction order
Enable OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY opcodes
Enforce minimum transaction size
Enforce "push only" rule for scriptSig
Enforce "clean stack" rule
The following are not consensus changes, but are recommended changes for Bitcoin Cash implementations:

Automatic replay protection for future upgrade
Canonical Transaction Order

With the exception of the coinbase transaction, transactions within a block MUST be sorted in numerically ascending order of the transaction id, interpreted as 256-bit little endian integers. The coinbase transaction MUST be the first transaction in a block.

OpCodes

New opcodes OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY will be enabled as specified in op_checkdatasig.md [2].

Minimum Transaction Size

Transactions that are smaller than 100 bytes shall be considered invalid. This protects against a Merkle tree vulnerability that allows attackers to spoof transactions against SPV wallets [3].

Push Only

Transactions shall be considered invalid if an opcode with number greater than 96 (hex encoding 0x60) appears in a scriptSig. This is the same as Bitcoin BIP 62 rule #2 [4].

Clean Stack

For a transaction to be valid, only a single non-zero item must remaing on the stack upon completion of Script evaluation. If any extra data elements remain on the stack, the script evaluates to false. This is the same as Bitcoin BIP 62 rule #6 [4].

Automatic Replay Protection

When the median time past [2] of the most recent 11 blocks (MTP-11) is less than UNIX timestamp 1557921600 (May 2019 upgrade) Bitcoin Cash full nodes MUST enforce the following rule:

forkid [5] to be equal to 0.
When the median time past [1] of the most recent 11 blocks (MTP-11) is greater than or equal to UNIX timestamp 1557921600 (May 2019 upgrade) Bitcoin Cash full nodes implementing the November 2018 consensus rules SHOULD enforce the following change:

Update forkid [5] to be equal to 0xFF0001. ForkIDs beginning with 0xFF will be reserved for future protocol upgrades.
This particular consensus rule MUST NOT be implemented by Bitcoin Cash wallet software. Wallets that follow the upgrade should not have to change anything.

References

[1] Median Time Past is described in bitcoin.it wiki. It is guaranteed by consensus trules to be monotonically increasing.

[2] https://github.com/bitcoincashor ... /op_checkdatasig.md

[3] Leaf-Node weakness in Bitcoin Merkle Tree Design

[4] BIP 62

[5] The forkId is defined as per the replay protected sighash specification.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

广告合作|Archiver|手机版|小黑屋|财富吧

GMT+8, 2024-12-25 20:52 , Processed in 0.499201 second(s), 35 queries , Gzip On.

Powered by Discuz! X3.1

© 2014-2021 财富吧

快速回复 返回顶部 返回列表