layout: specification
title: November 13th Bitcoin Cash Hardfork Technical Details
category: spec
date: 2017-11-07
activation: 1510600000
version: 1.3
When the median time past[1] of the most recent 11 blocks (MTP - 11) is greater than or equal to UNIX timestamp 1510600000 Bitcoin Cash will execute a hardfork according to this specification.
Starting from the next block these three consensus rules changes will take effect:
The algorithm for the new difficulty adjustment is described below
To calculate the difficulty of a given block (Bn + 1), with an MTP-11[1] greater than or equal to the unix timestamp 1510600000, perform the following steps:
NOTE: Implementations must use integer arithmetic only
Bn be the Nth block in a Bitcoin Cash Blockchain.Blast be chosen[2] from [Bn - 2, Bn - 1, Bn].Bfirst be chosen[2] from [Bn - 146, Bn - 145, Bn - 144].TS) be equal to the difference in UNIX timestamps (in seconds) between Blast and Bfirst within the range [72 * 600, 288 * 600].W) be equal to the difference in chainwork[3] between Blast and Bfirst.PW) be equal to (W * 600) / TS.T) be equal to the (2256 - PW) / PW. This is calculated by taking the two’s complement of PW (-PW) and dividing it by PW (-PW / PW).Bn + 1 is then equal to the lesser of T and 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF nHeight = 0;
nTime = 1269211443;
nBits = 0x1C0FFFFF;
2049 blocks at 600 second intervals with the same nBits.10 blocks at 600 second intervals. nBits should remain constant.6000 seconds in the future with nBits remaining the same.-4800 seconds from the previous block. nBits should remain the constant.20 blocks at 600 second intervals. nBits should remain constant.550 second interval. nBits should remain constant.10 blocks at 550 second intervals. The target difficulty should slowly decrease.nBits should be 0x1C0FE7B1.20 more blocks at 10 second intervals. The target difficulty decrease quickly.nBits should be 0x1C0DB19F.1 block at an interval of 6000 seconds.nBits should be 0x1C0D9222.93 blocks at 6000 second intervals. The target difficulty should increase.nBits should be 0x1C2F13B9.6000 seconds.nBits should be 0x1C2EE9BF.192 blocks at 6000 second intervals. The target difficulty should increase.nBits should be 0x1D00FFFF.5 blocks at 6000 second intervals. Target should stay constant at the maximum value.Q: Does this imply that if the blocks are timestamped sequentially, the last block has no effect since it will look at the block before that one?
A: Yes
MTP-11 of a block is defined as the median timestamp of the last 11 blocks prior to, and including, a specific block.Given a list:
S = [B<sub>n</sub> - 2, B<sub>n</sub> - 1, B<sub>n</sub>]a. If timestamp (
S<sub>0</sub>) greater than timestamp (S<sub>2</sub>) then swapS<sub>0</sub>andS<sub>2</sub>.b. If timestamp (
S<sub>0</sub>) greater than timestamp (S<sub>1</sub>) then swapS<sub>0</sub>andS<sub>1</sub>.c. If timestamp (
S<sub>1</sub>) greater than timestamp (S<sub>2</sub>) then swapS<sub>1</sub>andS<sub>2</sub>.d. Return
S<sub>1</sub>.See GetSuitableBlock
B.Block proof is defined in chain.cpp