Homework on Stale Blocks

  1. The miner placing the following block will choose the longest block (ie the block with most POW, the most difficult/lowest target) to build their block on top of. The transactions in the block which is not built on top of are returned to the mempool.

  2. A block which was briefly added to the blockchain but was not the first block to be built on top of. All txs of a stale block are returned to the mempool.

  3. When a competing block is not built on top of by another block from another miner.

  4. To reduce the risk of transactions within a stale block being verified.

1 Like
  1. If two miners solve a block at the same time the network will choose the longest blockchain with the most PoW to continue the chain. The other block will be removed from existence and the transactions sent back to the mempool.

  2. A stale block is a block that was once in the blockchain but was dropped due to a longer version of the blockchain competing at the same time.

  3. A stale block occurs when two miners solve a block at the same time - these two versions of the blockchain are sent out to the network, then other miners will be competing to solve both versions of the previous blocks. Only one version of the blockchain can continue and the other block - the stale block - will be dropped.

  4. Waiting for further blocks to be confirmed minimizes the risk of your transaction being in an orphaned/stale block, and being dropped from the chain.

:slight_smile:

1 Like
  1. both blocks will be propagted through the network

  2. is a valid block that is dropped out of the blockchain

  3. a stale block occur when another valid block is used to create a longer valid chain.

  4. because the block might become stale or orphaned and after 6 blocks that probability becomes insignificant.

1 Like

Hi there!! Maybe you meant the longest blockchain? The thing is, miners always store their version of blockchain they think is the truth. So, as long as they don’t receive information from other nodes telling them otherwise, they will build on top of their truth.

In this case, two version of the truth is created, and both are valid, just that some miners have one version, and some miners the other version. They will all try so solve the next block on top of their version of the blockchain. Once they find the solution to the block the whole network will then see that there is now a version of the blockchain with more PoW than the other, and will then update their data to follow it!

Hope this makes sense! If not, let me know and will try to explain it better!

Felipe.

1 Like

Thanks Felipe, yes I meant blockchain, thanks! That totally makes sense :smiley:

1: both blocks create a temporary split blockchain and they start propagating it to the network. Only when the next miner appends a block to 1 of the 2 chains, we’ll have the winning “split” chain.

2+3: A block that has been previously mined but hasn’t been approved by the network because mined not on the main chain. It gets dropped and all TXs stay unconfirmed and block rewards and tx fees taken back from the miner.

4: Because our transaction might be part of a orphaned block. In general 6 confirmations are enough to tell us that we are on the right chain.

1 Like
  1. What happens in the bitcoin network when two miners solve a block at the same time?

A. Both blocks are put on the blockchain. The longest subsequent blockchain is kept and the shorter of the two is dropped from the blockchain.

  1. What is a stale block?

A. A stale block is a block that was once on the block chain, but was dropped off.

  1. How do stale blocks occur?

A. Stale blocks occur when two block are mined at the same time. When the shorter of the two subsequent chains is dropped. The blocks in that chain are called stale blocks.

  1. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?

A. It is important to wait this for more than one block because of the ten minute rule. It should take ten minutes to mine each block. This gives the required time for confirmation before the next block is mined.

  1. What happens in the bitcoin network when two miners solve a block at the same time?
    The network splits momentarily as each chain works to solve the next block, then eventually one chain wins out, let’s say by finding the next nonce and exhibiting a longer blockchain with greater PoW. As the newly accepted block propagates through the network, the other block becomes “orphaned” or “stale” and is dropped by the network. Transactions from the blocks that are not adopted by the network are returned to the mempool.

  2. What is a stale block?
    A stale block is a block that gets mined at the same time as another block but eventually doesn’t get added to the network because the competing block wins out as other miners adopt it first.

  3. How do stale blocks occur?
    Stale blocks occur when two miners successfully mine a new block at the same time, however only one can ultimately become part of the true version of the blockchain to be adopted by the network. The block that ends up not being accepted is the stale block, sometimes referred to as orphaned.

  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    This is necessary to be assured that your transaction is picked up in a block that is accepted in the network as opposed to being confirmed in a stale block that will eventually be dropped from the network, in which case a transaction could still be changed.

1 Like
  1. When two miners solve a block at the same time they broadcast their version of the chain to the network. As each version of the chain is spread throughout the nodes miners assume their version of the chain to be the correct version and begin to build another block to their version of the chain. As long as the protocols are followed both chains are legitimate. The network must then decides which chain to adopt by selecting the longest chain.

  2. A stale block is a block that was added to the chain but was later abandoned by the network because a longer legitimate chain was broadcast by the network. The transactions in the stale block are returned to the mempool.

What happens to the fees paid to the miner? Must they wait for x amount of confirmations before the block reward and fees are paid?

  1. A stale block occurs when the network broadcasts a longer version of the chain than that which the block was added to.

  2. It is important to wait for more than one confirmation because a transaction could be confirmed by the network but later returned to the mempool because it was included in a now stale block. The transaction could then be removed from the mempool and the transaction never take place. This is the reason for the standard of waiting for six confirmations before assuming the transaction as actually taken place.

1 Like

Not really. The reason you should wait for more blocks to get mined is because your transaction might be part of an orphaned block. In that case your transaction might get dropped once the longest chain wins. :slight_smile:
For that reason you should wait for a few more blocks to get mined to be sure this won’t happen.

1 Like

As the transaction fees and the coinbase are also part of the stale block(s) they get dropped in the same way as other transactions once the longest chain wins.
Even if the miner would try to spend the transaction fees, they would be part of the shortest chain and would not count.

1 Like

Thats a little surprising. Thanks for your help Alko89 :+1:

2 Likes

you’re welcome @Keith :slight_smile: if you have any more questions feel free to ask

2 Likes

Exactly. You wouldn’t want to give a good to a customer and find out later that your transaction was reversed due to a stale block. 6 block confirmation is considered secure and irreversible. Keep up the good work. :slight_smile:

1.- There will be two different versions of the blockchain. But one of them will be discarded once the next miner starts mining the next block.

2.- Stale or orphan blocks are blocks that were correctly mined, but at the end rejected by the network

3.- When two different blocks are mined at the same time one of them will be rejected by the network depending on the next block being built on each version. The version of the blockchain that gets a newer node faster, adopts the node as valid and the other node gets rejected or called orphan or stale block.

4.- Because you can’t predict if the current block will become an orphan node. So after 6 blocks are created confirming your transaction you can be sure that it’s mathematically impossible to reverse this transaction.

Exactly. But the miner needs to mine the next block in order to invalidate the other chain.

1 Like

Replace nodes with blocks in your sentence. Node is usually a miner. When a new block gets accepted the one in the other chain will become a stale block. Hopefully that makes sense. :slight_smile:

1 Like

There is no such thing as an orphan node. A block can only become an orphan block, not a node.

Noted. I was mixing the definition and function of node and block. Thanks for double checking and fixing! :wink:

2 Likes

Makes sense. Thanks for fixing my answer! :slight_smile:

1 Like