<blockquote>
  <p>Both are working on those separate blocks, and each block contains information about Alice's transaction and it is just a matter of luck which miner solves it?</p>
</blockquote>

<p>Mining a block is basically a race, the successful miner is usually the first one to find a valid block and send it to the rest of the network. In one respect, there is some luck involved, because hashing is purely probabilities, it might take you only one attempt to find a valid block or it might take you quadrillions of attempts. But obviously the more attempts you make, the more likely you are to find a valid block, hence why more mining power generally means higher success rates.</p>

<p>Sometimes, two miners find a block at almost the same time and a small fork happens where some nodes see one block first and others see the other, but this is generally resolved as soon as the next block is mined, because the nodes will move to whichever chain becomes longer.</p>

CC BY-SA 3.0
2017-08-29T12:00:40.960Z
Thank you for the explanation. Still, one part I don't get is: do *all* the miners work on hashing the *same* one block, which includes *one* list of transactions, including Alice's?
naequuu
CC BY-SA 3.0
2017-08-29T12:23:57.320Z
Each block may be slightly different, the miner can choose which transactions they want to include in their block, usually they will include those with the highest transaction fees. Even if 2 miners choose the same transactions, they might put them in a different order. That's the miners choice :)
meshcollider
CC BY-SA 3.0
2017-08-29T12:44:30.807Z
Thanks again! So,there is a pool of transactions that need to be verified. Each miner selects the transactions he wants to put in a block and the selection is not exclusive. Alice's transaction can be in several blocks at once. If Alice's transaction happened to be in the "solved" block, it is then validated when the block is solved. If her transaction happened to be in a block that was not solved and discarded, she must wait until her transaction goes into a solved block. Am I missing something?
naequuu
CC BY-SA 3.0
2017-08-29T21:50:01.783Z
Correct, note that it can only be I'm one 'solved' block in the blockchain though. Please remember to accept my answer if it satisfied your question too :)
meshcollider
CC BY-SA 3.0
2017-08-29T11:48:15.797Z
2017-08-29T11:48:15.797Z
meshcollider
<p>Let's say the transaction got picked up into a block by miner A and into a block by miner B. Both are working on those separate blocks, and each block contains information about Alice's transaction and it is just a matter of luck which miner solves it? Or are transactions picked up as "one bunch" by every miner out there working on the next block, so that Alice's transaction is in "every" block that is currently mined?</p>

CC BY-SA 3.0
2017-08-30T07:15:08.530Z
Hi naequuu, please don't create long statements asking whether you understand correctly. Such questions are not inviting answers and hard for others to benefit from. Rather ask an open question about anything that you're in doubt! :) I've taken the liberty to remove your description of Bitcoin, it would be better suited as an answer on "how does Bitcoin work".  You can still find the original text in the edit history.
Murch
CC BY-SA 3.0
2017-08-30T07:16:22.757Z
Your description was mostly correct except that instead of 'If 51% of other miners agree that his block is "correct", it gets appended to the blockchain, the miner who solved it gets some bitcoins in reward.' I would say "if other miners build on top of the block, it will be part of the longest chain and the miner will be able to spend their reward." Miners essentially do pay themselves, see e.g. https://bitcoin.stackexchange.com/q/57909/5406.
Murch
<blockchain><confirmations><transaction-selection>
Who decides who verifies Alice's transaction?
naequuu
# Who decides who verifies Alice's transaction?

(Asked by: username_0 on 2017-08-29)

Let's say the transaction got picked up into a block by miner A and into a block by miner B. Both are working on those separate blocks, and each block contains information about Alice's transaction and it is just a matter of luck which miner solves it? Or are transactions picked up as "one bunch" by every miner out there working on the next block, so that Alice's transaction is in "every" block that is currently mined?

**Tags:** blockchain, confirmations, transaction-selection

> **Comments:**
> **username_1**: Hi username_0, please don't create long statements asking whether you understand correctly. Such questions are not inviting answers and hard for others to benefit from. Rather ask an open question about anything that you're in doubt! :) I've taken the liberty to remove your description of Bitcoin, it would be better suited as an answer on "how does Bitcoin work".  You can still find the original text in the edit history.  
> **username_1**: Your description was mostly correct except that instead of 'If 51% of other miners agree that his block is "correct", it gets appended to the blockchain, the miner who solved it gets some bitcoins in reward.' I would say "if other miners build on top of the block, it will be part of the longest chain and the miner will be able to spend their reward." Miners essentially do pay themselves, see e.g. https://bitcoin.stackexchange.com/q/57909/5406.  

---

## 1 answers

### Answer by username_2 on 2017-08-29. Score: 2 | Accepted answer

> Both are working on those separate blocks, and each block contains information about Alice's transaction and it is just a matter of luck which miner solves it?

Mining a block is basically a race, the successful miner is usually the first one to find a valid block and send it to the rest of the network. In one respect, there is some luck involved, because hashing is purely probabilities, it might take you only one attempt to find a valid block or it might take you quadrillions of attempts. But obviously the more attempts you make, the more likely you are to find a valid block, hence why more mining power generally means higher success rates.

Sometimes, two miners find a block at almost the same time and a small fork happens where some nodes see one block first and others see the other, but this is generally resolved as soon as the next block is mined, because the nodes will move to whichever chain becomes longer.

> **Comments:**
> **username_0**: Thank you for the explanation. Still, one part I don't get is: do *all* the miners work on hashing the *same* one block, which includes *one* list of transactions, including Alice's?  
> **username_2**: Each block may be slightly different, the miner can choose which transactions they want to include in their block, usually they will include those with the highest transaction fees. Even if 2 miners choose the same transactions, they might put them in a different order. That's the miners choice :)  
> **username_0**: Thanks again! So,there is a pool of transactions that need to be verified. Each miner selects the transactions he wants to put in a block and the selection is not exclusive. Alice's transaction can be in several blocks at once. If Alice's transaction happened to be in the "solved" block, it is then validated when the block is solved. If her transaction happened to be in a block that was not solved and discarded, she must wait until her transaction goes into a solved block. Am I missing something?  
> **username_2**: Correct, note that it can only be I'm one 'solved' block in the blockchain though. Please remember to accept my answer if it satisfied your question too :)  

---

