<p>The miner picks what transactions they want to include in the block, out of the ones they have received when they start working on that block, yes. Once they start mining a candidate block, it's usually inefficient for them to add more transactions, so transactions received during the mining process are more likely to be included a block later. Once the block is mined, the list of transactions included in it are broadcast through the network so all nodes can see which ones were included, request any they don't have, and verify its a valid block.</p>

<p>The block header is what is hashed, it contains a version number, merkle root of transactions (basically a cryptographic summary of them all to commit to which ones are included), timestamp, the difficulty target, and the hash of the previous block. See: <a href="https://en.bitcoin.it/wiki/Block_hashing_algorithm" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Block_hashing_algorithm</a></p>

CC BY-SA 4.0
2018-06-08T08:43:02.477Z
Is it possible that the one or many transactions can be picked by different miners?
Uahmed
CC BY-SA 4.0
2018-06-08T23:42:55.333Z
Yes, different miners can pick different transactions or order the transactions differently within a block
meshcollider
CC BY-SA 3.0
2017-10-22T00:15:29.380Z
2017-10-22T00:15:29.380Z
meshcollider
<p>I am having a hard time understanding the details of how blocks are getting created by miners while many transactions are being received by various nodes at slightly different times and what information from these broadcasts get combined with a nonce to find the target to satisfy the proof of work.</p>

<p>Let's say that Alice sends Bob 1 BTC. This transaction gets broadcasted to the entire network of miners who will then verify that transaction is correct and proceed to try and find a nonce to create a block with all other transactions that they have received.</p>

<p>However, there are many transaction broadcasts happening simultaneously. Transactions can arrive at different nodes at different times due to latency. How does each individual node know how many and what transactions to include in the block? What happens to transactions that arrive to the node while the block is being "mined"? Or do new transactions get added to the block while it is being mined? What data from the transactions gets combined with a nonce and hashed to find the target?</p>

<blockchain><proof-of-work>
Creating blocks while more transactions arrive and proof of work mechanics
verkter
# Creating blocks while more transactions arrive and proof of work mechanics

(Asked by: username_0 on 2017-10-21)

I am having a hard time understanding the details of how blocks are getting created by miners while many transactions are being received by various nodes at slightly different times and what information from these broadcasts get combined with a nonce to find the target to satisfy the proof of work.

Let's say that Alice sends Bob 1 BTC. This transaction gets broadcasted to the entire network of miners who will then verify that transaction is correct and proceed to try and find a nonce to create a block with all other transactions that they have received.

However, there are many transaction broadcasts happening simultaneously. Transactions can arrive at different nodes at different times due to latency. How does each individual node know how many and what transactions to include in the block? What happens to transactions that arrive to the node while the block is being "mined"? Or do new transactions get added to the block while it is being mined? What data from the transactions gets combined with a nonce and hashed to find the target?

**Tags:** blockchain, proof-of-work


---

## 1 answers

### Answer by username_1 on 2017-10-22. Score: 2 | Accepted answer

The miner picks what transactions they want to include in the block, out of the ones they have received when they start working on that block, yes. Once they start mining a candidate block, it's usually inefficient for them to add more transactions, so transactions received during the mining process are more likely to be included a block later. Once the block is mined, the list of transactions included in it are broadcast through the network so all nodes can see which ones were included, request any they don't have, and verify its a valid block.

The block header is what is hashed, it contains a version number, merkle root of transactions (basically a cryptographic summary of them all to commit to which ones are included), timestamp, the difficulty target, and the hash of the previous block. See: <https://en.bitcoin.it/wiki/Block_hashing_algorithm>

> **Comments:**
> **username_2**: Is it possible that the one or many transactions can be picked by different miners?  
> **username_1**: Yes, different miners can pick different transactions or order the transactions differently within a block  

---

