Skip to content

Commit

Permalink
test: drop genesis block from blockheader_testnet3
Browse files Browse the repository at this point in the history
bitcoin#25404 introduces a 10 point penalty for remitting more than
MAX_BLOCKS_TO_ANNOUNCE unconnected block headers. Whether they are
connected or not is determined by taking the first entry and running
its hashPrevBlock through LookupBlockIndex. This new behaviour causes a
test failure in p2p_dos_header_tree.py in Dash.

Bitcoin doesn't face a test failure with this new behaviour as the first
non-fork block in its test data is the dump for block 1 (00000000b873e7
9784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206) but Dash uses block
0 (00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c),
the genesis block.

By definition of a genesis block, it has a hashPrevBlock of 0, which
cannot be looked up. This trips the penalty. This doesn't cause any
problems in the field as nobody is expected to ever broadcast the
genesis block but it does cause a test failure for us.

We need to correct that by getting rid of the genesis block from the
test data.
  • Loading branch information
kwvg authored and PastaPastaPasta committed Jul 31, 2024
1 parent f3d857b commit 679c422
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion test/functional/data/blockheader_testnet3.hex
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
fork:000000202cbcf83b62913d56f605c0e581a48872839428c92e5eb76cd7ad94bcaf0b0000c41f893a0d296b3b17730b42beb432aedc62473d0e6839910209d7f21af31a9bb9968054ffff0f1efd6b0e00
fork:000000201ed4bb12db90cfb7c68051d82f922b86b24c6a247de6168678c9a489ef020000e5968c16ea68f5f8d6ce1f1a987a7484986710c7cae2ac81ca1b5552f059aeceba968054f0ff0f1ef38f0c00
010000000000000000000000000000000000000000000000000000000000000000000000c762a6567f3cc092f0684bb62b7e00a84890b990f07cc71a6bb58d64b98e02e0dee1e352f0ff0f1ec3c927e6
020000002cbcf83b62913d56f605c0e581a48872839428c92e5eb76cd7ad94bcaf0b00007f11dcce14075520e8f74cc4ddf092b4e26ebd23b8d8665a1ae5bfc41b58fdb4c3a95e53ffff0f1ef37a0000
02000000c108f2910109954fcdec2f962f1a9094be266cb6aeaae37b345e63247d0400004d29e4f9b2e05a9ac97dd5ae4128b3c0104bdc95aabaa566cc8eeb682e336d0dc4a95e53f0ff0f1e7b190000
02000000c2cc6fa3fe4d9fb73476bc3cf02248aa762af4960399232dbab4fa64620c000058968247522cc488db01996de610d6f3b8c348e748198dc528a305941211c71cc6a95e53f0ff0f1ecacf0000
Expand Down

0 comments on commit 679c422

Please sign in to comment.