Homework on Stale Blocks

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

A1. When two (or more) miners compete to write their block to the blockchain the network will eventually (within 10 minute period) only accept one block/blockchain fork i.e. the longest (in terms of difficulty & with the highest PoW).

Any losing/rejected blocks will be dropped and returned to the mempool.

Q2. What is a stale block?

A2. Also often referred to as orphaned blocks, stale blocks are those that are initially created but then get dropped/rejected from the blockchain - i.e. due to another competing miner’s block been accepted to the blockchain network instead.

Q3. How do stale blocks occur?

A3. Stale blocks occur when 2 or more miners create their version (fork) of the block/blockchain.

Since only one version (with the highest Pow) eventually gets accepted by the network, all others are then dropped and become what are referred to as stale blocks.

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

A4. It is important to wait to make sure that each version of a block/blockchain is fully propagated across and accepted by the network and that it doesn’t become dropped because of another preferred competing version/fork.

1 Like
  1. What happens in the bitcoin network when two miners solve a block at the same time? Both blocks will be valid and as both blocks are propagated through the network another miner will add there block to one of the previous block and the one they add to will be the longest blockchain. Making it the correct chain.
  2. What is a stale block? A stale block is a block that was mined but was dropped from the blockchain because there was a longer blockchain with more proof of work.
  3. How do stale blocks occur? To blocks are mined at roughly the same time and are verify and added to the blockchain but only the chain that gets more blocks added onto it will become the real chain and the other blocks on the othe chain will be dropped.
  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction? It’s important to wait for six blocks to be mined and propagated through out the network because it will most likely not get dropped and become a stale block.
1 Like
  1. When two miners solve a block at the same time, the block that has a new block added to it first will create a longer block in the chain and start to receive new blocks. The block that was not cryptographically linked will be sent back to the mempool for re-verification.

  2. A stale block is a once-valid block that gets dropped because there is another version of the blockchain that is longer and is now considered the truth.

  3. Stale blocks occur because the blocks are being produced too quickly and two blocks are created at the same time.

  4. It’s important to wait for more than one block to be confirmed because there is a possibility that your block could be dropped due to a longer version of the blockchain being accepted.

2 Likes

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

A temporary split will occur with both the ends being valid however, one will be deleted based on which block gets the subsequent block first.

What is a stale block?

Stale block is the block that gets removed from the chain as it was not part of the longest chain. The transactions in this block will be sent back to the mempool.

How do stale blocks occur?

Sometimes 2 valid blocks can be mined at the same time by miners. This causes a split in the chain. However, the block that gets its successor first will stay (as it is the longer chain) and the other will be deleted. This deleted block is called the Stale Block.

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

This is because of the possibility of your transaction being listed in a potential stale block. By waiting for more blocks to confirm, we can reduce the scope of this happening.

1 Like

1.A fork in the network is produce. the longer block will be accepted as the true block even though both blocks are correct.
2.A stale block is a block that is not accepted even though is valid in a forking situation.
3.First, both miner A and B produce a block at the same time. Both are valid block. The block that is shorter and not chosen to be append in the network is discarded back into the mempool. This is the formation of a stale block.
4.It greatly reduces the odds of being a stale or orphan block.

1 Like

Every block will have a timestamp whatever the particular miner enters. The 10 minutes is just a goal for the difficulty adjustment to reach. Difficulty adjustment will happen approximately every 2 weeks, so that blocks are mined at a speed of one blocks per 10 minutes. (every 2016 blocks the mining difficulty will adjust to maintain an average of 10 minutes interval.) If you check the blockchain, you will see that blocks are mined sometimes after 5minutes and sometimes after 20 minutes. It’s all about probabilities

2 Likes

You probably know this, but in case, I Just want to point out that it’s not about the lenght of the blocks.
You are talking about ‘longer block’ etcetera.
If 2 miners mine successfully a block at the Sam time at the same blockheight, you basically have 2 correct valid blockchains, with each a different block at the end. So basically accidentally fork the blockchain. Then it depends on wich of those 2 valid blockchains the next miner mines a new block on top. Wich will make 1 blockchain longer than the other. The other (last) block of the shorter blockchain, will become a stale block and transactions that aren’t already included in the other blockchain, will go back to the mempool

2 Likes
  1. When two miners solve a block at the same time the chain is split temporarily until the next miner that solves one of those blocks it has chosen to use the data from. The other block is then considered a stale block and those transactions are returned to the mempool.

  2. A stale block is a block not chosen to be part of the longest chain. The transactions from that block is then returned to the mempool.

  3. Stale blocks occur when two miners solve the block at the same time and the next miners chooses the other block which is then accepted into the longest chain with the highest difficulty.

  4. It is important to wait for more than one block to be confirmed to ensure you are not mining a potentially stale block.

1 Like

You don’t wait for 6 confirmations to mine.
6 confirmations is relevant for transactions. If you broadcast a new transaction, first it will be placed in your mempool (with an SPV, it will be on 1 of their nodes mempool.) then because each node has a list of peers (other full nodes) the transaction will gossip around each peer to their peers until every node has your transaction in the mempool.
Then if a miner successfully mines a block and added your transaction into the block, the transaction will have 1 confirmation (meaning your transaction is in the latest block)
When a new block gets mined, your transaction is in the Penultimate block. So each new block that gets mined on top of the block that contains your transaction, is 1 new confirmation. So 6 confirmations means that 5 new blocks are mined onbthe block containing your transaction.
1 confirmation, you still have a chance that the transaction goes back to the mempool if someone mined a block around the same time on that same blockheight. 2 confirmations, then it will be harder to reorg the 2 latest blocks, because you need lots of luck or having lots of hashpower.
The more confirmations, the more blocks are mined and harder for a malicious miner to re-mine all of them within the time another miner mines a new block.
The rule = the longest chain wins.
To reorg lots of blocks is only possible if you have more hashpower than everybody else.
6 confirmations is considered safe enough.
It also depends what your transaction is about.
For a coffee, I would settle for 1 confirmation,
To sell a car, I would be happy with 3 confirmations. To sell a house, I would at least wait for 6 confirmations to be sure that the transaction is imutatable on the blockchain forever

2 Likes
  1. It creates 2 different versions of the blockchain
  2. Dropped block, transactions from that block go to mempool
  3. When block is dropped, unconfirmed. Block with the shortest chain, with less difficulty
  4. To ensure that your block will not be dropped
1 Like

Understood. Thank you.

1 Like

Homework on Stale Blocks-Qs

  1. What happens in the bitcoin network when two miners solve a block at the same time?
    There will be 2 versions of the blockchain

  2. What is a stale block?
    Blocks that were once in the blockchain but were dropped and their transactions returned to the mempool

  3. How do stale blocks occur?
    When miners choose to mine on the longest chain of the two blockchain versions created

  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    Incase the transaction is included in a stale or orphaned block, it is best to wait for 6 confirmed transactions so to secure it will not be dropped and your transaction returned to the mempool.

2 Likes
  1. the network will choose the longest chain the block that isn’t chosen gets put in the mempool

  2. this is a block that isn’t chosen by the network and is sent to the mempool

  3. when a miner solves a new block based on one of the two "twin’’ blocks, it creates a longer version of the blockchain. The other version is rejected ant that block gets dropped and put in the mempool

  4. to be sure that your transaction is not in a stale block.

1 Like
  1. When two miners solve a block at the same time, initially both blocks are valid and accepted by nodes local to the miners. Eventually (after approximately 10 minutes), a miner on the network will solve the NEXT block and that following block will be subsequent to one of those two previously “competing blocks.” At this time, that version of the chain with the most POW will be accepted by the network and any outstanding TX’s from the previous black that were not already submitted, will return to the mempool.

  2. A “stale block” would be that which, in the above scenario, is ultimately not accepted by the network after its competitor has been included with the submission of a subsequent block added.

  3. A block becomes “stale” after having been mined legitimately, but then invalidated by the submission of a different version of the block chain that includes more POW (i.e. a longer version).

  4. It’s important, because after 6 successive blocks have been accepted by the network, there is no realistic chance of the transaction being excluded from the ledger.

1 Like
  1. What happens in the bitcoin network when two miners solve a block at the same time?
    For an amount of time there will be 2 truths in the Blockchain with two blocks added at the same time. The one which will get added the next block that had been propagated be the nodes will stay as the valid one because blocks will be propagated for the longest version of the blockchain. The other one will be dropped and taken back to the mempool.
  2. What is a stale block?
    This is the one that has been removed and dropped back to them menpool
  3. How do stale blocks occur?
    See answer 1…
  4. Why is it important to wait for more than one block to be confirmed when sending or receiving a transaction?
    After waiting for 6 confirmations you can ensure that a block not be dropped from the chain.
1 Like
  1. In this situation, the longer block will be validated and the other one will be dropped.

  2. The block that was dropped is called stale block or orphan.

  3. Stale blocks occur when in the bitcoin network two miners solve a block in the same time, but one has a longer version of the blockchain. This block will win and the other one (stale) will be dropped and sent back to the mempool.

  4. It is important to wait for more than one block to be confirmed when sending or receiving a transaction to avoid the issue with the stale blocks.

1 Like

1- When two miners solve a block at the same time, each of their blocks gets propagated within the network in two different paths
2- A stale block is a block that is removed from the blockchain
3- A stale block occurs because of the presence of another path (long trail chain) that is more consistent with the truth
4- To avoid stale or orphaned blocks

1 Like

You can’t avoid stale blocks. The reason you should wait is to make sure your tx is not part of a stale block. :slight_smile:

1 Like

thanks for the clarification!

  1. Two versions of the blockchain are created.

  2. It is a block that has been droped and sent back to the mempool.

  3. The fastest miner appends the next block creates the valid version of the blockchain. The unconfirmed blocks are dropped to the mempool.

  4. To assure the confirmation of the transaction. It becomes less likely it will be dropped if more blocks are added to the network after it.

1 Like