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
Asked
Active
Viewed 308 times
2
Ali Harsini
- 43
- 6
-
https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki – Claris Jan 27 '21 at 18:59
-
Adding an answer to your own question is encouraged! – Claris Feb 24 '21 at 06:47
-
the answer is here: https://bitcointalk.org/index.php?topic=5293244.0 – Ali Harsini Feb 24 '21 at 11:01
1 Answers
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
Ali Harsini
- 43
- 6