user91961: 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

user91961: 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

91961: <p>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:<br/>
02000000<br/>
01<br/>
0000000000000000000000000000000000000000000000000000000000000000<br/>
ffffffff<br/>
2a<br/>
03f40100
2508000000313130311a00000052797a656e2e33363030582e69732e617765736f6d652e2e2e<br/>
00000000<br/>
01<br/>
40be402500000000<br/>
16<br/>
001420f897e733695493cc731b0b4b80352fb9a826f<br/>
000000000<br/></p>
 91961: <p>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,</p>
<p>&quot;Coding Enthusiast&quot; says :
&quot;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.&quot;</p>
<p>the description of the answer is here: bitcointalk.org/index.php?topic=5293244.0</p>
