May 15, 2018 · activated · block 530,356
May 2018: 32 MB blocks and restored opcodes
Raised the block size limit to 32 MB and re-enabled OP_CAT, OP_SPLIT, bitwise AND/OR/XOR, OP_DIV, OP_MOD, OP_NUM2BIN and OP_BIN2NUM.
What changed
This upgrade activated when the median time past reached Unix time 1526400000
(15 May 2018, 16:00 UTC). The first block under the new rules is height 530,356.
Consensus changes:
- Block size limit: 32 MB (32,000,000 bytes), up from 8 MB.
- Nine opcodes restored or added. Bitcoin disabled many opcodes in 2010–2011 after serious bugs. This upgrade
brought back a reviewed, redesigned set:
- Splice:
OP_CATandOP_SPLIT.OP_SPLITis new; it replaces the oldOP_SUBSTR,OP_LEFTandOP_RIGHT. - Bitwise:
OP_AND,OP_OR,OP_XOR. - Arithmetic:
OP_DIV,OP_MOD. - Conversion (new):
OP_NUM2BINandOP_BIN2NUM.
- Splice:
Recommended policy (not consensus) changes:
OP_RETURNdata outputs may carry up to 223 bytes in total.- Automatic replay protection for the next upgrade, as a way to retire old node versions.
Why
Blocks on BCH were far from full, but the 8 MB limit was a fixed ceiling. Raising it to 32 MB kept plenty of headroom while node software was optimised further.
The opcode work was about Script itself. The spec says the goal was to “restore the functionality” these opcodes provided, not to copy the old versions. Each opcode was re-examined, and some were redesigned.
What it enables
- String handling in scripts.
OP_CATandOP_SPLITlet a script build and take apart byte strings. This is the base for later tricks like checking parts of a signed message. - Real arithmetic. Division and modulo let contracts compute shares, fees and ratios.
- Number/byte conversion.
OP_NUM2BINandOP_BIN2NUMlet scripts move between numbers and fixed-width bytes. - More room for data. The 223-byte
OP_RETURNallowance gave on-chain data protocols more space per transaction.
Many of the ideas Bitcoin (BTC) still debates, like OP_CAT, have run on BCH since this upgrade.