<p>No, this strategy makes no sense because of how blocks are structured in the blockchain. Also, it is trivial for network participants to keep track of which transactions are confirmed, because that's the whole point of mining and the blockchain.</p>

<hr>

<p>It is possible for miners to keep transactions secret and publish them when they discover a block. This may make sense when a transaction is secret in the first place, and has particularly large fees.</p>

<p>However:</p>

<ol>
<li>Most transactions are not secret.<br>
Usually, transactions get relayed via the Bitcoin network to the miners, so everyone else knows about the transactions as well.</li>
<li>Blocks compete in other ways besides the transactions included.<br>
Blocks reference their predecessor. Therefore, when two blocks are found at the same time they will both reference the same predecessor. However, only one of the competing block can be part of the longest chain since the following block can only reference one or the other.</li>
<li>The problem of accidentally including a confirmed transaction is non-existent.<br>
Every network participant keeps track of which <a href="https://bitcoin.stackexchange.com/q/4301/5406">Unspent transaction outputs (UTXO)</a> exist. Transactions that try to spend a UTXO that was already used are invalid. This includes doublespends, and a replay of a confirmed transaction. Since each node will always consider exactly one block to be the current blockchain tip, it is trivial to notice that a transaction was previously confirmed. (Or rather, that it is no longer available to be confirmed.)</li>
</ol>

CC BY-SA 3.0
2017-01-09T10:14:26.913Z
Thank you.

Ok, for the first point.

Concerning the second point, what I mean is that each mined transaction is legit, but the same transaction is included only in one block. So, since each block includes >2000 transactions, it is possible to have the same (legit) transaction in two blocks, hence making the whole block invalid (one of the mined blocks is accepted/valid, while each other isn't).
auino
CC BY-SA 3.0
2017-01-09T10:24:29.093Z
Including a previously confirmed transaction would make a block invalid, however, this only occurs in practice when two blocks are competing at the same height. Otherwise, the set of confirmed transactions is completely known, and it would be a completely avoidable mistake by the miner that includes an already confirmed transaction.
Murch
CC BY-SA 3.0
2017-01-09T10:07:51.513Z
2017-09-03T20:04:13.990Z
2017-09-03T20:04:13.990Z
Murch
<blockquote>
  <p>Am I right?</p>
</blockquote>

<p>No. Blocks are checked by PoW, not by containing the same transactions</p>

CC BY-SA 3.0
2017-01-09T10:13:36.867Z
Well, transactions are checked by miners, in order to avoid double spent.
auino
CC BY-SA 3.0
2017-01-09T10:07:18.483Z
2017-01-09T10:07:18.483Z
amaclin
<p>I've got a question concerning a possible mining strategy.
<br/>
I've not found any proof of the strategy, but it seems reasonable to me.</p>

<p>If two mined blocks inserted in the block chain include the same transaction (not a double spent, but simply a transaction mined two times), one of the two blocks is discarded (assuming that all the other transactions in the two blocks are legit).</p>

<p>This is a probable fact, since each transaction is shared/"broadcasted" by a user.
Therefore, a possible mining strategy may let miners keep a list of transactions, mine them without letting others know such transactions exist, hence publish/spread them, just before sending the just mined block.
In this way, the probability to generate a potentially invalid block is reduced.</p>

<p>Am I right? Is this strategy adopted or not? Is it reasonable?</p>

<mining-theory><transaction-selection>
Is the probability of generating invalid blocks reduced by mining transactions unknown to others?
auino
# Is the probability of generating invalid blocks reduced by mining transactions unknown to others?

(Asked by: username_0 on 2017-01-09)

I've got a question concerning a possible mining strategy.
  
I've not found any proof of the strategy, but it seems reasonable to me.

If two mined blocks inserted in the block chain include the same transaction (not a double spent, but simply a transaction mined two times), one of the two blocks is discarded (assuming that all the other transactions in the two blocks are legit).

This is a probable fact, since each transaction is shared/"broadcasted" by a user.
Therefore, a possible mining strategy may let miners keep a list of transactions, mine them without letting others know such transactions exist, hence publish/spread them, just before sending the just mined block.
In this way, the probability to generate a potentially invalid block is reduced.

Am I right? Is this strategy adopted or not? Is it reasonable?

**Tags:** mining-theory, transaction-selection


---

## 2 answers

### Answer by username_1 on 2017-01-09. Score: 2

No, this strategy makes no sense because of how blocks are structured in the blockchain. Also, it is trivial for network participants to keep track of which transactions are confirmed, because that's the whole point of mining and the blockchain.

---

It is possible for miners to keep transactions secret and publish them when they discover a block. This may make sense when a transaction is secret in the first place, and has particularly large fees.

However:

1. Most transactions are not secret.  
   Usually, transactions get relayed via the Bitcoin network to the miners, so everyone else knows about the transactions as well.
2. Blocks compete in other ways besides the transactions included.  
   Blocks reference their predecessor. Therefore, when two blocks are found at the same time they will both reference the same predecessor. However, only one of the competing block can be part of the longest chain since the following block can only reference one or the other.
3. The problem of accidentally including a confirmed transaction is non-existent.  
   Every network participant keeps track of which [Unspent transaction outputs (UTXO)](https://bitcoin.stackexchange.com/q/4301/5406) exist. Transactions that try to spend a UTXO that was already used are invalid. This includes doublespends, and a replay of a confirmed transaction. Since each node will always consider exactly one block to be the current blockchain tip, it is trivial to notice that a transaction was previously confirmed. (Or rather, that it is no longer available to be confirmed.)

> **Comments:**
> **username_0**: Thank you.  Ok, for the first point.  Concerning the second point, what I mean is that each mined transaction is legit, but the same transaction is included only in one block. So, since each block includes >2000 transactions, it is possible to have the same (legit) transaction in two blocks, hence making the whole block invalid (one of the mined blocks is accepted/valid, while each other isn't).  
> **username_1**: Including a previously confirmed transaction would make a block invalid, however, this only occurs in practice when two blocks are competing at the same height. Otherwise, the set of confirmed transactions is completely known, and it would be a completely avoidable mistake by the miner that includes an already confirmed transaction.  

---

### Answer by username_2 on 2017-01-09. Score: 0

> Am I right?

No. Blocks are checked by PoW, not by containing the same transactions

> **Comments:**
> **username_0**: Well, transactions are checked by miners, in order to avoid double spent.  

---

