<p>You're right, miners can freely choose among the unconfirmed transactions when they're building their block template. However, miners are optimizing for revenue, so they'll be mostly selecting transactions in order of descending feerate.</p>
<p>Since transactions propagate quickly on the network, most miners will have a largely overlapping view of the queue, and their block templates should be almost the same.</p>
<p>Since each block commits to a specific predecessor, the best chain can only have one block at each height. Mining is <a href="https://bitcoin.stackexchange.com/a/36194/5406">progress-free</a> in that each hash independently has a (tiny) chance of yielding a valid block. So, when a new block is found, miners do not have any sunk cost, they just update for the new predecessor, pick a new set of transactions, and go right back to mining at the new height.</p>

CC BY-SA 4.0
2021-01-25T05:42:02.140Z
2021-01-26T11:28:29.663Z
2021-01-26T11:28:29.663Z
Murch
<p>So in my understanding, miners bundle a list of transactions into a block and begin working on it until they can generate a valid proof of work. There are various reasons to group fewer or more transactions together into a block, but it's ultimately up to the miner.</p>
<p>I'm assuming that different miners may group the same transaction into different blocks and begin working on them. One miner might group transaction <strong>A</strong> into a block of 100 transactions and start working while another miner might group transaction <strong>A</strong> into a different block of 250 transactions and also start working.</p>
<p>When one miner finds a valid proof of work and broadcasts the new block, do all the other miners who included even a single transaction from the valid block in their own block have to drop what they're doing and start over?</p>
<p>Is there some system in place to ensure that most miners are working on blocks with the exact same set of transactions except for the miner's reward transaction?</p>

<mining-theory>
How do miners decide when to give up on a block?
markv12
# How do miners decide when to give up on a block?

(Asked by: username_0 on 2021-01-25)

So in my understanding, miners bundle a list of transactions into a block and begin working on it until they can generate a valid proof of work. There are various reasons to group fewer or more transactions together into a block, but it's ultimately up to the miner.

I'm assuming that different miners may group the same transaction into different blocks and begin working on them. One miner might group transaction **A** into a block of 100 transactions and start working while another miner might group transaction **A** into a different block of 250 transactions and also start working.

When one miner finds a valid proof of work and broadcasts the new block, do all the other miners who included even a single transaction from the valid block in their own block have to drop what they're doing and start over?

Is there some system in place to ensure that most miners are working on blocks with the exact same set of transactions except for the miner's reward transaction?

**Tags:** mining-theory


---

## 1 answers

### Answer by username_1 on 2021-01-25. Score: 2 | Accepted answer

You're right, miners can freely choose among the unconfirmed transactions when they're building their block template. However, miners are optimizing for revenue, so they'll be mostly selecting transactions in order of descending feerate.

Since transactions propagate quickly on the network, most miners will have a largely overlapping view of the queue, and their block templates should be almost the same.

Since each block commits to a specific predecessor, the best chain can only have one block at each height. Mining is [progress-free](https://bitcoin.stackexchange.com/a/36194/5406) in that each hash independently has a (tiny) chance of yielding a valid block. So, when a new block is found, miners do not have any sunk cost, they just update for the new predecessor, pick a new set of transactions, and go right back to mining at the new height.


---

