1

I am aware this is related to this question. However, I am specifically curious about what would happen to the mining rewards, not the transactions, under a forking condition.

enter image description here As shown in the picture. Suppose at some point the blockchain starts branching. Each new block on each chain gets appended at the same time, until eventually the blue chain gets longer than the green chain due to G being mined faster. Then the green chain becomes invalid.

Does this mean the miners for A, B, C and D, E, F don't get mining rewards at all until a longer branch (in this case, the blue branch) is determined, then miners for D, E, F, G get rewards?

If so, what if a selfish miner releases two new blocks on the green chain after G is being appended? (As shown below) Does that mean the rewards get reversed again?

enter image description here

Thanks!


Edits:

Following up with one of the answers, suppose what we have in the following is a GLOBAL view of all the blocks on the whole blockchain system: enter image description here

So apparently the colored blocks become orphans. However, block #1 and block #3 seem to still get rewarded, except they can never spend those rewards. So does that mean the total number of bitcoins on the market will practically be smaller than 21 Million (after all the coins are mined), due to these orphan blocks? I.e., some coins are rewarded to the orphan blocks but they can never be used by anyone?

And do block 2, 4, and 5 also get rewarded (but can't spend those rewards)?

2 Answers 2

7

You have to distinguish between nodes' local view of the chain, and your global view when discussing here.

Every chain (meaning: a block together with all its direct and indirect ancestors) is a version of history. Within that chain, the block pays out to whomever mined the block. As far as miners on that chain goes, they are extending the chain they believe to be legitimate, and see themselves as being paid in the process. So B's miner believes it is being paid by B, and believes A is being paid by the parent block. Similar with C, seeing A and B being paid.

However, when the reorganization occurs, A, B, and C's miners, along with any nodes which saw those blocks first, realize they were working on a version of history that the network will (probably) not accept, and they switch over to the D-E-F-G chain, in which they are not paid.

Now, there is a rule in Bitcoin called maturity, which prevents the coins minted in blocks from being spent until 100 blocks have been mined on top. This prevents a situation where many transactions are invalidated because of a reorganization that removes the coinbase that formed the initial credit. After 100 blocks, it is highly unlikely a reorganization will still occur.

8
  • 1
    1. Within the A-B-C chain, yes; within the D-E-F-G chain, no. If you assume D-E-F-G is eventually the one that wins, and thus ~all nodes accept, in the long term, no. Commented Oct 24, 2021 at 18:57
  • 1
    You have to realize: nodes don't see or care about the whole picture; the network rules don't consider the entire tree, they function within one chain, and thus the answers to all these questions are "it depends on which chain your local view currently accepts", which can change over time. Commented Oct 24, 2021 at 18:59
  • 2
    2. A and B do get their reward, within the chain they are building. If that chain is extended by another 100 blocks, they will eventually be able to spend the coins within that chain. Commented Oct 24, 2021 at 19:01
  • 1
    3. What the total number of coins in circulation is depends on which chain you accept. In a reorganization, that chain changes, and thus the number of coins in circulation can also change. Commented Oct 24, 2021 at 19:02
  • 1
    Nodes accept among all otherwise valid (i.e. no invalid signatures etc.) chains, the chain with the highest total proof of work in it. If there are multiple, the one with the first-seen tip is accepted. Thus which chain a node accepts depends on aspects such as how close they are to miners, and their connectivity. There is no global consensus: nodes are never sure about any block that it will eventually be accepted by the rest of the network. It just becomes less and less likely to change, as more and more blocks are built on top. Commented Oct 24, 2021 at 19:05
1

The coinbase (or output with the mining reward) can only be spent after COINBASE_MATURITY has been reached which is set to 100 blocks. Hence a miner spending a coinbase that is later reversed is only a problem if there is a greater than a 100 block re-org. The chances of this happening on Bitcoin mainnet is infinitesimally small.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.