Post
Topic
Board Development & Technical Discussion
Re: Choosing Transactions
by
DannyHamilton
on 06/12/2017, 14:30:11 UTC
So, based on your answers, it sounds like miners around the globe are independently adding transactions to blocks first, THEN, they start working on the proof of work,  correct?

Correct.

The miner (or mining pool) builds a block of transactions from the unconfirmed transactions that they are aware of.

Then they build a merkle tree from the chosen transactions and calculate the merkle root.

They use the merkle root (along with the hash of the previous block, the timestamp, the current difficulty, and a block version number) to build an 80 byte block header for that set of transactions.

Then they begin the proof-of-work on that block header.

If they hear about a valid completed block before they complete their proof-of-work, then they start over.
If they try all possible nonce values without completing their proof-of-work, then they start over.
If they complete their proof-of-work, then they broadcast their block and start over.