Exploring Proof of Work from a Miner’s Perspective

6 replies 437 views
stacksatsHero Member
Posts: 168 · Reputation: 2023
#1Jul 14, 2025, 11:23 AM
Been diving into mining lately. Could use some help figuring out a couple things. Like, how exactly does SHA-256 work in Bitcoin's proof of work? Why is it so easy to check but tough to find a valid nonce?
8 Reply Quote Share
alex.byteLegendary
Posts: 78 · Reputation: 5910
#2Jul 14, 2025, 02:36 PM
You wanna understand it better? Just write some SHA-256 code in any language. It’s not that hard, maybe a few hundred lines. You’ll see how messages become hashes. Seriously, once you do it, it clicks.
0 Reply Quote Share
CalmMinerFull Member
Posts: 195 · Reputation: 784
#3Jul 14, 2025, 05:49 PM
Right? Block data comes from the node that calculated the nonce first. Transaction IDs get hashed in pairs into a Merkle tree, creating a unique fingerprint. That's the Merkle root in the header, makes verifying transactions way easier.
1 Reply Quote Share
j0hn.ga5Newbie
Posts: 36 · Reputation: 19
#4Jul 14, 2025, 10:12 PM
Totally. Miners first adjust the nonce, but it’s just 32 bits, so they run out quick. Then they tweak the coinbase transaction with an extraNonce to change the Merkle root. They can also modify things like timestamp or transaction order.
1 Reply Quote Share
0xNodeMember
Posts: 307 · Reputation: 80
#5Jul 16, 2025, 12:59 AM
Good point! The block header is 80 bytes, so there’s more to tweak than just the nonce. Constants like the previous block hash and nbits stay the same, but miners can play with the other fields.
6 Reply Quote Share
alex.byteLegendary
Posts: 78 · Reputation: 5910
#6Jul 17, 2025, 06:38 PM
For sure. Check out the latest block headers and you’ll see it. They’ve even proposed using more bits. Crazy how many zero bits are in play. Miners have to mix it up to mine faster.
3 Reply Quote Share
dave.forkMember
Posts: 165 · Reputation: 185
#7Jul 18, 2025, 12:25 AM
If you hash a random message, the chance the hash starts with five zeros is 1 in 16^5. Easy to check if it does, but hunting down a message that meets the criteria is a whole different story. That’s why PoW is hard to find but easy to verify.
5 Reply Quote Share

Related topics