<h2>Solo Miners</h2>
<blockquote>
<p><strong>Is one transaction only picked by one miner or is it possible, that more miners can pick the same transaction?</strong></p>
</blockquote>
<p>Each miner is free to pick whichever transactions they want. They have no knowledge of what other miners are working on. Miners might pick different transactions, some the same and some different or all the same. There is no explicit coordination.</p>
<p>Only when the rate of new transactions is low, it is likely that each miner will have the same set, or nearly the same set, of transactions to work with.</p>
<blockquote>
<p><strong>If only one miner can pick a transaction, [...]</strong></p>
</blockquote>
<p>Not applicable.</p>
<blockquote>
<p><strong>If more miners can pick a transaction, what happens to the other miners(that couldnt calculate the hash first).</strong></p>
</blockquote>
<p>When they see another miner has produced a new block, the others stop their work and start on the next block based on the new block produced by the other miner. They first remove from their mempool any transactions included in the other miner's new block.</p>
<hr />
<h2>Mining Pools</h2>
<p>Things are a little more complicated for mining pools. Members of a pool coordinate their work cooperatively. But you can think of each separate pool as a separate miner and the above applies.</p>
<p>Stratum v1: Pools and solo miners are the only entities that are constructing block templates. Regular miners cannot because they don’t have the transaction sets to build the blocks.</p>
<p>Stratum v2: Every miner (who has it implemented in their firmware &amp; a pool that supports it) will have the option to prioritize transactions however they want without impacting the other miners in the pool.</p>
<hr />
<h2>Further reading</h2>
<ul>
<li><a href="https://danielabrozzoni.com/posts/mining_overview_stratum_v2_bitcoin_munich/" rel="nofollow noreferrer">Slides about basics of Bitcoin Mining by Daniela Brozzoni</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/148/13866">What exactly is Mining?</a></li>
<li><a href="https://bitcoin.stackexchange.com/q/8031/13866">What are bitcoin miners really solving?</a></li>
</ul>

CC BY-SA 4.0
2021-03-11T20:06:15.017Z
Maybe my question was not clear? Can different miners pick the SAME transaction at the same time. And if this is possible. It would be possible, that a miner eith bad luck would NEVER mine a block and would never be funded?
user1949096
CC BY-SA 4.0
2021-03-11T20:10:59.900Z
@user1949096: If you wish, you can [Edit](https://bitcoin.stackexchange.com/posts/103487/edit) it and/or explain why this answer doesn't address your question.
RedGrittyBrick
CC BY-SA 4.0
2021-03-11T20:11:51.750Z
@user1949096: 1) Yes (but it isn't important), 2) Yes.
RedGrittyBrick
CC BY-SA 4.0
2021-03-11T20:11:54.990Z
There is no coordination, so miners have absolutely no clue what other miners are trying to include in their blocks. It doesn't matter, mining is a purely local process, so anyone can create whatever block they want. Once their block is created, and broadcast, other miners can't include the same transaction in a successor block anymore of course; that'd be a double spend.
Pieter Wuille
CC BY-SA 4.0
2021-03-11T20:19:52.473Z
RedGrittyBrick and @Pieter thank you for your answers. So I think I understood it now. I try to explain: the same transaction can be picked by x miners. When the first block is mined, the miner gets a refund. The next miner, who creates the next block, which contains also this transaction, is also getting rewarded. So a transaction can be exist in more than just one block. Did I get it right?
user1949096
CC BY-SA 4.0
2021-03-11T20:23:30.817Z
@user1949096: Miners never get a refund. A transaction can only be in one valid block. A block is invalid if it contains a transaction that is also in some previous block. All other nodes (wallets, miners, etc) ignore invalid blocks and will eventually ignore persistently misbehaving nodes.
RedGrittyBrick
CC BY-SA 4.0
2021-03-11T20:40:36.687Z
@Prayank: Thanks - I was editing at the same time as you :)  So I merged my edits into yours.
RedGrittyBrick
CC BY-SA 4.0
2021-03-11T20:04:08.827Z
2021-12-19T02:15:09.953Z
2021-12-19T02:15:09.953Z
RedGrittyBrick
<p>I am very new to blockchain and try to understand it completely. What I think I understood is,
that every transaction is going to the mempool first and these transactions are getting picked by miners. With a bunch of transactions and the previous block hash a new hash needs to be calculated. And as soon as the desired hash is calculated a new block is mined.</p>
<p>What I dont understand:</p>
<ul>
<li>Is one transaction only picked by one miner or is it possible, that more miners can pick the same transaction?</li>
<li>If only one miner can pick a transaction, what happens if this miner has weak hardware?</li>
<li>If more miners can pick a transaction, what happens to the other miners(that couldnt calculate the hash first).</li>
</ul>
<p>I googled a lot and couldnt find an answer to this questions.
Hope this question meets the criteria and you guys can help me :).</p>
<p>Thanks in advance.</p>

<bitcoin-core><transactions><blockchain><mining-hardware><mempool>
Trying to understand the mempool and how transactions are picked
user1949096
# Trying to understand the mempool and how transactions are picked

(Asked by: username_0 on 2021-03-11)

I am very new to blockchain and try to understand it completely. What I think I understood is,
that every transaction is going to the mempool first and these transactions are getting picked by miners. With a bunch of transactions and the previous block hash a new hash needs to be calculated. And as soon as the desired hash is calculated a new block is mined.

What I dont understand:

* Is one transaction only picked by one miner or is it possible, that more miners can pick the same transaction?
* If only one miner can pick a transaction, what happens if this miner has weak hardware?
* If more miners can pick a transaction, what happens to the other miners(that couldnt calculate the hash first).

I googled a lot and couldnt find an answer to this questions.
Hope this question meets the criteria and you guys can help me :).

Thanks in advance.

**Tags:** bitcoin-core, transactions, blockchain, mining-hardware, mempool


---

## 1 answers

### Answer by username_1 on 2021-03-11. Score: 2

## Solo Miners

> **Is one transaction only picked by one miner or is it possible, that more miners can pick the same transaction?**

Each miner is free to pick whichever transactions they want. They have no knowledge of what other miners are working on. Miners might pick different transactions, some the same and some different or all the same. There is no explicit coordination.

Only when the rate of new transactions is low, it is likely that each miner will have the same set, or nearly the same set, of transactions to work with.

> **If only one miner can pick a transaction, [...]**

Not applicable.

> **If more miners can pick a transaction, what happens to the other miners(that couldnt calculate the hash first).**

When they see another miner has produced a new block, the others stop their work and start on the next block based on the new block produced by the other miner. They first remove from their mempool any transactions included in the other miner's new block.

---

## Mining Pools

Things are a little more complicated for mining pools. Members of a pool coordinate their work cooperatively. But you can think of each separate pool as a separate miner and the above applies.

Stratum v1: Pools and solo miners are the only entities that are constructing block templates. Regular miners cannot because they don’t have the transaction sets to build the blocks.

Stratum v2: Every miner (who has it implemented in their firmware & a pool that supports it) will have the option to prioritize transactions however they want without impacting the other miners in the pool.

---

## Further reading

* [Slides about basics of Bitcoin Mining by Daniela Brozzoni](https://danielabrozzoni.com/posts/mining_overview_stratum_v2_bitcoin_munich/)
* [What exactly is Mining?](https://bitcoin.stackexchange.com/q/148/13866)
* [What are bitcoin miners really solving?](https://bitcoin.stackexchange.com/q/8031/13866)

> **Comments:**
> **username_0**: Maybe my question was not clear? Can different miners pick the SAME transaction at the same time. And if this is possible. It would be possible, that a miner eith bad luck would NEVER mine a block and would never be funded?  
> **username_1**: @username_0: If you wish, you can [Edit](https://bitcoin.stackexchange.com/posts/103487/edit) it and/or explain why this answer doesn't address your question.  
> **username_1**: @username_0: 1) Yes (but it isn't important), 2) Yes.  
> **username_2**: There is no coordination, so miners have absolutely no clue what other miners are trying to include in their blocks. It doesn't matter, mining is a purely local process, so anyone can create whatever block they want. Once their block is created, and broadcast, other miners can't include the same transaction in a successor block anymore of course; that'd be a double spend.  
> **username_0**: username_1 and @username_2 thank you for your answers. So I think I understood it now. I try to explain: the same transaction can be picked by x miners. When the first block is mined, the miner gets a refund. The next miner, who creates the next block, which contains also this transaction, is also getting rewarded. So a transaction can be exist in more than just one block. Did I get it right?  
> **username_1**: @username_0: Miners never get a refund. A transaction can only be in one valid block. A block is invalid if it contains a transaction that is also in some previous block. All other nodes (wallets, miners, etc) ignore invalid blocks and will eventually ignore persistently misbehaving nodes.  
> **username_1**: @Prayank: Thanks - I was editing at the same time as you :)  So I merged my edits into yours.  

---

