From BIP66:
The brand new guidelines are in impact for each block (at top H) with nVersion = 3 and a minimum of 750 out of 1000 blocks previous it (with heights H-1000..H-1) even have nVersion = 3. Moreover, when 950 out of the 1000 blocks previous a block do have nVersion = 3, nVersion = 2 blocks grow to be invalid, and all additional blocks implement the brand new guidelines.
I wrote this script to observe the variety of the final 1000 blocks which have nVersion set to three.
require_once 'jsonRPCClient.php';
$daemon = new jsonRPCClient('http://{my_user}:{my_password}@127.0.0.1:8332/');
$blkStart = 364136 - (24 * 14 * 6);
$ver3InLast1000 = 0;
for ($i = $blkStart;; $i++) {
attempt {
$blockHashOld = $daemon->getblockhash($i-1000);
$blockHashNew = $daemon->getblockhash($i);
$blockOld = $daemon->getblock($blockHashOld);
$blockNew = $daemon->getblock($blockHashNew);
} catch(Exception $e) {
break;
}
// Do not wish to begin subtracting till have processed 1000 blocks
if ($blockOld["version"] == 3 && ($i - $blkStart >= 1000)) {
$ver3InLast1000--;
}
if ($blockNew["version"] == 3) {
$ver3InLast1000++;
}
if ($i - $blkStart >= 1000) {
echo "$i, $ver3InLast1000n";
}
}
The end result may be present in this pastebin.
Block quantity 363724 is the block that turned on nVersion=3 enforcement for all additional blocks.