1

I searched for a lot. Previous answers on the bitcoin stack exchange did not answer my question.

Well, According to my research, Any node can collect a set up unconfirmed transactions into a block and broadcast to the rest of the network as a suggestion for what the next block in the chain should be, by solving the cryptographic hash by random guesses. Moreover, the hash function creates something like a 32byte number might be using SHA256. So, I want to know who creates random numbers? and how nodes do guessing?

Please let me know if my concept is wrong. I will appreciate your guidance. Thanks

1
  • @RedGrittyBrick I just need the answer to my question. Don't need extra information that how algorithms work. Dec 3 '20 at 13:54
1

Moreover, the hash function creates something like a 32byte number might be using SHA256. So, I want to know who creates random numbers? and how nodes do guessing?

It's a 32-bit number. There are only 2^32 possible values for a 32-bit number, about 4 billion, and realistic bitcoin mining hardware attempts trillions of hashes per second. So miners are just designed to try all of them which typically takes much less than a second.

Of course, the odds of any of them producing a valid block are very close to zero, given that only one miner succeeds on average every ten minutes. So the vast majority of blocks that miners attempt to mine turn out to be unmineable and the miner must try all 2^32 possibilities on a different block.

0

I want to know who creates random numbers?

Nobody.

and how nodes do guessing?

Mining nodes do this by constructing a block, hashing it and seeing if the hash is less than the target. If not, they retry constructing another block with small variations in contents.

Please let me know if my concept is wrong.

Your concept is wrong. Ordinary nodes don't create and broadcast suggestions for blocks. The mining process could better be described as trial and error, it can be deterministic rather than random.

0

I believe your answer (and more) can be found here:

Book: Mastering Bitcoin; Chapter 10: 'Mining and Consensus'; Section: Successfully Mining The Block

Snippet:

Next, the mining node [...] transmits the block header to his mining hardware, which starts testing trillions of nonces per second. Because the nonce is only 32 bits, after exhausting all the nonce possibilities (about 4 billion), the mining hardware changes the block header (adjusting the coinbase extra nonce space or timestamp) and resets the nonce counter, testing new combinations.

Not the answer you're looking for? Browse other questions tagged or ask your own question.