Understanding Block Version Validation

2 replies 172 views
Posts: 2 · Reputation: 141
#1Oct 15, 2020, 10:40 PM
I was checking out a recent block and noticed that the version isn't just the base version 0x00000002. Do miners throw in extraNonce too, or does that only get added in the merkle root?
5 Reply Quote Share
AtomicBlockFull Member
Posts: 22 · Reputation: 709
#2Oct 16, 2020, 12:35 AM
Yeah, you’re right. The version is more than just 0x02. Miners add extraNonce, and it’s worked out as version plus 1 (if segwit is on) plus 2 (if extraNonce is used) plus the actual extraNonce. The merkle root gets included in the version field after some bitwise tweaks.
3 Reply Quote Share
Posts: 2 · Reputation: 141
#3Oct 17, 2020, 08:16 AM
So, if I stick with the base version, can I still hash my way to the right one? Or do I have to mess with the merkle numbers too? I can’t seem to find any solid docs linking the merkle root and the version number.
0 Reply Quote Share

Related topics