I have a general understanding of building blocks. But am hoping someone can fill in the details/gaps. Also, can you correct if something is not right? Thanks.
- Bitcoin transactions are broadcast to the bitcoin network.
- Nodes receive the transactions.
- Each node puts the transactions into their own internal mempool - or is it a network mempool that all nodes draw transactions from?
- At some point, some nodes begin mining (hashing to find correct hash with leading zeros). When does this begin? I assume as soon as possible since it is a race. So then, it does not necessarily use the data in a fully built block, right?
- At some point, the mining nodes fill up a block with transactions from mempool (they pull the ones with highest fees). Each node validates each transaction it puts into its block against the entire blockchain.
- When a node finds a winning hash, it announces the winning parameters to the network.
- The network can easily check the hash using the parameters (dataset, nonce value, etc.) that the winning node sends out.
So here's where I am a bit unclear. How/when do the transactions in the winning block get verified by the rest of the network? Is it during the time when they verify the winning hash? Do they also verify that all transactions are good at that time?
How many nodes must approve/verify the winning hash before it is accepted into the bitcoin network as the next block to be added?