feat(dataset): admit 363731, the first block of the July 2015 fork - #8
Merged
Merged
Conversation
A version-2 header six blocks after BIP66 enforcement, rejected with bad-version. The header comes from a blockchain.info dump preserved as a BTC Relay test fixture; its 99 txids reproduce the merkle root and its coinbase fields reserialise to the authenticated coinbase txid, which ties the recorded scriptSig to the header. The payout address is listed for BTC Nuggets in mining-pools, so the pool is attributed by address.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Block 363731 is a version-2 header mined six blocks after BIP66 made version 3 mandatory at 363725, so Core rejects it with
bad-version. It is the block that started the 4 July 2015 fork: the fixture's other five headers, all version 3, chain from it through 363736 before the network reorganized away from them, and the SPV-mining alert followed. Those five descendants fail by ancestry only and are not recorded. This adds the one record under the existingbip66_block_version_below_3rule; no validator change is needed.The 80-byte header comes from a blockchain.info block dump that survives in a BTC Relay test fixture alongside the fork's six raw headers, with an independent copy of the same field set in a TypeScript port. Two checks tie the dump to the header. Its 99 transaction IDs, in the dump's order, reproduce the header's merkle root. Its coinbase fields (scriptSig, sequence, output value and script, version, locktime) reserialize to a transaction whose ID is the first of those 99, so the recorded
coinbase_scriptsig_hexis authenticated to the header rather than copied from a page. The scriptSig's BIP34 push decodes to 363731, and the parent is canonical 363730, whose nBits1816418ethe record carries asexpected_nbits.The coinbase pays
1BwZeHJo7b7M2op7VDfYnsmcpXsUYEcVHm, which mining-pools lists for BTC Nuggets; the scriptSig itself carries only/P2SH/and/stratumPool/. The record therefore usespool_basis: address, the field #7 added. The single observation is ascrapefrom blockchain.com with the pinned fixture as provenance; a second copy of the same field set in another BTC Relay port is not an independent observer and is not recorded. A short incident note indocs/notes.mdrecords the fork, the provenance chain and the March 2017 bitcoin-dev message that lists this hash amongbad-version(0x00000002)rejections.Testing
python -m unittest discover -s ci -p 'test_*.py'passes all 32 tests, and offlinepython ci/sanity-check.pyreports 48 blocks, 48 contexts, 191 observations and 6 block files. The header was re-decoded from the fixture's6headers.bin(offset 0) with python-bitcoinlib: hash0000000000000000009cc829aa25b40b2cd4eb83dd498c12ad0d26d90c439d99, version 2, nTime 1435975780, nBits1816418e, and the local fixture bytes match GitHub blobbc8ae992at the pinned commit. mempool.space reports000000000000000006a320d752b46b532ec0f3f815c5dae467aff5715a6e579eat height 363730 with the same nBits. The merkle-root and coinbase re-derivations above were run against the pinned JSON (233,406 bytes).Related
The fork is documented on the Bitcoin wiki's July 2015 chain forks page, which lists the six block hashes and attributes 363731 to BTC Nuggets, and in the 4 July 2015 SPV-mining alert. A 16 March 2017 bitcoin-dev message lists this hash among blocks a node rejected with
bad-version(0x00000002), alongside the hashes of 363726 and 363967 already in the dataset.