2

Mining in RegTest mode goes well until it's reach block height=500, then server return (bad-cb-height) any idea what is wrong with this coninbase:
02000000
01
0000000000000000000000000000000000000000000000000000000000000000
ffffffff
2a
03f40100 2508000000313130311a00000052797a656e2e33363030582e69732e617765736f6d652e2e2e
00000000
01
40be402500000000
16
001420f897e733695493cc731b0b4b80352fb9a826f
000000000

1 Answers1

1

the problem is an incorrect implementation of BIP-0034 in my code, I thought the length of height should be at least 3 bytes which I was wrong,

"Coding Enthusiast" says : "The block height has to be pushed with the minimal number of bytes: Since BIP-34 activates at block 500 on RegTest, this is ignored on all blocks from height 1 to 499 and from block height 500 it starts being enforced and the invalid push is rejected."

the description of the answer is here: bitcointalk.org/index.php?topic=5293244.0