layout: specification title: 2018 November 15 Network Upgrade Specification date: 2018-10-10 category: spec activation: 1542300000 version: 0.5
When the median time past  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.
New opcodes OP_CHECKDATASIG and OP_CHECKDATASIGVERIFY will be enabled as specified in op_checkdatasig .
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 .
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 .
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 .
Automatic Replay Protection
When the median time past  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 to be equal to 0.
When the median time past  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:
forkid 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.
 Median Time Past is described in bitcoin.it wiki. It is guaranteed by consensus rules to be monotonically increasing.
 Leaf-Node weakness in Bitcoin Merkle Tree Design
 BIP 62
forkId is defined as per the replay protected sighash specification.