<p>While invalid transactions are uncommon, transaction and block validation is a minuscule effort in comparison to the effort expended on mining that can be easily parallelized with the mining process.</p>

<p>The cost of including an invalid transaction or building on top of an invalid block, however, is potentially losing a block reward and mining on top of an invalid chain-tip until the remaining network pulls ahead and you reorganize to the valid chain-tip.</p>

<p>Note, that something similar already happened in the past: On 2015-07-04 when BIP66 activated, roughly half the mining power was split off due to "SPV mining" without checking block validity, even though they were signaling support for the activation of BIP66. <a href="https://bitcoin.org/en/alert/2015-07-04-spv-mining" rel="nofollow noreferrer">The result were two invalid chain-tips of six and three blocks.</a></p>

CC BY-SA 3.0
2018-04-20T22:40:54.003Z
2018-04-20T22:40:54.003Z
Murch
<blockquote>
  <p>Why do miners validate transactions?</p>
</blockquote>

<p>Because they want to create blocks, that contain valid transactions. After sending the block to the network, other nodes verify the block for correctness. If the block is rejected, the possibility to "win" is lost...</p>

<blockquote>
  <p>invalid transactions </p>
</blockquote>

<p>you seem to postulate, that there are many invalid transactions. I am not convinced, this is the case. Yes, everyone can send a tx to the network. This tx would end up in any of the approx. 10.000 nodes. There are far less miners, so the full nodes already filter invalid transactions. A particular wallet is usually not connected directly to a miner. As full nodes validate transactions, the probability that a full node forwards a wrong tx is minimal. If a full node does, there is other nodes, which verify the tx as well, and if this nodes sends faulty tx, he gets ignored by other nodes. I just wanted to state this, to make clear, that malicious crafted transactions have a hard time to make it through to a miner. And yes, the miner himself can generate false transactions, but then again looses all possibilities to win a block. </p>

<blockquote>
  <p>Is the reason that there are enough invalid transactions to make this
  an ineffective strategy, because the risk of having mined an invalid
  block is not worth the time savings?</p>
</blockquote>

<p>As I tried to explain before, invalid tx are not a common thing. Miners strategy is currently to win a block, maybe with some fees along. So each miner can decide individually, what he puts as "winning strategy". There are often blocks with zero transactions, or very view tx, cause currently the block reward is much higher than fees. This seems to be a valid strategy, not the invalid tx. </p>

CC BY-SA 3.0
2018-03-22T13:00:35.830Z
That's my point. If invalid transactions are uncommon, why do miners bother to validate?  Sure, sometimes a miner would mine an invalid block and lose the reward, but most of the time the miner would save time and still mine a valid block.
MRP
CC BY-SA 4.0
2021-10-02T22:48:18.237Z
@MRP "uncommon" is the wrong metric to consider. They are uncommon *because* miners validate. If miners didn't, it'd be trivial to cause them to lose money by creating invalid transactions deliberately.
Pieter Wuille
CC BY-SA 3.0
2018-03-16T19:02:37.197Z
2018-03-16T19:02:37.197Z
pebwindkraft
<p>The miners validate transactions to secure the network and in turn get rewarded for doing so. The miners are what prevent double spending and actually deliver the payments through the blockchain. Without the miners I could sent the same bitcoin to as many different people as I want. Who would stop me? .. well the miners would.</p>

<p>An example is a 51% attack. If a mining group or a miner gets 51% control of the mining power in the network this can happen:</p>

<p>"The attackers would be able to prevent new transactions from gaining confirmations, allowing them to halt payments between some or all users. They would also be able to reverse transactions that were completed while they were in control of the network, meaning they could double-spend coins."</p>

CC BY-SA 3.0
2018-03-16T20:56:36.503Z
2018-03-16T20:56:36.503Z
Marc Alexander
<p>It seems that if most transactions are valid, a miner could save a little time and increase its chance of mining a block by not validating.  Is the reason that there are enough invalid transactions to make this an ineffective strategy, because the risk of having mined an invalid block is not worth the time savings?</p>

<p>I have a similar question about verifying/validating blocks, and maybe the answer is similar, too.</p>

<mining-theory><block-validity>
Why do miners validate transactions?
MRP
# Why do miners validate transactions?

(Asked by: username_0 on 2018-03-14)

It seems that if most transactions are valid, a miner could save a little time and increase its chance of mining a block by not validating. Is the reason that there are enough invalid transactions to make this an ineffective strategy, because the risk of having mined an invalid block is not worth the time savings?

I have a similar question about verifying/validating blocks, and maybe the answer is similar, too.

**Tags:** mining-theory, block-validity


---

## 3 answers

### Answer by username_1 on 2018-04-20. Score: 2

While invalid transactions are uncommon, transaction and block validation is a minuscule effort in comparison to the effort expended on mining that can be easily parallelized with the mining process.

The cost of including an invalid transaction or building on top of an invalid block, however, is potentially losing a block reward and mining on top of an invalid chain-tip until the remaining network pulls ahead and you reorganize to the valid chain-tip.

Note, that something similar already happened in the past: On 2015-07-04 when BIP66 activated, roughly half the mining power was split off due to "SPV mining" without checking block validity, even though they were signaling support for the activation of BIP66. [The result were two invalid chain-tips of six and three blocks.](https://bitcoin.org/en/alert/2015-07-04-spv-mining)


---

### Answer by username_2 on 2018-03-16. Score: 1

> Why do miners validate transactions?

Because they want to create blocks, that contain valid transactions. After sending the block to the network, other nodes verify the block for correctness. If the block is rejected, the possibility to "win" is lost...

> invalid transactions

you seem to postulate, that there are many invalid transactions. I am not convinced, this is the case. Yes, everyone can send a tx to the network. This tx would end up in any of the approx. 10.000 nodes. There are far less miners, so the full nodes already filter invalid transactions. A particular wallet is usually not connected directly to a miner. As full nodes validate transactions, the probability that a full node forwards a wrong tx is minimal. If a full node does, there is other nodes, which verify the tx as well, and if this nodes sends faulty tx, he gets ignored by other nodes. I just wanted to state this, to make clear, that malicious crafted transactions have a hard time to make it through to a miner. And yes, the miner himself can generate false transactions, but then again looses all possibilities to win a block.

> Is the reason that there are enough invalid transactions to make this
> an ineffective strategy, because the risk of having mined an invalid
> block is not worth the time savings?

As I tried to explain before, invalid tx are not a common thing. Miners strategy is currently to win a block, maybe with some fees along. So each miner can decide individually, what he puts as "winning strategy". There are often blocks with zero transactions, or very view tx, cause currently the block reward is much higher than fees. This seems to be a valid strategy, not the invalid tx.

> **Comments:**
> **username_0**: That's my point. If invalid transactions are uncommon, why do miners bother to validate?  Sure, sometimes a miner would mine an invalid block and lose the reward, but most of the time the miner would save time and still mine a valid block.  
> **username_3**: @username_0 "uncommon" is the wrong metric to consider. They are uncommon *because* miners validate. If miners didn't, it'd be trivial to cause them to lose money by creating invalid transactions deliberately.  

---

### Answer by username_4 on 2018-03-16. Score: 0

The miners validate transactions to secure the network and in turn get rewarded for doing so. The miners are what prevent double spending and actually deliver the payments through the blockchain. Without the miners I could sent the same bitcoin to as many different people as I want. Who would stop me? .. well the miners would.

An example is a 51% attack. If a mining group or a miner gets 51% control of the mining power in the network this can happen:

"The attackers would be able to prevent new transactions from gaining confirmations, allowing them to halt payments between some or all users. They would also be able to reverse transactions that were completed while they were in control of the network, meaning they could double-spend coins."


---

