- Bitcoin & Blockchain/
- P2P Network Overview/
- BCH Specification/
- Historical Upgrades
- May 2023 Upgrade
- Bigger Script Integers
- May 2022 Upgrade
- Native Introspection
- ReverseBytes
- May 2021 Upgrade
- Multiple OP_RETURNs
- Accept more tx in mempool
- ASERT DAA
- November 2020 Upgrade
- May 2020 Upgrade
- SigCheck protection
- November 2019 Upgrade
- MinimalData
- Schnorr multisig
- Segwit Recovery
- May 2019 Upgrade
- Schnorr
- November 2018 Upgrade
- op_checkdatasig
- Schnorr signatures
- May 2018 Upgrade
- Reenable Opcodes
- November 2017 Upgrade
- Bitcoin Cash
- Tx signing digest
- BIP-0157
- BIP-0158
- BIP-0159
- BIP 152
- BIP 133
- BIP 9
- BIP-0112
- BIP-0113
- BIP-0068
- BIP-0066
- BIP-0065
- BIP-0037
- Mempool message
- BIP-0034
- BIP-0016
- Block Versions
- Protocol Versions
- Transaction Versions
Bitcoin Cash Protocol Upgrades
HF-20181115
layout: specification
title: 2018 November 15 Network Upgrade Specification
date: 2018-10-10
category: spec
activation: 1542300000
version: 0.5
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 [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 remain 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 rules to be monotonically increasing.
[2] https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/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.