gcash / bchd

An alternative full node bitcoin cash implementation written in Go (golang)
ISC License
280 stars 101 forks source link

rejected block #513

Closed chappjc closed 2 years ago

chappjc commented 2 years ago

During an IBD on testnet4, a recent block gets rejected:

2022-09-09 17:53:46.616 [INF] SYNC: Rejected block 000000001ad72b7fcc01b5c1beca6df36cc276d5b7bbdf8362b9d3c5d5306e04 from [199.192.18.235:28333](http://199.192.18.235:28333/) (outbound): serialized transaction is too small - got 99, min 100

Context:

2022-09-09 17:52:56.110 [INF] SYNC: Processed 4500 blocks in 10.27s (4501 transactions, height 92501/112374 (82.32%), 2022-04-24 18:42:07 -0500 CDT, ~10 MiB cache)
2022-09-09 17:53:06.116 [INF] SYNC: Processed 3500 blocks in 10s (3507 transactions, height 96001/112374 (85.43%), 2022-05-19 01:03:46 -0500 CDT, ~10 MiB cache)
2022-09-09 17:53:16.774 [INF] SYNC: Processed 4000 blocks in 10.65s (4052 transactions, height 100001/112374 (88.99%), 2022-06-15 12:11:09 -0500 CDT, ~11 MiB cache)
2022-09-09 17:53:26.942 [INF] SYNC: Processed 4500 blocks in 10.16s (4706 transactions, height 104501/112374 (92.99%), 2022-07-17 00:20:00 -0500 CDT, ~11 MiB cache)
2022-09-09 17:53:37.309 [INF] SYNC: Processed 4000 blocks in 10.36s (4193 transactions, height 108501/112374 (96.55%), 2022-08-13 20:30:59 -0500 CDT, ~11 MiB cache)
2022-09-09 17:53:46.616 [INF] SYNC: Rejected block 000000001ad72b7fcc01b5c1beca6df36cc276d5b7bbdf8362b9d3c5d5306e04 from [199.192.18.235:28333](http://199.192.18.235:28333/) (outbound): serialized transaction is too small - got 99, min 100
2022-09-09 17:53:46.616 [INF] CHAN: Adding orphan block 000000000a8c216129f1abd8c3842e6e6bef6f3a5606f5e2e66ebba8d5c5ae45 with parent 000000001ad72b7fcc01b5c1beca6df36cc276d5b7bbdf8362b9d3c5d5306e04
2022-09-09 17:53:46.616 [INF] CHAN: Adding orphan block 000000000afc2e712b1711eae5a0be6b13ee3532b5e01088efbf8f1e32474dfa with parent 000000000a8c216129f1abd8c3842e6e6bef6f3a5606f5e2e66ebba8d5c5ae45
2022-09-09 17:53:46.616 [INF] CHAN: Adding orphan block 000000001ef73751e62359323a635135450c661668cad2e09a053f3ca923f5a8 with parent 000000000afc2e712b1711eae5a0be6b13ee3532b5e01088efbf8f1e32474dfa
2022-09-09 17:53:46.616 [INF] CHAN: Adding orphan block 0000000004cd010c1fba62e8e96964f43e9cc098047ab7eec3036b0f299a20e8 with parent 000000001ef73751e62359323a635135450c661668cad2e09a053f3ca923f5a8
2022-09-09 17:53:46.617 [INF] CHAN: Adding orphan block 000000000f907029b3498775eb4132e6f3f58989066f1b40f71b5bc6e50d7169 with parent 0000000004cd010c1fba62e8e96964f43e9cc098047ab7eec3036b0f299a20e8
2022-09-09 17:53:46.617 [INF] CHAN: Adding orphan block 0000000020f9c894ba81f93d2d2071aa887c26ed9f49fc380d209ddfc200f04f with parent 000000000f907029b3498775eb4132e6f3f58989066f1b40f71b5bc6e50d7169
2022-09-09 17:53:46.617 [INF] CHAN: Adding orphan block 0000000016ffdb0d2a99398f3dfdb144310383b28da2e52d52c175eeb3eeb44a with parent 0000000020f9c894ba81f93d2d2071aa887c26ed9f49fc380d209ddfc200f04f
2022-09-09 17:53:46.617 [INF] CHAN: Adding orphan block 0000000009d3dd4f9a19b10de4a82132e5d47b1b6d214cf688dcf3b855d9fe4f with parent 0000000016ffdb0d2a99398f3dfdb144310383b28da2e52d52c175eeb3eeb44a
2022-09-09 17:53:46.617 [INF] CHAN: Adding orphan block 00000000072a425550a93ea7950f308f45a104f9d0b3c5dfd5533fae333be1da with parent 0000000009d3dd4f9a19b10de4a82132e5d47b1b6d214cf688dcf3b855d9fe4f
<many many more>

99 byte txn https://testnet4.imaginary.cash/tx/f0764b9579ea03dd29cb973ad80f33f490fccbbc064534364ee94d6219b6be9e

violates these rules: https://github.com/gcash/bchd/commit/06e210339c6c3bccf1eabde3a290c0e4ec10637b

Judging by the data in that block's coinbase txn, it looks designed to hit this.

zquestz commented 2 years ago

That looks very correct. The minimum transaction size is 100 bytes since the MagneticAnomaly fork took effect.

Are the rules different for testnet4?

chappjc commented 2 years ago

Are the rules different for testnet4?

No idea. Looks like some other node software at least isn't following the same rules, and it's got all the work.

Invalid chain: https://testnet4.imaginary.cash/node-status says node version "24010100 (/Bitcoin Cash Node:24.1.1(EB2.0)/)" Other chain: https://tbch4.loping.net/node-status says node version "24010000 (/Bitcoin Cash Node:24.1.0(EB2.0)/)"

Maybe this is a bug with Bitcoin Cash Node?

Hashrate seems to be on the chain with the rejected block.

chappjc commented 2 years ago

Wherever the invalid chain on https://testnet4.imaginary.cash/ is coming from, it does not seem to be followed by bitcoin-cash-node either. Closing the issue, but whoever is running testnet4.imaginary.cash could probably shed some light on this since their node accepted that block.