<blockquote>
  <p>But why do miners consent that some other miner managed to mine a valid block before them? Why don't they claim that some other miner's block is invalid even if it actually isn't, and buy time to mine one themselves? Is it because all non-miners will validate anyway and miners don't want to risk having a discarded chain?</p>
</blockquote>

<p>Yes, it's precisely because of the behavior of honest non-miners.</p>

<p>If miners want to get paid, their blocks have to be accepted by the honest non-miners who are willing to buy bitcoin from them. Honest non-miners accept only valid blocks and prefer the "longest" chain of such blocks.</p>

<p>If a miner ignores a valid block, they will produce a shorter chain if they successfully mine a block. So they are less likely to get paid. If a miner mines on top of an invalid block, there is zero chance any honest non-miner would ever accept their block, so they can't possibly get paid.</p>

<p>So miners are incentivized to validate every block before they mine on top of it and to mine on top of the "longest" valid chain they can find at any particular time.</p>

CC BY-SA 4.0
2020-04-26T22:42:06.403Z
2020-04-26T22:42:06.403Z
David Schwartz
<blockquote>
  <p>But why do miners consent that some other miner managed to mine a valid block before them? </p>
</blockquote>

<p>Any miner that is spending resources to find a new block will want to ensure that they are spending those resources in a way which gives them the highest chance of finding a valid block. Doing anything which lowers this chance is counter to their incentives, especially considering the competitive nature of mining. </p>

<p>So consider that when a miner hears about a new block, they would have two options: </p>

<ul>
<li>Start mining on top of the new block</li>
<li>Ignore the new block, keep mining on the old one</li>
</ul>

<p>With option one, if the miner is successful in finding the next new block, then they will receive the block reward for it.</p>

<p>With option two, if the miner is successful in finding a valid block, they will submit it to the network, <em>but the network will already have heard about the other block at that same height.</em> In this case, the rest of the network's miners will have already been mining on the block our miner chose to ignore. So now our block-ignoring miner will have to mine <em>another</em> block, so that their chain will become longer than the other chain that the other miners are working on. Otherwise, if the other miners extend their chain first, <strong>our block-ignoring miner will have wasted resources trying to create their own chain!</strong> </p>

<p>If the other miners have more hashpower than the block-ignoring miner, then it is very likely the block-ignoring miner will fail. Consider that if you had 10% of the hashpower, you would fail to find the next block 90% of the time. And of course finding two blocks in a row is even harder!</p>

<p>Remember that mining is a memoryless, poisson distributed process, which means that every individual attempt at finding a valid hash has an equal probability of success. Think of it like rolling a di: if you roll ten '5's in a row, your chance of rolling a '5' on the next roll is still (1/6). The same principle applies to mining. </p>

<blockquote>
  <p>Why don't they claim that some other miner's block is invalid even if it actually isn't, and buy time to mine one themselves?</p>
</blockquote>

<p>Every node on the network checks to see if each new block is valid, so there is no way for a miner to 'claim a block is invalid'. It simply is valid, or is not, this is easy for nodes to verify themselves. </p>

<blockquote>
  <p>Is it because all non-miners will validate anyway and miners don't want to risk having a discarded chain?</p>
</blockquote>

<p>Yes. </p>

CC BY-SA 4.0
2020-04-26T17:09:09.417Z
very well explained
Aditya
CC BY-SA 4.0
2020-04-26T07:41:57.573Z
2020-04-26T07:59:01.577Z
2020-04-26T07:59:01.577Z
chytrik
<p>The miners gather up as many transactions as can fit into a block, and go through a mathematical process to verify the block and add it to the chain of past blocks. Miners are then rewarded in freshly minted bitcoin for contributing their computing resources to the network. Validated transactions are stored into a block and are sealed by a lock (hash). This block becomes part of the blockchain when other computers in the network validate if the lock on the block is correct. Now the transaction is part of the blockchain and can not be altered in any way.</p>

CC BY-SA 4.0
2020-04-26T08:03:14.640Z
Hey Lilmighty, this answer does a decent job of describing the mining process. I'd have the nit that finality of transactions is always probabilistic as a competing valid chain-tip of greater length could displace a previously created chain-tip. However, the question here was more specifically about the incentives of miners to move to mining the next block which this answer  doesn't cover yet.
Murch
CC BY-SA 4.0
2020-04-26T08:11:43.107Z
@Murch...after I re-read the question then my answer I was just starting to realize that. Thank you for the feedback tho! I need it, that was only my 2nd answer ever!
Lilmighty
CC BY-SA 4.0
2020-04-26T07:49:17.393Z
2020-04-26T07:49:17.393Z
Lilmighty
<p>Mining is a random, progress-free process. Miners are essentially attempting to find a partial pre-image of a hash. Each new (valid) block candidate has exactly the same minuscule chance of yielding a new block. This means that finding a block for the next height is just as likely as finding a block that competes with the current chain-tip.</p>
<p>However, finding the next block is a lot more profitable: the current chain-tip has already been relayed to a large part of the network and all other miners are trying to find it's successor. Mining has a real cost, and only blocks that end up being a part of the best chain get paid out. To successfully compete with the current chain-tip, the miner would have to first find that competing block and then another to make it part of the best chain. It doesn't make sense for a single miner to try to find two blocks while all remaining miners together only need to find one more block to thwart him. Rather, the miner will spend a <a href="https://bitcoin.stackexchange.com/a/80540/5406">fraction of a second</a> to validate the current chain-tip and try to find the next block.</p>
<p>There are two exception to the above behavior: Firstly, when a miner controls a significant portion of the total hashrate, they can theoretically attempt to increase their revenue disproportionately by starting to mine on new found blocks before publishing them, gambling on finding two blocks before the remaining network does. This attack is referred to as<a href="/questions/tagged/selfish-mining" class="post-tag" title="show questions tagged &#39;selfish-mining&#39;" rel="tag">selfish-mining</a>. Secondly, when a miner controls at least half of all mining power, they can maintain a monopoly on creating blocks by ignoring all foreign blocks and outhashing all other mining power in a so-called <a href="/questions/tagged/majority-attack" class="post-tag" title="show questions tagged &#39;majority-attack&#39;" rel="tag">majority-attack</a>. This is a popularly discussed failure scenario for Bitcoin and would likely undermine trust in Bitcoin altogether.</p>

CC BY-SA 4.0
2020-04-27T13:18:19.193Z
Is there something preventing the majority-attack from claiming credit for the foreign block instead of just ignoring it?
JollyJoker
CC BY-SA 4.0
2020-04-27T14:49:05.860Z
@JollyJoker: Assuming that with "claiming credit" you mean "changing the coinbase transaction to send the block reward to the attacker", yes: they'd have to change a transaction in a block. Changing a transaction by any byte will change the transaction's id. This will mean that the Merkle root no longer matches the block's transaction body, so they have to update the Merkle root. Changing the Merkle root changes the hash of the block header, which invalidates the proof of work. ⇒ changing any byte in a block means starting over.
Murch
CC BY-SA 4.0
2020-04-26T07:29:44.847Z
2021-03-28T15:48:35.887Z
2021-03-28T15:48:35.887Z
Murch
<p>I understand that to mine a block, miners solve a cryptographic problem and the solution can be easily verified by other nodes on the network, appending the new block to their blockchain.</p>

<p>But why do miners consent that some other miner managed to mine a valid block before them?
Why don't they claim that some other miner's block is invalid even if it actually isn't, and buy time to mine one themselves?
Is it because all non-miners will validate anyway and miners don't want to risk having a discarded chain?</p>

<mining-theory><block-validity>
Do miners validate each other's blocks?
flair91023
# Do miners validate each other's blocks?

(Asked by: username_0 on 2020-04-26)

I understand that to mine a block, miners solve a cryptographic problem and the solution can be easily verified by other nodes on the network, appending the new block to their blockchain.

But why do miners consent that some other miner managed to mine a valid block before them?
Why don't they claim that some other miner's block is invalid even if it actually isn't, and buy time to mine one themselves?
Is it because all non-miners will validate anyway and miners don't want to risk having a discarded chain?

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


---

## 4 answers

### Answer by username_5 on 2020-04-26. Score: 11 | Accepted answer

Mining is a random, progress-free process. Miners are essentially attempting to find a partial pre-image of a hash. Each new (valid) block candidate has exactly the same minuscule chance of yielding a new block. This means that finding a block for the next height is just as likely as finding a block that competes with the current chain-tip.

However, finding the next block is a lot more profitable: the current chain-tip has already been relayed to a large part of the network and all other miners are trying to find it's successor. Mining has a real cost, and only blocks that end up being a part of the best chain get paid out. To successfully compete with the current chain-tip, the miner would have to first find that competing block and then another to make it part of the best chain. It doesn't make sense for a single miner to try to find two blocks while all remaining miners together only need to find one more block to thwart him. Rather, the miner will spend a [fraction of a second](https://bitcoin.stackexchange.com/a/80540/5406) to validate the current chain-tip and try to find the next block.

There are two exception to the above behavior: Firstly, when a miner controls a significant portion of the total hashrate, they can theoretically attempt to increase their revenue disproportionately by starting to mine on new found blocks before publishing them, gambling on finding two blocks before the remaining network does. This attack is referred to as[selfish-mining](/questions/tagged/selfish-mining "show questions tagged 'selfish-mining'"). Secondly, when a miner controls at least half of all mining power, they can maintain a monopoly on creating blocks by ignoring all foreign blocks and outhashing all other mining power in a so-called [majority-attack](/questions/tagged/majority-attack "show questions tagged 'majority-attack'"). This is a popularly discussed failure scenario for Bitcoin and would likely undermine trust in Bitcoin altogether.

> **Comments:**
> **username_6**: Is there something preventing the majority-attack from claiming credit for the foreign block instead of just ignoring it?  
> **username_5**: @username_6: Assuming that with "claiming credit" you mean "changing the coinbase transaction to send the block reward to the attacker", yes: they'd have to change a transaction in a block. Changing a transaction by any byte will change the transaction's id. This will mean that the Merkle root no longer matches the block's transaction body, so they have to update the Merkle root. Changing the Merkle root changes the hash of the block header, which invalidates the proof of work. ⇒ changing any byte in a block means starting over.  

---

### Answer by username_2 on 2020-04-26. Score: 9

> But why do miners consent that some other miner managed to mine a valid block before them?

Any miner that is spending resources to find a new block will want to ensure that they are spending those resources in a way which gives them the highest chance of finding a valid block. Doing anything which lowers this chance is counter to their incentives, especially considering the competitive nature of mining.

So consider that when a miner hears about a new block, they would have two options:

* Start mining on top of the new block
* Ignore the new block, keep mining on the old one

With option one, if the miner is successful in finding the next new block, then they will receive the block reward for it.

With option two, if the miner is successful in finding a valid block, they will submit it to the network, *but the network will already have heard about the other block at that same height.* In this case, the rest of the network's miners will have already been mining on the block our miner chose to ignore. So now our block-ignoring miner will have to mine *another* block, so that their chain will become longer than the other chain that the other miners are working on. Otherwise, if the other miners extend their chain first, **our block-ignoring miner will have wasted resources trying to create their own chain!**

If the other miners have more hashpower than the block-ignoring miner, then it is very likely the block-ignoring miner will fail. Consider that if you had 10% of the hashpower, you would fail to find the next block 90% of the time. And of course finding two blocks in a row is even harder!

Remember that mining is a memoryless, poisson distributed process, which means that every individual attempt at finding a valid hash has an equal probability of success. Think of it like rolling a di: if you roll ten '5's in a row, your chance of rolling a '5' on the next roll is still (1/6). The same principle applies to mining.

> Why don't they claim that some other miner's block is invalid even if it actually isn't, and buy time to mine one themselves?

Every node on the network checks to see if each new block is valid, so there is no way for a miner to 'claim a block is invalid'. It simply is valid, or is not, this is easy for nodes to verify themselves.

> Is it because all non-miners will validate anyway and miners don't want to risk having a discarded chain?

Yes.

> **Comments:**
> **username_3**: very well explained  

---

### Answer by username_1 on 2020-04-26. Score: 6

> But why do miners consent that some other miner managed to mine a valid block before them? Why don't they claim that some other miner's block is invalid even if it actually isn't, and buy time to mine one themselves? Is it because all non-miners will validate anyway and miners don't want to risk having a discarded chain?

Yes, it's precisely because of the behavior of honest non-miners.

If miners want to get paid, their blocks have to be accepted by the honest non-miners who are willing to buy bitcoin from them. Honest non-miners accept only valid blocks and prefer the "longest" chain of such blocks.

If a miner ignores a valid block, they will produce a shorter chain if they successfully mine a block. So they are less likely to get paid. If a miner mines on top of an invalid block, there is zero chance any honest non-miner would ever accept their block, so they can't possibly get paid.

So miners are incentivized to validate every block before they mine on top of it and to mine on top of the "longest" valid chain they can find at any particular time.


---

### Answer by username_4 on 2020-04-26. Score: 0

The miners gather up as many transactions as can fit into a block, and go through a mathematical process to verify the block and add it to the chain of past blocks. Miners are then rewarded in freshly minted bitcoin for contributing their computing resources to the network. Validated transactions are stored into a block and are sealed by a lock (hash). This block becomes part of the blockchain when other computers in the network validate if the lock on the block is correct. Now the transaction is part of the blockchain and can not be altered in any way.

> **Comments:**
> **username_5**: Hey username_4, this answer does a decent job of describing the mining process. I'd have the nit that finality of transactions is always probabilistic as a competing valid chain-tip of greater length could displace a previously created chain-tip. However, the question here was more specifically about the incentives of miners to move to mining the next block which this answer  doesn't cover yet.  
> **username_4**: @username_5...after I re-read the question then my answer I was just starting to realize that. Thank you for the feedback tho! I need it, that was only my 2nd answer ever!  

---

