MultiversX Tracker is Live!

Sha256/Nonce Question

Bitcoin Reddit

More / Bitcoin Reddit 91 Views

I just finished Inventing Bitcoin (for the second time), and have a question regarding hashing and the block reward.

The way I understood the mining process, each miner attaches a NONCE to a transaction waiting to be added to the ledger, then runs it through Sha256. The first miner to generate a hash under the target number gets the block reward (after everyone confirms their hash was valid). I understand that every transaction is waiting to get added to blocks as they are formed, but am unclear about what the NONCE is applied to to be hashed. Is it the first transaction waiting to be added to the blockchain? Because not every transaction gets a NONCE then hashed, do they? Some just get added to the block once the block reward winner/recorder is established.

So what transaction+NONCE is hashed through SHA256, to yield a hash under the target number, and how is that determined?

I hope that's clear. This is my first time even attempting to understand the how of Bitcoin.

EDIT: It seems I got two conflicting responses, "No transactions get nonce," and "the miner guesses, then hashes most of the entire block (many transactions in one block)." This is the part that I'm confused by.

From Inventing Bitcoin Page 30: "the lottery system works like this. Alice announces she wants to pay $2 to Bob. Everyone playing the lottery takes this transaction. "Alice gives $2 to Bob" adding a nonce at the end." Then the book goes through whether the hash is less than the target, etc.

This is what I'm trying to understand. Does every Bitcoin transaction get nonced, or is the nonce number independent of the transactions and wins the ability to then record all the pending transactions? Or is the nonce just added to the first pending transaction?

submitted by /u/greekswiss
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments