<p>The thing to remember here is that a Bitcoin is valid if people think it is valid (i.e. is willing to accept it as payment).  When you mine a block, you get coins, no matter where the block is in the blockchain (even if you fork it into a block-tree).  However, these coins you just minted are only valuable to people who think they are valuable.  Bitcoin has a general rule that one should consider the longest blockchain (or, more precisely, the highest difficulty blockchain) to be the best.</p>

<p>If you tried to fork the blockchain by mining your own block out of the middle of the chain, rather than the end, you would mine coins, but find it hard to actually spend them.  Few people (if any) would be willing to accept your coins as payment because there is a much longer blockchain out there (the main block chain), so it is highly unlikely that your coins will be recognized as useful tender.</p>

<p>Added to this, the proof of work for bitcoin does not benefit in any way from partial work.  If you are 99.9999999999% of the way to mining a block and someone announces a block before you get there, it is still in your best interest to start mining off of their block immediately, because there's 0 advantage to continuing to mine your old block, and plenty of disadvantages.  In fact, you don't even know how close you are to mining a block, due to the randomness of the process.</p>

<p>(At least, this is true assuming all blocks are worth the same.  If, for some reason, one individual transaction had some massive transaction fee on it (say, 1000BTC), and someone else just nabbed it, it might be worth trying to finish mining the block yourself and fight them for that block.  You would, however, be fighting an uphill battle since they announced it first.  But those are edge cases)</p>

CC BY-SA 3.0
2018-01-01T17:14:49.223Z
"If you are 99.9999999999% of the way to mining a block" That's confusing phrasing. Do you mean "You have a hash with 40 bits matching the target"? Given that partial work doesn't count, after each hash you're either done or no closer than you started (well, technically you've eliminated one possibility out of 2^whatever). So there's no such thing as "99.9999999999%" done.
Acccumulation
CC BY-SA 3.0
2018-01-01T17:43:12.133Z
@Acccumulation You're right.  I'm not sure if there's a clean way of saying what I wanted to say there.  The idea I was going towards was if you had an oracle that could tell the future, and they said you would have to do 40,000,000,000,000 hashes to mine this block (i.e. your 40 trillionth one was the lucky one), and you were at 39,999,999,999,998 when someone else posted their block, it's still more effective to abandon the block you thought you were mining.
Cort Ammon
CC BY-SA 4.0
2018-08-14T01:11:22.660Z
@CortAmmon Err, why would it still be more effective to abandon if you know you're only 2 hashes away from posting your own block? What if this Oracle also told you, you would be one of the first few nodes to receive your competitors block?
Ash
CC BY-SA 4.0
2018-08-14T01:18:21.447Z
@Ash True.  The issue is that, when you receive a block, that's a good indicator that others have received it and are working on the next block in that chain as well.  If you had a way to get others to work on your block (such as knowing that your competetor's block was not widely distributed, and you can distribute yours "better"), then there would be a balance between continuing and abandoning, and my extreme numbers would probably be less than ideal.
Cort Ammon
CC BY-SA 3.0
2018-01-01T00:17:31.223Z
2018-01-01T00:17:31.223Z
Cort Ammon
<p>it would have to be a coordinated effort between over 50% of miners, known colloquially as a <a href="https://www.investopedia.com/terms/1/51-attack.asp" rel="noreferrer">51% attack</a>. <em>then</em> they could reject any blocks not their own. otherwise Matthew Stannard's answer applies.</p>

CC BY-SA 3.0
2017-12-31T23:06:27.557Z
Correct me if I'm wrong, but the 51% attack means that one entity controls 51% of the mining power and could therefore reject an honest mined block until they come up with it on their own.  But I'm asking If someone controlled 25% of the mining power and someone else controlled 26%, could those two people get together and decide to reject an honest-mined block on teh current longest chain?
Dave
CC BY-SA 3.0
2018-01-01T00:29:24.673Z
since 25+26=51, yes.
jcomeau_ictx
CC BY-SA 3.0
2018-01-01T00:32:36.663Z
@Dave: It's math.  It doesn't care about the difference between people, organizations, and temporary alliances to screw over one miner.  They're all mathematically equivalent cases.
Kevin
CC BY-SA 3.0
2017-12-31T22:04:46.290Z
2017-12-31T22:04:46.290Z
jcomeau_ictx
<p>The (partly social, partly technical) rule is that the <em>longest</em> branch of the blockchain is the one that counts as <strong>the</strong> Bitcoin blockchain.</p>

<p>If your newly mined block is the highest-numbered valid block in existence, other miners will have an interest in mining on top of that, because that gives them a chance to reach an even higher number, and thus minimizes the risk that the next block <em>they</em> mine will end up being and abandoned branch.</p>

<p>If you and someone else mine a block with the same number before either of you hears of the other's discovery, there's no guarantee about which of them people will try to mine ahead from. (This is your incentive to keep yourself appraised of new blocks being discovered). But as soon as <em>someone</em> finds a block the builds upon either your block or the other guy's, that will now be the longest existing branch and everyone will flock towards that for their further work.</p>

<p>Most of the time mining block n+1 carries exactly the same reward as block n, so there's no reason <em>not</em> to be working from the best known chain head. Just around the time when the reward decreases, there <em>may</em> be some shuffling to get into the last higher-reward block, but as soon as there are a few of the last-higher-reward block number floating around, it becomes a better bet to mine for a higher number (and therefore better chance of staying in the chain).</p>

CC BY-SA 3.0
2018-01-01T01:50:57.103Z
2018-01-01T01:50:57.103Z
hmakholm left over Monica
<p>The rule non-miners follow is that the longest chain wins. Miners need their blocks to be accepted by non-miners because it's non-miners (like exchanges and wallet providers) that decide which bitcoins have actual value.</p>

<p>A miner who mines after your block will have the longest chain if he finds a block. A miner who ignores your block has to mine a block just to tie the longest chain and then mine another block to have the longest chain. The odds of him being able to mine two blocks before anyone else finds a block after your block are very, very low unless he controls (or conspires with) a very high proportion of mining power.</p>

<p>So if he wants to get paid if he mines a block, he has a very strong incentive to mine after yours.</p>

CC BY-SA 3.0
2018-01-02T02:51:59.600Z
Hi, you say, "The odds of him being able to mine two blocks before anyone else finds a block after your block are very, very low" but in the comments to Cort's answer, the point is made you don't know how close you are to mining a block, so couldn't someone luck out and just happen to find those nonce's that result in two consecutive blocks being mined?  What formula dictatse these odds you speak of?
Dave
CC BY-SA 3.0
2018-01-02T19:13:10.627Z
@Dave Someone could luck out in that way, but they have no way to know that they will. So it would make no sense for them to take the risk that they won't.
David Schwartz
CC BY-SA 3.0
2018-01-01T20:49:05.190Z
2018-01-01T20:49:05.190Z
David Schwartz
<p>People work on the longest chain because they expect other people to work on the longer chain. If there was a general sentiment of "We should ignore Dave's blocks", then miners would indeed avoid a blockchain with your blocks in it, because they expect others to not validate any blocks they mine on that chain. Otherwise, they would be mining a block that they have no reason to expect would be accepted. And even if there were some anti-Dave conspiracy, this would be counterproductive because the value of bitcoin lies in its perception of security. Gaming the system would decrease the legitimacy of bitcoin and therefore make the bitcoins they just mined less valuable. If a consortium of 51% of the mining power were to take over bitcoin, why would anyone not in that consortium want to buy bitcoin?</p>

<p>As for the decreasing reward, that really only applies to one block per halving, and halving are rare; there's only been two so far.</p>

CC BY-SA 3.0
2018-01-01T17:45:31.690Z
2018-01-01T17:45:31.690Z
Acccumulation
<p>The incentive to mine on the currently longest chain is that there is a risk to the dishonest miner that honest, non-mining nodes may have already propagated the first block and hence reject and not propagate the second block found at an equal block height.</p>

<p>As Proof of Work is not reusable this leads the dishonest miner to waste resources.</p>

CC BY-SA 3.0
2017-12-31T23:04:48.413Z
Thanks but I'm not asking about the incentive to mine I'm asking about why the incentive for other non-mining nodes to accept a newly mined block on teh current longest chain.  I mean could they theoretically all be a-holes and say, "Hey we don't like you so we're going to reject your block and let someone else mine hte current longest chain."
Dave
CC BY-SA 3.0
2017-12-31T23:10:26.930Z
There is no direct incentive. Nodes could arbitrarily reject blocks, but it's not possible to know their point of origin with any certainty. A node couldn't reliable keep rejecting a single miners blocks.
Matthew Stannard
CC BY-SA 3.0
2018-01-01T18:55:16.063Z
There is a lot of risk to rejecting the longest chain. If you decide to reject the most recent block and try to mine your own version of it, there is no guarantee that the network will choose your block over the first one. It is more likely that the first one will be chosen because nodes will only accept the first block they see at a given block height. So there's risk there that you are just wasting energy on a block that won't be accepted and thus you don't get paid.
Ava Chow
CC BY-SA 3.0
2018-01-02T02:47:21.117Z
@AndrewChow, when you say, "nodes will only accept the first block they see at a given block height" ... why?  Is this part of the Bitcoin software?  What guarantees that this is the case?
Dave
CC BY-SA 3.0
2018-01-02T03:04:39.070Z
@Dave Bitcoin primarily works on a first come first serve basis. Of course there are exceptions to that, but generally the first thing that a node receives is what it accepts as true. In the case of blocks, this is overridden by the most work chain rule, but until that happens, it sticks with the first block it sees. There is no guarantee that that becomes part of the most work chain, and if it does not, then it will switch to the competing block at that height that is part of the most work chain. It is part of the software and has been since Bitcoin's creation.
Ava Chow
CC BY-SA 3.0
2018-01-02T21:03:49.613Z
Ok, thanks for that clarification, that makes sense.
Dave
CC BY-SA 3.0
2018-01-09T07:58:27.573Z
I'm curious if there's any game theoretic explanation for this. E.g. would we reach a nash equilibrium if everybody accepts proper blocks mined by other miners.
Bitswazsky
CC BY-SA 3.0
2018-01-09T17:49:28.160Z
Interestingly enough, since answering the question I was introduced to [this](http://randomwalker.info/publications/mining_CCS.pdf) paper which shows that my answer only applies when there is a constant block reward. When the income of miners is dependent on transaction fees with a potentially high variance, then the incentives to behave honestly breakdown and miners are likely to engage in [Undercutting](https://bitcoin.stackexchange.com/questions/67697/can-undercutting-attacks-be-mitigated) strategies.
Matthew Stannard
CC BY-SA 4.0
2018-08-13T22:21:21.217Z
Funny how Andrew Chow’s first comment is the closest thing to actually addressing the question.
Ash
CC BY-SA 3.0
2017-12-31T21:23:38.373Z
2017-12-31T21:23:38.373Z
Matthew Stannard
<p>When a miner finds a hash and is thus able to confirm a block of transactions, that miner will then broadcast the confirmation (block?) to the other Bitcoin nodes so that it can be added to the blockchain. My question is, what is the incentive for other nodes to accept this mined block, even if it is correct and checks out against older blocks? I ask because if the reward for mining blocks decreases over time, other nodes may selfishly not want to accept this miner's effort and prefer to figure it out on their own for a greater reward now than later.   </p>

<blockchain><unconfirmed-transactions><block><mining-theory>
So I mined a block, but why would other nodes accept my mined block?
Dave
# So I mined a block, but why would other nodes accept my mined block?

(Asked by: username_0 on 2017-12-31)

When a miner finds a hash and is thus able to confirm a block of transactions, that miner will then broadcast the confirmation (block?) to the other Bitcoin nodes so that it can be added to the blockchain. My question is, what is the incentive for other nodes to accept this mined block, even if it is correct and checks out against older blocks? I ask because if the reward for mining blocks decreases over time, other nodes may selfishly not want to accept this miner's effort and prefer to figure it out on their own for a greater reward now than later.

**Tags:** blockchain, unconfirmed-transactions, block, mining-theory


---

## 6 answers

### Answer by username_8 on 2017-12-31. Score: 16 | Accepted answer

The incentive to mine on the currently longest chain is that there is a risk to the dishonest miner that honest, non-mining nodes may have already propagated the first block and hence reject and not propagate the second block found at an equal block height.

As Proof of Work is not reusable this leads the dishonest miner to waste resources.

> **Comments:**
> **username_0**: Thanks but I'm not asking about the incentive to mine I'm asking about why the incentive for other non-mining nodes to accept a newly mined block on teh current longest chain.  I mean could they theoretically all be a-holes and say, "Hey we don't like you so we're going to reject your block and let someone else mine hte current longest chain."  
> **username_8**: There is no direct incentive. Nodes could arbitrarily reject blocks, but it's not possible to know their point of origin with any certainty. A node couldn't reliable keep rejecting a single miners blocks.  
> **username_9**: There is a lot of risk to rejecting the longest chain. If you decide to reject the most recent block and try to mine your own version of it, there is no guarantee that the network will choose your block over the first one. It is more likely that the first one will be chosen because nodes will only accept the first block they see at a given block height. So there's risk there that you are just wasting energy on a block that won't be accepted and thus you don't get paid.  
> **username_0**: @AndrewChow, when you say, "nodes will only accept the first block they see at a given block height" ... why?  Is this part of the Bitcoin software?  What guarantees that this is the case?  
> **username_9**: @username_0 Bitcoin primarily works on a first come first serve basis. Of course there are exceptions to that, but generally the first thing that a node receives is what it accepts as true. In the case of blocks, this is overridden by the most work chain rule, but until that happens, it sticks with the first block it sees. There is no guarantee that that becomes part of the most work chain, and if it does not, then it will switch to the competing block at that height that is part of the most work chain. It is part of the software and has been since Bitcoin's creation.  
> **username_0**: Ok, thanks for that clarification, that makes sense.  
> **username_10**: I'm curious if there's any game theoretic explanation for this. E.g. would we reach a nash equilibrium if everybody accepts proper blocks mined by other miners.  
> **username_8**: Interestingly enough, since answering the question I was introduced to [this](http://randomwalker.info/publications/mining_CCS.pdf) paper which shows that my answer only applies when there is a constant block reward. When the income of miners is dependent on transaction fees with a potentially high variance, then the incentives to behave honestly breakdown and miners are likely to engage in [Undercutting](https://bitcoin.stackexchange.com/questions/67697/can-undercutting-attacks-be-mitigated) strategies.  
> **username_3**: Funny how Andrew username_9’s first comment is the closest thing to actually addressing the question.  

---

### Answer by username_1 on 2018-01-01. Score: 6

The thing to remember here is that a Bitcoin is valid if people think it is valid (i.e. is willing to accept it as payment). When you mine a block, you get coins, no matter where the block is in the blockchain (even if you fork it into a block-tree). However, these coins you just minted are only valuable to people who think they are valuable. Bitcoin has a general rule that one should consider the longest blockchain (or, more precisely, the highest difficulty blockchain) to be the best.

If you tried to fork the blockchain by mining your own block out of the middle of the chain, rather than the end, you would mine coins, but find it hard to actually spend them. Few people (if any) would be willing to accept your coins as payment because there is a much longer blockchain out there (the main block chain), so it is highly unlikely that your coins will be recognized as useful tender.

Added to this, the proof of work for bitcoin does not benefit in any way from partial work. If you are 99.9999999999% of the way to mining a block and someone announces a block before you get there, it is still in your best interest to start mining off of their block immediately, because there's 0 advantage to continuing to mine your old block, and plenty of disadvantages. In fact, you don't even know how close you are to mining a block, due to the randomness of the process.

(At least, this is true assuming all blocks are worth the same. If, for some reason, one individual transaction had some massive transaction fee on it (say, 1000BTC), and someone else just nabbed it, it might be worth trying to finish mining the block yourself and fight them for that block. You would, however, be fighting an uphill battle since they announced it first. But those are edge cases)

> **Comments:**
> **username_2**: "If you are 99.9999999999% of the way to mining a block" That's confusing phrasing. Do you mean "You have a hash with 40 bits matching the target"? Given that partial work doesn't count, after each hash you're either done or no closer than you started (well, technically you've eliminated one possibility out of 2^whatever). So there's no such thing as "99.9999999999%" done.  
> **username_1**: @username_2 You're right.  I'm not sure if there's a clean way of saying what I wanted to say there.  The idea I was going towards was if you had an oracle that could tell the future, and they said you would have to do 40,000,000,000,000 hashes to mine this block (i.e. your 40 trillionth one was the lucky one), and you were at 39,999,999,999,998 when someone else posted their block, it's still more effective to abandon the block you thought you were mining.  
> **username_3**: @username_1 Err, why would it still be more effective to abandon if you know you're only 2 hashes away from posting your own block? What if this Oracle also told you, you would be one of the first few nodes to receive your competitors block?  
> **username_1**: @username_3 True.  The issue is that, when you receive a block, that's a good indicator that others have received it and are working on the next block in that chain as well.  If you had a way to get others to work on your block (such as knowing that your competetor's block was not widely distributed, and you can distribute yours "better"), then there would be a balance between continuing and abandoning, and my extreme numbers would probably be less than ideal.  

---

### Answer by username_4 on 2017-12-31. Score: 5

it would have to be a coordinated effort between over 50% of miners, known colloquially as a [51% attack](https://www.investopedia.com/terms/1/51-attack.asp). *then* they could reject any blocks not their own. otherwise username_8 username_8's answer applies.

> **Comments:**
> **username_0**: Correct me if I'm wrong, but the 51% attack means that one entity controls 51% of the mining power and could therefore reject an honest mined block until they come up with it on their own.  But I'm asking If someone controlled 25% of the mining power and someone else controlled 26%, could those two people get together and decide to reject an honest-mined block on teh current longest chain?  
> **username_4**: since 25+26=51, yes.  
> **username_5**: @username_0: It's math.  It doesn't care about the difference between people, organizations, and temporary alliances to screw over one miner.  They're all mathematically equivalent cases.  

---

### Answer by username_6 on 2018-01-01. Score: 3

The (partly social, partly technical) rule is that the *longest* branch of the blockchain is the one that counts as **the** Bitcoin blockchain.

If your newly mined block is the highest-numbered valid block in existence, other miners will have an interest in mining on top of that, because that gives them a chance to reach an even higher number, and thus minimizes the risk that the next block *they* mine will end up being and abandoned branch.

If you and someone else mine a block with the same number before either of you hears of the other's discovery, there's no guarantee about which of them people will try to mine ahead from. (This is your incentive to keep yourself appraised of new blocks being discovered). But as soon as *someone* finds a block the builds upon either your block or the other guy's, that will now be the longest existing branch and everyone will flock towards that for their further work.

Most of the time mining block n+1 carries exactly the same reward as block n, so there's no reason *not* to be working from the best known chain head. Just around the time when the reward decreases, there *may* be some shuffling to get into the last higher-reward block, but as soon as there are a few of the last-higher-reward block number floating around, it becomes a better bet to mine for a higher number (and therefore better chance of staying in the chain).


---

### Answer by username_7 on 2018-01-01. Score: 2

The rule non-miners follow is that the longest chain wins. Miners need their blocks to be accepted by non-miners because it's non-miners (like exchanges and wallet providers) that decide which bitcoins have actual value.

A miner who mines after your block will have the longest chain if he finds a block. A miner who ignores your block has to mine a block just to tie the longest chain and then mine another block to have the longest chain. The odds of him being able to mine two blocks before anyone else finds a block after your block are very, very low unless he controls (or conspires with) a very high proportion of mining power.

So if he wants to get paid if he mines a block, he has a very strong incentive to mine after yours.

> **Comments:**
> **username_0**: Hi, you say, "The odds of him being able to mine two blocks before anyone else finds a block after your block are very, very low" but in the comments to username_1's answer, the point is made you don't know how close you are to mining a block, so couldn't someone luck out and just happen to find those nonce's that result in two consecutive blocks being mined?  What formula dictatse these odds you speak of?  
> **username_7**: @username_0 Someone could luck out in that way, but they have no way to know that they will. So it would make no sense for them to take the risk that they won't.  

---

### Answer by username_2 on 2018-01-01. Score: 0

People work on the longest chain because they expect other people to work on the longer chain. If there was a general sentiment of "We should ignore username_0's blocks", then miners would indeed avoid a blockchain with your blocks in it, because they expect others to not validate any blocks they mine on that chain. Otherwise, they would be mining a block that they have no reason to expect would be accepted. And even if there were some anti-username_0 conspiracy, this would be counterproductive because the value of bitcoin lies in its perception of security. Gaming the system would decrease the legitimacy of bitcoin and therefore make the bitcoins they just mined less valuable. If a consortium of 51% of the mining power were to take over bitcoin, why would anyone not in that consortium want to buy bitcoin?

As for the decreasing reward, that really only applies to one block per halving, and halving are rare; there's only been two so far.


---

