<blockquote>
<p>Let's assume 2 miners, A and B, are adding / validating transactions and build a block. Both blocks contain 50 identical transactions. All other transactions differ. Now one miner, B, solves the mathematical puzzle and appends his block to the chain. What would then happen to the remaining transactions within the other block of miner A?</p>
</blockquote>
<p>When miner A receives the block constructed by B, A will remove the transactions in its mempool that conflict with that block, which in your case includes at least the 50 common transactions.</p>
<p>Subsequent block candidates A tries to construct will be drawn from that mempool, which has been updated to not include the conflicts anymore.</p>
<blockquote>
<p>Will these be automatically removed from the block that didn't make it and the miner needs to add 50 different ones?</p>
</blockquote>
<p>Blocks once produced cannot be changed, but A in your scenario never constructed a block. A has been constructing block candidates (which don't satisfy proof of work) based on its mempool, and the mempool changed, so future candidates will reflect that change.</p>
<blockquote>
<p>Or does miner A needs to start all over from zero?</p>
</blockquote>
<p>Miner A is already, continuously, &quot;starting over&quot; all the time. It is entirely irrelevant for the miners in A whether the mempool the transactions are drawn from, or the block it is building on, changed in between two attempts. It's just a new attempt like any other.</p>
<p>It's important to see that mining is progress free. There is not a single special block that all miners are competing to find first. There are an infinite number of potentially valid solutions, and miners are all looking for different ones. Mining proceeds by constructing candidate blocks, computing their hash, and if the hash does not have enough zeroes, continue with another candidate block. Each attempt has the same probability of success, independent of how many candidates the miner has already tried, and independent of how many candidates anyone else has already tried.</p>
<blockquote>
<p>How's that solved and does this actually happen in reality?</p>
</blockquote>
<p>Yes, it happens all the time. Every time someone finds a block, all other miners will update their mempools so their future block candidates reflect the state after the found block.</p>

CC BY-SA 4.0
2022-08-24T12:31:02.500Z
2022-08-24T12:31:02.500Z
Pieter Wuille
<blockquote>
<p>What would then happen to the remaining transactions within the other block of miner A?</p>
</blockquote>
<p>Miner A would need to construct a new block which doesn't include the transactions that have already been mined and &quot;solve the mathematical puzzle&quot; for the new block.</p>
<blockquote>
<p>Will these be automatically removed from the block that didn't make it and the miner needs to add 50 different ones?</p>
</blockquote>
<p>Their mining software should construct a new block that doesn't include transactions from the now mined block. (If it doesn't that could be a costly mistake as it could successfully mine a block that the rest of the network rejects.) It doesn't need to add exactly <strong>50</strong> new ones and in some cases won't be able to if some of the new transactions are particularly big.</p>
<blockquote>
<p>Or does miner A needs to start all over from zero? How's that solved and does this actually happen in reality?</p>
</blockquote>
<p>Effectively miner A needs to start from zero, yes. It doesn't need to re-verify transactions it has already verified but in terms of the mining aspect it starts the block construction and mining process from scratch again. It happens regularly in reality as there will be a large overlap between the transactions in the various blocks that miners are competing to mine.</p>

CC BY-SA 4.0
2022-08-24T11:41:07.293Z
2022-08-24T11:47:50.213Z
2022-08-24T11:47:50.213Z
Michael Folkson
<p>Let's assume 2 miners, A and B, are adding / validating transactions and build a block. Both blocks contain 50 identical transactions. All other transactions differ. Now one miner, B, solves the mathematical puzzle and appends his block to the chain. What would then happen to the remaining transactions within the other block of miner A? Will these be automatically removed from the block that didn't make it and the miner needs to add 50 different ones? Or does miner A needs to start all over from zero? How's that solved and does this actually happen in reality?</p>

<transactions><mining-theory><validation>
What happens if two miners have a few identical transactions in their block when one of them validates his block and appends it to the blockchain?
Oliver
# What happens if two miners have a few identical transactions in their block when one of them validates his block and appends it to the blockchain?

(Asked by: username_0 on 2022-08-24)

Let's assume 2 miners, A and B, are adding / validating transactions and build a block. Both blocks contain 50 identical transactions. All other transactions differ. Now one miner, B, solves the mathematical puzzle and appends his block to the chain. What would then happen to the remaining transactions within the other block of miner A? Will these be automatically removed from the block that didn't make it and the miner needs to add 50 different ones? Or does miner A needs to start all over from zero? How's that solved and does this actually happen in reality?

**Tags:** transactions, mining-theory, validation


---

## 2 answers

### Answer by username_1 on 2022-08-24. Score: 3

> Let's assume 2 miners, A and B, are adding / validating transactions and build a block. Both blocks contain 50 identical transactions. All other transactions differ. Now one miner, B, solves the mathematical puzzle and appends his block to the chain. What would then happen to the remaining transactions within the other block of miner A?

When miner A receives the block constructed by B, A will remove the transactions in its mempool that conflict with that block, which in your case includes at least the 50 common transactions.

Subsequent block candidates A tries to construct will be drawn from that mempool, which has been updated to not include the conflicts anymore.

> Will these be automatically removed from the block that didn't make it and the miner needs to add 50 different ones?

Blocks once produced cannot be changed, but A in your scenario never constructed a block. A has been constructing block candidates (which don't satisfy proof of work) based on its mempool, and the mempool changed, so future candidates will reflect that change.

> Or does miner A needs to start all over from zero?

Miner A is already, continuously, "starting over" all the time. It is entirely irrelevant for the miners in A whether the mempool the transactions are drawn from, or the block it is building on, changed in between two attempts. It's just a new attempt like any other.

It's important to see that mining is progress free. There is not a single special block that all miners are competing to find first. There are an infinite number of potentially valid solutions, and miners are all looking for different ones. Mining proceeds by constructing candidate blocks, computing their hash, and if the hash does not have enough zeroes, continue with another candidate block. Each attempt has the same probability of success, independent of how many candidates the miner has already tried, and independent of how many candidates anyone else has already tried.

> How's that solved and does this actually happen in reality?

Yes, it happens all the time. Every time someone finds a block, all other miners will update their mempools so their future block candidates reflect the state after the found block.


---

### Answer by username_2 on 2022-08-24. Score: 1

> What would then happen to the remaining transactions within the other block of miner A?

Miner A would need to construct a new block which doesn't include the transactions that have already been mined and "solve the mathematical puzzle" for the new block.

> Will these be automatically removed from the block that didn't make it and the miner needs to add 50 different ones?

Their mining software should construct a new block that doesn't include transactions from the now mined block. (If it doesn't that could be a costly mistake as it could successfully mine a block that the rest of the network rejects.) It doesn't need to add exactly **50** new ones and in some cases won't be able to if some of the new transactions are particularly big.

> Or does miner A needs to start all over from zero? How's that solved and does this actually happen in reality?

Effectively miner A needs to start from zero, yes. It doesn't need to re-verify transactions it has already verified but in terms of the mining aspect it starts the block construction and mining process from scratch again. It happens regularly in reality as there will be a large overlap between the transactions in the various blocks that miners are competing to mine.


---

