Post
Topic
Board Bitcoin Technical Support
Re: A basic question about how a Node finds a block
by
odolvlobo
on 12/04/2021, 03:54:58 UTC
Hello, i had a question, it's about work process of a miner,
I was wondering what does a miner do during minig process,  1. It first finds a random number smaller than network target, broadcast it's wining to other nodes then adds transactions from pool or 2. It first adds transactions to the block until finds a valid hash smaller than network target and broadcast ot other nodes ?
Which information is neede as input of hash function (specially Nonce) ?
What other miners do in the next 10 minute until finding new hash puzzel?

It is essentially #2.

The "block header" is hashed. The block header contains information about the transactions in the block and other information, including a nonce.

The miner constructs a block and then hashes the block header, changing the nonce and other information in the header, until a hash is found that is less than the target. If none of the direct changes to the block header result in a winning hash, the block is modified so the header is changed, and hashing continues.

All miners are doing the same thing at the same time, but the contents of their blocks, and thus their block headers, and thus their hashes are guaranteed to be different.